Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_pdfviewer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/pdfjs/web')
-rw-r--r--js/pdfjs/web/cmaps/78-EUC-H.bcmapbin0 -> 2404 bytes
-rw-r--r--js/pdfjs/web/cmaps/78-EUC-V.bcmapbin0 -> 173 bytes
-rw-r--r--js/pdfjs/web/cmaps/78-H.bcmapbin0 -> 2379 bytes
-rw-r--r--js/pdfjs/web/cmaps/78-RKSJ-H.bcmapbin0 -> 2398 bytes
-rw-r--r--js/pdfjs/web/cmaps/78-RKSJ-V.bcmapbin0 -> 173 bytes
-rw-r--r--js/pdfjs/web/cmaps/78-V.bcmapbin0 -> 169 bytes
-rw-r--r--js/pdfjs/web/cmaps/78ms-RKSJ-H.bcmapbin0 -> 2651 bytes
-rw-r--r--js/pdfjs/web/cmaps/78ms-RKSJ-V.bcmapbin0 -> 290 bytes
-rw-r--r--js/pdfjs/web/cmaps/83pv-RKSJ-H.bcmapbin0 -> 905 bytes
-rw-r--r--js/pdfjs/web/cmaps/90ms-RKSJ-H.bcmapbin0 -> 721 bytes
-rw-r--r--js/pdfjs/web/cmaps/90ms-RKSJ-V.bcmapbin0 -> 290 bytes
-rw-r--r--js/pdfjs/web/cmaps/90msp-RKSJ-H.bcmapbin0 -> 715 bytes
-rw-r--r--js/pdfjs/web/cmaps/90msp-RKSJ-V.bcmapbin0 -> 291 bytes
-rw-r--r--js/pdfjs/web/cmaps/90pv-RKSJ-H.bcmapbin0 -> 982 bytes
-rw-r--r--js/pdfjs/web/cmaps/90pv-RKSJ-V.bcmapbin0 -> 260 bytes
-rw-r--r--js/pdfjs/web/cmaps/Add-H.bcmapbin0 -> 2419 bytes
-rw-r--r--js/pdfjs/web/cmaps/Add-RKSJ-H.bcmapbin0 -> 2413 bytes
-rw-r--r--js/pdfjs/web/cmaps/Add-RKSJ-V.bcmapbin0 -> 287 bytes
-rw-r--r--js/pdfjs/web/cmaps/Add-V.bcmapbin0 -> 282 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-CNS1-0.bcmapbin0 -> 317 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-CNS1-1.bcmapbin0 -> 371 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-CNS1-2.bcmapbin0 -> 376 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-CNS1-3.bcmapbin0 -> 401 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-CNS1-4.bcmapbin0 -> 405 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-CNS1-5.bcmapbin0 -> 406 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-CNS1-6.bcmapbin0 -> 406 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-CNS1-UCS2.bcmapbin0 -> 41193 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-GB1-0.bcmapbin0 -> 217 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-GB1-1.bcmapbin0 -> 250 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-GB1-2.bcmapbin0 -> 465 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-GB1-3.bcmapbin0 -> 470 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-GB1-4.bcmapbin0 -> 601 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-GB1-5.bcmapbin0 -> 625 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-GB1-UCS2.bcmapbin0 -> 33974 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-Japan1-0.bcmapbin0 -> 225 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-Japan1-1.bcmapbin0 -> 226 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-Japan1-2.bcmapbin0 -> 233 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-Japan1-3.bcmapbin0 -> 242 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-Japan1-4.bcmapbin0 -> 337 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-Japan1-5.bcmapbin0 -> 430 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-Japan1-6.bcmapbin0 -> 485 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-Japan1-UCS2.bcmapbin0 -> 40951 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-Korea1-0.bcmapbin0 -> 241 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-Korea1-1.bcmapbin0 -> 386 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-Korea1-2.bcmapbin0 -> 391 bytes
-rw-r--r--js/pdfjs/web/cmaps/Adobe-Korea1-UCS2.bcmapbin0 -> 23293 bytes
-rw-r--r--js/pdfjs/web/cmaps/B5-H.bcmapbin0 -> 1086 bytes
-rw-r--r--js/pdfjs/web/cmaps/B5-V.bcmapbin0 -> 142 bytes
-rw-r--r--js/pdfjs/web/cmaps/B5pc-H.bcmapbin0 -> 1099 bytes
-rw-r--r--js/pdfjs/web/cmaps/B5pc-V.bcmapbin0 -> 144 bytes
-rw-r--r--js/pdfjs/web/cmaps/CNS-EUC-H.bcmapbin0 -> 1780 bytes
-rw-r--r--js/pdfjs/web/cmaps/CNS-EUC-V.bcmapbin0 -> 1920 bytes
-rw-r--r--js/pdfjs/web/cmaps/CNS1-H.bcmapbin0 -> 706 bytes
-rw-r--r--js/pdfjs/web/cmaps/CNS1-V.bcmapbin0 -> 143 bytes
-rw-r--r--js/pdfjs/web/cmaps/CNS2-H.bcmapbin0 -> 504 bytes
-rw-r--r--js/pdfjs/web/cmaps/CNS2-V.bcmap3
-rw-r--r--js/pdfjs/web/cmaps/ETHK-B5-H.bcmapbin0 -> 4426 bytes
-rw-r--r--js/pdfjs/web/cmaps/ETHK-B5-V.bcmapbin0 -> 158 bytes
-rw-r--r--js/pdfjs/web/cmaps/ETen-B5-H.bcmapbin0 -> 1125 bytes
-rw-r--r--js/pdfjs/web/cmaps/ETen-B5-V.bcmapbin0 -> 158 bytes
-rw-r--r--js/pdfjs/web/cmaps/ETenms-B5-H.bcmap3
-rw-r--r--js/pdfjs/web/cmaps/ETenms-B5-V.bcmapbin0 -> 172 bytes
-rw-r--r--js/pdfjs/web/cmaps/EUC-H.bcmapbin0 -> 578 bytes
-rw-r--r--js/pdfjs/web/cmaps/EUC-V.bcmapbin0 -> 170 bytes
-rw-r--r--js/pdfjs/web/cmaps/Ext-H.bcmapbin0 -> 2536 bytes
-rw-r--r--js/pdfjs/web/cmaps/Ext-RKSJ-H.bcmapbin0 -> 2542 bytes
-rw-r--r--js/pdfjs/web/cmaps/Ext-RKSJ-V.bcmapbin0 -> 218 bytes
-rw-r--r--js/pdfjs/web/cmaps/Ext-V.bcmapbin0 -> 215 bytes
-rw-r--r--js/pdfjs/web/cmaps/GB-EUC-H.bcmapbin0 -> 549 bytes
-rw-r--r--js/pdfjs/web/cmaps/GB-EUC-V.bcmapbin0 -> 179 bytes
-rw-r--r--js/pdfjs/web/cmaps/GB-H.bcmap4
-rw-r--r--js/pdfjs/web/cmaps/GB-V.bcmapbin0 -> 175 bytes
-rw-r--r--js/pdfjs/web/cmaps/GBK-EUC-H.bcmapbin0 -> 14692 bytes
-rw-r--r--js/pdfjs/web/cmaps/GBK-EUC-V.bcmapbin0 -> 180 bytes
-rw-r--r--js/pdfjs/web/cmaps/GBK2K-H.bcmapbin0 -> 19662 bytes
-rw-r--r--js/pdfjs/web/cmaps/GBK2K-V.bcmapbin0 -> 219 bytes
-rw-r--r--js/pdfjs/web/cmaps/GBKp-EUC-H.bcmapbin0 -> 14686 bytes
-rw-r--r--js/pdfjs/web/cmaps/GBKp-EUC-V.bcmapbin0 -> 181 bytes
-rw-r--r--js/pdfjs/web/cmaps/GBT-EUC-H.bcmapbin0 -> 7290 bytes
-rw-r--r--js/pdfjs/web/cmaps/GBT-EUC-V.bcmapbin0 -> 180 bytes
-rw-r--r--js/pdfjs/web/cmaps/GBT-H.bcmapbin0 -> 7269 bytes
-rw-r--r--js/pdfjs/web/cmaps/GBT-V.bcmapbin0 -> 176 bytes
-rw-r--r--js/pdfjs/web/cmaps/GBTpc-EUC-H.bcmapbin0 -> 7298 bytes
-rw-r--r--js/pdfjs/web/cmaps/GBTpc-EUC-V.bcmapbin0 -> 182 bytes
-rw-r--r--js/pdfjs/web/cmaps/GBpc-EUC-H.bcmapbin0 -> 557 bytes
-rw-r--r--js/pdfjs/web/cmaps/GBpc-EUC-V.bcmapbin0 -> 181 bytes
-rw-r--r--js/pdfjs/web/cmaps/H.bcmapbin0 -> 553 bytes
-rw-r--r--js/pdfjs/web/cmaps/HKdla-B5-H.bcmapbin0 -> 2654 bytes
-rw-r--r--js/pdfjs/web/cmaps/HKdla-B5-V.bcmapbin0 -> 148 bytes
-rw-r--r--js/pdfjs/web/cmaps/HKdlb-B5-H.bcmapbin0 -> 2414 bytes
-rw-r--r--js/pdfjs/web/cmaps/HKdlb-B5-V.bcmapbin0 -> 148 bytes
-rw-r--r--js/pdfjs/web/cmaps/HKgccs-B5-H.bcmapbin0 -> 2292 bytes
-rw-r--r--js/pdfjs/web/cmaps/HKgccs-B5-V.bcmapbin0 -> 149 bytes
-rw-r--r--js/pdfjs/web/cmaps/HKm314-B5-H.bcmapbin0 -> 1772 bytes
-rw-r--r--js/pdfjs/web/cmaps/HKm314-B5-V.bcmapbin0 -> 149 bytes
-rw-r--r--js/pdfjs/web/cmaps/HKm471-B5-H.bcmapbin0 -> 2171 bytes
-rw-r--r--js/pdfjs/web/cmaps/HKm471-B5-V.bcmapbin0 -> 149 bytes
-rw-r--r--js/pdfjs/web/cmaps/HKscs-B5-H.bcmapbin0 -> 4437 bytes
-rw-r--r--js/pdfjs/web/cmaps/HKscs-B5-V.bcmapbin0 -> 159 bytes
-rw-r--r--js/pdfjs/web/cmaps/Hankaku.bcmapbin0 -> 132 bytes
-rw-r--r--js/pdfjs/web/cmaps/Hiragana.bcmapbin0 -> 124 bytes
-rw-r--r--js/pdfjs/web/cmaps/KSC-EUC-H.bcmapbin0 -> 1848 bytes
-rw-r--r--js/pdfjs/web/cmaps/KSC-EUC-V.bcmapbin0 -> 164 bytes
-rw-r--r--js/pdfjs/web/cmaps/KSC-H.bcmapbin0 -> 1831 bytes
-rw-r--r--js/pdfjs/web/cmaps/KSC-Johab-H.bcmapbin0 -> 16791 bytes
-rw-r--r--js/pdfjs/web/cmaps/KSC-Johab-V.bcmapbin0 -> 166 bytes
-rw-r--r--js/pdfjs/web/cmaps/KSC-V.bcmapbin0 -> 160 bytes
-rw-r--r--js/pdfjs/web/cmaps/KSCms-UHC-H.bcmapbin0 -> 2787 bytes
-rw-r--r--js/pdfjs/web/cmaps/KSCms-UHC-HW-H.bcmapbin0 -> 2789 bytes
-rw-r--r--js/pdfjs/web/cmaps/KSCms-UHC-HW-V.bcmapbin0 -> 169 bytes
-rw-r--r--js/pdfjs/web/cmaps/KSCms-UHC-V.bcmapbin0 -> 166 bytes
-rw-r--r--js/pdfjs/web/cmaps/KSCpc-EUC-H.bcmapbin0 -> 2024 bytes
-rw-r--r--js/pdfjs/web/cmaps/KSCpc-EUC-V.bcmapbin0 -> 166 bytes
-rw-r--r--js/pdfjs/web/cmaps/Katakana.bcmapbin0 -> 100 bytes
-rw-r--r--js/pdfjs/web/cmaps/LICENSE36
-rw-r--r--js/pdfjs/web/cmaps/NWP-H.bcmapbin0 -> 2765 bytes
-rw-r--r--js/pdfjs/web/cmaps/NWP-V.bcmapbin0 -> 252 bytes
-rw-r--r--js/pdfjs/web/cmaps/RKSJ-H.bcmapbin0 -> 534 bytes
-rw-r--r--js/pdfjs/web/cmaps/RKSJ-V.bcmapbin0 -> 170 bytes
-rw-r--r--js/pdfjs/web/cmaps/Roman.bcmapbin0 -> 96 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniCNS-UCS2-H.bcmapbin0 -> 48280 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniCNS-UCS2-V.bcmapbin0 -> 156 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniCNS-UTF16-H.bcmapbin0 -> 50419 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniCNS-UTF16-V.bcmapbin0 -> 156 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniCNS-UTF32-H.bcmapbin0 -> 52679 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniCNS-UTF32-V.bcmapbin0 -> 160 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniCNS-UTF8-H.bcmapbin0 -> 53629 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniCNS-UTF8-V.bcmapbin0 -> 157 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniGB-UCS2-H.bcmapbin0 -> 43366 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniGB-UCS2-V.bcmapbin0 -> 193 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniGB-UTF16-H.bcmapbin0 -> 44086 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniGB-UTF16-V.bcmapbin0 -> 178 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniGB-UTF32-H.bcmapbin0 -> 45738 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniGB-UTF32-V.bcmapbin0 -> 182 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniGB-UTF8-H.bcmapbin0 -> 46837 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniGB-UTF8-V.bcmapbin0 -> 181 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJIS-UCS2-H.bcmapbin0 -> 25439 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJIS-UCS2-HW-H.bcmapbin0 -> 119 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJIS-UCS2-HW-V.bcmapbin0 -> 680 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJIS-UCS2-V.bcmapbin0 -> 664 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJIS-UTF16-H.bcmapbin0 -> 39443 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJIS-UTF16-V.bcmapbin0 -> 643 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJIS-UTF32-H.bcmapbin0 -> 40539 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJIS-UTF32-V.bcmapbin0 -> 677 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJIS-UTF8-H.bcmapbin0 -> 41695 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJIS-UTF8-V.bcmapbin0 -> 678 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJIS2004-UTF16-H.bcmapbin0 -> 39534 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJIS2004-UTF16-V.bcmapbin0 -> 647 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJIS2004-UTF32-H.bcmapbin0 -> 40630 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJIS2004-UTF32-V.bcmapbin0 -> 681 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJIS2004-UTF8-H.bcmapbin0 -> 41779 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJIS2004-UTF8-V.bcmapbin0 -> 682 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJISPro-UCS2-HW-V.bcmapbin0 -> 705 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJISPro-UCS2-V.bcmapbin0 -> 689 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJISPro-UTF8-V.bcmapbin0 -> 726 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJISX0213-UTF32-H.bcmapbin0 -> 40517 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJISX0213-UTF32-V.bcmapbin0 -> 684 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJISX02132004-UTF32-H.bcmapbin0 -> 40608 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniJISX02132004-UTF32-V.bcmapbin0 -> 688 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniKS-UCS2-H.bcmapbin0 -> 25783 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniKS-UCS2-V.bcmapbin0 -> 178 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniKS-UTF16-H.bcmapbin0 -> 26327 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniKS-UTF16-V.bcmapbin0 -> 164 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniKS-UTF32-H.bcmapbin0 -> 26451 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniKS-UTF32-V.bcmapbin0 -> 168 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniKS-UTF8-H.bcmapbin0 -> 27790 bytes
-rw-r--r--js/pdfjs/web/cmaps/UniKS-UTF8-V.bcmapbin0 -> 169 bytes
-rw-r--r--js/pdfjs/web/cmaps/V.bcmapbin0 -> 166 bytes
-rw-r--r--js/pdfjs/web/cmaps/WP-Symbol.bcmapbin0 -> 179 bytes
-rw-r--r--js/pdfjs/web/compressed.tracemonkey-pldi-09.pdfbin0 -> 1016315 bytes
-rw-r--r--js/pdfjs/web/debugger.js623
-rw-r--r--js/pdfjs/web/images/annotation-check.svg11
-rw-r--r--js/pdfjs/web/images/annotation-comment.svg16
-rw-r--r--js/pdfjs/web/images/annotation-help.svg26
-rw-r--r--js/pdfjs/web/images/annotation-insert.svg10
-rw-r--r--js/pdfjs/web/images/annotation-key.svg11
-rw-r--r--js/pdfjs/web/images/annotation-newparagraph.svg11
-rw-r--r--js/pdfjs/web/images/annotation-noicon.svg7
-rw-r--r--js/pdfjs/web/images/annotation-note.svg42
-rw-r--r--js/pdfjs/web/images/annotation-paragraph.svg16
-rw-r--r--js/pdfjs/web/images/findbarButton-next-rtl.pngbin0 -> 199 bytes
-rw-r--r--js/pdfjs/web/images/findbarButton-next-rtl@2x.pngbin0 -> 304 bytes
-rw-r--r--js/pdfjs/web/images/findbarButton-next.pngbin0 -> 193 bytes
-rw-r--r--js/pdfjs/web/images/findbarButton-next@2x.pngbin0 -> 296 bytes
-rw-r--r--js/pdfjs/web/images/findbarButton-previous-rtl.pngbin0 -> 193 bytes
-rw-r--r--js/pdfjs/web/images/findbarButton-previous-rtl@2x.pngbin0 -> 296 bytes
-rw-r--r--js/pdfjs/web/images/findbarButton-previous.pngbin0 -> 199 bytes
-rw-r--r--js/pdfjs/web/images/findbarButton-previous@2x.pngbin0 -> 304 bytes
-rw-r--r--js/pdfjs/web/images/grab.curbin0 -> 326 bytes
-rw-r--r--js/pdfjs/web/images/grabbing.curbin0 -> 326 bytes
-rw-r--r--js/pdfjs/web/images/loading-icon.gifbin0 -> 2545 bytes
-rw-r--r--js/pdfjs/web/images/loading-small.pngbin0 -> 7402 bytes
-rw-r--r--js/pdfjs/web/images/loading-small@2x.pngbin0 -> 16131 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-documentProperties.pngbin0 -> 403 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-documentProperties@2x.pngbin0 -> 933 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-firstPage.pngbin0 -> 179 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-firstPage@2x.pngbin0 -> 266 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-handTool.pngbin0 -> 301 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-handTool@2x.pngbin0 -> 583 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-lastPage.pngbin0 -> 175 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-lastPage@2x.pngbin0 -> 276 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-rotateCcw.pngbin0 -> 360 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-rotateCcw@2x.pngbin0 -> 731 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-rotateCw.pngbin0 -> 359 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-rotateCw@2x.pngbin0 -> 714 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-scrollHorizontal.pngbin0 -> 218 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-scrollHorizontal@2x.pngbin0 -> 332 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-scrollVertical.pngbin0 -> 228 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-scrollVertical@2x.pngbin0 -> 349 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-scrollWrapped.pngbin0 -> 297 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-scrollWrapped@2x.pngbin0 -> 490 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-selectTool.pngbin0 -> 461 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-selectTool@2x.pngbin0 -> 1067 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-spreadEven.pngbin0 -> 347 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-spreadEven@2x.pngbin0 -> 694 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-spreadNone.pngbin0 -> 179 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-spreadNone@2x.pngbin0 -> 261 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-spreadOdd.pngbin0 -> 344 bytes
-rw-r--r--js/pdfjs/web/images/secondaryToolbarButton-spreadOdd@2x.pngbin0 -> 621 bytes
-rw-r--r--js/pdfjs/web/images/shadow.pngbin0 -> 290 bytes
-rw-r--r--js/pdfjs/web/images/texture.pngbin0 -> 2417 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-bookmark.pngbin0 -> 174 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-bookmark@2x.pngbin0 -> 260 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-download.pngbin0 -> 259 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-download@2x.pngbin0 -> 425 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-menuArrows.pngbin0 -> 107 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-menuArrows@2x.pngbin0 -> 152 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-openFile.pngbin0 -> 295 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-openFile@2x.pngbin0 -> 550 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-pageDown-rtl.pngbin0 -> 242 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-pageDown-rtl@2x.pngbin0 -> 398 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-pageDown.pngbin0 -> 238 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-pageDown@2x.pngbin0 -> 396 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-pageUp-rtl.pngbin0 -> 245 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-pageUp-rtl@2x.pngbin0 -> 405 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-pageUp.pngbin0 -> 246 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-pageUp@2x.pngbin0 -> 403 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-presentationMode.pngbin0 -> 321 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-presentationMode@2x.pngbin0 -> 586 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-print.pngbin0 -> 257 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-print@2x.pngbin0 -> 464 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-search.pngbin0 -> 309 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-search@2x.pngbin0 -> 653 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-secondaryToolbarToggle-rtl.pngbin0 -> 246 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-secondaryToolbarToggle-rtl@2x.pngbin0 -> 456 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-secondaryToolbarToggle.pngbin0 -> 243 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-secondaryToolbarToggle@2x.pngbin0 -> 458 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-sidebarToggle-rtl.pngbin0 -> 225 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-sidebarToggle-rtl@2x.pngbin0 -> 344 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-sidebarToggle.pngbin0 -> 225 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-sidebarToggle@2x.pngbin0 -> 331 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-viewAttachments.pngbin0 -> 384 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-viewAttachments@2x.pngbin0 -> 859 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-viewOutline-rtl.pngbin0 -> 177 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-viewOutline-rtl@2x.pngbin0 -> 394 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-viewOutline.pngbin0 -> 178 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-viewOutline@2x.pngbin0 -> 331 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-viewThumbnail.pngbin0 -> 185 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-viewThumbnail@2x.pngbin0 -> 219 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-zoomIn.pngbin0 -> 136 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-zoomIn@2x.pngbin0 -> 160 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-zoomOut.pngbin0 -> 88 bytes
-rw-r--r--js/pdfjs/web/images/toolbarButton-zoomOut@2x.pngbin0 -> 109 bytes
-rw-r--r--js/pdfjs/web/images/treeitem-collapsed-rtl.pngbin0 -> 143 bytes
-rw-r--r--js/pdfjs/web/images/treeitem-collapsed-rtl@2x.pngbin0 -> 167 bytes
-rw-r--r--js/pdfjs/web/images/treeitem-collapsed.pngbin0 -> 128 bytes
-rw-r--r--js/pdfjs/web/images/treeitem-collapsed@2x.pngbin0 -> 149 bytes
-rw-r--r--js/pdfjs/web/images/treeitem-expanded.pngbin0 -> 125 bytes
-rw-r--r--js/pdfjs/web/images/treeitem-expanded@2x.pngbin0 -> 172 bytes
-rw-r--r--js/pdfjs/web/locale/ach/viewer.properties207
-rw-r--r--js/pdfjs/web/locale/af/viewer.properties184
-rw-r--r--js/pdfjs/web/locale/an/viewer.properties184
-rw-r--r--js/pdfjs/web/locale/ar/viewer.properties246
-rw-r--r--js/pdfjs/web/locale/ast/viewer.properties207
-rw-r--r--js/pdfjs/web/locale/az/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/be/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/bg/viewer.properties242
-rw-r--r--js/pdfjs/web/locale/bn/viewer.properties246
-rw-r--r--js/pdfjs/web/locale/bo/viewer.properties245
-rw-r--r--js/pdfjs/web/locale/br/viewer.properties246
-rw-r--r--js/pdfjs/web/locale/brx/viewer.properties211
-rw-r--r--js/pdfjs/web/locale/bs/viewer.properties201
-rw-r--r--js/pdfjs/web/locale/ca/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/cak/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/cs/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/cy/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/da/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/de/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/dsb/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/el/viewer.properties246
-rw-r--r--js/pdfjs/web/locale/en-CA/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/en-GB/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/en-US/viewer.properties247
-rw-r--r--js/pdfjs/web/locale/eo/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/es-AR/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/es-CL/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/es-ES/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/es-MX/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/et/viewer.properties246
-rw-r--r--js/pdfjs/web/locale/eu/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/fa/viewer.properties223
-rw-r--r--js/pdfjs/web/locale/ff/viewer.properties242
-rw-r--r--js/pdfjs/web/locale/fi/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/fr/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/fy-NL/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/ga-IE/viewer.properties184
-rw-r--r--js/pdfjs/web/locale/gd/viewer.properties242
-rw-r--r--js/pdfjs/web/locale/gl/viewer.properties242
-rw-r--r--js/pdfjs/web/locale/gn/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/gu-IN/viewer.properties242
-rw-r--r--js/pdfjs/web/locale/he/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/hi-IN/viewer.properties244
-rw-r--r--js/pdfjs/web/locale/hr/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/hsb/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/hu/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/hy-AM/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/ia/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/id/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/is/viewer.properties239
-rw-r--r--js/pdfjs/web/locale/it/viewer.properties159
-rw-r--r--js/pdfjs/web/locale/ja/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/ka/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/kab/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/kk/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/km/viewer.properties184
-rw-r--r--js/pdfjs/web/locale/kn/viewer.properties193
-rw-r--r--js/pdfjs/web/locale/ko/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/lij/viewer.properties242
-rw-r--r--js/pdfjs/web/locale/lo/viewer.properties152
-rw-r--r--js/pdfjs/web/locale/locale.properties303
-rw-r--r--js/pdfjs/web/locale/lt/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/ltg/viewer.properties220
-rw-r--r--js/pdfjs/web/locale/lv/viewer.properties242
-rw-r--r--js/pdfjs/web/locale/mk/viewer.properties145
-rw-r--r--js/pdfjs/web/locale/mr/viewer.properties238
-rw-r--r--js/pdfjs/web/locale/ms/viewer.properties242
-rw-r--r--js/pdfjs/web/locale/my/viewer.properties198
-rw-r--r--js/pdfjs/web/locale/nb-NO/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/ne-NP/viewer.properties184
-rw-r--r--js/pdfjs/web/locale/nl/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/nn-NO/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/oc/viewer.properties247
-rw-r--r--js/pdfjs/web/locale/pa-IN/viewer.properties246
-rw-r--r--js/pdfjs/web/locale/pl/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/pt-BR/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/pt-PT/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/rm/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/ro/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/ru/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/scn/viewer.properties101
-rw-r--r--js/pdfjs/web/locale/si/viewer.properties207
-rw-r--r--js/pdfjs/web/locale/sk/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/sl/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/son/viewer.properties180
-rw-r--r--js/pdfjs/web/locale/sq/viewer.properties239
-rw-r--r--js/pdfjs/web/locale/sr/viewer.properties232
-rw-r--r--js/pdfjs/web/locale/sv-SE/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/ta/viewer.properties201
-rw-r--r--js/pdfjs/web/locale/te/viewer.properties222
-rw-r--r--js/pdfjs/web/locale/th/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/tl/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/tr/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/trs/viewer.properties213
-rw-r--r--js/pdfjs/web/locale/uk/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/ur/viewer.properties221
-rw-r--r--js/pdfjs/web/locale/uz/viewer.properties169
-rw-r--r--js/pdfjs/web/locale/vi/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/wo/viewer.properties124
-rw-r--r--js/pdfjs/web/locale/xh/viewer.properties184
-rw-r--r--js/pdfjs/web/locale/zh-CN/viewer.properties248
-rw-r--r--js/pdfjs/web/locale/zh-TW/viewer.properties248
-rw-r--r--js/pdfjs/web/viewer.css2442
-rw-r--r--js/pdfjs/web/viewer.html394
-rw-r--r--js/pdfjs/web/viewer.js13202
-rw-r--r--js/pdfjs/web/viewer.js.map1
375 files changed, 40506 insertions, 0 deletions
diff --git a/js/pdfjs/web/cmaps/78-EUC-H.bcmap b/js/pdfjs/web/cmaps/78-EUC-H.bcmap
new file mode 100644
index 0000000..2655fc7
--- /dev/null
+++ b/js/pdfjs/web/cmaps/78-EUC-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/78-EUC-V.bcmap b/js/pdfjs/web/cmaps/78-EUC-V.bcmap
new file mode 100644
index 0000000..f1ed853
--- /dev/null
+++ b/js/pdfjs/web/cmaps/78-EUC-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/78-H.bcmap b/js/pdfjs/web/cmaps/78-H.bcmap
new file mode 100644
index 0000000..39e89d3
--- /dev/null
+++ b/js/pdfjs/web/cmaps/78-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/78-RKSJ-H.bcmap b/js/pdfjs/web/cmaps/78-RKSJ-H.bcmap
new file mode 100644
index 0000000..e4167cb
--- /dev/null
+++ b/js/pdfjs/web/cmaps/78-RKSJ-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/78-RKSJ-V.bcmap b/js/pdfjs/web/cmaps/78-RKSJ-V.bcmap
new file mode 100644
index 0000000..50b1646
--- /dev/null
+++ b/js/pdfjs/web/cmaps/78-RKSJ-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/78-V.bcmap b/js/pdfjs/web/cmaps/78-V.bcmap
new file mode 100644
index 0000000..d7af99b
--- /dev/null
+++ b/js/pdfjs/web/cmaps/78-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/78ms-RKSJ-H.bcmap b/js/pdfjs/web/cmaps/78ms-RKSJ-H.bcmap
new file mode 100644
index 0000000..37077d0
--- /dev/null
+++ b/js/pdfjs/web/cmaps/78ms-RKSJ-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/78ms-RKSJ-V.bcmap b/js/pdfjs/web/cmaps/78ms-RKSJ-V.bcmap
new file mode 100644
index 0000000..acf2323
--- /dev/null
+++ b/js/pdfjs/web/cmaps/78ms-RKSJ-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/83pv-RKSJ-H.bcmap b/js/pdfjs/web/cmaps/83pv-RKSJ-H.bcmap
new file mode 100644
index 0000000..2359bc5
--- /dev/null
+++ b/js/pdfjs/web/cmaps/83pv-RKSJ-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/90ms-RKSJ-H.bcmap b/js/pdfjs/web/cmaps/90ms-RKSJ-H.bcmap
new file mode 100644
index 0000000..af82938
--- /dev/null
+++ b/js/pdfjs/web/cmaps/90ms-RKSJ-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/90ms-RKSJ-V.bcmap b/js/pdfjs/web/cmaps/90ms-RKSJ-V.bcmap
new file mode 100644
index 0000000..780549d
--- /dev/null
+++ b/js/pdfjs/web/cmaps/90ms-RKSJ-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/90msp-RKSJ-H.bcmap b/js/pdfjs/web/cmaps/90msp-RKSJ-H.bcmap
new file mode 100644
index 0000000..bfd3119
--- /dev/null
+++ b/js/pdfjs/web/cmaps/90msp-RKSJ-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/90msp-RKSJ-V.bcmap b/js/pdfjs/web/cmaps/90msp-RKSJ-V.bcmap
new file mode 100644
index 0000000..25ef14a
--- /dev/null
+++ b/js/pdfjs/web/cmaps/90msp-RKSJ-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/90pv-RKSJ-H.bcmap b/js/pdfjs/web/cmaps/90pv-RKSJ-H.bcmap
new file mode 100644
index 0000000..02f713b
--- /dev/null
+++ b/js/pdfjs/web/cmaps/90pv-RKSJ-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/90pv-RKSJ-V.bcmap b/js/pdfjs/web/cmaps/90pv-RKSJ-V.bcmap
new file mode 100644
index 0000000..d08e0cc
--- /dev/null
+++ b/js/pdfjs/web/cmaps/90pv-RKSJ-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Add-H.bcmap b/js/pdfjs/web/cmaps/Add-H.bcmap
new file mode 100644
index 0000000..59442ac
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Add-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Add-RKSJ-H.bcmap b/js/pdfjs/web/cmaps/Add-RKSJ-H.bcmap
new file mode 100644
index 0000000..a3065e4
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Add-RKSJ-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Add-RKSJ-V.bcmap b/js/pdfjs/web/cmaps/Add-RKSJ-V.bcmap
new file mode 100644
index 0000000..040014c
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Add-RKSJ-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Add-V.bcmap b/js/pdfjs/web/cmaps/Add-V.bcmap
new file mode 100644
index 0000000..2f816d3
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Add-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-CNS1-0.bcmap b/js/pdfjs/web/cmaps/Adobe-CNS1-0.bcmap
new file mode 100644
index 0000000..88ec04a
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-CNS1-0.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-CNS1-1.bcmap b/js/pdfjs/web/cmaps/Adobe-CNS1-1.bcmap
new file mode 100644
index 0000000..03a5014
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-CNS1-1.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-CNS1-2.bcmap b/js/pdfjs/web/cmaps/Adobe-CNS1-2.bcmap
new file mode 100644
index 0000000..2aa9514
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-CNS1-2.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-CNS1-3.bcmap b/js/pdfjs/web/cmaps/Adobe-CNS1-3.bcmap
new file mode 100644
index 0000000..86d8b8c
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-CNS1-3.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-CNS1-4.bcmap b/js/pdfjs/web/cmaps/Adobe-CNS1-4.bcmap
new file mode 100644
index 0000000..f50fc6c
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-CNS1-4.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-CNS1-5.bcmap b/js/pdfjs/web/cmaps/Adobe-CNS1-5.bcmap
new file mode 100644
index 0000000..6caf4a8
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-CNS1-5.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-CNS1-6.bcmap b/js/pdfjs/web/cmaps/Adobe-CNS1-6.bcmap
new file mode 100644
index 0000000..b77fb07
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-CNS1-6.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-CNS1-UCS2.bcmap b/js/pdfjs/web/cmaps/Adobe-CNS1-UCS2.bcmap
new file mode 100644
index 0000000..69d79a2
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-CNS1-UCS2.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-GB1-0.bcmap b/js/pdfjs/web/cmaps/Adobe-GB1-0.bcmap
new file mode 100644
index 0000000..3610108
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-GB1-0.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-GB1-1.bcmap b/js/pdfjs/web/cmaps/Adobe-GB1-1.bcmap
new file mode 100644
index 0000000..707bb10
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-GB1-1.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-GB1-2.bcmap b/js/pdfjs/web/cmaps/Adobe-GB1-2.bcmap
new file mode 100644
index 0000000..f7648cc
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-GB1-2.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-GB1-3.bcmap b/js/pdfjs/web/cmaps/Adobe-GB1-3.bcmap
new file mode 100644
index 0000000..8521458
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-GB1-3.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-GB1-4.bcmap b/js/pdfjs/web/cmaps/Adobe-GB1-4.bcmap
new file mode 100644
index 0000000..e40c63a
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-GB1-4.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-GB1-5.bcmap b/js/pdfjs/web/cmaps/Adobe-GB1-5.bcmap
new file mode 100644
index 0000000..d7623b5
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-GB1-5.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-GB1-UCS2.bcmap b/js/pdfjs/web/cmaps/Adobe-GB1-UCS2.bcmap
new file mode 100644
index 0000000..7586525
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-GB1-UCS2.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-Japan1-0.bcmap b/js/pdfjs/web/cmaps/Adobe-Japan1-0.bcmap
new file mode 100644
index 0000000..f0e94ec
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-Japan1-0.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-Japan1-1.bcmap b/js/pdfjs/web/cmaps/Adobe-Japan1-1.bcmap
new file mode 100644
index 0000000..dad42c5
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-Japan1-1.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-Japan1-2.bcmap b/js/pdfjs/web/cmaps/Adobe-Japan1-2.bcmap
new file mode 100644
index 0000000..090819a
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-Japan1-2.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-Japan1-3.bcmap b/js/pdfjs/web/cmaps/Adobe-Japan1-3.bcmap
new file mode 100644
index 0000000..087dfc1
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-Japan1-3.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-Japan1-4.bcmap b/js/pdfjs/web/cmaps/Adobe-Japan1-4.bcmap
new file mode 100644
index 0000000..46aa9bf
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-Japan1-4.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-Japan1-5.bcmap b/js/pdfjs/web/cmaps/Adobe-Japan1-5.bcmap
new file mode 100644
index 0000000..5b4b65c
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-Japan1-5.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-Japan1-6.bcmap b/js/pdfjs/web/cmaps/Adobe-Japan1-6.bcmap
new file mode 100644
index 0000000..e77d699
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-Japan1-6.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-Japan1-UCS2.bcmap b/js/pdfjs/web/cmaps/Adobe-Japan1-UCS2.bcmap
new file mode 100644
index 0000000..128a141
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-Japan1-UCS2.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-Korea1-0.bcmap b/js/pdfjs/web/cmaps/Adobe-Korea1-0.bcmap
new file mode 100644
index 0000000..cef1a99
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-Korea1-0.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-Korea1-1.bcmap b/js/pdfjs/web/cmaps/Adobe-Korea1-1.bcmap
new file mode 100644
index 0000000..11ffa36
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-Korea1-1.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-Korea1-2.bcmap b/js/pdfjs/web/cmaps/Adobe-Korea1-2.bcmap
new file mode 100644
index 0000000..3172308
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-Korea1-2.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Adobe-Korea1-UCS2.bcmap b/js/pdfjs/web/cmaps/Adobe-Korea1-UCS2.bcmap
new file mode 100644
index 0000000..f3371c0
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Adobe-Korea1-UCS2.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/B5-H.bcmap b/js/pdfjs/web/cmaps/B5-H.bcmap
new file mode 100644
index 0000000..beb4d22
--- /dev/null
+++ b/js/pdfjs/web/cmaps/B5-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/B5-V.bcmap b/js/pdfjs/web/cmaps/B5-V.bcmap
new file mode 100644
index 0000000..2d4f87d
--- /dev/null
+++ b/js/pdfjs/web/cmaps/B5-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/B5pc-H.bcmap b/js/pdfjs/web/cmaps/B5pc-H.bcmap
new file mode 100644
index 0000000..ce00131
--- /dev/null
+++ b/js/pdfjs/web/cmaps/B5pc-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/B5pc-V.bcmap b/js/pdfjs/web/cmaps/B5pc-V.bcmap
new file mode 100644
index 0000000..73b99ff
--- /dev/null
+++ b/js/pdfjs/web/cmaps/B5pc-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/CNS-EUC-H.bcmap b/js/pdfjs/web/cmaps/CNS-EUC-H.bcmap
new file mode 100644
index 0000000..61d1d0c
--- /dev/null
+++ b/js/pdfjs/web/cmaps/CNS-EUC-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/CNS-EUC-V.bcmap b/js/pdfjs/web/cmaps/CNS-EUC-V.bcmap
new file mode 100644
index 0000000..1a393a5
--- /dev/null
+++ b/js/pdfjs/web/cmaps/CNS-EUC-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/CNS1-H.bcmap b/js/pdfjs/web/cmaps/CNS1-H.bcmap
new file mode 100644
index 0000000..f738e21
--- /dev/null
+++ b/js/pdfjs/web/cmaps/CNS1-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/CNS1-V.bcmap b/js/pdfjs/web/cmaps/CNS1-V.bcmap
new file mode 100644
index 0000000..9c3169f
--- /dev/null
+++ b/js/pdfjs/web/cmaps/CNS1-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/CNS2-H.bcmap b/js/pdfjs/web/cmaps/CNS2-H.bcmap
new file mode 100644
index 0000000..c89b352
--- /dev/null
+++ b/js/pdfjs/web/cmaps/CNS2-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/CNS2-V.bcmap b/js/pdfjs/web/cmaps/CNS2-V.bcmap
new file mode 100644
index 0000000..7588cec
--- /dev/null
+++ b/js/pdfjs/web/cmaps/CNS2-V.bcmap
@@ -0,0 +1,3 @@
+àRCopyright 1990-2009 Adobe Systems Incorporated.
+All rights reserved.
+See ./LICENSEáCNS2-H \ No newline at end of file
diff --git a/js/pdfjs/web/cmaps/ETHK-B5-H.bcmap b/js/pdfjs/web/cmaps/ETHK-B5-H.bcmap
new file mode 100644
index 0000000..cb29415
--- /dev/null
+++ b/js/pdfjs/web/cmaps/ETHK-B5-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/ETHK-B5-V.bcmap b/js/pdfjs/web/cmaps/ETHK-B5-V.bcmap
new file mode 100644
index 0000000..f09aec6
--- /dev/null
+++ b/js/pdfjs/web/cmaps/ETHK-B5-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/ETen-B5-H.bcmap b/js/pdfjs/web/cmaps/ETen-B5-H.bcmap
new file mode 100644
index 0000000..c2d7746
--- /dev/null
+++ b/js/pdfjs/web/cmaps/ETen-B5-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/ETen-B5-V.bcmap b/js/pdfjs/web/cmaps/ETen-B5-V.bcmap
new file mode 100644
index 0000000..89bff15
--- /dev/null
+++ b/js/pdfjs/web/cmaps/ETen-B5-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/ETenms-B5-H.bcmap b/js/pdfjs/web/cmaps/ETenms-B5-H.bcmap
new file mode 100644
index 0000000..a7d69db
--- /dev/null
+++ b/js/pdfjs/web/cmaps/ETenms-B5-H.bcmap
@@ -0,0 +1,3 @@
+àRCopyright 1990-2009 Adobe Systems Incorporated.
+All rights reserved.
+See ./LICENSEá ETen-B5-H` ^ \ No newline at end of file
diff --git a/js/pdfjs/web/cmaps/ETenms-B5-V.bcmap b/js/pdfjs/web/cmaps/ETenms-B5-V.bcmap
new file mode 100644
index 0000000..adc5d61
--- /dev/null
+++ b/js/pdfjs/web/cmaps/ETenms-B5-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/EUC-H.bcmap b/js/pdfjs/web/cmaps/EUC-H.bcmap
new file mode 100644
index 0000000..e92ea5b
--- /dev/null
+++ b/js/pdfjs/web/cmaps/EUC-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/EUC-V.bcmap b/js/pdfjs/web/cmaps/EUC-V.bcmap
new file mode 100644
index 0000000..7a7c183
--- /dev/null
+++ b/js/pdfjs/web/cmaps/EUC-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Ext-H.bcmap b/js/pdfjs/web/cmaps/Ext-H.bcmap
new file mode 100644
index 0000000..3b5cde4
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Ext-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Ext-RKSJ-H.bcmap b/js/pdfjs/web/cmaps/Ext-RKSJ-H.bcmap
new file mode 100644
index 0000000..ea4d2d9
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Ext-RKSJ-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Ext-RKSJ-V.bcmap b/js/pdfjs/web/cmaps/Ext-RKSJ-V.bcmap
new file mode 100644
index 0000000..3457c27
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Ext-RKSJ-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Ext-V.bcmap b/js/pdfjs/web/cmaps/Ext-V.bcmap
new file mode 100644
index 0000000..4999ca4
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Ext-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/GB-EUC-H.bcmap b/js/pdfjs/web/cmaps/GB-EUC-H.bcmap
new file mode 100644
index 0000000..e39908b
--- /dev/null
+++ b/js/pdfjs/web/cmaps/GB-EUC-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/GB-EUC-V.bcmap b/js/pdfjs/web/cmaps/GB-EUC-V.bcmap
new file mode 100644
index 0000000..d5be544
--- /dev/null
+++ b/js/pdfjs/web/cmaps/GB-EUC-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/GB-H.bcmap b/js/pdfjs/web/cmaps/GB-H.bcmap
new file mode 100644
index 0000000..39189c5
--- /dev/null
+++ b/js/pdfjs/web/cmaps/GB-H.bcmap
@@ -0,0 +1,4 @@
+àRCopyright 1990-2009 Adobe Systems Incorporated.
+All rights reserved.
+See ./LICENSE!!º]aX!!]`21> p z$]‚"R‚d-Uƒ7*„ 4„%+ „Z „{/…%…<9K…b1]†."‡ ‰`]‡,"]ˆ
+"]ˆh"]‰F"]Š$"]‹"]‹`"]Œ>"]"]z"]ŽX"]6"]"]r"]‘P"]’."]“ "]“j"]”H"]•&"]–"]–b"]—@"]˜"]˜|"]™Z"]š8"]›"]›t"]œR"]0"]ž"]žl"]ŸJ"] ("]¡"]¡d"]¢B"]£ "X£~']¤W"]¥5"]¦"]¦q"]§O"]¨-"]© "]©i"]ªG"]«%"]¬"]¬a"]­?"]®"]®{"]¯Y"]°7"]±"]±s"]²Q"]³/"]´ "]´k"]µI"]¶'"]·"]·c"]¸A"]¹"]¹}"]º["]»9 \ No newline at end of file
diff --git a/js/pdfjs/web/cmaps/GB-V.bcmap b/js/pdfjs/web/cmaps/GB-V.bcmap
new file mode 100644
index 0000000..3108345
--- /dev/null
+++ b/js/pdfjs/web/cmaps/GB-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/GBK-EUC-H.bcmap b/js/pdfjs/web/cmaps/GBK-EUC-H.bcmap
new file mode 100644
index 0000000..05fff7e
--- /dev/null
+++ b/js/pdfjs/web/cmaps/GBK-EUC-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/GBK-EUC-V.bcmap b/js/pdfjs/web/cmaps/GBK-EUC-V.bcmap
new file mode 100644
index 0000000..0cdf6be
--- /dev/null
+++ b/js/pdfjs/web/cmaps/GBK-EUC-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/GBK2K-H.bcmap b/js/pdfjs/web/cmaps/GBK2K-H.bcmap
new file mode 100644
index 0000000..46f6ba5
--- /dev/null
+++ b/js/pdfjs/web/cmaps/GBK2K-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/GBK2K-V.bcmap b/js/pdfjs/web/cmaps/GBK2K-V.bcmap
new file mode 100644
index 0000000..d9a9479
--- /dev/null
+++ b/js/pdfjs/web/cmaps/GBK2K-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/GBKp-EUC-H.bcmap b/js/pdfjs/web/cmaps/GBKp-EUC-H.bcmap
new file mode 100644
index 0000000..5cb0af6
--- /dev/null
+++ b/js/pdfjs/web/cmaps/GBKp-EUC-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/GBKp-EUC-V.bcmap b/js/pdfjs/web/cmaps/GBKp-EUC-V.bcmap
new file mode 100644
index 0000000..bca93b8
--- /dev/null
+++ b/js/pdfjs/web/cmaps/GBKp-EUC-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/GBT-EUC-H.bcmap b/js/pdfjs/web/cmaps/GBT-EUC-H.bcmap
new file mode 100644
index 0000000..4b4e2d3
--- /dev/null
+++ b/js/pdfjs/web/cmaps/GBT-EUC-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/GBT-EUC-V.bcmap b/js/pdfjs/web/cmaps/GBT-EUC-V.bcmap
new file mode 100644
index 0000000..38f7066
--- /dev/null
+++ b/js/pdfjs/web/cmaps/GBT-EUC-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/GBT-H.bcmap b/js/pdfjs/web/cmaps/GBT-H.bcmap
new file mode 100644
index 0000000..8437ac3
--- /dev/null
+++ b/js/pdfjs/web/cmaps/GBT-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/GBT-V.bcmap b/js/pdfjs/web/cmaps/GBT-V.bcmap
new file mode 100644
index 0000000..697ab4a
--- /dev/null
+++ b/js/pdfjs/web/cmaps/GBT-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/GBTpc-EUC-H.bcmap b/js/pdfjs/web/cmaps/GBTpc-EUC-H.bcmap
new file mode 100644
index 0000000..f6e50e8
--- /dev/null
+++ b/js/pdfjs/web/cmaps/GBTpc-EUC-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/GBTpc-EUC-V.bcmap b/js/pdfjs/web/cmaps/GBTpc-EUC-V.bcmap
new file mode 100644
index 0000000..6c0d71a
--- /dev/null
+++ b/js/pdfjs/web/cmaps/GBTpc-EUC-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/GBpc-EUC-H.bcmap b/js/pdfjs/web/cmaps/GBpc-EUC-H.bcmap
new file mode 100644
index 0000000..c9edf67
--- /dev/null
+++ b/js/pdfjs/web/cmaps/GBpc-EUC-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/GBpc-EUC-V.bcmap b/js/pdfjs/web/cmaps/GBpc-EUC-V.bcmap
new file mode 100644
index 0000000..31450c9
--- /dev/null
+++ b/js/pdfjs/web/cmaps/GBpc-EUC-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/H.bcmap b/js/pdfjs/web/cmaps/H.bcmap
new file mode 100644
index 0000000..7b24ea4
--- /dev/null
+++ b/js/pdfjs/web/cmaps/H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/HKdla-B5-H.bcmap b/js/pdfjs/web/cmaps/HKdla-B5-H.bcmap
new file mode 100644
index 0000000..7d30c05
--- /dev/null
+++ b/js/pdfjs/web/cmaps/HKdla-B5-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/HKdla-B5-V.bcmap b/js/pdfjs/web/cmaps/HKdla-B5-V.bcmap
new file mode 100644
index 0000000..7894694
--- /dev/null
+++ b/js/pdfjs/web/cmaps/HKdla-B5-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/HKdlb-B5-H.bcmap b/js/pdfjs/web/cmaps/HKdlb-B5-H.bcmap
new file mode 100644
index 0000000..d829a23
--- /dev/null
+++ b/js/pdfjs/web/cmaps/HKdlb-B5-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/HKdlb-B5-V.bcmap b/js/pdfjs/web/cmaps/HKdlb-B5-V.bcmap
new file mode 100644
index 0000000..2b572b5
--- /dev/null
+++ b/js/pdfjs/web/cmaps/HKdlb-B5-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/HKgccs-B5-H.bcmap b/js/pdfjs/web/cmaps/HKgccs-B5-H.bcmap
new file mode 100644
index 0000000..971a4f2
--- /dev/null
+++ b/js/pdfjs/web/cmaps/HKgccs-B5-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/HKgccs-B5-V.bcmap b/js/pdfjs/web/cmaps/HKgccs-B5-V.bcmap
new file mode 100644
index 0000000..d353ca2
--- /dev/null
+++ b/js/pdfjs/web/cmaps/HKgccs-B5-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/HKm314-B5-H.bcmap b/js/pdfjs/web/cmaps/HKm314-B5-H.bcmap
new file mode 100644
index 0000000..576dc01
--- /dev/null
+++ b/js/pdfjs/web/cmaps/HKm314-B5-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/HKm314-B5-V.bcmap b/js/pdfjs/web/cmaps/HKm314-B5-V.bcmap
new file mode 100644
index 0000000..0e96d0e
--- /dev/null
+++ b/js/pdfjs/web/cmaps/HKm314-B5-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/HKm471-B5-H.bcmap b/js/pdfjs/web/cmaps/HKm471-B5-H.bcmap
new file mode 100644
index 0000000..11d170c
--- /dev/null
+++ b/js/pdfjs/web/cmaps/HKm471-B5-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/HKm471-B5-V.bcmap b/js/pdfjs/web/cmaps/HKm471-B5-V.bcmap
new file mode 100644
index 0000000..54959bf
--- /dev/null
+++ b/js/pdfjs/web/cmaps/HKm471-B5-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/HKscs-B5-H.bcmap b/js/pdfjs/web/cmaps/HKscs-B5-H.bcmap
new file mode 100644
index 0000000..6ef7857
--- /dev/null
+++ b/js/pdfjs/web/cmaps/HKscs-B5-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/HKscs-B5-V.bcmap b/js/pdfjs/web/cmaps/HKscs-B5-V.bcmap
new file mode 100644
index 0000000..1fb2fa2
--- /dev/null
+++ b/js/pdfjs/web/cmaps/HKscs-B5-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Hankaku.bcmap b/js/pdfjs/web/cmaps/Hankaku.bcmap
new file mode 100644
index 0000000..4b8ec7f
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Hankaku.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Hiragana.bcmap b/js/pdfjs/web/cmaps/Hiragana.bcmap
new file mode 100644
index 0000000..17e983e
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Hiragana.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/KSC-EUC-H.bcmap b/js/pdfjs/web/cmaps/KSC-EUC-H.bcmap
new file mode 100644
index 0000000..a45c65f
--- /dev/null
+++ b/js/pdfjs/web/cmaps/KSC-EUC-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/KSC-EUC-V.bcmap b/js/pdfjs/web/cmaps/KSC-EUC-V.bcmap
new file mode 100644
index 0000000..0e7b21f
--- /dev/null
+++ b/js/pdfjs/web/cmaps/KSC-EUC-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/KSC-H.bcmap b/js/pdfjs/web/cmaps/KSC-H.bcmap
new file mode 100644
index 0000000..b9b22b6
--- /dev/null
+++ b/js/pdfjs/web/cmaps/KSC-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/KSC-Johab-H.bcmap b/js/pdfjs/web/cmaps/KSC-Johab-H.bcmap
new file mode 100644
index 0000000..2531ffc
--- /dev/null
+++ b/js/pdfjs/web/cmaps/KSC-Johab-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/KSC-Johab-V.bcmap b/js/pdfjs/web/cmaps/KSC-Johab-V.bcmap
new file mode 100644
index 0000000..367ceb2
--- /dev/null
+++ b/js/pdfjs/web/cmaps/KSC-Johab-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/KSC-V.bcmap b/js/pdfjs/web/cmaps/KSC-V.bcmap
new file mode 100644
index 0000000..6ae2f0b
--- /dev/null
+++ b/js/pdfjs/web/cmaps/KSC-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/KSCms-UHC-H.bcmap b/js/pdfjs/web/cmaps/KSCms-UHC-H.bcmap
new file mode 100644
index 0000000..a8d4240
--- /dev/null
+++ b/js/pdfjs/web/cmaps/KSCms-UHC-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/KSCms-UHC-HW-H.bcmap b/js/pdfjs/web/cmaps/KSCms-UHC-HW-H.bcmap
new file mode 100644
index 0000000..8b4ae18
--- /dev/null
+++ b/js/pdfjs/web/cmaps/KSCms-UHC-HW-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/KSCms-UHC-HW-V.bcmap b/js/pdfjs/web/cmaps/KSCms-UHC-HW-V.bcmap
new file mode 100644
index 0000000..b655dbc
--- /dev/null
+++ b/js/pdfjs/web/cmaps/KSCms-UHC-HW-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/KSCms-UHC-V.bcmap b/js/pdfjs/web/cmaps/KSCms-UHC-V.bcmap
new file mode 100644
index 0000000..21f97f6
--- /dev/null
+++ b/js/pdfjs/web/cmaps/KSCms-UHC-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/KSCpc-EUC-H.bcmap b/js/pdfjs/web/cmaps/KSCpc-EUC-H.bcmap
new file mode 100644
index 0000000..e06f361
--- /dev/null
+++ b/js/pdfjs/web/cmaps/KSCpc-EUC-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/KSCpc-EUC-V.bcmap b/js/pdfjs/web/cmaps/KSCpc-EUC-V.bcmap
new file mode 100644
index 0000000..f3c9113
--- /dev/null
+++ b/js/pdfjs/web/cmaps/KSCpc-EUC-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Katakana.bcmap b/js/pdfjs/web/cmaps/Katakana.bcmap
new file mode 100644
index 0000000..524303c
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Katakana.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/LICENSE b/js/pdfjs/web/cmaps/LICENSE
new file mode 100644
index 0000000..b1ad168
--- /dev/null
+++ b/js/pdfjs/web/cmaps/LICENSE
@@ -0,0 +1,36 @@
+%%Copyright: -----------------------------------------------------------
+%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated.
+%%Copyright: All rights reserved.
+%%Copyright:
+%%Copyright: Redistribution and use in source and binary forms, with or
+%%Copyright: without modification, are permitted provided that the
+%%Copyright: following conditions are met:
+%%Copyright:
+%%Copyright: Redistributions of source code must retain the above
+%%Copyright: copyright notice, this list of conditions and the following
+%%Copyright: disclaimer.
+%%Copyright:
+%%Copyright: Redistributions in binary form must reproduce the above
+%%Copyright: copyright notice, this list of conditions and the following
+%%Copyright: disclaimer in the documentation and/or other materials
+%%Copyright: provided with the distribution.
+%%Copyright:
+%%Copyright: Neither the name of Adobe Systems Incorporated nor the names
+%%Copyright: of its contributors may be used to endorse or promote
+%%Copyright: products derived from this software without specific prior
+%%Copyright: written permission.
+%%Copyright:
+%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+%%Copyright: -----------------------------------------------------------
diff --git a/js/pdfjs/web/cmaps/NWP-H.bcmap b/js/pdfjs/web/cmaps/NWP-H.bcmap
new file mode 100644
index 0000000..afc5e4b
--- /dev/null
+++ b/js/pdfjs/web/cmaps/NWP-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/NWP-V.bcmap b/js/pdfjs/web/cmaps/NWP-V.bcmap
new file mode 100644
index 0000000..bb5785e
--- /dev/null
+++ b/js/pdfjs/web/cmaps/NWP-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/RKSJ-H.bcmap b/js/pdfjs/web/cmaps/RKSJ-H.bcmap
new file mode 100644
index 0000000..fb8d298
--- /dev/null
+++ b/js/pdfjs/web/cmaps/RKSJ-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/RKSJ-V.bcmap b/js/pdfjs/web/cmaps/RKSJ-V.bcmap
new file mode 100644
index 0000000..a2555a6
--- /dev/null
+++ b/js/pdfjs/web/cmaps/RKSJ-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/Roman.bcmap b/js/pdfjs/web/cmaps/Roman.bcmap
new file mode 100644
index 0000000..f896dcf
--- /dev/null
+++ b/js/pdfjs/web/cmaps/Roman.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniCNS-UCS2-H.bcmap b/js/pdfjs/web/cmaps/UniCNS-UCS2-H.bcmap
new file mode 100644
index 0000000..d5db27c
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniCNS-UCS2-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniCNS-UCS2-V.bcmap b/js/pdfjs/web/cmaps/UniCNS-UCS2-V.bcmap
new file mode 100644
index 0000000..1dc9b7a
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniCNS-UCS2-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniCNS-UTF16-H.bcmap b/js/pdfjs/web/cmaps/UniCNS-UTF16-H.bcmap
new file mode 100644
index 0000000..961afef
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniCNS-UTF16-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniCNS-UTF16-V.bcmap b/js/pdfjs/web/cmaps/UniCNS-UTF16-V.bcmap
new file mode 100644
index 0000000..df0cffe
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniCNS-UTF16-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniCNS-UTF32-H.bcmap b/js/pdfjs/web/cmaps/UniCNS-UTF32-H.bcmap
new file mode 100644
index 0000000..1ab18a1
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniCNS-UTF32-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniCNS-UTF32-V.bcmap b/js/pdfjs/web/cmaps/UniCNS-UTF32-V.bcmap
new file mode 100644
index 0000000..ad14662
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniCNS-UTF32-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniCNS-UTF8-H.bcmap b/js/pdfjs/web/cmaps/UniCNS-UTF8-H.bcmap
new file mode 100644
index 0000000..83c6bd7
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniCNS-UTF8-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniCNS-UTF8-V.bcmap b/js/pdfjs/web/cmaps/UniCNS-UTF8-V.bcmap
new file mode 100644
index 0000000..22a27e4
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniCNS-UTF8-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniGB-UCS2-H.bcmap b/js/pdfjs/web/cmaps/UniGB-UCS2-H.bcmap
new file mode 100644
index 0000000..5bd6228
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniGB-UCS2-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniGB-UCS2-V.bcmap b/js/pdfjs/web/cmaps/UniGB-UCS2-V.bcmap
new file mode 100644
index 0000000..53c534b
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniGB-UCS2-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniGB-UTF16-H.bcmap b/js/pdfjs/web/cmaps/UniGB-UTF16-H.bcmap
new file mode 100644
index 0000000..b95045b
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniGB-UTF16-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniGB-UTF16-V.bcmap b/js/pdfjs/web/cmaps/UniGB-UTF16-V.bcmap
new file mode 100644
index 0000000..51f023e
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniGB-UTF16-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniGB-UTF32-H.bcmap b/js/pdfjs/web/cmaps/UniGB-UTF32-H.bcmap
new file mode 100644
index 0000000..f0dbd14
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniGB-UTF32-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniGB-UTF32-V.bcmap b/js/pdfjs/web/cmaps/UniGB-UTF32-V.bcmap
new file mode 100644
index 0000000..ce9c30a
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniGB-UTF32-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniGB-UTF8-H.bcmap b/js/pdfjs/web/cmaps/UniGB-UTF8-H.bcmap
new file mode 100644
index 0000000..982ca46
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniGB-UTF8-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniGB-UTF8-V.bcmap b/js/pdfjs/web/cmaps/UniGB-UTF8-V.bcmap
new file mode 100644
index 0000000..f78020d
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniGB-UTF8-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJIS-UCS2-H.bcmap b/js/pdfjs/web/cmaps/UniJIS-UCS2-H.bcmap
new file mode 100644
index 0000000..7daf56a
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJIS-UCS2-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJIS-UCS2-HW-H.bcmap b/js/pdfjs/web/cmaps/UniJIS-UCS2-HW-H.bcmap
new file mode 100644
index 0000000..ac9975c
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJIS-UCS2-HW-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJIS-UCS2-HW-V.bcmap b/js/pdfjs/web/cmaps/UniJIS-UCS2-HW-V.bcmap
new file mode 100644
index 0000000..3da0a1c
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJIS-UCS2-HW-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJIS-UCS2-V.bcmap b/js/pdfjs/web/cmaps/UniJIS-UCS2-V.bcmap
new file mode 100644
index 0000000..c50b9dd
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJIS-UCS2-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJIS-UTF16-H.bcmap b/js/pdfjs/web/cmaps/UniJIS-UTF16-H.bcmap
new file mode 100644
index 0000000..6761344
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJIS-UTF16-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJIS-UTF16-V.bcmap b/js/pdfjs/web/cmaps/UniJIS-UTF16-V.bcmap
new file mode 100644
index 0000000..70bf90c
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJIS-UTF16-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJIS-UTF32-H.bcmap b/js/pdfjs/web/cmaps/UniJIS-UTF32-H.bcmap
new file mode 100644
index 0000000..7a83d53
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJIS-UTF32-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJIS-UTF32-V.bcmap b/js/pdfjs/web/cmaps/UniJIS-UTF32-V.bcmap
new file mode 100644
index 0000000..7a87135
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJIS-UTF32-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJIS-UTF8-H.bcmap b/js/pdfjs/web/cmaps/UniJIS-UTF8-H.bcmap
new file mode 100644
index 0000000..9f0334c
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJIS-UTF8-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJIS-UTF8-V.bcmap b/js/pdfjs/web/cmaps/UniJIS-UTF8-V.bcmap
new file mode 100644
index 0000000..808a94f
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJIS-UTF8-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJIS2004-UTF16-H.bcmap b/js/pdfjs/web/cmaps/UniJIS2004-UTF16-H.bcmap
new file mode 100644
index 0000000..d768bf8
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJIS2004-UTF16-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJIS2004-UTF16-V.bcmap b/js/pdfjs/web/cmaps/UniJIS2004-UTF16-V.bcmap
new file mode 100644
index 0000000..3d5bf6f
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJIS2004-UTF16-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJIS2004-UTF32-H.bcmap b/js/pdfjs/web/cmaps/UniJIS2004-UTF32-H.bcmap
new file mode 100644
index 0000000..09eee10
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJIS2004-UTF32-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJIS2004-UTF32-V.bcmap b/js/pdfjs/web/cmaps/UniJIS2004-UTF32-V.bcmap
new file mode 100644
index 0000000..6c54600
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJIS2004-UTF32-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJIS2004-UTF8-H.bcmap b/js/pdfjs/web/cmaps/UniJIS2004-UTF8-H.bcmap
new file mode 100644
index 0000000..1b1a64f
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJIS2004-UTF8-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJIS2004-UTF8-V.bcmap b/js/pdfjs/web/cmaps/UniJIS2004-UTF8-V.bcmap
new file mode 100644
index 0000000..994aa9e
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJIS2004-UTF8-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJISPro-UCS2-HW-V.bcmap b/js/pdfjs/web/cmaps/UniJISPro-UCS2-HW-V.bcmap
new file mode 100644
index 0000000..643f921
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJISPro-UCS2-HW-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJISPro-UCS2-V.bcmap b/js/pdfjs/web/cmaps/UniJISPro-UCS2-V.bcmap
new file mode 100644
index 0000000..c148f67
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJISPro-UCS2-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJISPro-UTF8-V.bcmap b/js/pdfjs/web/cmaps/UniJISPro-UTF8-V.bcmap
new file mode 100644
index 0000000..1849d80
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJISPro-UTF8-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJISX0213-UTF32-H.bcmap b/js/pdfjs/web/cmaps/UniJISX0213-UTF32-H.bcmap
new file mode 100644
index 0000000..a83a677
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJISX0213-UTF32-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJISX0213-UTF32-V.bcmap b/js/pdfjs/web/cmaps/UniJISX0213-UTF32-V.bcmap
new file mode 100644
index 0000000..f527248
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJISX0213-UTF32-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJISX02132004-UTF32-H.bcmap b/js/pdfjs/web/cmaps/UniJISX02132004-UTF32-H.bcmap
new file mode 100644
index 0000000..e1a988d
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJISX02132004-UTF32-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniJISX02132004-UTF32-V.bcmap b/js/pdfjs/web/cmaps/UniJISX02132004-UTF32-V.bcmap
new file mode 100644
index 0000000..47e054a
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniJISX02132004-UTF32-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniKS-UCS2-H.bcmap b/js/pdfjs/web/cmaps/UniKS-UCS2-H.bcmap
new file mode 100644
index 0000000..b5b9485
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniKS-UCS2-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniKS-UCS2-V.bcmap b/js/pdfjs/web/cmaps/UniKS-UCS2-V.bcmap
new file mode 100644
index 0000000..026adca
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniKS-UCS2-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniKS-UTF16-H.bcmap b/js/pdfjs/web/cmaps/UniKS-UTF16-H.bcmap
new file mode 100644
index 0000000..fd4e66e
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniKS-UTF16-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniKS-UTF16-V.bcmap b/js/pdfjs/web/cmaps/UniKS-UTF16-V.bcmap
new file mode 100644
index 0000000..075efb7
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniKS-UTF16-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniKS-UTF32-H.bcmap b/js/pdfjs/web/cmaps/UniKS-UTF32-H.bcmap
new file mode 100644
index 0000000..769d214
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniKS-UTF32-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniKS-UTF32-V.bcmap b/js/pdfjs/web/cmaps/UniKS-UTF32-V.bcmap
new file mode 100644
index 0000000..bdab208
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniKS-UTF32-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniKS-UTF8-H.bcmap b/js/pdfjs/web/cmaps/UniKS-UTF8-H.bcmap
new file mode 100644
index 0000000..6ff8674
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniKS-UTF8-H.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/UniKS-UTF8-V.bcmap b/js/pdfjs/web/cmaps/UniKS-UTF8-V.bcmap
new file mode 100644
index 0000000..8dfa76a
--- /dev/null
+++ b/js/pdfjs/web/cmaps/UniKS-UTF8-V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/V.bcmap b/js/pdfjs/web/cmaps/V.bcmap
new file mode 100644
index 0000000..fdec990
--- /dev/null
+++ b/js/pdfjs/web/cmaps/V.bcmap
Binary files differ
diff --git a/js/pdfjs/web/cmaps/WP-Symbol.bcmap b/js/pdfjs/web/cmaps/WP-Symbol.bcmap
new file mode 100644
index 0000000..46729bb
--- /dev/null
+++ b/js/pdfjs/web/cmaps/WP-Symbol.bcmap
Binary files differ
diff --git a/js/pdfjs/web/compressed.tracemonkey-pldi-09.pdf b/js/pdfjs/web/compressed.tracemonkey-pldi-09.pdf
new file mode 100644
index 0000000..6557018
--- /dev/null
+++ b/js/pdfjs/web/compressed.tracemonkey-pldi-09.pdf
Binary files differ
diff --git a/js/pdfjs/web/debugger.js b/js/pdfjs/web/debugger.js
new file mode 100644
index 0000000..39b1e00
--- /dev/null
+++ b/js/pdfjs/web/debugger.js
@@ -0,0 +1,623 @@
+/* Copyright 2012 Mozilla Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/* eslint-disable no-var */
+
+"use strict";
+
+var FontInspector = (function FontInspectorClosure() {
+ var fonts;
+ var active = false;
+ var fontAttribute = "data-font-name";
+ function removeSelection() {
+ const divs = document.querySelectorAll(`span[${fontAttribute}]`);
+ for (const div of divs) {
+ div.className = "";
+ }
+ }
+ function resetSelection() {
+ const divs = document.querySelectorAll(`span[${fontAttribute}]`);
+ for (const div of divs) {
+ div.className = "debuggerHideText";
+ }
+ }
+ function selectFont(fontName, show) {
+ const divs = document.querySelectorAll(
+ `span[${fontAttribute}=${fontName}]`
+ );
+ for (const div of divs) {
+ div.className = show ? "debuggerShowText" : "debuggerHideText";
+ }
+ }
+ function textLayerClick(e) {
+ if (
+ !e.target.dataset.fontName ||
+ e.target.tagName.toUpperCase() !== "SPAN"
+ ) {
+ return;
+ }
+ var fontName = e.target.dataset.fontName;
+ var selects = document.getElementsByTagName("input");
+ for (var i = 0; i < selects.length; ++i) {
+ var select = selects[i];
+ if (select.dataset.fontName !== fontName) {
+ continue;
+ }
+ select.checked = !select.checked;
+ selectFont(fontName, select.checked);
+ select.scrollIntoView();
+ }
+ }
+ return {
+ // Properties/functions needed by PDFBug.
+ id: "FontInspector",
+ name: "Font Inspector",
+ panel: null,
+ manager: null,
+ init: function init(pdfjsLib) {
+ var panel = this.panel;
+ var tmp = document.createElement("button");
+ tmp.addEventListener("click", resetSelection);
+ tmp.textContent = "Refresh";
+ panel.appendChild(tmp);
+
+ fonts = document.createElement("div");
+ panel.appendChild(fonts);
+ },
+ cleanup: function cleanup() {
+ fonts.textContent = "";
+ },
+ enabled: false,
+ get active() {
+ return active;
+ },
+ set active(value) {
+ active = value;
+ if (active) {
+ document.body.addEventListener("click", textLayerClick, true);
+ resetSelection();
+ } else {
+ document.body.removeEventListener("click", textLayerClick, true);
+ removeSelection();
+ }
+ },
+ // FontInspector specific functions.
+ fontAdded: function fontAdded(fontObj, url) {
+ function properties(obj, list) {
+ var moreInfo = document.createElement("table");
+ for (var i = 0; i < list.length; i++) {
+ var tr = document.createElement("tr");
+ var td1 = document.createElement("td");
+ td1.textContent = list[i];
+ tr.appendChild(td1);
+ var td2 = document.createElement("td");
+ td2.textContent = obj[list[i]].toString();
+ tr.appendChild(td2);
+ moreInfo.appendChild(tr);
+ }
+ return moreInfo;
+ }
+ var moreInfo = properties(fontObj, ["name", "type"]);
+ const fontName = fontObj.loadedName;
+ var font = document.createElement("div");
+ var name = document.createElement("span");
+ name.textContent = fontName;
+ var download = document.createElement("a");
+ if (url) {
+ url = /url\(['"]?([^\)"']+)/.exec(url);
+ download.href = url[1];
+ } else if (fontObj.data) {
+ download.href = URL.createObjectURL(
+ new Blob([fontObj.data], { type: fontObj.mimeType })
+ );
+ }
+ download.textContent = "Download";
+ var logIt = document.createElement("a");
+ logIt.href = "";
+ logIt.textContent = "Log";
+ logIt.addEventListener("click", function(event) {
+ event.preventDefault();
+ console.log(fontObj);
+ });
+ const select = document.createElement("input");
+ select.setAttribute("type", "checkbox");
+ select.dataset.fontName = fontName;
+ select.addEventListener("click", function() {
+ selectFont(fontName, select.checked);
+ });
+ font.appendChild(select);
+ font.appendChild(name);
+ font.appendChild(document.createTextNode(" "));
+ font.appendChild(download);
+ font.appendChild(document.createTextNode(" "));
+ font.appendChild(logIt);
+ font.appendChild(moreInfo);
+ fonts.appendChild(font);
+ // Somewhat of a hack, should probably add a hook for when the text layer
+ // is done rendering.
+ setTimeout(() => {
+ if (this.active) {
+ resetSelection();
+ }
+ }, 2000);
+ },
+ };
+})();
+
+var opMap;
+
+// Manages all the page steppers.
+var StepperManager = (function StepperManagerClosure() {
+ var steppers = [];
+ var stepperDiv = null;
+ var stepperControls = null;
+ var stepperChooser = null;
+ var breakPoints = Object.create(null);
+ return {
+ // Properties/functions needed by PDFBug.
+ id: "Stepper",
+ name: "Stepper",
+ panel: null,
+ manager: null,
+ init: function init(pdfjsLib) {
+ var self = this;
+ stepperControls = document.createElement("div");
+ stepperChooser = document.createElement("select");
+ stepperChooser.addEventListener("change", function(event) {
+ self.selectStepper(this.value);
+ });
+ stepperControls.appendChild(stepperChooser);
+ stepperDiv = document.createElement("div");
+ this.panel.appendChild(stepperControls);
+ this.panel.appendChild(stepperDiv);
+ if (sessionStorage.getItem("pdfjsBreakPoints")) {
+ breakPoints = JSON.parse(sessionStorage.getItem("pdfjsBreakPoints"));
+ }
+
+ opMap = Object.create(null);
+ for (var key in pdfjsLib.OPS) {
+ opMap[pdfjsLib.OPS[key]] = key;
+ }
+ },
+ cleanup: function cleanup() {
+ stepperChooser.textContent = "";
+ stepperDiv.textContent = "";
+ steppers = [];
+ },
+ enabled: false,
+ active: false,
+ // Stepper specific functions.
+ create: function create(pageIndex) {
+ var debug = document.createElement("div");
+ debug.id = "stepper" + pageIndex;
+ debug.setAttribute("hidden", true);
+ debug.className = "stepper";
+ stepperDiv.appendChild(debug);
+ var b = document.createElement("option");
+ b.textContent = "Page " + (pageIndex + 1);
+ b.value = pageIndex;
+ stepperChooser.appendChild(b);
+ var initBreakPoints = breakPoints[pageIndex] || [];
+ var stepper = new Stepper(debug, pageIndex, initBreakPoints);
+ steppers.push(stepper);
+ if (steppers.length === 1) {
+ this.selectStepper(pageIndex, false);
+ }
+ return stepper;
+ },
+ selectStepper: function selectStepper(pageIndex, selectPanel) {
+ var i;
+ pageIndex = pageIndex | 0;
+ if (selectPanel) {
+ this.manager.selectPanel(this);
+ }
+ for (i = 0; i < steppers.length; ++i) {
+ var stepper = steppers[i];
+ if (stepper.pageIndex === pageIndex) {
+ stepper.panel.removeAttribute("hidden");
+ } else {
+ stepper.panel.setAttribute("hidden", true);
+ }
+ }
+ var options = stepperChooser.options;
+ for (i = 0; i < options.length; ++i) {
+ var option = options[i];
+ option.selected = (option.value | 0) === pageIndex;
+ }
+ },
+ saveBreakPoints: function saveBreakPoints(pageIndex, bps) {
+ breakPoints[pageIndex] = bps;
+ sessionStorage.setItem("pdfjsBreakPoints", JSON.stringify(breakPoints));
+ },
+ };
+})();
+
+// The stepper for each page's IRQueue.
+var Stepper = (function StepperClosure() {
+ // Shorter way to create element and optionally set textContent.
+ function c(tag, textContent) {
+ var d = document.createElement(tag);
+ if (textContent) {
+ d.textContent = textContent;
+ }
+ return d;
+ }
+
+ function simplifyArgs(args) {
+ if (typeof args === "string") {
+ var MAX_STRING_LENGTH = 75;
+ return args.length <= MAX_STRING_LENGTH
+ ? args
+ : args.substring(0, MAX_STRING_LENGTH) + "...";
+ }
+ if (typeof args !== "object" || args === null) {
+ return args;
+ }
+ if ("length" in args) {
+ // array
+ var simpleArgs = [],
+ i,
+ ii;
+ var MAX_ITEMS = 10;
+ for (i = 0, ii = Math.min(MAX_ITEMS, args.length); i < ii; i++) {
+ simpleArgs.push(simplifyArgs(args[i]));
+ }
+ if (i < args.length) {
+ simpleArgs.push("...");
+ }
+ return simpleArgs;
+ }
+ var simpleObj = {};
+ for (var key in args) {
+ simpleObj[key] = simplifyArgs(args[key]);
+ }
+ return simpleObj;
+ }
+
+ function Stepper(panel, pageIndex, initialBreakPoints) {
+ this.panel = panel;
+ this.breakPoint = 0;
+ this.nextBreakPoint = null;
+ this.pageIndex = pageIndex;
+ this.breakPoints = initialBreakPoints;
+ this.currentIdx = -1;
+ this.operatorListIdx = 0;
+ }
+ Stepper.prototype = {
+ init: function init(operatorList) {
+ var panel = this.panel;
+ var content = c("div", "c=continue, s=step");
+ var table = c("table");
+ content.appendChild(table);
+ table.cellSpacing = 0;
+ var headerRow = c("tr");
+ table.appendChild(headerRow);
+ headerRow.appendChild(c("th", "Break"));
+ headerRow.appendChild(c("th", "Idx"));
+ headerRow.appendChild(c("th", "fn"));
+ headerRow.appendChild(c("th", "args"));
+ panel.appendChild(content);
+ this.table = table;
+ this.updateOperatorList(operatorList);
+ },
+ updateOperatorList: function updateOperatorList(operatorList) {
+ var self = this;
+
+ function cboxOnClick() {
+ var x = +this.dataset.idx;
+ if (this.checked) {
+ self.breakPoints.push(x);
+ } else {
+ self.breakPoints.splice(self.breakPoints.indexOf(x), 1);
+ }
+ StepperManager.saveBreakPoints(self.pageIndex, self.breakPoints);
+ }
+
+ var MAX_OPERATORS_COUNT = 15000;
+ if (this.operatorListIdx > MAX_OPERATORS_COUNT) {
+ return;
+ }
+
+ var chunk = document.createDocumentFragment();
+ var operatorsToDisplay = Math.min(
+ MAX_OPERATORS_COUNT,
+ operatorList.fnArray.length
+ );
+ for (var i = this.operatorListIdx; i < operatorsToDisplay; i++) {
+ var line = c("tr");
+ line.className = "line";
+ line.dataset.idx = i;
+ chunk.appendChild(line);
+ var checked = this.breakPoints.includes(i);
+ var args = operatorList.argsArray[i] || [];
+
+ var breakCell = c("td");
+ var cbox = c("input");
+ cbox.type = "checkbox";
+ cbox.className = "points";
+ cbox.checked = checked;
+ cbox.dataset.idx = i;
+ cbox.onclick = cboxOnClick;
+
+ breakCell.appendChild(cbox);
+ line.appendChild(breakCell);
+ line.appendChild(c("td", i.toString()));
+ var fn = opMap[operatorList.fnArray[i]];
+ var decArgs = args;
+ if (fn === "showText") {
+ var glyphs = args[0];
+ var newArgs = [];
+ var str = [];
+ for (var j = 0; j < glyphs.length; j++) {
+ var glyph = glyphs[j];
+ if (typeof glyph === "object" && glyph !== null) {
+ str.push(glyph.fontChar);
+ } else {
+ if (str.length > 0) {
+ newArgs.push(str.join(""));
+ str = [];
+ }
+ newArgs.push(glyph); // null or number
+ }
+ }
+ if (str.length > 0) {
+ newArgs.push(str.join(""));
+ }
+ decArgs = [newArgs];
+ }
+ line.appendChild(c("td", fn));
+ line.appendChild(c("td", JSON.stringify(simplifyArgs(decArgs))));
+ }
+ if (operatorsToDisplay < operatorList.fnArray.length) {
+ line = c("tr");
+ var lastCell = c("td", "...");
+ lastCell.colspan = 4;
+ chunk.appendChild(lastCell);
+ }
+ this.operatorListIdx = operatorList.fnArray.length;
+ this.table.appendChild(chunk);
+ },
+ getNextBreakPoint: function getNextBreakPoint() {
+ this.breakPoints.sort(function(a, b) {
+ return a - b;
+ });
+ for (var i = 0; i < this.breakPoints.length; i++) {
+ if (this.breakPoints[i] > this.currentIdx) {
+ return this.breakPoints[i];
+ }
+ }
+ return null;
+ },
+ breakIt: function breakIt(idx, callback) {
+ StepperManager.selectStepper(this.pageIndex, true);
+ var self = this;
+ var dom = document;
+ self.currentIdx = idx;
+ var listener = function(e) {
+ switch (e.keyCode) {
+ case 83: // step
+ dom.removeEventListener("keydown", listener);
+ self.nextBreakPoint = self.currentIdx + 1;
+ self.goTo(-1);
+ callback();
+ break;
+ case 67: // continue
+ dom.removeEventListener("keydown", listener);
+ var breakPoint = self.getNextBreakPoint();
+ self.nextBreakPoint = breakPoint;
+ self.goTo(-1);
+ callback();
+ break;
+ }
+ };
+ dom.addEventListener("keydown", listener);
+ self.goTo(idx);
+ },
+ goTo: function goTo(idx) {
+ var allRows = this.panel.getElementsByClassName("line");
+ for (var x = 0, xx = allRows.length; x < xx; ++x) {
+ var row = allRows[x];
+ if ((row.dataset.idx | 0) === idx) {
+ row.style.backgroundColor = "rgb(251,250,207)";
+ row.scrollIntoView();
+ } else {
+ row.style.backgroundColor = null;
+ }
+ }
+ },
+ };
+ return Stepper;
+})();
+
+var Stats = (function Stats() {
+ var stats = [];
+ function clear(node) {
+ while (node.hasChildNodes()) {
+ node.removeChild(node.lastChild);
+ }
+ }
+ function getStatIndex(pageNumber) {
+ for (var i = 0, ii = stats.length; i < ii; ++i) {
+ if (stats[i].pageNumber === pageNumber) {
+ return i;
+ }
+ }
+ return false;
+ }
+ return {
+ // Properties/functions needed by PDFBug.
+ id: "Stats",
+ name: "Stats",
+ panel: null,
+ manager: null,
+ init(pdfjsLib) {},
+ enabled: false,
+ active: false,
+ // Stats specific functions.
+ add(pageNumber, stat) {
+ if (!stat) {
+ return;
+ }
+ var statsIndex = getStatIndex(pageNumber);
+ if (statsIndex !== false) {
+ const b = stats[statsIndex];
+ this.panel.removeChild(b.div);
+ stats.splice(statsIndex, 1);
+ }
+ var wrapper = document.createElement("div");
+ wrapper.className = "stats";
+ var title = document.createElement("div");
+ title.className = "title";
+ title.textContent = "Page: " + pageNumber;
+ var statsDiv = document.createElement("div");
+ statsDiv.textContent = stat.toString();
+ wrapper.appendChild(title);
+ wrapper.appendChild(statsDiv);
+ stats.push({ pageNumber, div: wrapper });
+ stats.sort(function(a, b) {
+ return a.pageNumber - b.pageNumber;
+ });
+ clear(this.panel);
+ for (var i = 0, ii = stats.length; i < ii; ++i) {
+ this.panel.appendChild(stats[i].div);
+ }
+ },
+ cleanup() {
+ stats = [];
+ clear(this.panel);
+ },
+ };
+})();
+
+// Manages all the debugging tools.
+window.PDFBug = (function PDFBugClosure() {
+ var panelWidth = 300;
+ var buttons = [];
+ var activePanel = null;
+
+ return {
+ tools: [FontInspector, StepperManager, Stats],
+ enable(ids) {
+ var all = false,
+ tools = this.tools;
+ if (ids.length === 1 && ids[0] === "all") {
+ all = true;
+ }
+ for (var i = 0; i < tools.length; ++i) {
+ var tool = tools[i];
+ if (all || ids.includes(tool.id)) {
+ tool.enabled = true;
+ }
+ }
+ if (!all) {
+ // Sort the tools by the order they are enabled.
+ tools.sort(function(a, b) {
+ var indexA = ids.indexOf(a.id);
+ indexA = indexA < 0 ? tools.length : indexA;
+ var indexB = ids.indexOf(b.id);
+ indexB = indexB < 0 ? tools.length : indexB;
+ return indexA - indexB;
+ });
+ }
+ },
+ init(pdfjsLib, container) {
+ /*
+ * Basic Layout:
+ * PDFBug
+ * Controls
+ * Panels
+ * Panel
+ * Panel
+ * ...
+ */
+ var ui = document.createElement("div");
+ ui.id = "PDFBug";
+
+ var controls = document.createElement("div");
+ controls.setAttribute("class", "controls");
+ ui.appendChild(controls);
+
+ var panels = document.createElement("div");
+ panels.setAttribute("class", "panels");
+ ui.appendChild(panels);
+
+ container.appendChild(ui);
+ container.style.right = panelWidth + "px";
+
+ // Initialize all the debugging tools.
+ var tools = this.tools;
+ var self = this;
+ for (var i = 0; i < tools.length; ++i) {
+ var tool = tools[i];
+ var panel = document.createElement("div");
+ var panelButton = document.createElement("button");
+ panelButton.textContent = tool.name;
+ panelButton.addEventListener(
+ "click",
+ (function(selected) {
+ return function(event) {
+ event.preventDefault();
+ self.selectPanel(selected);
+ };
+ })(i)
+ );
+ controls.appendChild(panelButton);
+ panels.appendChild(panel);
+ tool.panel = panel;
+ tool.manager = this;
+ if (tool.enabled) {
+ tool.init(pdfjsLib);
+ } else {
+ panel.textContent =
+ tool.name +
+ " is disabled. To enable add " +
+ ' "' +
+ tool.id +
+ '" to the pdfBug parameter ' +
+ "and refresh (separate multiple by commas).";
+ }
+ buttons.push(panelButton);
+ }
+ this.selectPanel(0);
+ },
+ cleanup() {
+ for (var i = 0, ii = this.tools.length; i < ii; i++) {
+ if (this.tools[i].enabled) {
+ this.tools[i].cleanup();
+ }
+ }
+ },
+ selectPanel(index) {
+ if (typeof index !== "number") {
+ index = this.tools.indexOf(index);
+ }
+ if (index === activePanel) {
+ return;
+ }
+ activePanel = index;
+ var tools = this.tools;
+ for (var j = 0; j < tools.length; ++j) {
+ if (j === index) {
+ buttons[j].setAttribute("class", "active");
+ tools[j].active = true;
+ tools[j].panel.removeAttribute("hidden");
+ } else {
+ buttons[j].setAttribute("class", "");
+ tools[j].active = false;
+ tools[j].panel.setAttribute("hidden", "true");
+ }
+ }
+ },
+ };
+})();
diff --git a/js/pdfjs/web/images/annotation-check.svg b/js/pdfjs/web/images/annotation-check.svg
new file mode 100644
index 0000000..71cd16d
--- /dev/null
+++ b/js/pdfjs/web/images/annotation-check.svg
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="40"
+ height="40"
+ viewBox="0 0 40 40">
+ <path
+ d="M 1.5006714,23.536225 6.8925879,18.994244 14.585721,26.037937 34.019683,4.5410479 38.499329,9.2235032 14.585721,35.458952 z"
+ id="path4"
+ style="fill:#ffff00;fill-opacity:1;stroke:#000000;stroke-width:1.25402856;stroke-opacity:1" />
+</svg>
diff --git a/js/pdfjs/web/images/annotation-comment.svg b/js/pdfjs/web/images/annotation-comment.svg
new file mode 100644
index 0000000..86f1f17
--- /dev/null
+++ b/js/pdfjs/web/images/annotation-comment.svg
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns="http://www.w3.org/2000/svg"
+ height="40"
+ width="40"
+ viewBox="0 0 40 40">
+ <rect
+ style="fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ width="33.76017"
+ height="33.76017"
+ x="3.119915"
+ y="3.119915" />
+ <path
+ d="m 20.677967,8.54499 c -7.342801,0 -13.295293,4.954293 -13.295293,11.065751 0,2.088793 0.3647173,3.484376 1.575539,5.150563 L 6.0267418,31.45501 13.560595,29.011117 c 2.221262,1.387962 4.125932,1.665377 7.117372,1.665377 7.3428,0 13.295291,-4.954295 13.295291,-11.065753 0,-6.111458 -5.952491,-11.065751 -13.295291,-11.065751 z"
+ style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.93031836;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
+</svg>
diff --git a/js/pdfjs/web/images/annotation-help.svg b/js/pdfjs/web/images/annotation-help.svg
new file mode 100644
index 0000000..00938fe
--- /dev/null
+++ b/js/pdfjs/web/images/annotation-help.svg
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="40"
+ height="40"
+ viewBox="0 0 40 40">
+ <g
+ transform="translate(0,-60)"
+ id="layer1">
+ <rect
+ width="36.460953"
+ height="34.805603"
+ x="1.7695236"
+ y="62.597198"
+ style="fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.30826771;stroke-opacity:1" />
+ <g
+ transform="matrix(0.88763677,0,0,0.88763677,2.2472646,8.9890584)">
+ <path
+ d="M 20,64.526342 C 11.454135,64.526342 4.5263421,71.454135 4.5263421,80 4.5263421,88.545865 11.454135,95.473658 20,95.473658 28.545865,95.473658 35.473658,88.545865 35.473658,80 35.473658,71.454135 28.545865,64.526342 20,64.526342 z m -0.408738,9.488564 c 3.527079,0 6.393832,2.84061 6.393832,6.335441 0,3.494831 -2.866753,6.335441 -6.393832,6.335441 -3.527079,0 -6.393832,-2.84061 -6.393832,-6.335441 0,-3.494831 2.866753,-6.335441 6.393832,-6.335441 z"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.02768445;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 7.2335209,71.819938 4.9702591,4.161823 c -1.679956,2.581606 -1.443939,6.069592 0.159325,8.677725 l -5.1263071,3.424463 c 0.67516,1.231452 3.0166401,3.547686 4.2331971,4.194757 l 3.907728,-4.567277 c 2.541952,1.45975 5.730694,1.392161 8.438683,-0.12614 l 3.469517,6.108336 c 1.129779,-0.44367 4.742234,-3.449633 5.416358,-5.003859 l -5.46204,-4.415541 c 1.44319,-2.424098 1.651175,-5.267515 0.557303,-7.748623 l 5.903195,-3.833951 C 33.14257,71.704996 30.616217,69.018606 29.02952,67.99296 l -4.118813,4.981678 C 22.411934,71.205099 18.900853,70.937534 16.041319,72.32916 l -3.595408,-5.322091 c -1.345962,0.579488 -4.1293881,2.921233 -5.2123901,4.812869 z m 8.1010311,3.426672 c 2.75284,-2.446266 6.769149,-2.144694 9.048998,0.420874 2.279848,2.56557 2.113919,6.596919 -0.638924,9.043185 -2.752841,2.446267 -6.775754,2.13726 -9.055604,-0.428308 -2.279851,-2.565568 -2.107313,-6.589485 0.64553,-9.035751 z"
+ style="fill:#000000;fill-opacity:1;stroke:none" />
+ </g>
+ </g>
+</svg>
diff --git a/js/pdfjs/web/images/annotation-insert.svg b/js/pdfjs/web/images/annotation-insert.svg
new file mode 100644
index 0000000..519ef68
--- /dev/null
+++ b/js/pdfjs/web/images/annotation-insert.svg
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="64"
+ height="64"
+ viewBox="0 0 64 64">
+ <path
+ d="M 32.003143,1.4044602 57.432701,62.632577 6.5672991,62.627924 z"
+ style="fill:#ffff00;fill-opacity:0.94117647;fill-rule:nonzero;stroke:#000000;stroke-width:1.00493038;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+</svg>
diff --git a/js/pdfjs/web/images/annotation-key.svg b/js/pdfjs/web/images/annotation-key.svg
new file mode 100644
index 0000000..8d09d53
--- /dev/null
+++ b/js/pdfjs/web/images/annotation-key.svg
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="64"
+ height="64"
+ viewBox="0 0 64 64">
+ <path
+ d="M 25.470843,9.4933766 C 25.30219,12.141818 30.139101,14.445969 34.704831,13.529144 40.62635,12.541995 41.398833,7.3856498 35.97505,5.777863 31.400921,4.1549155 25.157674,6.5445892 25.470843,9.4933766 z M 4.5246282,17.652051 C 4.068249,11.832873 9.2742983,5.9270407 18.437379,3.0977088 29.751911,-0.87185184 45.495663,1.4008022 53.603953,7.1104009 c 9.275765,6.1889221 7.158128,16.2079421 -3.171076,21.5939521 -1.784316,1.635815 -6.380222,1.21421 -7.068351,3.186186 -1.04003,0.972427 -1.288046,2.050158 -1.232864,3.168203 1.015111,2.000108 -3.831548,1.633216 -3.270553,3.759574 0.589477,5.264544 -0.179276,10.53738 -0.362842,15.806257 -0.492006,2.184998 1.163456,4.574232 -0.734888,6.610642 -2.482919,2.325184 -7.30604,2.189143 -9.193497,-0.274767 -2.733688,-1.740626 -8.254447,-3.615254 -6.104247,-6.339626 3.468112,-1.708686 -2.116197,-3.449897 0.431242,-5.080274 5.058402,-1.39256 -2.393215,-2.304318 -0.146889,-4.334645 3.069198,-0.977415 2.056986,-2.518352 -0.219121,-3.540397 1.876567,-1.807151 1.484149,-4.868919 -2.565455,-5.942205 0.150866,-1.805474 2.905737,-4.136876 -1.679967,-5.20493 C 10.260902,27.882167 4.6872697,22.95045 4.5245945,17.652051 z"
+ id="path604"
+ style="fill:#ffff00;fill-opacity:1;stroke:#000000;stroke-width:1.72665179;stroke-opacity:1" />
+</svg>
diff --git a/js/pdfjs/web/images/annotation-newparagraph.svg b/js/pdfjs/web/images/annotation-newparagraph.svg
new file mode 100644
index 0000000..38d2497
--- /dev/null
+++ b/js/pdfjs/web/images/annotation-newparagraph.svg
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="64"
+ height="64"
+ viewBox="0 0 64 64">
+ <path
+ d="M 32.003143,10.913072 57.432701,53.086929 6.567299,53.083723 z"
+ id="path2985"
+ style="fill:#ffff00;fill-opacity:0.94117647;fill-rule:nonzero;stroke:#000000;stroke-width:0.83403099;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+</svg>
diff --git a/js/pdfjs/web/images/annotation-noicon.svg b/js/pdfjs/web/images/annotation-noicon.svg
new file mode 100644
index 0000000..c07d108
--- /dev/null
+++ b/js/pdfjs/web/images/annotation-noicon.svg
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="40"
+ height="40"
+ viewBox="0 0 40 40">
+</svg>
diff --git a/js/pdfjs/web/images/annotation-note.svg b/js/pdfjs/web/images/annotation-note.svg
new file mode 100644
index 0000000..7017365
--- /dev/null
+++ b/js/pdfjs/web/images/annotation-note.svg
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="40"
+ height="40"
+ viewBox="0 0 40 40">
+ <rect
+ width="36.075428"
+ height="31.096582"
+ x="1.962286"
+ y="4.4517088"
+ id="rect4"
+ style="fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.23004246;stroke-opacity:1" />
+ <rect
+ width="27.96859"
+ height="1.5012145"
+ x="6.0157046"
+ y="10.285"
+ id="rect6"
+ style="fill:#000000;fill-opacity:1;stroke:none" />
+ <rect
+ width="27.96859"
+ height="0.85783684"
+ x="6.0157056"
+ y="23.21689"
+ id="rect8"
+ style="fill:#000000;fill-opacity:1;stroke:none" />
+ <rect
+ width="27.96859"
+ height="0.85783684"
+ x="5.8130345"
+ y="28.964394"
+ id="rect10"
+ style="fill:#000000;fill-opacity:1;stroke:none" />
+ <rect
+ width="27.96859"
+ height="0.85783684"
+ x="6.0157046"
+ y="17.426493"
+ id="rect12"
+ style="fill:#000000;fill-opacity:1;stroke:none" />
+</svg>
diff --git a/js/pdfjs/web/images/annotation-paragraph.svg b/js/pdfjs/web/images/annotation-paragraph.svg
new file mode 100644
index 0000000..6ae5212
--- /dev/null
+++ b/js/pdfjs/web/images/annotation-paragraph.svg
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="40"
+ height="40"
+ viewBox="0 0 40 40">
+ <rect
+ width="33.76017"
+ height="33.76017"
+ x="3.119915"
+ y="3.119915"
+ style="fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="m 17.692678,34.50206 0,-16.182224 c -1.930515,-0.103225 -3.455824,-0.730383 -4.57593,-1.881473 -1.12011,-1.151067 -1.680164,-2.619596 -1.680164,-4.405591 0,-1.992435 0.621995,-3.5796849 1.865988,-4.7617553 1.243989,-1.1820288 3.06352,-1.7730536 5.458598,-1.7730764 l 9.802246,0 0,2.6789711 -2.229895,0 0,26.3251486 -2.632515,0 0,-26.3251486 -3.45324,0 0,26.3251486 z"
+ style="font-size:29.42051125px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.07795751;stroke-opacity:1;font-family:Arial;-inkscape-font-specification:Arial" />
+</svg>
diff --git a/js/pdfjs/web/images/findbarButton-next-rtl.png b/js/pdfjs/web/images/findbarButton-next-rtl.png
new file mode 100644
index 0000000..bef0274
--- /dev/null
+++ b/js/pdfjs/web/images/findbarButton-next-rtl.png
Binary files differ
diff --git a/js/pdfjs/web/images/findbarButton-next-rtl@2x.png b/js/pdfjs/web/images/findbarButton-next-rtl@2x.png
new file mode 100644
index 0000000..1da6dc9
--- /dev/null
+++ b/js/pdfjs/web/images/findbarButton-next-rtl@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/findbarButton-next.png b/js/pdfjs/web/images/findbarButton-next.png
new file mode 100644
index 0000000..de1d0fc
--- /dev/null
+++ b/js/pdfjs/web/images/findbarButton-next.png
Binary files differ
diff --git a/js/pdfjs/web/images/findbarButton-next@2x.png b/js/pdfjs/web/images/findbarButton-next@2x.png
new file mode 100644
index 0000000..0250307
--- /dev/null
+++ b/js/pdfjs/web/images/findbarButton-next@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/findbarButton-previous-rtl.png b/js/pdfjs/web/images/findbarButton-previous-rtl.png
new file mode 100644
index 0000000..de1d0fc
--- /dev/null
+++ b/js/pdfjs/web/images/findbarButton-previous-rtl.png
Binary files differ
diff --git a/js/pdfjs/web/images/findbarButton-previous-rtl@2x.png b/js/pdfjs/web/images/findbarButton-previous-rtl@2x.png
new file mode 100644
index 0000000..0250307
--- /dev/null
+++ b/js/pdfjs/web/images/findbarButton-previous-rtl@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/findbarButton-previous.png b/js/pdfjs/web/images/findbarButton-previous.png
new file mode 100644
index 0000000..bef0274
--- /dev/null
+++ b/js/pdfjs/web/images/findbarButton-previous.png
Binary files differ
diff --git a/js/pdfjs/web/images/findbarButton-previous@2x.png b/js/pdfjs/web/images/findbarButton-previous@2x.png
new file mode 100644
index 0000000..1da6dc9
--- /dev/null
+++ b/js/pdfjs/web/images/findbarButton-previous@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/grab.cur b/js/pdfjs/web/images/grab.cur
new file mode 100644
index 0000000..db7ad5a
--- /dev/null
+++ b/js/pdfjs/web/images/grab.cur
Binary files differ
diff --git a/js/pdfjs/web/images/grabbing.cur b/js/pdfjs/web/images/grabbing.cur
new file mode 100644
index 0000000..e0dfd04
--- /dev/null
+++ b/js/pdfjs/web/images/grabbing.cur
Binary files differ
diff --git a/js/pdfjs/web/images/loading-icon.gif b/js/pdfjs/web/images/loading-icon.gif
new file mode 100644
index 0000000..1c72ebb
--- /dev/null
+++ b/js/pdfjs/web/images/loading-icon.gif
Binary files differ
diff --git a/js/pdfjs/web/images/loading-small.png b/js/pdfjs/web/images/loading-small.png
new file mode 100644
index 0000000..8831a80
--- /dev/null
+++ b/js/pdfjs/web/images/loading-small.png
Binary files differ
diff --git a/js/pdfjs/web/images/loading-small@2x.png b/js/pdfjs/web/images/loading-small@2x.png
new file mode 100644
index 0000000..b25b445
--- /dev/null
+++ b/js/pdfjs/web/images/loading-small@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-documentProperties.png b/js/pdfjs/web/images/secondaryToolbarButton-documentProperties.png
new file mode 100644
index 0000000..40925e2
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-documentProperties.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-documentProperties@2x.png b/js/pdfjs/web/images/secondaryToolbarButton-documentProperties@2x.png
new file mode 100644
index 0000000..adb240e
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-documentProperties@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-firstPage.png b/js/pdfjs/web/images/secondaryToolbarButton-firstPage.png
new file mode 100644
index 0000000..e68846a
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-firstPage.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-firstPage@2x.png b/js/pdfjs/web/images/secondaryToolbarButton-firstPage@2x.png
new file mode 100644
index 0000000..3ad8af5
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-firstPage@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-handTool.png b/js/pdfjs/web/images/secondaryToolbarButton-handTool.png
new file mode 100644
index 0000000..cb85a84
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-handTool.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-handTool@2x.png b/js/pdfjs/web/images/secondaryToolbarButton-handTool@2x.png
new file mode 100644
index 0000000..5c13f77
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-handTool@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-lastPage.png b/js/pdfjs/web/images/secondaryToolbarButton-lastPage.png
new file mode 100644
index 0000000..be763e0
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-lastPage.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-lastPage@2x.png b/js/pdfjs/web/images/secondaryToolbarButton-lastPage@2x.png
new file mode 100644
index 0000000..8570984
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-lastPage@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-rotateCcw.png b/js/pdfjs/web/images/secondaryToolbarButton-rotateCcw.png
new file mode 100644
index 0000000..675d6da
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-rotateCcw.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-rotateCcw@2x.png b/js/pdfjs/web/images/secondaryToolbarButton-rotateCcw@2x.png
new file mode 100644
index 0000000..b9e7431
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-rotateCcw@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-rotateCw.png b/js/pdfjs/web/images/secondaryToolbarButton-rotateCw.png
new file mode 100644
index 0000000..e1c7598
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-rotateCw.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-rotateCw@2x.png b/js/pdfjs/web/images/secondaryToolbarButton-rotateCw@2x.png
new file mode 100644
index 0000000..cb257b4
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-rotateCw@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-scrollHorizontal.png b/js/pdfjs/web/images/secondaryToolbarButton-scrollHorizontal.png
new file mode 100644
index 0000000..cb702fc
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-scrollHorizontal.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-scrollHorizontal@2x.png b/js/pdfjs/web/images/secondaryToolbarButton-scrollHorizontal@2x.png
new file mode 100644
index 0000000..7f05289
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-scrollHorizontal@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-scrollVertical.png b/js/pdfjs/web/images/secondaryToolbarButton-scrollVertical.png
new file mode 100644
index 0000000..0b8427a
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-scrollVertical.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-scrollVertical@2x.png b/js/pdfjs/web/images/secondaryToolbarButton-scrollVertical@2x.png
new file mode 100644
index 0000000..72ab55e
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-scrollVertical@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-scrollWrapped.png b/js/pdfjs/web/images/secondaryToolbarButton-scrollWrapped.png
new file mode 100644
index 0000000..165fc8b
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-scrollWrapped.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-scrollWrapped@2x.png b/js/pdfjs/web/images/secondaryToolbarButton-scrollWrapped@2x.png
new file mode 100644
index 0000000..4246141
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-scrollWrapped@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-selectTool.png b/js/pdfjs/web/images/secondaryToolbarButton-selectTool.png
new file mode 100644
index 0000000..25520a6
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-selectTool.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-selectTool@2x.png b/js/pdfjs/web/images/secondaryToolbarButton-selectTool@2x.png
new file mode 100644
index 0000000..a58aaef
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-selectTool@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-spreadEven.png b/js/pdfjs/web/images/secondaryToolbarButton-spreadEven.png
new file mode 100644
index 0000000..3fa07e7
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-spreadEven.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-spreadEven@2x.png b/js/pdfjs/web/images/secondaryToolbarButton-spreadEven@2x.png
new file mode 100644
index 0000000..32e5033
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-spreadEven@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-spreadNone.png b/js/pdfjs/web/images/secondaryToolbarButton-spreadNone.png
new file mode 100644
index 0000000..1611473
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-spreadNone.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-spreadNone@2x.png b/js/pdfjs/web/images/secondaryToolbarButton-spreadNone@2x.png
new file mode 100644
index 0000000..8e51cf3
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-spreadNone@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-spreadOdd.png b/js/pdfjs/web/images/secondaryToolbarButton-spreadOdd.png
new file mode 100644
index 0000000..5126313
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-spreadOdd.png
Binary files differ
diff --git a/js/pdfjs/web/images/secondaryToolbarButton-spreadOdd@2x.png b/js/pdfjs/web/images/secondaryToolbarButton-spreadOdd@2x.png
new file mode 100644
index 0000000..5996b74
--- /dev/null
+++ b/js/pdfjs/web/images/secondaryToolbarButton-spreadOdd@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/shadow.png b/js/pdfjs/web/images/shadow.png
new file mode 100644
index 0000000..31d3bdb
--- /dev/null
+++ b/js/pdfjs/web/images/shadow.png
Binary files differ
diff --git a/js/pdfjs/web/images/texture.png b/js/pdfjs/web/images/texture.png
new file mode 100644
index 0000000..12bae83
--- /dev/null
+++ b/js/pdfjs/web/images/texture.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-bookmark.png b/js/pdfjs/web/images/toolbarButton-bookmark.png
new file mode 100644
index 0000000..a187be6
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-bookmark.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-bookmark@2x.png b/js/pdfjs/web/images/toolbarButton-bookmark@2x.png
new file mode 100644
index 0000000..4efbaa6
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-bookmark@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-download.png b/js/pdfjs/web/images/toolbarButton-download.png
new file mode 100644
index 0000000..eaab35f
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-download.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-download@2x.png b/js/pdfjs/web/images/toolbarButton-download@2x.png
new file mode 100644
index 0000000..896face
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-download@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-menuArrows.png b/js/pdfjs/web/images/toolbarButton-menuArrows.png
new file mode 100644
index 0000000..e50ca4e
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-menuArrows.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-menuArrows@2x.png b/js/pdfjs/web/images/toolbarButton-menuArrows@2x.png
new file mode 100644
index 0000000..f7570bc
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-menuArrows@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-openFile.png b/js/pdfjs/web/images/toolbarButton-openFile.png
new file mode 100644
index 0000000..b5cf1bd
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-openFile.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-openFile@2x.png b/js/pdfjs/web/images/toolbarButton-openFile@2x.png
new file mode 100644
index 0000000..91ab765
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-openFile@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-pageDown-rtl.png b/js/pdfjs/web/images/toolbarButton-pageDown-rtl.png
new file mode 100644
index 0000000..1957f79
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-pageDown-rtl.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-pageDown-rtl@2x.png b/js/pdfjs/web/images/toolbarButton-pageDown-rtl@2x.png
new file mode 100644
index 0000000..16ebcb8
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-pageDown-rtl@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-pageDown.png b/js/pdfjs/web/images/toolbarButton-pageDown.png
new file mode 100644
index 0000000..8219ecf
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-pageDown.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-pageDown@2x.png b/js/pdfjs/web/images/toolbarButton-pageDown@2x.png
new file mode 100644
index 0000000..758c01d
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-pageDown@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-pageUp-rtl.png b/js/pdfjs/web/images/toolbarButton-pageUp-rtl.png
new file mode 100644
index 0000000..98e7ce4
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-pageUp-rtl.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-pageUp-rtl@2x.png b/js/pdfjs/web/images/toolbarButton-pageUp-rtl@2x.png
new file mode 100644
index 0000000..a01b023
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-pageUp-rtl@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-pageUp.png b/js/pdfjs/web/images/toolbarButton-pageUp.png
new file mode 100644
index 0000000..fb9daa3
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-pageUp.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-pageUp@2x.png b/js/pdfjs/web/images/toolbarButton-pageUp@2x.png
new file mode 100644
index 0000000..a5cfd75
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-pageUp@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-presentationMode.png b/js/pdfjs/web/images/toolbarButton-presentationMode.png
new file mode 100644
index 0000000..3ac2124
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-presentationMode.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-presentationMode@2x.png b/js/pdfjs/web/images/toolbarButton-presentationMode@2x.png
new file mode 100644
index 0000000..cada9e7
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-presentationMode@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-print.png b/js/pdfjs/web/images/toolbarButton-print.png
new file mode 100644
index 0000000..51275e5
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-print.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-print@2x.png b/js/pdfjs/web/images/toolbarButton-print@2x.png
new file mode 100644
index 0000000..53d18da
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-print@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-search.png b/js/pdfjs/web/images/toolbarButton-search.png
new file mode 100644
index 0000000..f9b7557
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-search.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-search@2x.png b/js/pdfjs/web/images/toolbarButton-search@2x.png
new file mode 100644
index 0000000..456b133
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-search@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-secondaryToolbarToggle-rtl.png b/js/pdfjs/web/images/toolbarButton-secondaryToolbarToggle-rtl.png
new file mode 100644
index 0000000..8437095
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-secondaryToolbarToggle-rtl.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-secondaryToolbarToggle-rtl@2x.png b/js/pdfjs/web/images/toolbarButton-secondaryToolbarToggle-rtl@2x.png
new file mode 100644
index 0000000..9d9bfa4
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-secondaryToolbarToggle-rtl@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-secondaryToolbarToggle.png b/js/pdfjs/web/images/toolbarButton-secondaryToolbarToggle.png
new file mode 100644
index 0000000..1f90f83
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-secondaryToolbarToggle.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-secondaryToolbarToggle@2x.png b/js/pdfjs/web/images/toolbarButton-secondaryToolbarToggle@2x.png
new file mode 100644
index 0000000..b066fe5
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-secondaryToolbarToggle@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-sidebarToggle-rtl.png b/js/pdfjs/web/images/toolbarButton-sidebarToggle-rtl.png
new file mode 100644
index 0000000..6f85ec0
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-sidebarToggle-rtl.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-sidebarToggle-rtl@2x.png b/js/pdfjs/web/images/toolbarButton-sidebarToggle-rtl@2x.png
new file mode 100644
index 0000000..291e006
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-sidebarToggle-rtl@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-sidebarToggle.png b/js/pdfjs/web/images/toolbarButton-sidebarToggle.png
new file mode 100644
index 0000000..025dc90
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-sidebarToggle.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-sidebarToggle@2x.png b/js/pdfjs/web/images/toolbarButton-sidebarToggle@2x.png
new file mode 100644
index 0000000..7f834df
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-sidebarToggle@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-viewAttachments.png b/js/pdfjs/web/images/toolbarButton-viewAttachments.png
new file mode 100644
index 0000000..fcd0b26
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-viewAttachments.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-viewAttachments@2x.png b/js/pdfjs/web/images/toolbarButton-viewAttachments@2x.png
new file mode 100644
index 0000000..4a5e2b8
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-viewAttachments@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-viewOutline-rtl.png b/js/pdfjs/web/images/toolbarButton-viewOutline-rtl.png
new file mode 100644
index 0000000..aaa9430
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-viewOutline-rtl.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-viewOutline-rtl@2x.png b/js/pdfjs/web/images/toolbarButton-viewOutline-rtl@2x.png
new file mode 100644
index 0000000..3410f70
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-viewOutline-rtl@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-viewOutline.png b/js/pdfjs/web/images/toolbarButton-viewOutline.png
new file mode 100644
index 0000000..976365a
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-viewOutline.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-viewOutline@2x.png b/js/pdfjs/web/images/toolbarButton-viewOutline@2x.png
new file mode 100644
index 0000000..b6a197f
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-viewOutline@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-viewThumbnail.png b/js/pdfjs/web/images/toolbarButton-viewThumbnail.png
new file mode 100644
index 0000000..584ba55
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-viewThumbnail.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-viewThumbnail@2x.png b/js/pdfjs/web/images/toolbarButton-viewThumbnail@2x.png
new file mode 100644
index 0000000..a0208b4
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-viewThumbnail@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-zoomIn.png b/js/pdfjs/web/images/toolbarButton-zoomIn.png
new file mode 100644
index 0000000..513d081
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-zoomIn.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-zoomIn@2x.png b/js/pdfjs/web/images/toolbarButton-zoomIn@2x.png
new file mode 100644
index 0000000..d5d49d5
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-zoomIn@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-zoomOut.png b/js/pdfjs/web/images/toolbarButton-zoomOut.png
new file mode 100644
index 0000000..156c26b
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-zoomOut.png
Binary files differ
diff --git a/js/pdfjs/web/images/toolbarButton-zoomOut@2x.png b/js/pdfjs/web/images/toolbarButton-zoomOut@2x.png
new file mode 100644
index 0000000..959e191
--- /dev/null
+++ b/js/pdfjs/web/images/toolbarButton-zoomOut@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/treeitem-collapsed-rtl.png b/js/pdfjs/web/images/treeitem-collapsed-rtl.png
new file mode 100644
index 0000000..0496b35
--- /dev/null
+++ b/js/pdfjs/web/images/treeitem-collapsed-rtl.png
Binary files differ
diff --git a/js/pdfjs/web/images/treeitem-collapsed-rtl@2x.png b/js/pdfjs/web/images/treeitem-collapsed-rtl@2x.png
new file mode 100644
index 0000000..6ad9ebc
--- /dev/null
+++ b/js/pdfjs/web/images/treeitem-collapsed-rtl@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/treeitem-collapsed.png b/js/pdfjs/web/images/treeitem-collapsed.png
new file mode 100644
index 0000000..06d4d37
--- /dev/null
+++ b/js/pdfjs/web/images/treeitem-collapsed.png
Binary files differ
diff --git a/js/pdfjs/web/images/treeitem-collapsed@2x.png b/js/pdfjs/web/images/treeitem-collapsed@2x.png
new file mode 100644
index 0000000..eec1e58
--- /dev/null
+++ b/js/pdfjs/web/images/treeitem-collapsed@2x.png
Binary files differ
diff --git a/js/pdfjs/web/images/treeitem-expanded.png b/js/pdfjs/web/images/treeitem-expanded.png
new file mode 100644
index 0000000..c8d5573
--- /dev/null
+++ b/js/pdfjs/web/images/treeitem-expanded.png
Binary files differ
diff --git a/js/pdfjs/web/images/treeitem-expanded@2x.png b/js/pdfjs/web/images/treeitem-expanded@2x.png
new file mode 100644
index 0000000..3b3b610
--- /dev/null
+++ b/js/pdfjs/web/images/treeitem-expanded@2x.png
Binary files differ
diff --git a/js/pdfjs/web/locale/ach/viewer.properties b/js/pdfjs/web/locale/ach/viewer.properties
new file mode 100644
index 0000000..57c6a91
--- /dev/null
+++ b/js/pdfjs/web/locale/ach/viewer.properties
@@ -0,0 +1,207 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Pot buk mukato
+previous_label=Mukato
+next.title=Pot buk malubo
+next_label=Malubo
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Pot buk
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=pi {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} me {{pagesCount}})
+
+zoom_out.title=Jwik Matidi
+zoom_out_label=Jwik Matidi
+zoom_in.title=Kwot Madit
+zoom_in_label=Kwot Madit
+zoom.title=Kwoti
+presentation_mode.title=Lokke i kit me tyer
+presentation_mode_label=Kit me tyer
+open_file.title=Yab Pwail
+open_file_label=Yab
+print.title=Go
+print_label=Go
+download.title=Gam
+download_label=Gam
+bookmark.title=Neno ma kombedi (lok onyo yab i dirica manyen)
+bookmark_label=Neno ma kombedi
+
+# Secondary toolbar and context menu
+tools.title=Gintic
+tools_label=Gintic
+first_page.title=Cit i pot buk mukwongo
+first_page.label=Cit i pot buk mukwongo
+first_page_label=Cit i pot buk mukwongo
+last_page.title=Cit i pot buk magiko
+last_page.label=Cit i pot buk magiko
+last_page_label=Cit i pot buk magiko
+page_rotate_cw.title=Wire i tung lacuc
+page_rotate_cw.label=Wire i tung lacuc
+page_rotate_cw_label=Wire i tung lacuc
+page_rotate_ccw.title=Wire i tung lacam
+page_rotate_ccw.label=Wire i tung lacam
+page_rotate_ccw_label=Wire i tung lacam
+
+cursor_text_select_tool.title=Cak gitic me yero coc
+cursor_text_select_tool_label=Gitic me yero coc
+cursor_hand_tool.title=Cak gitic me cing
+cursor_hand_tool_label=Gitic cing
+
+
+
+# Document properties dialog box
+document_properties.title=Jami me gin acoya…
+document_properties_label=Jami me gin acoya…
+document_properties_file_name=Nying pwail:
+document_properties_file_size=Dit pa pwail:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Wiye:
+document_properties_author=Ngat mucoyo:
+document_properties_subject=Subjek:
+document_properties_keywords=Lok mapire tek:
+document_properties_creation_date=Nino dwe me cwec:
+document_properties_modification_date=Nino dwe me yub:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Lacwec:
+document_properties_producer=Layub PDF:
+document_properties_version=Kit PDF:
+document_properties_page_count=Kwan me pot buk:
+document_properties_page_size=Dit pa potbuk:
+document_properties_page_size_unit_inches=i
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=atir
+document_properties_page_size_orientation_landscape=arii
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Waraga
+document_properties_page_size_name_legal=Cik
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized_yes=Eyo
+document_properties_linearized_no=Pe
+document_properties_close=Lor
+
+print_progress_message=Yubo coc me agoya…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Juki
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Lok gintic ma inget
+toggle_sidebar_notification.title=Lok lanyut me nget (wiyewiye tye i gin acoya/attachments)
+toggle_sidebar_label=Lok gintic ma inget
+document_outline.title=Nyut Wiyewiye me Gin acoya (dii-kiryo me yaro/kano jami weng)
+document_outline_label=Pek pa gin acoya
+attachments.title=Nyut twec
+attachments_label=Twec
+thumbs.title=Nyut cal
+thumbs_label=Cal
+findbar.title=Nong iye gin acoya
+findbar_label=Nong
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Pot buk {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Cal me pot buk {{page}}
+
+# Find panel button title and messages
+find_input.title=Nong
+find_input.placeholder=Nong i dokumen…
+find_previous.title=Nong timme pa lok mukato
+find_previous_label=Mukato
+find_next.title=Nong timme pa lok malubo
+find_next_label=Malubo
+find_highlight=Wer weng
+find_match_case_label=Lok marwate
+find_reached_top=Oo iwi gin acoya, omede ki i tere
+find_reached_bottom=Oo i agiki me gin acoya, omede ki iwiye
+find_not_found=Lok pe ononge
+
+# Error panel labels
+error_more_info=Ngec Mukene
+error_less_info=Ngec Manok
+error_close=Lor
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Kwena: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Can kikore {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Pwail: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Rek: {{line}}
+rendering_error=Bal otime i kare me nyuto pot buk.
+
+# Predefined zoom values
+page_scale_width=Lac me iye pot buk
+page_scale_fit=Porre me pot buk
+page_scale_auto=Kwot pire kene
+page_scale_actual=Dite kikome
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Bal
+loading_error=Bal otime kun cano PDF.
+invalid_file_error=Pwail me PDF ma pe atir onyo obale woko.
+missing_file_error=Pwail me PDF tye ka rem.
+unexpected_response_error=Lagam mape kigeno pa lapok tic.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Lok angea manok]
+password_label=Ket mung me donyo me yabo pwail me PDF man.
+password_invalid=Mung me donyo pe atir. Tim ber i tem doki.
+password_ok=OK
+password_cancel=Juki
+
+printing_not_supported=Ciko: Layeny ma pe teno goyo liweng.
+printing_not_ready=Ciko: PDF pe ocane weng me agoya.
+web_fonts_disabled=Kijuko dit pa coc me kakube woko: pe romo tic ki dit pa coc me PDF ma kiketo i kine.
+document_colors_not_allowed=Pe ki yee ki gin acoya me PDF me tic ki rangi gi kengi: Kijuko woko “Yee pot buk me yero rangi mamegi kengi†ki i layeny.
diff --git a/js/pdfjs/web/locale/af/viewer.properties b/js/pdfjs/web/locale/af/viewer.properties
new file mode 100644
index 0000000..8cf0880
--- /dev/null
+++ b/js/pdfjs/web/locale/af/viewer.properties
@@ -0,0 +1,184 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Vorige bladsy
+previous_label=Vorige
+next.title=Volgende bladsy
+next_label=Volgende
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Bladsy
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=van {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} van {{pagesCount}})
+
+zoom_out.title=Zoem uit
+zoom_out_label=Zoem uit
+zoom_in.title=Zoem in
+zoom_in_label=Zoem in
+zoom.title=Zoem
+presentation_mode.title=Wissel na voorleggingsmodus
+presentation_mode_label=Voorleggingsmodus
+open_file.title=Open lêer
+open_file_label=Open
+print.title=Druk
+print_label=Druk
+download.title=Laai af
+download_label=Laai af
+bookmark.title=Huidige aansig (kopieer of open in nuwe venster)
+bookmark_label=Huidige aansig
+
+# Secondary toolbar and context menu
+tools.title=Nutsgoed
+tools_label=Nutsgoed
+first_page.title=Gaan na eerste bladsy
+first_page.label=Gaan na eerste bladsy
+first_page_label=Gaan na eerste bladsy
+last_page.title=Gaan na laaste bladsy
+last_page.label=Gaan na laaste bladsy
+last_page_label=Gaan na laaste bladsy
+page_rotate_cw.title=Roteer kloksgewys
+page_rotate_cw.label=Roteer kloksgewys
+page_rotate_cw_label=Roteer kloksgewys
+page_rotate_ccw.title=Roteer anti-kloksgewys
+page_rotate_ccw.label=Roteer anti-kloksgewys
+page_rotate_ccw_label=Roteer anti-kloksgewys
+
+cursor_text_select_tool.title=Aktiveer gereedskap om teks te merk
+cursor_text_select_tool_label=Teksmerkgereedskap
+cursor_hand_tool.title=Aktiveer handjie
+cursor_hand_tool_label=Handjie
+
+# Document properties dialog box
+document_properties.title=Dokumenteienskappe…
+document_properties_label=Dokumenteienskappe…
+document_properties_file_name=Lêernaam:
+document_properties_file_size=Lêergrootte:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} kG ({{size_b}} grepe)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MG ({{size_b}} grepe)
+document_properties_title=Titel:
+document_properties_author=Outeur:
+document_properties_subject=Onderwerp:
+document_properties_keywords=Sleutelwoorde:
+document_properties_creation_date=Skeppingsdatum:
+document_properties_modification_date=Wysigingsdatum:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Skepper:
+document_properties_producer=PDF-vervaardiger:
+document_properties_version=PDF-weergawe:
+document_properties_page_count=Aantal bladsye:
+document_properties_close=Sluit
+
+print_progress_message=Berei tans dokument voor om te druk…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Kanselleer
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Sypaneel aan/af
+toggle_sidebar_notification.title=Sypaneel aan/af (dokument bevat skema/aanhegsels)
+toggle_sidebar_label=Sypaneel aan/af
+document_outline.title=Wys dokumentskema (dubbelklik om alle items oop/toe te vou)
+document_outline_label=Dokumentoorsig
+attachments.title=Wys aanhegsels
+attachments_label=Aanhegsels
+thumbs.title=Wys duimnaels
+thumbs_label=Duimnaels
+findbar.title=Soek in dokument
+findbar_label=Vind
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Bladsy {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Duimnael van bladsy {{page}}
+
+# Find panel button title and messages
+find_input.title=Vind
+find_input.placeholder=Soek in dokument…
+find_previous.title=Vind die vorige voorkoms van die frase
+find_previous_label=Vorige
+find_next.title=Vind die volgende voorkoms van die frase
+find_next_label=Volgende
+find_highlight=Verlig almal
+find_match_case_label=Kassensitief
+find_reached_top=Bokant van dokument is bereik; gaan voort van onder af
+find_reached_bottom=Einde van dokument is bereik; gaan voort van bo af
+find_not_found=Frase nie gevind nie
+
+# Error panel labels
+error_more_info=Meer inligting
+error_less_info=Minder inligting
+error_close=Sluit
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (ID: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Boodskap: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stapel: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Lêer: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Lyn: {{line}}
+rendering_error='n Fout het voorgekom toe die bladsy weergegee is.
+
+# Predefined zoom values
+page_scale_width=Bladsywydte
+page_scale_fit=Pas bladsy
+page_scale_auto=Outomatiese zoem
+page_scale_actual=Werklike grootte
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Fout
+loading_error='n Fout het voorgekom met die laai van die PDF.
+invalid_file_error=Ongeldige of korrupte PDF-lêer.
+missing_file_error=PDF-lêer is weg.
+unexpected_response_error=Onverwagse antwoord van bediener.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}}-annotasie]
+password_label=Gee die wagwoord om dié PDF-lêer mee te open.
+password_invalid=Ongeldige wagwoord. Probeer gerus weer.
+password_ok=OK
+password_cancel=Kanselleer
+
+printing_not_supported=Waarskuwing: Dié blaaier ondersteun nie drukwerk ten volle nie.
+printing_not_ready=Waarskuwing: Die PDF is nog nie volledig gelaai vir drukwerk nie.
+web_fonts_disabled=Webfonte is gedeaktiveer: kan nie PDF-fonte wat ingebed is, gebruik nie.
+document_colors_not_allowed=PDF-dokumente word nie toegelaat om hul eie kleure te gebruik nie: “Laat bladsye toe om hul eie kleure te kies†is gedeaktiveer in die blaaier.
diff --git a/js/pdfjs/web/locale/an/viewer.properties b/js/pdfjs/web/locale/an/viewer.properties
new file mode 100644
index 0000000..3576134
--- /dev/null
+++ b/js/pdfjs/web/locale/an/viewer.properties
@@ -0,0 +1,184 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Pachina anterior
+previous_label=Anterior
+next.title=Pachina siguient
+next_label=Siguient
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Pachina
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=de {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} de {{pagesCount}})
+
+zoom_out.title=Achiquir
+zoom_out_label=Achiquir
+zoom_in.title=Agrandir
+zoom_in_label=Agrandir
+zoom.title=Grandaria
+presentation_mode.title=Cambear t'o modo de presentación
+presentation_mode_label=Modo de presentación
+open_file.title=Ubrir o fichero
+open_file_label=Ubrir
+print.title=Imprentar
+print_label=Imprentar
+download.title=Descargar
+download_label=Descargar
+bookmark.title=Vista actual (copiar u ubrir en una nueva finestra)
+bookmark_label=Anvista actual
+
+# Secondary toolbar and context menu
+tools.title=Ferramientas
+tools_label=Ferramientas
+first_page.title=Ir ta la primer pachina
+first_page.label=Ir ta la primer pachina
+first_page_label=Ir ta la primer pachina
+last_page.title=Ir ta la zaguer pachina
+last_page.label=Ir ta la zaguera pachina
+last_page_label=Ir ta la zaguer pachina
+page_rotate_cw.title=Chirar enta la dreita
+page_rotate_cw.label=Chirar enta la dreita
+page_rotate_cw_label=Chira enta la dreita
+page_rotate_ccw.title=Chirar enta la zurda
+page_rotate_ccw.label=Chirar en sentiu antihorario
+page_rotate_ccw_label=Chirar enta la zurda
+
+cursor_text_select_tool.title=Activar la ferramienta de selección de texto
+cursor_text_select_tool_label=Ferramienta de selección de texto
+cursor_hand_tool.title=Activar la ferramienta man
+cursor_hand_tool_label=Ferramienta man
+
+# Document properties dialog box
+document_properties.title=Propiedatz d'o documento...
+document_properties_label=Propiedatz d'o documento...
+document_properties_file_name=Nombre de fichero:
+document_properties_file_size=Grandaria d'o fichero:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Titol:
+document_properties_author=Autor:
+document_properties_subject=Afer:
+document_properties_keywords=Parolas clau:
+document_properties_creation_date=Calendata de creyación:
+document_properties_modification_date=Calendata de modificación:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Creyador:
+document_properties_producer=Creyador de PDF:
+document_properties_version=Versión de PDF:
+document_properties_page_count=Numero de pachinas:
+document_properties_close=Zarrar
+
+print_progress_message=Se ye preparando la documentación pa imprentar…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Cancelar
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Amostrar u amagar a barra lateral
+toggle_sidebar_notification.title=Cambiar barra lateral (lo documento contiene esquema/adchuntos)
+toggle_sidebar_label=Amostrar a barra lateral
+document_outline.title=Amostrar esquema d'o documento (fer doble clic pa expandir/compactar totz los items)
+document_outline_label=Esquema d'o documento
+attachments.title=Amostrar os adchuntos
+attachments_label=Adchuntos
+thumbs.title=Amostrar as miniaturas
+thumbs_label=Miniaturas
+findbar.title=Trobar en o documento
+findbar_label=Trobar
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Pachina {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniatura d'a pachina {{page}}
+
+# Find panel button title and messages
+find_input.title=Trobar
+find_input.placeholder=Trobar en o documento…
+find_previous.title=Trobar l'anterior coincidencia d'a frase
+find_previous_label=Anterior
+find_next.title=Trobar a siguient coincidencia d'a frase
+find_next_label=Siguient
+find_highlight=Resaltar-lo tot
+find_match_case_label=Coincidencia de mayusclas/minusclas
+find_reached_top=S'ha plegau a l'inicio d'o documento, se contina dende baixo
+find_reached_bottom=S'ha plegau a la fin d'o documento, se contina dende alto
+find_not_found=No s'ha trobau a frase
+
+# Error panel labels
+error_more_info=Mas información
+error_less_info=Menos información
+error_close=Zarrar
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Mensache: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Pila: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Fichero: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Linia: {{line}}
+rendering_error=Ha ocurriu una error en renderizar a pachina.
+
+# Predefined zoom values
+page_scale_width=Amplaria d'a pachina
+page_scale_fit=Achuste d'a pachina
+page_scale_auto=Grandaria automatica
+page_scale_actual=Grandaria actual
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Error
+loading_error=S'ha produciu una error en cargar o PDF.
+invalid_file_error=O PDF no ye valido u ye estorbau.
+missing_file_error=No i ha fichero PDF.
+unexpected_response_error=Respuesta a lo servicio inasperada.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Anotación {{type}}]
+password_label=Introduzca a clau ta ubrir iste fichero PDF.
+password_invalid=Clau invalida. Torna a intentar-lo.
+password_ok=Acceptar
+password_cancel=Cancelar
+
+printing_not_supported=Pare cuenta: Iste navegador no maneya totalment as impresions.
+printing_not_ready=Aviso: Encara no se ha cargau completament o PDF ta imprentar-lo.
+web_fonts_disabled=As fuents web son desactivadas: no se puet incrustar fichers PDF.
+document_colors_not_allowed=Los documentos PDF no pueden fer servir las suyas propias colors: 'Permitir que as pachinas triguen as suyas propias colors' ye desactivau en o navegador.
diff --git a/js/pdfjs/web/locale/ar/viewer.properties b/js/pdfjs/web/locale/ar/viewer.properties
new file mode 100644
index 0000000..b42ba74
--- /dev/null
+++ b/js/pdfjs/web/locale/ar/viewer.properties
@@ -0,0 +1,246 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=الصÙحة السابقة
+previous_label=السابقة
+next.title=الصÙحة التالية
+next_label=التالية
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=صÙحة
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=من {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} من {{pagesCount}})
+
+zoom_out.title=بعّد
+zoom_out_label=بعّد
+zoom_in.title=قرّب
+zoom_in_label=قرّب
+zoom.title=التقريب
+presentation_mode.title=انتقل لوضع العرض التقديمي
+presentation_mode_label=وضع العرض التقديمي
+open_file.title=اÙتح ملÙًا
+open_file_label=اÙتح
+print.title=اطبع
+print_label=اطبع
+download.title=نزّل
+download_label=نزّل
+bookmark.title=المنظور الحالي (انسخ أو اÙتح ÙÙŠ ناÙذة جديدة)
+bookmark_label=المنظور الحالي
+
+# Secondary toolbar and context menu
+tools.title=الأدوات
+tools_label=الأدوات
+first_page.title=اذهب إلى الصÙحة الأولى
+first_page.label=اذهب إلى الصÙحة الأولى
+first_page_label=اذهب إلى الصÙحة الأولى
+last_page.title=اذهب إلى الصÙحة الأخيرة
+last_page.label=اذهب إلى الصÙحة الأخيرة
+last_page_label=اذهب إلى الصÙحة الأخيرة
+page_rotate_cw.title=أدر باتجاه عقارب الساعة
+page_rotate_cw.label=أدر باتجاه عقارب الساعة
+page_rotate_cw_label=أدر باتجاه عقارب الساعة
+page_rotate_ccw.title=أدر بعكس اتجاه عقارب الساعة
+page_rotate_ccw.label=أدر بعكس اتجاه عقارب الساعة
+page_rotate_ccw_label=أدر بعكس اتجاه عقارب الساعة
+
+cursor_text_select_tool.title=Ùعّل أداة اختيار النص
+cursor_text_select_tool_label=أداة اختيار النص
+cursor_hand_tool.title=Ùعّل أداة اليد
+cursor_hand_tool_label=أداة اليد
+
+scroll_vertical.title=استخدم التمرير الرأسي
+scroll_vertical_label=التمرير الرأسي
+scroll_horizontal.title=استخدم التمرير الأÙقي
+scroll_horizontal_label=التمرير الأÙقي
+scroll_wrapped.title=استخدم التمرير الملتÙ
+scroll_wrapped_label=التمرير الملتÙ
+
+spread_none.title=لا تدمج هوامش الصÙحات مع بعضها البعض
+spread_none_label=بلا هوامش
+spread_odd.title=ادمج هوامش الصÙحات الÙردية
+spread_odd_label=هوامش الصÙحات الÙردية
+spread_even.title=ادمج هوامش الصÙحات الزوجية
+spread_even_label=هوامش الصÙحات الزوجية
+
+# Document properties dialog box
+document_properties.title=خصائص المستند…
+document_properties_label=خصائص المستند…
+document_properties_file_name=اسم الملÙ:
+document_properties_file_size=حجم الملÙ:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} ك.بايت ({{size_b}} بايت)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} م.بايت ({{size_b}} بايت)
+document_properties_title=العنوان:
+document_properties_author=المؤلÙ:
+document_properties_subject=الموضوع:
+document_properties_keywords=الكلمات الأساسية:
+document_properties_creation_date=تاريخ الإنشاء:
+document_properties_modification_date=تاريخ التعديل:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}، {{time}}
+document_properties_creator=المنشئ:
+document_properties_producer=منتج PDF:
+document_properties_version=إصدارة PDF:
+document_properties_page_count=عدد الصÙحات:
+document_properties_page_size=مقاس الورقة:
+document_properties_page_size_unit_inches=بوصة
+document_properties_page_size_unit_millimeters=ملم
+document_properties_page_size_orientation_portrait=طوليّ
+document_properties_page_size_orientation_landscape=عرضيّ
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=خطاب
+document_properties_page_size_name_legal=قانونيّ
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string=â€{{width}} × â€{{height}} â€{{unit}} (â€{{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string=â€{{width}} × â€{{height}} â€{{unit}} (â€{{name}}ØŒ {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=العرض السريع عبر الوÙب:
+document_properties_linearized_yes=نعم
+document_properties_linearized_no=لا
+document_properties_close=أغلق
+
+print_progress_message=ÙŠÙحضّر المستند للطباعة…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}Ùª
+print_progress_close=ألغÙ
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=بدّل ظهور الشريط الجانبي
+toggle_sidebar_notification.title=بدّل ظهور الشريط الجانبي (يحتوي المستند على مخطط أو مرÙقات)
+toggle_sidebar_label=بدّل ظهور الشريط الجانبي
+document_outline.title=اعرض Ùهرس المستند (نقر مزدوج لتمديد أو تقليص كل العناصر)
+document_outline_label=مخطط المستند
+attachments.title=اعرض المرÙقات
+attachments_label=المÙرÙقات
+thumbs.title=اعرض Ù…Ùصغرات
+thumbs_label=Ù…Ùصغّرات
+findbar.title=ابحث ÙÙŠ المستند
+findbar_label=ابحث
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=صÙحة {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=مصغّرة صÙحة {{page}}
+
+# Find panel button title and messages
+find_input.title=ابحث
+find_input.placeholder=ابحث ÙÙŠ المستند…
+find_previous.title=ابحث عن التّواجد السّابق للعبارة
+find_previous_label=السابق
+find_next.title=ابحث عن التّواجد التّالي للعبارة
+find_next_label=التالي
+find_highlight=أبرÙز الكل
+find_match_case_label=طابق حالة الأحرÙ
+find_entire_word_label=كلمات كاملة
+find_reached_top=تابعت من الأسÙÙ„ بعدما وصلت إلى بداية المستند
+find_reached_bottom=تابعت من الأعلى بعدما وصلت إلى نهاية المستند
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} من أصل مطابقة واحدة
+find_match_count[two]={{current}} من أصل مطابقتين
+find_match_count[few]={{current}} من أصل {{total}} مطابقات
+find_match_count[many]={{current}} من أصل {{total}} مطابقة
+find_match_count[other]={{current}} من أصل {{total}} مطابقة
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Ùقط
+find_match_count_limit[one]=أكثر من مطابقة واحدة
+find_match_count_limit[two]=أكثر من مطابقتين
+find_match_count_limit[few]=أكثر من {{limit}} مطابقات
+find_match_count_limit[many]=أكثر من {{limit}} مطابقة
+find_match_count_limit[other]=أكثر من {{limit}} مطابقة
+find_not_found=لا وجود للعبارة
+
+# Error panel labels
+error_more_info=معلومات أكثر
+error_less_info=معلومات أقل
+error_close=أغلق
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=â€PDF.js Ù†{{version}} â€(بناء: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=الرسالة: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=الرصّة: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=الملÙ: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=السطر: {{line}}
+rendering_error=حدث خطأ أثناء عرض الصÙحة.
+
+# Predefined zoom values
+page_scale_width=عرض الصÙحة
+page_scale_fit=ملائمة الصÙحة
+page_scale_auto=تقريب تلقائي
+page_scale_actual=الحجم الÙعلي
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}Ùª
+
+# Loading indicator messages
+loading_error_indicator=عطل
+loading_error=حدث عطل أثناء تحميل مل٠PDF.
+invalid_file_error=مل٠PDF تال٠أو غير صحيح.
+missing_file_error=مل٠PDF غير موجود.
+unexpected_response_error=استجابة خادوم غير متوقعة.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}، {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[تعليق {{type}}]
+password_label=أدخل لكلمة السر Ù„Ùتح هذا الملÙ.
+password_invalid=كلمة سر خطأ. من Ùضلك أعد المحاولة.
+password_ok=حسنا
+password_cancel=ألغÙ
+
+printing_not_supported=تحذير: لا يدعم هذا المتصÙØ­ الطباعة بشكل كامل.
+printing_not_ready=تحذير: مل٠PDF لم ÙŠÙحمّل كاملًا للطباعة.
+web_fonts_disabled=خطوط الوب Ù…Ùعطّلة: تعذّر استخدام خطوط PDF المÙضمّنة.
+document_colors_not_allowed=ليس مسموحًا لملÙات PDF باستخدام ألوانها الخاصة: خيار â€Ø§Ø³Ù…Ø­ للصÙحات باختيار ألوانها الخاصة“ ليس Ù…ÙÙعّلًا ÙÙŠ المتصÙØ­.
diff --git a/js/pdfjs/web/locale/ast/viewer.properties b/js/pdfjs/web/locale/ast/viewer.properties
new file mode 100644
index 0000000..db66a56
--- /dev/null
+++ b/js/pdfjs/web/locale/ast/viewer.properties
@@ -0,0 +1,207 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Páxina anterior
+previous_label=Anterior
+next.title=Páxina siguiente
+next_label=Siguiente
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Páxina
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=de {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} de {{pagesCount}})
+
+zoom_out.title=Reducir
+zoom_out_label=Reducir
+zoom_in.title=Aumentar
+zoom_in_label=Aumentar
+zoom.title=Tamañu
+open_file.title=Abrir ficheru
+open_file_label=Abrir
+print.title=Imprentar
+print_label=Imprentar
+download.title=Descargar
+download_label=Descargar
+bookmark.title=Vista actual (copiar o abrir nuna nueva ventana)
+bookmark_label=Vista actual
+
+# Secondary toolbar and context menu
+tools.title=Ferramientes
+tools_label=Ferramientes
+first_page.title=Dir a la primer páxina
+first_page.label=Dir a la primer páxina
+first_page_label=Dir a la primer páxina
+last_page.title=Dir a la postrer páxina
+last_page.label=Dir a la cabera páxina
+last_page_label=Dir a la postrer páxina
+page_rotate_cw.title=Xirar en sen horariu
+page_rotate_cw_label=Xirar en sen horariu
+page_rotate_ccw.title=Xirar en sen antihorariu
+page_rotate_ccw_label=Xirar en sen antihorariu
+
+
+scroll_vertical_label=Desplazamientu vertical
+scroll_horizontal_label=Desplazamientu horizontal
+
+
+# Document properties dialog box
+document_properties.title=Propiedaes del documentu…
+document_properties_label=Propiedaes del documentu…
+document_properties_file_name=Nome de ficheru:
+document_properties_file_size=Tamañu de ficheru:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Títulu:
+document_properties_author=Autor:
+document_properties_subject=Asuntu:
+document_properties_keywords=Pallabres clave:
+document_properties_creation_date=Data de creación:
+document_properties_modification_date=Data de modificación:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Creador:
+document_properties_producer=Productor PDF:
+document_properties_version=Versión PDF:
+document_properties_page_count=Númberu de páxines:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized_yes=Sí
+document_properties_linearized_no=Non
+document_properties_close=Zarrar
+
+print_progress_message=Tresnando documentu pa imprentar…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Encaboxar
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Camudar barra llateral
+toggle_sidebar_label=Camudar barra llateral
+document_outline.title=Amosar esquema del documentu (duble clic pa espander/contrayer tolos elementos)
+document_outline_label=Esquema del documentu
+attachments.title=Amosar axuntos
+attachments_label=Axuntos
+thumbs.title=Amosar miniatures
+thumbs_label=Miniatures
+findbar.title=Guetar nel documentu
+findbar_label=Guetar
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Páxina {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniatura de la páxina {{page}}
+
+# Find panel button title and messages
+find_input.title=Guetar
+find_input.placeholder=Guetar nel documentu…
+find_previous.title=Alcontrar l'anterior apaición de la fras
+find_previous_label=Anterior
+find_next.title=Alcontrar la siguiente apaición d'esta fras
+find_next_label=Siguiente
+find_highlight=Remarcar toos
+find_match_case_label=Coincidencia de mayús./minús.
+find_entire_word_label=Pallabres enteres
+find_reached_top=Algamóse'l principiu del documentu, siguir dende'l final
+find_reached_bottom=Algamóse'l final del documentu, siguir dende'l principiu
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_not_found=Frase non atopada
+
+# Error panel labels
+error_more_info=Más información
+error_less_info=Menos información
+error_close=Zarrar
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Mensaxe: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Pila: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Ficheru: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Llinia: {{line}}
+rendering_error=Hebo un fallu al renderizar la páxina.
+
+# Predefined zoom values
+page_scale_width=Anchor de la páxina
+page_scale_fit=Axuste de la páxina
+page_scale_auto=Tamañu automáticu
+page_scale_actual=Tamañu actual
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Fallu
+loading_error=Hebo un fallu al cargar el PDF.
+invalid_file_error=Ficheru PDF inválidu o corruptu.
+missing_file_error=Nun hai ficheru PDF.
+unexpected_response_error=Rempuesta inesperada del sirvidor.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Anotación {{type}}]
+password_label=Introduz la contraseña p'abrir esti ficheru PDF
+password_invalid=Contraseña non válida. Vuelvi a intentalo.
+password_ok=Aceutar
+password_cancel=Encaboxar
+
+printing_not_supported=Alvertencia: La imprentación entá nun ta sofitada dafechu nesti restolador.
+printing_not_ready=Avisu: Esti PDF nun se cargó completamente pa poder imprentase.
+web_fonts_disabled=Les fontes web tán desactivaes: ye imposible usar les fontes PDF embebíes.
+document_colors_not_allowed=Los documentos PDF nun tienen permisu pa usar les sos colores: «Permitir que les páxines escueyan les sos colores» ta desactivao nel restolador.
diff --git a/js/pdfjs/web/locale/az/viewer.properties b/js/pdfjs/web/locale/az/viewer.properties
new file mode 100644
index 0000000..2c27d12
--- /dev/null
+++ b/js/pdfjs/web/locale/az/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=ÆvvÉ™lki sÉ™hifÉ™
+previous_label=ÆvvÉ™lkini tap
+next.title=Növbəti səhifə
+next_label=İrəli
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Səhifə
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=/ {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} / {{pagesCount}})
+
+zoom_out.title=UzaqlaÅŸ
+zoom_out_label=UzaqlaÅŸ
+zoom_in.title=Yaxınlaş
+zoom_in_label=Yaxınlaş
+zoom.title=Yaxınlaşdırma
+presentation_mode.title=Təqdimat Rejiminə Keç
+presentation_mode_label=Təqdimat Rejimi
+open_file.title=Fayl Aç
+open_file_label=Aç
+print.title=Yazdır
+print_label=Yazdır
+download.title=Yüklə
+download_label=Yüklə
+bookmark.title=Hazırkı görünüş (köçür və ya yeni pəncərədə aç)
+bookmark_label=Hazırkı görünüş
+
+# Secondary toolbar and context menu
+tools.title=Alətlər
+tools_label=Alətlər
+first_page.title=İlk Səhifəyə get
+first_page.label=İlk Səhifəyə get
+first_page_label=İlk Səhifəyə get
+last_page.title=Son Səhifəyə get
+last_page.label=Son Səhifəyə get
+last_page_label=Son Səhifəyə get
+page_rotate_cw.title=Saat İstiqamətində Fırlat
+page_rotate_cw.label=Saat İstiqamətində Fırlat
+page_rotate_cw_label=Saat İstiqamətində Fırlat
+page_rotate_ccw.title=Saat Ä°stiqamÉ™tinin ÆksinÉ™ Fırlat
+page_rotate_ccw.label=Saat Ä°stiqamÉ™tinin ÆksinÉ™ Fırlat
+page_rotate_ccw_label=Saat Ä°stiqamÉ™tinin ÆksinÉ™ Fırlat
+
+cursor_text_select_tool.title=Yazı seçmə alətini aktivləşdir
+cursor_text_select_tool_label=Yazı seçmə aləti
+cursor_hand_tool.title=Æl alÉ™tini aktivləşdir
+cursor_hand_tool_label=Æl alÉ™ti
+
+scroll_vertical.title=Şaquli sürüşdürmə işlət
+scroll_vertical_label=Şaquli sürüşdürmə
+scroll_horizontal.title=Üfüqi sürüşdürmə işlət
+scroll_horizontal_label=Üfüqi sürüşdürmə
+scroll_wrapped.title=Bükülü sürüşdürmə işlət
+scroll_wrapped_label=Bükülü sürüşdürmə
+
+spread_none.title=Yan-yana birləşdirilmiş səhifələri işlətmə
+spread_none_label=Birləşdirmə
+spread_odd.title=Yan-yana birləşdirilmiş səhifələri tək nömrəli səhifələrdən başlat
+spread_odd_label=Tək nömrəli
+spread_even.title=Yan-yana birləşdirilmiş səhifələri cüt nömrəli səhifələrdən başlat
+spread_even_label=Cüt nömrəli
+
+# Document properties dialog box
+document_properties.title=Sənəd xüsusiyyətləri…
+document_properties_label=Sənəd xüsusiyyətləri…
+document_properties_file_name=Fayl adı:
+document_properties_file_size=Fayl ölçüsü:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bayt)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bayt)
+document_properties_title=Başlık:
+document_properties_author=Müəllif:
+document_properties_subject=Mövzu:
+document_properties_keywords=Açar sözlər:
+document_properties_creation_date=Yaradılış Tarixi :
+document_properties_modification_date=Dəyişdirilmə Tarixi :
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Yaradan:
+document_properties_producer=PDF yaradıcısı:
+document_properties_version=PDF versiyası:
+document_properties_page_count=Səhifə sayı:
+document_properties_page_size=Səhifə Ölçüsü:
+document_properties_page_size_unit_inches=inç
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=portret
+document_properties_page_size_orientation_landscape=albom
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Məktub
+document_properties_page_size_name_legal=Hüquqi
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Fast Web View:
+document_properties_linearized_yes=Bəli
+document_properties_linearized_no=Xeyr
+document_properties_close=Qapat
+
+print_progress_message=Sənəd çap üçün hazırlanır…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Ləğv et
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Yan Paneli Aç/Bağla
+toggle_sidebar_notification.title=Yan paneli çevir (sənəddə icmal/bağlama var)
+toggle_sidebar_label=Yan Paneli Aç/Bağla
+document_outline.title=Sənədin eskizini göstər (bütün bəndləri açmaq/yığmaq üçün iki dəfə klikləyin)
+document_outline_label=Sənəd strukturu
+attachments.title=Bağlamaları göstər
+attachments_label=BaÄŸlamalar
+thumbs.title=Kiçik şəkilləri göstər
+thumbs_label=Kiçik şəkillər
+findbar.title=Sənəddə Tap
+findbar_label=Tap
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Səhifə {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Səhifə{{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas={{page}} səhifəsinin kiçik vəziyyəti
+
+# Find panel button title and messages
+find_input.title=Tap
+find_input.placeholder=Sənəddə tap…
+find_previous.title=Bir öncəki uyğun gələn sözü tapır
+find_previous_label=Geri
+find_next.title=Bir sonrakı uyğun gələn sözü tapır
+find_next_label=İrəli
+find_highlight=İşarələ
+find_match_case_label=Böyük/kiçik hərfə həssaslıq
+find_entire_word_label=Tam sözlər
+find_reached_top=Sənədin yuxarısına çatdı, aşağıdan davam edir
+find_reached_bottom=Sənədin sonuna çatdı, yuxarıdan davam edir
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} / {{total}} uyÄŸunluq
+find_match_count[two]={{current}} / {{total}} uyÄŸunluq
+find_match_count[few]={{current}} / {{total}} uyÄŸunluq
+find_match_count[many]={{current}} / {{total}} uyÄŸunluq
+find_match_count[other]={{current}} / {{total}} uyÄŸunluq
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]={{limit}}-dan çox uyğunluq
+find_match_count_limit[one]={{limit}}-dən çox uyğunluq
+find_match_count_limit[two]={{limit}}-dən çox uyğunluq
+find_match_count_limit[few]={{limit}} uyğunluqdan daha çox
+find_match_count_limit[many]={{limit}} uyğunluqdan daha çox
+find_match_count_limit[other]={{limit}} uyğunluqdan daha çox
+find_not_found=Uyğunlaşma tapılmadı
+
+# Error panel labels
+error_more_info=Daha çox məlumati
+error_less_info=Daha az məlumat
+error_close=Qapat
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (yığma: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=İsmarıc: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stek: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Fayl: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Sətir: {{line}}
+rendering_error=Səhifə göstərilərkən səhv yarandı.
+
+# Predefined zoom values
+page_scale_width=Səhifə genişliyi
+page_scale_fit=Səhifəni sığdır
+page_scale_auto=Avtomatik yaxınlaşdır
+page_scale_actual=Hazırkı Həcm
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Səhv
+loading_error=PDF yüklenərkən bir səhv yarandı.
+invalid_file_error=Səhv və ya zədələnmiş olmuş PDF fayl.
+missing_file_error=PDF fayl yoxdur.
+unexpected_response_error=Gözlənilməz server cavabı.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Annotasiyası]
+password_label=Bu PDF faylı açmaq üçün parolu daxil edin.
+password_invalid=Parol səhvdir. Bir daha yoxlayın.
+password_ok=Tamam
+password_cancel=Ləğv et
+
+printing_not_supported=Xəbərdarlıq: Çap bu səyyah tərəfindən tam olaraq dəstəklənmir.
+printing_not_ready=Xəbərdarlıq: PDF çap üçün tam yüklənməyib.
+web_fonts_disabled=Web Şriftlər söndürülüb: yerləşdirilmiş PDF şriftlərini istifadə etmək mümkün deyil.
+document_colors_not_allowed=PDF sÉ™nÉ™dlÉ™rÉ™ öz rÉ™nglÉ™rini iÅŸlÉ™tmÉ™yÉ™ icazÉ™ verilmir: “SÉ™hifÉ™lÉ™rÉ™ öz rÉ™nglÉ™rini istifadÉ™ etmÉ™yÉ™ icazÉ™ verâ€mÉ™ sÉ™yyahda söndürülüb.
diff --git a/js/pdfjs/web/locale/be/viewer.properties b/js/pdfjs/web/locale/be/viewer.properties
new file mode 100644
index 0000000..67cd012
--- /dev/null
+++ b/js/pdfjs/web/locale/be/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=ПапÑÑ€ÑднÑÑ Ñтаронка
+previous_label=ПапÑÑ€ÑднÑÑ
+next.title=ÐаÑÑ‚ÑƒÐ¿Ð½Ð°Ñ Ñтаронка
+next_label=ÐаÑтупнаÑ
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Старонка
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=з {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} з {{pagesCount}})
+
+zoom_out.title=Паменшыць
+zoom_out_label=Паменшыць
+zoom_in.title=ПавÑлічыць
+zoom_in_label=ПавÑлічыць
+zoom.title=ПавÑлічÑнне Ñ‚ÑкÑту
+presentation_mode.title=Пераключыцца Ñž Ñ€Ñжым паказу
+presentation_mode_label=РÑжым паказу
+open_file.title=Ðдкрыць файл
+open_file_label=Ðдкрыць
+print.title=Друкаваць
+print_label=Друкаваць
+download.title=СцÑгнуць
+download_label=СцÑгнуць
+bookmark.title=ЦÑперашнÑÑ Ð¿Ñ€Ð°Ñва (ÑкапіÑваць або адчыніць у новым акне)
+bookmark_label=ЦÑперашнÑÑ Ð¿Ñ€Ð°Ñва
+
+# Secondary toolbar and context menu
+tools.title=Прылады
+tools_label=Прылады
+first_page.title=ПерайÑці на першую Ñтаронку
+first_page.label=ПерайÑці на першую Ñтаронку
+first_page_label=ПерайÑці на першую Ñтаронку
+last_page.title=ПерайÑці на апошнюю Ñтаронку
+last_page.label=ПерайÑці на апошнюю Ñтаронку
+last_page_label=ПерайÑці на апошнюю Ñтаронку
+page_rotate_cw.title=ПавÑрнуць па Ñонцу
+page_rotate_cw.label=ПавÑрнуць па Ñонцу
+page_rotate_cw_label=ПавÑрнуць па Ñонцу
+page_rotate_ccw.title=ПавÑрнуць Ñупраць Ñонца
+page_rotate_ccw.label=ПавÑрнуць Ñупраць Ñонца
+page_rotate_ccw_label=ПавÑрнуць Ñупраць Ñонца
+
+cursor_text_select_tool.title=Уключыць прыладу выбару Ñ‚ÑкÑту
+cursor_text_select_tool_label=Прылада выбару Ñ‚ÑкÑту
+cursor_hand_tool.title=Уключыць ручную прыладу
+cursor_hand_tool_label=Ð ÑƒÑ‡Ð½Ð°Ñ Ð¿Ñ€Ñ‹Ð»Ð°Ð´Ð°
+
+scroll_vertical.title=Ужываць вертыкальную пракрутку
+scroll_vertical_label=Ð’ÐµÑ€Ñ‚Ñ‹ÐºÐ°Ð»ÑŒÐ½Ð°Ñ Ð¿Ñ€Ð°ÐºÑ€ÑƒÑ‚ÐºÐ°
+scroll_horizontal.title=Ужываць гарызантальную пракрутку
+scroll_horizontal_label=Ð“Ð°Ñ€Ñ‹Ð·Ð°Ð½Ñ‚Ð°Ð»ÑŒÐ½Ð°Ñ Ð¿Ñ€Ð°ÐºÑ€ÑƒÑ‚ÐºÐ°
+scroll_wrapped.title=Ужываць маштабавальную пракрутку
+scroll_wrapped_label=ÐœÐ°ÑˆÑ‚Ð°Ð±Ð°Ð²Ð°Ð»ÑŒÐ½Ð°Ñ Ð¿Ñ€Ð°ÐºÑ€ÑƒÑ‚ÐºÐ°
+
+spread_none.title=Ðе выкарыÑтоўваць Ñ€Ð°Ð·Ð³Ð¾Ñ€Ð½ÑƒÑ‚Ñ‹Ñ Ñтаронкі
+spread_none_label=Без разгорнутых Ñтаронак
+spread_odd.title=Ð Ð°Ð·Ð³Ð¾Ñ€Ð½ÑƒÑ‚Ñ‹Ñ Ñтаронкі пачынаючы з нÑцотных нумароў
+spread_odd_label=ÐÑÑ†Ð¾Ñ‚Ð½Ñ‹Ñ Ñтаронкі злева
+spread_even.title=Ð Ð°Ð·Ð³Ð¾Ñ€Ð½ÑƒÑ‚Ñ‹Ñ Ñтаронкі пачынаючы з цотных нумароў
+spread_even_label=Ð¦Ð¾Ñ‚Ð½Ñ‹Ñ Ñтаронкі злева
+
+# Document properties dialog box
+document_properties.title=УлаÑціваÑці дакумента…
+document_properties_label=УлаÑціваÑці дакумента…
+document_properties_file_name=Ðазва файла:
+document_properties_file_size=Памер файла:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} КБ ({{size_b}} байт)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} МБ ({{size_b}} байт)
+document_properties_title=Загаловак:
+document_properties_author=Ðўтар:
+document_properties_subject=ТÑма:
+document_properties_keywords=ÐšÐ»ÑŽÑ‡Ð°Ð²Ñ‹Ñ Ñловы:
+document_properties_creation_date=Дата ÑтварÑннÑ:
+document_properties_modification_date=Дата змÑненнÑ:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Стваральнік:
+document_properties_producer=Вырабнік PDF:
+document_properties_version=ВерÑÑ–Ñ PDF:
+document_properties_page_count=КолькаÑць Ñтаронак:
+document_properties_page_size=Памер Ñтаронкі:
+document_properties_page_size_unit_inches=цалÑÑž
+document_properties_page_size_unit_millimeters=мм
+document_properties_page_size_orientation_portrait=кніжнаÑ
+document_properties_page_size_orientation_landscape=альбомнаÑ
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Хуткі праглÑд у ІнтÑрнÑце:
+document_properties_linearized_yes=Так
+document_properties_linearized_no=Ðе
+document_properties_close=Закрыць
+
+print_progress_message=Падрыхтоўка дакумента да друку…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=СкаÑаваць
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Паказаць/Ñхаваць бакавую панÑль
+toggle_sidebar_notification.title=Паказаць/Ñхаваць бакавую панÑль (дакумент мае змеÑÑ‚/укладанні)
+toggle_sidebar_label=Паказаць/Ñхаваць бакавую панÑль
+document_outline.title=Паказаць Ñтруктуру дакумента (Ð´Ð²Ð°Ð¹Ð½Ð°Ñ Ð¿Ñтрычка, каб разгарнуць /згарнуць уÑе Ñлементы)
+document_outline_label=Структура дакумента
+attachments.title=Паказаць далучÑнні
+attachments_label=ДалучÑнні
+thumbs.title=Паказ мініÑцюр
+thumbs_label=МініÑцюры
+findbar.title=Пошук у дакуменце
+findbar_label=ЗнайÑці
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Старонка {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Старонка {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=МініÑцюра Ñтаронкі {{page}}
+
+# Find panel button title and messages
+find_input.title=Шукаць
+find_input.placeholder=Шукаць у дакуменце…
+find_previous.title=ЗнайÑці папÑÑ€Ñдні выпадак выразу
+find_previous_label=ПапÑÑ€Ñдні
+find_next.title=ЗнайÑці наÑтупны выпадак выразу
+find_next_label=ÐаÑтупны
+find_highlight=Падфарбаваць уÑе
+find_match_case_label=Ðдрозніваць вÑлікіÑ/Ð¼Ð°Ð»Ñ‹Ñ Ð»Ñ–Ñ‚Ð°Ñ€Ñ‹
+find_entire_word_label=Словы цалкам
+find_reached_top=ДаÑÑгнуты пачатак дакумента, працÑг з канца
+find_reached_bottom=ДаÑÑгнуты канец дакумента, працÑг з пачатку
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} з {{total}} ÑупадзеннÑ
+find_match_count[two]={{current}} з {{total}} ÑупадзеннÑÑž
+find_match_count[few]={{current}} з {{total}} ÑупадзеннÑÑž
+find_match_count[many]={{current}} з {{total}} ÑупадзеннÑÑž
+find_match_count[other]={{current}} з {{total}} ÑупадзеннÑÑž
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Больш за {{limit}} ÑупадзеннÑÑž
+find_match_count_limit[one]=Больш за {{limit}} Ñупадзенне
+find_match_count_limit[two]=Больш за {{limit}} ÑупадзеннÑÑž
+find_match_count_limit[few]=Больш за {{limit}} ÑупадзеннÑÑž
+find_match_count_limit[many]=Больш за {{limit}} ÑупадзеннÑÑž
+find_match_count_limit[other]=Больш за {{limit}} ÑупадзеннÑÑž
+find_not_found=Выраз не знойдзены
+
+# Error panel labels
+error_more_info=ПадрабÑзней
+error_less_info=СціÑла
+error_close=Закрыць
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js в{{version}} (зборка: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Паведамленне: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=СтоÑ: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Файл: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Радок: {{line}}
+rendering_error=ЗдарылаÑÑ Ð¿Ð°Ð¼Ñ‹Ð»ÐºÐ° Ð¿Ð°Ð´Ñ‡Ð°Ñ Ð°Ð´Ð»ÑŽÑÑ‚Ñ€Ð°Ð²Ð°Ð½Ð½Ñ Ñтаронкі.
+
+# Predefined zoom values
+page_scale_width=Ð¨Ñ‹Ñ€Ñ‹Ð½Ñ Ñтаронкі
+page_scale_fit=УціÑненне Ñтаронкі
+page_scale_auto=Ðўтаматычнае павелічÑнне
+page_scale_actual=Сапраўдны памер
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Памылка
+loading_error=ЗдарылаÑÑ Ð¿Ð°Ð¼Ñ‹Ð»ÐºÐ° Ð¿Ð°Ð´Ñ‡Ð°Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÑ– PDF.
+invalid_file_error=ÐÑÑпраўны або пашкоджаны файл PDF.
+missing_file_error=ÐдÑутны файл PDF.
+unexpected_response_error=Ðечаканы адказ Ñервера.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Annotation]
+password_label=УвÑдзіце пароль, каб адкрыць гÑÑ‚Ñ‹ файл PDF.
+password_invalid=ÐÑдзейÑны пароль. ПаÑпрабуйце зноў.
+password_ok=Добра
+password_cancel=СкаÑаваць
+
+printing_not_supported=ПапÑÑ€Ñджанне: друк не падтрымліваецца цалкам гÑтым браўзерам.
+printing_not_ready=Увага: PDF не ÑцÑгнуты цалкам Ð´Ð»Ñ Ð´Ñ€ÑƒÐºÐ°Ð²Ð°Ð½Ð½Ñ.
+web_fonts_disabled=Шрыфты Сеціва забаронены: немагчыма ўжываць ÑƒÐºÐ»Ð°Ð´Ð·ÐµÐ½Ñ‹Ñ ÑˆÑ€Ñ‹Ñ„Ñ‚Ñ‹ PDF.
+document_colors_not_allowed=PDF-дакументам не дазволена выкарыÑтоўваць Ñвае колеры: у браўзеры адключаны параметр "Дазволіць вÑб-Ñайтам выкарыÑтоўваць Ñвае колеры".
diff --git a/js/pdfjs/web/locale/bg/viewer.properties b/js/pdfjs/web/locale/bg/viewer.properties
new file mode 100644
index 0000000..713b113
--- /dev/null
+++ b/js/pdfjs/web/locale/bg/viewer.properties
@@ -0,0 +1,242 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Предишна Ñтраница
+previous_label=Предишна
+next.title=Следваща Ñтраница
+next_label=Следваща
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Страница
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=от {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} от {{pagesCount}})
+
+zoom_out.title=ÐамалÑване
+zoom_out_label=ÐамалÑване
+zoom_in.title=Увеличаване
+zoom_in_label=Увеличаване
+zoom.title=Мащабиране
+presentation_mode.title=Превключване към режим на предÑтавÑне
+presentation_mode_label=Режим на предÑтавÑне
+open_file.title=ОтварÑне на файл
+open_file_label=ОтварÑне
+print.title=Отпечатване
+print_label=Отпечатване
+download.title=ИзтеглÑне
+download_label=ИзтеглÑне
+bookmark.title=Текущ изглед (копиране или отварÑне в нов прозорец)
+bookmark_label=Текущ изглед
+
+# Secondary toolbar and context menu
+tools.title=ИнÑтрументи
+tools_label=ИнÑтрументи
+first_page.title=Към първата Ñтраница
+first_page.label=Към първата Ñтраница
+first_page_label=Към първата Ñтраница
+last_page.title=Към поÑледната Ñтраница
+last_page.label=Към поÑледната Ñтраница
+last_page_label=Към поÑледната Ñтраница
+page_rotate_cw.title=Завъртане по чаÑ. Ñтрелка
+page_rotate_cw.label=Завъртане по чаÑовниковата Ñтрелка
+page_rotate_cw_label=Завъртане по чаÑовниковата Ñтрелка
+page_rotate_ccw.title=Завъртане обратно на чаÑ. Ñтрелка
+page_rotate_ccw.label=Завъртане обратно на чаÑовниковата Ñтрелка
+page_rotate_ccw_label=Завъртане обратно на чаÑовниковата Ñтрелка
+
+cursor_text_select_tool.title=Включване на инÑтрумента за избор на текÑÑ‚
+cursor_text_select_tool_label=ИнÑтрумент за избор на текÑÑ‚
+cursor_hand_tool.title=Включване на инÑтрумента ръка
+cursor_hand_tool_label=ИнÑтрумент ръка
+
+scroll_vertical.title=Използване на вертикално плъзгане
+scroll_vertical_label=Вертикално плъзгане
+scroll_horizontal.title=Използване на хоризонтално
+scroll_horizontal_label=Хоризонтално плъзгане
+scroll_wrapped.title=Използване на мащабируемо плъзгане
+scroll_wrapped_label=Мащабируемо плъзгане
+
+spread_none.title=Режимът на ÑдвоÑване е изключен
+spread_none_label=Без ÑдвоÑване
+spread_odd.title=СдвоÑване, започвайки от нечетните Ñтраници
+spread_odd_label=Ðечетните отлÑво
+spread_even.title=СдвоÑване, започвайки от четните Ñтраници
+spread_even_label=Четните отлÑво
+
+# Document properties dialog box
+document_properties.title=СвойÑтва на документа…
+document_properties_label=СвойÑтва на документа…
+document_properties_file_name=Име на файл:
+document_properties_file_size=Големина на файл:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} КБ ({{size_b}} байта)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} МБ ({{size_b}} байта)
+document_properties_title=Заглавие:
+document_properties_author=Ðвтор:
+document_properties_subject=Тема:
+document_properties_keywords=Ключови думи:
+document_properties_creation_date=Дата на Ñъздаване:
+document_properties_modification_date=Дата на промÑна:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Създател:
+document_properties_producer=PDF произведен от:
+document_properties_version=Издание на PDF:
+document_properties_page_count=Брой Ñтраници:
+document_properties_page_size=Размер на Ñтраницата:
+document_properties_page_size_unit_inches=инч
+document_properties_page_size_unit_millimeters=мм
+document_properties_page_size_orientation_portrait=портрет
+document_properties_page_size_orientation_landscape=пейзаж
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Правни въпроÑи
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Бърз преглед:
+document_properties_linearized_yes=Да
+document_properties_linearized_no=Ðе
+document_properties_close=ЗатварÑне
+
+print_progress_message=ПодготвÑне на документа за отпечатване…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Отказ
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Превключване на Ñтраничната лента
+toggle_sidebar_notification.title=Превключване на Ñтраничната лента (документи ÑÑŠÑ Ñтруктура/прикачени файлове)
+toggle_sidebar_label=Превключване на Ñтраничната лента
+document_outline.title=Показване на Ñтруктурата на документа (двукратно щракване за Ñвиване/разгъване на вÑичко)
+document_outline_label=Структура на документа
+attachments.title=Показване на притурките
+attachments_label=Притурки
+thumbs.title=Показване на миниатюрите
+thumbs_label=Миниатюри
+findbar.title=Ðамиране в документа
+findbar_label=ТърÑене
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Страница {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Миниатюра на Ñтраница {{page}}
+
+# Find panel button title and messages
+find_input.title=ТърÑене
+find_input.placeholder=ТърÑене в документа…
+find_previous.title=Ðамиране на предишно Ñъвпадение на фразата
+find_previous_label=Предишна
+find_next.title=Ðамиране на Ñледващо Ñъвпадение на фразата
+find_next_label=Следваща
+find_highlight=ОткроÑване на вÑички
+find_match_case_label=Съвпадение на региÑтъра
+find_entire_word_label=Цели думи
+find_reached_top=ДоÑтигнато е началото на документа, продължаване от краÑ
+find_reached_bottom=ДоÑтигнат е краÑÑ‚ на документа, продължаване от началото
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} от {{total}} Ñъвпадение
+find_match_count[two]={{current}} от {{total}} ÑъвпадениÑ
+find_match_count[few]={{current}} от {{total}} ÑъвпадениÑ
+find_match_count[many]={{current}} от {{total}} ÑъвпадениÑ
+find_match_count[other]={{current}} от {{total}} ÑъвпадениÑ
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Повече от {{limit}} ÑъвпадениÑ
+find_match_count_limit[one]=Повече от {{limit}} Ñъвпадение
+find_match_count_limit[two]=Повече от {{limit}} ÑъвпадениÑ
+find_match_count_limit[few]=Повече от {{limit}} ÑъвпадениÑ
+find_match_count_limit[many]=Повече от {{limit}} ÑъвпадениÑ
+find_match_count_limit[other]=Повече от {{limit}} ÑъвпадениÑ
+find_not_found=Фразата не е намерена
+
+# Error panel labels
+error_more_info=Повече информациÑ
+error_less_info=По-малко информациÑ
+error_close=ЗатварÑне
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=Издание на PDF.js {{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Съобщение: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Стек: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Файл: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Ред: {{line}}
+rendering_error=Грешка при изчертаване на Ñтраницата.
+
+# Predefined zoom values
+page_scale_width=Ширина на Ñтраницата
+page_scale_fit=ВмеÑтване в Ñтраницата
+page_scale_auto=Ðвтоматично мащабиране
+page_scale_actual=ДейÑтвителен размер
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Грешка
+loading_error=Получи Ñе грешка при зареждане на PDF-а.
+invalid_file_error=Ðевалиден или повреден PDF файл.
+missing_file_error=ЛипÑващ PDF файл.
+unexpected_response_error=Ðеочакван отговор от Ñървъра.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[ÐÐ½Ð¾Ñ‚Ð°Ñ†Ð¸Ñ {{type}}]
+password_label=Въведете парола за отварÑне на този PDF файл.
+password_invalid=Ðевалидна парола. МолÑ, опитайте отново.
+password_ok=Добре
+password_cancel=Отказ
+
+printing_not_supported=Внимание: Този четец нÑма пълна поддръжка на отпечатване.
+printing_not_ready=Внимание: Този PDF файл не е напълно зареден за печат.
+web_fonts_disabled=Уеб-шрифтовете Ñа забранени: разрешаване на използването на вградените PDF шрифтове.
+document_colors_not_allowed=Ðа документите от вид PDF не е разрешено да използват ÑобÑтвени цветове: „Разрешаване на Ñтраниците да избират ÑобÑтвени цветове“ е изключено в четеца.
diff --git a/js/pdfjs/web/locale/bn/viewer.properties b/js/pdfjs/web/locale/bn/viewer.properties
new file mode 100644
index 0000000..52fec2c
--- /dev/null
+++ b/js/pdfjs/web/locale/bn/viewer.properties
@@ -0,0 +1,246 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=পূরà§à¦¬à¦¬à¦°à§à¦¤à§€ পাতা
+previous_label=পূরà§à¦¬à¦¬à¦°à§à¦¤à§€
+next.title=পরবরà§à¦¤à§€ পাতা
+next_label=পরবরà§à¦¤à§€
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=পাতা
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages={{pagesCount}} à¦à¦°
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pagesCount}} à¦à¦° {{pageNumber}})
+
+zoom_out.title=ছোট আকারে পà§à¦°à¦¦à¦°à§à¦¶à¦¨
+zoom_out_label=ছোট আকারে পà§à¦°à¦¦à¦°à§à¦¶à¦¨
+zoom_in.title=বড় আকারে পà§à¦°à¦¦à¦°à§à¦¶à¦¨
+zoom_in_label=বড় আকারে পà§à¦°à¦¦à¦°à§à¦¶à¦¨
+zoom.title=বড় আকারে পà§à¦°à¦¦à¦°à§à¦¶à¦¨
+presentation_mode.title=উপসà§à¦¥à¦¾à¦ªà¦¨à¦¾ মোডে সà§à¦¯à§à¦‡à¦š করà§à¦¨
+presentation_mode_label=উপসà§à¦¥à¦¾à¦ªà¦¨à¦¾ মোড
+open_file.title=ফাইল খà§à¦²à§à¦¨
+open_file_label=খà§à¦²à§à¦¨
+print.title=মà§à¦¦à§à¦°à¦£
+print_label=মà§à¦¦à§à¦°à¦£
+download.title=ডাউনলোড
+download_label=ডাউনলোড
+bookmark.title=বরà§à¦¤à¦®à¦¾à¦¨ অবসà§à¦¥à¦¾ (অনà§à¦²à¦¿à¦ªà¦¿ অথবা নতà§à¦¨ উইনà§à¦¡à§‹ তে খà§à¦²à§à¦¨)
+bookmark_label=বরà§à¦¤à¦®à¦¾à¦¨ অবসà§à¦¥à¦¾
+
+# Secondary toolbar and context menu
+tools.title=টà§à¦²
+tools_label=টà§à¦²
+first_page.title=পà§à¦°à¦¥à¦® পাতায় যাও
+first_page.label=পà§à¦°à¦¥à¦® পাতায় যাও
+first_page_label=পà§à¦°à¦¥à¦® পাতায় যাও
+last_page.title=শেষ পাতায় যাও
+last_page.label=শেষ পাতায় যাও
+last_page_label=শেষ পাতায় যাও
+page_rotate_cw.title=ঘড়ির কাà¦à¦Ÿà¦¾à¦° দিকে ঘোরাও
+page_rotate_cw.label=ঘড়ির কাà¦à¦Ÿà¦¾à¦° দিকে ঘোরাও
+page_rotate_cw_label=ঘড়ির কাà¦à¦Ÿà¦¾à¦° দিকে ঘোরাও
+page_rotate_ccw.title=ঘড়ির কাà¦à¦Ÿà¦¾à¦° বিপরীতে ঘোরাও
+page_rotate_ccw.label=ঘড়ির কাà¦à¦Ÿà¦¾à¦° বিপরীতে ঘোরাও
+page_rotate_ccw_label=ঘড়ির কাà¦à¦Ÿà¦¾à¦° বিপরীতে ঘোরাও
+
+cursor_text_select_tool.title=লেখা নিরà§à¦¬à¦¾à¦šà¦• টà§à¦² সকà§à¦°à¦¿à§Ÿ করà§à¦¨
+cursor_text_select_tool_label=লেখা নিরà§à¦¬à¦¾à¦šà¦• টà§à¦²
+cursor_hand_tool.title=হà§à¦¯à¦¾à¦¨à§à¦¡ টà§à¦² সকà§à¦°à¦¿à¦¯à¦¼ করà§à¦¨
+cursor_hand_tool_label=হà§à¦¯à¦¾à¦¨à§à¦¡ টà§à¦²
+
+scroll_vertical.title=উলমà§à¦¬ সà§à¦•à§à¦°à¦²à¦¿à¦‚ বà§à¦¯à¦¬à¦¹à¦¾à¦° করà§à¦¨
+scroll_vertical_label=উলমà§à¦¬ সà§à¦•à§à¦°à¦²à¦¿à¦‚
+scroll_horizontal.title=অনà§à¦­à§‚মিক সà§à¦•à§à¦°à¦²à¦¿à¦‚ বà§à¦¯à¦¬à¦¹à¦¾à¦° করà§à¦¨
+scroll_horizontal_label=অনà§à¦­à§‚মিক সà§à¦•à§à¦°à¦²à¦¿à¦‚
+scroll_wrapped.title=Wrapped সà§à¦•à§à¦°à§‹à¦²à¦¿à¦‚ বà§à¦¯à¦¬à¦¹à¦¾à¦° করà§à¦¨
+scroll_wrapped_label=Wrapped সà§à¦•à§à¦°à§‹à¦²à¦¿à¦‚
+
+spread_none.title=পেজ সà§à¦ªà§à¦°à§‡à¦¡à¦—à§à¦²à§‹à¦¤à§‡ যোগদান করবেন না
+spread_none_label=Spreads নেই
+spread_odd_label=বিজোড় Spreads
+spread_even_label=জোড় Spreads
+
+# Document properties dialog box
+document_properties.title=নথি বৈশিষà§à¦Ÿà§à¦¯â€¦
+document_properties_label=নথি বৈশিষà§à¦Ÿà§à¦¯â€¦
+document_properties_file_name=ফাইলের নাম:
+document_properties_file_size=ফাইলের আকার:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} কেবি ({{size_b}} বাইট)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} à¦à¦®à¦¬à¦¿ ({{size_b}} বাইট)
+document_properties_title=শিরোনাম:
+document_properties_author=লেখক:
+document_properties_subject=বিষয়:
+document_properties_keywords=কীওয়ারà§à¦¡:
+document_properties_creation_date=তৈরির তারিখ:
+document_properties_modification_date=পরিবরà§à¦¤à¦¨à§‡à¦° তারিখ:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=পà§à¦°à¦¸à§à¦¤à§à¦¤à¦•à¦¾à¦°à¦•:
+document_properties_producer=পিডিà¦à¦« পà§à¦°à¦¸à§à¦¤à§à¦¤à¦•à¦¾à¦°à¦•:
+document_properties_version=পিডিà¦à¦« সংষà§à¦•à¦°à¦£:
+document_properties_page_count=মোট পাতা:
+document_properties_page_size=পাতার সাইজ:
+document_properties_page_size_unit_inches=à¦à¦° মধà§à¦¯à§‡
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=উলমà§à¦¬
+document_properties_page_size_orientation_landscape=অনà§à¦­à§‚মিক
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=লেটার
+document_properties_page_size_name_legal=লীগাল
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Fast Web View:
+document_properties_linearized_yes=হà§à¦¯à¦¾à¦
+document_properties_linearized_no=না
+document_properties_close=বনà§à¦§
+
+print_progress_message=মà§à¦¦à§à¦°à¦£à§‡à¦° জনà§à¦¯ নথি পà§à¦°à¦¸à§à¦¤à§à¦¤ করা হচà§à¦›à§‡â€¦
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=বাতিল
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=সাইডবার টগল করà§à¦¨
+toggle_sidebar_notification.title=সাইডবার টগল (নথিতে আউটলাইন/à¦à¦Ÿà¦¾à¦šà¦®à§‡à¦¨à§à¦Ÿ রয়েছে)
+toggle_sidebar_label=সাইডবার টগল করà§à¦¨
+document_outline.title=নথির আউটলাইন দেখাও (সব আইটেম পà§à¦°à¦¸à¦¾à¦°à¦¿à¦¤/সঙà§à¦•à§à¦šà¦¿à¦¤ করতে ডবল কà§à¦²à¦¿à¦• করà§à¦¨)
+document_outline_label=নথির রূপরেখা
+attachments.title=সংযà§à¦•à§à¦¤à¦¿ দেখাও
+attachments_label=সংযà§à¦•à§à¦¤à¦¿
+thumbs.title=থামà§à¦¬à¦¨à§‡à¦‡à¦² সমূহ পà§à¦°à¦¦à¦°à§à¦¶à¦¨ করà§à¦¨
+thumbs_label=থামà§à¦¬à¦¨à§‡à¦‡à¦² সমূহ
+findbar.title=নথির মধà§à¦¯à§‡ খà§à¦à¦œà§à¦¨
+findbar_label=খà§à¦à¦œà§à¦¨
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=পাতা {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=পাতা {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas={{page}} পাতার থামà§à¦¬à¦¨à§‡à¦‡à¦²
+
+# Find panel button title and messages
+find_input.title=খà§à¦à¦œà§à¦¨
+find_input.placeholder=নথির মধà§à¦¯à§‡ খà§à¦à¦œà§à¦¨â€¦
+find_previous.title=বাকà§à¦¯à¦¾à¦‚শের পূরà§à¦¬à¦¬à¦°à§à¦¤à§€ উপসà§à¦¥à¦¿à¦¤à¦¿ অনà§à¦¸à¦¨à§à¦§à¦¾à¦¨
+find_previous_label=পূরà§à¦¬à¦¬à¦°à§à¦¤à§€
+find_next.title=বাকà§à¦¯à¦¾à¦‚শের পরবরà§à¦¤à§€ উপসà§à¦¥à¦¿à¦¤à¦¿ অনà§à¦¸à¦¨à§à¦§à¦¾à¦¨
+find_next_label=পরবরà§à¦¤à§€
+find_highlight=সব হাইলাইট করা হবে
+find_match_case_label=অকà§à¦·à¦°à§‡à¦° ছাà¦à¦¦ মেলানো
+find_entire_word_label=সমà§à¦ªà§‚রà§à¦£ শবà§à¦¦
+find_reached_top=পাতার শà§à¦°à§à¦¤à§‡ পৌছে গেছে, নীচ থেকে আরমà§à¦­ করা হয়েছে
+find_reached_bottom=পাতার শেষে পৌছে গেছে, উপর থেকে আরমà§à¦­ করা হয়েছে
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{total}} à¦à¦° {{current}} মিল
+find_match_count[two]={{total}} à¦à¦° {{current}} মিল
+find_match_count[few]={{total}} à¦à¦° {{current}} মিল
+find_match_count[many]={{total}} à¦à¦° {{current}} মিল
+find_match_count[other]={{total}} à¦à¦° {{current}} মিল
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]={{limit}} à¦à¦° বেশি মিল
+find_match_count_limit[one]={{limit}} à¦à¦° বেশি মিল
+find_match_count_limit[two]={{limit}} à¦à¦° বেশি মিল
+find_match_count_limit[few]={{limit}} à¦à¦° বেশি মিল
+find_match_count_limit[many]={{limit}} à¦à¦° বেশি মিল
+find_match_count_limit[other]={{limit}} à¦à¦° বেশি মিল
+find_not_found=বাকà§à¦¯à¦¾à¦‚শ পাওয়া যায়নি
+
+# Error panel labels
+error_more_info=আরও তথà§à¦¯
+error_less_info=কম তথà§à¦¯
+error_close=বনà§à¦§
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=বারà§à¦¤à¦¾: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stack: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=নথি: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=লাইন: {{line}}
+rendering_error=পাতা উপসà§à¦¥à¦¾à¦ªà¦¨à¦¾à¦° সময় তà§à¦°à§à¦Ÿà¦¿ দেখা দিয়েছে।
+
+# Predefined zoom values
+page_scale_width=পাতার পà§à¦°à¦¸à§à¦¥
+page_scale_fit=পাতা ফিট করà§à¦¨
+page_scale_auto=সà§à¦¬à§Ÿà¦‚কà§à¦°à¦¿à§Ÿ জà§à¦®
+page_scale_actual=পà§à¦°à¦•à§ƒà¦¤ আকার
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=তà§à¦°à§à¦Ÿà¦¿
+loading_error=পিডিà¦à¦« লোড করার সময় তà§à¦°à§à¦Ÿà¦¿ দেখা দিয়েছে।
+invalid_file_error=অকারà§à¦¯à¦•à¦° অথবা কà§à¦·à¦¤à¦¿à¦—à§à¦°à¦¸à§à¦¤ পিডিà¦à¦« ফাইল।
+missing_file_error=নিখোà¦à¦œ PDF ফাইল।
+unexpected_response_error=অপà§à¦°à¦¤à§à¦¯à¦¾à¦¶à§€à¦¤ সারà§à¦­à¦¾à¦° পà§à¦°à¦¤à¦¿à¦•à§à¦°à¦¿à§Ÿà¦¾à¥¤
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} টীকা]
+password_label=পিডিà¦à¦« ফাইলটি ওপেন করতে পাসওয়ারà§à¦¡ দিন।
+password_invalid=ভà§à¦² পাসওয়ারà§à¦¡à¥¤ অনà§à¦—à§à¦°à¦¹ করে আবার চেষà§à¦Ÿà¦¾ করà§à¦¨à¥¤
+password_ok=ঠিক আছে
+password_cancel=বাতিল
+
+printing_not_supported=সতরà§à¦•à¦¤à¦¾: à¦à¦‡ বà§à¦°à¦¾à¦‰à¦œà¦¾à¦°à§‡ মà§à¦¦à§à¦°à¦£ সমà§à¦ªà§‚রà§à¦£à¦­à¦¾à¦¬à§‡ সমরà§à¦¥à¦¿à¦¤ নয়।
+printing_not_ready=সতরà§à¦•à§€à¦•à¦°à¦£: পিডিà¦à¦«à¦Ÿà¦¿ মà§à¦¦à§à¦°à¦£à§‡à¦° জনà§à¦¯ সমà§à¦ªà§‚রà§à¦£ লোড হয়নি।
+web_fonts_disabled=ওয়েব ফনà§à¦Ÿ নিষà§à¦•à§à¦°à¦¿à§Ÿ: সংযà§à¦•à§à¦¤ পিডিà¦à¦« ফনà§à¦Ÿ বà§à¦¯à¦¬à¦¹à¦¾à¦° করা যাচà§à¦›à§‡ না।
+document_colors_not_allowed=পিডিà¦à¦« ডকà§à¦®à§‡à¦¨à§à¦Ÿà¦•à§‡ তাদের নিজসà§à¦¬ রঙ বà§à¦¯à¦¬à¦¹à¦¾à¦°à§‡ অনà§à¦®à¦¤à¦¿ নেই: 'পাতা তাদের নিজেসà§à¦¬ রঙ নিরà§à¦¬à¦¾à¦šà¦¨ করতে অনà§à¦®à¦¤à¦¿ দিন' à¦à¦‡ বà§à¦°à¦¾à¦‰à¦œà¦¾à¦°à§‡ নিষà§à¦•à§à¦°à¦¿à§Ÿ রয়েছে।
diff --git a/js/pdfjs/web/locale/bo/viewer.properties b/js/pdfjs/web/locale/bo/viewer.properties
new file mode 100644
index 0000000..d35c453
--- /dev/null
+++ b/js/pdfjs/web/locale/bo/viewer.properties
@@ -0,0 +1,245 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=དྲ་ངོས་སྔོན་མ
+previous_label=སྔོན་མ
+next.title=དྲ་ངོས་རྗེས་མ
+next_label=རྗེས་མ
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=ཤོག་ངོས
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=of {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} of {{pagesCount}})
+
+zoom_out.title=Zoom Out
+zoom_out_label=Zoom Out
+zoom_in.title=Zoom In
+zoom_in_label=Zoom In
+zoom.title=Zoom
+presentation_mode.title=Switch to Presentation Mode
+presentation_mode_label=Presentation Mode
+open_file.title=Open File
+open_file_label=Open
+print.title=Print
+print_label=Print
+download.title=Download
+download_label=Download
+bookmark.title=Current view (copy or open in new window)
+bookmark_label=Current View
+
+# Secondary toolbar and context menu
+tools.title=Tools
+tools_label=Tools
+first_page.title=Go to First Page
+first_page.label=Go to First Page
+first_page_label=Go to First Page
+last_page.title=Go to Last Page
+last_page.label=Go to Last Page
+last_page_label=Go to Last Page
+page_rotate_cw.title=Rotate Clockwise
+page_rotate_cw.label=Rotate Clockwise
+page_rotate_cw_label=Rotate Clockwise
+page_rotate_ccw.title=Rotate Counterclockwise
+page_rotate_ccw.label=Rotate Counterclockwise
+page_rotate_ccw_label=Rotate Counterclockwise
+
+cursor_text_select_tool.title=Enable Text Selection Tool
+cursor_text_select_tool_label=Text Selection Tool
+cursor_hand_tool.title=Enable Hand Tool
+cursor_hand_tool_label=Hand Tool
+
+scroll_vertical.title=Use Vertical Scrolling
+scroll_vertical_label=Vertical Scrolling
+scroll_horizontal.title=Use Horizontal Scrolling
+scroll_horizontal_label=Horizontal Scrolling
+scroll_wrapped.title=Use Wrapped Scrolling
+scroll_wrapped_label=Wrapped Scrolling
+
+spread_none.title=Do not join page spreads
+spread_none_label=No Spreads
+spread_odd.title=Join page spreads starting with odd-numbered pages
+spread_odd_label=Odd Spreads
+spread_even.title=Join page spreads starting with even-numbered pages
+spread_even_label=Even Spreads
+
+# Document properties dialog box
+document_properties.title=Document Properties…
+document_properties_label=Document Properties…
+document_properties_file_name=File name:
+document_properties_file_size=File size:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Title:
+document_properties_author=Author:
+document_properties_subject=Subject:
+document_properties_keywords=Keywords:
+document_properties_creation_date=Creation Date:
+document_properties_modification_date=Modification Date:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Creator:
+document_properties_producer=PDF Producer:
+document_properties_version=PDF Version:
+document_properties_page_count=Page Count:
+document_properties_page_size=Page Size:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=portrait
+document_properties_page_size_orientation_landscape=landscape
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Fast Web View:
+document_properties_linearized_yes=Yes
+document_properties_linearized_no=No
+document_properties_close=Close
+
+print_progress_message=Preparing document for printing…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Cancel
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Toggle Sidebar
+toggle_sidebar_notification.title=Toggle Sidebar (document contains outline/attachments)
+toggle_sidebar_label=Toggle Sidebar
+document_outline.title=Show Document Outline (double-click to expand/collapse all items)
+document_outline_label=Document Outline
+attachments.title=Show Attachments
+attachments_label=Attachments
+thumbs.title=Show Thumbnails
+thumbs_label=Thumbnails
+findbar.title=Find in Document
+findbar_label=Find
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Page {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Thumbnail of Page {{page}}
+
+# Find panel button title and messages
+find_input.title=Find
+find_input.placeholder=Find in document…
+find_previous.title=Find the previous occurrence of the phrase
+find_previous_label=Previous
+find_next.title=Find the next occurrence of the phrase
+find_next_label=Next
+find_highlight=Highlight all
+find_match_case_label=Match case
+find_entire_word_label=Whole words
+find_reached_top=Reached top of document, continued from bottom
+find_reached_bottom=Reached end of document, continued from top
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} of {{total}} match
+find_match_count[two]={{current}} of {{total}} matches
+find_match_count[few]={{current}} of {{total}} matches
+find_match_count[many]={{current}} of {{total}} matches
+find_match_count[other]={{current}} of {{total}} matches
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=More than {{limit}} matches
+find_match_count_limit[one]=More than {{limit}} match
+find_match_count_limit[two]=More than {{limit}} matches
+find_match_count_limit[few]=More than {{limit}} matches
+find_match_count_limit[many]=More than {{limit}} matches
+find_match_count_limit[other]=More than {{limit}} matches
+find_not_found=Phrase not found
+
+# Error panel labels
+error_more_info=More Information
+error_less_info=Less Information
+error_close=Close
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Message: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stack: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=File: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Line: {{line}}
+rendering_error=An error occurred while rendering the page.
+
+# Predefined zoom values
+page_scale_width=Page Width
+page_scale_fit=Page Fit
+page_scale_auto=Automatic Zoom
+page_scale_actual=Actual Size
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Error
+loading_error=An error occurred while loading the PDF.
+invalid_file_error=Invalid or corrupted PDF file.
+missing_file_error=Missing PDF file.
+unexpected_response_error=Unexpected server response.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Annotation]
+password_label=Enter the password to open this PDF file.
+password_invalid=Invalid password. Please try again.
+password_ok=OK
+password_cancel=Cancel
+
+printing_not_supported=Warning: Printing is not fully supported by this browser.
+printing_not_ready=Warning: The PDF is not fully loaded for printing.
+web_fonts_disabled=Web fonts are disabled: unable to use embedded PDF fonts.
+document_colors_not_allowed=PDF documents are not allowed to use their own colors: “Allow pages to choose their own colors†is deactivated in the browser.
diff --git a/js/pdfjs/web/locale/br/viewer.properties b/js/pdfjs/web/locale/br/viewer.properties
new file mode 100644
index 0000000..ac2558e
--- /dev/null
+++ b/js/pdfjs/web/locale/br/viewer.properties
@@ -0,0 +1,246 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Pajenn a-raok
+previous_label=A-raok
+next.title=Pajenn war-lerc'h
+next_label=War-lerc'h
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Pajenn
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=eus {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} war {{pagesCount}})
+
+zoom_out.title=Zoum bihanaat
+zoom_out_label=Zoum bihanaat
+zoom_in.title=Zoum brasaat
+zoom_in_label=Zoum brasaat
+zoom.title=Zoum
+presentation_mode.title=Trec'haoliñ etrezek ar mod kinnigadenn
+presentation_mode_label=Mod kinnigadenn
+open_file.title=Digeriñ ur restr
+open_file_label=Digeriñ ur restr
+print.title=Moullañ
+print_label=Moullañ
+download.title=Pellgargañ
+download_label=Pellgargañ
+bookmark.title=Gwel bremanel (eilañ pe zigeriñ e-barzh ur prenestr nevez)
+bookmark_label=Gwel bremanel
+
+# Secondary toolbar and context menu
+tools.title=Ostilhoù
+tools_label=Ostilhoù
+first_page.title=Mont d'ar bajenn gentañ
+first_page.label=Mont d'ar bajenn gentañ
+first_page_label=Mont d'ar bajenn gentañ
+last_page.title=Mont d'ar bajenn diwezhañ
+last_page.label=Mont d'ar bajenn diwezhañ
+last_page_label=Mont d'ar bajenn diwezhañ
+page_rotate_cw.title=C'hwelañ gant roud ar bizied
+page_rotate_cw.label=C'hwelañ gant roud ar bizied
+page_rotate_cw_label=C'hwelañ gant roud ar bizied
+page_rotate_ccw.title=C'hwelañ gant roud gin ar bizied
+page_rotate_ccw.label=C'hwelañ gant roud gin ar bizied
+page_rotate_ccw_label=C'hwelañ gant roud gin ar bizied
+
+cursor_text_select_tool.title=Gweredekaat an ostilh diuzañ testenn
+cursor_text_select_tool_label=Ostilh diuzañ testenn
+cursor_hand_tool.title=Gweredekaat an ostilh dorn
+cursor_hand_tool_label=Ostilh dorn
+
+scroll_vertical.title=Arverañ an dibunañ a-blom
+scroll_vertical_label=Dibunañ a-serzh
+scroll_horizontal.title=Arverañ an dibunañ a-blaen
+scroll_horizontal_label=Dibunañ a-blaen
+scroll_wrapped.title=Arverañ an dibunañ paket
+scroll_wrapped_label=Dibunañ paket
+
+spread_none.title=Chom hep stagañ ar skignadurioù
+spread_none_label=Skignadenn ebet
+spread_odd.title=Lakaat ar pajennadoù en ur gregiñ gant ar pajennoù ampar
+spread_odd_label=Pajennoù ampar
+spread_even.title=Lakaat ar pajennadoù en ur gregiñ gant ar pajennoù par
+spread_even_label=Pajennoù par
+
+# Document properties dialog box
+document_properties.title=Perzhioù an teul…
+document_properties_label=Perzhioù an teul…
+document_properties_file_name=Anv restr :
+document_properties_file_size=Ment ar restr :
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} Ke ({{size_b}} eizhbit)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} Me ({{size_b}} eizhbit)
+document_properties_title=Titl :
+document_properties_author=Aozer :
+document_properties_subject=Danvez :
+document_properties_keywords=Gerioù-alc'hwez :
+document_properties_creation_date=Deiziad krouiñ :
+document_properties_modification_date=Deiziad kemmañ :
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Krouer :
+document_properties_producer=Kenderc'her PDF :
+document_properties_version=Handelv PDF :
+document_properties_page_count=Niver a bajennoù :
+document_properties_page_size=Ment ar bajenn:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=poltred
+document_properties_page_size_orientation_landscape=gweledva
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Lizher
+document_properties_page_size_name_legal=Lezennel
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Gwel Web Herrek:
+document_properties_linearized_yes=Ya
+document_properties_linearized_no=Ket
+document_properties_close=Serriñ
+
+print_progress_message=O prientiñ an teul evit moullañ...
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Nullañ
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Diskouez/kuzhat ar varrenn gostez
+toggle_sidebar_notification.title=Trec'haoliñ ar verrenn-gostez (ur steuñv pe stagadennoù a zo en teul)
+toggle_sidebar_label=Diskouez/kuzhat ar varrenn gostez
+document_outline.title=Diskouez steuñv an teul (daouglikit evit brasaat/bihanaat an holl elfennoù)
+document_outline_label=Sinedoù an teuliad
+attachments.title=Diskouez ar c'henstagadurioù
+attachments_label=Kenstagadurioù
+thumbs.title=Diskouez ar melvennoù
+thumbs_label=Melvennoù
+findbar.title=Klask e-barzh an teuliad
+findbar_label=Klask
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Pajenn {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Melvenn ar bajenn {{page}}
+
+# Find panel button title and messages
+find_input.title=Klask
+find_input.placeholder=Klask e-barzh an teuliad
+find_previous.title=Kavout an tamm frazenn kent o klotañ ganti
+find_previous_label=Kent
+find_next.title=Kavout an tamm frazenn war-lerc'h o klotañ ganti
+find_next_label=War-lerc'h
+find_highlight=Usskediñ pep tra
+find_match_case_label=Teurel evezh ouzh ar pennlizherennoù
+find_entire_word_label=Gerioù a-bezh
+find_reached_top=Tizhet eo bet derou ar bajenn, kenderc'hel diouzh an diaz
+find_reached_bottom=Tizhet eo bet dibenn ar bajenn, kenderc'hel diouzh ar c'hrec'h
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]=Klotadenn {{current}} war {{total}}
+find_match_count[two]=Klotadenn {{current}} war {{total}}
+find_match_count[few]=Klotadenn {{current}} war {{total}}
+find_match_count[many]=Klotadenn {{current}} war {{total}}
+find_match_count[other]=Klotadenn {{current}} war {{total}}
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Muioc'h eget {{limit}} a glotadennoù
+find_match_count_limit[one]=Muioc'h eget {{limit}} a glotadennoù
+find_match_count_limit[two]=Muioc'h eget {{limit}} a glotadennoù
+find_match_count_limit[few]=Muioc'h eget {{limit}} a glotadennoù
+find_match_count_limit[many]=Muioc'h eget {{limit}} a glotadennoù
+find_match_count_limit[other]=Muioc'h eget {{limit}} a glotadennoù
+find_not_found=N'haller ket kavout ar frazenn
+
+# Error panel labels
+error_more_info=Muioc'h a ditouroù
+error_less_info=Nebeutoc'h a ditouroù
+error_close=Serriñ
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js handelv {{version}} (kempunadur : {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Kemennadenn : {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Torn : {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Restr : {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Linenn : {{line}}
+rendering_error=Degouezhet ez eus bet ur fazi e-pad skrammañ ar bajennad.
+
+# Predefined zoom values
+page_scale_width=Led ar bajenn
+page_scale_fit=Pajenn a-bezh
+page_scale_auto=Zoum emgefreek
+page_scale_actual=Ment wir
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Fazi
+loading_error=Degouezhet ez eus bet ur fazi e-pad kargañ ar PDF.
+invalid_file_error=Restr PDF didalvoudek pe kontronet.
+missing_file_error=Restr PDF o vankout.
+unexpected_response_error=Respont dic'hortoz a-berzh an dafariad
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Notennañ]
+password_label=Enankit ar ger-tremen evit digeriñ ar restr PDF-mañ.
+password_invalid=Ger-tremen didalvoudek. Klaskit en-dro mar plij.
+password_ok=Mat eo
+password_cancel=Nullañ
+
+printing_not_supported=Kemenn : N'eo ket skoret penn-da-benn ar moullañ gant ar merdeer-mañ.
+printing_not_ready=Kemenn : N'hall ket bezañ moullet ar restr PDF rak n'eo ket karget penn-da-benn.
+web_fonts_disabled=Diweredekaet eo an nodrezhoù web : n'haller ket arverañ an nodrezhoù PDF enframmet.
+document_colors_not_allowed=N'eo ket aotreet an teuliadoù PDF da arverañ o livioù dezho : diweredekaet eo “Aotren ar pajennoù da zibab o livioù dezho†e-barzh ar merdeer.
diff --git a/js/pdfjs/web/locale/brx/viewer.properties b/js/pdfjs/web/locale/brx/viewer.properties
new file mode 100644
index 0000000..234bca1
--- /dev/null
+++ b/js/pdfjs/web/locale/brx/viewer.properties
@@ -0,0 +1,211 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=आगोलनि बिलाइ
+previous_label=आगोलनि
+next.title=उननि बिलाइ
+next_label=उननि
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=बिलाइ
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages={{pagesCount}} नि
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pagesCount}} नि {{pageNumber}})
+
+zoom_out.title=फिसायै जà¥à¤® खालाम
+zoom_out_label=फिसायै जà¥à¤® खालाम
+zoom_in.title=गेदेरै जà¥à¤® खालाम
+zoom_in_label=गेदेरै जà¥à¤® खालाम
+zoom.title=जà¥à¤® खालाम
+presentation_mode.title=दिनà¥à¤¥à¤¿à¤«à¥à¤‚नाय म'डआव थां
+presentation_mode_label=दिनà¥à¤¥à¤¿à¤«à¥à¤‚नाय म'ड
+open_file.title=फाइलखौ खेव
+open_file_label=खेव
+print.title=साफाय
+print_label=साफाय
+download.title=डाउनल'ड खालाम
+download_label=डाउनल'ड खालाम
+bookmark.title=दानि नà¥à¤¥à¤¾à¤¯ (गोदान उइनà¥à¤¡'आव कपि खालाम à¤à¤¬à¤¾ खेव)
+bookmark_label=दानि नà¥à¤¥à¤¾à¤¯
+
+# Secondary toolbar and context menu
+tools.title=टà¥à¤²
+tools_label=टà¥à¤²
+first_page.title=गिबि बिलाइआव थां
+first_page.label=गिबि बिलाइआव थां
+first_page_label=गिबि बिलाइआव थां
+last_page.title=जोबथा बिलाइआव थां
+last_page.label=जोबथा बिलाइआव थां
+last_page_label=जोबथा बिलाइआव थां
+page_rotate_cw.title=घरि गिदिंनाय फारà¥à¤¸à¥‡ फिदिं
+page_rotate_cw.label=घरि गिदिंनाय फारà¥à¤¸à¥‡ फिदिं
+page_rotate_cw_label=घरि गिदिंनाय फारà¥à¤¸à¥‡ फिदिं
+page_rotate_ccw.title=घरि गिदिंनाय उलà¥à¤¥à¤¾ फारà¥à¤¸à¥‡ फिदिं
+page_rotate_ccw.label=घरि गिदिंनाय उलà¥à¤¥à¤¾ फारà¥à¤¸à¥‡ फिदिं
+page_rotate_ccw_label=घरि गिदिंनाय उलà¥à¤¥à¤¾ फारà¥à¤¸à¥‡ फिदिं
+
+
+
+
+# Document properties dialog box
+document_properties.title=फोरमान बिलाइनि आखà¥à¤¥à¤¾à¤¯...
+document_properties_label=फोरमान बिलाइनि आखà¥à¤¥à¤¾à¤¯...
+document_properties_file_name=फाइलनि मà¥à¤‚:
+document_properties_file_size=फाइलनि महर:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} बाइट)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} बाइट)
+document_properties_title=बिमà¥à¤‚:
+document_properties_author=लिरगिरि:
+document_properties_subject=आयदा:
+document_properties_keywords=गाहाय सोदोब:
+document_properties_creation_date=सोरजिनाय अकà¥à¤Ÿ':
+document_properties_modification_date=सà¥à¤¦à¥à¤°à¤¾à¤¯à¤¨à¤¾à¤¯ अकà¥à¤Ÿ':
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=सोरजिगà¥à¤°à¤¾:
+document_properties_producer=PDF दिहà¥à¤¨à¤—à¥à¤°à¤¾:
+document_properties_version=PDF बिसान:
+document_properties_page_count=बिलाइनि हिसाब:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=प'रà¥à¤Ÿà¥à¤°à¥‡à¤Ÿ
+document_properties_page_size_orientation_landscape=लेणà¥à¤¡à¤¸à¥à¤•à¥‡à¤ª
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=लायजाम
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized_yes=नंगौ
+document_properties_linearized_no=नङा
+document_properties_close=बनà¥à¤¦ खालाम
+
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=नेवसि
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=टगà¥à¤—ल साइडबार
+toggle_sidebar_label=टगà¥à¤—ल साइडबार
+document_outline_label=फोरमान बिलाइ सिमा हांखो
+attachments.title=नांजाब होनायखौ दिनà¥à¤¥à¤¿
+attachments_label=नांजाब होनाय
+thumbs.title=थामनेइलखौ दिनà¥à¤¥à¤¿
+thumbs_label=थामनेइल
+findbar.title=फोरमान बिलाइआव नागिरना दिहà¥à¤¨
+findbar_label=नायगिरना दिहà¥à¤¨
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=बिलाइ {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=बिलाइ {{page}} नि थामनेइल
+
+# Find panel button title and messages
+find_input.title=नायगिरना दिहà¥à¤¨
+find_input.placeholder=फोरमान बिलाइआव नागिरना दिहà¥à¤¨...
+find_previous.title=बाथà¥à¤°à¤¾ खोनà¥à¤¦à¥‹à¤¬à¤¨à¤¿ सिगांनि नà¥à¤œà¤¾à¤¥à¤¿à¤¨à¤¾à¤¯à¤–ौ नागिर
+find_previous_label=आगोलनि
+find_next.title=बाथà¥à¤°à¤¾ खोनà¥à¤¦à¥‹à¤¬à¤¨à¤¿ उननि नà¥à¤œà¤¾à¤¥à¤¿à¤¨à¤¾à¤¯à¤–ौ नागिर
+find_next_label=उननि
+find_highlight=गासैखौबो हाइलाइट खालाम
+find_match_case_label=गोरोबनाय केस
+find_reached_top=थालो निफà¥à¤°à¤¾à¤¯ जागायनानै फोरमान बिलाइनि बिजौआव सौहैबाय
+find_reached_bottom=बिजौ निफà¥à¤°à¤¾à¤¯ जागायनानै फोरमान बिलाइनि बिजौआव सौहैबाय
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_not_found=बाथà¥à¤°à¤¾ खोनà¥à¤¦à¥‹à¤¬ मोनाखै
+
+# Error panel labels
+error_more_info=गोबां फोरमायथिहोगà¥à¤°à¤¾
+error_less_info=खम फोरमायथिहोगà¥à¤°à¤¾
+error_close=बनà¥à¤¦ खालाम
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=खौरां: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=सà¥à¤Ÿà¥‡à¤•: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=फाइल: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=सारि: {{line}}
+rendering_error=बिलाइखौ राव सोलायनाय समाव मोनसे गोरोनà¥à¤¥à¤¿ जादों।
+
+# Predefined zoom values
+page_scale_width=बिलाइनि गà¥à¤µà¤¾à¤°
+page_scale_fit=बिलाइ गोरोबनाय
+page_scale_auto=गावनोगाव जà¥à¤®
+page_scale_actual=थार महर
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=गोरोनà¥à¤¥à¤¿
+loading_error=PDF ल'ड खालामनाय समाव मोनसे गोरोनà¥à¤¥à¤¿ जाबाय।
+invalid_file_error=बाहायजायै à¤à¤¬à¤¾ गाजà¥à¤°à¤¿ जानाय PDF फाइल
+missing_file_error=गोमानाय PDF फाइल
+unexpected_response_error=मिजिंथियै सारà¥à¤­à¤¾à¤° फिननाय।
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} सोदोब बेखेवनाय]
+password_label=बे PDF फाइलखौ खेवनो पासवारà¥à¤¡ हाबहो।
+password_invalid=बाहायजायै पासवारà¥à¤¡à¥¤ अननानै फिन नाजा।
+password_ok=OK
+password_cancel=नेवसि
+
+printing_not_supported=सांगà¥à¤°à¤¾à¤‚थि: साफायनाया बे बà¥à¤°à¤¾à¤‰à¤œà¤¾à¤°à¤œà¥‹à¤‚ आबà¥à¤™à¥ˆ हेफाजाब होजाया।
+printing_not_ready=सांगà¥à¤°à¤¾à¤‚थि: PDF खौ साफायनायनि थाखाय फà¥à¤°à¤¾à¤¯à¥ˆ ल'ड खालामाखै।
+web_fonts_disabled=वेब फनà¥à¤Ÿà¤–ौ लोरबां खालामबाय: अरजाबहोनाय PDF फनà¥à¤Ÿà¤–ौ बाहायनो हायाखै।
+document_colors_not_allowed=PDF फोरमान बिलाइखौ बिसोरनि निजि गाब बाहायनो गनायथि होनाय जाया: 'बिसोरनि निजि गाब बासिखनो बिलाइखौ गनायथि हो'-खौ बà¥à¤°à¤¾à¤‰à¤œà¤¾à¤°à¤†à¤µ लोरबां खालामनाय जायो।
diff --git a/js/pdfjs/web/locale/bs/viewer.properties b/js/pdfjs/web/locale/bs/viewer.properties
new file mode 100644
index 0000000..6c2122b
--- /dev/null
+++ b/js/pdfjs/web/locale/bs/viewer.properties
@@ -0,0 +1,201 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Prethodna strana
+previous_label=Prethodna
+next.title=Sljedeća strna
+next_label=Sljedeća
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Strana
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=od {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} od {{pagesCount}})
+
+zoom_out.title=Umanji
+zoom_out_label=Umanji
+zoom_in.title=Uvećaj
+zoom_in_label=Uvećaj
+zoom.title=Uvećanje
+presentation_mode.title=Prebaci se u prezentacijski režim
+presentation_mode_label=Prezentacijski režim
+open_file.title=Otvori fajl
+open_file_label=Otvori
+print.title=Å tampaj
+print_label=Å tampaj
+download.title=Preuzmi
+download_label=Preuzmi
+bookmark.title=Trenutni prikaz (kopiraj ili otvori u novom prozoru)
+bookmark_label=Trenutni prikaz
+
+# Secondary toolbar and context menu
+tools.title=Alati
+tools_label=Alati
+first_page.title=Idi na prvu stranu
+first_page.label=Idi na prvu stranu
+first_page_label=Idi na prvu stranu
+last_page.title=Idi na zadnju stranu
+last_page.label=Idi na zadnju stranu
+last_page_label=Idi na zadnju stranu
+page_rotate_cw.title=Rotiraj u smjeru kazaljke na satu
+page_rotate_cw.label=Rotiraj u smjeru kazaljke na satu
+page_rotate_cw_label=Rotiraj u smjeru kazaljke na satu
+page_rotate_ccw.title=Rotiraj suprotno smjeru kazaljke na satu
+page_rotate_ccw.label=Rotiraj suprotno smjeru kazaljke na satu
+page_rotate_ccw_label=Rotiraj suprotno smjeru kazaljke na satu
+
+cursor_text_select_tool.title=Omogući alat za oznaÄavanje teksta
+cursor_text_select_tool_label=Alat za oznaÄavanje teksta
+cursor_hand_tool.title=Omogući ruÄni alat
+cursor_hand_tool_label=RuÄni alat
+
+# Document properties dialog box
+document_properties.title=Svojstva dokumenta...
+document_properties_label=Svojstva dokumenta...
+document_properties_file_name=Naziv fajla:
+document_properties_file_size=VeliÄina fajla:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bajta)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bajta)
+document_properties_title=Naslov:
+document_properties_author=Autor:
+document_properties_subject=Predmet:
+document_properties_keywords=KljuÄne rijeÄi:
+document_properties_creation_date=Datum kreiranja:
+document_properties_modification_date=Datum promjene:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Kreator:
+document_properties_producer=PDF stvaratelj:
+document_properties_version=PDF verzija:
+document_properties_page_count=Broj stranica:
+document_properties_page_size=VeliÄina stranice:
+document_properties_page_size_unit_inches=u
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=uspravno
+document_properties_page_size_orientation_landscape=vodoravno
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Pismo
+document_properties_page_size_name_legal=Pravni
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+document_properties_close=Zatvori
+
+print_progress_message=Pripremam dokument za štampu…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Otkaži
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=UkljuÄi/iskljuÄi boÄnu traku
+toggle_sidebar_notification.title=UkljuÄi/iskljuÄi sidebar (dokument sadrži outline/priloge)
+toggle_sidebar_label=UkljuÄi/iskljuÄi boÄnu traku
+document_outline.title=Prikaži outline dokumenta (dvoklik za skupljanje/širenje svih stavki)
+document_outline_label=Konture dokumenta
+attachments.title=Prikaži priloge
+attachments_label=Prilozi
+thumbs.title=Prikaži thumbnailove
+thumbs_label=Thumbnailovi
+findbar.title=Pronađi u dokumentu
+findbar_label=Pronađi
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Strana {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Thumbnail strane {{page}}
+
+# Find panel button title and messages
+find_input.title=Pronađi
+find_input.placeholder=Pronađi u dokumentu…
+find_previous.title=Pronađi prethodno pojavljivanje fraze
+find_previous_label=Prethodno
+find_next.title=Pronađi sljedeće pojavljivanje fraze
+find_next_label=Sljedeće
+find_highlight=OznaÄi sve
+find_match_case_label=Osjetljivost na karaktere
+find_reached_top=Dostigao sam vrh dokumenta, nastavljam sa dna
+find_reached_bottom=Dostigao sam kraj dokumenta, nastavljam sa vrha
+find_not_found=Fraza nije pronađena
+
+# Error panel labels
+error_more_info=Više informacija
+error_less_info=Manje informacija
+error_close=Zatvori
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Poruka: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stack: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Fajl: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Linija: {{line}}
+rendering_error=Došlo je do greške prilikom renderiranja strane.
+
+# Predefined zoom values
+page_scale_width=Å irina strane
+page_scale_fit=Uklopi stranu
+page_scale_auto=Automatsko uvećanje
+page_scale_actual=Stvarna veliÄina
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Greška
+loading_error=DoÅ¡lo je do greÅ¡ke prilikom uÄitavanja PDF-a.
+invalid_file_error=Neispravan ili oštećen PDF fajl.
+missing_file_error=Nedostaje PDF fajl.
+unexpected_response_error=NeoÄekivani odgovor servera.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} pribilješka]
+password_label=Upišite lozinku da biste otvorili ovaj PDF fajl.
+password_invalid=Pogrešna lozinka. Pokušajte ponovo.
+password_ok=OK
+password_cancel=Otkaži
+
+printing_not_supported=Upozorenje: Štampanje nije u potpunosti podržano u ovom browseru.
+printing_not_ready=Upozorenje: PDF nije u potpunosti uÄitan za Å¡tampanje.
+web_fonts_disabled=Web fontovi su onemogućeni: nemoguće koristiti ubaÄene PDF fontove.
+document_colors_not_allowed=PDF dokumentima nije dozvoljeno da koriste vlastite boje: 'Dozvoli stranicama da izaberu vlastite boje' je deaktivirano u browseru.
diff --git a/js/pdfjs/web/locale/ca/viewer.properties b/js/pdfjs/web/locale/ca/viewer.properties
new file mode 100644
index 0000000..924637a
--- /dev/null
+++ b/js/pdfjs/web/locale/ca/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Pàgina anterior
+previous_label=Anterior
+next.title=Pàgina següent
+next_label=Següent
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Pàgina
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=de {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} de {{pagesCount}})
+
+zoom_out.title=Redueix
+zoom_out_label=Redueix
+zoom_in.title=Amplia
+zoom_in_label=Amplia
+zoom.title=Escala
+presentation_mode.title=Canvia al mode de presentació
+presentation_mode_label=Mode de presentació
+open_file.title=Obre el fitxer
+open_file_label=Obre
+print.title=Imprimeix
+print_label=Imprimeix
+download.title=Baixa
+download_label=Baixa
+bookmark.title=Vista actual (copia o obre en una finestra nova)
+bookmark_label=Vista actual
+
+# Secondary toolbar and context menu
+tools.title=Eines
+tools_label=Eines
+first_page.title=Vés a la primera pàgina
+first_page.label=Vés a la primera pàgina
+first_page_label=Vés a la primera pàgina
+last_page.title=Vés a l'última pàgina
+last_page.label=Vés a l'última pàgina
+last_page_label=Vés a l'última pàgina
+page_rotate_cw.title=Gira cap a la dreta
+page_rotate_cw.label=Gira cap a la dreta
+page_rotate_cw_label=Gira cap a la dreta
+page_rotate_ccw.title=Gira cap a l'esquerra
+page_rotate_ccw.label=Gira cap a l'esquerra
+page_rotate_ccw_label=Gira cap a l'esquerra
+
+cursor_text_select_tool.title=Habilita l'eina de selecció de text
+cursor_text_select_tool_label=Eina de selecció de text
+cursor_hand_tool.title=Habilita l'eina de mà
+cursor_hand_tool_label=Eina de mà
+
+scroll_vertical.title=Utilitza el desplaçament vertical
+scroll_vertical_label=Desplaçament vertical
+scroll_horizontal.title=Utilitza el desplaçament horitzontal
+scroll_horizontal_label=Desplaçament horitzontal
+scroll_wrapped.title=Activa el desplaçament continu
+scroll_wrapped_label=Desplaçament continu
+
+spread_none.title=No agrupis les pàgines de dues en dues
+spread_none_label=Una sola pàgina
+spread_odd.title=Mostra dues pàgines començant per les pàgines de numeració senar
+spread_odd_label=Doble pàgina (senar)
+spread_even.title=Mostra dues pàgines començant per les pàgines de numeració parell
+spread_even_label=Doble pàgina (parell)
+
+# Document properties dialog box
+document_properties.title=Propietats del document…
+document_properties_label=Propietats del document…
+document_properties_file_name=Nom del fitxer:
+document_properties_file_size=Mida del fitxer:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Títol:
+document_properties_author=Autor:
+document_properties_subject=Assumpte:
+document_properties_keywords=Paraules clau:
+document_properties_creation_date=Data de creació:
+document_properties_modification_date=Data de modificació:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Creador:
+document_properties_producer=Generador de PDF:
+document_properties_version=Versió de PDF:
+document_properties_page_count=Nombre de pàgines:
+document_properties_page_size=Mida de la pàgina:
+document_properties_page_size_unit_inches=polzades
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=vertical
+document_properties_page_size_orientation_landscape=apaïsat
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Carta
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Vista web ràpida:
+document_properties_linearized_yes=Sí
+document_properties_linearized_no=No
+document_properties_close=Tanca
+
+print_progress_message=S'està preparant la impressió del document…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Cancel·la
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Mostra/amaga la barra lateral
+toggle_sidebar_notification.title=Mostra/amaga la barra lateral (el document conté un esquema o adjuncions)
+toggle_sidebar_label=Mostra/amaga la barra lateral
+document_outline.title=Mostra l'esquema del document (doble clic per ampliar/reduir tots els elements)
+document_outline_label=Contorn del document
+attachments.title=Mostra les adjuncions
+attachments_label=Adjuncions
+thumbs.title=Mostra les miniatures
+thumbs_label=Miniatures
+findbar.title=Cerca al document
+findbar_label=Cerca
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Pàgina {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Pàgina {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniatura de la pàgina {{page}}
+
+# Find panel button title and messages
+find_input.title=Cerca
+find_input.placeholder=Cerca al document…
+find_previous.title=Cerca l'anterior coincidència de l'expressió
+find_previous_label=Anterior
+find_next.title=Cerca la següent coincidència de l'expressió
+find_next_label=Següent
+find_highlight=Ressalta-ho tot
+find_match_case_label=Distingeix entre majúscules i minúscules
+find_entire_word_label=Paraules senceres
+find_reached_top=S'ha arribat al principi del document, es continua pel final
+find_reached_bottom=S'ha arribat al final del document, es continua pel principi
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} de {{total}} coincidència
+find_match_count[two]={{current}} de {{total}} coincidències
+find_match_count[few]={{current}} de {{total}} coincidències
+find_match_count[many]={{current}} de {{total}} coincidències
+find_match_count[other]={{current}} de {{total}} coincidències
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Més de {{limit}} coincidències
+find_match_count_limit[one]=Més d'{{limit}} coincidència
+find_match_count_limit[two]=Més de {{limit}} coincidències
+find_match_count_limit[few]=Més de {{limit}} coincidències
+find_match_count_limit[many]=Més de {{limit}} coincidències
+find_match_count_limit[other]=Més de {{limit}} coincidències
+find_not_found=No s'ha trobat l'expressió
+
+# Error panel labels
+error_more_info=Més informació
+error_less_info=Menys informació
+error_close=Tanca
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (muntatge: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Missatge: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Pila: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Fitxer: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Línia: {{line}}
+rendering_error=S'ha produït un error mentre es renderitzava la pàgina.
+
+# Predefined zoom values
+page_scale_width=Amplària de la pàgina
+page_scale_fit=Ajusta la pàgina
+page_scale_auto=Zoom automàtic
+page_scale_actual=Mida real
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Error
+loading_error=S'ha produït un error en carregar el PDF.
+invalid_file_error=El fitxer PDF no és vàlid o està malmès.
+missing_file_error=Falta el fitxer PDF.
+unexpected_response_error=Resposta inesperada del servidor.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Anotació {{type}}]
+password_label=Introduïu la contrasenya per obrir aquest fitxer PDF.
+password_invalid=La contrasenya no és vàlida. Torneu-ho a provar.
+password_ok=D'acord
+password_cancel=Cancel·la
+
+printing_not_supported=Avís: la impressió no és plenament funcional en aquest navegador.
+printing_not_ready=Atenció: el PDF no s'ha acabat de carregar per imprimir-lo.
+web_fonts_disabled=Els tipus de lletra web estan desactivats: no es poden utilitzar els tipus de lletra incrustats al PDF.
+document_colors_not_allowed=Els documents PDF no poden usar els seus colors propis: «Permet a les pàgines triar els colors propis» es troba desactivat al navegador.
diff --git a/js/pdfjs/web/locale/cak/viewer.properties b/js/pdfjs/web/locale/cak/viewer.properties
new file mode 100644
index 0000000..c105d82
--- /dev/null
+++ b/js/pdfjs/web/locale/cak/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Jun kan ruxaq
+previous_label=Chuwäch
+next.title=Jun chik ruxaq
+next_label=Jun chik
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Ruxaq
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=richin {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} richin {{pagesCount}})
+
+zoom_out.title=Tich'utinirisäx
+zoom_out_label=Tich'utinirisäx
+zoom_in.title=Tinimirisäx
+zoom_in_label=Tinimirisäx
+zoom.title=Sum
+presentation_mode.title=Tijal ri rub'anikil niwachin
+presentation_mode_label=Pa rub'eyal niwachin
+open_file.title=Tijaq yakb'äl
+open_file_label=Tijaq
+print.title=Titz'ajb'äx
+print_label=Titz'ajb'äx
+download.title=Tiqasäx
+download_label=Tiqasäx
+bookmark.title=Rutz'etik wakami (tiwachib'ëx o tijaq pa jun k'ak'a' tzuwäch)
+bookmark_label=Rutzub'al wakami
+
+# Secondary toolbar and context menu
+tools.title=Samajib'äl
+tools_label=Samajib'äl
+first_page.title=Tib'e pa nab'ey ruxaq
+first_page.label=Tib'e pa nab'ey ruxaq
+first_page_label=Tib'e pa nab'ey ruxaq
+last_page.title=Tib'e pa ruk'isib'äl ruxaq
+last_page.label=Tib'e pa ruk'isib'äl ruxaq
+last_page_label=Tib'e pa ruk'isib'äl ruxaq
+page_rotate_cw.title=Tisutïx pan ajkiq'a'
+page_rotate_cw.label=Tisutïx pan ajkiq'a'
+page_rotate_cw_label=Tisutïx pan ajkiq'a'
+page_rotate_ccw.title=Tisutïx pan ajxokon
+page_rotate_ccw.label=Tisutïx pan ajxokon
+page_rotate_ccw_label=Tisutïx pan ajxokon
+
+cursor_text_select_tool.title=Titzij ri rusamajib'al Rucha'ik Rucholajem Tzij
+cursor_text_select_tool_label=Rusamajib'al Rucha'ik Rucholajem Tzij
+cursor_hand_tool.title=Titzij ri q'ab'aj samajib'äl
+cursor_hand_tool_label=Q'ab'aj Samajib'äl
+
+scroll_vertical.title=Tokisäx Pa'äl Q'axanem
+scroll_vertical_label=Pa'äl Q'axanem
+scroll_horizontal.title=Tokisäx Kotz'öl Q'axanem
+scroll_horizontal_label=Kotz'öl Q'axanem
+scroll_wrapped.title=Tokisäx Tzub'aj Q'axanem
+scroll_wrapped_label=Tzub'aj Q'axanem
+
+spread_none.title=Man ketun taq ruxaq pa rub'eyal wuj
+spread_none_label=Majun Rub'eyal
+spread_odd.title=Ke'atunu' ri taq ruxaq rik'in natikirisaj rik'in jun man k'ulaj ta rajilab'al
+spread_odd_label=Man K'ulaj Ta Rub'eyal
+spread_even.title=Ke'atunu' ri taq ruxaq rik'in natikirisaj rik'in jun k'ulaj rajilab'al
+spread_even_label=K'ulaj Rub'eyal
+
+# Document properties dialog box
+document_properties.title=Taq richinil wuj…
+document_properties_label=Taq richinil wuj…
+document_properties_file_name=Rub'i' yakb'äl:
+document_properties_file_size=Runimilem yakb'äl:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=B'i'aj:
+document_properties_author=B'anel:
+document_properties_subject=Taqikil:
+document_properties_keywords=Kixe'el taq tzij:
+document_properties_creation_date=Ruq'ijul xtz'uk:
+document_properties_modification_date=Ruq'ijul xjalwachïx:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Q'inonel:
+document_properties_producer=PDF b'anöy:
+document_properties_version=PDF ruwäch:
+document_properties_page_count=Jarupe' ruxaq:
+document_properties_page_size=Runimilem ri Ruxaq:
+document_properties_page_size_unit_inches=pa
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=rupalem
+document_properties_page_size_orientation_landscape=rukotz'olem
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Loman wuj
+document_properties_page_size_name_legal=Nïm wuj
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Anin Rutz'etik Ajk'amaya'l:
+document_properties_linearized_yes=Ja'
+document_properties_linearized_no=Mani
+document_properties_close=Titz'apïx
+
+print_progress_message=Ruchojmirisaxik wuj richin nitz'ajb'äx…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Tiq'at
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Tijal ri ajxikin kajtz'ik
+toggle_sidebar_notification.title=Tik'ex ri ajxikin yuqkajtz'ik (ri wuj eruk'wan taq ruchi'/taqoj taq yakb'äl)
+toggle_sidebar_label=Tijal ri ajxikin kajtz'ik
+document_outline.title=Tik'ut pe ruch'akulal wuj (kamul-pitz'oj richin nirik'/nich'utinirisäx ronojel ruch'akulal)
+document_outline_label=Ruch'akulal wuj
+attachments.title=Kek'ut pe ri taq taqoj
+attachments_label=Taq taqoj
+thumbs.title=Kek'ut pe taq ch'utiq
+thumbs_label=Koköj
+findbar.title=Tikanöx chupam ri wuj
+findbar_label=Tikanöx
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Ruxaq {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Ruxaq {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Ruch'utinirisaxik ruxaq {{page}}
+
+# Find panel button title and messages
+find_input.title=Tikanöx
+find_input.placeholder=Tikanöx pa wuj…
+find_previous.title=Tib'an b'enam pa ri jun kan q'aptzij xilitäj
+find_previous_label=Jun kan
+find_next.title=Tib'e pa ri jun chik pajtzij xilitäj
+find_next_label=Jun chik
+find_highlight=Tiya' retal ronojel
+find_match_case_label=Tuk'äm ri' kik'in taq nimatz'ib' chuqa' taq ch'utitz'ib'
+find_entire_word_label=Tz'aqät taq tzij
+find_reached_top=Xb'eq'i' ri rutikirib'al wuj, xtikanöx k'a pa ruk'isib'äl
+find_reached_bottom=Xb'eq'i' ri ruk'isib'äl wuj, xtikanöx pa rutikirib'al
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} richin {{total}} nuk'äm ri'
+find_match_count[two]={{current}} richin {{total}} nikik'äm ki'
+find_match_count[few]={{current}} richin {{total}} nikik'äm ki'
+find_match_count[many]={{current}} richin {{total}} nikik'äm ki'
+find_match_count[other]={{current}} richin {{total}} nikik'äm ki'
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=K'ïy chi re {{limit}} nikik'äm ki'
+find_match_count_limit[one]=K'ïy chi re {{limit}} nuk'äm ri'
+find_match_count_limit[two]=K'ïy chi re {{limit}} nikik'äm ki'
+find_match_count_limit[few]=K'ïy chi re {{limit}} nikik'äm ki'
+find_match_count_limit[many]=K'ïy chi re {{limit}} nikik'äm ki'
+find_match_count_limit[other]=K'ïy chi re {{limit}} nikik'äm ki'
+find_not_found=Man xilitäj ta ri pajtzij
+
+# Error panel labels
+error_more_info=Ch'aqa' chik rutzijol
+error_less_info=Jub'a' ok rutzijol
+error_close=Titz'apïx
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Uqxa'n: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Tzub'aj: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Yakb'äl: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=B'ey: {{line}}
+rendering_error=Xk'ulwachitäj jun sachoj toq ninuk'wachij ri ruxaq.
+
+# Predefined zoom values
+page_scale_width=Ruwa ruxaq
+page_scale_fit=Tinuk' ruxaq
+page_scale_auto=Yonil chi nimilem
+page_scale_actual=Runimilem
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Sachoj
+loading_error=\u0020Xk'ulwachitäj jun sach'oj toq xnuk'ux ri PDF .
+invalid_file_error=Man oke ta o yujtajinäq ri PDF yakb'äl.
+missing_file_error=Man xilitäj ta ri PDF yakb'äl.
+unexpected_response_error=Man oyob'en ta tz'olin rutzij ruk'u'x samaj.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Tz'ib'anïk]
+password_label=Tatz'ib'aj ri ewan tzij richin najäq re yakb'äl re' pa PDF.
+password_invalid=Man okel ta ri ewan tzij: Tatojtob'ej chik.
+password_ok=Ãœtz
+password_cancel=Tiq'at
+
+printing_not_supported=Rutzijol k'ayewal: Ri rutz'ajb'axik man koch'el ta ronojel pa re okik'amaya'l re'.
+printing_not_ready=Rutzijol k'ayewal: Ri PDF man xusamajij ta ronojel richin nitz'ajb'äx.
+web_fonts_disabled=E chupül ri taq ajk'amaya'l tz'ib': man tikirel ta nokisäx ri taq tz'ib' PDF pa ch'ikenïk
+document_colors_not_allowed=Ri taq wuj pa PDF man ya'on ta q'ij chi ke richin nikokisaj ri taq kib'onil: “Tiya' q'ij chi ke ri taq ruxaq chi kekicha' ri taq kib'onil†chupun pa ri awokik'amaya'l.
diff --git a/js/pdfjs/web/locale/cs/viewer.properties b/js/pdfjs/web/locale/cs/viewer.properties
new file mode 100644
index 0000000..6310f63
--- /dev/null
+++ b/js/pdfjs/web/locale/cs/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Přejde na předchozí stránku
+previous_label=Předchozí
+next.title=Přejde na následující stránku
+next_label=Další
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Stránka
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=z {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} z {{pagesCount}})
+
+zoom_out.title=Zmenší velikost
+zoom_out_label=Zmenšit
+zoom_in.title=Zvětší velikost
+zoom_in_label=Zvětšit
+zoom.title=Nastaví velikost
+presentation_mode.title=Přepne do režimu prezentace
+presentation_mode_label=Režim prezentace
+open_file.title=Otevře soubor
+open_file_label=Otevřít
+print.title=Vytiskne dokument
+print_label=Vytisknout
+download.title=Stáhne dokument
+download_label=Stáhnout
+bookmark.title=SouÄasný pohled (kopírovat nebo otevřít v novém oknÄ›)
+bookmark_label=SouÄasný pohled
+
+# Secondary toolbar and context menu
+tools.title=Nástroje
+tools_label=Nástroje
+first_page.title=Přejde na první stránku
+first_page.label=Přejít na první stránku
+first_page_label=Přejít na první stránku
+last_page.title=Přejde na poslední stránku
+last_page.label=Přejít na poslední stránku
+last_page_label=Přejít na poslední stránku
+page_rotate_cw.title=OtoÄí po smÄ›ru hodin
+page_rotate_cw.label=OtoÄit po smÄ›ru hodin
+page_rotate_cw_label=OtoÄit po smÄ›ru hodin
+page_rotate_ccw.title=OtoÄí proti smÄ›ru hodin
+page_rotate_ccw.label=OtoÄit proti smÄ›ru hodin
+page_rotate_ccw_label=OtoÄit proti smÄ›ru hodin
+
+cursor_text_select_tool.title=Povolí výběr textu
+cursor_text_select_tool_label=Výběr textu
+cursor_hand_tool.title=Povolí nástroj ruÄiÄka
+cursor_hand_tool_label=Nástroj ruÄiÄka
+
+scroll_vertical.title=Použít svislé posouvání
+scroll_vertical_label=Svislé posouvání
+scroll_horizontal.title=Použít vodorovné posouvání
+scroll_horizontal_label=Vodorovné posouvání
+scroll_wrapped.title=Použít postupné posouvání
+scroll_wrapped_label=Postupné posouvání
+
+spread_none.title=Nesdružovat stránky
+spread_none_label=Žádné sdružení
+spread_odd.title=Sdruží stránky s umístěním lichých vlevo
+spread_odd_label=Sdružení stránek (liché vlevo)
+spread_even.title=Sdruží stránky s umístěním sudých vlevo
+spread_even_label=Sdružení stránek (sudé vlevo)
+
+# Document properties dialog box
+document_properties.title=Vlastnosti dokumentu…
+document_properties_label=Vlastnosti dokumentu…
+document_properties_file_name=Název souboru:
+document_properties_file_size=Velikost souboru:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bajtů)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bajtů)
+document_properties_title=Název stránky:
+document_properties_author=Autor:
+document_properties_subject=Předmět:
+document_properties_keywords=KlíÄová slova:
+document_properties_creation_date=Datum vytvoření:
+document_properties_modification_date=Datum úpravy:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Vytvořil:
+document_properties_producer=Tvůrce PDF:
+document_properties_version=Verze PDF:
+document_properties_page_count=PoÄet stránek:
+document_properties_page_size=Velikost stránky:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=na výšku
+document_properties_page_size_orientation_landscape=na šířku
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Dopis
+document_properties_page_size_name_legal=Právní dokument
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Rychlé zobrazování z webu:
+document_properties_linearized_yes=Ano
+document_properties_linearized_no=Ne
+document_properties_close=Zavřít
+
+print_progress_message=Příprava dokumentu pro tisk…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}} %
+print_progress_close=Zrušit
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Postranní lišta
+toggle_sidebar_notification.title=Přepne postranní lištu (dokument obsahuje osnovu/přílohy)
+toggle_sidebar_label=Postranní lišta
+document_outline.title=Zobrazí osnovu dokumentu (dvojité klepnutí rozbalí/sbalí všechny položky)
+document_outline_label=Osnova dokumentu
+attachments.title=Zobrazí přílohy
+attachments_label=Přílohy
+thumbs.title=Zobrazí náhledy
+thumbs_label=Náhledy
+findbar.title=Najde v dokumentu
+findbar_label=Najít
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Strana {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Strana {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Náhled strany {{page}}
+
+# Find panel button title and messages
+find_input.title=Najít
+find_input.placeholder=Najít v dokumentu…
+find_previous.title=Najde předchozí výskyt hledaného textu
+find_previous_label=Předchozí
+find_next.title=Najde další výskyt hledaného textu
+find_next_label=Další
+find_highlight=Zvýraznit
+find_match_case_label=Rozlišovat velikost
+find_entire_word_label=Celá slova
+find_reached_top=Dosažen zaÄátek dokumentu, pokraÄuje se od konce
+find_reached_bottom=Dosažen konec dokumentu, pokraÄuje se od zaÄátku
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}}. z {{total}} výskytu
+find_match_count[two]={{current}}. z {{total}} výskytů
+find_match_count[few]={{current}}. z {{total}} výskytů
+find_match_count[many]={{current}}. z {{total}} výskytů
+find_match_count[other]={{current}}. z {{total}} výskytů
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Více než {{limit}} výskytů
+find_match_count_limit[one]=Více než {{limit}} výskyt
+find_match_count_limit[two]=Více než {{limit}} výskyty
+find_match_count_limit[few]=Více než {{limit}} výskyty
+find_match_count_limit[many]=Více než {{limit}} výskytů
+find_match_count_limit[other]=Více než {{limit}} výskytů
+find_not_found=Hledaný text nenalezen
+
+# Error panel labels
+error_more_info=Více informací
+error_less_info=Méně informací
+error_close=Zavřít
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (sestavení: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Zpráva: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Zásobník: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Soubor: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Řádek: {{line}}
+rendering_error=Při vykreslování stránky nastala chyba.
+
+# Predefined zoom values
+page_scale_width=Podle šířky
+page_scale_fit=Podle výšky
+page_scale_auto=Automatická velikost
+page_scale_actual=SkuteÄná velikost
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}} %
+
+# Loading indicator messages
+loading_error_indicator=Chyba
+loading_error=Při nahrávání PDF nastala chyba.
+invalid_file_error=Neplatný nebo chybný soubor PDF.
+missing_file_error=Chybí soubor PDF.
+unexpected_response_error=NeoÄekávaná odpovÄ›Ä serveru.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Anotace typu {{type}}]
+password_label=Pro otevření PDF souboru vložte heslo.
+password_invalid=Neplatné heslo. Zkuste to znovu.
+password_ok=OK
+password_cancel=Zrušit
+
+printing_not_supported=UpozornÄ›ní: Tisk není v tomto prohlížeÄi plnÄ› podporován.
+printing_not_ready=UpozornÄ›ní: Dokument PDF není kompletnÄ› naÄten.
+web_fonts_disabled=Webová písma jsou zakázána, proto není možné použít vložená písma PDF.
+document_colors_not_allowed=PDF dokumenty nemají povoleno používat vlastní barvy: volba 'Povolit stránkám používat vlastní barvy' je v prohlížeÄi deaktivována.
diff --git a/js/pdfjs/web/locale/cy/viewer.properties b/js/pdfjs/web/locale/cy/viewer.properties
new file mode 100644
index 0000000..dc4fb2e
--- /dev/null
+++ b/js/pdfjs/web/locale/cy/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Tudalen Flaenorol
+previous_label=Blaenorol
+next.title=Tudalen Nesaf
+next_label=Nesaf
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Tudalen
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=o {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} o {{pagesCount}})
+
+zoom_out.title=Chwyddo Allan
+zoom_out_label=Chwyddo Allan
+zoom_in.title=Chwyddo Mewn
+zoom_in_label=Chwyddo Mewn
+zoom.title=Chwyddo
+presentation_mode.title=Newid i'r Modd Cyflwyno
+presentation_mode_label=Modd Cyflwyno
+open_file.title=Agor Ffeil
+open_file_label=Agor
+print.title=Argraffu
+print_label=Argraffu
+download.title=Llwyth
+download_label=Llwytho i Lawr
+bookmark.title=Golwg cyfredol (copïo neu agor ffenestr newydd)
+bookmark_label=Golwg Gyfredol
+
+# Secondary toolbar and context menu
+tools.title=Offer
+tools_label=Offer
+first_page.title=Mynd i'r Dudalen Gyntaf
+first_page.label=Mynd i'r Dudalen Gyntaf
+first_page_label=Mynd i'r Dudalen Gyntaf
+last_page.title=Mynd i'r Dudalen Olaf
+last_page.label=Mynd i'r Dudalen Olaf
+last_page_label=Mynd i'r Dudalen Olaf
+page_rotate_cw.title=Cylchdroi Clocwedd
+page_rotate_cw.label=Cylchdroi Clocwedd
+page_rotate_cw_label=Cylchdroi Clocwedd
+page_rotate_ccw.title=Cylchdroi Gwrthglocwedd
+page_rotate_ccw.label=Cylchdroi Gwrthglocwedd
+page_rotate_ccw_label=Cylchdroi Gwrthglocwedd
+
+cursor_text_select_tool.title=Galluogi Dewis Offeryn Testun
+cursor_text_select_tool_label=Offeryn Dewis Testun
+cursor_hand_tool.title=Galluogi Offeryn Llaw
+cursor_hand_tool_label=Offeryn Llaw
+
+scroll_vertical.title=Defnyddio Sgrolio Fertigol
+scroll_vertical_label=Sgrolio Fertigol
+scroll_horizontal.title=Defnyddio Sgrolio Fertigol
+scroll_horizontal_label=Sgrolio Fertigol
+scroll_wrapped.title=Defnyddio Sgrolio Amlapio
+scroll_wrapped_label=Sgrolio Amlapio
+
+spread_none.title=Peidio uno taeniadau canol
+spread_none_label=Dim Taeniadau
+spread_odd.title=Uno taeniadau tudalen yn cychwyn gyda thudalennau odrif
+spread_odd_label=Taeniadau Odrifau
+spread_even.title=Uno taeniadau tudalen yn cychwyn gyda thudalennau eilrif
+spread_even_label=Taeniadau Eilrif
+
+# Document properties dialog box
+document_properties.title=Priodweddau Dogfen…
+document_properties_label=Priodweddau Dogfen…
+document_properties_file_name=Enw ffeil:
+document_properties_file_size=Maint ffeil:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} beit)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} beit)
+document_properties_title=Teitl:
+document_properties_author=Awdur:
+document_properties_subject=Pwnc:
+document_properties_keywords=Allweddair:
+document_properties_creation_date=Dyddiad Creu:
+document_properties_modification_date=Dyddiad Addasu:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Crewr:
+document_properties_producer=Cynhyrchydd PDF:
+document_properties_version=Fersiwn PDF:
+document_properties_page_count=Cyfrif Tudalen:
+document_properties_page_size=Maint Tudalen:
+document_properties_page_size_unit_inches=o fewn
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=portread
+document_properties_page_size_orientation_landscape=tirlun
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Llythyr
+document_properties_page_size_name_legal=Cyfreithiol
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Golwg Gwe Cyflym:
+document_properties_linearized_yes=Iawn
+document_properties_linearized_no=Na
+document_properties_close=Cau
+
+print_progress_message=Paratoi dogfen ar gyfer ei hargraffu…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Diddymu
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Toglo'r Bar Ochr
+toggle_sidebar_notification.title=Toglo'r Bar Ochr (mae'r ddogfen yn cynnwys outline/attachments)
+toggle_sidebar_label=Toglo'r Bar Ochr
+document_outline.title=Dangos Amlinell Dogfen (clic dwbl i ymestyn/cau pob eitem)
+document_outline_label=Amlinelliad Dogfen
+attachments.title=Dangos Atodiadau
+attachments_label=Atodiadau
+thumbs.title=Dangos Lluniau Bach
+thumbs_label=Lluniau Bach
+findbar.title=Canfod yn y Ddogfen
+findbar_label=Canfod
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Tudalen {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Tudalen {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Llun Bach Tudalen {{page}}
+
+# Find panel button title and messages
+find_input.title=Canfod
+find_input.placeholder=Canfod yn y ddogfen…
+find_previous.title=Canfod enghraifft flaenorol o'r ymadrodd
+find_previous_label=Blaenorol
+find_next.title=Canfod enghraifft nesaf yr ymadrodd
+find_next_label=Nesaf
+find_highlight=Amlygu popeth
+find_match_case_label=Cydweddu maint
+find_entire_word_label=Geiriau cyfan
+find_reached_top=Wedi cyrraedd brig y dudalen, parhau o'r gwaelod
+find_reached_bottom=Wedi cyrraedd diwedd y dudalen, parhau o'r brig
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} o {{total}} cydweddiad
+find_match_count[two]={{current}} o {{total}} cydweddiad
+find_match_count[few]={{current}} o {{total}} cydweddiad
+find_match_count[many]={{current}} o {{total}} cydweddiad
+find_match_count[other]={{current}} o {{total}} cydweddiad
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Mwy na {{limit}} cydweddiad
+find_match_count_limit[one]=Mwy na {{limit}} cydweddiad
+find_match_count_limit[two]=Mwy na {{limit}} cydweddiad
+find_match_count_limit[few]=Mwy na {{limit}} cydweddiad
+find_match_count_limit[many]=Mwy na {{limit}} cydweddiad
+find_match_count_limit[other]=Mwy na {{limit}} cydweddiad
+find_not_found=Heb ganfod ymadrodd
+
+# Error panel labels
+error_more_info=Rhagor o Wybodaeth
+error_less_info=Llai o wybodaeth
+error_close=Cau
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Neges: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stac: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Ffeil: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Llinell: {{line}}
+rendering_error=Digwyddodd gwall wrth adeiladu'r dudalen.
+
+# Predefined zoom values
+page_scale_width=Lled Tudalen
+page_scale_fit=Ffit Tudalen
+page_scale_auto=Chwyddo Awtomatig
+page_scale_actual=Maint Gwirioneddol
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Gwall
+loading_error=Digwyddodd gwall wrth lwytho'r PDF.
+invalid_file_error=Ffeil PDF annilys neu llwgr.
+missing_file_error=Ffeil PDF coll.
+unexpected_response_error=Ymateb annisgwyl gan y gweinydd.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Anodiad {{type}} ]
+password_label=Rhowch gyfrinair i agor y PDF.
+password_invalid=Cyfrinair annilys. Ceisiwch eto.
+password_ok=Iawn
+password_cancel=Diddymu
+
+printing_not_supported=Rhybudd: Nid yw argraffu yn cael ei gynnal yn llawn gan y porwr.
+printing_not_ready=Rhybudd: Nid yw'r PDF wedi ei lwytho'n llawn ar gyfer argraffu.
+web_fonts_disabled=Ffontiau gwe wedi eu hanalluogi: methu defnyddio ffontiau PDF mewnblanedig.
+document_colors_not_allowed=Nid oes caniatâd i ddogfennau PDF i ddefnyddio eu lliwiau eu hunain: Mae “Caniatáu i dudalennau ddefnyddio eu lliwiau eu hunain†wedi ei atal yn y porwr.
diff --git a/js/pdfjs/web/locale/da/viewer.properties b/js/pdfjs/web/locale/da/viewer.properties
new file mode 100644
index 0000000..4f05fd9
--- /dev/null
+++ b/js/pdfjs/web/locale/da/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Forrige side
+previous_label=Forrige
+next.title=Næste side
+next_label=Næste
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Side
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=af {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} af {{pagesCount}})
+
+zoom_out.title=Zoom ud
+zoom_out_label=Zoom ud
+zoom_in.title=Zoom ind
+zoom_in_label=Zoom ind
+zoom.title=Zoom
+print.title=Udskriv
+print_label=Udskriv
+presentation_mode.title=Skift til fuldskærmsvisning
+presentation_mode_label=Fuldskærmsvisning
+open_file.title=Ã…bn fil
+open_file_label=Ã…bn
+download.title=Hent
+download_label=Hent
+bookmark.title=Aktuel visning (kopier eller åbn i et nyt vindue)
+bookmark_label=Aktuel visning
+
+# Secondary toolbar and context menu
+tools.title=Funktioner
+tools_label=Funktioner
+first_page.title=Gå til første side
+first_page.label=Gå til første side
+first_page_label=Gå til første side
+last_page.title=GÃ¥ til sidste side
+last_page.label=GÃ¥ til sidste side
+last_page_label=GÃ¥ til sidste side
+page_rotate_cw.title=Roter med uret
+page_rotate_cw.label=Roter med uret
+page_rotate_cw_label=Roter med uret
+page_rotate_ccw.title=Roter mod uret
+page_rotate_ccw.label=Roter mod uret
+page_rotate_ccw_label=Roter mod uret
+
+cursor_text_select_tool.title=Aktiver markeringsværktøj
+cursor_text_select_tool_label=Markeringsværktøj
+cursor_hand_tool.title=Aktiver håndværktøj
+cursor_hand_tool_label=Håndværktøj
+
+scroll_vertical.title=Brug vertikal scrolling
+scroll_vertical_label=Vertikal scrolling
+scroll_horizontal.title=Brug horisontal scrolling
+scroll_horizontal_label=Horisontal scrolling
+scroll_wrapped.title=Brug ombrudt scrolling
+scroll_wrapped_label=Ombrudt scrolling
+
+spread_none.title=Vis enkeltsider
+spread_none_label=Enkeltsider
+spread_odd.title=Vis opslag med ulige sidenumre til venstre
+spread_odd_label=Opslag med forside
+spread_even.title=Vis opslag med lige sidenumre til venstre
+spread_even_label=Opslag uden forside
+
+# Document properties dialog box
+document_properties.title=Dokumentegenskaber…
+document_properties_label=Dokumentegenskaber…
+document_properties_file_name=Filnavn:
+document_properties_file_size=Filstørrelse:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Titel:
+document_properties_author=Forfatter:
+document_properties_subject=Emne:
+document_properties_keywords=Nøgleord:
+document_properties_creation_date=Oprettet:
+document_properties_modification_date=Redigeret:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Program:
+document_properties_producer=PDF-producent:
+document_properties_version=PDF-version:
+document_properties_page_count=Antal sider:
+document_properties_page_size=Sidestørrelse:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=stående
+document_properties_page_size_orientation_landscape=liggende
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Hurtig web-visning:
+document_properties_linearized_yes=Ja
+document_properties_linearized_no=Nej
+document_properties_close=Luk
+
+print_progress_message=Forbereder dokument til udskrivning…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Annuller
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Slå sidepanel til eller fra
+toggle_sidebar_notification.title=Slå sidepanel til eller fra (dokumentet indeholder disposition/vedhæftede filer)
+toggle_sidebar_label=Slå sidepanel til eller fra
+document_outline.title=Vis dokumentets disposition (dobbeltklik for at vise/skjule alle elementer)
+document_outline_label=Dokument-disposition
+attachments.title=Vis vedhæftede filer
+attachments_label=Vedhæftede filer
+thumbs.title=Vis miniaturer
+thumbs_label=Miniaturer
+findbar.title=Find i dokument
+findbar_label=Find
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Side {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Side {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniature af side {{page}}
+
+# Find panel button title and messages
+find_input.title=Find
+find_input.placeholder=Find i dokument…
+find_previous.title=Find den forrige forekomst
+find_previous_label=Forrige
+find_next.title=Find den næste forekomst
+find_next_label=Næste
+find_highlight=Fremhæv alle
+find_match_case_label=Forskel på store og små bogstaver
+find_entire_word_label=Hele ord
+find_reached_top=Toppen af siden blev nået, fortsatte fra bunden
+find_reached_bottom=Bunden af siden blev nået, fortsatte fra toppen
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} af {{total}} forekomst
+find_match_count[two]={{current}} af {{total}} forekomster
+find_match_count[few]={{current}} af {{total}} forekomster
+find_match_count[many]={{current}} af {{total}} forekomster
+find_match_count[other]={{current}} af {{total}} forekomster
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Mere end {{limit}} forekomster
+find_match_count_limit[one]=Mere end {{limit}} forekomst
+find_match_count_limit[two]=Mere end {{limit}} forekomster
+find_match_count_limit[few]=Mere end {{limit}} forekomster
+find_match_count_limit[many]=Mere end {{limit}} forekomster
+find_match_count_limit[other]=Mere end {{limit}} forekomster
+find_not_found=Der blev ikke fundet noget
+
+# Error panel labels
+error_more_info=Mere information
+error_less_info=Mindre information
+error_close=Luk
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Fejlmeddelelse: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stack: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Fil: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Linje: {{line}}
+rendering_error=Der opstod en fejl ved generering af siden.
+
+# Predefined zoom values
+page_scale_width=Sidebredde
+page_scale_fit=Tilpas til side
+page_scale_auto=Automatisk zoom
+page_scale_actual=Faktisk størrelse
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Fejl
+loading_error=Der opstod en fejl ved indlæsning af PDF-filen.
+invalid_file_error=PDF-filen er ugyldig eller ødelagt.
+missing_file_error=Manglende PDF-fil.
+unexpected_response_error=Uventet svar fra serveren.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}}kommentar]
+password_label=Angiv adgangskode til at åbne denne PDF-fil.
+password_invalid=Ugyldig adgangskode. Prøv igen.
+password_ok=OK
+password_cancel=Fortryd
+
+printing_not_supported=Advarsel: Udskrivning er ikke fuldt understøttet af browseren.
+printing_not_ready=Advarsel: PDF-filen er ikke fuldt indlæst til udskrivning.
+web_fonts_disabled=Webskrifttyper er deaktiverede. De indlejrede skrifttyper i PDF-filen kan ikke anvendes.
+document_colors_not_allowed=PDF-dokumenter må ikke bruge deres egne farver: 'Tillad sider at vælge deres egne farver' er deaktiveret i browseren.
diff --git a/js/pdfjs/web/locale/de/viewer.properties b/js/pdfjs/web/locale/de/viewer.properties
new file mode 100644
index 0000000..84240bb
--- /dev/null
+++ b/js/pdfjs/web/locale/de/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Eine Seite zurück
+previous_label=Zurück
+next.title=Eine Seite vor
+next_label=Vor
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Seite
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=von {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} von {{pagesCount}})
+
+zoom_out.title=Verkleinern
+zoom_out_label=Verkleinern
+zoom_in.title=Vergrößern
+zoom_in_label=Vergrößern
+zoom.title=Zoom
+presentation_mode.title=In Präsentationsmodus wechseln
+presentation_mode_label=Präsentationsmodus
+open_file.title=Datei öffnen
+open_file_label=Öffnen
+print.title=Drucken
+print_label=Drucken
+download.title=Dokument speichern
+download_label=Speichern
+bookmark.title=Aktuelle Ansicht (zum Kopieren oder Öffnen in einem neuen Fenster)
+bookmark_label=Aktuelle Ansicht
+
+# Secondary toolbar and context menu
+tools.title=Werkzeuge
+tools_label=Werkzeuge
+first_page.title=Erste Seite anzeigen
+first_page.label=Erste Seite anzeigen
+first_page_label=Erste Seite anzeigen
+last_page.title=Letzte Seite anzeigen
+last_page.label=Letzte Seite anzeigen
+last_page_label=Letzte Seite anzeigen
+page_rotate_cw.title=Im Uhrzeigersinn drehen
+page_rotate_cw.label=Im Uhrzeigersinn drehen
+page_rotate_cw_label=Im Uhrzeigersinn drehen
+page_rotate_ccw.title=Gegen Uhrzeigersinn drehen
+page_rotate_ccw.label=Gegen Uhrzeigersinn drehen
+page_rotate_ccw_label=Gegen Uhrzeigersinn drehen
+
+cursor_text_select_tool.title=Textauswahl-Werkzeug aktivieren
+cursor_text_select_tool_label=Textauswahl-Werkzeug
+cursor_hand_tool.title=Hand-Werkzeug aktivieren
+cursor_hand_tool_label=Hand-Werkzeug
+
+scroll_vertical.title=Seiten übereinander anordnen
+scroll_vertical_label=Vertikale Seitenanordnung
+scroll_horizontal.title=Seiten nebeneinander anordnen
+scroll_horizontal_label=Horizontale Seitenanordnung
+scroll_wrapped.title=Seiten neben- und übereinander anordnen, anhängig vom Platz
+scroll_wrapped_label=Kombinierte Seitenanordnung
+
+spread_none.title=Seiten nicht nebeneinander anzeigen
+spread_none_label=Einzelne Seiten
+spread_odd.title=Jeweils eine ungerade und eine gerade Seite nebeneinander anzeigen
+spread_odd_label=Ungerade + gerade Seite
+spread_even.title=Jeweils eine gerade und eine ungerade Seite nebeneinander anzeigen
+spread_even_label=Gerade + ungerade Seite
+
+# Document properties dialog box
+document_properties.title=Dokumenteigenschaften
+document_properties_label=Dokumenteigenschaften…
+document_properties_file_name=Dateiname:
+document_properties_file_size=Dateigröße:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} Bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} Bytes)
+document_properties_title=Titel:
+document_properties_author=Autor:
+document_properties_subject=Thema:
+document_properties_keywords=Stichwörter:
+document_properties_creation_date=Erstelldatum:
+document_properties_modification_date=Bearbeitungsdatum:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}} {{time}}
+document_properties_creator=Anwendung:
+document_properties_producer=PDF erstellt mit:
+document_properties_version=PDF-Version:
+document_properties_page_count=Seitenzahl:
+document_properties_page_size=Seitengröße:
+document_properties_page_size_unit_inches=Zoll
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=Hochformat
+document_properties_page_size_orientation_landscape=Querformat
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Schnelle Webanzeige:
+document_properties_linearized_yes=Ja
+document_properties_linearized_no=Nein
+document_properties_close=Schließen
+
+print_progress_message=Dokument wird für Drucken vorbereitet…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}} %
+print_progress_close=Abbrechen
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Sidebar umschalten
+toggle_sidebar_notification.title=Sidebar umschalten (Dokument enthält Dokumentstruktur/Anhänge)
+toggle_sidebar_label=Sidebar umschalten
+document_outline.title=Dokumentstruktur anzeigen (Doppelklicken, um alle Einträge aus- bzw. einzuklappen)
+document_outline_label=Dokumentstruktur
+attachments.title=Anhänge anzeigen
+attachments_label=Anhänge
+thumbs.title=Miniaturansichten anzeigen
+thumbs_label=Miniaturansichten
+findbar.title=Dokument durchsuchen
+findbar_label=Suchen
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Seite {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Seite {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniaturansicht von Seite {{page}}
+
+# Find panel button title and messages
+find_input.title=Suchen
+find_input.placeholder=Im Dokument suchen…
+find_previous.title=Vorheriges Vorkommen des Suchbegriffs finden
+find_previous_label=Zurück
+find_next.title=Nächstes Vorkommen des Suchbegriffs finden
+find_next_label=Weiter
+find_highlight=Alle hervorheben
+find_match_case_label=Groß-/Kleinschreibung beachten
+find_entire_word_label=Ganze Wörter
+find_reached_top=Anfang des Dokuments erreicht, fahre am Ende fort
+find_reached_bottom=Ende des Dokuments erreicht, fahre am Anfang fort
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} von {{total}} Ãœbereinstimmung
+find_match_count[two]={{current}} von {{total}} Ãœbereinstimmungen
+find_match_count[few]={{current}} von {{total}} Ãœbereinstimmungen
+find_match_count[many]={{current}} von {{total}} Ãœbereinstimmungen
+find_match_count[other]={{current}} von {{total}} Ãœbereinstimmungen
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Mehr als {{limit}} Ãœbereinstimmungen
+find_match_count_limit[one]=Mehr als {{limit}} Ãœbereinstimmung
+find_match_count_limit[two]=Mehr als {{limit}} Ãœbereinstimmungen
+find_match_count_limit[few]=Mehr als {{limit}} Ãœbereinstimmungen
+find_match_count_limit[many]=Mehr als {{limit}} Ãœbereinstimmungen
+find_match_count_limit[other]=Mehr als {{limit}} Ãœbereinstimmungen
+find_not_found=Suchbegriff nicht gefunden
+
+# Error panel labels
+error_more_info=Mehr Informationen
+error_less_info=Weniger Informationen
+error_close=Schließen
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js Version {{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Nachricht: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Aufrufliste: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Datei: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Zeile: {{line}}
+rendering_error=Beim Darstellen der Seite trat ein Fehler auf.
+
+# Predefined zoom values
+page_scale_width=Seitenbreite
+page_scale_fit=Seitengröße
+page_scale_auto=Automatischer Zoom
+page_scale_actual=Originalgröße
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}} %
+
+# Loading indicator messages
+loading_error_indicator=Fehler
+loading_error=Beim Laden der PDF-Datei trat ein Fehler auf.
+invalid_file_error=Ungültige oder beschädigte PDF-Datei
+missing_file_error=Fehlende PDF-Datei
+unexpected_response_error=Unerwartete Antwort des Servers
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Anlage: {{type}}]
+password_label=Geben Sie zum Öffnen der PDF-Datei deren Passwort ein.
+password_invalid=Falsches Passwort. Bitte versuchen Sie es erneut.
+password_ok=OK
+password_cancel=Abbrechen
+
+printing_not_supported=Warnung: Die Drucken-Funktion wird durch diesen Browser nicht vollständig unterstützt.
+printing_not_ready=Warnung: Die PDF-Datei ist nicht vollständig geladen, dies ist für das Drucken aber empfohlen.
+web_fonts_disabled=Web-Schriftarten sind deaktiviert: Eingebettete PDF-Schriftarten konnten nicht geladen werden.
+document_colors_not_allowed=PDF-Dokumenten ist es nicht erlaubt, ihre eigenen Farben zu verwenden: 'Seiten das Verwenden von eigenen Farben erlauben' ist im Browser deaktiviert.
diff --git a/js/pdfjs/web/locale/dsb/viewer.properties b/js/pdfjs/web/locale/dsb/viewer.properties
new file mode 100644
index 0000000..eb567ec
--- /dev/null
+++ b/js/pdfjs/web/locale/dsb/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Pjerwjejšny bok
+previous_label=Slědk
+next.title=Pśiducy bok
+next_label=Dalej
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Bok
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=z {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} z {{pagesCount}})
+
+zoom_out.title=Pómjeńšyś
+zoom_out_label=Pómjeńšyś
+zoom_in.title=Pówětšyś
+zoom_in_label=Pówětšyś
+zoom.title=Skalěrowanje
+presentation_mode.title=Do prezentaciskego modusa pśejś
+presentation_mode_label=Prezentaciski modus
+open_file.title=Dataju wócyniś
+open_file_label=Wócyniś
+print.title=Śišćaś
+print_label=Śišćaś
+download.title=Ześěgnuś
+download_label=Ześěgnuś
+bookmark.title=Aktualny naglěd (kopěrowaś abo w nowem woknje wócyniś)
+bookmark_label=Aktualny naglěd
+
+# Secondary toolbar and context menu
+tools.title=Rědy
+tools_label=Rědy
+first_page.title=K prědnemu bokoju
+first_page.label=K prědnemu bokoju
+first_page_label=K prědnemu bokoju
+last_page.title=K slědnemu bokoju
+last_page.label=K slědnemu bokoju
+last_page_label=K slědnemu bokoju
+page_rotate_cw.title=Wobwjertnuś ako špěra źo
+page_rotate_cw.label=Wobwjertnuś ako špěra źo
+page_rotate_cw_label=Wobwjertnuś ako špěra źo
+page_rotate_ccw.title=Wobwjertnuś nawopaki ako špěra źo
+page_rotate_ccw.label=Wobwjertnuś nawopaki ako špěra źo
+page_rotate_ccw_label=Wobwjertnuś nawopaki ako špěra źo
+
+cursor_text_select_tool.title=Rěd za wuběranje teksta zmóžniś
+cursor_text_select_tool_label=Rěd za wuběranje teksta
+cursor_hand_tool.title=Rucny rěd zmóžniś
+cursor_hand_tool_label=Rucny rěd
+
+scroll_vertical.title=Wertikalne suwanje wužywaś
+scroll_vertical_label=Wertikalnje suwanje
+scroll_horizontal.title=Horicontalne suwanje wužywaś
+scroll_horizontal_label=Horicontalne suwanje
+scroll_wrapped.title=Pózlažke suwanje wužywaś
+scroll_wrapped_label=Pózlažke suwanje
+
+spread_none.title=Boki njezwězaś
+spread_none_label=Žeden dwójny bok
+spread_odd.title=Boki zachopinajucy z njerownymi bokami zwězaś
+spread_odd_label=Njerowne boki
+spread_even.title=Boki zachopinajucy z rownymi bokami zwězaś
+spread_even_label=Rowne boki
+
+# Document properties dialog box
+document_properties.title=Dokumentowe kakosći…
+document_properties_label=Dokumentowe kakosći…
+document_properties_file_name=MÄ› dataje:
+document_properties_file_size=Wjelikosć dataje:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bajtow)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bajtow)
+document_properties_title=Titel:
+document_properties_author=Awtor:
+document_properties_subject=Tema:
+document_properties_keywords=Klucowe słowa:
+document_properties_creation_date=Datum napóranja:
+document_properties_modification_date=Datum změny:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Awtor:
+document_properties_producer=PDF-gótowaŕ:
+document_properties_version=PDF-wersija:
+document_properties_page_count=Licba bokow:
+document_properties_page_size=Wjelikosć boka:
+document_properties_page_size_unit_inches=col
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=wusoki format
+document_properties_page_size_orientation_landscape=prěcny format
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Fast Web View:
+document_properties_linearized_yes=Jo
+document_properties_linearized_no=NÄ›
+document_properties_close=ZacyniÅ›
+
+print_progress_message=Dokument pśigótujo se za śišćanje…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Pśetergnuś
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Bócnicu pokazaś/schowaś
+toggle_sidebar_notification.title=Bocnicu pśešaltowaś (dokument wopśimujo pśeglěd/pśipiski)
+toggle_sidebar_label=Bócnicu pokazaś/schowaś
+document_outline.title=Dokumentowe naraźenje pokazaś (dwójne kliknjenje, aby se wšykne zapiski pokazali/schowali)
+document_outline_label=Dokumentowa struktura
+attachments.title=Pśidanki pokazaś
+attachments_label=Pśidanki
+thumbs.title=Miniatury pokazaÅ›
+thumbs_label=Miniatury
+findbar.title=W dokumenśe pytaś
+findbar_label=PytaÅ›
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Bok {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Bok {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniatura boka {{page}}
+
+# Find panel button title and messages
+find_input.title=PytaÅ›
+find_input.placeholder=W dokumenśe pytaś…
+find_previous.title=Pjerwjejšne wustupowanje pytańskego wuraza pytaś
+find_previous_label=Slědk
+find_next.title=Pśidujuce wustupowanje pytańskego wuraza pytaś
+find_next_label=Dalej
+find_highlight=WÅ¡ykne wuzwignuÅ›
+find_match_case_label=Na wjelikopisanje źiwaś
+find_entire_word_label=Cełe słowa
+find_reached_top=Zachopjeńk dokumenta dostany, pókšacujo se z kóńcom
+find_reached_bottom=Kóńc dokumenta dostany, pókšacujo se ze zachopjeńkom
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} z {{total}} wótpowědnika
+find_match_count[two]={{current}} z {{total}} wótpowědnikowu
+find_match_count[few]={{current}} z {{total}} wótpowědnikow
+find_match_count[many]={{current}} z {{total}} wótpowědnikow
+find_match_count[other]={{current}} z {{total}} wótpowědnikow
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Wěcej ako {{limit}} wótpowědnikow
+find_match_count_limit[one]=Wěcej ako {{limit}} wótpowědnik
+find_match_count_limit[two]=Wěcej ako {{limit}} wótpowědnika
+find_match_count_limit[few]=Wěcej ako {{limit}} wótpowědniki
+find_match_count_limit[many]=Wěcej ako {{limit}} wótpowědnikow
+find_match_count_limit[other]=Wěcej ako {{limit}} wótpowědnikow
+find_not_found=Pytański wuraz njejo se namakał
+
+# Error panel labels
+error_more_info=Wěcej informacijow
+error_less_info=Mjenjej informacijow
+error_close=ZacyniÅ›
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Powěźenka: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Lisćina zawołanjow: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Dataja: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Smužka: {{line}}
+rendering_error=Pśi zwobraznjanju boka jo zmólka nastała.
+
+# Predefined zoom values
+page_scale_width=Šyrokosć boka
+page_scale_fit=Wjelikosć boka
+page_scale_auto=Awtomatiske skalěrowanje
+page_scale_actual=Aktualna wjelikosć
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Zmólka
+loading_error=Pśi zacytowanju PDF jo zmólka nastała.
+invalid_file_error=Njepłaśiwa abo wobškóźona PDF-dataja.
+missing_file_error=Felujuca PDF-dataja.
+unexpected_response_error=Njewócakane serwerowe wótegrono.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Typ pśipiskow: {{type}}]
+password_label=Zapódajśo gronidło, aby PDF-dataju wócynił.
+password_invalid=Njepłaśiwe gronidło. Pšosym wopytajśo hyšći raz.
+password_ok=W pórěźe
+password_cancel=Pśetergnuś
+
+printing_not_supported=Warnowanje: Śišćanje njepódpěra se połnje pśez toś ten wobglědowak.
+printing_not_ready=Warnowanje: PDF njejo se za śišćanje dopołnje zacytał.
+web_fonts_disabled=Webpisma su znjemóžnjone: njejo móžno, zasajźone PDF-pisma wužywaś.
+document_colors_not_allowed=PDF-dokumenty njesměju swóje barwy wužywaś: 'Bokam dowóliś, swóje barwy wužywaś' jo we wobglědowaku znjemóžnjone.
diff --git a/js/pdfjs/web/locale/el/viewer.properties b/js/pdfjs/web/locale/el/viewer.properties
new file mode 100644
index 0000000..d7a6abc
--- /dev/null
+++ b/js/pdfjs/web/locale/el/viewer.properties
@@ -0,0 +1,246 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=ΠÏοηγοÏμενη σελίδα
+previous_label=ΠÏοηγοÏμενη
+next.title=Επόμενη σελίδα
+next_label=Επόμενη
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Σελίδα
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=από {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} από {{pagesCount}})
+
+zoom_out.title=ΣμίκÏυνση
+zoom_out_label=ΣμίκÏυνση
+zoom_in.title=Μεγέθυνση
+zoom_in_label=Μεγέθυνση
+zoom.title=Ζουμ
+presentation_mode.title=Εναλλαγή σε λειτουÏγία παÏουσίασης
+presentation_mode_label=ΛειτουÏγία παÏουσίασης
+open_file.title=Άνοιγμα αÏχείου
+open_file_label=Άνοιγμα
+print.title=ΕκτÏπωση
+print_label=ΕκτÏπωση
+download.title=Λήψη
+download_label=Λήψη
+bookmark.title=ΤÏέχουσα Ï€Ïοβολή (αντιγÏαφή ή άνοιγμα σε νέο παÏάθυÏο)
+bookmark_label=ΤÏέχουσα Ï€Ïοβολή
+
+# Secondary toolbar and context menu
+tools.title=ΕÏγαλεία
+tools_label=ΕÏγαλεία
+first_page.title=Μετάβαση στην Ï€Ïώτη σελίδα
+first_page.label=Μετάβαση στην Ï€Ïώτη σελίδα
+first_page_label=Μετάβαση στην Ï€Ïώτη σελίδα
+last_page.title=Μετάβαση στην τελευταία σελίδα
+last_page.label=Μετάβαση στην τελευταία σελίδα
+last_page_label=Μετάβαση στην τελευταία σελίδα
+page_rotate_cw.title=ΔεξιόστÏοφη πεÏιστÏοφή
+page_rotate_cw.label=ΔεξιόστÏοφη πεÏιστÏοφή
+page_rotate_cw_label=ΔεξιόστÏοφη πεÏιστÏοφή
+page_rotate_ccw.title=ΑÏιστεÏόστÏοφη πεÏιστÏοφή
+page_rotate_ccw.label=ΑÏιστεÏόστÏοφη πεÏιστÏοφή
+page_rotate_ccw_label=ΑÏιστεÏόστÏοφη πεÏιστÏοφή
+
+cursor_text_select_tool.title=ΕνεÏγοποίηση εÏγαλείου επιλογής κειμένου
+cursor_text_select_tool_label=ΕÏγαλείο επιλογής κειμένου
+cursor_hand_tool.title=ΕνεÏγοποίηση εÏγαλείου χεÏιοÏ
+cursor_hand_tool_label=ΕÏγαλείο χεÏιοÏ
+
+scroll_vertical.title=ΧÏήση κάθετης κÏλισης
+scroll_vertical_label=Κάθετη κÏλιση
+scroll_horizontal.title=ΧÏήση οÏιζόντιας κÏλισης
+scroll_horizontal_label=ΟÏιζόντια κÏλιση
+scroll_wrapped.title=ΧÏήση κυκλικής κÏλισης
+scroll_wrapped_label=Κυκλική κÏλιση
+
+spread_none.title=Îα μην γίνει σÏνδεση επεκτάσεων σελίδων
+spread_none_label=ΧωÏίς επεκτάσεις
+spread_odd.title=ΣÏνδεση επεκτάσεων σελίδων ξεκινώντας από τις μονές σελίδες
+spread_odd_label=Μονές επεκτάσεις
+spread_even.title=ΣÏνδεση επεκτάσεων σελίδων ξεκινώντας από τις ζυγές σελίδες
+spread_even_label=Ζυγές επεκτάσεις
+
+# Document properties dialog box
+document_properties.title=Ιδιότητες εγγÏάφου…
+document_properties_label=Ιδιότητες εγγÏάφου…
+document_properties_file_name=Όνομα αÏχείου:
+document_properties_file_size=Μέγεθος αÏχείου:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Τίτλος:
+document_properties_author=ΣυγγÏαφέας:
+document_properties_subject=Θέμα:
+document_properties_keywords=Λέξεις κλειδιά:
+document_properties_creation_date=ΗμεÏομηνία δημιουÏγίας:
+document_properties_modification_date=ΗμεÏομηνία Ï„Ïοποποίησης:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=ΔημιουÏγός:
+document_properties_producer=ΠαÏαγωγός PDF:
+document_properties_version=Έκδοση PDF:
+document_properties_page_count=ΑÏιθμός σελίδων:
+document_properties_page_size=Μέγεθος σελίδας:
+document_properties_page_size_unit_inches=ίντσες
+document_properties_page_size_unit_millimeters=χιλιοστά
+document_properties_page_size_orientation_portrait=κατακόÏυφα
+document_properties_page_size_orientation_landscape=οÏιζόντια
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Επιστολή
+document_properties_page_size_name_legal=ΤÏπου Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Ταχεία Ï€Ïοβολή ιστοÏ:
+document_properties_linearized_yes=Îαι
+document_properties_linearized_no=Όχι
+document_properties_close=Κλείσιμο
+
+print_progress_message=ΠÏοετοιμασία του εγγÏάφου για εκτÏπωση…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=ΆκυÏο
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=(Απ)ενεÏγοποίηση πλευÏικής στήλης
+toggle_sidebar_notification.title=(Απ)ενεÏγοποίηση πλευÏικής στήλης (το έγγÏαφο πεÏιέχει πεÏίγÏαμμα/συνημμένα)
+toggle_sidebar_label=(Απ)ενεÏγοποίηση πλευÏικής στήλης
+document_outline.title=Εμφάνιση διάÏθÏωσης εγγÏάφου (διπλό κλικ για ανάπτυξη/σÏμπτυξη όλων των στοιχείων)
+document_outline_label=ΔιάÏθÏωση εγγÏάφου
+attachments.title=ΠÏοβολή συνημμένων
+attachments_label=Συνημμένα
+thumbs.title=ΠÏοβολή μικÏογÏαφιών
+thumbs_label=ΜικÏογÏαφίες
+findbar.title=ΕÏÏεση στο έγγÏαφο
+findbar_label=ΕÏÏεση
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Σελίδα {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=ΜικÏογÏαφία της σελίδας {{page}}
+
+# Find panel button title and messages
+find_input.title=ΕÏÏεση
+find_input.placeholder=ΕÏÏεση στο έγγÏαφο…
+find_previous.title=ΕÏÏεση της Ï€ÏοηγοÏμενης εμφάνισης της φÏάσης
+find_previous_label=ΠÏοηγοÏμενο
+find_next.title=ΕÏÏεση της επόμενης εμφάνισης της φÏάσης
+find_next_label=Επόμενο
+find_highlight=Επισήμανση όλων
+find_match_case_label=ΤαίÏιασμα χαÏακτήÏα
+find_entire_word_label=ΟλόκληÏες λέξεις
+find_reached_top=Έλευση στην αÏχή του εγγÏάφου, συνέχεια από το τέλος
+find_reached_bottom=Έλευση στο τέλος του εγγÏάφου, συνέχεια από την αÏχή
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} από {{total}} αντιστοιχία
+find_match_count[two]={{current}} από {{total}} αντιστοιχίες
+find_match_count[few]={{current}} από {{total}} αντιστοιχίες
+find_match_count[many]={{current}} από {{total}} αντιστοιχίες
+find_match_count[other]={{current}} από {{total}} αντιστοιχίες
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=ΠεÏισσότεÏες από {{limit}} αντιστοιχίες
+find_match_count_limit[one]=ΠεÏισσότεÏες από {{limit}} αντιστοιχία
+find_match_count_limit[two]=ΠεÏισσότεÏες από {{limit}} αντιστοιχίες
+find_match_count_limit[few]=ΠεÏισσότεÏες από {{limit}} αντιστοιχίες
+find_match_count_limit[many]=ΠεÏισσότεÏες από {{limit}} αντιστοιχίες
+find_match_count_limit[other]=ΠεÏισσότεÏες από {{limit}} αντιστοιχίες
+find_not_found=Η φÏάση δεν βÏέθηκε
+
+# Error panel labels
+error_more_info=ΠεÏισσότεÏες πληÏοφοÏίες
+error_less_info=ΛιγότεÏες πληÏοφοÏίες
+error_close=Κλείσιμο
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Μήνυμα: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Στοίβα: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=ΑÏχείο: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=ΓÏαμμή: {{line}}
+rendering_error=ΠÏοέκυψε σφάλμα κατά την ανάλυση της σελίδας.
+
+# Predefined zoom values
+page_scale_width=Πλάτος σελίδας
+page_scale_fit=Μέγεθος σελίδας
+page_scale_auto=Αυτόματο ζουμ
+page_scale_actual=ΠÏαγματικό μέγεθος
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Σφάλμα
+loading_error=ΠÏοέκυψε ένα σφάλμα κατά τη φόÏτωση του PDF.
+invalid_file_error=Μη έγκυÏο ή κατεστÏαμμένο αÏχείο PDF.
+missing_file_error=Λείπει αÏχείο PDF.
+unexpected_response_error=Μη αναμενόμενη απόκÏιση από το διακομιστή.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Σχόλιο]
+password_label=Εισαγωγή ÎºÏ‰Î´Î¹ÎºÎ¿Ï Î³Î¹Î± το άνοιγμα του PDF αÏχείου.
+password_invalid=Μη έγκυÏος κωδικός. ΠÏοσπαθείστε ξανά.
+password_ok=ΟΚ
+password_cancel=ΑκÏÏωση
+
+printing_not_supported=ΠÏοειδοποίηση: Η εκτÏπωση δεν υποστηÏίζεται πλήÏως από αυτόν τον πεÏιηγητή.
+printing_not_ready=ΠÏοειδοποίηση: Το PDF δεν φοÏτώθηκε πλήÏως για εκτÏπωση.
+web_fonts_disabled=Οι γÏαμματοσειÏές Web απενεÏγοποιημένες: αδυναμία χÏήσης των ενσωματωμένων γÏαμματοσειÏών PDF.
+document_colors_not_allowed=Στα PDF έγγÏαφα δεν επιτÏέπεται να χÏησιμοποιοÏν τα δικά τους χÏώματα: Το “Îα επιτÏέπεται στις σελίδες να επιλέγουν τα δικά τους χÏώματα†είναι απενεÏγοποιημένο στον πεÏιηγητή.
diff --git a/js/pdfjs/web/locale/en-CA/viewer.properties b/js/pdfjs/web/locale/en-CA/viewer.properties
new file mode 100644
index 0000000..df7a687
--- /dev/null
+++ b/js/pdfjs/web/locale/en-CA/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Previous Page
+previous_label=Previous
+next.title=Next Page
+next_label=Next
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Page
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=of {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} of {{pagesCount}})
+
+zoom_out.title=Zoom Out
+zoom_out_label=Zoom Out
+zoom_in.title=Zoom In
+zoom_in_label=Zoom In
+zoom.title=Zoom
+presentation_mode.title=Switch to Presentation Mode
+presentation_mode_label=Presentation Mode
+open_file.title=Open File
+open_file_label=Open
+print.title=Print
+print_label=Print
+download.title=Download
+download_label=Download
+bookmark.title=Current view (copy or open in new window)
+bookmark_label=Current View
+
+# Secondary toolbar and context menu
+tools.title=Tools
+tools_label=Tools
+first_page.title=Go to First Page
+first_page.label=Go to First Page
+first_page_label=Go to First Page
+last_page.title=Go to Last Page
+last_page.label=Go to Last Page
+last_page_label=Go to Last Page
+page_rotate_cw.title=Rotate Clockwise
+page_rotate_cw.label=Rotate Clockwise
+page_rotate_cw_label=Rotate Clockwise
+page_rotate_ccw.title=Rotate Anti-Clockwise
+page_rotate_ccw.label=Rotate Anti-Clockwise
+page_rotate_ccw_label=Rotate Anti-Clockwise
+
+cursor_text_select_tool.title=Enable Text Selection Tool
+cursor_text_select_tool_label=Text Selection Tool
+cursor_hand_tool.title=Enable Hand Tool
+cursor_hand_tool_label=Hand Tool
+
+scroll_vertical.title=Use Vertical Scrolling
+scroll_vertical_label=Vertical Scrolling
+scroll_horizontal.title=Use Horizontal Scrolling
+scroll_horizontal_label=Horizontal Scrolling
+scroll_wrapped.title=Use Wrapped Scrolling
+scroll_wrapped_label=Wrapped Scrolling
+
+spread_none.title=Do not join page spreads
+spread_none_label=No Spreads
+spread_odd.title=Join page spreads starting with odd-numbered pages
+spread_odd_label=Odd Spreads
+spread_even.title=Join page spreads starting with even-numbered pages
+spread_even_label=Even Spreads
+
+# Document properties dialog box
+document_properties.title=Document Properties…
+document_properties_label=Document Properties…
+document_properties_file_name=File name:
+document_properties_file_size=File size:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} kB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Title:
+document_properties_author=Author:
+document_properties_subject=Subject:
+document_properties_keywords=Keywords:
+document_properties_creation_date=Creation Date:
+document_properties_modification_date=Modification Date:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Creator:
+document_properties_producer=PDF Producer:
+document_properties_version=PDF Version:
+document_properties_page_count=Page Count:
+document_properties_page_size=Page Size:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=portrait
+document_properties_page_size_orientation_landscape=landscape
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Fast Web View:
+document_properties_linearized_yes=Yes
+document_properties_linearized_no=No
+document_properties_close=Close
+
+print_progress_message=Preparing document for printing…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Cancel
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Toggle Sidebar
+toggle_sidebar_notification.title=Toggle Sidebar (document contains outline/attachments)
+toggle_sidebar_label=Toggle Sidebar
+document_outline.title=Show Document Outline (double-click to expand/collapse all items)
+document_outline_label=Document Outline
+attachments.title=Show Attachments
+attachments_label=Attachments
+thumbs.title=Show Thumbnails
+thumbs_label=Thumbnails
+findbar.title=Find in Document
+findbar_label=Find
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Page {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Page {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Thumbnail of Page {{page}}
+
+# Find panel button title and messages
+find_input.title=Find
+find_input.placeholder=Find in document…
+find_previous.title=Find the previous occurrence of the phrase
+find_previous_label=Previous
+find_next.title=Find the next occurrence of the phrase
+find_next_label=Next
+find_highlight=Highlight all
+find_match_case_label=Match case
+find_entire_word_label=Whole words
+find_reached_top=Reached top of document, continued from bottom
+find_reached_bottom=Reached end of document, continued from top
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} of {{total}} match
+find_match_count[two]={{current}} of {{total}} matches
+find_match_count[few]={{current}} of {{total}} matches
+find_match_count[many]={{current}} of {{total}} matches
+find_match_count[other]={{current}} of {{total}} matches
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=More than {{limit}} matches
+find_match_count_limit[one]=More than {{limit}} match
+find_match_count_limit[two]=More than {{limit}} matches
+find_match_count_limit[few]=More than {{limit}} matches
+find_match_count_limit[many]=More than {{limit}} matches
+find_match_count_limit[other]=More than {{limit}} matches
+find_not_found=Phrase not found
+
+# Error panel labels
+error_more_info=More Information
+error_less_info=Less Information
+error_close=Close
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Message: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stack: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=File: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Line: {{line}}
+rendering_error=An error occurred while rendering the page.
+
+# Predefined zoom values
+page_scale_width=Page Width
+page_scale_fit=Page Fit
+page_scale_auto=Automatic Zoom
+page_scale_actual=Actual Size
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Error
+loading_error=An error occurred while loading the PDF.
+invalid_file_error=Invalid or corrupted PDF file.
+missing_file_error=Missing PDF file.
+unexpected_response_error=Unexpected server response.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Annotation]
+password_label=Enter the password to open this PDF file.
+password_invalid=Invalid password. Please try again.
+password_ok=OK
+password_cancel=Cancel
+
+printing_not_supported=Warning: Printing is not fully supported by this browser.
+printing_not_ready=Warning: The PDF is not fully loaded for printing.
+web_fonts_disabled=Web fonts are disabled: unable to use embedded PDF fonts.
+document_colors_not_allowed=PDF documents are not allowed to use their own colours: “Allow pages to choose their own colours†is deactivated in the browser.
diff --git a/js/pdfjs/web/locale/en-GB/viewer.properties b/js/pdfjs/web/locale/en-GB/viewer.properties
new file mode 100644
index 0000000..df7a687
--- /dev/null
+++ b/js/pdfjs/web/locale/en-GB/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Previous Page
+previous_label=Previous
+next.title=Next Page
+next_label=Next
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Page
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=of {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} of {{pagesCount}})
+
+zoom_out.title=Zoom Out
+zoom_out_label=Zoom Out
+zoom_in.title=Zoom In
+zoom_in_label=Zoom In
+zoom.title=Zoom
+presentation_mode.title=Switch to Presentation Mode
+presentation_mode_label=Presentation Mode
+open_file.title=Open File
+open_file_label=Open
+print.title=Print
+print_label=Print
+download.title=Download
+download_label=Download
+bookmark.title=Current view (copy or open in new window)
+bookmark_label=Current View
+
+# Secondary toolbar and context menu
+tools.title=Tools
+tools_label=Tools
+first_page.title=Go to First Page
+first_page.label=Go to First Page
+first_page_label=Go to First Page
+last_page.title=Go to Last Page
+last_page.label=Go to Last Page
+last_page_label=Go to Last Page
+page_rotate_cw.title=Rotate Clockwise
+page_rotate_cw.label=Rotate Clockwise
+page_rotate_cw_label=Rotate Clockwise
+page_rotate_ccw.title=Rotate Anti-Clockwise
+page_rotate_ccw.label=Rotate Anti-Clockwise
+page_rotate_ccw_label=Rotate Anti-Clockwise
+
+cursor_text_select_tool.title=Enable Text Selection Tool
+cursor_text_select_tool_label=Text Selection Tool
+cursor_hand_tool.title=Enable Hand Tool
+cursor_hand_tool_label=Hand Tool
+
+scroll_vertical.title=Use Vertical Scrolling
+scroll_vertical_label=Vertical Scrolling
+scroll_horizontal.title=Use Horizontal Scrolling
+scroll_horizontal_label=Horizontal Scrolling
+scroll_wrapped.title=Use Wrapped Scrolling
+scroll_wrapped_label=Wrapped Scrolling
+
+spread_none.title=Do not join page spreads
+spread_none_label=No Spreads
+spread_odd.title=Join page spreads starting with odd-numbered pages
+spread_odd_label=Odd Spreads
+spread_even.title=Join page spreads starting with even-numbered pages
+spread_even_label=Even Spreads
+
+# Document properties dialog box
+document_properties.title=Document Properties…
+document_properties_label=Document Properties…
+document_properties_file_name=File name:
+document_properties_file_size=File size:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} kB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Title:
+document_properties_author=Author:
+document_properties_subject=Subject:
+document_properties_keywords=Keywords:
+document_properties_creation_date=Creation Date:
+document_properties_modification_date=Modification Date:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Creator:
+document_properties_producer=PDF Producer:
+document_properties_version=PDF Version:
+document_properties_page_count=Page Count:
+document_properties_page_size=Page Size:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=portrait
+document_properties_page_size_orientation_landscape=landscape
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Fast Web View:
+document_properties_linearized_yes=Yes
+document_properties_linearized_no=No
+document_properties_close=Close
+
+print_progress_message=Preparing document for printing…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Cancel
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Toggle Sidebar
+toggle_sidebar_notification.title=Toggle Sidebar (document contains outline/attachments)
+toggle_sidebar_label=Toggle Sidebar
+document_outline.title=Show Document Outline (double-click to expand/collapse all items)
+document_outline_label=Document Outline
+attachments.title=Show Attachments
+attachments_label=Attachments
+thumbs.title=Show Thumbnails
+thumbs_label=Thumbnails
+findbar.title=Find in Document
+findbar_label=Find
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Page {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Page {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Thumbnail of Page {{page}}
+
+# Find panel button title and messages
+find_input.title=Find
+find_input.placeholder=Find in document…
+find_previous.title=Find the previous occurrence of the phrase
+find_previous_label=Previous
+find_next.title=Find the next occurrence of the phrase
+find_next_label=Next
+find_highlight=Highlight all
+find_match_case_label=Match case
+find_entire_word_label=Whole words
+find_reached_top=Reached top of document, continued from bottom
+find_reached_bottom=Reached end of document, continued from top
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} of {{total}} match
+find_match_count[two]={{current}} of {{total}} matches
+find_match_count[few]={{current}} of {{total}} matches
+find_match_count[many]={{current}} of {{total}} matches
+find_match_count[other]={{current}} of {{total}} matches
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=More than {{limit}} matches
+find_match_count_limit[one]=More than {{limit}} match
+find_match_count_limit[two]=More than {{limit}} matches
+find_match_count_limit[few]=More than {{limit}} matches
+find_match_count_limit[many]=More than {{limit}} matches
+find_match_count_limit[other]=More than {{limit}} matches
+find_not_found=Phrase not found
+
+# Error panel labels
+error_more_info=More Information
+error_less_info=Less Information
+error_close=Close
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Message: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stack: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=File: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Line: {{line}}
+rendering_error=An error occurred while rendering the page.
+
+# Predefined zoom values
+page_scale_width=Page Width
+page_scale_fit=Page Fit
+page_scale_auto=Automatic Zoom
+page_scale_actual=Actual Size
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Error
+loading_error=An error occurred while loading the PDF.
+invalid_file_error=Invalid or corrupted PDF file.
+missing_file_error=Missing PDF file.
+unexpected_response_error=Unexpected server response.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Annotation]
+password_label=Enter the password to open this PDF file.
+password_invalid=Invalid password. Please try again.
+password_ok=OK
+password_cancel=Cancel
+
+printing_not_supported=Warning: Printing is not fully supported by this browser.
+printing_not_ready=Warning: The PDF is not fully loaded for printing.
+web_fonts_disabled=Web fonts are disabled: unable to use embedded PDF fonts.
+document_colors_not_allowed=PDF documents are not allowed to use their own colours: “Allow pages to choose their own colours†is deactivated in the browser.
diff --git a/js/pdfjs/web/locale/en-US/viewer.properties b/js/pdfjs/web/locale/en-US/viewer.properties
new file mode 100644
index 0000000..6f7598e
--- /dev/null
+++ b/js/pdfjs/web/locale/en-US/viewer.properties
@@ -0,0 +1,247 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Previous Page
+previous_label=Previous
+next.title=Next Page
+next_label=Next
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Page
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=of {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} of {{pagesCount}})
+
+zoom_out.title=Zoom Out
+zoom_out_label=Zoom Out
+zoom_in.title=Zoom In
+zoom_in_label=Zoom In
+zoom.title=Zoom
+presentation_mode.title=Switch to Presentation Mode
+presentation_mode_label=Presentation Mode
+open_file.title=Open File
+open_file_label=Open
+print.title=Print
+print_label=Print
+download.title=Download
+download_label=Download
+bookmark.title=Current view (copy or open in new window)
+bookmark_label=Current View
+
+# Secondary toolbar and context menu
+tools.title=Tools
+tools_label=Tools
+first_page.title=Go to First Page
+first_page.label=Go to First Page
+first_page_label=Go to First Page
+last_page.title=Go to Last Page
+last_page.label=Go to Last Page
+last_page_label=Go to Last Page
+page_rotate_cw.title=Rotate Clockwise
+page_rotate_cw.label=Rotate Clockwise
+page_rotate_cw_label=Rotate Clockwise
+page_rotate_ccw.title=Rotate Counterclockwise
+page_rotate_ccw.label=Rotate Counterclockwise
+page_rotate_ccw_label=Rotate Counterclockwise
+
+cursor_text_select_tool.title=Enable Text Selection Tool
+cursor_text_select_tool_label=Text Selection Tool
+cursor_hand_tool.title=Enable Hand Tool
+cursor_hand_tool_label=Hand Tool
+
+scroll_vertical.title=Use Vertical Scrolling
+scroll_vertical_label=Vertical Scrolling
+scroll_horizontal.title=Use Horizontal Scrolling
+scroll_horizontal_label=Horizontal Scrolling
+scroll_wrapped.title=Use Wrapped Scrolling
+scroll_wrapped_label=Wrapped Scrolling
+
+spread_none.title=Do not join page spreads
+spread_none_label=No Spreads
+spread_odd.title=Join page spreads starting with odd-numbered pages
+spread_odd_label=Odd Spreads
+spread_even.title=Join page spreads starting with even-numbered pages
+spread_even_label=Even Spreads
+
+# Document properties dialog box
+document_properties.title=Document Properties…
+document_properties_label=Document Properties…
+document_properties_file_name=File name:
+document_properties_file_size=File size:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Title:
+document_properties_author=Author:
+document_properties_subject=Subject:
+document_properties_keywords=Keywords:
+document_properties_creation_date=Creation Date:
+document_properties_modification_date=Modification Date:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Creator:
+document_properties_producer=PDF Producer:
+document_properties_version=PDF Version:
+document_properties_page_count=Page Count:
+document_properties_page_size=Page Size:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=portrait
+document_properties_page_size_orientation_landscape=landscape
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Fast Web View:
+document_properties_linearized_yes=Yes
+document_properties_linearized_no=No
+document_properties_close=Close
+
+print_progress_message=Preparing document for printing…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Cancel
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Toggle Sidebar
+toggle_sidebar_notification.title=Toggle Sidebar (document contains outline/attachments)
+toggle_sidebar_label=Toggle Sidebar
+document_outline.title=Show Document Outline (double-click to expand/collapse all items)
+document_outline_label=Document Outline
+attachments.title=Show Attachments
+attachments_label=Attachments
+thumbs.title=Show Thumbnails
+thumbs_label=Thumbnails
+findbar.title=Find in Document
+findbar_label=Find
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Page {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Page {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Thumbnail of Page {{page}}
+
+# Find panel button title and messages
+find_input.title=Find
+find_input.placeholder=Find in document…
+find_previous.title=Find the previous occurrence of the phrase
+find_previous_label=Previous
+find_next.title=Find the next occurrence of the phrase
+find_next_label=Next
+find_highlight=Highlight all
+find_match_case_label=Match case
+find_entire_word_label=Whole words
+find_reached_top=Reached top of document, continued from bottom
+find_reached_bottom=Reached end of document, continued from top
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} of {{total}} match
+find_match_count[two]={{current}} of {{total}} matches
+find_match_count[few]={{current}} of {{total}} matches
+find_match_count[many]={{current}} of {{total}} matches
+find_match_count[other]={{current}} of {{total}} matches
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=More than {{limit}} matches
+find_match_count_limit[one]=More than {{limit}} match
+find_match_count_limit[two]=More than {{limit}} matches
+find_match_count_limit[few]=More than {{limit}} matches
+find_match_count_limit[many]=More than {{limit}} matches
+find_match_count_limit[other]=More than {{limit}} matches
+find_not_found=Phrase not found
+
+# Error panel labels
+error_more_info=More Information
+error_less_info=Less Information
+error_close=Close
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Message: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stack: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=File: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Line: {{line}}
+rendering_error=An error occurred while rendering the page.
+
+# Predefined zoom values
+page_scale_width=Page Width
+page_scale_fit=Page Fit
+page_scale_auto=Automatic Zoom
+page_scale_actual=Actual Size
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Error
+loading_error=An error occurred while loading the PDF.
+invalid_file_error=Invalid or corrupted PDF file.
+missing_file_error=Missing PDF file.
+unexpected_response_error=Unexpected server response.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Annotation]
+password_label=Enter the password to open this PDF file.
+password_invalid=Invalid password. Please try again.
+password_ok=OK
+password_cancel=Cancel
+
+printing_not_supported=Warning: Printing is not fully supported by this browser.
+printing_not_ready=Warning: The PDF is not fully loaded for printing.
+web_fonts_disabled=Web fonts are disabled: unable to use embedded PDF fonts.
diff --git a/js/pdfjs/web/locale/eo/viewer.properties b/js/pdfjs/web/locale/eo/viewer.properties
new file mode 100644
index 0000000..bca7c45
--- /dev/null
+++ b/js/pdfjs/web/locale/eo/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=AntaÅ­a paÄo
+previous_label=MalantaÅ­en
+next.title=Venonta paÄo
+next_label=AntaÅ­en
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=PaÄo
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=el {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} el {{pagesCount}})
+
+zoom_out.title=Malpligrandigi
+zoom_out_label=Malpligrandigi
+zoom_in.title=Pligrandigi
+zoom_in_label=Pligrandigi
+zoom.title=Pligrandigilo
+presentation_mode.title=Iri al prezenta reÄimo
+presentation_mode_label=Prezenta reÄimo
+open_file.title=Malfermi dosieron
+open_file_label=Malfermi
+print.title=Presi
+print_label=Presi
+download.title=ElÅuti
+download_label=ElÅuti
+bookmark.title=Nuna vido (kopii aÅ­ malfermi en nova fenestro)
+bookmark_label=Nuna vido
+
+# Secondary toolbar and context menu
+tools.title=Iloj
+tools_label=Iloj
+first_page.title=Iri al la unua paÄo
+first_page.label=Iri al la unua paÄo
+first_page_label=Iri al la unua paÄo
+last_page.title=Iri al la lasta paÄo
+last_page.label=Iri al la lasta paÄo
+last_page_label=Iri al la lasta paÄo
+page_rotate_cw.title=Rotaciigi dekstrume
+page_rotate_cw.label=Rotaciigi dekstrume
+page_rotate_cw_label=Rotaciigi dekstrume
+page_rotate_ccw.title=Rotaciigi maldekstrume
+page_rotate_ccw.label=Rotaciigi maldekstrume
+page_rotate_ccw_label=Rotaciigi maldekstrume
+
+cursor_text_select_tool.title=Aktivigi tekstan elektilon
+cursor_text_select_tool_label=Teksta elektilo
+cursor_hand_tool.title=Aktivigi ilon de mano
+cursor_hand_tool_label=Ilo de mano
+
+scroll_vertical.title=Uzi vertikalan Åovadon
+scroll_vertical_label=Vertikala Åovado
+scroll_horizontal.title=Uzi horizontalan Åovadon
+scroll_horizontal_label=Horizontala Åovado
+scroll_wrapped.title=Uzi ambaÅ­direktan Åovadon
+scroll_wrapped_label=AmbaÅ­direkta Åovado
+
+spread_none.title=Ne montri paÄojn po du
+spread_none_label=UnupaÄa vido
+spread_odd.title=Kunigi paÄojn komencante per nepara paÄo
+spread_odd_label=Po du paÄoj, neparaj maldekstre
+spread_even.title=Kunigi paÄojn komencante per para paÄo
+spread_even_label=Po du paÄoj, paraj maldekstre
+
+# Document properties dialog box
+document_properties.title=Atributoj de dokumento…
+document_properties_label=Atributoj de dokumento…
+document_properties_file_name=Nomo de dosiero:
+document_properties_file_size=Grando de dosiero:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KO ({{size_b}} oktetoj)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MO ({{size_b}} oktetoj)
+document_properties_title=Titolo:
+document_properties_author=AÅ­toro:
+document_properties_subject=Temo:
+document_properties_keywords=Åœlosilvorto:
+document_properties_creation_date=Dato de kreado:
+document_properties_modification_date=Dato de modifo:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Kreinto:
+document_properties_producer=Produktinto de PDF:
+document_properties_version=Versio de PDF:
+document_properties_page_count=Nombro de paÄoj:
+document_properties_page_size=Grando de paÄo:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=vertikala
+document_properties_page_size_orientation_landscape=horizontala
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letera
+document_properties_page_size_name_legal=Jura
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Rapida tekstaĵa vido:
+document_properties_linearized_yes=Jes
+document_properties_linearized_no=Ne
+document_properties_close=Fermi
+
+print_progress_message=Preparo de dokumento por presi Äin …
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Nuligi
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Montri/kaÅi flankan strion
+toggle_sidebar_notification.title=Montri/kaÅi flankan strion (la dokumento enhavas konturon/aneksaĵojn)
+toggle_sidebar_label=Montri/kaÅi flankan strion
+document_outline.title=Montri la konturon de dokumento (alklaku duoble por faldi/malfaldi ĉiujn elementojn)
+document_outline_label=Konturo de dokumento
+attachments.title=Montri kunsendaĵojn
+attachments_label=Kunsendaĵojn
+thumbs.title=Montri miniaturojn
+thumbs_label=Miniaturoj
+findbar.title=Serĉi en dokumento
+findbar_label=Serĉi
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=PaÄo {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=PaÄo {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniaturo de paÄo {{page}}
+
+# Find panel button title and messages
+find_input.title=Serĉi
+find_input.placeholder=Serĉi en dokumento…
+find_previous.title=Serĉi la antaŭan aperon de la frazo
+find_previous_label=MalantaÅ­en
+find_next.title=Serĉi la venontan aperon de la frazo
+find_next_label=AntaÅ­en
+find_highlight=Elstarigi ĉiujn
+find_match_case_label=Distingi inter majuskloj kaj minuskloj
+find_entire_word_label=Tutaj vortoj
+find_reached_top=Komenco de la dokumento atingita, daÅ­rigado ekde la fino
+find_reached_bottom=Fino de la dokumento atingita, daÅ­rigado ekde la komenco
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} el {{total}} kongruo
+find_match_count[two]={{current}} el {{total}} kongruoj
+find_match_count[few]={{current}} el {{total}} kongruoj
+find_match_count[many]={{current}} el {{total}} kongruoj
+find_match_count[other]={{current}} el {{total}} kongruoj
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Pli ol {{limit}} kongruoj
+find_match_count_limit[one]=Pli ol {{limit}} kongruo
+find_match_count_limit[two]=Pli ol {{limit}} kongruoj
+find_match_count_limit[few]=Pli ol {{limit}} kongruoj
+find_match_count_limit[many]=Pli ol {{limit}} kongruoj
+find_match_count_limit[other]=Pli ol {{limit}} kongruoj
+find_not_found=Frazo ne trovita
+
+# Error panel labels
+error_more_info=Pli da informo
+error_less_info=Malpli da informo
+error_close=Fermi
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=MesaÄo: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stako: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Dosiero: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Linio: {{line}}
+rendering_error=Okazis eraro dum la montro de la paÄo.
+
+# Predefined zoom values
+page_scale_width=LarÄo de paÄo
+page_scale_fit=Adapti paÄon
+page_scale_auto=AÅ­tomata skalo
+page_scale_actual=Reala grando
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Eraro
+loading_error=Okazis eraro dum la Åargado de la PDF dosiero.
+invalid_file_error=Nevalida aÅ­ difektita PDF dosiero.
+missing_file_error=Mankas dosiero PDF.
+unexpected_response_error=Neatendita respondo de servilo.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Prinoto: {{type}}]
+password_label=Tajpu pasvorton por malfermi tiun ĉi dosieron PDF.
+password_invalid=Nevalida pasvorto. Bonvolu provi denove.
+password_ok=Akcepti
+password_cancel=Nuligi
+
+printing_not_supported=Averto: tiu ĉi retumilo ne plene subtenas presadon.
+printing_not_ready=Averto: la PDF dosiero ne estas plene Åargita por presado.
+web_fonts_disabled=Neaktivaj teksaĵaj tiparoj: ne elbas uzi enmetitajn tiparojn de PDF.
+document_colors_not_allowed=PDF dokumentoj ne rajtas uzi siajn proprajn kolorojn: 'Permesi al paÄoj uzi siajn proprajn kolorojn' ne estas aktiva en la retumilo.
diff --git a/js/pdfjs/web/locale/es-AR/viewer.properties b/js/pdfjs/web/locale/es-AR/viewer.properties
new file mode 100644
index 0000000..1d22fba
--- /dev/null
+++ b/js/pdfjs/web/locale/es-AR/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Página anterior
+previous_label=Anterior
+next.title=Página siguiente
+next_label=Siguiente
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Página
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=de {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=( {{pageNumber}} de {{pagesCount}} )
+
+zoom_out.title=Alejar
+zoom_out_label=Alejar
+zoom_in.title=Acercar
+zoom_in_label=Acercar
+zoom.title=Zoom
+presentation_mode.title=Cambiar a modo presentación
+presentation_mode_label=Modo presentación
+open_file.title=Abrir archivo
+open_file_label=Abrir
+print.title=Imprimir
+print_label=Imprimir
+download.title=Descargar
+download_label=Descargar
+bookmark.title=Vista actual (copiar o abrir en nueva ventana)
+bookmark_label=Vista actual
+
+# Secondary toolbar and context menu
+tools.title=Herramientas
+tools_label=Herramientas
+first_page.title=Ir a primera página
+first_page.label=Ir a primera página
+first_page_label=Ir a primera página
+last_page.title=Ir a última página
+last_page.label=Ir a última página
+last_page_label=Ir a última página
+page_rotate_cw.title=Rotar horario
+page_rotate_cw.label=Rotar horario
+page_rotate_cw_label=Rotar horario
+page_rotate_ccw.title=Rotar antihorario
+page_rotate_ccw.label=Rotar antihorario
+page_rotate_ccw_label=Rotar antihorario
+
+cursor_text_select_tool.title=Habilitar herramienta de selección de texto
+cursor_text_select_tool_label=Herramienta de selección de texto
+cursor_hand_tool.title=Habilitar herramienta mano
+cursor_hand_tool_label=Herramienta mano
+
+scroll_vertical.title=Usar desplazamiento vertical
+scroll_vertical_label=Desplazamiento vertical
+scroll_horizontal.title=Usar desplazamiento vertical
+scroll_horizontal_label=Desplazamiento horizontal
+scroll_wrapped.title=Usar desplazamiento encapsulado
+scroll_wrapped_label=Desplazamiento encapsulado
+
+spread_none.title=No unir páginas dobles
+spread_none_label=Sin dobles
+spread_odd.title=Unir páginas dobles comenzando con las impares
+spread_odd_label=Dobles impares
+spread_even.title=Unir páginas dobles comenzando con las pares
+spread_even_label=Dobles pares
+
+# Document properties dialog box
+document_properties.title=Propiedades del documento…
+document_properties_label=Propiedades del documento…
+document_properties_file_name=Nombre de archivo:
+document_properties_file_size=Tamaño de archovo:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Título:
+document_properties_author=Autor:
+document_properties_subject=Asunto:
+document_properties_keywords=Palabras clave:
+document_properties_creation_date=Fecha de creación:
+document_properties_modification_date=Fecha de modificación:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Creador:
+document_properties_producer=PDF Productor:
+document_properties_version=Versión de PDF:
+document_properties_page_count=Cantidad de páginas:
+document_properties_page_size=Tamaño de página:
+document_properties_page_size_unit_inches=en
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=normal
+document_properties_page_size_orientation_landscape=apaisado
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Carta
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Vista rápida de la Web:
+document_properties_linearized_yes=Sí
+document_properties_linearized_no=No
+document_properties_close=Cerrar
+
+print_progress_message=Preparando documento para imprimir…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Cancelar
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Alternar barra lateral
+toggle_sidebar_notification.title=Intercambiar barra lateral (el documento contiene esquema/adjuntos)
+toggle_sidebar_label=Alternar barra lateral
+document_outline.title=Mostrar esquema del documento (doble clic para expandir/colapsar todos los ítems)
+document_outline_label=Esquema del documento
+attachments.title=Mostrar adjuntos
+attachments_label=Adjuntos
+thumbs.title=Mostrar miniaturas
+thumbs_label=Miniaturas
+findbar.title=Buscar en documento
+findbar_label=Buscar
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Página {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Página {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniatura de página {{page}}
+
+# Find panel button title and messages
+find_input.title=Buscar
+find_input.placeholder=Buscar en documento…
+find_previous.title=Buscar la aparición anterior de la frase
+find_previous_label=Anterior
+find_next.title=Buscar la siguiente aparición de la frase
+find_next_label=Siguiente
+find_highlight=Resaltar todo
+find_match_case_label=Coincidir mayúsculas
+find_entire_word_label=Palabras completas
+find_reached_top=Inicio de documento alcanzado, continuando desde abajo
+find_reached_bottom=Fin de documento alcanzando, continuando desde arriba
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} de {{total}} coincidencias
+find_match_count[two]={{current}} de {{total}} coincidencias
+find_match_count[few]={{current}} de {{total}} coincidencias
+find_match_count[many]={{current}} de {{total}} coincidencias
+find_match_count[other]={{current}} de {{total}} coincidencias
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Más de {{limit}} coincidencias
+find_match_count_limit[one]=Más de {{limit}} coinciden
+find_match_count_limit[two]=Más de {{limit}} coincidencias
+find_match_count_limit[few]=Más de {{limit}} coincidencias
+find_match_count_limit[many]=Más de {{limit}} coincidencias
+find_match_count_limit[other]=Más de {{limit}} coincidencias
+find_not_found=Frase no encontrada
+
+# Error panel labels
+error_more_info=Más información
+error_less_info=Menos información
+error_close=Cerrar
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Mensaje: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Pila: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Archivo: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Línea: {{line}}
+rendering_error=Ocurrió un error al dibujar la página.
+
+# Predefined zoom values
+page_scale_width=Ancho de página
+page_scale_fit=Ajustar página
+page_scale_auto=Zoom automático
+page_scale_actual=Tamaño real
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Error
+loading_error=Ocurrió un error al cargar el PDF.
+invalid_file_error=Archivo PDF no válido o cocrrupto.
+missing_file_error=Archivo PDF faltante.
+unexpected_response_error=Respuesta del servidor inesperada.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Anotación]
+password_label=Ingrese la contraseña para abrir este archivo PDF
+password_invalid=Contraseña inválida. Intente nuevamente.
+password_ok=Aceptar
+password_cancel=Cancelar
+
+printing_not_supported=Advertencia: La impresión no está totalmente soportada por este navegador.
+printing_not_ready=Advertencia: El PDF no está completamente cargado para impresión.
+web_fonts_disabled=Tipografía web deshabilitada: no se pueden usar tipos incrustados en PDF.
+document_colors_not_allowed=Los documentos PDF no tienen permitido usar sus propios colores: 'Permitir a las páginas elegir sus propios colores' está desactivado en el navegador.
diff --git a/js/pdfjs/web/locale/es-CL/viewer.properties b/js/pdfjs/web/locale/es-CL/viewer.properties
new file mode 100644
index 0000000..f7f621f
--- /dev/null
+++ b/js/pdfjs/web/locale/es-CL/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Página anterior
+previous_label=Anterior
+next.title=Página siguiente
+next_label=Siguiente
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Página
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=de {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} de {{pagesCount}})
+
+zoom_out.title=Alejar
+zoom_out_label=Alejar
+zoom_in.title=Acercar
+zoom_in_label=Acercar
+zoom.title=Ampliación
+presentation_mode.title=Cambiar al modo de presentación
+presentation_mode_label=Modo de presentación
+open_file.title=Abrir archivo
+open_file_label=Abrir
+print.title=Imprimir
+print_label=Imprimir
+download.title=Descargar
+download_label=Descargar
+bookmark.title=Vista actual (copiar o abrir en nueva ventana)
+bookmark_label=Vista actual
+
+# Secondary toolbar and context menu
+tools.title=Herramientas
+tools_label=Herramientas
+first_page.title=Ir a la primera página
+first_page.label=Ir a la primera página
+first_page_label=Ir a la primera página
+last_page.title=Ir a la última página
+last_page.label=Ir a la última página
+last_page_label=Ir a la última página
+page_rotate_cw.title=Girar a la derecha
+page_rotate_cw.label=Girar a la derecha
+page_rotate_cw_label=Girar a la derecha
+page_rotate_ccw.title=Girar a la izquierda
+page_rotate_ccw.label=Girar a la izquierda
+page_rotate_ccw_label=Girar a la izquierda
+
+cursor_text_select_tool.title=Activar la herramienta de selección de texto
+cursor_text_select_tool_label=Herramienta de selección de texto
+cursor_hand_tool.title=Activar la herramienta de mano
+cursor_hand_tool_label=Herramienta de mano
+
+scroll_vertical.title=Usar desplazamiento vertical
+scroll_vertical_label=Desplazamiento vertical
+scroll_horizontal.title=Usar desplazamiento horizontal
+scroll_horizontal_label=Desplazamiento horizontal
+scroll_wrapped.title=Usar desplazamiento en bloque
+scroll_wrapped_label=Desplazamiento en bloque
+
+spread_none.title=No juntar páginas a modo de libro
+spread_none_label=Vista de una página
+spread_odd.title=Junta las páginas partiendo con una de número impar
+spread_odd_label=Vista de libro impar
+spread_even.title=Junta las páginas partiendo con una de número par
+spread_even_label=Vista de libro par
+
+# Document properties dialog box
+document_properties.title=Propiedades del documento…
+document_properties_label=Propiedades del documento…
+document_properties_file_name=Nombre de archivo:
+document_properties_file_size=Tamaño del archivo:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Título:
+document_properties_author=Autor:
+document_properties_subject=Asunto:
+document_properties_keywords=Palabras clave:
+document_properties_creation_date=Fecha de creación:
+document_properties_modification_date=Fecha de modificación:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Creador:
+document_properties_producer=Productor del PDF:
+document_properties_version=Versión de PDF:
+document_properties_page_count=Cantidad de páginas:
+document_properties_page_size=Tamaño de la página:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=vertical
+document_properties_page_size_orientation_landscape=horizontal
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Carta
+document_properties_page_size_name_legal=Oficio
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Vista rápida en Web:
+document_properties_linearized_yes=Sí
+document_properties_linearized_no=No
+document_properties_close=Cerrar
+
+print_progress_message=Preparando documento para impresión…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Cancelar
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Barra lateral
+toggle_sidebar_notification.title=Cambiar barra lateral (índice de contenidos del documento/adjuntos)
+toggle_sidebar_label=Mostrar u ocultar la barra lateral
+document_outline.title=Mostrar esquema del documento (doble clic para expandir/contraer todos los elementos)
+document_outline_label=Esquema del documento
+attachments.title=Mostrar adjuntos
+attachments_label=Adjuntos
+thumbs.title=Mostrar miniaturas
+thumbs_label=Miniaturas
+findbar.title=Buscar en el documento
+findbar_label=Buscar
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Página {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Página {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniatura de la página {{page}}
+
+# Find panel button title and messages
+find_input.title=Encontrar
+find_input.placeholder=Encontrar en el documento…
+find_previous.title=Buscar la aparición anterior de la frase
+find_previous_label=Previo
+find_next.title=Buscar la siguiente aparición de la frase
+find_next_label=Siguiente
+find_highlight=Destacar todos
+find_match_case_label=Coincidir mayús./minús.
+find_entire_word_label=Palabras completas
+find_reached_top=Se alcanzó el inicio del documento, continuando desde el final
+find_reached_bottom=Se alcanzó el final del documento, continuando desde el inicio
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} de {{total}} coincidencia
+find_match_count[two]={{current}} de {{total}} coincidencias
+find_match_count[few]={{current}} de {{total}} coincidencias
+find_match_count[many]={{current}} de {{total}} coincidencias
+find_match_count[other]={{current}} de {{total}} coincidencias
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Más de {{limit}} coincidencias
+find_match_count_limit[one]=Más de {{limit}} coincidencia
+find_match_count_limit[two]=Más de {{limit}} coincidencias
+find_match_count_limit[few]=Más de {{limit}} coincidencias
+find_match_count_limit[many]=Más de {{limit}} coincidencias
+find_match_count_limit[other]=Más de {{limit}} coincidencias
+find_not_found=Frase no encontrada
+
+# Error panel labels
+error_more_info=Más información
+error_less_info=Menos información
+error_close=Cerrar
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (compilación: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Mensaje: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Pila: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Archivo: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Línea: {{line}}
+rendering_error=Ha ocurrido un error al renderizar la página.
+
+# Predefined zoom values
+page_scale_width=Ancho de página
+page_scale_fit=Ajuste de página
+page_scale_auto=Aumento automático
+page_scale_actual=Tamaño actual
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Error
+loading_error=Ha ocurrido un error al cargar el PDF.
+invalid_file_error=Archivo PDF inválido o corrupto.
+missing_file_error=Falta el archivo PDF.
+unexpected_response_error=Respuesta del servidor inesperada.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Anotación]
+password_label=Ingrese la contraseña para abrir este archivo PDF.
+password_invalid=Contraseña inválida. Por favor, vuelve a intentarlo.
+password_ok=Aceptar
+password_cancel=Cancelar
+
+printing_not_supported=Advertencia: Imprimir no está soportado completamente por este navegador.
+printing_not_ready=Advertencia: El PDF no está completamente cargado para ser impreso.
+web_fonts_disabled=Las tipografías web están desactivadas: imposible usar las fuentes PDF embebidas.
+document_colors_not_allowed=Los documentos PDF no tienen permitido usar sus propios colores: 'Permitir a las páginas elegir sus propios colores' está desactivado en el navegador.
diff --git a/js/pdfjs/web/locale/es-ES/viewer.properties b/js/pdfjs/web/locale/es-ES/viewer.properties
new file mode 100644
index 0000000..cef373a
--- /dev/null
+++ b/js/pdfjs/web/locale/es-ES/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Página anterior
+previous_label=Anterior
+next.title=Página siguiente
+next_label=Siguiente
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Página
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=de {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} de {{pagesCount}})
+
+zoom_out.title=Reducir
+zoom_out_label=Reducir
+zoom_in.title=Aumentar
+zoom_in_label=Aumentar
+zoom.title=Tamaño
+presentation_mode.title=Cambiar al modo presentación
+presentation_mode_label=Modo presentación
+open_file.title=Abrir archivo
+open_file_label=Abrir
+print.title=Imprimir
+print_label=Imprimir
+download.title=Descargar
+download_label=Descargar
+bookmark.title=Vista actual (copiar o abrir en una nueva ventana)
+bookmark_label=Vista actual
+
+# Secondary toolbar and context menu
+tools.title=Herramientas
+tools_label=Herramientas
+first_page.title=Ir a la primera página
+first_page.label=Ir a la primera página
+first_page_label=Ir a la primera página
+last_page.title=Ir a la última página
+last_page.label=Ir a la última página
+last_page_label=Ir a la última página
+page_rotate_cw.title=Rotar en sentido horario
+page_rotate_cw.label=Rotar en sentido horario
+page_rotate_cw_label=Rotar en sentido horario
+page_rotate_ccw.title=Rotar en sentido antihorario
+page_rotate_ccw.label=Rotar en sentido antihorario
+page_rotate_ccw_label=Rotar en sentido antihorario
+
+cursor_text_select_tool.title=Activar herramienta de selección de texto
+cursor_text_select_tool_label=Herramienta de selección de texto
+cursor_hand_tool.title=Activar herramienta de mano
+cursor_hand_tool_label=Herramienta de mano
+
+scroll_vertical.title=Usar desplazamiento vertical
+scroll_vertical_label=Desplazamiento vertical
+scroll_horizontal.title=Usar desplazamiento horizontal
+scroll_horizontal_label=Desplazamiento horizontal
+scroll_wrapped.title=Usar desplazamiento en bloque
+scroll_wrapped_label=Desplazamiento en bloque
+
+spread_none.title=No juntar páginas en vista de libro
+spread_none_label=Vista de libro
+spread_odd.title=Juntar las páginas partiendo de una con número impar
+spread_odd_label=Vista de libro impar
+spread_even.title=Juntar las páginas partiendo de una con número par
+spread_even_label=Vista de libro par
+
+# Document properties dialog box
+document_properties.title=Propiedades del documento…
+document_properties_label=Propiedades del documento…
+document_properties_file_name=Nombre de archivo:
+document_properties_file_size=Tamaño de archivo:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Título:
+document_properties_author=Autor:
+document_properties_subject=Asunto:
+document_properties_keywords=Palabras clave:
+document_properties_creation_date=Fecha de creación:
+document_properties_modification_date=Fecha de modificación:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Creador:
+document_properties_producer=Productor PDF:
+document_properties_version=Versión PDF:
+document_properties_page_count=Número de páginas:
+document_properties_page_size=Tamaño de la página:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=vertical
+document_properties_page_size_orientation_landscape=horizontal
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Carta
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Vista rápida de la web:
+document_properties_linearized_yes=Sí
+document_properties_linearized_no=No
+document_properties_close=Cerrar
+
+print_progress_message=Preparando documento para impresión…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Cancelar
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Cambiar barra lateral
+toggle_sidebar_notification.title=Alternar panel lateral (el documento contiene un esquema o adjuntos)
+toggle_sidebar_label=Cambiar barra lateral
+document_outline.title=Mostrar resumen del documento (doble clic para expandir/contraer todos los elementos)
+document_outline_label=Resumen de documento
+attachments.title=Mostrar adjuntos
+attachments_label=Adjuntos
+thumbs.title=Mostrar miniaturas
+thumbs_label=Miniaturas
+findbar.title=Buscar en el documento
+findbar_label=Buscar
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Página {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Página {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniatura de la página {{page}}
+
+# Find panel button title and messages
+find_input.title=Buscar
+find_input.placeholder=Buscar en el documento…
+find_previous.title=Encontrar la anterior aparición de la frase
+find_previous_label=Anterior
+find_next.title=Encontrar la siguiente aparición de esta frase
+find_next_label=Siguiente
+find_highlight=Resaltar todos
+find_match_case_label=Coincidencia de mayús./minús.
+find_entire_word_label=Palabras completas
+find_reached_top=Se alcanzó el inicio del documento, se continúa desde el final
+find_reached_bottom=Se alcanzó el final del documento, se continúa desde el inicio
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} de {{total}} coincidencia
+find_match_count[two]={{current}} de {{total}} coincidencias
+find_match_count[few]={{current}} de {{total}} coincidencias
+find_match_count[many]={{current}} de {{total}} coincidencias
+find_match_count[other]={{current}} de {{total}} coincidencias
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Más de {{limit}} coincidencias
+find_match_count_limit[one]=Más de {{limit}} coincidencia
+find_match_count_limit[two]=Más de {{limit}} coincidencias
+find_match_count_limit[few]=Más de {{limit}} coincidencias
+find_match_count_limit[many]=Más de {{limit}} coincidencias
+find_match_count_limit[other]=Más de {{limit}} coincidencias
+find_not_found=Frase no encontrada
+
+# Error panel labels
+error_more_info=Más información
+error_less_info=Menos información
+error_close=Cerrar
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Mensaje: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Pila: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Archivo: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Línea: {{line}}
+rendering_error=Ocurrió un error al renderizar la página.
+
+# Predefined zoom values
+page_scale_width=Anchura de la página
+page_scale_fit=Ajuste de la página
+page_scale_auto=Tamaño automático
+page_scale_actual=Tamaño real
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Error
+loading_error=Ocurrió un error al cargar el PDF.
+invalid_file_error=Fichero PDF no válido o corrupto.
+missing_file_error=No hay fichero PDF.
+unexpected_response_error=Respuesta inesperada del servidor.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Anotación {{type}}]
+password_label=Introduzca la contraseña para abrir este archivo PDF.
+password_invalid=Contraseña no válida. Vuelva a intentarlo.
+password_ok=Aceptar
+password_cancel=Cancelar
+
+printing_not_supported=Advertencia: Imprimir no está totalmente soportado por este navegador.
+printing_not_ready=Advertencia: Este PDF no se ha cargado completamente para poder imprimirse.
+web_fonts_disabled=Las tipografías web están desactivadas: es imposible usar las tipografías PDF embebidas.
+document_colors_not_allowed=Los documentos PDF no tienen permitido usar sus propios colores: 'Permitir a las páginas elegir sus propios colores' está desactivado en el navegador.
diff --git a/js/pdfjs/web/locale/es-MX/viewer.properties b/js/pdfjs/web/locale/es-MX/viewer.properties
new file mode 100644
index 0000000..88a8282
--- /dev/null
+++ b/js/pdfjs/web/locale/es-MX/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Página anterior
+previous_label=Anterior
+next.title=Página siguiente
+next_label=Siguiente
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Página
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=de {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} de {{pagesCount}})
+
+zoom_out.title=Reducir
+zoom_out_label=Reducir
+zoom_in.title=Aumentar
+zoom_in_label=Aumentar
+zoom.title=Zoom
+presentation_mode.title=Cambiar al modo presentación
+presentation_mode_label=Modo presentación
+open_file.title=Abrir archivo
+open_file_label=Abrir
+print.title=Imprimir
+print_label=Imprimir
+download.title=Descargar
+download_label=Descargar
+bookmark.title=Vista actual (copiar o abrir en una nueva ventana)
+bookmark_label=Vista actual
+
+# Secondary toolbar and context menu
+tools.title=Herramientas
+tools_label=Herramientas
+first_page.title=Ir a la primera página
+first_page.label=Ir a la primera página
+first_page_label=Ir a la primera página
+last_page.title=Ir a la última página
+last_page.label=Ir a la última página
+last_page_label=Ir a la última página
+page_rotate_cw.title=Girar a la derecha
+page_rotate_cw.label=Girar a la derecha
+page_rotate_cw_label=Girar a la derecha
+page_rotate_ccw.title=Girar a la izquierda
+page_rotate_ccw.label=Girar a la izquierda
+page_rotate_ccw_label=Girar a la izquierda
+
+cursor_text_select_tool.title=Activar la herramienta de selección de texto
+cursor_text_select_tool_label=Herramienta de selección de texto
+cursor_hand_tool.title=Activar la herramienta de mano
+cursor_hand_tool_label=Herramienta de mano
+
+scroll_vertical.title=Usar desplazamiento vertical
+scroll_vertical_label=Desplazamiento vertical
+scroll_horizontal.title=Usar desplazamiento horizontal
+scroll_horizontal_label=Desplazamiento horizontal
+scroll_wrapped.title=Usar desplazamiento encapsulado
+scroll_wrapped_label=Desplazamiento encapsulado
+
+spread_none.title=No unir páginas separadas
+spread_none_label=Vista de una página
+spread_odd.title=Unir las páginas partiendo con una de número impar
+spread_odd_label=Vista de libro impar
+spread_even.title=Juntar las páginas partiendo con una de número par
+spread_even_label=Vista de libro par
+
+# Document properties dialog box
+document_properties.title=Propiedades del documento…
+document_properties_label=Propiedades del documento…
+document_properties_file_name=Nombre del archivo:
+document_properties_file_size=Tamaño del archivo:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Título:
+document_properties_author=Autor:
+document_properties_subject=Asunto:
+document_properties_keywords=Palabras claves:
+document_properties_creation_date=Fecha de creación:
+document_properties_modification_date=Fecha de modificación:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Creador:
+document_properties_producer=Productor PDF:
+document_properties_version=Versión PDF:
+document_properties_page_count=Número de páginas:
+document_properties_page_size=Tamaño de la página:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=vertical
+document_properties_page_size_orientation_landscape=horizontal
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Carta
+document_properties_page_size_name_legal=Oficio
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Vista rápida de la web:
+document_properties_linearized_yes=Sí
+document_properties_linearized_no=No
+document_properties_close=Cerrar
+
+print_progress_message=Preparando documento para impresión…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Cancelar
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Cambiar barra lateral
+toggle_sidebar_notification.title=Cambiar barra lateral (índice de contenidos del documento/adjuntos)
+toggle_sidebar_label=Cambiar barra lateral
+document_outline.title=Mostrar esquema del documento (doble clic para expandir/contraer todos los elementos)
+document_outline_label=Esquema del documento
+attachments.title=Mostrar adjuntos
+attachments_label=Adjuntos
+thumbs.title=Mostrar miniaturas
+thumbs_label=Miniaturas
+findbar.title=Buscar en el documento
+findbar_label=Buscar
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Página {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Página {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniatura de la página {{page}}
+
+# Find panel button title and messages
+find_input.title=Buscar
+find_input.placeholder=Buscar en el documento…
+find_previous.title=Ir a la anterior frase encontrada
+find_previous_label=Anterior
+find_next.title=Ir a la siguiente frase encontrada
+find_next_label=Siguiente
+find_highlight=Resaltar todo
+find_match_case_label=Coincidir con mayúsculas y minúsculas
+find_entire_word_label=Palabras completas
+find_reached_top=Se alcanzó el inicio del documento, se buscará al final
+find_reached_bottom=Se alcanzó el final del documento, se buscará al inicio
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} de {{total}} coincidencia
+find_match_count[two]={{current}} de {{total}} coincidencias
+find_match_count[few]={{current}} de {{total}} coincidencias
+find_match_count[many]={{current}} de {{total}} coincidencias
+find_match_count[other]={{current}} de {{total}} coincidencias
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Más de {{limit}} coincidencias
+find_match_count_limit[one]=Más de {{limit}} coinciden
+find_match_count_limit[two]=Más de {{limit}} coincidencias
+find_match_count_limit[few]=Más de {{limit}} coincidencias
+find_match_count_limit[many]=Más de {{limit}} coincidencias
+find_match_count_limit[other]=Más de {{limit}} coincidencias
+find_not_found=No se encontró la frase
+
+# Error panel labels
+error_more_info=Más información
+error_less_info=Menos información
+error_close=Cerrar
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Mensaje: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Pila: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Archivo: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Línea: {{line}}
+rendering_error=Un error ocurrió al renderizar la página.
+
+# Predefined zoom values
+page_scale_width=Ancho de página
+page_scale_fit=Ajustar página
+page_scale_auto=Zoom automático
+page_scale_actual=Tamaño real
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Error
+loading_error=Un error ocurrió al cargar el PDF.
+invalid_file_error=Archivo PDF invalido o dañado.
+missing_file_error=Archivo PDF no encontrado.
+unexpected_response_error=Respuesta inesperada del servidor.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} anotación]
+password_label=Ingresa la contraseña para abrir este archivo PDF.
+password_invalid=Contraseña inválida. Por favor intenta de nuevo.
+password_ok=Aceptar
+password_cancel=Cancelar
+
+printing_not_supported=Advertencia: La impresión no esta completamente soportada por este navegador.
+printing_not_ready=Advertencia: El PDF no cargo completamente para impresión.
+web_fonts_disabled=Las fuentes web están desactivadas: es imposible usar las fuentes PDF embebidas.
+document_colors_not_allowed=Los documentos PDF no tienen permiso de usar sus propios colores: 'Permitir que las páginas elijan sus propios colores' esta desactivada en el navegador.
diff --git a/js/pdfjs/web/locale/et/viewer.properties b/js/pdfjs/web/locale/et/viewer.properties
new file mode 100644
index 0000000..11f47c1
--- /dev/null
+++ b/js/pdfjs/web/locale/et/viewer.properties
@@ -0,0 +1,246 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Eelmine lehekülg
+previous_label=Eelmine
+next.title=Järgmine lehekülg
+next_label=Järgmine
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Leht
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=/ {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}}/{{pagesCount}})
+
+zoom_out.title=Vähenda
+zoom_out_label=Vähenda
+zoom_in.title=Suurenda
+zoom_in_label=Suurenda
+zoom.title=Suurendamine
+presentation_mode.title=Lülitu esitlusrežiimi
+presentation_mode_label=Esitlusrežiim
+open_file.title=Ava fail
+open_file_label=Ava
+print.title=Prindi
+print_label=Prindi
+download.title=Laadi alla
+download_label=Laadi alla
+bookmark.title=Praegune vaade (kopeeri või ava uues aknas)
+bookmark_label=Praegune vaade
+
+# Secondary toolbar and context menu
+tools.title=Tööriistad
+tools_label=Tööriistad
+first_page.title=Mine esimesele leheküljele
+first_page.label=Mine esimesele leheküljele
+first_page_label=Mine esimesele leheküljele
+last_page.title=Mine viimasele leheküljele
+last_page.label=Mine viimasele leheküljele
+last_page_label=Mine viimasele leheküljele
+page_rotate_cw.title=Pööra päripäeva
+page_rotate_cw.label=Pööra päripäeva
+page_rotate_cw_label=Pööra päripäeva
+page_rotate_ccw.title=Pööra vastupäeva
+page_rotate_ccw.label=Pööra vastupäeva
+page_rotate_ccw_label=Pööra vastupäeva
+
+cursor_text_select_tool.title=Luba teksti valimise tööriist
+cursor_text_select_tool_label=Teksti valimise tööriist
+cursor_hand_tool.title=Luba sirvimistööriist
+cursor_hand_tool_label=Sirvimistööriist
+
+scroll_vertical.title=Kasuta vertikaalset kerimist
+scroll_vertical_label=Vertikaalne kerimine
+scroll_horizontal.title=Kasuta horisontaalset kerimist
+scroll_horizontal_label=Horisontaalne kerimine
+scroll_wrapped.title=Kasuta rohkem mahutavat kerimist
+scroll_wrapped_label=Rohkem mahutav kerimine
+
+spread_none.title=Ära kõrvuta lehekülgi
+spread_none_label=Lehtede kõrvutamine puudub
+spread_odd.title=Kõrvuta leheküljed, alustades paaritute numbritega lehekülgedega
+spread_odd_label=Kõrvutamine paaritute numbritega alustades
+spread_even.title=Kõrvuta leheküljed, alustades paarisnumbritega lehekülgedega
+spread_even_label=Kõrvutamine paarisnumbritega alustades
+
+# Document properties dialog box
+document_properties.title=Dokumendi omadused…
+document_properties_label=Dokumendi omadused…
+document_properties_file_name=Faili nimi:
+document_properties_file_size=Faili suurus:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KiB ({{size_b}} baiti)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MiB ({{size_b}} baiti)
+document_properties_title=Pealkiri:
+document_properties_author=Autor:
+document_properties_subject=Teema:
+document_properties_keywords=Märksõnad:
+document_properties_creation_date=Loodud:
+document_properties_modification_date=Muudetud:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}} {{time}}
+document_properties_creator=Looja:
+document_properties_producer=Generaator:
+document_properties_version=Generaatori versioon:
+document_properties_page_count=Lehekülgi:
+document_properties_page_size=Lehe suurus:
+document_properties_page_size_unit_inches=tolli
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=vertikaalpaigutus
+document_properties_page_size_orientation_landscape=rõhtpaigutus
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized="Fast Web View" tugi:
+document_properties_linearized_yes=Jah
+document_properties_linearized_no=Ei
+document_properties_close=Sulge
+
+print_progress_message=Dokumendi ettevalmistamine printimiseks…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Loobu
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Näita külgriba
+toggle_sidebar_notification.title=Näita külgriba (dokument sisaldab sisukorda/manuseid)
+toggle_sidebar_label=Näita külgriba
+document_outline.title=Näita sisukorda (kõigi punktide laiendamiseks/ahendamiseks topeltklõpsa)
+document_outline_label=Näita sisukorda
+attachments.title=Näita manuseid
+attachments_label=Manused
+thumbs.title=Näita pisipilte
+thumbs_label=Pisipildid
+findbar.title=Otsi dokumendist
+findbar_label=Otsi
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title={{page}}. lehekülg
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas={{page}}. lehekülje pisipilt
+
+# Find panel button title and messages
+find_input.title=Otsi
+find_input.placeholder=Otsi dokumendist…
+find_previous.title=Otsi fraasi eelmine esinemiskoht
+find_previous_label=Eelmine
+find_next.title=Otsi fraasi järgmine esinemiskoht
+find_next_label=Järgmine
+find_highlight=Too kõik esile
+find_match_case_label=Tõstutundlik
+find_entire_word_label=Täissõnad
+find_reached_top=Jõuti dokumendi algusesse, jätkati lõpust
+find_reached_bottom=Jõuti dokumendi lõppu, jätkati algusest
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]=vaste {{current}}/{{total}}
+find_match_count[two]=vaste {{current}}/{{total}}
+find_match_count[few]=vaste {{current}}/{{total}}
+find_match_count[many]=vaste {{current}}/{{total}}
+find_match_count[other]=vaste {{current}}/{{total}}
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Rohkem kui {{limit}} vastet
+find_match_count_limit[one]=Rohkem kui {{limit}} vaste
+find_match_count_limit[two]=Rohkem kui {{limit}} vastet
+find_match_count_limit[few]=Rohkem kui {{limit}} vastet
+find_match_count_limit[many]=Rohkem kui {{limit}} vastet
+find_match_count_limit[other]=Rohkem kui {{limit}} vastet
+find_not_found=Fraasi ei leitud
+
+# Error panel labels
+error_more_info=Rohkem teavet
+error_less_info=Vähem teavet
+error_close=Sulge
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Teade: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stack: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Fail: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Rida: {{line}}
+rendering_error=Lehe renderdamisel esines viga.
+
+# Predefined zoom values
+page_scale_width=Mahuta laiusele
+page_scale_fit=Mahuta leheküljele
+page_scale_auto=Automaatne suurendamine
+page_scale_actual=Tegelik suurus
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Viga
+loading_error=PDFi laadimisel esines viga.
+invalid_file_error=Vigane või rikutud PDF-fail.
+missing_file_error=PDF-fail puudub.
+unexpected_response_error=Ootamatu vastus serverilt.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}} {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Annotation]
+password_label=PDF-faili avamiseks sisesta parool.
+password_invalid=Vigane parool. Palun proovi uuesti.
+password_ok=Sobib
+password_cancel=Loobu
+
+printing_not_supported=Hoiatus: printimine pole selle brauseri poolt täielikult toetatud.
+printing_not_ready=Hoiatus: PDF pole printimiseks täielikult laaditud.
+web_fonts_disabled=Veebifondid on keelatud: PDFiga kaasatud fonte pole võimalik kasutada.
+document_colors_not_allowed=PDF-dokumentidel pole oma värvide kasutamine lubatud: “Veebilehtedel on lubatud kasutada oma värve†on brauseris deaktiveeritud.
diff --git a/js/pdfjs/web/locale/eu/viewer.properties b/js/pdfjs/web/locale/eu/viewer.properties
new file mode 100644
index 0000000..e14f5cd
--- /dev/null
+++ b/js/pdfjs/web/locale/eu/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Aurreko orria
+previous_label=Aurrekoa
+next.title=Hurrengo orria
+next_label=Hurrengoa
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Orria
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=/ {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages={{pagesCount}}/{{pageNumber}}
+
+zoom_out.title=Urrundu zooma
+zoom_out_label=Urrundu zooma
+zoom_in.title=Gerturatu zooma
+zoom_in_label=Gerturatu zooma
+zoom.title=Zooma
+presentation_mode.title=Aldatu aurkezpen modura
+presentation_mode_label=Arkezpen modua
+open_file.title=Ireki fitxategia
+open_file_label=Ireki
+print.title=Inprimatu
+print_label=Inprimatu
+download.title=Deskargatu
+download_label=Deskargatu
+bookmark.title=Uneko ikuspegia (kopiatu edo ireki leiho berrian)
+bookmark_label=Uneko ikuspegia
+
+# Secondary toolbar and context menu
+tools.title=Tresnak
+tools_label=Tresnak
+first_page.title=Joan lehen orrira
+first_page.label=Joan lehen orrira
+first_page_label=Joan lehen orrira
+last_page.title=Joan azken orrira
+last_page.label=Joan azken orrira
+last_page_label=Joan azken orrira
+page_rotate_cw.title=Biratu erlojuaren norantzan
+page_rotate_cw.label=Biratu erlojuaren norantzan
+page_rotate_cw_label=Biratu erlojuaren norantzan
+page_rotate_ccw.title=Biratu erlojuaren aurkako norantzan
+page_rotate_ccw.label=Biratu erlojuaren aurkako norantzan
+page_rotate_ccw_label=Biratu erlojuaren aurkako norantzan
+
+cursor_text_select_tool.title=Gaitu testuaren hautapen tresna
+cursor_text_select_tool_label=Testuaren hautapen tresna
+cursor_hand_tool.title=Gaitu eskuaren tresna
+cursor_hand_tool_label=Eskuaren tresna
+
+scroll_vertical.title=Erabili korritze bertikala
+scroll_vertical_label=Korritze bertikala
+scroll_horizontal.title=Erabili korritze horizontala
+scroll_horizontal_label=Korritze horizontala
+scroll_wrapped.title=Erabili korritze egokitua
+scroll_wrapped_label=Korritze egokitua
+
+spread_none.title=Ez elkartu barreiatutako orriak
+spread_none_label=Barreiatzerik ez
+spread_odd.title=Elkartu barreiatutako orriak bakoiti zenbakidunekin hasita
+spread_odd_label=Barreiatze bakoitia
+spread_even.title=Elkartu barreiatutako orriak bikoiti zenbakidunekin hasita
+spread_even_label=Barreiatze bikoitia
+
+# Document properties dialog box
+document_properties.title=Dokumentuaren propietateak…
+document_properties_label=Dokumentuaren propietateak…
+document_properties_file_name=Fitxategi-izena:
+document_properties_file_size=Fitxategiaren tamaina:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} byte)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} byte)
+document_properties_title=Izenburua:
+document_properties_author=Egilea:
+document_properties_subject=Gaia:
+document_properties_keywords=Gako-hitzak:
+document_properties_creation_date=Sortze-data:
+document_properties_modification_date=Aldatze-data:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Sortzailea:
+document_properties_producer=PDFaren ekoizlea:
+document_properties_version=PDF bertsioa:
+document_properties_page_count=Orrialde kopurua:
+document_properties_page_size=Orriaren tamaina:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=bertikala
+document_properties_page_size_orientation_landscape=horizontala
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Gutuna
+document_properties_page_size_name_legal=Legala
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Webeko ikuspegi bizkorra:
+document_properties_linearized_yes=Bai
+document_properties_linearized_no=Ez
+document_properties_close=Itxi
+
+print_progress_message=Dokumentua inprimatzeko prestatzen…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent=%{{progress}}
+print_progress_close=Utzi
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Txandakatu alboko barra
+toggle_sidebar_notification.title=Txandakatu alboko barra (dokumentuak eskema/eranskinak ditu)
+toggle_sidebar_label=Txandakatu alboko barra
+document_outline.title=Erakutsi dokumentuaren eskema (klik bikoitza elementu guztiak zabaltzeko/tolesteko)
+document_outline_label=Dokumentuaren eskema
+attachments.title=Erakutsi eranskinak
+attachments_label=Eranskinak
+thumbs.title=Erakutsi koadro txikiak
+thumbs_label=Koadro txikiak
+findbar.title=Bilatu dokumentuan
+findbar_label=Bilatu
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas={{page}}. orria
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title={{page}}. orria
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas={{page}}. orriaren koadro txikia
+
+# Find panel button title and messages
+find_input.title=Bilatu
+find_input.placeholder=Bilatu dokumentuan…
+find_previous.title=Bilatu esaldiaren aurreko parekatzea
+find_previous_label=Aurrekoa
+find_next.title=Bilatu esaldiaren hurrengo parekatzea
+find_next_label=Hurrengoa
+find_highlight=Nabarmendu guztia
+find_match_case_label=Bat etorri maiuskulekin/minuskulekin
+find_entire_word_label=Hitz osoak
+find_reached_top=Dokumentuaren hasierara heldu da, bukaeratik jarraitzen
+find_reached_bottom=Dokumentuaren bukaerara heldu da, hasieratik jarraitzen
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{total}}/{{current}}. bat etortzea
+find_match_count[two]={{total}}/{{current}}. bat etortzea
+find_match_count[few]={{total}}/{{current}}. bat etortzea
+find_match_count[many]={{total}}/{{current}}. bat etortzea
+find_match_count[other]={{total}}/{{current}}. bat etortzea
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]={{limit}} bat-etortze baino gehiago
+find_match_count_limit[one]=Bat-etortze {{limit}} baino gehiago
+find_match_count_limit[two]={{limit}} bat-etortze baino gehiago
+find_match_count_limit[few]={{limit}} bat-etortze baino gehiago
+find_match_count_limit[many]={{limit}} bat-etortze baino gehiago
+find_match_count_limit[other]={{limit}} bat-etortze baino gehiago
+find_not_found=Esaldia ez da aurkitu
+
+# Error panel labels
+error_more_info=Informazio gehiago
+error_less_info=Informazio gutxiago
+error_close=Itxi
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (eraikuntza: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Mezua: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Pila: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Fitxategia: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Lerroa: {{line}}
+rendering_error=Errorea gertatu da orria errendatzean.
+
+# Predefined zoom values
+page_scale_width=Orriaren zabalera
+page_scale_fit=Doitu orrira
+page_scale_auto=Zoom automatikoa
+page_scale_actual=Benetako tamaina
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent=%{{scale}}
+
+# Loading indicator messages
+loading_error_indicator=Errorea
+loading_error=Errorea gertatu da PDFa kargatzean.
+invalid_file_error=PDF fitxategi baliogabe edo hondatua.
+missing_file_error=PDF fitxategia falta da.
+unexpected_response_error=Espero gabeko zerbitzariaren erantzuna.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} ohartarazpena]
+password_label=Idatzi PDF fitxategi hau irekitzeko pasahitza.
+password_invalid=Pasahitz baliogabea. Saiatu berriro mesedez.
+password_ok=Ados
+password_cancel=Utzi
+
+printing_not_supported=Abisua: inprimatzeko euskarria ez da erabatekoa nabigatzaile honetan.
+printing_not_ready=Abisua: PDFa ez dago erabat kargatuta inprimatzeko.
+web_fonts_disabled=Webeko letra-tipoak desgaituta daude: ezin dira kapsulatutako PDF letra-tipoak erabili.
+document_colors_not_allowed=PDF dokumentuek ez dute beraien koloreak erabiltzeko baimenik: 'Baimendu orriak beraien letra-tipoak aukeratzea' desaktibatuta dago nabigatzailean.
diff --git a/js/pdfjs/web/locale/fa/viewer.properties b/js/pdfjs/web/locale/fa/viewer.properties
new file mode 100644
index 0000000..e95738c
--- /dev/null
+++ b/js/pdfjs/web/locale/fa/viewer.properties
@@ -0,0 +1,223 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=صÙحهٔ قبلی
+previous_label=قبلی
+next.title=صÙحهٔ بعدی
+next_label=بعدی
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=صÙحه
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=از {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}}از {{pagesCount}})
+
+zoom_out.title=کوچک‌نمایی
+zoom_out_label=کوچک‌نمایی
+zoom_in.title=بزرگ‌نمایی
+zoom_in_label=بزرگ‌نمایی
+zoom.title=زوم
+presentation_mode.title=تغییر به حالت ارائه
+presentation_mode_label=حالت ارائه
+open_file.title=باز کردن پرونده
+open_file_label=باز کردن
+print.title=چاپ
+print_label=چاپ
+download.title=بارگیری
+download_label=بارگیری
+bookmark.title=نمای Ùعلی (رونوشت Ùˆ یا نشان دادن در پنجره جدید)
+bookmark_label=نمای Ùعلی
+
+# Secondary toolbar and context menu
+tools.title=ابزارها
+tools_label=ابزارها
+first_page.title=برو به اولین صÙحه
+first_page.label=برو یه اولین صÙحه
+first_page_label=برو به اولین صÙحه
+last_page.title=برو به آخرین صÙحه
+last_page.label=برو به آخرین صÙحه
+last_page_label=برو به آخرین صÙحه
+page_rotate_cw.title=چرخش ساعتگرد
+page_rotate_cw.label=چرخش ساعتگرد
+page_rotate_cw_label=چرخش ساعتگرد
+page_rotate_ccw.title=چرخش پاد ساعتگرد
+page_rotate_ccw.label=چرخش پاد ساعتگرد
+page_rotate_ccw_label=چرخش پاد ساعتگرد
+
+cursor_text_select_tool.title=Ùعال کردن ابزار٠انتخاب٠متن
+cursor_text_select_tool_label=ابزار٠انتخاب٠متن
+cursor_hand_tool.title=Ùعال کردن ابزار٠دست
+cursor_hand_tool_label=ابزار دست
+
+scroll_vertical.title=استÙاده از پیمایش عمودی
+scroll_vertical_label=پیمایش عمودی
+scroll_horizontal.title=استÙاده از پیمایش اÙÙ‚ÛŒ
+scroll_horizontal_label=پیمایش اÙÙ‚ÛŒ
+
+
+# Document properties dialog box
+document_properties.title=خصوصیات سند...
+document_properties_label=خصوصیات سند...
+document_properties_file_name=نام Ùایل:
+document_properties_file_size=حجم پرونده:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} کیلوبایت ({{size_b}} بایت)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} مگابایت ({{size_b}} بایت)
+document_properties_title=عنوان:
+document_properties_author=نویسنده:
+document_properties_subject=موضوع:
+document_properties_keywords=کلیدواژه‌ها:
+document_properties_creation_date=تاریخ ایجاد:
+document_properties_modification_date=تاریخ ویرایش:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}، {{time}}
+document_properties_creator=ایجاد کننده:
+document_properties_producer=ایجاد کننده PDF:
+document_properties_version=نسخه PDF:
+document_properties_page_count=تعداد صÙحات:
+document_properties_page_size=اندازه صÙحه:
+document_properties_page_size_unit_inches=اینچ
+document_properties_page_size_unit_millimeters=میلی‌متر
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=نامه
+document_properties_page_size_name_legal=حقوقی
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized_yes=بله
+document_properties_linearized_no=خیر
+document_properties_close=بستن
+
+print_progress_message=آماده سازی مدارک برای چاپ کردن…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=لغو
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=باز و بسته کردن نوار کناری
+toggle_sidebar_notification.title=تغییر وضعیت نوار کناری (سند حاوی طرح/پیوست است)
+toggle_sidebar_label=تغییرحالت نوارکناری
+document_outline.title=نمایش رئوس مطالب مدارک(برای بازشدن/جمع شدن همه موارد دوبار کلیک کنید)
+document_outline_label=طرح نوشتار
+attachments.title=نمایش پیوست‌ها
+attachments_label=پیوست‌ها
+thumbs.title=نمایش تصاویر بندانگشتی
+thumbs_label=تصاویر بندانگشتی
+findbar.title=جستجو در سند
+findbar_label=پیدا کردن
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=صÙحه {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=تصویر بند‌ انگشتی صÙحه {{page}}
+
+# Find panel button title and messages
+find_input.title=پیدا کردن
+find_input.placeholder=پیدا کردن در سند…
+find_previous.title=پیدا کردن رخداد قبلی عبارت
+find_previous_label=قبلی
+find_next.title=پیدا کردن رخداد بعدی عبارت
+find_next_label=بعدی
+find_highlight=برجسته و هایلایت کردن همه موارد
+find_match_case_label=تطبیق Ú©ÙˆÚ†Ú©ÛŒ Ùˆ بزرگی حروÙ
+find_entire_word_label=تمام کلمه‌ها
+find_reached_top=به بالای صÙحه رسیدیم، از پایین ادامه می‌دهیم
+find_reached_bottom=به آخر صÙحه رسیدیم، از بالا ادامه می‌دهیم
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count[one]={{current}} از {{total}} مطابقت دارد
+find_match_count[two]={{current}} از {{total}} مطابقت دارد
+find_match_count[few]={{current}} از {{total}} مطابقت دارد
+find_match_count[many]={{current}} از {{total}} مطابقت دارد
+find_match_count[other]={{current}} از {{total}} مطابقت دارد
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_not_found=عبارت پیدا نشد
+
+# Error panel labels
+error_more_info=اطلاعات بیشتر
+error_less_info=اطلاعات کمتر
+error_close=بستن
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=â€PDF.js ورژن{{version}} â€(ساخت: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=پیام: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=توده: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=پرونده: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=سطر: {{line}}
+rendering_error=هنگام بارگیری صÙحه خطایی رخ داد.
+
+# Predefined zoom values
+page_scale_width=عرض صÙحه
+page_scale_fit=اندازه کردن صÙحه
+page_scale_auto=بزرگنمایی خودکار
+page_scale_actual=اندازه واقعی‌
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=خطا
+loading_error=هنگام بارگیری پرونده PDF خطایی رخ داد.
+invalid_file_error=پرونده PDF نامعتبر یامعیوب می‌باشد.
+missing_file_error=پرونده PDF یاÙت نشد.
+unexpected_response_error=پاسخ پیش بینی نشده سرور
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Annotation]
+password_label=جهت باز کردن پرونده PDF گذرواژه را وارد نمائید.
+password_invalid=گذرواژه نامعتبر. لطÙا مجددا تلاش کنید.
+password_ok=تأیید
+password_cancel=لغو
+
+printing_not_supported=هشدار: قابلیت چاپ به‌طور کامل در این مرورگر پشتیبانی نمی‌شود.
+printing_not_ready=اخطار: پرونده PDF بطور کامل بارگیری نشده و امکان چاپ وجود ندارد.
+web_fonts_disabled=Ùونت های تحت وب غیر Ùعال شده اند: امکان استÙاده از نمایش دهنده داخلی PDF وجود ندارد.
+document_colors_not_allowed=Ùایلهای PDF اجازه ندارند تا از رنگ‌های خود استÙاده کنند: گزینه «به صÙحات اجازه بده تا از رنگ‌های خود استÙاده کنند» در مرورگر غیر Ùعال است.
diff --git a/js/pdfjs/web/locale/ff/viewer.properties b/js/pdfjs/web/locale/ff/viewer.properties
new file mode 100644
index 0000000..2e94346
--- /dev/null
+++ b/js/pdfjs/web/locale/ff/viewer.properties
@@ -0,0 +1,242 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Hello Æennungo
+previous_label=ÆennuÉ—o
+next.title=Hello faango
+next_label=Yeeso
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Hello
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=e nder {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} of {{pagesCount}})
+
+zoom_out.title=Lonngo WoÉ—É—a
+zoom_out_label=Lonngo WoÉ—É—a
+zoom_in.title=Lonngo Ara
+zoom_in_label=Lonngo Ara
+zoom.title=Lonngo
+presentation_mode.title=Faytu to Presentation Mode
+presentation_mode_label=Presentation Mode
+open_file.title=Uddit Fiilde
+open_file_label=Uddit
+print.title=Winndito
+print_label=Winndito
+download.title=Aawto
+download_label=Aawto
+bookmark.title=Jiytol gonangol (natto walla uddit e henorde)
+bookmark_label=Jiytol Gonangol
+
+# Secondary toolbar and context menu
+tools.title=KuutorÉ—e
+tools_label=KuutorÉ—e
+first_page.title=Yah to hello adanngo
+first_page.label=Yah to hello adanngo
+first_page_label=Yah to hello adanngo
+last_page.title=Yah to hello wattindiingo
+last_page.label=Yah to hello wattindiingo
+last_page_label=Yah to hello wattindiingo
+page_rotate_cw.title=Yiiltu Faya Ñaamo
+page_rotate_cw.label=Yiiltu Faya Ñaamo
+page_rotate_cw_label=Yiiltu Faya Ñaamo
+page_rotate_ccw.title=Yiiltu Faya Nano
+page_rotate_ccw.label=Yiiltu Faya Nano
+page_rotate_ccw_label=Yiiltu Faya Nano
+
+cursor_text_select_tool.title=Gollin kaɓirgel cuɓirgel binndi
+cursor_text_select_tool_label=Kaɓirgel cuɓirgel binndi
+cursor_hand_tool.title=Hurmin kuutorgal junngo
+cursor_hand_tool_label=Kaɓirgel junngo
+
+scroll_vertical.title=Huutoro gorwitol daringol
+scroll_vertical_label=Gorwitol daringol
+scroll_horizontal.title=Huutoro gorwitol lelingol
+scroll_horizontal_label=Gorwitol daringol
+scroll_wrapped.title=Huutoro gorwitol coomingol
+scroll_wrapped_label=Gorwitol coomingol
+
+spread_none.title=Hoto tawtu kelle kelle
+spread_none_label=Alaa Spreads
+spread_odd.title=Tawtu kelle puÉ—É—ortooÉ—e kelle teelÉ—e
+spread_odd_label=Kelle teelÉ—e
+spread_even.title=Tawtu É—ereeji kelle puÉ—É—oriiÉ—i kelle teeltuÉ—e
+spread_even_label=Kelle teeltuÉ—e
+
+# Document properties dialog box
+document_properties.title=Keeroraaɗi Winndannde…
+document_properties_label=Keeroraaɗi Winndannde…
+document_properties_file_name=Innde fiilde:
+document_properties_file_size=Æetol fiilde:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bite)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bite)
+document_properties_title=Tiitoonde:
+document_properties_author=BinnduÉ—o:
+document_properties_subject=Toɓɓere:
+document_properties_keywords=Kelmekele jiytirÉ—e:
+document_properties_creation_date=Ñalnde Sosaa:
+document_properties_modification_date=Ñalnde Waylaa:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=CosÉ—o:
+document_properties_producer=PaggiiÉ—o PDF:
+document_properties_version=Yamre PDF:
+document_properties_page_count=Limoore Kelle:
+document_properties_page_size=Æeto Hello:
+document_properties_page_size_unit_inches=nder
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=dariingo
+document_properties_page_size_orientation_landscape=wertiingo
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Æataake
+document_properties_page_size_name_legal=Laawol
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=ÆŠisngo geese yaawngo:
+document_properties_linearized_yes=Eey
+document_properties_linearized_no=Alaa
+document_properties_close=Uddu
+
+print_progress_message=Nana heboo winnditaade fiilannde…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Haaytu
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Toggilo Palal Sawndo
+toggle_sidebar_notification.title=Palal sawndo (dokimaa oo ina waÉ—i taarngo/cinnde)
+toggle_sidebar_label=Toggilo Palal Sawndo
+document_outline.title=Hollu Ƴiyal Fiilannde (dobdobo ngam wertude/taggude teme fof)
+document_outline_label=Toɓɓe Fiilannde
+attachments.title=Hollu ÆŠisanÉ—e
+attachments_label=ÆŠisanÉ—e
+thumbs.title=Hollu Dooɓe
+thumbs_label=Dooɓe
+findbar.title=Yiylo e fiilannde
+findbar_label=Yiytu
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Hello {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Dooɓre Hello {{page}}
+
+# Find panel button title and messages
+find_input.title=Yiytu
+find_input.placeholder=Yiylo nder dokimaa
+find_previous.title=Yiylo cilol É“ennugol konngol ngol
+find_previous_label=ÆennuÉ—o
+find_next.title=Yiylo cilol garowol konngol ngol
+find_next_label=Yeeso
+find_highlight=Jalbin fof
+find_match_case_label=Jaaɓnu darnde
+find_entire_word_label=Kelme timmuÉ—e tan
+find_reached_top=Heɓii fuɗɗorde fiilannde, jokku faya les
+find_reached_bottom=Heɓii hoore fiilannde, jokku faya les
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} wonande laabi {{total}}
+find_match_count[two]={{current}} wonande laabi {{total}}
+find_match_count[few]={{current}} wonande laabi {{total}}
+find_match_count[many]={{current}} wonande laabi {{total}}
+find_match_count[other]={{current}} wonande laabi {{total}}
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Ko É“uri laabi {{limit}}
+find_match_count_limit[one]=Ko É“uri laani {{limit}}
+find_match_count_limit[two]=Ko É“uri laabi {{limit}}
+find_match_count_limit[few]=Ko É“uri laabi {{limit}}
+find_match_count_limit[many]=Ko É“uri laabi {{limit}}
+find_match_count_limit[other]=Ko É“uri laabi {{limit}}
+find_not_found=Konngi njiyataa
+
+# Error panel labels
+error_more_info=Æeydu Humpito
+error_less_info=Ustu Humpito
+error_close=Uddu
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Æatakuure: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stack: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Fiilde: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Gorol: {{line}}
+rendering_error=Juumre waɗii tuma nde yoŋkittoo hello.
+
+# Predefined zoom values
+page_scale_width=Njaajeendi Hello
+page_scale_fit=KeÆ´eendi Hello
+page_scale_auto=Loongorde Jaajol
+page_scale_actual=Æetol Jaati
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Juumre
+loading_error=Juumre waÉ—ii tuma nde loowata PDF oo.
+invalid_file_error=Fiilde PDF moÆ´Æ´aani walla jiibii.
+missing_file_error=Fiilde PDF ena Å‹akki.
+unexpected_response_error=Jaabtol sarworde tijjinooka.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Siiftannde]
+password_label=Naatu finnde ngam uddite ndee fiilde PDF.
+password_invalid=Finnde moÆ´Æ´aani. TiiÉ—no eto kadi.
+password_ok=OK
+password_cancel=Haaytu
+
+printing_not_supported=Reentino: Winnditagol tammbitaaka no feewi e ndee wanngorde.
+printing_not_ready=Reentino: PDF oo loowaaki haa timmi ngam winnditagol.
+web_fonts_disabled=Ponte geese ko daaÆ´aaÉ—e: horiima huutoraade ponte PDF coomtoraaÉ—e.
+document_colors_not_allowed=PiilanÉ—e PDF njamiraaka yoo kuutoro goobuuji mum'en keeriiÉ—i: 'Yamir kello yoo kuutoro goobuuki keeriiÉ—i' koko daaÆ´aa e wanngorde ndee.
diff --git a/js/pdfjs/web/locale/fi/viewer.properties b/js/pdfjs/web/locale/fi/viewer.properties
new file mode 100644
index 0000000..76bfa13
--- /dev/null
+++ b/js/pdfjs/web/locale/fi/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Edellinen sivu
+previous_label=Edellinen
+next.title=Seuraava sivu
+next_label=Seuraava
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Sivu
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=/ {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} / {{pagesCount}})
+
+zoom_out.title=Loitonna
+zoom_out_label=Loitonna
+zoom_in.title=Lähennä
+zoom_in_label=Lähennä
+zoom.title=Suurennus
+presentation_mode.title=Siirry esitystilaan
+presentation_mode_label=Esitystila
+open_file.title=Avaa tiedosto
+open_file_label=Avaa
+print.title=Tulosta
+print_label=Tulosta
+download.title=Lataa
+download_label=Lataa
+bookmark.title=Avoin ikkuna (kopioi tai avaa uuteen ikkunaan)
+bookmark_label=Avoin ikkuna
+
+# Secondary toolbar and context menu
+tools.title=Tools
+tools_label=Tools
+first_page.title=Siirry ensimmäiselle sivulle
+first_page.label=Siirry ensimmäiselle sivulle
+first_page_label=Siirry ensimmäiselle sivulle
+last_page.title=Siirry viimeiselle sivulle
+last_page.label=Siirry viimeiselle sivulle
+last_page_label=Siirry viimeiselle sivulle
+page_rotate_cw.title=Kierrä oikealle
+page_rotate_cw.label=Kierrä oikealle
+page_rotate_cw_label=Kierrä oikealle
+page_rotate_ccw.title=Kierrä vasemmalle
+page_rotate_ccw.label=Kierrä vasemmalle
+page_rotate_ccw_label=Kierrä vasemmalle
+
+cursor_text_select_tool.title=Käytä tekstinvalintatyökalua
+cursor_text_select_tool_label=Tekstinvalintatyökalu
+cursor_hand_tool.title=Käytä käsityökalua
+cursor_hand_tool_label=Käsityökalu
+
+scroll_vertical.title=Käytä pystysuuntaista vieritystä
+scroll_vertical_label=Pystysuuntainen vieritys
+scroll_horizontal.title=Käytä vaakasuuntaista vieritystä
+scroll_horizontal_label=Vaakasuuntainen vieritys
+scroll_wrapped.title=Käytä rivittyvää vieritystä
+scroll_wrapped_label=Rivittyvä vieritys
+
+spread_none.title=Älä yhdistä sivuja aukeamiksi
+spread_none_label=Ei aukeamia
+spread_odd.title=Yhdistä sivut aukeamiksi alkaen parittomalta sivulta
+spread_odd_label=Parittomalta alkavat aukeamat
+spread_even.title=Yhdistä sivut aukeamiksi alkaen parilliselta sivulta
+spread_even_label=Parilliselta alkavat aukeamat
+
+# Document properties dialog box
+document_properties.title=Dokumentin ominaisuudet…
+document_properties_label=Dokumentin ominaisuudet…
+document_properties_file_name=Tiedostonimi:
+document_properties_file_size=Tiedoston koko:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} kt ({{size_b}} tavua)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} Mt ({{size_b}} tavua)
+document_properties_title=Otsikko:
+document_properties_author=Tekijä:
+document_properties_subject=Aihe:
+document_properties_keywords=Avainsanat:
+document_properties_creation_date=Luomispäivämäärä:
+document_properties_modification_date=Muokkauspäivämäärä:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Luoja:
+document_properties_producer=PDF-tuottaja:
+document_properties_version=PDF-versio:
+document_properties_page_count=Sivujen määrä:
+document_properties_page_size=Sivun koko:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=pysty
+document_properties_page_size_orientation_landscape=vaaka
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Nopea web-katselu:
+document_properties_linearized_yes=Kyllä
+document_properties_linearized_no=Ei
+document_properties_close=Sulje
+
+print_progress_message=Valmistellaan dokumenttia tulostamista varten…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}} %
+print_progress_close=Peruuta
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Näytä/piilota sivupaneeli
+toggle_sidebar_notification.title=Näytä/piilota sivupaneeli (dokumentissa on sisällys tai liitteitä)
+toggle_sidebar_label=Näytä/piilota sivupaneeli
+document_outline.title=Näytä dokumentin sisällys (laajenna tai kutista kohdat kaksoisnapsauttamalla)
+document_outline_label=Dokumentin sisällys
+attachments.title=Näytä liitteet
+attachments_label=Liitteet
+thumbs.title=Näytä pienoiskuvat
+thumbs_label=Pienoiskuvat
+findbar.title=Etsi dokumentista
+findbar_label=Etsi
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Sivu {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Sivu {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Pienoiskuva sivusta {{page}}
+
+# Find panel button title and messages
+find_input.title=Etsi
+find_input.placeholder=Etsi dokumentista…
+find_previous.title=Etsi hakusanan edellinen osuma
+find_previous_label=Edellinen
+find_next.title=Etsi hakusanan seuraava osuma
+find_next_label=Seuraava
+find_highlight=Korosta kaikki
+find_match_case_label=Huomioi kirjainkoko
+find_entire_word_label=Kokonaiset sanat
+find_reached_top=Päästiin dokumentin alkuun, jatketaan lopusta
+find_reached_bottom=Päästiin sivun loppuun, jatketaan alusta
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} / {{total}} osuma
+find_match_count[two]={{current}} / {{total}} osumaa
+find_match_count[few]={{current}} / {{total}} osumaa
+find_match_count[many]={{current}} / {{total}} osumaa
+find_match_count[other]={{current}} / {{total}} osumaa
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Enemmän kuin {{limit}} osumaa
+find_match_count_limit[one]=Enemmän kuin {{limit}} osuma
+find_match_count_limit[two]=Enemmän kuin {{limit}} osumaa
+find_match_count_limit[few]=Enemmän kuin {{limit}} osumaa
+find_match_count_limit[many]=Enemmän kuin {{limit}} osumaa
+find_match_count_limit[other]=Enemmän kuin {{limit}} osumaa
+find_not_found=Hakusanaa ei löytynyt
+
+# Error panel labels
+error_more_info=Lisätietoja
+error_less_info=Lisätietoja
+error_close=Sulje
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (kooste: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Virheilmoitus: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Pino: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Tiedosto: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Rivi: {{line}}
+rendering_error=Tapahtui virhe piirrettäessä sivua.
+
+# Predefined zoom values
+page_scale_width=Sivun leveys
+page_scale_fit=Koko sivu
+page_scale_auto=Automaattinen suurennus
+page_scale_actual=Todellinen koko
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}} %
+
+# Loading indicator messages
+loading_error_indicator=Virhe
+loading_error=Tapahtui virhe ladattaessa PDF-tiedostoa.
+invalid_file_error=Virheellinen tai vioittunut PDF-tiedosto.
+missing_file_error=Puuttuva PDF-tiedosto.
+unexpected_response_error=Odottamaton vastaus palvelimelta.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Annotation]
+password_label=Kirjoita PDF-tiedoston salasana.
+password_invalid=Virheellinen salasana. Yritä uudestaan.
+password_ok=OK
+password_cancel=Peruuta
+
+printing_not_supported=Varoitus: Selain ei tue kaikkia tulostustapoja.
+printing_not_ready=Varoitus: PDF-tiedosto ei ole vielä latautunut kokonaan, eikä sitä voi vielä tulostaa.
+web_fonts_disabled=Verkkosivujen omat kirjasinlajit on estetty: ei voida käyttää upotettuja PDF-kirjasinlajeja.
+document_colors_not_allowed=PDF-dokumenttien ei ole sallittua käyttää omia värejään: Asetusta â€Sivut saavat käyttää omia värejään oletusten sijaan†ei ole valittu selaimen asetuksissa.
diff --git a/js/pdfjs/web/locale/fr/viewer.properties b/js/pdfjs/web/locale/fr/viewer.properties
new file mode 100644
index 0000000..7df1d3d
--- /dev/null
+++ b/js/pdfjs/web/locale/fr/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Page précédente
+previous_label=Précédent
+next.title=Page suivante
+next_label=Suivant
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Page
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=sur {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} sur {{pagesCount}})
+
+zoom_out.title=Zoom arrière
+zoom_out_label=Zoom arrière
+zoom_in.title=Zoom avant
+zoom_in_label=Zoom avant
+zoom.title=Zoom
+presentation_mode.title=Basculer en mode présentation
+presentation_mode_label=Mode présentation
+open_file.title=Ouvrir le fichier
+open_file_label=Ouvrir le fichier
+print.title=Imprimer
+print_label=Imprimer
+download.title=Télécharger
+download_label=Télécharger
+bookmark.title=Affichage courant (copier ou ouvrir dans une nouvelle fenêtre)
+bookmark_label=Affichage actuel
+
+# Secondary toolbar and context menu
+tools.title=Outils
+tools_label=Outils
+first_page.title=Aller à la première page
+first_page.label=Aller à la première page
+first_page_label=Aller à la première page
+last_page.title=Aller à la dernière page
+last_page.label=Aller à la dernière page
+last_page_label=Aller à la dernière page
+page_rotate_cw.title=Rotation horaire
+page_rotate_cw.label=Rotation horaire
+page_rotate_cw_label=Rotation horaire
+page_rotate_ccw.title=Rotation antihoraire
+page_rotate_ccw.label=Rotation antihoraire
+page_rotate_ccw_label=Rotation antihoraire
+
+cursor_text_select_tool.title=Activer l’outil de sélection de texte
+cursor_text_select_tool_label=Outil de sélection de texte
+cursor_hand_tool.title=Activer l’outil main
+cursor_hand_tool_label=Outil main
+
+scroll_vertical.title=Utiliser le défilement vertical
+scroll_vertical_label=Défilement vertical
+scroll_horizontal.title=Utiliser le défilement horizontal
+scroll_horizontal_label=Défilement horizontal
+scroll_wrapped.title=Utiliser le défilement par bloc
+scroll_wrapped_label=Défilement par bloc
+
+spread_none.title=Ne pas afficher les pages deux à deux
+spread_none_label=Pas de double affichage
+spread_odd.title=Afficher les pages par deux, impaires à gauche
+spread_odd_label=Doubles pages, impaires à gauche
+spread_even.title=Afficher les pages par deux, paires à gauche
+spread_even_label=Doubles pages, paires à gauche
+
+# Document properties dialog box
+document_properties.title=Propriétés du document…
+document_properties_label=Propriétés du document…
+document_properties_file_name=Nom du fichier :
+document_properties_file_size=Taille du fichier :
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} Ko ({{size_b}} octets)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} Mo ({{size_b}} octets)
+document_properties_title=Titre :
+document_properties_author=Auteur :
+document_properties_subject=Sujet :
+document_properties_keywords=Mots-clés :
+document_properties_creation_date=Date de création :
+document_properties_modification_date=Modifié le :
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}} à {{time}}
+document_properties_creator=Créé par :
+document_properties_producer=Outil de conversion PDF :
+document_properties_version=Version PDF :
+document_properties_page_count=Nombre de pages :
+document_properties_page_size=Taille de la page :
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=portrait
+document_properties_page_size_orientation_landscape=paysage
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=lettre
+document_properties_page_size_name_legal=document juridique
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Affichage rapide des pages web :
+document_properties_linearized_yes=Oui
+document_properties_linearized_no=Non
+document_properties_close=Fermer
+
+print_progress_message=Préparation du document pour l’impression…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}} %
+print_progress_close=Annuler
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Afficher/Masquer le panneau latéral
+toggle_sidebar_notification.title=Afficher/Masquer le panneau latéral (le document contient des signets/pièces jointes)
+toggle_sidebar_label=Afficher/Masquer le panneau latéral
+document_outline.title=Afficher les signets du document (double-cliquer pour développer/réduire tous les éléments)
+document_outline_label=Signets du document
+attachments.title=Afficher les pièces jointes
+attachments_label=Pièces jointes
+thumbs.title=Afficher les vignettes
+thumbs_label=Vignettes
+findbar.title=Rechercher dans le document
+findbar_label=Rechercher
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Page {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Page {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Vignette de la page {{page}}
+
+# Find panel button title and messages
+find_input.title=Rechercher
+find_input.placeholder=Rechercher dans le document…
+find_previous.title=Trouver l’occurrence précédente de l’expression
+find_previous_label=Précédent
+find_next.title=Trouver la prochaine occurrence de l’expression
+find_next_label=Suivant
+find_highlight=Tout surligner
+find_match_case_label=Respecter la casse
+find_entire_word_label=Mots entiers
+find_reached_top=Haut de la page atteint, poursuite depuis la fin
+find_reached_bottom=Bas de la page atteint, poursuite au début
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]=Occurrence {{current}} sur {{total}}
+find_match_count[two]=Occurrence {{current}} sur {{total}}
+find_match_count[few]=Occurrence {{current}} sur {{total}}
+find_match_count[many]=Occurrence {{current}} sur {{total}}
+find_match_count[other]=Occurrence {{current}} sur {{total}}
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Plus de {{limit}} correspondances
+find_match_count_limit[one]=Plus de {{limit}} correspondance
+find_match_count_limit[two]=Plus de {{limit}} correspondances
+find_match_count_limit[few]=Plus de {{limit}} correspondances
+find_match_count_limit[many]=Plus de {{limit}} correspondances
+find_match_count_limit[other]=Plus de {{limit}} correspondances
+find_not_found=Expression non trouvée
+
+# Error panel labels
+error_more_info=Plus d’informations
+error_less_info=Moins d’informations
+error_close=Fermer
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (identifiant de compilation : {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Message : {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Pile : {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Fichier : {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Ligne : {{line}}
+rendering_error=Une erreur s’est produite lors de l’affichage de la page.
+
+# Predefined zoom values
+page_scale_width=Pleine largeur
+page_scale_fit=Page entière
+page_scale_auto=Zoom automatique
+page_scale_actual=Taille réelle
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}} %
+
+# Loading indicator messages
+loading_error_indicator=Erreur
+loading_error=Une erreur s’est produite lors du chargement du fichier PDF.
+invalid_file_error=Fichier PDF invalide ou corrompu.
+missing_file_error=Fichier PDF manquant.
+unexpected_response_error=Réponse inattendue du serveur.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}} à {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Annotation {{type}}]
+password_label=Veuillez saisir le mot de passe pour ouvrir ce fichier PDF.
+password_invalid=Mot de passe incorrect. Veuillez réessayer.
+password_ok=OK
+password_cancel=Annuler
+
+printing_not_supported=Attention : l’impression n’est pas totalement prise en charge par ce navigateur.
+printing_not_ready=Attention : le PDF n’est pas entièrement chargé pour pouvoir l’imprimer.
+web_fonts_disabled=Les polices web sont désactivées : impossible d’utiliser les polices intégrées au PDF.
+document_colors_not_allowed=Les documents PDF ne peuvent pas utiliser leurs propres couleurs : « Autoriser les pages web à utiliser leurs propres couleurs » est désactivé dans le navigateur.
diff --git a/js/pdfjs/web/locale/fy-NL/viewer.properties b/js/pdfjs/web/locale/fy-NL/viewer.properties
new file mode 100644
index 0000000..4d6b18c
--- /dev/null
+++ b/js/pdfjs/web/locale/fy-NL/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Foarige side
+previous_label=Foarige
+next.title=Folgjende side
+next_label=Folgjende
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Side
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=fa {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} fan {{pagesCount}})
+
+zoom_out.title=Utzoome
+zoom_out_label=Utzoome
+zoom_in.title=Ynzoome
+zoom_in_label=Ynzoome
+zoom.title=Zoome
+presentation_mode.title=Wikselje nei presintaasjemodus
+presentation_mode_label=Presintaasjemodus
+open_file.title=Bestân iepenje
+open_file_label=Iepenje
+print.title=Ofdrukke
+print_label=Ofdrukke
+download.title=Downloade
+download_label=Downloade
+bookmark.title=Aktuele finster (kopiearje of iepenje yn nij finster)
+bookmark_label=Aktuele finster
+
+# Secondary toolbar and context menu
+tools.title=Ark
+tools_label=Ark
+first_page.title=Gean nei earste side
+first_page.label=Nei earste side gean
+first_page_label=Gean nei earste side
+last_page.title=Gean nei lêste side
+last_page.label=Nei lêste side gean
+last_page_label=Gean nei lêste side
+page_rotate_cw.title=Rjochtsom draaie
+page_rotate_cw.label=Rjochtsom draaie
+page_rotate_cw_label=Rjochtsom draaie
+page_rotate_ccw.title=Loftsom draaie
+page_rotate_ccw.label=Loftsom draaie
+page_rotate_ccw_label=Loftsom draaie
+
+cursor_text_select_tool.title=Tekstseleksjehelpmiddel ynskeakelje
+cursor_text_select_tool_label=Tekstseleksjehelpmiddel
+cursor_hand_tool.title=Hânhelpmiddel ynskeakelje
+cursor_hand_tool_label=Hânhelpmiddel
+
+scroll_vertical.title=Fertikaal skowe brûke
+scroll_vertical_label=Fertikaal skowe
+scroll_horizontal.title=Horizontaal skowe brûke
+scroll_horizontal_label=Horizontaal skowe
+scroll_wrapped.title=Skowe mei oersjoch brûke
+scroll_wrapped_label=Skowe mei oersjoch
+
+spread_none.title=Sidesprieding net gearfetsje
+spread_none_label=Gjin sprieding
+spread_odd.title=Sidesprieding gearfetsje te starten mei ûneven nûmers
+spread_odd_label=Uneven sprieding
+spread_even.title=Sidesprieding gearfetsje te starten mei even nûmers
+spread_even_label=Even sprieding
+
+# Document properties dialog box
+document_properties.title=Dokuminteigenskippen…
+document_properties_label=Dokuminteigenskippen…
+document_properties_file_name=Bestânsnamme:
+document_properties_file_size=Bestânsgrutte:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Titel:
+document_properties_author=Auteur:
+document_properties_subject=Underwerp:
+document_properties_keywords=Kaaiwurden:
+document_properties_creation_date=Oanmaakdatum:
+document_properties_modification_date=Bewurkingsdatum:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Makker:
+document_properties_producer=PDF-makker:
+document_properties_version=PDF-ferzje:
+document_properties_page_count=Siden:
+document_properties_page_size=Sideformaat:
+document_properties_page_size_unit_inches=yn
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=steand
+document_properties_page_size_orientation_landscape=lizzend
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Juridysk
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Flugge webwerjefte:
+document_properties_linearized_yes=Ja
+document_properties_linearized_no=Nee
+document_properties_close=Slute
+
+print_progress_message=Dokumint tariede oar ôfdrukken…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Annulearje
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Sidebalke yn-/útskeakelje
+toggle_sidebar_notification.title=Sidebalke yn-/útskeakelje (dokumint befettet outline/bylagen)
+toggle_sidebar_label=Sidebalke yn-/útskeakelje
+document_outline.title=Dokumintoersjoch toane (dûbelklik om alle items út/yn te klappen)
+document_outline_label=Dokumintoersjoch
+attachments.title=Bylagen toane
+attachments_label=Bylagen
+thumbs.title=Foarbylden toane
+thumbs_label=Foarbylden
+findbar.title=Sykje yn dokumint
+findbar_label=Sykje
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Side {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Side {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Foarbyld fan side {{page}}
+
+# Find panel button title and messages
+find_input.title=Sykje
+find_input.placeholder=Sykje yn dokumint…
+find_previous.title=It foarige foarkommen fan de tekst sykje
+find_previous_label=Foarige
+find_next.title=It folgjende foarkommen fan de tekst sykje
+find_next_label=Folgjende
+find_highlight=Alles markearje
+find_match_case_label=Haadlettergefoelich
+find_entire_word_label=Hiele wurden
+find_reached_top=Boppekant fan dokumint berikt, trochgien fan ûnder ôf
+find_reached_bottom=Ein fan dokumint berikt, trochgien fan boppe ôf
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} fan {{total}} oerienkomst
+find_match_count[two]={{current}} fan {{total}} oerienkomsten
+find_match_count[few]={{current}} fan {{total}} oerienkomsten
+find_match_count[many]={{current}} fan {{total}} oerienkomsten
+find_match_count[other]={{current}} fan {{total}} oerienkomsten
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Mear as {{limit}} oerienkomsten
+find_match_count_limit[one]=Mear as {{limit}} oerienkomst
+find_match_count_limit[two]=Mear as {{limit}} oerienkomsten
+find_match_count_limit[few]=Mear as {{limit}} oerienkomsten
+find_match_count_limit[many]=Mear as {{limit}} oerienkomsten
+find_match_count_limit[other]=Mear as {{limit}} oerienkomsten
+find_not_found=Tekst net fûn
+
+# Error panel labels
+error_more_info=Mear ynformaasje
+error_less_info=Minder ynformaasje
+error_close=Slute
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js f{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Berjocht: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stack: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Bestân: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Rigel: {{line}}
+rendering_error=Der is in flater bard by it renderjen fan de side.
+
+# Predefined zoom values
+page_scale_width=Sidebreedte
+page_scale_fit=Hiele side
+page_scale_auto=Automatysk zoome
+page_scale_actual=Werklike grutte
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Flater
+loading_error=Der is in flater bard by it laden fan de PDF.
+invalid_file_error=Ynfalide of korruptearre PDF-bestân.
+missing_file_error=PDF-bestân ûntbrekt.
+unexpected_response_error=Unferwacht serverantwurd.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}}-annotaasje]
+password_label=Jou it wachtwurd om dit PDF-bestân te iepenjen.
+password_invalid=Ferkeard wachtwurd. Probearje opnij.
+password_ok=OK
+password_cancel=Annulearje
+
+printing_not_supported=Warning: Printen is net folslein stipe troch dizze browser.
+printing_not_ready=Warning: PDF is net folslein laden om ôf te drukken.
+web_fonts_disabled=Weblettertypen binne útskeakele: gebrûk fan ynsluten PDF-lettertypen is net mooglik.
+document_colors_not_allowed=PDF-dokuminten meie harren eigen kleuren net brûke: ‘Siden tastean om harren eigen kleuren te kiezen’ is útskeakele yn de browser.
diff --git a/js/pdfjs/web/locale/ga-IE/viewer.properties b/js/pdfjs/web/locale/ga-IE/viewer.properties
new file mode 100644
index 0000000..62f1a55
--- /dev/null
+++ b/js/pdfjs/web/locale/ga-IE/viewer.properties
@@ -0,0 +1,184 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=An Leathanach Roimhe Seo
+previous_label=Roimhe Seo
+next.title=An Chéad Leathanach Eile
+next_label=Ar Aghaidh
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Leathanach
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=as {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} as {{pagesCount}})
+
+zoom_out.title=Súmáil Amach
+zoom_out_label=Súmáil Amach
+zoom_in.title=Súmáil Isteach
+zoom_in_label=Súmáil Isteach
+zoom.title=Súmáil
+presentation_mode.title=Úsáid an Mód Láithreoireachta
+presentation_mode_label=Mód Láithreoireachta
+open_file.title=Oscail Comhad
+open_file_label=Oscail
+print.title=Priontáil
+print_label=Priontáil
+download.title=Ãoslódáil
+download_label=Ãoslódáil
+bookmark.title=An t-amharc reatha (cóipeáil nó oscail i bhfuinneog nua)
+bookmark_label=An tAmharc Reatha
+
+# Secondary toolbar and context menu
+tools.title=Uirlisí
+tools_label=Uirlisí
+first_page.title=Go dtí an chéad leathanach
+first_page.label=Go dtí an chéad leathanach
+first_page_label=Go dtí an chéad leathanach
+last_page.title=Go dtí an leathanach deiridh
+last_page.label=Go dtí an leathanach deiridh
+last_page_label=Go dtí an leathanach deiridh
+page_rotate_cw.title=Rothlaigh ar deiseal
+page_rotate_cw.label=Rothlaigh ar deiseal
+page_rotate_cw_label=Rothlaigh ar deiseal
+page_rotate_ccw.title=Rothlaigh ar tuathal
+page_rotate_ccw.label=Rothlaigh ar tuathal
+page_rotate_ccw_label=Rothlaigh ar tuathal
+
+cursor_text_select_tool.title=Cumasaigh an Uirlis Roghnaithe Téacs
+cursor_text_select_tool_label=Uirlis Roghnaithe Téacs
+cursor_hand_tool.title=Cumasaigh an Uirlis Láimhe
+cursor_hand_tool_label=Uirlis Láimhe
+
+# Document properties dialog box
+document_properties.title=Airíonna na Cáipéise…
+document_properties_label=Airíonna na Cáipéise…
+document_properties_file_name=Ainm an chomhaid:
+document_properties_file_size=Méid an chomhaid:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} kB ({{size_b}} beart)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} beart)
+document_properties_title=Teideal:
+document_properties_author=Údar:
+document_properties_subject=Ãbhar:
+document_properties_keywords=Eochairfhocail:
+document_properties_creation_date=Dáta Cruthaithe:
+document_properties_modification_date=Dáta Athraithe:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Cruthaitheoir:
+document_properties_producer=Cruthaitheoir an PDF:
+document_properties_version=Leagan PDF:
+document_properties_page_count=Líon Leathanach:
+document_properties_close=Dún
+
+print_progress_message=Cáipéis á hullmhú le priontáil…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Cealaigh
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Scoránaigh an Barra Taoibh
+toggle_sidebar_notification.title=Scoránaigh an Barra Taoibh (achoimre/iatáin sa cháipéis)
+toggle_sidebar_label=Scoránaigh an Barra Taoibh
+document_outline.title=Taispeáin Imlíne na Cáipéise (déchliceáil chun chuile rud a leathnú nó a laghdú)
+document_outline_label=Creatlach na Cáipéise
+attachments.title=Taispeáin Iatáin
+attachments_label=Iatáin
+thumbs.title=Taispeáin Mionsamhlacha
+thumbs_label=Mionsamhlacha
+findbar.title=Aimsigh sa Cháipéis
+findbar_label=Aimsigh
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Leathanach {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Mionsamhail Leathanaigh {{page}}
+
+# Find panel button title and messages
+find_input.title=Aimsigh
+find_input.placeholder=Aimsigh sa cháipéis…
+find_previous.title=Aimsigh an sampla roimhe seo den nath seo
+find_previous_label=Roimhe seo
+find_next.title=Aimsigh an chéad sampla eile den nath sin
+find_next_label=Ar aghaidh
+find_highlight=Aibhsigh uile
+find_match_case_label=Cásíogair
+find_reached_top=Ag barr na cáipéise, ag leanúint ón mbun
+find_reached_bottom=Ag bun na cáipéise, ag leanúint ón mbarr
+find_not_found=Frása gan aimsiú
+
+# Error panel labels
+error_more_info=Tuilleadh Eolais
+error_less_info=Níos Lú Eolais
+error_close=Dún
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Teachtaireacht: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Cruach: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Comhad: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Líne: {{line}}
+rendering_error=Tharla earráid agus an leathanach á leagan amach.
+
+# Predefined zoom values
+page_scale_width=Leithead Leathanaigh
+page_scale_fit=Laghdaigh go dtí an Leathanach
+page_scale_auto=Súmáil Uathoibríoch
+page_scale_actual=Fíormhéid
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Earráid
+loading_error=Tharla earráid agus an cháipéis PDF á lódáil.
+invalid_file_error=Comhad neamhbhailí nó truaillithe PDF.
+missing_file_error=Comhad PDF ar iarraidh.
+unexpected_response_error=Freagra ón bhfreastalaí nach rabhthas ag súil leis.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Anótáil {{type}}]
+password_label=Cuir an focal faire isteach chun an comhad PDF seo a oscailt.
+password_invalid=Focal faire mícheart. Déan iarracht eile.
+password_ok=OK
+password_cancel=Cealaigh
+
+printing_not_supported=Rabhadh: Ní thacaíonn an brabhsálaí le priontáil go hiomlán.
+printing_not_ready=Rabhadh: Ní féidir an PDF a phriontáil go dtí go mbeidh an cháipéis iomlán lódáilte.
+web_fonts_disabled=Tá clófhoirne Gréasáin díchumasaithe: ní féidir clófhoirne leabaithe PDF a úsáid.
+document_colors_not_allowed=Níl cead ag cáipéisí PDF a ndathanna féin a roghnú: tá “Tabhair cead do leathanaigh a ndathanna féin a roghnú†díchumasaithe sa mbrabhsálaí.
diff --git a/js/pdfjs/web/locale/gd/viewer.properties b/js/pdfjs/web/locale/gd/viewer.properties
new file mode 100644
index 0000000..2712568
--- /dev/null
+++ b/js/pdfjs/web/locale/gd/viewer.properties
@@ -0,0 +1,242 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=An duilleag roimhe
+previous_label=Air ais
+next.title=An ath-dhuilleag
+next_label=Air adhart
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Duilleag
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=à {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} à {{pagesCount}})
+
+zoom_out.title=Sùm a-mach
+zoom_out_label=Sùm a-mach
+zoom_in.title=Sùm a-steach
+zoom_in_label=Sùm a-steach
+zoom.title=Sùm
+presentation_mode.title=Gearr leum dhan mhodh taisbeanaidh
+presentation_mode_label=Am modh taisbeanaidh
+open_file.title=Fosgail faidhle
+open_file_label=Fosgail
+print.title=Clò-bhuail
+print_label=Clò-bhuail
+download.title=Luchdaich a-nuas
+download_label=Luchdaich a-nuas
+bookmark.title=An sealladh làithreach (dèan lethbhreac no fosgail e ann an uinneag ùr)
+bookmark_label=An sealladh làithreach
+
+# Secondary toolbar and context menu
+tools.title=Innealan
+tools_label=Innealan
+first_page.title=Rach gun chiad duilleag
+first_page.label=Rach gun chiad duilleag
+first_page_label=Rach gun chiad duilleag
+last_page.title=Rach gun duilleag mu dheireadh
+last_page.label=Rach gun duilleag mu dheireadh
+last_page_label=Rach gun duilleag mu dheireadh
+page_rotate_cw.title=Cuairtich gu deiseil
+page_rotate_cw.label=Cuairtich gu deiseil
+page_rotate_cw_label=Cuairtich gu deiseil
+page_rotate_ccw.title=Cuairtich gu tuathail
+page_rotate_ccw.label=Cuairtich gu tuathail
+page_rotate_ccw_label=Cuairtich gu tuathail
+
+cursor_text_select_tool.title=Cuir an comas inneal taghadh an teacsa
+cursor_text_select_tool_label=Inneal taghadh an teacsa
+cursor_hand_tool.title=Cuir inneal na làimhe an comas
+cursor_hand_tool_label=Inneal na làimhe
+
+scroll_vertical.title=Cleachd sgroladh inghearach
+scroll_vertical_label=Sgroladh inghearach
+scroll_horizontal.title=Cleachd sgroladh còmhnard
+scroll_horizontal_label=Sgroladh còmhnard
+scroll_wrapped.title=Cleachd sgroladh paisgte
+scroll_wrapped_label=Sgroladh paisgte
+
+spread_none.title=Na cuir còmhla sgoileadh dhuilleagan
+spread_none_label=Gun sgaoileadh dhuilleagan
+spread_odd.title=Cuir còmhla duilleagan sgaoilte a thòisicheas le duilleagan aig a bheil àireamh chorr
+spread_odd_label=Sgaoileadh dhuilleagan corra
+spread_even.title=Cuir còmhla duilleagan sgaoilte a thòisicheas le duilleagan aig a bheil àireamh chothrom
+spread_even_label=Sgaoileadh dhuilleagan cothrom
+
+# Document properties dialog box
+document_properties.title=Roghainnean na sgrìobhainne…
+document_properties_label=Roghainnean na sgrìobhainne…
+document_properties_file_name=Ainm an fhaidhle:
+document_properties_file_size=Meud an fhaidhle:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Tiotal:
+document_properties_author=Ùghdar:
+document_properties_subject=Cuspair:
+document_properties_keywords=Faclan-luirg:
+document_properties_creation_date=Latha a chruthachaidh:
+document_properties_modification_date=Latha atharrachaidh:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Cruthadair:
+document_properties_producer=Saothraiche a' PDF:
+document_properties_version=Tionndadh a' PDF:
+document_properties_page_count=Àireamh de dhuilleagan:
+document_properties_page_size=Meud na duilleige:
+document_properties_page_size_unit_inches=ann an
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=portraid
+document_properties_page_size_orientation_landscape=dreach-tìre
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Litir
+document_properties_page_size_name_legal=Laghail
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Grad shealladh-lìn:
+document_properties_linearized_yes=Tha
+document_properties_linearized_no=Chan eil
+document_properties_close=Dùin
+
+print_progress_message=Ag ullachadh na sgrìobhainn airson clò-bhualadh…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Sguir dheth
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Toglaich am bàr-taoibh
+toggle_sidebar_notification.title=Toglaich am bàr-taoibh (tha oir-loidhne/ceanglachain aig an sgrìobhainn)
+toggle_sidebar_label=Toglaich am bàr-taoibh
+document_outline.title=Seall oir-loidhne na sgrìobhainn (dèan briogadh dùbailte airson a h-uile nì a leudachadh/a cho-theannadh)
+document_outline_label=Oir-loidhne na sgrìobhainne
+attachments.title=Seall na ceanglachain
+attachments_label=Ceanglachain
+thumbs.title=Seall na dealbhagan
+thumbs_label=Dealbhagan
+findbar.title=Lorg san sgrìobhainn
+findbar_label=Lorg
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Duilleag a {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Dealbhag duilleag a {{page}}
+
+# Find panel button title and messages
+find_input.title=Lorg
+find_input.placeholder=Lorg san sgrìobhainn...
+find_previous.title=Lorg làthair roimhe na h-abairt seo
+find_previous_label=Air ais
+find_next.title=Lorg ath-làthair na h-abairt seo
+find_next_label=Air adhart
+find_highlight=Soillsich a h-uile
+find_match_case_label=Aire do litrichean mòra is beaga
+find_entire_word_label=Faclan-slàna
+find_reached_top=Ràinig sinn barr na duilleige, a' leantainn air adhart o bhonn na duilleige
+find_reached_bottom=Ràinig sinn bonn na duilleige, a' leantainn air adhart o bharr na duilleige
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} à {{total}} mhaids
+find_match_count[two]={{current}} à {{total}} mhaids
+find_match_count[few]={{current}} à {{total}} maidsichean
+find_match_count[many]={{current}} à {{total}} maids
+find_match_count[other]={{current}} à {{total}} maids
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Barrachd air {{limit}} maids
+find_match_count_limit[one]=Barrachd air {{limit}} mhaids
+find_match_count_limit[two]=Barrachd air {{limit}} mhaids
+find_match_count_limit[few]=Barrachd air {{limit}} maidsichean
+find_match_count_limit[many]=Barrachd air {{limit}} maids
+find_match_count_limit[other]=Barrachd air {{limit}} maids
+find_not_found=Cha deach an abairt a lorg
+
+# Error panel labels
+error_more_info=Barrachd fiosrachaidh
+error_less_info=Nas lugha de dh'fhiosrachadh
+error_close=Dùin
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Teachdaireachd: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stac: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Faidhle: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Loidhne: {{line}}
+rendering_error=Thachair mearachd rè reandaradh na duilleige.
+
+# Predefined zoom values
+page_scale_width=Leud na duilleige
+page_scale_fit=Freagair ri meud na duilleige
+page_scale_auto=Sùm fèin-obrachail
+page_scale_actual=Am fìor-mheud
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Mearachd
+loading_error=Thachair mearachd rè luchdadh a' PDF.
+invalid_file_error=Faidhle PDF a tha mì-dhligheach no coirbte.
+missing_file_error=Faidhle PDF a tha a dhìth.
+unexpected_response_error=Freagairt on fhrithealaiche ris nach robh dùil.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Nòtachadh {{type}}]
+password_label=Cuir a-steach am facal-faire gus am faidhle PDF seo fhosgladh.
+password_invalid=Tha am facal-faire cearr. Nach fheuch thu ris a-rithist?
+password_ok=Ceart ma-tha
+password_cancel=Sguir dheth
+
+printing_not_supported=Rabhadh: Chan eil am brabhsair seo a' cur làn-taic ri clò-bhualadh.
+printing_not_ready=Rabhadh: Cha deach am PDF a luchdadh gu tur airson clò-bhualadh.
+web_fonts_disabled=Tha cruthan-clò lìn à comas: Chan urrainn dhuinn cruthan-clò PDF leabaichte a chleachdadh.
+document_colors_not_allowed=Chan fhaod sgrìobhainnean PDF na dathan aca fhèin a chleachdadh: Tha “Leig le duilleagan na dathan aca fhèin a chleachdadh†à comas sa bhrabhsair.
diff --git a/js/pdfjs/web/locale/gl/viewer.properties b/js/pdfjs/web/locale/gl/viewer.properties
new file mode 100644
index 0000000..187dbf1
--- /dev/null
+++ b/js/pdfjs/web/locale/gl/viewer.properties
@@ -0,0 +1,242 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Páxina anterior
+previous_label=Anterior
+next.title=Seguinte páxina
+next_label=Seguinte
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Páxina
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=de {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} de {{pagesCount}})
+
+zoom_out.title=Reducir
+zoom_out_label=Reducir
+zoom_in.title=Ampliar
+zoom_in_label=Ampliar
+zoom.title=Zoom
+presentation_mode.title=Cambiar ao modo presentación
+presentation_mode_label=Modo presentación
+open_file.title=Abrir ficheiro
+open_file_label=Abrir
+print.title=Imprimir
+print_label=Imprimir
+download.title=Descargar
+download_label=Descargar
+bookmark.title=Vista actual (copiar ou abrir nunha nova xanela)
+bookmark_label=Vista actual
+
+# Secondary toolbar and context menu
+tools.title=Ferramentas
+tools_label=Ferramentas
+first_page.title=Ir á primeira páxina
+first_page.label=Ir á primeira páxina
+first_page_label=Ir á primeira páxina
+last_page.title=Ir á última páxina
+last_page.label=Ir á última páxina
+last_page_label=Ir á última páxina
+page_rotate_cw.title=Rotar no sentido das agullas do reloxo
+page_rotate_cw.label=Rotar no sentido das agullas do reloxo
+page_rotate_cw_label=Rotar no sentido das agullas do reloxo
+page_rotate_ccw.title=Rotar no sentido contrario ás agullas do reloxo
+page_rotate_ccw.label=Rotar no sentido contrario ás agullas do reloxo
+page_rotate_ccw_label=Rotar no sentido contrario ás agullas do reloxo
+
+cursor_text_select_tool.title=Activar a ferramenta de selección de texto
+cursor_text_select_tool_label=Ferramenta de selección de texto
+cursor_hand_tool.title=Activar a ferramenta man
+cursor_hand_tool_label=Ferramenta man
+
+scroll_vertical.title=Usar o desprazamento vertical
+scroll_vertical_label=Desprazamento vertical
+scroll_horizontal.title=Usar o desprazamento horizontal
+scroll_horizontal_label=Desprazamento horizontal
+scroll_wrapped.title=Usar desprazamento en bloque
+scroll_wrapped_label=Desprazamento en bloque
+
+spread_none.title=Non agrupar páxinas
+spread_none_label=Ningún agrupamento
+spread_odd.title=Crea grupo de páxinas que comezan con números de páxina impares
+spread_odd_label=Agrupamento impar
+spread_even.title=Crea grupo de páxinas que comezan con números de páxina pares
+spread_even_label=Agrupamento par
+
+# Document properties dialog box
+document_properties.title=Propiedades do documento…
+document_properties_label=Propiedades do documento…
+document_properties_file_name=Nome do ficheiro:
+document_properties_file_size=Tamaño do ficheiro:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Título:
+document_properties_author=Autor:
+document_properties_subject=Asunto:
+document_properties_keywords=Palabras clave:
+document_properties_creation_date=Data de creación:
+document_properties_modification_date=Data de modificación:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Creado por:
+document_properties_producer=Xenerador do PDF:
+document_properties_version=Versión de PDF:
+document_properties_page_count=Número de páxinas:
+document_properties_page_size=Tamaño da páxina:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=Vertical
+document_properties_page_size_orientation_landscape=Horizontal
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Carta
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Visualización rápida das páxinas web:
+document_properties_linearized_yes=Si
+document_properties_linearized_no=Non
+document_properties_close=Pechar
+
+print_progress_message=Preparando documento para imprimir…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Cancelar
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Amosar/agochar a barra lateral
+toggle_sidebar_notification.title=Amosar/agochar a barra lateral (o documento contén un esquema ou anexos)
+toggle_sidebar_label=Amosar/agochar a barra lateral
+document_outline.title=Amosar o esquema do documento (prema dúas veces para expandir/contraer todos os elementos)
+document_outline_label=Esquema do documento
+attachments.title=Amosar anexos
+attachments_label=Anexos
+thumbs.title=Amosar miniaturas
+thumbs_label=Miniaturas
+findbar.title=Atopar no documento
+findbar_label=Atopar
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Páxina {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniatura da páxina {{page}}
+
+# Find panel button title and messages
+find_input.title=Atopar
+find_input.placeholder=Atopar no documento…
+find_previous.title=Atopar a anterior aparición da frase
+find_previous_label=Anterior
+find_next.title=Atopar a seguinte aparición da frase
+find_next_label=Seguinte
+find_highlight=Realzar todo
+find_match_case_label=Diferenciar maiúsculas de minúsculas
+find_entire_word_label=Palabras completas
+find_reached_top=Chegouse ao inicio do documento, continuar desde o final
+find_reached_bottom=Chegouse ao final do documento, continuar desde o inicio
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} de {{total}} coincidencia
+find_match_count[two]={{current}} de {{total}} coincidencias
+find_match_count[few]={{current}} de {{total}} coincidencias
+find_match_count[many]={{current}} de {{total}} coincidencias
+find_match_count[other]={{current}} de {{total}} coincidencias
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Máis de {{limit}} coincidencias
+find_match_count_limit[one]=Máis de {{limit}} coincidencia
+find_match_count_limit[two]=Máis de {{limit}} coincidencias
+find_match_count_limit[few]=Máis de {{limit}} coincidencias
+find_match_count_limit[many]=Máis de {{limit}} coincidencias
+find_match_count_limit[other]=Máis de {{limit}} coincidencias
+find_not_found=Non se atopou a frase
+
+# Error panel labels
+error_more_info=Máis información
+error_less_info=Menos información
+error_close=Pechar
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (Identificador da compilación: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Mensaxe: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Pila: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Ficheiro: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Liña: {{line}}
+rendering_error=Produciuse un erro ao representar a páxina.
+
+# Predefined zoom values
+page_scale_width=Largura da páxina
+page_scale_fit=Axuste de páxina
+page_scale_auto=Zoom automático
+page_scale_actual=Tamaño actual
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Erro
+loading_error=Produciuse un erro ao cargar o PDF.
+invalid_file_error=Ficheiro PDF danado ou non válido.
+missing_file_error=Falta o ficheiro PDF.
+unexpected_response_error=Resposta inesperada do servidor.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Anotación {{type}}]
+password_label=Escriba o contrasinal para abrir este ficheiro PDF.
+password_invalid=Contrasinal incorrecto. Tente de novo.
+password_ok=Aceptar
+password_cancel=Cancelar
+
+printing_not_supported=Aviso: A impresión non é compatíbel de todo con este navegador.
+printing_not_ready=Aviso: O PDF non se cargou completamente para imprimirse.
+web_fonts_disabled=Desactiváronse as fontes web: foi imposíbel usar as fontes incrustadas no PDF.
+document_colors_not_allowed=Os documentos PDF non poden usar as súas propias cores: «Permitir que as páxinas escollan as súas propias cores» está desactivado no navegador.
diff --git a/js/pdfjs/web/locale/gn/viewer.properties b/js/pdfjs/web/locale/gn/viewer.properties
new file mode 100644
index 0000000..e5652d7
--- /dev/null
+++ b/js/pdfjs/web/locale/gn/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Kuatiarogue mboyvegua
+previous_label=Mboyvegua
+next.title=Kuatiarogue upeigua
+next_label=Upeigua
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Kuatiarogue
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages={{pagesCount}} gui
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} of {{pagesCount}})
+
+zoom_out.title=Momichĩ
+zoom_out_label=Momichĩ
+zoom_in.title=Mbotuicha
+zoom_in_label=Mbotuicha
+zoom.title=Tuichakue
+presentation_mode.title=Jehechauka reko moambue
+presentation_mode_label=Jehechauka reko
+open_file.title=Marandurendápe jeike
+open_file_label=Jeike
+print.title=Monguatia
+print_label=Monguatia
+download.title=Mboguejy
+download_label=Mboguejy
+bookmark.title=Ag̃agua jehecha (mbohasarã térã eike peteĩ ovetã pyahúpe)
+bookmark_label=Ag̃agua jehecha
+
+# Secondary toolbar and context menu
+tools.title=Tembipuru
+tools_label=Tembipuru
+first_page.title=Kuatiarogue ñepyrũme jeho
+first_page.label=Kuatiarogue ñepyrũme jeho
+first_page_label=Kuatiarogue ñepyrũme jeho
+last_page.title=Kuatiarogue pahápe jeho
+last_page.label=Kuatiarogue pahápe jeho
+last_page_label=Kuatiarogue pahápe jeho
+page_rotate_cw.title=Aravóicha mbojere
+page_rotate_cw.label=Aravóicha mbojere
+page_rotate_cw_label=Aravóicha mbojere
+page_rotate_ccw.title=Aravo rapykue gotyo mbojere
+page_rotate_ccw.label=Aravo rapykue gotyo mbojere
+page_rotate_ccw_label=Aravo rapykue gotyo mbojere
+
+cursor_text_select_tool.title=Emyandy moñe'ẽrã jeporavo rembipuru
+cursor_text_select_tool_label=Moñe'ẽrã jeporavo rembipuru
+cursor_hand_tool.title=Tembipuru po pegua myandy
+cursor_hand_tool_label=Tembipuru po pegua
+
+scroll_vertical.title=Eipuru jeku’e ykeguáva
+scroll_vertical_label=Jeku’e ykeguáva
+scroll_horizontal.title=Eipuru jeku’e yvate gotyo
+scroll_horizontal_label=Jeku’e yvate gotyo
+scroll_wrapped.title=Eipuru jeku’e mbohyrupyre
+scroll_wrapped_label=Jeku’e mbohyrupyre
+
+spread_none.title=Ani ejuaju spreads kuatiarogue ndive
+spread_none_label=Spreads ỹre
+spread_odd.title=Embojuaju kuatiarogue jepysokue eñepyrũvo kuatiarogue impar-vagui
+spread_odd_label=Spreads impar
+spread_even.title=Embojuaju kuatiarogue jepysokue eñepyrũvo kuatiarogue par-vagui
+spread_even_label=Ipukuve uvei
+
+# Document properties dialog box
+document_properties.title=Kuatia mba'etee…
+document_properties_label=Kuatia mba'etee…
+document_properties_file_name=Marandurenda réra:
+document_properties_file_size=Marandurenda tuichakue:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Teratee:
+document_properties_author=Apohára:
+document_properties_subject=Mba'egua:
+document_properties_keywords=Jehero:
+document_properties_creation_date=Teñoihague arange:
+document_properties_modification_date=Iñambue hague arange:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Apo'ypyha:
+document_properties_producer=PDF mbosako'iha:
+document_properties_version=PDF mbojuehegua:
+document_properties_page_count=Kuatiarogue papapy:
+document_properties_page_size=Kuatiarogue tuichakue:
+document_properties_page_size_unit_inches=Amo
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=Oĩháicha
+document_properties_page_size_orientation_landscape=apaisado
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Kuatiañe'ẽ
+document_properties_page_size_name_legal=Tee
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Ñanduti jahecha pya’e:
+document_properties_linearized_yes=Añete
+document_properties_linearized_no=Ahániri
+document_properties_close=Mboty
+
+print_progress_message=Embosako'i kuatia emonguatia hag̃ua…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Heja
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Tenda yke moambue
+toggle_sidebar_notification.title=Embojopyru tenda ykegua (kuatia oguereko kora/marandurenda moirũha)
+toggle_sidebar_label=Tenda yke moambue
+document_outline.title=Ehechauka kuatia rape (eikutu mokõi jey embotuicha/emomichĩ hag̃ua opavavete mba'epuru)
+document_outline_label=Kuatia apopyre
+attachments.title=Moirũha jehechauka
+attachments_label=Moirũha
+thumbs.title=Mba'emirĩ jehechauka
+thumbs_label=Mba'emirĩ
+findbar.title=Kuatiápe jeheka
+findbar_label=Juhu
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Kuatiarogue {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Kuatiarogue {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Kuatiarogue mba'emirĩ {{page}}
+
+# Find panel button title and messages
+find_input.title=Juhu
+find_input.placeholder=Kuatiápe jejuhu…
+find_previous.title=Ejuhu ñe'ẽrysýi osẽ'ypy hague
+find_previous_label=Mboyvegua
+find_next.title=Eho ñe'ẽ juhupyre upeiguávape
+find_next_label=Upeigua
+find_highlight=Embojekuaavepa
+find_match_case_label=Ejesareko taiguasu/taimichĩre
+find_entire_word_label=Ñe’ẽ oĩmbáva
+find_reached_top=Ojehupyty kuatia ñepyrũ, oku'ejeýta kuatia paha guive
+find_reached_bottom=Ojehupyty kuatia paha, oku'ejeýta kuatia ñepyrũ guive
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} {{total}} ojojoguáva
+find_match_count[two]={{current}} {{total}} ojojoguáva
+find_match_count[few]={{current}} {{total}} ojojoguáva
+find_match_count[many]={{current}} {{total}} ojojoguáva
+find_match_count[other]={{current}} {{total}} ojojoguáva
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Hetave {{limit}} ojojoguáva
+find_match_count_limit[one]=Hetave {{limit}} ojojogua
+find_match_count_limit[two]=Hetave {{limit}} ojojoguáva
+find_match_count_limit[few]=Hetave {{limit}} ojojoguáva
+find_match_count_limit[many]=Hetave {{limit}} ojojoguáva
+find_match_count_limit[other]=Hetave {{limit}} ojojoguáva
+find_not_found=Ñe'ẽrysýi ojejuhu'ỹva
+
+# Error panel labels
+error_more_info=Maranduve
+error_less_info=Sa'ive marandu
+error_close=Mboty
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Ñe'ẽmondo: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Mbojo'apy: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Marandurenda: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Tairenda: {{line}}
+rendering_error=Oiko jejavy ehechaukasévo kuatiarogue.
+
+# Predefined zoom values
+page_scale_width=Kuatiarogue pekue
+page_scale_fit=Kuatiarogue ñemoĩporã
+page_scale_auto=Tuichakue ijeheguíva
+page_scale_actual=Tuichakue ag̃agua
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Oĩvaíva
+loading_error=Oiko jejavy PDF oñemyeñyhẽnguévo.
+invalid_file_error=PDF marandurenda ndoikóiva térã ivaipyréva.
+missing_file_error=Ndaipóri PDF marandurenda
+unexpected_response_error=Mohendahavusu mbohovái ñeha'arõ'ỹva.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Jehaipy {{type}}]
+password_label=Emoinge ñe'ẽñemi eipe'a hag̃ua ko marandurenda PDF.
+password_invalid=Ñe'ẽñemi ndoikóiva. Eha'ã jey.
+password_ok=MONEĨ
+password_cancel=Heja
+
+printing_not_supported=Kyhyjerã: Ñembokuatia ndojokupytypái ko kundahára ndive.
+printing_not_ready=Kyhyjerã: Ko PDF nahenyhẽmbái oñembokuatia hag̃uáicha.
+web_fonts_disabled=Ñanduti taity oñemongéma: ndaikatumo'ãi eipuru PDF jehai'íva taity.
+document_colors_not_allowed=Kuatiakuéra PDF ndaikatúi oipuru isa'ykuéra tee: “Emoneĩ kuatiaroguépe toiporavo isa'ykuéra tee†oñemongehína kundahárape.
diff --git a/js/pdfjs/web/locale/gu-IN/viewer.properties b/js/pdfjs/web/locale/gu-IN/viewer.properties
new file mode 100644
index 0000000..cce4bec
--- /dev/null
+++ b/js/pdfjs/web/locale/gu-IN/viewer.properties
@@ -0,0 +1,242 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=પહેલાનૠપાનà«àª‚
+previous_label=પહેલાનà«
+next.title=આગળનૠપાનà«àª‚
+next_label=આગળનà«àª‚
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=પાનà«àª‚
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=નો {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} નો {{pagesCount}})
+
+zoom_out.title=મોટૠકરો
+zoom_out_label=મોટૠકરો
+zoom_in.title=નાનà«àª‚ કરો
+zoom_in_label=નાનà«àª‚ કરો
+zoom.title=નાનà«àª‚ મોટૠકરો
+presentation_mode.title=રજૂઆત સà«àª¥àª¿àª¤àª¿àª®àª¾àª‚ જાવ
+presentation_mode_label=રજૂઆત સà«àª¥àª¿àª¤àª¿
+open_file.title=ફાઇલ ખોલો
+open_file_label=ખોલો
+print.title=છાપો
+print_label=છારો
+download.title=ડાઉનલોડ
+download_label=ડાઉનલોડ
+bookmark.title=વરà«àª¤àª®àª¾àª¨ દૃશà«àª¯ (નવી વિનà«àª¡à«‹àª®àª¾àª‚ નકલ કરો અથવા ખોલો)
+bookmark_label=વરà«àª¤àª®àª¾àª¨ દૃશà«àª¯
+
+# Secondary toolbar and context menu
+tools.title=સાધનો
+tools_label=સાધનો
+first_page.title=પહેલાં પાનામાં જાવ
+first_page.label=પહેલાં પાનામાં જાવ
+first_page_label=પà«àª°àª¥àª® પાનાં પર જાવ
+last_page.title=છેલà«àª²àª¾ પાનાં પર જાવ
+last_page.label=છેલà«àª²àª¾ પાનામાં જાવ
+last_page_label=છેલà«àª²àª¾ પાનાં પર જાવ
+page_rotate_cw.title=ઘડિયાળનાં કાંટા તરફ ફેરવો
+page_rotate_cw.label=ઘડિયાળનાં કાંટાની જેમ ફેરવો
+page_rotate_cw_label=ઘડિયાળનાં કાંટા તરફ ફેરવો
+page_rotate_ccw.title=ઘડિયાળનાં કાંટાની ઉલટી દિશામાં ફેરવો
+page_rotate_ccw.label=ઘડિયાળનાં કાંટાની ઉલટી દિશામાં ફેરવો
+page_rotate_ccw_label=ઘડિયાળનાં કાંટાની વિરà«àª¦à«àª¦ ફેરવો
+
+cursor_text_select_tool.title=ટેકà«àª¸à«àªŸ પસંદગી ટૂલ સકà«àª·àª® કરો
+cursor_text_select_tool_label=ટેકà«àª¸à«àªŸ પસંદગી ટૂલ
+cursor_hand_tool.title=હાથનાં સાધનને સકà«àª°àª¿àª¯ કરો
+cursor_hand_tool_label=હેનà«àª¡ ટૂલ
+
+scroll_vertical.title=ઊભી સà«àª•à«àª°à«‹àª²àª¿àª‚ગનો ઉપયોગ કરો
+scroll_vertical_label=ઊભી સà«àª•à«àª°à«‹àª²àª¿àª‚ગ
+scroll_horizontal.title=આડી સà«àª•à«àª°à«‹àª²àª¿àª‚ગનો ઉપયોગ કરો
+scroll_horizontal_label=આડી સà«àª•à«àª°à«‹àª²àª¿àª‚ગ
+scroll_wrapped.title=આવરિત સà«àª•à«àª°à«‹àª²àª¿àª‚ગનો ઉપયોગ કરો
+scroll_wrapped_label=આવરિત સà«àª•à«àª°à«‹àª²àª¿àª‚ગ
+
+spread_none.title=પૃષà«àª  સà«àªªà«àª°à«‡àª¡àª®àª¾àª‚ જોડાવશો નહીં
+spread_none_label=કોઈ સà«àªªà«àª°à«‡àª¡ નથી
+spread_odd.title=àªàª•à«€-કà«àª°àª®àª¾àª‚કિત પૃષà«àª à«‹ સાથે પà«àª°àª¾àª°àª‚ભ થતાં પૃષà«àª  સà«àªªà«àª°à«‡àª¡àª®àª¾àª‚ જોડાઓ
+spread_odd_label=àªàª•à«€ સà«àªªà«àª°à«‡àª¡à«àª¸
+spread_even.title=નંબર-કà«àª°àª®àª¾àª‚કિત પૃષà«àª à«‹àª¥à«€ શરૂ થતાં પૃષà«àª  સà«àªªà«àª°à«‡àª¡àª®àª¾àª‚ જોડાઓ
+spread_even_label=સરખà«àª‚ ફેલાવવà«àª‚
+
+# Document properties dialog box
+document_properties.title=દસà«àª¤àª¾àªµà«‡àªœ ગà«àª£àª§àª°à«àª®à«‹â€¦
+document_properties_label=દસà«àª¤àª¾àªµà«‡àªœ ગà«àª£àª§àª°à«àª®à«‹â€¦
+document_properties_file_name=ફાઇલ નામ:
+document_properties_file_size=ફાઇલ માપ:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} બાઇટ)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} બાઇટ)
+document_properties_title=શીરà«àª·àª•:
+document_properties_author=લેખક:
+document_properties_subject=વિષય:
+document_properties_keywords=કિવરà«àª¡:
+document_properties_creation_date=નિરà«àª®àª¾àª£ તારીખ:
+document_properties_modification_date=ફેરફાર તારીખ:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=નિરà«àª®àª¾àª¤àª¾:
+document_properties_producer=PDF નિરà«àª®àª¾àª¤àª¾:
+document_properties_version=PDF આવૃતà«àª¤àª¿:
+document_properties_page_count=પાનાં ગણતરી:
+document_properties_page_size=પૃષà«àª àª¨à«àª‚ કદ:
+document_properties_page_size_unit_inches=ઇંચ
+document_properties_page_size_unit_millimeters=મીમી
+document_properties_page_size_orientation_portrait=ઉભà«àª‚
+document_properties_page_size_orientation_landscape=આડà«
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=પતà«àª°
+document_properties_page_size_name_legal=કાયદાકીય
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=àªàª¡àªªà«€ વૅબ દૃશà«àª¯:
+document_properties_linearized_yes=હા
+document_properties_linearized_no=ના
+document_properties_close=બંધ કરો
+
+print_progress_message=છાપકામ માટે દસà«àª¤àª¾àªµà«‡àªœ તૈયાર કરી રહà«àª¯àª¾ છે…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=રદ કરો
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=ટૉગલ બાજà«àªªàªŸà«àªŸà«€
+toggle_sidebar_notification.title=સાઇડબારને ટૉગલ કરો(દસà«àª¤àª¾àªµà«‡àªœàª¨à«€ રૂપરેખા/જોડાણો શામેલ છે)
+toggle_sidebar_label=ટૉગલ બાજà«àªªàªŸà«àªŸà«€
+document_outline.title=દસà«àª¤àª¾àªµà«‡àªœàª¨à«€ રૂપરેખા બતાવો(બધી આઇટમà«àª¸àª¨à«‡ વિસà«àª¤à«ƒàª¤/સંકà«àªšàª¿àª¤ કરવા માટે ડબલ-કà«àª²àª¿àª• કરો)
+document_outline_label=દસà«àª¤àª¾àªµà«‡àªœ રૂપરેખા
+attachments.title=જોડાણોને બતાવો
+attachments_label=જોડાણો
+thumbs.title=થંબનેલà«àª¸ બતાવો
+thumbs_label=થંબનેલà«àª¸
+findbar.title=દસà«àª¤àª¾àªµà«‡àªœàª®àª¾àª‚ શોધો
+findbar_label=શોધો
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=પાનà«àª‚ {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=પાનાં {{page}} નà«àª‚ થંબનેલà«àª¸
+
+# Find panel button title and messages
+find_input.title=શોધો
+find_input.placeholder=દસà«àª¤àª¾àªµà«‡àªœàª®àª¾àª‚ શોધો…
+find_previous.title=શબà«àª¦àª¸àª®à«‚હની પાછલી ઘટનાને શોધો
+find_previous_label=પહેલાંનà«
+find_next.title=શબà«àª¦àª¸àª®à«‚હની આગળની ઘટનાને શોધો
+find_next_label=આગળનà«àª‚
+find_highlight=બધૠપà«àª°àª•àª¾àª¶àª¿àª¤ કરો
+find_match_case_label=કેસ બંધબેસાડો
+find_entire_word_label=સંપૂરà«àª£ શબà«àª¦à«‹
+find_reached_top=દસà«àª¤àª¾àªµà«‡àªœàª¨àª¾àª‚ ટોચે પહોંચી ગયા, તળિયેથી ચાલૠકરેલ હતà«
+find_reached_bottom=દસà«àª¤àª¾àªµà«‡àªœàª¨àª¾àª‚ અંતે પહોંચી ગયા, ઉપરથી ચાલૠકરેલ હતà«
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{total}} માંથી {{current}} સરખà«àª‚ મળà«àª¯à«àª‚
+find_match_count[two]={{total}} માંથી {{current}} સરખા મળà«àª¯àª¾àª‚
+find_match_count[few]={{total}} માંથી {{current}} સરખા મળà«àª¯àª¾àª‚
+find_match_count[many]={{total}} માંથી {{current}} સરખા મળà«àª¯àª¾àª‚
+find_match_count[other]={{total}} માંથી {{current}} સરખા મળà«àª¯àª¾àª‚
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]={{limit}} કરતાં વધૠસરખા મળà«àª¯àª¾àª‚
+find_match_count_limit[one]={{limit}} કરતાં વધૠસરખà«àª‚ મળà«àª¯à«àª‚
+find_match_count_limit[two]={{limit}} કરતાં વધૠસરખા મળà«àª¯àª¾àª‚
+find_match_count_limit[few]={{limit}} કરતાં વધૠસરખા મળà«àª¯àª¾àª‚
+find_match_count_limit[many]={{limit}} કરતાં વધૠસરખા મળà«àª¯àª¾àª‚
+find_match_count_limit[other]={{limit}} કરતાં વધૠસરખા મળà«àª¯àª¾àª‚
+find_not_found=શબà«àª¦àª¸àª®à«‚હ મળà«àª¯à« નથી
+
+# Error panel labels
+error_more_info=વધારે જાણકારી
+error_less_info=ઓછી જાણકારી
+error_close=બંધ કરો
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=સંદેશો: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=સà«àªŸà«‡àª•: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=ફાઇલ: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=વાકà«àª¯: {{line}}
+rendering_error=ભૂલ ઉદà«àª­àªµà«€ જà«àª¯àª¾àª°à«‡ પાનાંનૠરેનà«àª¡ કરી રહà«àª¯àª¾ હોય.
+
+# Predefined zoom values
+page_scale_width=પાનાની પહોળાઇ
+page_scale_fit=પાનà«àª‚ બંધબેસતà«
+page_scale_auto=આપમેળે નાનà«àª‚મોટૠકરો
+page_scale_actual=ચોકà«àª•àª¸ માપ
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=ભૂલ
+loading_error=ભૂલ ઉદà«àª­àªµà«€ જà«àª¯àª¾àª°à«‡ PDF ને લાવી રહà«àª¯àª¾ હોય.
+invalid_file_error=અયોગà«àª¯ અથવા ભાંગેલ PDF ફાઇલ.
+missing_file_error=ગà«àª® થયેલ PDF ફાઇલ.
+unexpected_response_error=અનપેકà«àª·àª¿àª¤ સરà«àªµàª° પà«àª°àª¤àª¿àª¸àª¾àª¦.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Annotation]
+password_label=આ PDF ફાઇલને ખોલવા પાસવરà«àª¡àª¨à«‡ દાખલ કરો.
+password_invalid=અયોગà«àª¯ પાસવરà«àª¡. મહેરબાની કરીને ફરી પà«àª°àª¯àª¤à«àª¨ કરો.
+password_ok=બરાબર
+password_cancel=રદ કરો
+
+printing_not_supported=ચેતવણી: છાપવાનà«àª‚ આ બà«àª°àª¾àª‰àªàª° દà«àª¦àª¾àª°àª¾ સંપૂરà«àª£àªªàª£à«‡ આધારભૂત નથી.
+printing_not_ready=Warning: PDF ઠછાપવા માટે સંપૂરà«àª£àªªàª£à«‡ લાવેલ છે.
+web_fonts_disabled=વેબ ફોનà«àªŸ નિષà«àª•à«àª°àª¿àª¯ થયેલ છે: àªàª®à«àª¬à«‡àª¡ થયેલ PDF ફોનà«àªŸàª¨à«‡ વાપરવાનà«àª‚ અસમરà«àª¥.
+document_colors_not_allowed=PDF દસà«àª¤àª¾àªµà«‡àªœà«‹ તેનાં પોતાના રંગોને વાપરવા પરવાનગી આપતા નથી: 'તેનાં પોતાનાં રંગોને પસંદ કરવા માટે પાનાંને પરવાનગી આપો' બà«àª°àª¾àª‰àªàª°àª®àª¾àª‚ નિષà«àª•à«àª°àª¿àª¯ થયેલ છે.
diff --git a/js/pdfjs/web/locale/he/viewer.properties b/js/pdfjs/web/locale/he/viewer.properties
new file mode 100644
index 0000000..e3d197e
--- /dev/null
+++ b/js/pdfjs/web/locale/he/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=דף קוד×
+previous_label=קוד×
+next.title=דף הב×
+next_label=הב×
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=דף
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=מתוך {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} מתוך {{pagesCount}})
+
+zoom_out.title=התרחקות
+zoom_out_label=התרחקות
+zoom_in.title=התקרבות
+zoom_in_label=התקרבות
+zoom.title=מרחק מתצוגה
+presentation_mode.title=מעבר למצב מצגת
+presentation_mode_label=מצב מצגת
+open_file.title=פתיחת קובץ
+open_file_label=פתיחה
+print.title=הדפסה
+print_label=הדפסה
+download.title=הורדה
+download_label=הורדה
+bookmark.title=תצוגה נוכחית (העתקה ×ו פתיחה בחלון חדש)
+bookmark_label=תצוגה נוכחית
+
+# Secondary toolbar and context menu
+tools.title=כלי×
+tools_label=כלי×
+first_page.title=מעבר לעמוד הר×שון
+first_page.label=מעבר לעמוד הר×שון
+first_page_label=מעבר לעמוד הר×שון
+last_page.title=מעבר לעמוד ×”×חרון
+last_page.label=מעבר לעמוד ×”×חרון
+last_page_label=מעבר לעמוד ×”×חרון
+page_rotate_cw.title=הטיה ×¢× ×›×™×•×•×Ÿ השעון
+page_rotate_cw.label=הטיה ×¢× ×›×™×•×•×Ÿ השעון
+page_rotate_cw_label=הטיה ×¢× ×›×™×•×•×Ÿ השעון
+page_rotate_ccw.title=הטיה כנגד כיוון השעון
+page_rotate_ccw.label=הטיה כנגד כיוון השעון
+page_rotate_ccw_label=הטיה כנגד כיוון השעון
+
+cursor_text_select_tool.title=הפעלת כלי בחירת טקסט
+cursor_text_select_tool_label=כלי בחירת טקסט
+cursor_hand_tool.title=הפעלת כלי היד
+cursor_hand_tool_label=כלי יד
+
+scroll_vertical.title=שימוש בגלילה ×נכית
+scroll_vertical_label=גלילה ×נכית
+scroll_horizontal.title=שימוש בגלילה ×ופקית
+scroll_horizontal_label=גלילה ×ופקית
+scroll_wrapped.title=שימוש בגלילה רציפה
+scroll_wrapped_label=גלילה רציפה
+
+spread_none.title=×œ× ×œ×¦×¨×£ מפתחי עמודי×
+spread_none_label=×œ×œ× ×ž×¤×ª×—×™×
+spread_odd.title=צירוף מפתחי ×¢×ž×•×“×™× ×©×ž×ª×—×™×œ×™× ×‘×“×¤×™× ×¢× ×ž×¡×¤×¨×™× ×י־זוגיי×
+spread_odd_label=×ž×¤×ª×—×™× ×י־זוגיי×
+spread_even.title=צירוף מפתחי ×¢×ž×•×“×™× ×©×ž×ª×—×™×œ×™× ×‘×“×¤×™× ×¢× ×ž×¡×¤×¨×™× ×–×•×’×™×™×
+spread_even_label=×ž×¤×ª×—×™× ×–×•×’×™×™×
+
+# Document properties dialog box
+document_properties.title=מ×פייני מסמך…
+document_properties_label=מ×פייני מסמך…
+document_properties_file_name=×©× ×§×•×‘×¥:
+document_properties_file_size=גודל הקובץ:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} ק״ב ({{size_b}} בתי×)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} מ״ב ({{size_b}} בתי×)
+document_properties_title=כותרת:
+document_properties_author=מחבר:
+document_properties_subject=נוש×:
+document_properties_keywords=מילות מפתח:
+document_properties_creation_date=ת×ריך יצירה:
+document_properties_modification_date=ת×ריך שינוי:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=יוצר:
+document_properties_producer=יצרן PDF:
+document_properties_version=גרסת PDF:
+document_properties_page_count=מספר דפי×:
+document_properties_page_size=גודל העמוד:
+document_properties_page_size_unit_inches=×ינ׳
+document_properties_page_size_unit_millimeters=מ״מ
+document_properties_page_size_orientation_portrait=ל×ורך
+document_properties_page_size_orientation_landscape=לרוחב
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=מכתב
+document_properties_page_size_name_legal=דף משפטי
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=תצוגת דף מהירה:
+document_properties_linearized_yes=כן
+document_properties_linearized_no=ל×
+document_properties_close=סגירה
+
+print_progress_message=מסמך בהכנה להדפסה…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=ביטול
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=הצגה/הסתרה של סרגל הצד
+toggle_sidebar_notification.title=החלפת תצוגת סרגל צד (מסמך שמכיל מת×ר/צרופות)
+toggle_sidebar_label=הצגה/הסתרה של סרגל הצד
+document_outline.title=הצגת מת×ר מסמך (לחיצה כפולה כדי להרחיב ×ו ×œ×¦×ž×¦× ×ת כל הפריטי×)
+document_outline_label=מת×ר מסמך
+attachments.title=הצגת צרופות
+attachments_label=צרופות
+thumbs.title=הצגת תצוגה מקדימה
+thumbs_label=תצוגה מקדימה
+findbar.title=חיפוש במסמך
+findbar_label=חיפוש
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=עמוד {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=עמוד {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=תצוגה מקדימה של עמוד {{page}}
+
+# Find panel button title and messages
+find_input.title=חיפוש
+find_input.placeholder=חיפוש במסמך…
+find_previous.title=מצי×ת המופע ×”×§×•×“× ×©×œ הביטוי
+find_previous_label=קוד×
+find_next.title=מצי×ת המופע ×”×‘× ×©×œ הביטוי
+find_next_label=הב×
+find_highlight=הדגשת הכול
+find_match_case_label=הת×מת ×ותיות
+find_entire_word_label=×ž×™×œ×™× ×©×œ×ž×•×ª
+find_reached_top=×”×’×™×¢ לר×ש הדף, ממשיך מלמטה
+find_reached_bottom=הגיע לסוף הדף, ממשיך מלמעלה
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]=תוצ××” {{current}} מתוך {{total}}
+find_match_count[two]={{current}} מתוך {{total}} תוצ×ות
+find_match_count[few]={{current}} מתוך {{total}} תוצ×ות
+find_match_count[many]={{current}} מתוך {{total}} תוצ×ות
+find_match_count[other]={{current}} מתוך {{total}} תוצ×ות
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=יותר מ־{{limit}} תוצ×ות
+find_match_count_limit[one]=יותר מתוצ××” ×חת
+find_match_count_limit[two]=יותר מ־{{limit}} תוצ×ות
+find_match_count_limit[few]=יותר מ־{{limit}} תוצ×ות
+find_match_count_limit[many]=יותר מ־{{limit}} תוצ×ות
+find_match_count_limit[other]=יותר מ־{{limit}} תוצ×ות
+find_not_found=הביטוי ×œ× × ×ž×¦×
+
+# Error panel labels
+error_more_info=מידע נוסף
+error_less_info=פחות מידע
+error_close=סגירה
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js גרסה {{version}} (בנייה: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=הודעה: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=תוכן מחסנית: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=קובץ: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=שורה: {{line}}
+rendering_error=×ירעה שגי××” בעת עיבוד הדף.
+
+# Predefined zoom values
+page_scale_width=רוחב העמוד
+page_scale_fit=הת×מה לעמוד
+page_scale_auto=מרחק מתצוגה ×וטומטי
+page_scale_actual=גודל ×מיתי
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=שגי××”
+loading_error=×ירעה שגי××” בעת טעינת ×”Ö¾PDF.
+invalid_file_error=קובץ PDF ×¤×’×•× ×ו ×œ× ×ª×§×™×Ÿ.
+missing_file_error=קובץ PDF חסר.
+unexpected_response_error=תגובת שרת ×œ× ×¦×¤×•×™×”.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[הערת {{type}}]
+password_label=× × ×œ×”×›× ×™×¡ ×ת הססמה לפתיחת קובץ PDF ×–×”.
+password_invalid=ססמה שגויה. × × ×œ× ×¡×•×ª שנית.
+password_ok=×ישור
+password_cancel=ביטול
+
+printing_not_supported=×זהרה: הדפסה ××™× ×” נתמכת במלו××” בדפדפן ×–×”.
+printing_not_ready=×זהרה: ×”Ö¾PDF ×œ× × ×™×ª×Ÿ לחלוטין עד מצב שמ×פשר הדפסה.
+web_fonts_disabled=גופני רשת מנוטרלי×: ×œ× × ×™×ª×Ÿ להשתמש בגופני PDF מוטבעי×.
+document_colors_not_allowed=מסמכי PDF ××™× × ×ž×•×¨×©×™× ×œ×”×©×ª×ž×© ×‘×¦×‘×¢×™× ×ž×©×œ×”×: ×”×פשרות „×פשר ×œ×¢×ž×•×“×™× ×œ×‘×—×•×¨ ×¦×‘×¢×™× ×ž×©×œ×”×†××™× ×” פעילה בדפדפן.
diff --git a/js/pdfjs/web/locale/hi-IN/viewer.properties b/js/pdfjs/web/locale/hi-IN/viewer.properties
new file mode 100644
index 0000000..3005180
--- /dev/null
+++ b/js/pdfjs/web/locale/hi-IN/viewer.properties
@@ -0,0 +1,244 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=पिछला पृषà¥à¤ 
+previous_label=पिछला
+next.title=अगला पृषà¥à¤ 
+next_label=आगे
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=पृषà¥à¤ :
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages={{pagesCount}} का
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} of {{pagesCount}})
+
+zoom_out.title=\u0020छोटा करें
+zoom_out_label=\u0020छोटा करें
+zoom_in.title=बड़ा करें
+zoom_in_label=बड़ा करें
+zoom.title=बड़ा-छोटा करें
+presentation_mode.title=पà¥à¤°à¤¸à¥à¤¤à¥à¤¤à¤¿ अवसà¥à¤¥à¤¾ में जाà¤à¤
+presentation_mode_label=\u0020पà¥à¤°à¤¸à¥à¤¤à¥à¤¤à¤¿ अवसà¥à¤¥à¤¾
+open_file.title=फ़ाइल खोलें
+open_file_label=\u0020खोलें
+print.title=छापें
+print_label=\u0020छापें
+download.title=डाउनलोड
+download_label=डाउनलोड
+bookmark.title=मौजूदा दृशà¥à¤¯ (नठविंडो में नक़ल लें या खोलें)
+bookmark_label=\u0020मौजूदा दृशà¥à¤¯
+
+# Secondary toolbar and context menu
+tools.title=औज़ार
+tools_label=औज़ार
+first_page.title=पà¥à¤°à¤¥à¤® पृषà¥à¤  पर जाà¤à¤
+first_page.label=\u0020पà¥à¤°à¤¥à¤® पृषà¥à¤  पर जाà¤à¤
+first_page_label=पà¥à¤°à¤¥à¤® पृषà¥à¤  पर जाà¤à¤
+last_page.title=अंतिम पृषà¥à¤  पर जाà¤à¤
+last_page.label=\u0020अंतिम पृषà¥à¤  पर जाà¤à¤
+last_page_label=\u0020अंतिम पृषà¥à¤  पर जाà¤à¤
+page_rotate_cw.title=घड़ी की दिशा में घà¥à¤®à¤¾à¤à¤
+page_rotate_cw.label=घड़ी की दिशा में घà¥à¤®à¤¾à¤à¤
+page_rotate_cw_label=घड़ी की दिशा में घà¥à¤®à¤¾à¤à¤
+page_rotate_ccw.title=घड़ी की दिशा से उलà¥à¤Ÿà¤¾ घà¥à¤®à¤¾à¤à¤
+page_rotate_ccw.label=घड़ी की दिशा से उलà¥à¤Ÿà¤¾ घà¥à¤®à¤¾à¤à¤
+page_rotate_ccw_label=\u0020घड़ी की दिशा से उलà¥à¤Ÿà¤¾ घà¥à¤®à¤¾à¤à¤
+
+cursor_text_select_tool.title=पाठ चयन उपकरण सकà¥à¤·à¤® करें
+cursor_text_select_tool_label=पाठ चयन उपकरण
+cursor_hand_tool.title=हसà¥à¤¤ उपकरण सकà¥à¤·à¤® करें
+cursor_hand_tool_label=हसà¥à¤¤ उपकरण
+
+scroll_vertical.title=लंबवत सà¥à¤•à¥à¤°à¥‰à¤²à¤¿à¤‚ग का उपयोग करें
+scroll_vertical_label=लंबवत सà¥à¤•à¥à¤°à¥‰à¤²à¤¿à¤‚ग
+scroll_horizontal.title=कà¥à¤·à¤¿à¤¤à¤¿à¤œà¤¿à¤¯ सà¥à¤•à¥à¤°à¥‰à¤²à¤¿à¤‚ग का उपयोग करें
+scroll_horizontal_label=कà¥à¤·à¤¿à¤¤à¤¿à¤œà¤¿à¤¯ सà¥à¤•à¥à¤°à¥‰à¤²à¤¿à¤‚ग
+scroll_wrapped.title=वà¥à¤°à¤¾à¤ªà¥à¤ªà¥‡à¤¡ सà¥à¤•à¥à¤°à¥‰à¤²à¤¿à¤‚ग का उपयोग करें
+
+spread_none_label=कोई सà¥à¤ªà¥à¤°à¥‡à¤¡ उपलबà¥à¤§ नहीं
+spread_odd.title=विषम-कà¥à¤°à¤®à¤¾à¤‚कित पृषà¥à¤ à¥‹à¤‚ से पà¥à¤°à¤¾à¤°à¤‚भ होने वाले पृषà¥à¤  सà¥à¤ªà¥à¤°à¥‡à¤¡ में शामिल हों
+spread_odd_label=विषम फैलाव
+
+# Document properties dialog box
+document_properties.title=दसà¥à¤¤à¤¾à¤µà¥‡à¤œà¤¼ विशेषता...
+document_properties_label=दसà¥à¤¤à¤¾à¤µà¥‡à¤œà¤¼ विशेषता...
+document_properties_file_name=फ़ाइल नाम:
+document_properties_file_size=फाइल आकारः
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=शीरà¥à¤·à¤•:
+document_properties_author=लेखकः
+document_properties_subject=विषय:
+document_properties_keywords=कà¥à¤‚जी-शबà¥à¤¦:
+document_properties_creation_date=निरà¥à¤®à¤¾à¤£ दिनांक:
+document_properties_modification_date=संशोधन दिनांक:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=निरà¥à¤®à¤¾à¤¤à¤¾:
+document_properties_producer=PDF उतà¥à¤ªà¤¾à¤¦à¤•:
+document_properties_version=PDF संसà¥à¤•à¤°à¤£:
+document_properties_page_count=पृषà¥à¤  गिनती:
+document_properties_page_size=पृषà¥à¤  आकार:
+document_properties_page_size_unit_inches=इंच
+document_properties_page_size_unit_millimeters=मिमी
+document_properties_page_size_orientation_portrait=पोरà¥à¤Ÿà¥à¤°à¥‡à¤Ÿ
+document_properties_page_size_orientation_landscape=लैंडसà¥à¤•à¥‡à¤ª
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=पतà¥à¤°
+document_properties_page_size_name_legal=क़ानूनी
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=तीवà¥à¤° वेब वà¥à¤¯à¥‚:
+document_properties_linearized_yes=हाà¤
+document_properties_linearized_no=नहीं
+document_properties_close=बंद करें
+
+print_progress_message=छपाई के लिठदसà¥à¤¤à¤¾à¤µà¥‡à¤œà¤¼ को तैयार किया जा रहा है...
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=रदà¥à¤¦ करें
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=\u0020सà¥à¤²à¤¾à¤‡à¤¡à¤° टॉगल करें
+toggle_sidebar_notification.title=साइडबार टॉगल करें (दसà¥à¤¤à¤¾à¤µà¥‡à¤œà¤¼ में रूपरेखा शामिल है/attachments)
+toggle_sidebar_label=सà¥à¤²à¤¾à¤‡à¤¡à¤° टॉगल करें
+document_outline.title=दसà¥à¤¤à¤¾à¤µà¥‡à¤œà¤¼ की रूपरेखा दिखाइठ(सारी वसà¥à¤¤à¥à¤“ं को फलने अथवा समेटने के लिठदो बार कà¥à¤²à¤¿à¤• करें)
+document_outline_label=दसà¥à¤¤à¤¾à¤µà¥‡à¤œà¤¼ आउटलाइन
+attachments.title=संलगà¥à¤¨à¤• दिखायें
+attachments_label=संलगà¥à¤¨à¤•
+thumbs.title=लघà¥à¤›à¤µà¤¿à¤¯à¤¾à¤ दिखाà¤à¤
+thumbs_label=लघॠछवि
+findbar.title=\u0020दसà¥à¤¤à¤¾à¤µà¥‡à¤œà¤¼ में ढूà¤à¤¢à¤¼à¥‡à¤‚
+findbar_label=ढूà¤à¤¢à¥‡à¤‚
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=पृषà¥à¤  {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=पृषà¥à¤  {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=पृषà¥à¤  {{page}} की लघà¥-छवि
+
+# Find panel button title and messages
+find_input.title=ढूà¤à¤¢à¥‡à¤‚
+find_input.placeholder=दसà¥à¤¤à¤¾à¤µà¥‡à¤œà¤¼ में खोजें...
+find_previous.title=वाकà¥à¤¯à¤¾à¤‚श की पिछली उपसà¥à¤¥à¤¿à¤¤à¤¿ ढूà¤à¤¢à¤¼à¥‡à¤‚
+find_previous_label=पिछला
+find_next.title=वाकà¥à¤¯à¤¾à¤‚श की अगली उपसà¥à¤¥à¤¿à¤¤à¤¿ ढूà¤à¤¢à¤¼à¥‡à¤‚
+find_next_label=अगला
+find_highlight=\u0020सभी आलोकित करें
+find_match_case_label=मिलान सà¥à¤¥à¤¿à¤¤à¤¿
+find_entire_word_label=संपूरà¥à¤£ शबà¥à¤¦
+find_reached_top=पृषà¥à¤  के ऊपर पहà¥à¤‚च गया, नीचे से जारी रखें
+find_reached_bottom=पृषà¥à¤  के नीचे में जा पहà¥à¤à¤šà¤¾, ऊपर से जारी
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{total}} में {{current}} मेल
+find_match_count[two]={{total}} में {{current}} मेल
+find_match_count[few]={{total}} में {{current}} मेल
+find_match_count[many]={{total}} में {{current}} मेल
+find_match_count[other]={{total}} में {{current}} मेल
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]={{limit}} से अधिक मेल
+find_match_count_limit[one]={{limit}} से अधिक मेल
+find_match_count_limit[two]={{limit}} से अधिक मेल
+find_match_count_limit[few]={{limit}} से अधिक मेल
+find_match_count_limit[many]={{limit}} से अधिक मेल
+find_match_count_limit[other]={{limit}} से अधिक मेल
+find_not_found=वाकà¥à¤¯à¤¾à¤‚श नहीं मिला
+
+# Error panel labels
+error_more_info=अधिक सूचना
+error_less_info=कम सूचना
+error_close=बंद करें
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=\u0020संदेश: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=सà¥à¤Ÿà¥ˆà¤•: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=फ़ाइल: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=पंकà¥à¤¤à¤¿: {{line}}
+rendering_error=पृषà¥à¤  रेंडरिंग के दौरान तà¥à¤°à¥à¤Ÿà¤¿ आई.
+
+# Predefined zoom values
+page_scale_width=\u0020पृषà¥à¤  चौड़ाई
+page_scale_fit=पृषà¥à¤  फिट
+page_scale_auto=सà¥à¤µà¤šà¤¾à¤²à¤¿à¤¤ जूम
+page_scale_actual=वासà¥à¤¤à¤µà¤¿à¤• आकार
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=तà¥à¤°à¥à¤Ÿà¤¿
+loading_error=PDF लोड करते समय à¤à¤• तà¥à¤°à¥à¤Ÿà¤¿ हà¥à¤ˆ.
+invalid_file_error=अमानà¥à¤¯ या भà¥à¤°à¤·à¥à¤Ÿ PDF फ़ाइल.
+missing_file_error=\u0020अनà¥à¤ªà¤¸à¥à¤¥à¤¿à¤¤ PDF फ़ाइल.
+unexpected_response_error=अपà¥à¤°à¤¤à¥à¤¯à¤¾à¤¶à¤¿à¤¤ सरà¥à¤µà¤° पà¥à¤°à¤¤à¤¿à¤•à¥à¤°à¤¿à¤¯à¤¾.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=\u0020[{{type}} Annotation]
+password_label=इस PDF फ़ाइल को खोलने के लिठकृपया कूटशबà¥à¤¦ भरें.
+password_invalid=अवैध कूटशबà¥à¤¦, कृपया फिर कोशिश करें.
+password_ok=OK
+password_cancel=रदà¥à¤¦ करें
+
+printing_not_supported=चेतावनी: इस बà¥à¤°à¤¾à¤‰à¤œà¤¼à¤° पर छपाई पूरी तरह से समरà¥à¤¥à¤¿à¤¤ नहीं है.
+printing_not_ready=चेतावनी: PDF छपाई के लिठपूरी तरह से लोड नहीं है.
+web_fonts_disabled=वेब फॉनà¥à¤Ÿà¥à¤¸ निषà¥à¤•à¥à¤°à¤¿à¤¯ हैं: अंतःसà¥à¤¥à¤¾à¤ªà¤¿à¤¤ PDF फॉनà¥à¤Ÿà¤¸ के उपयोग में असमरà¥à¤¥.
+document_colors_not_allowed=PDF दसà¥à¤¤à¤¾à¤µà¥‡à¤œà¤¼ उनके अपने रंग को उपयोग करने के लिठअनà¥à¤®à¤¤à¤¿ पà¥à¤°à¤¾à¤ªà¥à¤¤ नहीं है: "पृषà¥à¤ à¥‹à¤‚ को उनके अपने रंग को चà¥à¤¨à¤¨à¥‡ के लिठसà¥à¤µà¥€à¤•à¥ƒà¤¤à¤¿ दें" कि वह उस बà¥à¤°à¤¾à¤‰à¤œà¤¼à¤° में निषà¥à¤•à¥à¤°à¤¿à¤¯ है.
diff --git a/js/pdfjs/web/locale/hr/viewer.properties b/js/pdfjs/web/locale/hr/viewer.properties
new file mode 100644
index 0000000..da85475
--- /dev/null
+++ b/js/pdfjs/web/locale/hr/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Prethodna stranica
+previous_label=Prethodna
+next.title=Sljedeća stranica
+next_label=Sljedeća
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Stranica
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=od {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} od {{pagesCount}})
+
+zoom_out.title=Umanji
+zoom_out_label=Umanji
+zoom_in.title=Uvećaj
+zoom_in_label=Uvećaj
+zoom.title=Zumiranje
+presentation_mode.title=Prebaci u prezentacijski naÄin rada
+presentation_mode_label=Prezentacijski naÄin rada
+open_file.title=Otvori datoteku
+open_file_label=Otvori
+print.title=Ispiši
+print_label=Ispiši
+download.title=Preuzmi
+download_label=Preuzmi
+bookmark.title=TrenutaÄni prikaz (kopiraj ili otvori u novom prozoru)
+bookmark_label=TrenutaÄni prikaz
+
+# Secondary toolbar and context menu
+tools.title=Alati
+tools_label=Alati
+first_page.title=Idi na prvu stranicu
+first_page.label=Idi na prvu stranicu
+first_page_label=Idi na prvu stranicu
+last_page.title=Idi na posljednju stranicu
+last_page.label=Idi na posljednju stranicu
+last_page_label=Idi na posljednju stranicu
+page_rotate_cw.title=Rotiraj u smjeru kazaljke na satu
+page_rotate_cw.label=Rotiraj u smjeru kazaljke na satu
+page_rotate_cw_label=Rotiraj u smjeru kazaljke na satu
+page_rotate_ccw.title=Rotiraj obrnutno od smjera kazaljke na satu
+page_rotate_ccw.label=Rotiraj obrnutno od smjera kazaljke na satu
+page_rotate_ccw_label=Rotiraj obrnutno od smjera kazaljke na satu
+
+cursor_text_select_tool.title=Omogući alat za oznaÄavanje teksta
+cursor_text_select_tool_label=Alat za oznaÄavanje teksta
+cursor_hand_tool.title=Omogući ruÄni alat
+cursor_hand_tool_label=RuÄni alat
+
+scroll_vertical.title=Koristi okomito pomicanje
+scroll_vertical_label=Okomito pomicanje
+scroll_horizontal.title=Koristi vodoravno pomicanje
+scroll_horizontal_label=Vodoravno pomicanje
+scroll_wrapped.title=Koristi kontinuirani raspored stranica
+scroll_wrapped_label=Kontinuirani raspored stranica
+
+spread_none.title=Ne izrađuj duplerice
+spread_none_label=PojedinaÄne stranice
+spread_odd.title=Izradi duplerice koje poÄinju s neparnim stranicama
+spread_odd_label=Neparne duplerice
+spread_even.title=Izradi duplerice koje poÄinju s parnim stranicama
+spread_even_label=Parne duplerice
+
+# Document properties dialog box
+document_properties.title=Svojstva dokumenta...
+document_properties_label=Svojstva dokumenta...
+document_properties_file_name=Naziv datoteke:
+document_properties_file_size=VeliÄina datoteke:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bajtova)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bajtova)
+document_properties_title=Naslov:
+document_properties_author=Autor:
+document_properties_subject=Predmet:
+document_properties_keywords=KljuÄne rijeÄi:
+document_properties_creation_date=Datum stvaranja:
+document_properties_modification_date=Datum promjene:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Stvaratelj:
+document_properties_producer=PDF stvaratelj:
+document_properties_version=PDF verzija:
+document_properties_page_count=Broj stranica:
+document_properties_page_size=Dimenzije stranice:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=uspravno
+document_properties_page_size_orientation_landscape=položeno
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Brzi web pregled:
+document_properties_linearized_yes=Da
+document_properties_linearized_no=Ne
+document_properties_close=Zatvori
+
+print_progress_message=Pripremanje dokumenta za ispis…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Odustani
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Prikaži/sakrij boÄnu traku
+toggle_sidebar_notification.title=Prikazivanje i sklanjanje boÄne trake (dokument sadrži konturu/privitke)
+toggle_sidebar_label=Prikaži/sakrij boÄnu traku
+document_outline.title=Prikaži strukturu dokumenta (dvostruki klik za rasklapanje/sklapanje svih stavki)
+document_outline_label=Struktura dokumenta
+attachments.title=Prikaži privitke
+attachments_label=Privitci
+thumbs.title=Prikaži minijature
+thumbs_label=Minijature
+findbar.title=Traži u dokumentu
+findbar_label=Traži
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Stranica br. {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Stranica {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Minijatura stranice {{page}}
+
+# Find panel button title and messages
+find_input.title=Traži
+find_input.placeholder=Traži u dokumentu…
+find_previous.title=Traži prethodno pojavljivanje ovog izraza
+find_previous_label=Prethodno
+find_next.title=Traži sljedeće pojavljivanje ovog izraza
+find_next_label=Sljedeće
+find_highlight=Istankni sve
+find_match_case_label=Razlikovanje velikih i malih slova
+find_entire_word_label=Cijele rijeÄi
+find_reached_top=Dosegnut poÄetak dokumenta, nastavak s kraja
+find_reached_bottom=Dosegnut kraj dokumenta, nastavak s poÄetka
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} od {{total}} se podudara
+find_match_count[two]={{current}} od {{total}} se podudara
+find_match_count[few]={{current}} od {{total}} se podudara
+find_match_count[many]={{current}} od {{total}} se podudara
+find_match_count[other]={{current}} od {{total}} se podudara
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Više od {{limit}} podudaranja
+find_match_count_limit[one]=Više od {{limit}} podudaranja
+find_match_count_limit[two]=Više od {{limit}} podudaranja
+find_match_count_limit[few]=Više od {{limit}} podudaranja
+find_match_count_limit[many]=Više od {{limit}} podudaranja
+find_match_count_limit[other]=Više od {{limit}} podudaranja
+find_not_found=Izraz nije pronađen
+
+# Error panel labels
+error_more_info=Više informacija
+error_less_info=Manje informacija
+error_close=Zatvori
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Poruka: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stog: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Datoteka: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Redak: {{line}}
+rendering_error=Došlo je do greške prilikom iscrtavanja stranice.
+
+# Predefined zoom values
+page_scale_width=Prilagodi Å¡irini prozora
+page_scale_fit=Prilagodi veliÄini prozora
+page_scale_auto=Automatsko zumiranje
+page_scale_actual=Stvarna veliÄina
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}} %
+
+# Loading indicator messages
+loading_error_indicator=Greška
+loading_error=DoÅ¡lo je do greÅ¡ke pri uÄitavanju PDF-a.
+invalid_file_error=Neispravna ili oštećena PDF datoteka.
+missing_file_error=Nedostaje PDF datoteka.
+unexpected_response_error=NeoÄekivani odgovor poslužitelja.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Bilješka]
+password_label=Za otvoranje ove PDF datoteku upiši lozinku.
+password_invalid=Neispravna lozinka. Pokušaj ponovo.
+password_ok=U redu
+password_cancel=Odustani
+
+printing_not_supported=Upozorenje: Ovaj preglednik ne podržava u potpunosti ispisivanje.
+printing_not_ready=Upozorenje: PDF nije u potpunosti uÄitan za ispis.
+web_fonts_disabled=Web fontovi su onemogućeni: nije moguće koristiti umetnute PDF fontove.
+document_colors_not_allowed=PDF dokumentima nije dozvoljeno koristiti vlastite boje: opcija „Dozvoli stranicama koristiti vlastite boje†je deaktivirana u pregledniku.
diff --git a/js/pdfjs/web/locale/hsb/viewer.properties b/js/pdfjs/web/locale/hsb/viewer.properties
new file mode 100644
index 0000000..a8f31f1
--- /dev/null
+++ b/js/pdfjs/web/locale/hsb/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Předchadna strona
+previous_label=Wróćo
+next.title=Přichodna strona
+next_label=Dale
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Strona
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=z {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} z {{pagesCount}})
+
+zoom_out.title=Pomjeńšić
+zoom_out_label=Pomjeńšić
+zoom_in.title=Powjetšić
+zoom_in_label=Powjetšić
+zoom.title=Skalowanje
+presentation_mode.title=Do prezentaciskeho modusa přeńć
+presentation_mode_label=Prezentaciski modus
+open_file.title=Dataju woÄinić
+open_file_label=WoÄinić
+print.title=Ćišćeć
+print_label=Ćišćeć
+download.title=Sćahnyć
+download_label=Sćahnyć
+bookmark.title=Aktualny napohlad (kopÄ›rować abo w nowym woknje woÄinić)
+bookmark_label=Aktualny napohlad
+
+# Secondary toolbar and context menu
+tools.title=Nastroje
+tools_label=Nastroje
+first_page.title=K prěnjej stronje
+first_page.label=K prěnjej stronje
+first_page_label=K prěnjej stronje
+last_page.title=K poslednjej stronje
+last_page.label=K poslednjej stronje
+last_page_label=K poslednjej stronje
+page_rotate_cw.title=K smÄ›rej Äasnika wjerćeć
+page_rotate_cw.label=K smÄ›rej Äasnika wjerćeć
+page_rotate_cw_label=K smÄ›rej Äasnika wjerćeć
+page_rotate_ccw.title=PÅ™ećiwo smÄ›rej Äasnika wjerćeć
+page_rotate_ccw.label=PÅ™ećiwo smÄ›rej Äasnika wjerćeć
+page_rotate_ccw_label=PÅ™ećiwo smÄ›rej Äasnika wjerćeć
+
+cursor_text_select_tool.title=Nastroj za wuběranje teksta zmóžnić
+cursor_text_select_tool_label=Nastroj za wuběranje teksta
+cursor_hand_tool.title=RuÄny nastroj zmóžnić
+cursor_hand_tool_label=RuÄny nastroj
+
+scroll_vertical.title=Wertikalne suwanje wužiwać
+scroll_vertical_label=Wertikalnje suwanje
+scroll_horizontal.title=Horicontalne suwanje wužiwać
+scroll_horizontal_label=Horicontalne suwanje
+scroll_wrapped.title=Postupne suwanje wužiwać
+scroll_wrapped_label=Postupne suwanje
+
+spread_none.title=Strony njezwjazać
+spread_none_label=Žana dwójna strona
+spread_odd.title=Strony zapoÄinajo z njerunymi stronami zwjazać
+spread_odd_label=Njerune strony
+spread_even.title=Strony zapoÄinajo z runymi stronami zwjazać
+spread_even_label=Rune strony
+
+# Document properties dialog box
+document_properties.title=Dokumentowe kajkosće…
+document_properties_label=Dokumentowe kajkosće…
+document_properties_file_name=Mjeno dataje:
+document_properties_file_size=Wulkosć dataje:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bajtow)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bajtow)
+document_properties_title=Titul:
+document_properties_author=Awtor:
+document_properties_subject=Předmjet:
+document_properties_keywords=KluÄowe sÅ‚owa:
+document_properties_creation_date=Datum wutworjenja:
+document_properties_modification_date=Datum změny:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Awtor:
+document_properties_producer=PDF-zhotowjer:
+document_properties_version=PDF-wersija:
+document_properties_page_count=LiÄba stronow:
+document_properties_page_size=Wulkosć strony:
+document_properties_page_size_unit_inches=cól
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=wysoki format
+document_properties_page_size_orientation_landscape=prÄ›Äny format
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Fast Web View:
+document_properties_linearized_yes=Haj
+document_properties_linearized_no=NÄ›
+document_properties_close=ZaÄinić
+
+print_progress_message=Dokument so za ćišćenje přihotuje…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Přetorhnyć
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=BóÄnicu pokazać/schować
+toggle_sidebar_notification.title=BóÄnicu pÅ™epinać (dokument wobsahuje wobrys/pÅ™iwěški)
+toggle_sidebar_label=BóÄnicu pokazać/schować
+document_outline.title=Dokumentowy naćisk pokazać (dwójne kliknjenje, zo bychu so wšě zapiski pokazali/schowali)
+document_outline_label=Dokumentowa struktura
+attachments.title=Přiwěški pokazać
+attachments_label=Přiwěški
+thumbs.title=Miniatury pokazać
+thumbs_label=Miniatury
+findbar.title=W dokumenće pytać
+findbar_label=Pytać
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Strona {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Strona {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniatura strony {{page}}
+
+# Find panel button title and messages
+find_input.title=Pytać
+find_input.placeholder=W dokumenće pytać…
+find_previous.title=Předchadne wustupowanje pytanskeho wuraza pytać
+find_previous_label=Wróćo
+find_next.title=Přichodne wustupowanje pytanskeho wuraza pytać
+find_next_label=Dale
+find_highlight=Wšě wuzběhnyć
+find_match_case_label=Wulkopisanje wobkedźbować
+find_entire_word_label=Cyłe słowa
+find_reached_top=SpoÄatk dokumenta docpÄ›ty, pokroÄuje so z kóncom
+find_reached_bottom=Kónc dokument docpÄ›ty, pokroÄuje so ze spoÄatkom
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} z {{total}} wotpowědnika
+find_match_count[two]={{current}} z {{total}} wotpowědnikow
+find_match_count[few]={{current}} z {{total}} wotpowědnikow
+find_match_count[many]={{current}} z {{total}} wotpowědnikow
+find_match_count[other]={{current}} z {{total}} wotpowědnikow
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Wjace haÄ {{limit}} wotpowÄ›dnikow
+find_match_count_limit[one]=Wjace haÄ {{limit}} wotpowÄ›dnik
+find_match_count_limit[two]=Wjace haÄ {{limit}} wotpowÄ›dnikaj
+find_match_count_limit[few]=Wjace haÄ {{limit}} wotpowÄ›dniki
+find_match_count_limit[many]=Wjace haÄ {{limit}} wotpowÄ›dnikow
+find_match_count_limit[other]=Wjace haÄ {{limit}} wotpowÄ›dnikow
+find_not_found=Pytanski wuraz njeje so namakał
+
+# Error panel labels
+error_more_info=Wjace informacijow
+error_less_info=Mjenje informacijow
+error_close=ZaÄinić
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Zdźělenka: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Lisćina zawołanjow: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Dataja: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Linka: {{line}}
+rendering_error=Při zwobraznjenju strony je zmylk wustupił.
+
+# Predefined zoom values
+page_scale_width=Šěrokosć strony
+page_scale_fit=Wulkosć strony
+page_scale_auto=Awtomatiske skalowanje
+page_scale_actual=Aktualna wulkosć
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Zmylk
+loading_error=PÅ™i zaÄitowanju PDF je zmylk wustupiÅ‚.
+invalid_file_error=Njepłaćiwa abo wobškodźena PDF-dataja.
+missing_file_error=Falowaca PDF-dataja.
+unexpected_response_error=NjewoÄakowana serwerowa wotmoÅ‚wa.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Typ přispomnjenki: {{type}}]
+password_label=Zapodajće hesÅ‚o, zo byšće PDF-dataju woÄiniÅ‚.
+password_invalid=Njepłaćiwe hesło. Prošu spytajće hišće raz.
+password_ok=W porjadku
+password_cancel=Přetorhnyć
+
+printing_not_supported=Warnowanje: Ćišćenje so přez tutón wobhladowak połnje njepodpěruje.
+printing_not_ready=Warnowanje: PDF njeje so za ćišćenje dospoÅ‚nje zaÄitaÅ‚.
+web_fonts_disabled=Webpisma su znjemóžnjene: njeje móžno, zasadźene PDF-pisma wužiwać.
+document_colors_not_allowed=PDF-dokumenty njesmědźa swoje barby wužiwać: 'Stronam dowolić, swoje barby wužiwać' je we wobhladowaku znjemóžnjene.
diff --git a/js/pdfjs/web/locale/hu/viewer.properties b/js/pdfjs/web/locale/hu/viewer.properties
new file mode 100644
index 0000000..cba69f0
--- /dev/null
+++ b/js/pdfjs/web/locale/hu/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Előző oldal
+previous_label=Előző
+next.title=Következő oldal
+next_label=Tovább
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Oldal
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=összesen: {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} / {{pagesCount}})
+
+zoom_out.title=Kicsinyítés
+zoom_out_label=Kicsinyítés
+zoom_in.title=Nagyítás
+zoom_in_label=Nagyítás
+zoom.title=Nagyítás
+presentation_mode.title=Váltás bemutató módba
+presentation_mode_label=Bemutató mód
+open_file.title=Fájl megnyitása
+open_file_label=Megnyitás
+print.title=Nyomtatás
+print_label=Nyomtatás
+download.title=Letöltés
+download_label=Letöltés
+bookmark.title=Jelenlegi nézet (másolás vagy megnyitás új ablakban)
+bookmark_label=Aktuális nézet
+
+# Secondary toolbar and context menu
+tools.title=Eszközök
+tools_label=Eszközök
+first_page.title=Ugrás az első oldalra
+first_page.label=Ugrás az első oldalra
+first_page_label=Ugrás az első oldalra
+last_page.title=Ugrás az utolsó oldalra
+last_page.label=Ugrás az utolsó oldalra
+last_page_label=Ugrás az utolsó oldalra
+page_rotate_cw.title=Forgatás az óramutató járásával egyezően
+page_rotate_cw.label=Forgatás az óramutató járásával egyezően
+page_rotate_cw_label=Forgatás az óramutató járásával egyezően
+page_rotate_ccw.title=Forgatás az óramutató járásával ellentétesen
+page_rotate_ccw.label=Forgatás az óramutató járásával ellentétesen
+page_rotate_ccw_label=Forgatás az óramutató járásával ellentétesen
+
+cursor_text_select_tool.title=Szövegkijelölő eszköz bekapcsolása
+cursor_text_select_tool_label=Szövegkijelölő eszköz
+cursor_hand_tool.title=Kéz eszköz bekapcsolása
+cursor_hand_tool_label=Kéz eszköz
+
+scroll_vertical.title=Függőleges görgetés használata
+scroll_vertical_label=Függőleges görgetés
+scroll_horizontal.title=Vízszintes görgetés használata
+scroll_horizontal_label=Vízszintes görgetés
+scroll_wrapped.title=Rácsos elrendezés használata
+scroll_wrapped_label=Rácsos elrendezés
+
+spread_none.title=Ne tapassza össze az oldalakat
+spread_none_label=Nincs összetapasztás
+spread_odd.title=Lapok összetapasztása, a páratlan számú oldalakkal kezdve
+spread_odd_label=Összetapasztás: páratlan
+spread_even.title=Lapok összetapasztása, a páros számú oldalakkal kezdve
+spread_even_label=Összetapasztás: páros
+
+# Document properties dialog box
+document_properties.title=Dokumentum tulajdonságai…
+document_properties_label=Dokumentum tulajdonságai…
+document_properties_file_name=Fájlnév:
+document_properties_file_size=Fájlméret:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bájt)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bájt)
+document_properties_title=Cím:
+document_properties_author=Szerző:
+document_properties_subject=Tárgy:
+document_properties_keywords=Kulcsszavak:
+document_properties_creation_date=Létrehozás dátuma:
+document_properties_modification_date=Módosítás dátuma:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Létrehozta:
+document_properties_producer=PDF előállító:
+document_properties_version=PDF verzió:
+document_properties_page_count=Oldalszám:
+document_properties_page_size=Lapméret:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=álló
+document_properties_page_size_orientation_landscape=fekvő
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Jogi információk
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Gyors webes nézet:
+document_properties_linearized_yes=Igen
+document_properties_linearized_no=Nem
+document_properties_close=Bezárás
+
+print_progress_message=Dokumentum előkészítése nyomtatáshoz…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Mégse
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Oldalsáv be/ki
+toggle_sidebar_notification.title=Oldalsáv be/ki (a dokumentum vázlatot/mellékleteket tartalmaz)
+toggle_sidebar_label=Oldalsáv be/ki
+document_outline.title=Dokumentum megjelenítése online (dupla kattintás minden elem kinyitásához/összecsukásához)
+document_outline_label=Dokumentumvázlat
+attachments.title=Mellékletek megjelenítése
+attachments_label=Van melléklet
+thumbs.title=Bélyegképek megjelenítése
+thumbs_label=Bélyegképek
+findbar.title=Keresés a dokumentumban
+findbar_label=Keresés
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas={{page}}. oldal
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title={{page}}. oldal
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas={{page}}. oldal bélyegképe
+
+# Find panel button title and messages
+find_input.title=Keresés
+find_input.placeholder=Keresés a dokumentumban…
+find_previous.title=A kifejezés előző előfordulásának keresése
+find_previous_label=Előző
+find_next.title=A kifejezés következő előfordulásának keresése
+find_next_label=Tovább
+find_highlight=Összes kiemelése
+find_match_case_label=Kis- és nagybetűk megkülönböztetése
+find_entire_word_label=Teljes szavak
+find_reached_top=A dokumentum eleje elérve, folytatás a végétől
+find_reached_bottom=A dokumentum vége elérve, folytatás az elejétől
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} / {{total}} találat
+find_match_count[two]={{current}} / {{total}} találat
+find_match_count[few]={{current}} / {{total}} találat
+find_match_count[many]={{current}} / {{total}} találat
+find_match_count[other]={{current}} / {{total}} találat
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Több mint {{limit}} találat
+find_match_count_limit[one]=Több mint {{limit}} találat
+find_match_count_limit[two]=Több mint {{limit}} találat
+find_match_count_limit[few]=Több mint {{limit}} találat
+find_match_count_limit[many]=Több mint {{limit}} találat
+find_match_count_limit[other]=Több mint {{limit}} találat
+find_not_found=A kifejezés nem található
+
+# Error panel labels
+error_more_info=További tudnivalók
+error_less_info=Kevesebb információ
+error_close=Bezárás
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Ãœzenet: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Verem: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Fájl: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Sor: {{line}}
+rendering_error=Hiba történt az oldal feldolgozása közben.
+
+# Predefined zoom values
+page_scale_width=Oldalszélesség
+page_scale_fit=Teljes oldal
+page_scale_auto=Automatikus nagyítás
+page_scale_actual=Valódi méret
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Hiba
+loading_error=Hiba történt a PDF betöltésekor.
+invalid_file_error=Érvénytelen vagy sérült PDF fájl.
+missing_file_error=Hiányzó PDF fájl.
+unexpected_response_error=Váratlan kiszolgálóválasz.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} megjegyzés]
+password_label=Adja meg a jelszót a PDF fájl megnyitásához.
+password_invalid=Helytelen jelszó. Próbálja újra.
+password_ok=OK
+password_cancel=Mégse
+
+printing_not_supported=Figyelmeztetés: Ez a böngésző nem teljesen támogatja a nyomtatást.
+printing_not_ready=Figyelmeztetés: A PDF nincs teljesen betöltve a nyomtatáshoz.
+web_fonts_disabled=Webes betűkészletek letiltva: nem használhatók a beágyazott PDF betűkészletek.
+document_colors_not_allowed=A PDF dokumentumok nem használhatják saját színeiket: „Az oldalak a saját maguk által kiválasztott színeket használhatják†beállítás ki van kapcsolva a böngészőben.
diff --git a/js/pdfjs/web/locale/hy-AM/viewer.properties b/js/pdfjs/web/locale/hy-AM/viewer.properties
new file mode 100644
index 0000000..bf79954
--- /dev/null
+++ b/js/pdfjs/web/locale/hy-AM/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Õ†Õ¡Õ­Õ¸Ö€Õ¤ Õ§Õ»Õ¨
+previous_label=Õ†Õ¡Õ­Õ¸Ö€Õ¤Õ¨
+next.title=Õ€Õ¡Õ»Õ¸Ö€Õ¤ Õ§Õ»Õ¨
+next_label=Õ€Õ¡Õ»Õ¸Ö€Õ¤Õ¨
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Ô·Õ».
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages={{pagesCount}}-Õ«Ö\u0020
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}}-Õ¨ {{pagesCount}})-Õ«Ö
+
+zoom_out.title=Õ“Õ¸Ö„Ö€Õ¡ÖÕ¶Õ¥Õ¬
+zoom_out_label=Õ“Õ¸Ö„Ö€Õ¡ÖÕ¶Õ¥Õ¬
+zoom_in.title=Ô½Õ¸Õ·Õ¸Ö€Õ¡ÖÕ¶Õ¥Õ¬
+zoom_in_label=Ô½Õ¸Õ·Õ¸Ö€Õ¡ÖÕ¶Õ¥Õ¬
+zoom.title=Õ„Õ¡Õ½Õ·Õ¿Õ¡Õ¢Õ¨\u0020
+presentation_mode.title=Ô±Õ¶ÖÕ¶Õ¥Õ¬ Õ†Õ¥Ö€Õ¯Õ¡ÕµÕ¡ÖÕ´Õ¡Õ¶ Õ¥Õ²Õ¡Õ¶Õ¡Õ¯Õ«Õ¶
+presentation_mode_label=Õ†Õ¥Ö€Õ¯Õ¡ÕµÕ¡ÖÕ´Õ¡Õ¶ Õ¥Õ²Õ¡Õ¶Õ¡Õ¯
+open_file.title=Ô²Õ¡ÖÕ¥Õ¬ Õ–Õ¡ÕµÕ¬
+open_file_label=Ô²Õ¡ÖÕ¥Õ¬
+print.title=ÕÕºÕ¥Õ¬
+print_label=ÕÕºÕ¥Õ¬
+download.title=Ô²Õ¥Õ¼Õ¶Õ¥Õ¬
+download_label=Ô²Õ¥Õ¼Õ¶Õ¥Õ¬
+bookmark.title=Ô¸Õ¶Õ©Õ¡ÖÕ«Õ¯ Õ¿Õ¥Õ½Ö„Õ¸Õ¾ (ÕºÕ¡Õ¿Õ³Õ¥Õ¶Õ¥Õ¬ Õ¯Õ¡Õ´ Õ¢Õ¡ÖÕ¥Õ¬ Õ¶Õ¸Ö€ ÕºÕ¡Õ¿Õ¸Ö‚Õ°Õ¡Õ¶Õ¸Ö‚Õ´)
+bookmark_label=Ô¸Õ¶Õ©Õ¡ÖÕ«Õ¯ Õ¿Õ¥Õ½Ö„Õ¨
+
+# Secondary toolbar and context menu
+tools.title=Ô³Õ¸Ö€Õ®Õ«Ö„Õ¶Õ¥Ö€
+tools_label=Ô³Õ¸Ö€Õ®Õ«Ö„Õ¶Õ¥Ö€
+first_page.title=Ô±Õ¶ÖÕ¶Õ¥Õ¬ Õ¡Õ¼Õ¡Õ»Õ«Õ¶ Õ§Õ»Õ«Õ¶
+first_page.label=Ô±Õ¶ÖÕ¶Õ¥Õ¬ Õ¡Õ¼Õ¡Õ»Õ«Õ¶ Õ§Õ»Õ«Õ¶
+first_page_label=Ô±Õ¶ÖÕ¶Õ¥Õ¬ Õ¡Õ¼Õ¡Õ»Õ«Õ¶ Õ§Õ»Õ«Õ¶
+last_page.title=Ô±Õ¶ÖÕ¶Õ¥Õ¬ Õ¾Õ¥Ö€Õ»Õ«Õ¶ Õ§Õ»Õ«Õ¶
+last_page.label=Ô±Õ¶ÖÕ¶Õ¥Õ¬ Õ¾Õ¥Ö€Õ»Õ«Õ¶ Õ§Õ»Õ«Õ¶
+last_page_label=Ô±Õ¶ÖÕ¶Õ¥Õ¬ Õ¾Õ¥Ö€Õ»Õ«Õ¶ Õ§Õ»Õ«Õ¶
+page_rotate_cw.title=ÕŠÕ¿Õ¿Õ¥Õ¬ Õ¨Õ½Õ¿ ÕªÕ¡Õ´Õ¡ÖÕ¸Ö‚ÕµÖÕ« Õ½Õ¬Õ¡Ö„Õ«
+page_rotate_cw.label=ÕŠÕ¿Õ¿Õ¥Õ¬ Õ¨Õ½Õ¿ ÕªÕ¡Õ´Õ¡ÖÕ¸Ö‚ÕµÖÕ« Õ½Õ¬Õ¡Ö„Õ«
+page_rotate_cw_label=ÕŠÕ¿Õ¿Õ¥Õ¬ Õ¨Õ½Õ¿ ÕªÕ¡Õ´Õ¡ÖÕ¸Ö‚ÕµÖÕ« Õ½Õ¬Õ¡Ö„Õ«
+page_rotate_ccw.title=ÕŠÕ¿Õ¿Õ¥Õ¬ Õ°Õ¡Õ¯Õ¡Õ¼Õ¡Õ¯ ÕªÕ¡Õ´Õ¡ÖÕ¸Ö‚ÕµÖÕ« Õ½Õ¬Õ¡Ö„Õ«
+page_rotate_ccw.label=ÕŠÕ¿Õ¿Õ¥Õ¬ Õ°Õ¡Õ¯Õ¡Õ¼Õ¡Õ¯ ÕªÕ¡Õ´Õ¡ÖÕ¸Ö‚ÕµÖÕ« Õ½Õ¬Õ¡Ö„Õ«
+page_rotate_ccw_label=ÕŠÕ¿Õ¿Õ¥Õ¬ Õ°Õ¡Õ¯Õ¡Õ¼Õ¡Õ¯ ÕªÕ¡Õ´Õ¡ÖÕ¸Ö‚ÕµÖÕ« Õ½Õ¬Õ¡Ö„Õ«
+
+cursor_text_select_tool.title=Õ„Õ«Õ¡ÖÕ¶Õ¥Õ¬ ÕÕ¥Ö„Õ½Õ¿Õ¨ Õ¨Õ¶Õ¿Ö€Õ¥Õ¬Õ¸Ö‚ Õ£Õ¸Ö€Õ®Õ«Ö„Õ¨
+cursor_text_select_tool_label=ÕÕ¥Ö„Õ½Õ¿Õ¨ Õ¨Õ¶Õ¿Ö€Õ¥Õ¬Õ¸Ö‚ Õ£Õ¸Ö€Õ®Õ«Ö„
+cursor_hand_tool.title=Õ„Õ«Õ¡ÖÕ¶Õ¥Õ¬ ÕÕ¥Õ¼Ö„Õ« Õ£Õ¸Ö€Õ®Õ«Ö„Õ¨
+cursor_hand_tool_label=ÕÕ¥Õ¼Ö„Õ« Õ£Õ¸Ö€Õ®Õ«Ö„
+
+scroll_vertical.title=Õ•Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¥Õ¬ Õ¸Ö‚Õ²Õ²Õ¡Õ°Õ¡ÕµÕ¡Ö Õ¸Õ¬Õ¸Ö€Õ¸Ö‚Õ´
+scroll_vertical_label=ÕˆÖ‚Õ²Õ²Õ¡Õ°Õ¡ÕµÕ¡Ö Õ¸Õ¬Õ¸Ö€Õ¸Ö‚Õ´
+scroll_horizontal.title=Õ•Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¥Õ¬ Õ°Õ¸Ö€Õ«Õ¦Õ¸Õ¶Õ¡Õ¯Õ¡Õ¶ Õ¸Õ¬Õ¸Ö€Õ¸Ö‚Õ´
+scroll_horizontal_label=Õ€Õ¸Ö€Õ«Õ¦Õ¸Õ¶Õ¡Õ¯Õ¡Õ¶ Õ¸Õ¬Õ¸Ö€Õ¸Ö‚Õ´
+scroll_wrapped.title=Õ•Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¥Õ¬ ÖƒÕ¡Õ©Õ¡Õ©Õ¾Õ¡Õ® Õ¸Õ¬Õ¸Ö€Õ¸Ö‚Õ´
+scroll_wrapped_label=Õ“Õ¡Õ©Õ¡Õ©Õ¾Õ¡Õ® Õ¸Õ¬Õ¸Ö€Õ¸Ö‚Õ´
+
+spread_none.title=Õ„Õ« Õ´Õ«Õ¡ÖÕ¥Ö„ Õ§Õ»Õ« Õ¾Õ¥Ö€Õ¡Õ®Õ¡Õ®Õ¯Õ¥Ö€Õ«Õ¶
+spread_none_label=Õ‰Õ¯Õ¡ Õ¾Õ¥Ö€Õ¡Õ®Õ¡Õ®Õ¯Õ¥Ö€
+spread_odd.title=Õ„Õ«Õ¡ÖÕ¥Ö„ Õ§Õ»Õ« Õ¾Õ¥Ö€Õ¡Õ®Õ¡Õ®Õ¯Õ¥Ö€Õ«Õ¶ Õ½Õ¯Õ½Õ¥Õ¬Õ¸Õ¾Õ Õ¯Õ¥Õ¶Õ¿ Õ°Õ¡Õ´Õ¡Ö€Õ¡Õ¯Õ¡Õ¬Õ¾Õ¡Õ® Õ§Õ»Õ¥Ö€Õ¸Õ¾
+spread_odd_label=Ô¿Õ¥Õ¶Õ¿ Õ¾Õ¥Ö€Õ¡Õ®Õ¡Õ®Õ¯Õ¥Ö€
+spread_even.title=Õ„Õ«Õ¡ÖÕ¥Ö„ Õ§Õ»Õ« Õ¾Õ¥Ö€Õ¡Õ®Õ¡Õ®Õ¯Õ¥Ö€Õ«Õ¶ Õ½Õ¯Õ½Õ¥Õ¬Õ¸Õ¾Õ Õ¦Õ¸Ö‚ÕµÕ£ Õ°Õ¡Õ´Õ¡Ö€Õ¡Õ¯Õ¡Õ¬Õ¾Õ¡Õ® Õ§Õ»Õ¥Ö€Õ¸Õ¾
+spread_even_label=Ô¶Õ¸Ö‚ÕµÕ£ Õ¾Õ¥Ö€Õ¡Õ®Õ¡Õ®Õ¯Õ¥Ö€
+
+# Document properties dialog box
+document_properties.title=Õ“Õ¡Õ½Õ¿Õ¡Õ©Õ²Õ©Õ« Õ°Õ¡Õ¿Õ¯Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¶Õ¥Ö€Õ¨...
+document_properties_label=Õ“Õ¡Õ½Õ¿Õ¡Õ©Õ²Õ©Õ« Õ°Õ¡Õ¿Õ¯Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¶Õ¥Ö€Õ¨...
+document_properties_file_name=Õ–Õ¡ÕµÕ¬Õ« Õ¡Õ¶Õ¸Ö‚Õ¶Õ¨.
+document_properties_file_size=Õ–Õ¡ÕµÕ¬Õ« Õ¹Õ¡ÖƒÕ¨.
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} Ô¿Ô² ({{size_b}} Õ¢Õ¡ÕµÕ©)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} Õ„Ô² ({{size_b}} Õ¢Õ¡ÕµÕ©)
+document_properties_title=ÕŽÕ¥Ö€Õ¶Õ¡Õ£Õ«Ö€.
+document_properties_author=Հեղինակ․
+document_properties_subject=ÕŽÕ¥Ö€Õ¶Õ¡Õ£Õ«Ö€.
+document_properties_keywords=Õ€Õ«Õ´Õ¶Õ¡Õ¢Õ¡Õ¼.
+document_properties_creation_date=ÕÕ¿Õ¥Õ²Õ®Õ¥Õ¬Õ¸Ö‚ Õ¡Õ´Õ½Õ¡Õ©Õ«Õ¾Õ¨.
+document_properties_modification_date=Õ“Õ¸ÖƒÕ¸Õ­Õ¥Õ¬Õ¸Ö‚ Õ¡Õ´Õ½Õ¡Õ©Õ«Õ¾Õ¨.
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=ÕÕ¿Õ¥Õ²Õ®Õ¸Õ².
+document_properties_producer=PDF-Õ« Õ°Õ¥Õ²Õ«Õ¶Õ¡Õ¯Õ¨.
+document_properties_version=PDF-Õ« Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯Õ¨.
+document_properties_page_count=Ô·Õ»Õ¥Ö€Õ« Ö„Õ¡Õ¶Õ¡Õ¯Õ¨.
+document_properties_page_size=Ô·Õ»Õ« Õ¹Õ¡ÖƒÕ¨.
+document_properties_page_size_unit_inches=Õ¤Õµ.
+document_properties_page_size_unit_millimeters=Õ´Õ´
+document_properties_page_size_orientation_portrait=Õ¸Ö‚Õ²Õ²Õ¡Õ±Õ«Õ£
+document_properties_page_size_orientation_landscape=Õ°Õ¸Ö€Õ«Õ¦Õ¸Õ¶Õ¡Õ¯Õ¡Õ¶
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Õ†Õ¡Õ´Õ¡Õ¯
+document_properties_page_size_name_legal=Õ•Ö€Õ«Õ¶Õ¡Õ¯Õ¡Õ¶
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Արագ վեբ դիտում․
+document_properties_linearized_yes=Ô±ÕµÕ¸
+document_properties_linearized_no=ÕˆÕ¹
+document_properties_close=Õ“Õ¡Õ¯Õ¥Õ¬
+
+print_progress_message=Õ†Õ¡Õ­Õ¡ÕºÕ¡Õ¿Ö€Õ¡Õ½Õ¿Õ¸Ö‚Õ´ Õ§ ÖƒÕ¡Õ½Õ¿Õ¡Õ©Õ¸Ö‚Õ²Õ©Õ¨ Õ¿ÕºÕ¥Õ¬Õ¸Ö‚Õ¶...
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Õ‰Õ¥Õ²Õ¡Ö€Õ¯Õ¥Õ¬
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Ô²Õ¡ÖÕ¥Õ¬/Õ“Õ¡Õ¯Õ¥Õ¬ Ô¿Õ¸Õ²Õ¡ÕµÕ«Õ¶ Õ¾Õ¡Õ°Õ¡Õ¶Õ¡Õ¯Õ¨
+toggle_sidebar_notification.title=Õ“Õ¸Õ­Õ¡Õ¶Õ»Õ¡Õ¿Õ¥Õ¬ Ô¿Õ¸Õ²Õ¡ÕµÕ«Õ¶ Õ£Õ¸Õ¿Õ«Õ¶ (ÖƒÕ¡Õ½Õ¿Õ¡Õ©Õ¸Ö‚Õ²Õ©Õ¨ ÕºÕ¡Ö€Õ¸Ö‚Õ¶Õ¡Õ¯Õ¸Ö‚Õ´ Õ§ Õ¸Ö‚Ö€Õ¾Õ¡Õ£Õ«Õ®/Õ¯ÖÕ¸Ö€Õ¤)
+toggle_sidebar_label=Ô²Õ¡ÖÕ¥Õ¬/Õ“Õ¡Õ¯Õ¥Õ¬ Ô¿Õ¸Õ²Õ¡ÕµÕ«Õ¶ Õ¾Õ¡Õ°Õ¡Õ¶Õ¡Õ¯Õ¨
+document_outline.title=Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ ÖƒÕ¡Õ½Õ¿Õ¡Õ©Õ²Õ©Õ« Õ¸Ö‚Ö€Õ¾Õ¡Õ£Õ«Õ®Õ¨ (Õ¯Ö€Õ¯Õ¶Õ¡Õ¯Õ« Õ½Õ¥Õ²Õ´Õ¥Ö„Õ Õ´Õ«Õ¸Ö‚ÕµÕ©Õ¶Õ¥Ö€Õ¨ Õ¨Õ¶Õ¤Õ¡Ö€Õ±Õ¡Õ¯Õ¥Õ¬Õ¸Ö‚/Õ¯Õ¸Õ®Õ¯Õ¥Õ¬Õ¸Ö‚ Õ°Õ¡Õ´Õ¡Ö€)
+document_outline_label=Õ“Õ¡Õ½Õ¿Õ¡Õ©Õ²Õ©Õ« Õ¢Õ¸Õ¾Õ¡Õ¶Õ¤Õ¡Õ¯Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨
+attachments.title=Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ Õ¯ÖÕ¸Ö€Õ¤Õ¶Õ¥Ö€Õ¨
+attachments_label=Ô¿ÖÕ¸Ö€Õ¤Õ¶Õ¥Ö€
+thumbs.title=Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ Õ„Õ¡Õ¶Ö€Õ¡ÕºÕ¡Õ¿Õ¯Õ¥Ö€Õ¨
+thumbs_label=Õ„Õ¡Õ¶Ö€Õ¡ÕºÕ¡Õ¿Õ¯Õ¥Ö€Õ¨
+findbar.title=Ô³Õ¿Õ¶Õ¥Õ¬ ÖƒÕ¡Õ½Õ¿Õ¡Õ©Õ²Õ©Õ¸Ö‚Õ´
+findbar_label=ÕˆÖ€Õ¸Õ¶Õ¸Ö‚Õ´
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Ô·Õ» {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Ô·Õ»Õ¨ {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Ô·Õ»Õ« Õ´Õ¡Õ¶Ö€Õ¡ÕºÕ¡Õ¿Õ¯Õ¥Ö€Õ¨ {{page}}
+
+# Find panel button title and messages
+find_input.title=ÕˆÖ€Õ¸Õ¶Õ¸Ö‚Õ´
+find_input.placeholder=Ô³Õ¿Õ¶Õ¥Õ¬ ÖƒÕ¡Õ½Õ¿Õ¡Õ©Õ²Õ©Õ¸Ö‚Õ´...
+find_previous.title=Ô³Õ¿Õ¶Õ¥Õ¬ Õ¡Õ¶Ö€Õ¡Õ°Õ¡ÕµÕ¿Õ¸Ö‚Õ©ÕµÕ¡Õ¶ Õ¶Õ¡Õ­Õ¸Ö€Õ¤ Õ°Õ¡Õ¶Õ¤Õ«ÕºÕ¸Ö‚Õ´Õ¨
+find_previous_label=Õ†Õ¡Õ­Õ¸Ö€Õ¤Õ¨
+find_next.title=Ô³Õ¿Õ«Ö€ Õ¡Ö€Õ¿Õ¡Õ°Õ¡ÕµÕ¿Õ¸Ö‚Õ©ÕµÕ¡Õ¶ Õ°Õ¡Õ»Õ¸Ö€Õ¤ Õ°Õ¡Õ¶Õ¤Õ«ÕºÕ¸Ö‚Õ´Õ¨
+find_next_label=Õ€Õ¡Õ»Õ¸Ö€Õ¤Õ¨
+find_highlight=Ô³Õ¸Ö‚Õ¶Õ¡Õ¶Õ·Õ¥Õ¬ Õ¢Õ¸Õ¬Õ¸Ö€Õ¨
+find_match_case_label=Õ„Õ¥Õ®(ÖƒÕ¸Ö„Ö€)Õ¡Õ¿Õ¡Õ¼ Õ°Õ¡Õ·Õ¾Õ« Õ¡Õ¼Õ¶Õ¥Õ¬
+find_entire_word_label=Ô±Õ´Õ¢Õ¸Õ²Õ» Õ¢Õ¡Õ¼Õ¥Ö€Õ¨
+find_reached_top=Õ€Õ¡Õ½Õ¥Õ¬ Õ¥Ö„ ÖƒÕ¡Õ½Õ¿Õ¡Õ©Õ²Õ©Õ« Õ¾Õ¥Ö€Ö‡Õ«Õ¶, Õ¯Õ·Õ¡Ö€Õ¸Ö‚Õ¶Õ¡Õ¯Õ¾Õ« Õ¶Õ¥Ö€Ö„Ö‡Õ«Ö
+find_reached_bottom=Õ€Õ¡Õ½Õ¥Õ¬ Õ¥Ö„ ÖƒÕ¡Õ½Õ¿Õ¡Õ©Õ²Õ©Õ« Õ¾Õ¥Ö€Õ»Õ«Õ¶, Õ¯Õ·Õ¡Ö€Õ¸Ö‚Õ¶Õ¡Õ¯Õ¾Õ« Õ¾Õ¥Ö€Ö‡Õ«Ö
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ Õ°Õ¸Õ£Õ¶Õ¡Õ¯Õ«(Õ¨Õ¶Õ¤Õ°Õ¡Õ¶Õ¸Ö‚Ö€) ]}
+find_match_count[one]={{current}} {{total}}-Õ« Õ°Õ¡Õ´Õ¨Õ¶Õ¯Õ¶Õ¸Ö‚Õ´Õ«Ö
+find_match_count[two]={{current}} {{total}}-Õ« Õ°Õ¡Õ´Õ¨Õ¶Õ¯Õ¶Õ¸Ö‚Õ´Õ¶Õ¥Ö€Õ«Ö
+find_match_count[few]={{current}} {{total}}-Õ« Õ°Õ¡Õ´Õ¨Õ¶Õ¯Õ¶Õ¸Ö‚Õ´Õ¶Õ¥Ö€Õ«Ö
+find_match_count[many]={{current}} {{total}}-Õ« Õ°Õ¡Õ´Õ¨Õ¶Õ¯Õ¶Õ¸Ö‚Õ´Õ¶Õ¥Ö€Õ«Ö
+find_match_count[other]={{current}} {{total}}-Õ« Õ°Õ¡Õ´Õ¨Õ¶Õ¯Õ¶Õ¸Ö‚Õ´Õ¶Õ¥Ö€Õ«Ö
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ Õ°Õ¸Õ£Õ¶Õ¡Õ¯Õ« (Õ½Õ¡Õ°Õ´Õ¡Õ¶Õ¨) ]}
+find_match_count_limit[zero]=Ô±Õ¾Õ¥Õ¬Õ«Õ¶ Ö„Õ¡Õ¶ {{limit}} Õ°Õ¡Õ´Õ¨Õ¶Õ¯Õ¶Õ¸Ö‚Õ´Õ¶Õ¥Ö€Õ¨
+find_match_count_limit[one]=Ô±Õ¾Õ¥Õ¬Õ«Õ¶ Ö„Õ¡Õ¶ {{limit}} Õ°Õ¡Õ´Õ¨Õ¶Õ¯Õ¶Õ¸Ö‚Õ´Õ¨
+find_match_count_limit[two]=Ô±Õ¾Õ¥Õ¬Õ«Õ¶ Ö„Õ¡Õ¶ {{limit}} Õ°Õ¡Õ´Õ¨Õ¶Õ¯Õ¶Õ¸Ö‚Õ´Õ¶Õ¥Ö€Õ¶Õ¥Ö€Õ¨
+find_match_count_limit[few]=Ô±Õ¾Õ¥Õ¬Õ«Õ¶ Ö„Õ¡Õ¶ {{limit}} Õ°Õ¡Õ´Õ¨Õ¶Õ¯Õ¶Õ¸Ö‚Õ´Õ¶Õ¥Ö€Õ¶Õ¥Ö€Õ¨
+find_match_count_limit[many]=Ô±Õ¾Õ¥Õ¬Õ«Õ¶ Ö„Õ¡Õ¶ {{limit}} Õ°Õ¡Õ´Õ¨Õ¶Õ¯Õ¶Õ¸Ö‚Õ´Õ¶Õ¥Ö€Õ¶Õ¥Ö€Õ¨
+find_match_count_limit[other]=Ô±Õ¾Õ¥Õ¬Õ«Õ¶ Ö„Õ¡Õ¶ {{limit}} Õ°Õ¡Õ´Õ¨Õ¶Õ¯Õ¶Õ¸Ö‚Õ´Õ¶Õ¥Ö€Õ¶Õ¥Ö€Õ¨
+find_not_found=Ô±Ö€Õ¿Õ¡Õ°Õ¡ÕµÕ¿Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ Õ¹Õ£Õ¿Õ¶Õ¾Õ¥Ö
+
+# Error panel labels
+error_more_info=Ô±Õ¾Õ¥Õ¬Õ« Õ·Õ¡Õ¿ Õ¿Õ¥Õ²Õ¥Õ¯Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶
+error_less_info=Õ”Õ«Õ¹ Õ¿Õ¥Õ²Õ¥Õ¯Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶
+error_close=Õ“Õ¡Õ¯Õ¥Õ¬
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (Õ¯Õ¡Õ¼Õ¸Ö‚ÖÕ¸Ö‚Õ´Õ¨. {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Ô³Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨. {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Õ‡Õ¥Õ²Õ». {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Õ–Õ¡ÕµÕ¬. {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=ÕÕ¸Õ²Õ¨. {{line}}
+rendering_error=ÕÕ­Õ¡Õ¬Õ Õ§Õ»Õ¨ Õ½Õ¿Õ¥Õ²Õ®Õ¥Õ¬Õ«Õ½:
+
+# Predefined zoom values
+page_scale_width=Ô·Õ»Õ« Õ¬Õ¡ÕµÕ¶Ö„Õ¨
+page_scale_fit=ÕÕ£Õ¥Õ¬ Õ§Õ»Õ¨
+page_scale_auto=Ô»Õ¶Ö„Õ¶Õ¡Õ·Õ­Õ¡Õ¿
+page_scale_actual=Ô»Ö€Õ¡Õ¯Õ¡Õ¶ Õ¹Õ¡ÖƒÕ¨
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=ÕÕ­Õ¡Õ¬
+loading_error=ÕÕ­Õ¡Õ¬Õ PDF Ö†Õ¡ÕµÕ¬Õ¨ Õ¢Õ¡ÖÕ¥Õ¬Õ«Õ½Ö‰
+invalid_file_error=ÕÕ­Õ¡Õ¬ Õ¯Õ¡Õ´ Õ¢Õ¶Õ¡Õ½Õ¾Õ¡Õ® PDF Ö†Õ¡ÕµÕ¬:
+missing_file_error=PDF Ö†Õ¡ÕµÕ¬Õ¨ Õ¢Õ¡ÖÕ¡Õ¯Õ¡ÕµÕ¸Ö‚Õ´ Õ§:
+unexpected_response_error=ÕÕºÕ¡Õ½Õ¡Ö€Õ¯Õ«Õ¹Õ« Õ¡Õ¶Õ½ÕºÕ¡Õ½Õ¥Õ¬Õ« ÕºÕ¡Õ¿Õ¡Õ½Õ­Õ¡Õ¶:
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Ô¾Õ¡Õ¶Õ¸Õ©Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶]
+password_label=Õ„Õ¸Ö‚Õ¿Ö„Õ¡Õ£Ö€Õ¥Ö„ PDF-Õ« Õ£Õ¡Õ²Õ¿Õ¶Õ¡Õ¢Õ¡Õ¼Õ¨:
+password_invalid=Ô³Õ¡Õ²Õ¿Õ¶Õ¡Õ¢Õ¡Õ¼Õ¨ Õ½Õ­Õ¡Õ¬ Õ§: Ô¿Ö€Õ¯Õ«Õ¶ ÖƒÕ¸Ö€Õ±Õ¥Ö„:
+password_ok=Ô¼Õ¡Õ¾
+password_cancel=Õ‰Õ¥Õ²Õ¡Ö€Õ¯Õ¥Õ¬
+
+printing_not_supported=Ô¶Õ£Õ¸Ö‚Õ·Õ¡ÖÕ¸Ö‚Õ´. ÕÕºÕ¥Õ¬Õ¨ Õ¡Õ´Õ¢Õ¸Õ²Õ»Õ¸Ö‚Õ©ÕµÕ¡Õ´Õ¢ Õ¹Õ« Õ¡Õ»Õ¡Õ¯ÖÕ¾Õ¸Ö‚Õ´ Õ¤Õ«Õ¿Õ¡Ö€Õ¯Õ«Õ¹Õ« Õ¯Õ¸Õ²Õ´Õ«ÖÖ‰
+printing_not_ready=Ô¶Õ£Õ¸Ö‚Õ·Õ¡ÖÕ¸Ö‚Õ´. PDF-Õ¨ Õ¡Õ´Õ¢Õ¸Õ²Õ»Õ¸Ö‚Õ©ÕµÕ¡Õ´Õ¢ Õ¹Õ« Õ¢Õ¥Õ¼Õ¶Õ¡Õ¾Õ¸Ö€Õ¾Õ¥Õ¬ Õ¿ÕºÕ¥Õ¬Õ¸Ö‚ Õ°Õ¡Õ´Õ¡Ö€:
+web_fonts_disabled=ÕŽÕ¥Õ¢-Õ¿Õ¡Õ¼Õ¡Õ¿Õ¥Õ½Õ¡Õ¯Õ¶Õ¥Ö€Õ¨ Õ¡Õ¶Õ»Õ¡Õ¿Õ¾Õ¡Õ® Õ¥Õ¶. Õ°Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ§ Ö…Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¥Õ¬ Õ¶Õ¥Ö€Õ¯Õ¡Õ¼Õ¸Ö‚ÖÕ¾Õ¡Õ® PDF Õ¿Õ¡Õ¼Õ¡Õ¿Õ¥Õ½Õ¡Õ¯Õ¶Õ¥Ö€Õ¨:
+document_colors_not_allowed=PDF ÖƒÕ¡Õ½Õ¿Õ¡Õ©Õ²Õ©Õ¥Ö€Õ«Õ¶ Õ©Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¾Õ¡Õ® Õ¹Õ§ Ö…Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¥Õ¬ Õ«Ö€Õ¥Õ¶Ö Õ½Õ¥ÖƒÕ¡Õ¯Õ¡Õ¶ Õ£Õ¸Ö‚ÕµÕ¶Õ¥Ö€Õ¨: “Թույլատրել Õ§Õ»Õ¥Ö€Õ«Õ¶ Õ¨Õ¶Õ¿Ö€Õ¥Õ¬ Õ«Ö€Õ¥Õ¶Ö Õ½Õ¥ÖƒÕ¡Õ¯Õ¡Õ¶ գույները“ Õ¨Õ¶Õ¿Ö€Õ¡Õ¶Ö„Õ¨ Õ¡Õ¶Õ»Õ¡Õ¿Õ¾Õ¡Õ® Õ§ Õ¤Õ«Õ¿Õ¡Ö€Õ¯Õ«Õ¹Õ¸Ö‚Õ´:
diff --git a/js/pdfjs/web/locale/ia/viewer.properties b/js/pdfjs/web/locale/ia/viewer.properties
new file mode 100644
index 0000000..f69b26e
--- /dev/null
+++ b/js/pdfjs/web/locale/ia/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Pagina previe
+previous_label=Previe
+next.title=Pagina sequente
+next_label=Sequente
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Pagina
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=de {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} de {{pagesCount}})
+
+zoom_out.title=Distantiar
+zoom_out_label=Distantiar
+zoom_in.title=Approximar
+zoom_in_label=Approximar
+zoom.title=Zoom
+presentation_mode.title=Excambiar a modo presentation
+presentation_mode_label=Modo presentation
+open_file.title=Aperir le file
+open_file_label=Aperir
+print.title=Imprimer
+print_label=Imprimer
+download.title=Discargar
+download_label=Discargar
+bookmark.title=Vista actual (copiar o aperir in un nove fenestra)
+bookmark_label=Vista actual
+
+# Secondary toolbar and context menu
+tools.title=Instrumentos
+tools_label=Instrumentos
+first_page.title=Ir al prime pagina
+first_page.label=Ir al prime pagina
+first_page_label=Ir al prime pagina
+last_page.title=Ir al prime pagina
+last_page.label=Ir al prime pagina
+last_page_label=Ir al prime pagina
+page_rotate_cw.title=Rotar in senso horari
+page_rotate_cw.label=Rotar in senso horari
+page_rotate_cw_label=Rotar in senso horari
+page_rotate_ccw.title=Rotar in senso antihorari
+page_rotate_ccw.label=Rotar in senso antihorari
+page_rotate_ccw_label=Rotar in senso antihorari
+
+cursor_text_select_tool.title=Activar le instrumento de selection de texto
+cursor_text_select_tool_label=Instrumento de selection de texto
+cursor_hand_tool.title=Activar le instrumento mano
+cursor_hand_tool_label=Instrumento mano
+
+scroll_vertical.title=Usar rolamento vertical
+scroll_vertical_label=Rolamento vertical
+scroll_horizontal.title=Usar rolamento horizontal
+scroll_horizontal_label=Rolamento horizontal
+scroll_wrapped.title=Usar rolamento incapsulate
+scroll_wrapped_label=Rolamento incapsulate
+
+spread_none.title=Non junger paginas dual
+spread_none_label=Sin paginas dual
+spread_odd.title=Junger paginas dual a partir de paginas con numeros impar
+spread_odd_label=Paginas dual impar
+spread_even.title=Junger paginas dual a partir de paginas con numeros par
+spread_even_label=Paginas dual par
+
+# Document properties dialog box
+document_properties.title=Proprietates del documento…
+document_properties_label=Proprietates del documento…
+document_properties_file_name=Nomine del file:
+document_properties_file_size=Dimension de file:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Titulo:
+document_properties_author=Autor:
+document_properties_subject=Subjecto:
+document_properties_keywords=Parolas clave:
+document_properties_creation_date=Data de creation:
+document_properties_modification_date=Data de modification:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Creator:
+document_properties_producer=Productor PDF:
+document_properties_version=Version PDF:
+document_properties_page_count=Numero de paginas:
+document_properties_page_size=Dimension del pagina:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=vertical
+document_properties_page_size_orientation_landscape=horizontal
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Littera
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Vista web rapide:
+document_properties_linearized_yes=Si
+document_properties_linearized_no=No
+document_properties_close=Clauder
+
+print_progress_message=Preparation del documento pro le impression…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Cancellar
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Monstrar/celar le barra lateral
+toggle_sidebar_notification.title=Monstrar/celar le barra lateral (le documento contine structura/attachamentos)
+toggle_sidebar_label=Monstrar/celar le barra lateral
+document_outline.title=Monstrar le schema del documento (clic duple pro expander/contraher tote le elementos)
+document_outline_label=Schema del documento
+attachments.title=Monstrar le annexos
+attachments_label=Annexos
+thumbs.title=Monstrar le vignettes
+thumbs_label=Vignettes
+findbar.title=Cercar in le documento
+findbar_label=Cercar
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Pagina {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Pagina {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Vignette del pagina {{page}}
+
+# Find panel button title and messages
+find_input.title=Cercar
+find_input.placeholder=Cercar in le documento…
+find_previous.title=Trovar le previe occurrentia del phrase
+find_previous_label=Previe
+find_next.title=Trovar le successive occurrentia del phrase
+find_next_label=Sequente
+find_highlight=Evidentiar toto
+find_match_case_label=Distinguer majusculas/minusculas
+find_entire_word_label=Parolas integre
+find_reached_top=Initio del documento attingite, continuation ab fin
+find_reached_bottom=Fin del documento attingite, continuation ab initio
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} de {{total}} concordantia
+find_match_count[two]={{current}} de {{total}} concordantias
+find_match_count[few]={{current}} de {{total}} concordantias
+find_match_count[many]={{current}} de {{total}} concordantias
+find_match_count[other]={{current}} de {{total}} concordantias
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Plus de {{limit}} concordantias
+find_match_count_limit[one]=Plus de {{limit}} concordantia
+find_match_count_limit[two]=Plus de {{limit}} concordantias
+find_match_count_limit[few]=Plus de {{limit}} concordantias
+find_match_count_limit[many]=Plus de {{limit}} correspondentias
+find_match_count_limit[other]=Plus de {{limit}} concordantias
+find_not_found=Phrase non trovate
+
+# Error panel labels
+error_more_info=Plus de informationes
+error_less_info=Minus de informationes
+error_close=Clauder
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Message: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Pila: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=File: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Linea: {{line}}
+rendering_error=Un error occurreva durante que on processava le pagina.
+
+# Predefined zoom values
+page_scale_width=Largessa pagina plen
+page_scale_fit=Pagina integre
+page_scale_auto=Zoom automatic
+page_scale_actual=Dimension actual
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Error
+loading_error=Un error occurreva durante que on cargava le file PDF.
+invalid_file_error=File PDF corrumpite o non valide.
+missing_file_error=File PDF mancante.
+unexpected_response_error=Responsa del servitor inexpectate.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Annotation]
+password_label=Insere le contrasigno pro aperir iste file PDF.
+password_invalid=Contrasigno invalide. Per favor retenta.
+password_ok=OK
+password_cancel=Cancellar
+
+printing_not_supported=Attention : le impression non es totalmente supportate per ce navigator.
+printing_not_ready=Attention: le file PDF non es integremente cargate pro lo poter imprimer.
+web_fonts_disabled=Le typos de litteras web es disactivate: impossibile usar le typos de litteras PDF incorporate.
+document_colors_not_allowed=Le documentos PDF non pote utilisar lor proprie colores: “Autorisar le paginas web a utilisar lor proprie colores†es disactivate in le navigator.
diff --git a/js/pdfjs/web/locale/id/viewer.properties b/js/pdfjs/web/locale/id/viewer.properties
new file mode 100644
index 0000000..0a904e1
--- /dev/null
+++ b/js/pdfjs/web/locale/id/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Laman Sebelumnya
+previous_label=Sebelumnya
+next.title=Laman Selanjutnya
+next_label=Selanjutnya
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Halaman
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=dari {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} dari {{pagesCount}})
+
+zoom_out.title=Perkecil
+zoom_out_label=Perkecil
+zoom_in.title=Perbesar
+zoom_in_label=Perbesar
+zoom.title=Perbesaran
+presentation_mode.title=Ganti ke Mode Presentasi
+presentation_mode_label=Mode Presentasi
+open_file.title=Buka Berkas
+open_file_label=Buka
+print.title=Cetak
+print_label=Cetak
+download.title=Unduh
+download_label=Unduh
+bookmark.title=Tampilan Sekarang (salin atau buka di jendela baru)
+bookmark_label=Tampilan Sekarang
+
+# Secondary toolbar and context menu
+tools.title=Alat
+tools_label=Alat
+first_page.title=Buka Halaman Pertama
+first_page.label=Ke Halaman Pertama
+first_page_label=Buka Halaman Pertama
+last_page.title=Buka Halaman Terakhir
+last_page.label=Ke Halaman Terakhir
+last_page_label=Buka Halaman Terakhir
+page_rotate_cw.title=Putar Searah Jarum Jam
+page_rotate_cw.label=Putar Searah Jarum Jam
+page_rotate_cw_label=Putar Searah Jarum Jam
+page_rotate_ccw.title=Putar Berlawanan Arah Jarum Jam
+page_rotate_ccw.label=Putar Berlawanan Arah Jarum Jam
+page_rotate_ccw_label=Putar Berlawanan Arah Jarum Jam
+
+cursor_text_select_tool.title=Aktifkan Alat Seleksi Teks
+cursor_text_select_tool_label=Alat Seleksi Teks
+cursor_hand_tool.title=Aktifkan Alat Tangan
+cursor_hand_tool_label=Alat Tangan
+
+scroll_vertical.title=Gunakan Penggeseran Vertikal
+scroll_vertical_label=Penggeseran Vertikal
+scroll_horizontal.title=Gunakan Penggeseran Horizontal
+scroll_horizontal_label=Penggeseran Horizontal
+scroll_wrapped.title=Gunakan Penggeseran Terapit
+scroll_wrapped_label=Penggeseran Terapit
+
+spread_none.title=Jangan gabungkan lembar halaman
+spread_none_label=Tidak Ada Lembaran
+spread_odd.title=Gabungkan lembar lamanan mulai dengan halaman ganjil
+spread_odd_label=Lembaran Ganjil
+spread_even.title=Gabungkan lembar halaman dimulai dengan halaman genap
+spread_even_label=Lembaran Genap
+
+# Document properties dialog box
+document_properties.title=Properti Dokumen…
+document_properties_label=Properti Dokumen…
+document_properties_file_name=Nama berkas:
+document_properties_file_size=Ukuran berkas:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} byte)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} byte)
+document_properties_title=Judul:
+document_properties_author=Penyusun:
+document_properties_subject=Subjek:
+document_properties_keywords=Kata Kunci:
+document_properties_creation_date=Tanggal Dibuat:
+document_properties_modification_date=Tanggal Dimodifikasi:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Pembuat:
+document_properties_producer=Pemroduksi PDF:
+document_properties_version=Versi PDF:
+document_properties_page_count=Jumlah Halaman:
+document_properties_page_size=Ukuran Laman:
+document_properties_page_size_unit_inches=inci
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=tegak
+document_properties_page_size_orientation_landscape=mendatar
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Tampilan Web Kilat:
+document_properties_linearized_yes=Ya
+document_properties_linearized_no=Tidak
+document_properties_close=Tutup
+
+print_progress_message=Menyiapkan dokumen untuk pencetakan…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Batalkan
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Aktif/Nonaktifkan Bilah Samping
+toggle_sidebar_notification.title=Aktif/Nonaktifkan Bilah Samping (dokumen berisi kerangka/lampiran)
+toggle_sidebar_label=Aktif/Nonaktifkan Bilah Samping
+document_outline.title=Tampilkan Kerangka Dokumen (klik ganda untuk membentangkan/menciutkan semua item)
+document_outline_label=Kerangka Dokumen
+attachments.title=Tampilkan Lampiran
+attachments_label=Lampiran
+thumbs.title=Tampilkan Miniatur
+thumbs_label=Miniatur
+findbar.title=Temukan di Dokumen
+findbar_label=Temukan
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Laman {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Laman {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniatur Laman {{page}}
+
+# Find panel button title and messages
+find_input.title=Temukan
+find_input.placeholder=Temukan di dokumen…
+find_previous.title=Temukan kata sebelumnya
+find_previous_label=Sebelumnya
+find_next.title=Temukan lebih lanjut
+find_next_label=Selanjutnya
+find_highlight=Sorot semuanya
+find_match_case_label=Cocokkan BESAR/kecil
+find_entire_word_label=Seluruh teks
+find_reached_top=Sampai di awal dokumen, dilanjutkan dari bawah
+find_reached_bottom=Sampai di akhir dokumen, dilanjutkan dari atas
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} dari {{total}} hasil
+find_match_count[two]={{current}} dari {{total}} hasil
+find_match_count[few]={{current}} dari {{total}} hasil
+find_match_count[many]={{current}} dari {{total}} hasil
+find_match_count[other]={{current}} dari {{total}} hasil
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Ditemukan lebih dari {{limit}}
+find_match_count_limit[one]=Ditemukan lebih dari {{limit}}
+find_match_count_limit[two]=Ditemukan lebih dari {{limit}}
+find_match_count_limit[few]=Ditemukan lebih dari {{limit}}
+find_match_count_limit[many]=Ditemukan lebih dari {{limit}}
+find_match_count_limit[other]=Ditemukan lebih dari {{limit}}
+find_not_found=Frasa tidak ditemukan
+
+# Error panel labels
+error_more_info=Lebih Banyak Informasi
+error_less_info=Lebih Sedikit Informasi
+error_close=Tutup
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Pesan: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stack: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Berkas: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Baris: {{line}}
+rendering_error=Galat terjadi saat merender laman.
+
+# Predefined zoom values
+page_scale_width=Lebar Laman
+page_scale_fit=Muat Laman
+page_scale_auto=Perbesaran Otomatis
+page_scale_actual=Ukuran Asli
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Galat
+loading_error=Galat terjadi saat memuat PDF.
+invalid_file_error=Berkas PDF tidak valid atau rusak.
+missing_file_error=Berkas PDF tidak ada.
+unexpected_response_error=Balasan server yang tidak diharapkan.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Anotasi {{type}}]
+password_label=Masukkan sandi untuk membuka berkas PDF ini.
+password_invalid=Sandi tidak valid. Silakan coba lagi.
+password_ok=Oke
+password_cancel=Batal
+
+printing_not_supported=Peringatan: Pencetakan tidak didukung secara lengkap pada peramban ini.
+printing_not_ready=Peringatan: Berkas PDF masih belum dimuat secara lengkap untuk dapat dicetak.
+web_fonts_disabled=Font web dinonaktifkan: tidak dapat menggunakan font PDF yang tersemat.
+document_colors_not_allowed=Dokumen PDF tidak diizinkan untuk menggunakan warnanya sendiri karena setelan 'Izinkan laman memilih warna sendiri' dinonaktifkan pada pengaturan.
diff --git a/js/pdfjs/web/locale/is/viewer.properties b/js/pdfjs/web/locale/is/viewer.properties
new file mode 100644
index 0000000..d24c2ad
--- /dev/null
+++ b/js/pdfjs/web/locale/is/viewer.properties
@@ -0,0 +1,239 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Fyrri síða
+previous_label=Fyrri
+next.title=Næsta síða
+next_label=Næsti
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Síða
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=af {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} af {{pagesCount}})
+
+zoom_out.title=Minnka
+zoom_out_label=Minnka
+zoom_in.title=Stækka
+zoom_in_label=Stækka
+zoom.title=Aðdráttur
+presentation_mode.title=Skipta yfir á kynningarham
+presentation_mode_label=Kynningarhamur
+open_file.title=Opna skrá
+open_file_label=Opna
+print.title=Prenta
+print_label=Prenta
+download.title=Hala niður
+download_label=Hala niður
+bookmark.title=Núverandi sýn (afritaðu eða opnaðu í nýjum glugga)
+bookmark_label=Núverandi sýn
+
+# Secondary toolbar and context menu
+tools.title=Verkfæri
+tools_label=Verkfæri
+first_page.title=Fara á fyrstu síðu
+first_page.label=Fara á fyrstu síðu
+first_page_label=Fara á fyrstu síðu
+last_page.title=Fara á síðustu síðu
+last_page.label=Fara á síðustu síðu
+last_page_label=Fara á síðustu síðu
+page_rotate_cw.title=Snúa réttsælis
+page_rotate_cw.label=Snúa réttsælis
+page_rotate_cw_label=Snúa réttsælis
+page_rotate_ccw.title=Snúa rangsælis
+page_rotate_ccw.label=Snúa rangsælis
+page_rotate_ccw_label=Snúa rangsælis
+
+cursor_text_select_tool.title=Virkja textavalsáhald
+cursor_text_select_tool_label=Textavalsáhald
+cursor_hand_tool.title=Virkja handarverkfæri
+cursor_hand_tool_label=Handarverkfæri
+
+scroll_vertical.title=Nota lóðrétt skrun
+scroll_vertical_label=Lóðrétt skrun
+scroll_horizontal.title=Nota lárétt skrun
+scroll_horizontal_label=Lárétt skrun
+
+spread_none.title=Ekki taka þátt í dreifingu síðna
+spread_none_label=Engin dreifing
+spread_odd.title=Taka þátt í dreifingu síðna með oddatölum
+spread_odd_label=Oddatöludreifing
+spread_even.title=Taktu þátt í dreifingu síðna með jöfnuntölum
+spread_even_label=Jafnatöludreifing
+
+# Document properties dialog box
+document_properties.title=Eiginleikar skjals…
+document_properties_label=Eiginleikar skjals…
+document_properties_file_name=Skráarnafn:
+document_properties_file_size=Skrárstærð:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Titill:
+document_properties_author=Hönnuður:
+document_properties_subject=Efni:
+document_properties_keywords=Stikkorð:
+document_properties_creation_date=Búið til:
+document_properties_modification_date=Dags breytingar:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Höfundur:
+document_properties_producer=PDF framleiðandi:
+document_properties_version=PDF útgáfa:
+document_properties_page_count=Blaðsíðufjöldi:
+document_properties_page_size=Stærð síðu:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=skammsnið
+document_properties_page_size_orientation_landscape=langsnið
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized_yes=Já
+document_properties_linearized_no=Nei
+document_properties_close=Loka
+
+print_progress_message=Undirbý skjal fyrir prentun…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Hætta við
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Víxla hliðslá
+toggle_sidebar_notification.title=Víxla hliðarslá (skjal inniheldur yfirlit/viðhengi)
+toggle_sidebar_label=Víxla hliðslá
+document_outline.title=Sýna yfirlit skjals (tvísmelltu til að opna/loka öllum hlutum)
+document_outline_label=Efnisskipan skjals
+attachments.title=Sýna viðhengi
+attachments_label=Viðhengi
+thumbs.title=Sýna smámyndir
+thumbs_label=Smámyndir
+findbar.title=Leita í skjali
+findbar_label=Leita
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Síða {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Smámynd af síðu {{page}}
+
+# Find panel button title and messages
+find_input.title=Leita
+find_input.placeholder=Leita í skjali…
+find_previous.title=Leita að fyrra tilfelli þessara orða
+find_previous_label=Fyrri
+find_next.title=Leita að næsta tilfelli þessara orða
+find_next_label=Næsti
+find_highlight=Lita allt
+find_match_case_label=Passa við stafstöðu
+find_entire_word_label=Heil orð
+find_reached_top=Náði efst í skjal, held áfram neðst
+find_reached_bottom=Náði enda skjals, held áfram efst
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} af {{total}} niðurstöðu
+find_match_count[two]={{current}} af {{total}} niðurstöðum
+find_match_count[few]={{current}} af {{total}} niðurstöðum
+find_match_count[many]={{current}} af {{total}} niðurstöðum
+find_match_count[other]={{current}} af {{total}} niðurstöðum
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Fleiri en {{limit}} niðurstöður
+find_match_count_limit[one]=Fleiri en {{limit}} niðurstaða
+find_match_count_limit[two]=Fleiri en {{limit}} niðurstöður
+find_match_count_limit[few]=Fleiri en {{limit}} niðurstöður
+find_match_count_limit[many]=Fleiri en {{limit}} niðurstöður
+find_match_count_limit[other]=Fleiri en {{limit}} niðurstöður
+find_not_found=Fann ekki orðið
+
+# Error panel labels
+error_more_info=Meiri upplýsingar
+error_less_info=Minni upplýsingar
+error_close=Loka
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Skilaboð: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stafli: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Skrá: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Lína: {{line}}
+rendering_error=Upp kom villa við að birta síðuna.
+
+# Predefined zoom values
+page_scale_width=Síðubreidd
+page_scale_fit=Passa á síðu
+page_scale_auto=Sjálfvirkur aðdráttur
+page_scale_actual=Raunstærð
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Villa
+loading_error=Villa kom upp við að hlaða inn PDF.
+invalid_file_error=Ógild eða skemmd PDF skrá.
+missing_file_error=Vantar PDF skrá.
+unexpected_response_error=Óvænt svar frá netþjóni.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Skýring]
+password_label=Sláðu inn lykilorð til að opna þessa PDF skrá.
+password_invalid=Ógilt lykilorð. Reyndu aftur.
+password_ok=Ã lagi
+password_cancel=Hætta við
+
+printing_not_supported=Aðvörun: Prentun er ekki með fyllilegan stuðning á þessum vafra.
+printing_not_ready=Aðvörun: Ekki er búið að hlaða inn allri PDF skránni fyrir prentun.
+web_fonts_disabled=Vef leturgerðir eru óvirkar: get ekki notað innbyggðar PDF leturgerðir.
+document_colors_not_allowed=PDF skjöl hafa ekki leyfi til að nota sína eigin liti: “Leyfa síðum að velja eigin liti†er óvirkt í vafranum.
diff --git a/js/pdfjs/web/locale/it/viewer.properties b/js/pdfjs/web/locale/it/viewer.properties
new file mode 100644
index 0000000..1f0a20a
--- /dev/null
+++ b/js/pdfjs/web/locale/it/viewer.properties
@@ -0,0 +1,159 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+previous.title = Pagina precedente
+previous_label = Precedente
+next.title = Pagina successiva
+next_label = Successiva
+page.title = Pagina
+of_pages = di {{pagesCount}}
+page_of_pages = ({{pageNumber}} di {{pagesCount}})
+zoom_out.title = Riduci zoom
+zoom_out_label = Riduci zoom
+zoom_in.title = Aumenta zoom
+zoom_in_label = Aumenta zoom
+zoom.title = Zoom
+presentation_mode.title = Passa alla modalità presentazione
+presentation_mode_label = Modalità presentazione
+open_file.title = Apri file
+open_file_label = Apri
+print.title = Stampa
+print_label = Stampa
+download.title = Scarica questo documento
+download_label = Download
+bookmark.title = Visualizzazione corrente (copia o apri in una nuova finestra)
+bookmark_label = Visualizzazione corrente
+tools.title = Strumenti
+tools_label = Strumenti
+first_page.title = Vai alla prima pagina
+first_page.label = Vai alla prima pagina
+first_page_label = Vai alla prima pagina
+last_page.title = Vai all’ultima pagina
+last_page.label = Vai all’ultima pagina
+last_page_label = Vai all’ultima pagina
+page_rotate_cw.title = Ruota in senso orario
+page_rotate_cw.label = Ruota in senso orario
+page_rotate_cw_label = Ruota in senso orario
+page_rotate_ccw.title = Ruota in senso antiorario
+page_rotate_ccw.label = Ruota in senso antiorario
+page_rotate_ccw_label = Ruota in senso antiorario
+cursor_text_select_tool.title = Attiva strumento di selezione testo
+cursor_text_select_tool_label = Strumento di selezione testo
+cursor_hand_tool.title = Attiva strumento mano
+cursor_hand_tool_label = Strumento mano
+scroll_vertical.title = Scorri le pagine in verticale
+scroll_vertical_label = Scorrimento verticale
+scroll_horizontal.title = Scorri le pagine in orizzontale
+scroll_horizontal_label = Scorrimento orizzontale
+scroll_wrapped.title = Scorri le pagine in verticale, disponendole da sinistra a destra e andando a capo automaticamente
+scroll_wrapped_label = Scorrimento con a capo automatico
+spread_none.title = Non raggruppare pagine
+spread_none_label = Nessun raggruppamento
+spread_odd.title = Crea gruppi di pagine che iniziano con numeri di pagina dispari
+spread_odd_label = Raggruppamento dispari
+spread_even.title = Crea gruppi di pagine che iniziano con numeri di pagina pari
+spread_even_label = Raggruppamento pari
+document_properties.title = Proprietà del documento…
+document_properties_label = Proprietà del documento…
+document_properties_file_name = Nome file:
+document_properties_file_size = Dimensione file:
+document_properties_kb = {{size_kb}} kB ({{size_b}} byte)
+document_properties_mb = {{size_mb}} MB ({{size_b}} byte)
+document_properties_title = Titolo:
+document_properties_author = Autore:
+document_properties_subject = Oggetto:
+document_properties_keywords = Parole chiave:
+document_properties_creation_date = Data creazione:
+document_properties_modification_date = Data modifica:
+document_properties_date_string = {{date}}, {{time}}
+document_properties_creator = Autore originale:
+document_properties_producer = Produttore PDF:
+document_properties_version = Versione PDF:
+document_properties_page_count = Conteggio pagine:
+document_properties_page_size = Dimensioni pagina:
+document_properties_page_size_unit_inches = in
+document_properties_page_size_unit_millimeters = mm
+document_properties_page_size_orientation_portrait = verticale
+document_properties_page_size_orientation_landscape = orizzontale
+document_properties_page_size_name_a3 = A3
+document_properties_page_size_name_a4 = A4
+document_properties_page_size_name_letter = Lettera
+document_properties_page_size_name_legal = Legale
+document_properties_page_size_dimension_string = {{width}} × {{height}} {{unit}} ({{orientation}})
+document_properties_page_size_dimension_name_string = {{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+document_properties_linearized = Visualizzazione web veloce:
+document_properties_linearized_yes = Sì
+document_properties_linearized_no = No
+document_properties_close = Chiudi
+print_progress_message = Preparazione documento per la stampa…
+print_progress_percent = {{progress}}%
+print_progress_close = Annulla
+toggle_sidebar.title = Attiva/disattiva barra laterale
+toggle_sidebar_notification.title = Attiva/disattiva barra laterale (il documento contiene struttura/allegati)
+toggle_sidebar_label = Attiva/disattiva barra laterale
+document_outline.title = Visualizza la struttura del documento (doppio clic per visualizzare/comprimere tutti gli elementi)
+document_outline_label = Struttura documento
+attachments.title = Visualizza allegati
+attachments_label = Allegati
+thumbs.title = Mostra le miniature
+thumbs_label = Miniature
+findbar.title = Trova nel documento
+findbar_label = Trova
+page_canvas = Pagina {{page}}
+thumb_page_title = Pagina {{page}}
+thumb_page_canvas = Miniatura della pagina {{page}}
+find_input.title = Trova
+find_input.placeholder = Trova nel documento…
+find_previous.title = Trova l’occorrenza precedente del testo da cercare
+find_previous_label = Precedente
+find_next.title = Trova l’occorrenza successiva del testo da cercare
+find_next_label = Successivo
+find_highlight = Evidenzia
+find_match_case_label = Maiuscole/minuscole
+find_entire_word_label = Parole intere
+find_reached_top = Raggiunto l’inizio della pagina, continua dalla fine
+find_reached_bottom = Raggiunta la fine della pagina, continua dall’inizio
+find_match_count = {[ plural(total) ]}
+find_match_count[one] = {{current}} di {{total}} corrispondenza
+find_match_count[two] = {{current}} di {{total}} corrispondenze
+find_match_count[few] = {{current}} di {{total}} corrispondenze
+find_match_count[many] = {{current}} di {{total}} corrispondenze
+find_match_count[other] = {{current}} di {{total}} corrispondenze
+find_match_count_limit = {[ plural(limit) ]}
+find_match_count_limit[zero] = Più di {{limit}} corrispondenze
+find_match_count_limit[one] = Più di {{limit}} corrispondenza
+find_match_count_limit[two] = Più di {{limit}} corrispondenze
+find_match_count_limit[few] = Più di {{limit}} corrispondenze
+find_match_count_limit[many] = Più di {{limit}} corrispondenze
+find_match_count_limit[other] = Più di {{limit}} corrispondenze
+find_not_found = Testo non trovato
+error_more_info = Ulteriori informazioni
+error_less_info = Nascondi dettagli
+error_close = Chiudi
+error_version_info = PDF.js v{{version}} (build: {{build}})
+error_message = Messaggio: {{message}}
+error_stack = Stack: {{stack}}
+error_file = File: {{file}}
+error_line = Riga: {{line}}
+rendering_error = Si è verificato un errore durante il rendering della pagina.
+page_scale_width = Larghezza pagina
+page_scale_fit = Adatta a una pagina
+page_scale_auto = Zoom automatico
+page_scale_actual = Dimensioni effettive
+page_scale_percent = {{scale}}%
+loading_error_indicator = Errore
+loading_error = Si è verificato un errore durante il caricamento del PDF.
+invalid_file_error = File PDF non valido o danneggiato.
+missing_file_error = File PDF non disponibile.
+unexpected_response_error = Risposta imprevista del server
+annotation_date_string = {{date}}, {{time}}
+text_annotation_type.alt = [Annotazione: {{type}}]
+password_label = Inserire la password per aprire questo file PDF.
+password_invalid = Password non corretta. Riprovare.
+password_ok = OK
+password_cancel = Annulla
+printing_not_supported = Attenzione: la stampa non è completamente supportata da questo browser.
+printing_not_ready = Attenzione: il PDF non è ancora stato caricato completamente per la stampa.
+web_fonts_disabled = I web font risultano disattivati: impossibile utilizzare i caratteri incorporati nel PDF.
+document_colors_not_allowed = Non è possibile visualizzare i colori originali definiti nel file PDF: l’opzione del browser “Consenti alle pagine di scegliere i propri colori invece di quelli impostati†è disattivata.
diff --git a/js/pdfjs/web/locale/ja/viewer.properties b/js/pdfjs/web/locale/ja/viewer.properties
new file mode 100644
index 0000000..95732a0
--- /dev/null
+++ b/js/pdfjs/web/locale/ja/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=å‰ã®ãƒšãƒ¼ã‚¸ã¸æˆ»ã‚Šã¾ã™
+previous_label=å‰ã¸
+next.title=次ã®ãƒšãƒ¼ã‚¸ã¸é€²ã¿ã¾ã™
+next_label=次ã¸
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=ページ
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=/ {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} / {{pagesCount}})
+
+zoom_out.title=表示を縮å°ã—ã¾ã™
+zoom_out_label=縮å°
+zoom_in.title=表示を拡大ã—ã¾ã™
+zoom_in_label=拡大
+zoom.title=拡大/縮å°
+presentation_mode.title=プレゼンテーションモードã«åˆ‡ã‚Šæ›¿ãˆã¾ã™
+presentation_mode_label=プレゼンテーションモード
+open_file.title=ファイルを開ãã¾ã™
+open_file_label=é–‹ã
+print.title=å°åˆ·ã—ã¾ã™
+print_label=å°åˆ·
+download.title=ダウンロードã—ã¾ã™
+download_label=ダウンロード
+bookmark.title=ç¾åœ¨ã®ãƒ“ュー㮠URL ã§ã™ (コピーã¾ãŸã¯æ–°ã—ã„ウィンドウã«é–‹ã)
+bookmark_label=ç¾åœ¨ã®ãƒ“ュー
+
+# Secondary toolbar and context menu
+tools.title=ツール
+tools_label=ツール
+first_page.title=最åˆã®ãƒšãƒ¼ã‚¸ã¸ç§»å‹•ã—ã¾ã™
+first_page.label=最åˆã®ãƒšãƒ¼ã‚¸ã¸ç§»å‹•
+first_page_label=最åˆã®ãƒšãƒ¼ã‚¸ã¸ç§»å‹•
+last_page.title=最後ã®ãƒšãƒ¼ã‚¸ã¸ç§»å‹•ã—ã¾ã™
+last_page.label=最後ã®ãƒšãƒ¼ã‚¸ã¸ç§»å‹•
+last_page_label=最後ã®ãƒšãƒ¼ã‚¸ã¸ç§»å‹•
+page_rotate_cw.title=ページをå³ã¸å›žè»¢ã—ã¾ã™
+page_rotate_cw.label=å³å›žè»¢
+page_rotate_cw_label=å³å›žè»¢
+page_rotate_ccw.title=ページを左ã¸å›žè»¢ã—ã¾ã™
+page_rotate_ccw.label=左回転
+page_rotate_ccw_label=左回転
+
+cursor_text_select_tool.title=テキストé¸æŠžãƒ„ールを有効ã«ã™ã‚‹
+cursor_text_select_tool_label=テキストé¸æŠžãƒ„ール
+cursor_hand_tool.title=手ã®ã²ã‚‰ãƒ„ールを有効ã«ã™ã‚‹
+cursor_hand_tool_label=手ã®ã²ã‚‰ãƒ„ール
+
+scroll_vertical.title=縦スクロールã«ã™ã‚‹
+scroll_vertical_label=縦スクロール
+scroll_horizontal.title=横スクロールã«ã™ã‚‹
+scroll_horizontal_label=横スクロール
+scroll_wrapped.title=折り返ã—スクロールã«ã™ã‚‹
+scroll_wrapped_label=折り返ã—スクロール
+
+spread_none.title=見開ãã«ã—ãªã„
+spread_none_label=見開ãã«ã—ãªã„
+spread_odd.title=奇数ページ開始ã§è¦‹é–‹ãã«ã™ã‚‹
+spread_odd_label=奇数ページ見開ã
+spread_even.title=å¶æ•°ãƒšãƒ¼ã‚¸é–‹å§‹ã§è¦‹é–‹ãã«ã™ã‚‹
+spread_even_label=å¶æ•°ãƒšãƒ¼ã‚¸è¦‹é–‹ã
+
+# Document properties dialog box
+document_properties.title=文書ã®ãƒ—ロパティ...
+document_properties_label=文書ã®ãƒ—ロパティ...
+document_properties_file_name=ファイルå:
+document_properties_file_size=ファイルサイズ:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=タイトル:
+document_properties_author=作æˆè€…:
+document_properties_subject=件å:
+document_properties_keywords=キーワード:
+document_properties_creation_date=作æˆæ—¥:
+document_properties_modification_date=æ›´æ–°æ—¥:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=アプリケーション:
+document_properties_producer=PDF 作æˆ:
+document_properties_version=PDF ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³:
+document_properties_page_count=ページ数:
+document_properties_page_size=ページサイズ:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=縦
+document_properties_page_size_orientation_landscape=横
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=レター
+document_properties_page_size_name_legal=リーガル
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=ウェブ表示用ã«æœ€é©åŒ–:
+document_properties_linearized_yes=ã¯ã„
+document_properties_linearized_no=ã„ã„ãˆ
+document_properties_close=é–‰ã˜ã‚‹
+
+print_progress_message=文書ã®å°åˆ·ã‚’準備ã—ã¦ã„ã¾ã™...
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=キャンセル
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=サイドãƒãƒ¼è¡¨ç¤ºã‚’切り替ãˆã¾ã™
+toggle_sidebar_notification.title=サイドãƒãƒ¼è¡¨ç¤ºã‚’切り替ãˆã¾ã™ (文書ã«å«ã¾ã‚Œã‚‹ã‚¢ã‚¦ãƒˆãƒ©ã‚¤ãƒ³ / 添付)
+toggle_sidebar_label=サイドãƒãƒ¼ã®åˆ‡ã‚Šæ›¿ãˆ
+document_outline.title=文書ã®ç›®æ¬¡ã‚’表示ã—ã¾ã™ (ダブルクリックã§é …目を開閉ã—ã¾ã™)
+document_outline_label=文書ã®ç›®æ¬¡
+attachments.title=添付ファイルを表示ã—ã¾ã™
+attachments_label=添付ファイル
+thumbs.title=縮å°ç‰ˆã‚’表示ã—ã¾ã™
+thumbs_label=縮å°ç‰ˆ
+findbar.title=文書内を検索ã—ã¾ã™
+findbar_label=検索
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas={{page}} ページ
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title={{page}} ページ
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas={{page}} ページã®ç¸®å°ç‰ˆ
+
+# Find panel button title and messages
+find_input.title=検索
+find_input.placeholder=文書内を検索...
+find_previous.title=ç¾åœ¨ã‚ˆã‚Šå‰ã®ä½ç½®ã§æŒ‡å®šæ–‡å­—列ãŒç¾ã‚Œã‚‹éƒ¨åˆ†ã‚’検索ã—ã¾ã™
+find_previous_label=å‰ã¸
+find_next.title=ç¾åœ¨ã‚ˆã‚Šå¾Œã®ä½ç½®ã§æŒ‡å®šæ–‡å­—列ãŒç¾ã‚Œã‚‹éƒ¨åˆ†ã‚’検索ã—ã¾ã™
+find_next_label=次ã¸
+find_highlight=ã™ã¹ã¦å¼·èª¿è¡¨ç¤º
+find_match_case_label=大文字/å°æ–‡å­—を区別
+find_entire_word_label=å˜èªžä¸€è‡´
+find_reached_top=文書先頭ã«åˆ°é”ã—ãŸã®ã§æœ«å°¾ã‹ã‚‰ç¶šã‘ã¦æ¤œç´¢ã—ã¾ã™
+find_reached_bottom=文書末尾ã«åˆ°é”ã—ãŸã®ã§å…ˆé ­ã‹ã‚‰ç¶šã‘ã¦æ¤œç´¢ã—ã¾ã™
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{total}} 件中 {{current}} 件目
+find_match_count[two]={{total}} 件中 {{current}} 件目
+find_match_count[few]={{total}} 件中 {{current}} 件目
+find_match_count[many]={{total}} 件中 {{current}} 件目
+find_match_count[other]={{total}} 件中 {{current}} 件目
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]={{limit}} 件以上一致
+find_match_count_limit[one]={{limit}} 件以上一致
+find_match_count_limit[two]={{limit}} 件以上一致
+find_match_count_limit[few]={{limit}} 件以上一致
+find_match_count_limit[many]={{limit}} 件以上一致
+find_match_count_limit[other]={{limit}} 件以上一致
+find_not_found=見ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸ
+
+# Error panel labels
+error_more_info=詳細情報
+error_less_info=詳細情報を隠ã™
+error_close=é–‰ã˜ã‚‹
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (ビルド: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=メッセージ: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=スタック: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=ファイル: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=行: {{line}}
+rendering_error=ページã®ãƒ¬ãƒ³ãƒ€ãƒªãƒ³ã‚°ä¸­ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚
+
+# Predefined zoom values
+page_scale_width=å¹…ã«åˆã‚ã›ã‚‹
+page_scale_fit=ページã®ã‚µã‚¤ã‚ºã«åˆã‚ã›ã‚‹
+page_scale_auto=自動ズーム
+page_scale_actual=実際ã®ã‚µã‚¤ã‚º
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=エラー
+loading_error=PDF ã®èª­ã¿è¾¼ã¿ä¸­ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚
+invalid_file_error=無効ã¾ãŸã¯ç ´æã—㟠PDF ファイル。
+missing_file_error=PDF ファイルãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。
+unexpected_response_error=サーãƒãƒ¼ã‹ã‚‰äºˆæœŸã›ã¬å¿œç­”ãŒã‚ã‚Šã¾ã—ãŸã€‚
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} 注釈]
+password_label=ã“ã® PDF ファイルを開ããŸã‚ã®ãƒ‘スワードを入力ã—ã¦ãã ã•ã„。
+password_invalid=無効ãªãƒ‘スワードã§ã™ã€‚ã‚‚ã†ä¸€åº¦ã‚„ã‚Šç›´ã—ã¦ãã ã•ã„。
+password_ok=OK
+password_cancel=キャンセル
+
+printing_not_supported=警告: ã“ã®ãƒ–ラウザーã§ã¯å°åˆ·ãŒå®Œå…¨ã«ã‚µãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã›ã‚“。
+printing_not_ready=警告: PDF ã‚’å°åˆ·ã™ã‚‹ãŸã‚ã®èª­ã¿è¾¼ã¿ãŒçµ‚了ã—ã¦ã„ã¾ã›ã‚“。
+web_fonts_disabled=ウェブフォントãŒç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™: 埋ã‚è¾¼ã¾ã‚ŒãŸ PDF ã®ãƒ•ã‚©ãƒ³ãƒˆã‚’使用ã§ãã¾ã›ã‚“。
+document_colors_not_allowed=PDF 文書ã¯ã€ã‚¦ã‚§ãƒ–ページãŒæŒ‡å®šã—ãŸé…色を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“: 'ウェブページãŒæŒ‡å®šã—ãŸé…色' ã¯ãƒ–ラウザーã§ç„¡åŠ¹ã«ãªã£ã¦ã„ã¾ã™ã€‚
diff --git a/js/pdfjs/web/locale/ka/viewer.properties b/js/pdfjs/web/locale/ka/viewer.properties
new file mode 100644
index 0000000..d7a8f7a
--- /dev/null
+++ b/js/pdfjs/web/locale/ka/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=წინრგვერდი
+previous_label=წინáƒ
+next.title=შემდეგი გვერდი
+next_label=შემდეგი
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=გვერდი
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages={{pagesCount}}-დáƒáƒœ
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} {{pagesCount}}-დáƒáƒœ)
+
+zoom_out.title=ზáƒáƒ›áƒ˜áƒ¡ შემცირებáƒ
+zoom_out_label=დáƒáƒ¨áƒáƒ áƒ”ბáƒ
+zoom_in.title=ზáƒáƒ›áƒ˜áƒ¡ გáƒáƒ–რდáƒ
+zoom_in_label=მáƒáƒáƒ®áƒšáƒáƒ”ბáƒ
+zoom.title=ზáƒáƒ›áƒ
+presentation_mode.title=ჩვენების რეჟიმზე გáƒáƒ“áƒáƒ áƒ—ვáƒ
+presentation_mode_label=ჩვენების რეჟიმი
+open_file.title=ფáƒáƒ˜áƒšáƒ˜áƒ¡ გáƒáƒ®áƒ¡áƒœáƒ
+open_file_label=გáƒáƒ®áƒ¡áƒœáƒ
+print.title=áƒáƒ›áƒáƒ‘ეჭდვáƒ
+print_label=áƒáƒ›áƒáƒ‘ეჭდვáƒ
+download.title=ჩáƒáƒ›áƒáƒ¢áƒ•áƒ˜áƒ áƒ—ვáƒ
+download_label=ჩáƒáƒ›áƒáƒ¢áƒ•áƒ˜áƒ áƒ—ვáƒ
+bookmark.title=მიმდინáƒáƒ áƒ” ხედი (áƒáƒ¡áƒšáƒ˜áƒ¡ áƒáƒ¦áƒ”ბრáƒáƒœ გáƒáƒ®áƒ¡áƒœáƒ áƒáƒ®áƒáƒš ფáƒáƒœáƒ¯áƒáƒ áƒáƒ¨áƒ˜)
+bookmark_label=მიმდინáƒáƒ áƒ” ხედი
+
+# Secondary toolbar and context menu
+tools.title=ხელსáƒáƒ¬áƒ§áƒáƒ”ბი
+tools_label=ხელსáƒáƒ¬áƒ§áƒáƒ”ბი
+first_page.title=პირველ გვერდზე გáƒáƒ“áƒáƒ¡áƒ•áƒšáƒ
+first_page.label=პირველ გვერდზე გáƒáƒ“áƒáƒ¡áƒ•áƒšáƒ
+first_page_label=პირველ გვერდზე გáƒáƒ“áƒáƒ¡áƒ•áƒšáƒ
+last_page.title=ბáƒáƒšáƒ გვერდზე გáƒáƒ“áƒáƒ¡áƒ•áƒšáƒ
+last_page.label=ბáƒáƒšáƒ გვერდზე გáƒáƒ“áƒáƒ¡áƒ•áƒšáƒ
+last_page_label=ბáƒáƒšáƒ გვერდზე გáƒáƒ“áƒáƒ¡áƒ•áƒšáƒ
+page_rotate_cw.title=სáƒáƒáƒ—ის ისრის მიმáƒáƒ áƒ—ულებით შებრუნებáƒ
+page_rotate_cw.label=მáƒáƒ áƒ¯áƒ•áƒœáƒ˜áƒ• გáƒáƒ“áƒáƒ‘რუნებáƒ
+page_rotate_cw_label=მáƒáƒ áƒ¯áƒ•áƒœáƒ˜áƒ• გáƒáƒ“áƒáƒ‘რუნებáƒ
+page_rotate_ccw.title=სáƒáƒáƒ—ის ისრის სáƒáƒžáƒ˜áƒ áƒ˜áƒ¡áƒžáƒ˜áƒ áƒáƒ“ შებრუნებáƒ
+page_rotate_ccw.label=მáƒáƒ áƒªáƒ®áƒœáƒ˜áƒ• გáƒáƒ“áƒáƒ‘რუნებáƒ
+page_rotate_ccw_label=მáƒáƒ áƒªáƒ®áƒœáƒ˜áƒ• გáƒáƒ“áƒáƒ‘რუნებáƒ
+
+cursor_text_select_tool.title=მáƒáƒ¡áƒáƒœáƒ˜áƒ¨áƒœáƒ˜ მáƒáƒ©áƒ•áƒ”ნებლის გáƒáƒ›áƒáƒ§áƒ”ნებáƒ
+cursor_text_select_tool_label=მáƒáƒ¡áƒáƒœáƒ˜áƒ¨áƒœáƒ˜ მáƒáƒ©áƒ•áƒ”ნებელი
+cursor_hand_tool.title=გáƒáƒ“áƒáƒ¡áƒáƒáƒ“გილებელი მáƒáƒ©áƒ•áƒ”ნებლის გáƒáƒ›áƒáƒ§áƒ”ნებáƒ
+cursor_hand_tool_label=გáƒáƒ“áƒáƒ¡áƒáƒáƒ“გილებელი
+
+scroll_vertical.title=გვერდების შვეულáƒáƒ“ ჩვენებáƒ
+scroll_vertical_label=შვეული გáƒáƒ“áƒáƒáƒ“გილებáƒ
+scroll_horizontal.title=გვერდების თáƒáƒ áƒáƒ–ულáƒáƒ“ ჩვენებáƒ
+scroll_horizontal_label=გáƒáƒœáƒ˜áƒ•áƒ˜ გáƒáƒ“áƒáƒáƒ“გილებáƒ
+scroll_wrapped.title=გვერდების ცხრილურáƒáƒ“ ჩვენებáƒ
+scroll_wrapped_label=ცხრილური გáƒáƒ“áƒáƒáƒ“გილებáƒ
+
+spread_none.title=áƒáƒ  გვერდზე გáƒáƒ¨áƒšáƒ˜áƒ¡ გáƒáƒ áƒ”შე
+spread_none_label=ცáƒáƒšáƒ’ვერდიáƒáƒœáƒ˜ ჩვენებáƒ
+spread_odd.title=áƒáƒ  გვერდზე გáƒáƒ¨áƒšáƒ, კენტი გვერდიდáƒáƒœ დáƒáƒ¬áƒ§áƒ”ბული
+spread_odd_label=áƒáƒ  გვერდზე კენტიდáƒáƒœ
+spread_even.title=áƒáƒ  გვერდზე გáƒáƒ¨áƒšáƒ, ლუწი გვერდიდáƒáƒœ დáƒáƒ¬áƒ§áƒ”ბული
+spread_even_label=áƒáƒ  გვერდზე ლუწიდáƒáƒœ
+
+# Document properties dialog box
+document_properties.title=დáƒáƒ™áƒ£áƒ›áƒ”ნტის შესáƒáƒ®áƒ”ბ…
+document_properties_label=დáƒáƒ™áƒ£áƒ›áƒ”ნტის შესáƒáƒ®áƒ”ბ…
+document_properties_file_name=ფáƒáƒ˜áƒšáƒ˜áƒ¡ სáƒáƒ®áƒ”ლი:
+document_properties_file_size=ფáƒáƒ˜áƒšáƒ˜áƒ¡ მáƒáƒªáƒ£áƒšáƒáƒ‘áƒ:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} კბ ({{size_b}} ბáƒáƒ˜áƒ¢áƒ˜)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} მბ ({{size_b}} ბáƒáƒ˜áƒ¢áƒ˜)
+document_properties_title=სáƒáƒ—áƒáƒ£áƒ áƒ˜:
+document_properties_author=შემდგენი:
+document_properties_subject=თემáƒ:
+document_properties_keywords=სáƒáƒ™áƒ•áƒáƒœáƒ«áƒ სიტყვები:
+document_properties_creation_date=შექმნის თáƒáƒ áƒ˜áƒ¦áƒ˜:
+document_properties_modification_date=ჩáƒáƒ¡áƒ¬áƒáƒ áƒ”ბის თáƒáƒ áƒ˜áƒ¦áƒ˜:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=შემქმნელი:
+document_properties_producer=PDF-შემქმნელი:
+document_properties_version=PDF-ვერსიáƒ:
+document_properties_page_count=გვერდების რáƒáƒáƒ“ენáƒáƒ‘áƒ:
+document_properties_page_size=გვერდის ზáƒáƒ›áƒ:
+document_properties_page_size_unit_inches=დუიმი
+document_properties_page_size_unit_millimeters=მმ
+document_properties_page_size_orientation_portrait=შვეულáƒáƒ“
+document_properties_page_size_orientation_landscape=თáƒáƒ áƒáƒ–ულáƒáƒ“
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=სწრáƒáƒ¤áƒ˜ შეთვáƒáƒšáƒ˜áƒ”რებáƒ:
+document_properties_linearized_yes=დიáƒáƒ®
+document_properties_linearized_no=áƒáƒ áƒ
+document_properties_close=დáƒáƒ®áƒ£áƒ áƒ•áƒ
+
+print_progress_message=დáƒáƒ™áƒ£áƒ›áƒ”ნტი მზáƒáƒ“დებრáƒáƒ›áƒáƒ¡áƒáƒ‘ეჭდáƒáƒ“…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=გáƒáƒ£áƒ¥áƒ›áƒ”ბáƒ
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=გვერდითრზáƒáƒšáƒ˜áƒ¡ გáƒáƒ›áƒáƒ©áƒ”ნáƒ/დáƒáƒ›áƒáƒšáƒ•áƒ
+toggle_sidebar_notification.title=გვერდითრზáƒáƒšáƒ˜áƒ¡ ჩáƒáƒ áƒ—ვáƒ/გáƒáƒ›áƒáƒ áƒ—ვრ(დáƒáƒ™áƒ£áƒ›áƒ”ნტი შეიცáƒáƒ•áƒ¡ სáƒáƒ áƒ©áƒ”ვს/დáƒáƒœáƒáƒ áƒ—ს)
+toggle_sidebar_label=გვერდითრზáƒáƒšáƒ˜áƒ¡ გáƒáƒ›áƒáƒ©áƒ”ნáƒ/დáƒáƒ›áƒáƒšáƒ•áƒ
+document_outline.title=დáƒáƒ™áƒ£áƒ›áƒ”ნტის სáƒáƒ áƒ©áƒ”ვის ჩვენებრ(áƒáƒ áƒ¯áƒ”რ დáƒáƒ¬áƒ™áƒáƒžáƒ”ბით ყველრელემენტის ჩáƒáƒ›áƒáƒ¨áƒšáƒ/áƒáƒ™áƒ”ცვáƒ)
+document_outline_label=დáƒáƒ™áƒ£áƒ›áƒ”ნტის სáƒáƒ áƒ©áƒ”ვი
+attachments.title=დáƒáƒœáƒáƒ áƒ—ების ჩვენებáƒ
+attachments_label=დáƒáƒœáƒáƒ áƒ—ები
+thumbs.title=შეთვáƒáƒšáƒ˜áƒ”რებáƒ
+thumbs_label=ესკიზები
+findbar.title=პáƒáƒ•áƒœáƒ დáƒáƒ™áƒ£áƒ›áƒ”ნტში
+findbar_label=ძიებáƒ
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=გვერდი {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=გვერდი {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=გვერდის შეთვáƒáƒšáƒ˜áƒ”რებრ{{page}}
+
+# Find panel button title and messages
+find_input.title=ძიებáƒ
+find_input.placeholder=პáƒáƒ•áƒœáƒ დáƒáƒ™áƒ£áƒ›áƒ”ნტში…
+find_previous.title=ფრáƒáƒ–ის წინრკáƒáƒœáƒ¢áƒ”ქსტის პáƒáƒ•áƒœáƒ
+find_previous_label=წინáƒ
+find_next.title=ფრáƒáƒ–ის შემდეგი კáƒáƒœáƒ¢áƒ”ქსტის პáƒáƒ•áƒœáƒ
+find_next_label=შემდეგი
+find_highlight=ყველáƒáƒ¡ მáƒáƒœáƒ˜áƒ¨áƒ•áƒœáƒ
+find_match_case_label=ემთხვევრმთáƒáƒ•áƒ áƒ£áƒšáƒ˜
+find_entire_word_label=მთლიáƒáƒœáƒ˜ სიტყვები
+find_reached_top=მიღწეულირდáƒáƒ™áƒ£áƒ›áƒ”ნტის დáƒáƒ¡áƒáƒ¬áƒ§áƒ˜áƒ¡áƒ˜, გრძელდებრბáƒáƒšáƒáƒ“áƒáƒœ
+find_reached_bottom=მიღწეულირდáƒáƒ™áƒ£áƒ›áƒ”ნტის ბáƒáƒšáƒ, გრძელდებრდáƒáƒ¡áƒáƒ¬áƒ§áƒ˜áƒ¡áƒ˜áƒ“áƒáƒœ
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} / {{total}} თáƒáƒœáƒ®áƒ•áƒ”დრიდáƒáƒœ
+find_match_count[two]={{current}} / {{total}} თáƒáƒœáƒ®áƒ•áƒ”დრიდáƒáƒœ
+find_match_count[few]={{current}} / {{total}} თáƒáƒœáƒ®áƒ•áƒ”დრიდáƒáƒœ
+find_match_count[many]={{current}} / {{total}} თáƒáƒœáƒ®áƒ•áƒ”დრიდáƒáƒœ
+find_match_count[other]={{current}} / {{total}} თáƒáƒœáƒ®áƒ•áƒ”დრიდáƒáƒœ
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]={{limit}}-ზე მეტი თáƒáƒœáƒ®áƒ•áƒ”დრáƒ
+find_match_count_limit[one]={{limit}}-ზე მეტი თáƒáƒœáƒ®áƒ•áƒ”დრáƒ
+find_match_count_limit[two]={{limit}}-ზე მეტი თáƒáƒœáƒ®áƒ•áƒ”დრáƒ
+find_match_count_limit[few]={{limit}}-ზე მეტი თáƒáƒœáƒ®áƒ•áƒ”დრáƒ
+find_match_count_limit[many]={{limit}}-ზე მეტი თáƒáƒœáƒ®áƒ•áƒ”დრáƒ
+find_match_count_limit[other]={{limit}}-ზე მეტი თáƒáƒœáƒ®áƒ•áƒ”დრáƒ
+find_not_found=ფრáƒáƒ–რვერ მáƒáƒ˜áƒ«áƒ”ბნáƒ
+
+# Error panel labels
+error_more_info=ვრცლáƒáƒ“
+error_less_info=შემáƒáƒ™áƒšáƒ”ბულáƒáƒ“
+error_close=დáƒáƒ®áƒ£áƒ áƒ•áƒ
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=შეტყáƒáƒ‘ინებáƒ: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=სტეკი: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=ფáƒáƒ˜áƒšáƒ˜: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=ხáƒáƒ–ი: {{line}}
+rendering_error=შეცდáƒáƒ›áƒ, გვერდის ჩვენებისáƒáƒ¡.
+
+# Predefined zoom values
+page_scale_width=გვერდის სიგáƒáƒœáƒ”ზე
+page_scale_fit=მთლიáƒáƒœáƒ˜ გვერდი
+page_scale_auto=áƒáƒ•áƒ¢áƒáƒ›áƒáƒ¢áƒ£áƒ áƒ˜
+page_scale_actual=სáƒáƒ¬áƒ§áƒ˜áƒ¡áƒ˜ ზáƒáƒ›áƒ
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=შეცდáƒáƒ›áƒ
+loading_error=შეცდáƒáƒ›áƒ, PDF-ფáƒáƒ˜áƒšáƒ˜áƒ¡ ჩáƒáƒ¢áƒ•áƒ˜áƒ áƒ—ვისáƒáƒ¡.
+invalid_file_error=áƒáƒ áƒáƒ›áƒáƒ áƒ—ებული áƒáƒœ დáƒáƒ–იáƒáƒœáƒ”ბული PDF-ფáƒáƒ˜áƒšáƒ˜.
+missing_file_error=ნáƒáƒ™áƒšáƒ£áƒšáƒ˜ PDF-ფáƒáƒ˜áƒšáƒ˜.
+unexpected_response_error=სერვერის მáƒáƒ£áƒšáƒáƒ“ნელი პáƒáƒ¡áƒ£áƒ®áƒ˜.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} შენიშვნáƒ]
+password_label=შეიყვáƒáƒœáƒ”თ პáƒáƒ áƒáƒšáƒ˜ PDF-ფáƒáƒ˜áƒšáƒ˜áƒ¡ გáƒáƒ¡áƒáƒ®áƒ¡áƒœáƒ”ლáƒáƒ“.
+password_invalid=áƒáƒ áƒáƒ¡áƒ¬áƒáƒ áƒ˜ პáƒáƒ áƒáƒšáƒ˜. გთხáƒáƒ•áƒ—, სცáƒáƒ“áƒáƒ— ხელáƒáƒ®áƒšáƒ.
+password_ok=კáƒáƒ áƒ’ი
+password_cancel=გáƒáƒ£áƒ¥áƒ›áƒ”ბáƒ
+
+printing_not_supported=გáƒáƒ¤áƒ áƒ—ხილებáƒ: áƒáƒ›áƒáƒ‘ეჭდვრáƒáƒ› ბრáƒáƒ£áƒ–ერში áƒáƒ áƒáƒ სრულáƒáƒ“ მხáƒáƒ áƒ“áƒáƒ­áƒ”რილი.
+printing_not_ready=გáƒáƒ¤áƒ áƒ—ხილებáƒ: PDF სრულáƒáƒ“ ჩáƒáƒ¢áƒ•áƒ˜áƒ áƒ—ული áƒáƒ áƒáƒ, áƒáƒ›áƒáƒ‘ეჭდვის დáƒáƒ¡áƒáƒ¬áƒ§áƒ”ბáƒáƒ“.
+web_fonts_disabled=ვებშრიფტები გáƒáƒ›áƒáƒ áƒ—ულიáƒ: ჩáƒáƒ¨áƒ”ნებული PDF-შრიფტების გáƒáƒ›áƒáƒ§áƒ”ნებრვერ ხერხდებáƒ.
+document_colors_not_allowed=PDF-დáƒáƒ™áƒ£áƒ›áƒ”ნტებს áƒáƒ  áƒáƒ¥áƒ•áƒ¡ სáƒáƒ™áƒ£áƒ—áƒáƒ áƒ˜ ფერების გáƒáƒ›áƒáƒ§áƒ”ნების ნებáƒáƒ áƒ—ვáƒ: ბრáƒáƒ£áƒ–ერში გáƒáƒ›áƒáƒ áƒ—ულირ„გვერდებისთვის სáƒáƒ™áƒ£áƒ—áƒáƒ áƒ˜ ფერების გáƒáƒ›áƒáƒ§áƒ”ნების უფლებáƒâ€œ.
diff --git a/js/pdfjs/web/locale/kab/viewer.properties b/js/pdfjs/web/locale/kab/viewer.properties
new file mode 100644
index 0000000..e3d0dc4
--- /dev/null
+++ b/js/pdfjs/web/locale/kab/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Asebter azewwar
+previous_label=Azewwar
+next.title=Asebter d-iteddun
+next_label=Ddu ɣer zdat
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Asebter
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=É£ef {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} n {{pagesCount}})
+
+zoom_out.title=Semẓi
+zoom_out_label=Semẓi
+zoom_in.title=Semɣeṛ
+zoom_in_label=Semɣeṛ
+zoom.title=Semɣeṛ/Semẓi
+presentation_mode.title=Uɣal ɣer Uskar Tihawt
+presentation_mode_label=Askar Tihawt
+open_file.title=Ldi Afaylu
+open_file_label=Ldi
+print.title=Siggez
+print_label=Siggez
+download.title=Sider
+download_label=Azdam
+bookmark.title=Timeẓri tamirant (nɣel neɣ ldi ɣef usfaylu amaynut)
+bookmark_label=Askan amiran
+
+# Secondary toolbar and context menu
+tools.title=Ifecka
+tools_label=Ifecka
+first_page.title=Ddu ɣer usebter amezwaru
+first_page.label=Ddu ɣer usebter amezwaru
+first_page_label=Ddu ɣer usebter amezwaru
+last_page.title=Ddu ɣer usebter aneggaru
+last_page.label=Ddu ɣer usebter aneggaru
+last_page_label=Ddu ɣer usebter aneggaru
+page_rotate_cw.title=Tuzzya tusrigt
+page_rotate_cw.label=Tuzzya tusrigt
+page_rotate_cw_label=Tuzzya tusrigt
+page_rotate_ccw.title=Tuzzya amgal-usrig
+page_rotate_ccw.label=Tuzzya amgal-usrig
+page_rotate_ccw_label=Tuzzya amgal-usrig
+
+cursor_text_select_tool.title=Rmed afecku n tefrant n uá¸ris
+cursor_text_select_tool_label=Afecku n tefrant n uá¸ris
+cursor_hand_tool.title=Rmed afecku afus
+cursor_hand_tool_label=Afecku afus
+
+scroll_vertical.title=Seqdec adrurem ubdid
+scroll_vertical_label=Adrurem ubdid
+scroll_horizontal.title=Seqdec adrurem aglawan
+scroll_horizontal_label=Adrurem aglawan
+scroll_wrapped.title=Seqdec adrurem yuẓen
+scroll_wrapped_label=Adrurem yuẓen
+
+spread_none.title=Ur sedday ara isiɣzaf n usebter
+spread_none_label=Ulac isiɣzaf
+spread_odd.title=Seddu isiɣzaf n usebter ibeddun s yisebtar irayuganen
+spread_odd_label=Isiɣzaf irayuganen
+spread_even.title=Seddu isiɣzaf n usebter ibeddun s yisebtar iyuganen
+spread_even_label=Isiɣzaf iyuganen
+
+# Document properties dialog box
+document_properties.title=Taɣaṛa n isemli…
+document_properties_label=Taɣaṛa n isemli…
+document_properties_file_name=Isem n ufaylu:
+document_properties_file_size=Teɣzi n ufaylu:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KAṬ ({{size_b}} ibiten)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MAṬ ({{size_b}} iá¹­amá¸anen)
+document_properties_title=Azwel:
+document_properties_author=Ameskar:
+document_properties_subject=Amgay:
+document_properties_keywords=Awalen n tsaruţ
+document_properties_creation_date=Azemz n tmerna:
+document_properties_modification_date=Azemz n usnifel:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Yerna-t:
+document_properties_producer=Afecku n uselket PDF:
+document_properties_version=Lqem PDF:
+document_properties_page_count=Amá¸an n isebtar:
+document_properties_page_size=Tuγzi n usebter:
+document_properties_page_size_unit_inches=deg
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=s teɣzi
+document_properties_page_size_orientation_landscape=s tehri
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Asekkil
+document_properties_page_size_name_legal=Usá¸if
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Taskant Web taruradt:
+document_properties_linearized_yes=Ih
+document_properties_linearized_no=Ala
+document_properties_close=Mdel
+
+print_progress_message=Aheggi i usiggez n isemli…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Sefsex
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Sken/Fer agalis adisan
+toggle_sidebar_notification.title=Ffer/Sken agalis adisan (isemli yegber aɣawas/imeddayen)
+toggle_sidebar_label=Sken/Fer agalis adisan
+document_outline.title=Sken isemli (Senned snat tikal i wesemɣer/Afneẓ n iferdisen meṛṛa)
+document_outline_label=Isɣalen n isebtar
+attachments.title=Sken ticeqqufin yeddan
+attachments_label=Ticeqqufin yeddan
+thumbs.title=Sken tanfult.
+thumbs_label=Tinfulin
+findbar.title=Nadi deg isemli
+findbar_label=Nadi
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Asebter {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Asebter {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Tanfult n usebter {{page}}
+
+# Find panel button title and messages
+find_input.title=Nadi
+find_input.placeholder=Nadi deg isemli…
+find_previous.title=Aff-d tamseá¸riwt n twinest n deffir
+find_previous_label=Azewwar
+find_next.title=Aff-d timseá¸riwt n twinest d-iteddun
+find_next_label=Ddu ɣer zdat
+find_highlight=Err izirig imaṛṛa
+find_match_case_label=Qadeá¹› amasal n isekkilen
+find_entire_word_label=Awalen iÄÄuranen
+find_reached_top=YabbeḠs afella n usebter, tuɣalin s wadda
+find_reached_bottom=Tebá¸eḠs adda n usebter, tuÉ£alin s afella
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} seg {{total}} n tmeɣṛuá¸in
+find_match_count[two]={{current}} seg {{total}} n tmeɣṛuá¸in
+find_match_count[few]={{current}} seg {{total}} n tmeɣṛuá¸in
+find_match_count[many]={{current}} seg {{total}} n tmeɣṛuá¸in
+find_match_count[other]={{current}} seg {{total}} n tmeɣṛuá¸in
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Ugar n {{limit}} n tmeɣṛuá¸in
+find_match_count_limit[one]=Ugar n {{limit}} n tmeɣṛuá¸in
+find_match_count_limit[two]=Ugar n {{limit}} n tmeɣṛuá¸in
+find_match_count_limit[few]=Ugar n {{limit}} n tmeɣṛuá¸in
+find_match_count_limit[many]=Ugar n {{limit}} n tmeɣṛuá¸in
+find_match_count_limit[other]=Ugar n {{limit}} n tmeɣṛuá¸in
+find_not_found=Ulac tawinest
+
+# Error panel labels
+error_more_info=Ugar n telɣut
+error_less_info=Drus n isalen
+error_close=Mdel
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Izen: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Tanebdant: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Afaylu: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Izirig: {{line}}
+rendering_error=Teá¸ra-d tuccá¸a deg uskan n usebter.
+
+# Predefined zoom values
+page_scale_width=Tehri n usebter
+page_scale_fit=Asebter imaṛṛa
+page_scale_auto=Asemɣeṛ/Asemẓi awurman
+page_scale_actual=Teɣzi tilawt
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Error
+loading_error=Teá¸ra-d tuccá¸a deg alluy n PDF:
+invalid_file_error=Afaylu PDF arameɣtu neɣ yexṣeṛ.
+missing_file_error=Ulac afaylu PDF.
+unexpected_response_error=Aqeddac yerra-d yir tiririt ur nettwaṛǧi ara.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Tabzimt {{type}}]
+password_label=Sekcem awal uffir akken ad ldiḠafaylu-yagi PDF
+password_invalid=Awal uffir maÄÄi d ameÉ£tu, ÆreḠtikelt-nniá¸en.
+password_ok=IH
+password_cancel=Sefsex
+
+printing_not_supported=Ɣuṛ-k: Asiggez ur ittusefrak ara yakan imaṛṛa deg iminig-a.
+printing_not_ready=Ɣuṛ-k: Afaylu PDF ur d-yuli ara imeṛṛa akken ad ittusiggez.
+web_fonts_disabled=Tisefsiyin web ttwassensent; D awezɣi useqdec n tsefsiyin yettwarnan ɣer PDF.
+document_colors_not_allowed=Isemliyen PDF ur zmiren ara ad sqedcen initen-nsen: 'Sireg isebtar akken ad fernen initen-nsen' ur yermid ara deg iminig.
diff --git a/js/pdfjs/web/locale/kk/viewer.properties b/js/pdfjs/web/locale/kk/viewer.properties
new file mode 100644
index 0000000..389b854
--- /dev/null
+++ b/js/pdfjs/web/locale/kk/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Ðлдыңғы парақ
+previous_label=ÐлдыңғыÑÑ‹
+next.title=КелеÑÑ– парақ
+next_label=КелеÑÑ–
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Парақ
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages={{pagesCount}} ішінен
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=(парақ {{pageNumber}}, {{pagesCount}} ішінен)
+
+zoom_out.title=Кішірейту
+zoom_out_label=Кішірейту
+zoom_in.title=Үлкейту
+zoom_in_label=Үлкейту
+zoom.title=МаÑштаб
+presentation_mode.title=ÐŸÑ€ÐµÐ·ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ñ Ñ€ÐµÐ¶Ð¸Ð¼Ñ–Ð½Ðµ ауыÑу
+presentation_mode_label=ÐŸÑ€ÐµÐ·ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ñ Ñ€ÐµÐ¶Ð¸Ð¼Ñ–
+open_file.title=Файлды ашу
+open_file_label=Ðшу
+print.title=БаÑпаға шығару
+print_label=БаÑпаға шығару
+download.title=Жүктеп алу
+download_label=Жүктеп алу
+bookmark.title=Ðғымдағы ÐºÓ©Ñ€Ñ–Ð½Ñ–Ñ (көшіру не жаңа терезеде ашу)
+bookmark_label=Ðғымдағы көрініÑ
+
+# Secondary toolbar and context menu
+tools.title=Құралдар
+tools_label=Құралдар
+first_page.title=Ðлғашқы параққа өту
+first_page.label=Ðлғашқы параққа өту
+first_page_label=Ðлғашқы параққа өту
+last_page.title=Соңғы параққа өту
+last_page.label=Соңғы параққа өту
+last_page_label=Соңғы параққа өту
+page_rotate_cw.title=Сағат тілі бағытымен айналдыру
+page_rotate_cw.label=Сағат тілі бағытымен бұру
+page_rotate_cw_label=Сағат тілі бағытымен бұру
+page_rotate_ccw.title=Сағат тілі бағытына қарÑÑ‹ бұру
+page_rotate_ccw.label=Сағат тілі бағытына қарÑÑ‹ бұру
+page_rotate_ccw_label=Сағат тілі бағытына қарÑÑ‹ бұру
+
+cursor_text_select_tool.title=Мәтінді таңдау құралын Ñ–Ñке қоÑу
+cursor_text_select_tool_label=Мәтінді таңдау құралы
+cursor_hand_tool.title=Қол құралын Ñ–Ñке қоÑу
+cursor_hand_tool_label=Қол құралы
+
+scroll_vertical.title=Вертикалды айналдыруды қолдану
+scroll_vertical_label=Вертикалды айналдыру
+scroll_horizontal.title=Горизонталды айналдыруды қолдану
+scroll_horizontal_label=Горизонталды айналдыру
+scroll_wrapped.title=МаÑштабталатын айналдыруды қолдану
+scroll_wrapped_label=МаÑштабталатын айналдыру
+
+spread_none.title=Жазық беттер режимін қолданбау
+spread_none_label=Жазық беттер режимÑіз
+spread_odd.title=Жазық беттер тақ нөмірлі беттерден баÑталады
+spread_odd_label=Тақ нөмірлі беттер Ñол жақтан
+spread_even.title=Жазық беттер жұп нөмірлі беттерден баÑталады
+spread_even_label=Жұп нөмірлі беттер Ñол жақтан
+
+# Document properties dialog box
+document_properties.title=Құжат қаÑиеттері…
+document_properties_label=Құжат қаÑиеттері…
+document_properties_file_name=Файл аты:
+document_properties_file_size=Файл өлшемі:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} КБ ({{size_b}} байт)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} МБ ({{size_b}} байт)
+document_properties_title=Тақырыбы:
+document_properties_author=Ðвторы:
+document_properties_subject=Тақырыбы:
+document_properties_keywords=Кілт Ñөздер:
+document_properties_creation_date=ЖаÑалған күні:
+document_properties_modification_date=Түзету күні:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=ЖаÑаған:
+document_properties_producer=PDF өндірген:
+document_properties_version=PDF нұÑқаÑÑ‹:
+document_properties_page_count=Беттер Ñаны:
+document_properties_page_size=Бет өлшемі:
+document_properties_page_size_unit_inches=дюйм
+document_properties_page_size_unit_millimeters=мм
+document_properties_page_size_orientation_portrait=тік
+document_properties_page_size_orientation_landscape=жатық
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Жылдам Web көрініÑÑ–:
+document_properties_linearized_yes=Иә
+document_properties_linearized_no=Жоқ
+document_properties_close=Жабу
+
+print_progress_message=Құжатты баÑпаға шығару үшін дайындау…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Ð‘Ð°Ñ Ñ‚Ð°Ñ€Ñ‚Ñƒ
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Бүйір панелін көрÑету/жаÑыру
+toggle_sidebar_notification.title=Бүйір панелін көрÑету/жаÑыру (құжатта құрылымы/Ñалынымдар бар)
+toggle_sidebar_label=Бүйір панелін көрÑету/жаÑыру
+document_outline.title=Құжат құрылымын көрÑету (барлық нәрÑелерді жазық қылу/жинау үшін Ò›Ð¾Ñ ÑˆÐµÑ€Ñ‚Ñƒ керек)
+document_outline_label=Құжат құрамаÑÑ‹
+attachments.title=Салынымдарды көрÑету
+attachments_label=Салынымдар
+thumbs.title=Кіші көрініÑтерді көрÑету
+thumbs_label=Кіші көрініÑтер
+findbar.title=Құжаттан табу
+findbar_label=Табу
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Бет {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title={{page}} парағы
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas={{page}} парағы үшін кіші көрініÑÑ–
+
+# Find panel button title and messages
+find_input.title=Табу
+find_input.placeholder=Құжаттан табу…
+find_previous.title=ОÑÑ‹ Ñөздердің мәтіннен алдыңғы кездеÑуін табу
+find_previous_label=ÐлдыңғыÑÑ‹
+find_next.title=ОÑÑ‹ Ñөздердің мәтіннен келеÑÑ– кездеÑуін табу
+find_next_label=КелеÑÑ–
+find_highlight=Барлығын Ñ‚Ò¯Ñпен ерекшелеу
+find_match_case_label=РегиÑтрді еÑкеру
+find_entire_word_label=Сөздер толығымен
+find_reached_top=Құжаттың баÑына жеттік, Ñоңынан баÑтап жалғаÑтырамыз
+find_reached_bottom=Құжаттың Ñоңына жеттік, баÑынан баÑтап жалғаÑтырамыз
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} / {{total}} ÑәйкеÑтік
+find_match_count[two]={{current}} / {{total}} ÑәйкеÑтік
+find_match_count[few]={{current}} / {{total}} ÑәйкеÑтік
+find_match_count[many]={{current}} / {{total}} ÑәйкеÑтік
+find_match_count[other]={{current}} / {{total}} ÑәйкеÑтік
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]={{limit}} ÑәйкеÑтіктен көп
+find_match_count_limit[one]={{limit}} ÑәйкеÑтіктен көп
+find_match_count_limit[two]={{limit}} ÑәйкеÑтіктен көп
+find_match_count_limit[few]={{limit}} ÑәйкеÑтіктен көп
+find_match_count_limit[many]={{limit}} ÑәйкеÑтіктен көп
+find_match_count_limit[other]={{limit}} ÑәйкеÑтіктен көп
+find_not_found=Сөз(дер) табылмады
+
+# Error panel labels
+error_more_info=Көбірек ақпарат
+error_less_info=Ðзырақ ақпарат
+error_close=Жабу
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (жинақ: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Хабарлама: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Стек: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Файл: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Жол: {{line}}
+rendering_error=Парақты өңдеу кезінде қате кетті.
+
+# Predefined zoom values
+page_scale_width=Парақ ені
+page_scale_fit=Парақты Ñыйдыру
+page_scale_auto=ÐвтомаÑштабтау
+page_scale_actual=Ðақты өлшемі
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Қате
+loading_error=PDF жүктеу кезінде қате кетті.
+invalid_file_error=Зақымдалған немеÑе қате PDF файл.
+missing_file_error=PDF файлы жоқ.
+unexpected_response_error=Сервердің күтпеген жауабы.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} аңдатпаÑÑ‹]
+password_label=Бұл PDF файлын ашу үшін парольді енгізіңіз.
+password_invalid=Пароль Ð´Ò±Ñ€Ñ‹Ñ ÐµÐ¼ÐµÑ. Қайталап көріңіз.
+password_ok=ОК
+password_cancel=Ð‘Ð°Ñ Ñ‚Ð°Ñ€Ñ‚Ñƒ
+
+printing_not_supported=ЕÑкерту: БаÑпаға шығаруды бұл браузер толығымен қолдамайды.
+printing_not_ready=ЕÑкерту: БаÑпаға шығару үшін, бұл PDF толығымен жүктеліп алынбады.
+web_fonts_disabled=Веб қаріптері Ñөндірілген: құрамына енгізілген PDF қаріптерін қолдану мүмкін емеÑ.
+document_colors_not_allowed=PDF құжаттарына өздік Ñ‚Ò¯Ñтерді қолдану Ñ€Ò±Ò›Ñат етілмеген: бұл браузерде 'Веб-Ñайттарға өздерінің Ñ‚Ò¯Ñтерін қолдануға Ñ€Ò±Ò›Ñат беру' мүмкіндігі Ñөндірулі тұр.
diff --git a/js/pdfjs/web/locale/km/viewer.properties b/js/pdfjs/web/locale/km/viewer.properties
new file mode 100644
index 0000000..e5403cc
--- /dev/null
+++ b/js/pdfjs/web/locale/km/viewer.properties
@@ -0,0 +1,184 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=ទំពáŸážšâ€‹áž˜áž»áž“
+previous_label=មុន
+next.title=ទំពáŸážšâ€‹áž”ន្ទាប់
+next_label=បន្ទាប់
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=ទំពáŸážš
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=នៃ {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} នៃ {{pagesCount}})
+
+zoom_out.title=​បង្រួម
+zoom_out_label=​បង្រួម
+zoom_in.title=​ពង្រីក
+zoom_in_label=​ពង្រីក
+zoom.title=ពង្រីក
+presentation_mode.title=ប្ដូរ​ទៅ​របៀប​បទ​បង្ហាញ
+presentation_mode_label=របៀប​បទ​បង្ហាញ
+open_file.title=បើក​ឯកសារ
+open_file_label=បើក
+print.title=បោះពុម្ព
+print_label=បោះពុម្ព
+download.title=ទាញ​យក
+download_label=ទាញ​យក
+bookmark.title=ទិដ្ឋភាព​បច្ចុប្បន្ន (ចម្លង ឬ​បើក​នៅ​ក្នុង​បង្អួច​ážáŸ’មី)
+bookmark_label=ទិដ្ឋភាព​បច្ចុប្បន្ន
+
+# Secondary toolbar and context menu
+tools.title=ឧបករណáŸ
+tools_label=ឧបករណáŸ
+first_page.title=ទៅកាន់​ទំពáŸážšâ€‹ážŠáŸ†áž”ូង​
+first_page.label=ទៅកាន់​ទំពáŸážšâ€‹ážŠáŸ†áž”ូង​
+first_page_label=ទៅកាន់​ទំពáŸážšâ€‹ážŠáŸ†áž”ូង​
+last_page.title=ទៅកាន់​ទំពáŸážšâ€‹áž…ុងក្រោយ​
+last_page.label=ទៅកាន់​ទំពáŸážšâ€‹áž…ុងក្រោយ​
+last_page_label=ទៅកាន់​ទំពáŸážšâ€‹áž…ុងក្រោយ
+page_rotate_cw.title=បង្វិល​ស្រប​ទ្រនិច​នាឡិកា
+page_rotate_cw.label=បង្វិល​ស្រប​ទ្រនិច​នាឡិកា
+page_rotate_cw_label=បង្វិល​ស្រប​ទ្រនិច​នាឡិកា
+page_rotate_ccw.title=បង្វិល​ច្រាស​ទ្រនិច​នាឡិកា​​
+page_rotate_ccw.label=បង្វិល​ច្រាស​ទ្រនិច​នាឡិកា​​
+page_rotate_ccw_label=បង្វិល​ច្រាស​ទ្រនិច​នាឡិកា​​
+
+cursor_text_select_tool.title=បើក​ឧបករណáŸâ€‹áž‡áŸ’រើស​អážáŸ’ážáž”áž‘
+cursor_text_select_tool_label=ឧបករណáŸâ€‹áž‡áŸ’រើស​អážáŸ’ážáž”áž‘
+cursor_hand_tool.title=បើក​ឧបករណáŸâ€‹ážŠáŸƒ
+cursor_hand_tool_label=ឧបករណáŸâ€‹ážŠáŸƒ
+
+# Document properties dialog box
+document_properties.title=លក្ážážŽâ€‹ážŸáž˜áŸ’áž”ážáŸ’ážáž·â€‹áž¯áž€ážŸáž¶ážšâ€¦
+document_properties_label=លក្ážážŽâ€‹ážŸáž˜áŸ’áž”ážáŸ’ážáž·â€‹áž¯áž€ážŸáž¶ážšâ€¦
+document_properties_file_name=ឈ្មោះ​ឯកសារ៖
+document_properties_file_size=ទំហំ​ឯកសារ៖
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} បៃ)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} បៃ)
+document_properties_title=ចំណងជើង៖
+document_properties_author=អ្នក​និពន្ធ៖
+document_properties_subject=ប្រធានបទ៖
+document_properties_keywords=ពាក្យ​គន្លឹះ៖
+document_properties_creation_date=កាលបរិច្ឆáŸáž‘​បង្កើážáŸ–
+document_properties_modification_date=កាលបរិច្ឆáŸáž‘​កែប្រែ៖
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=អ្នក​បង្កើážáŸ–
+document_properties_producer=កម្មវិធី​បង្កើហPDF ៖
+document_properties_version=កំណែ PDF ៖
+document_properties_page_count=ចំនួន​ទំពáŸážšáŸ–
+document_properties_close=បិទ
+
+print_progress_message=កំពុង​រៀបចំ​ឯកសារ​សម្រាប់​បោះពុម្ព…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=បោះបង់
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=បិទ/បើក​គ្រាប់​រំកិល
+toggle_sidebar_notification.title=បិទ/បើក​របារ​ចំហៀង (ឯកសារ​មាន​មាážáž·áž€áž¶â€‹áž“ៅ​ក្រៅ/attachments)
+toggle_sidebar_label=បិទ/បើក​គ្រាប់​រំកិល
+document_outline.title=បង្ហាញ​គ្រោង​ឯកសារ (ចុច​ទ្វáŸâ€‹ážŠáž„​ដើម្បី​ពង្រីក/បង្រួម​ធាážáž»â€‹áž‘ាំងអស់)
+document_outline_label=គ្រោង​ឯកសារ
+attachments.title=បង្ហាញ​ឯកសារ​ភ្ជាប់
+attachments_label=ឯកសារ​ភ្ជាប់
+thumbs.title=បង្ហាញ​រូបភាព​ážáž¼áž…ៗ
+thumbs_label=រួបភាព​ážáž¼áž…ៗ
+findbar.title=រក​នៅ​ក្នុង​ឯកសារ
+findbar_label=រក
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=ទំពáŸážš {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=រូបភាព​ážáž¼áž…​របស់​ទំពáŸážš {{page}}
+
+# Find panel button title and messages
+find_input.title=រក
+find_input.placeholder=រក​នៅ​ក្នុង​ឯកសារ...
+find_previous.title=រក​ពាក្យ ឬ​ឃ្លា​ដែល​បាន​ជួប​មុន
+find_previous_label=មុន
+find_next.title=រក​ពាក្យ ឬ​ឃ្លា​ដែល​បាន​ជួប​បន្ទាប់
+find_next_label=បន្ទាប់
+find_highlight=បន្លិច​ទាំងអស់
+find_match_case_label=ករណី​ដំណូច
+find_reached_top=បាន​បន្ážâ€‹áž–ី​ážáž¶áž„​ក្រោម ទៅ​ដល់​ážáž¶áž„​​លើ​នៃ​ឯកសារ
+find_reached_bottom=បាន​បន្ážâ€‹áž–ី​ážáž¶áž„លើ ទៅដល់​ចុង​​នៃ​ឯកសារ
+find_not_found=រក​មិន​ឃើញ​ពាក្យ ឬ​ឃ្លា
+
+# Error panel labels
+error_more_info=áž–áŸážáŸŒáž˜áž¶áž“​បន្ážáŸ‚ម
+error_less_info=áž–áŸážáŸŒáž˜áž¶áž“​ážáž·áž…ážáž½áž…
+error_close=បិទ
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=សារ ៖ {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=ជង់ ៖ {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=ឯកសារ ៖ {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=ជួរ ៖ {{line}}
+rendering_error=មាន​កំហុស​បាន​កើážáž¡áž¾áž„​ពáŸáž›â€‹áž”ង្ហាញ​ទំពáŸážšÂ áŸ”
+
+# Predefined zoom values
+page_scale_width=ទទឹង​ទំពáŸážš
+page_scale_fit=សម​ទំពáŸážš
+page_scale_auto=ពង្រីក​ស្វáŸáž™áž”្រវážáŸ’ážáž·
+page_scale_actual=ទំហំ​ជាក់ស្ដែង
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=កំហុស
+loading_error=មាន​កំហុស​បាន​កើážáž¡áž¾áž„​ពáŸáž›â€‹áž€áŸ†áž–ុង​ផ្ទុក PDF ។
+invalid_file_error=ឯកសារ PDF ážáž¼áž… ឬ​មិន​ážáŸ’រឹមážáŸ’រូវ ។
+missing_file_error=បាážáŸ‹â€‹áž¯áž€ážŸáž¶ážš PDF
+unexpected_response_error=ការ​ឆ្លើយ​ážáž˜â€‹áž˜áŸ‰áž¶ážŸáŸŠáž¸áž“​មáŸâ€‹ážŠáŸ‚ល​មិន​បាន​រំពឹង។
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} ចំណារ​ពន្យល់]
+password_label=បញ្ចូល​ពាក្យសម្ងាážáŸ‹â€‹ážŠáž¾áž˜áŸ’បី​បើក​ឯកសារ PDF áž“áŸáŸ‡áŸ”
+password_invalid=ពាក្យសម្ងាážáŸ‹â€‹áž˜áž·áž“​ážáŸ’រឹមážáŸ’រូវ។ សូម​ព្យាយាម​ម្ដងទៀážáŸ”
+password_ok=យល់​ព្រម
+password_cancel=បោះបង់
+
+printing_not_supported=ការ​ព្រមាន ៖ កា​រ​បោះពុម្ព​មិន​ážáŸ’រូវ​បាន​គាំទ្រ​ពáŸáž‰áž›áŸáž‰â€‹ážŠáŸ„យ​កម្មវិធី​រុករក​នáŸáŸ‡â€‹áž‘áŸÂ áŸ”
+printing_not_ready=ព្រមាន៖ PDF មិន​ážáŸ’រូវ​បាន​ផ្ទុក​ទាំងស្រុង​ដើម្បី​បោះពុម្ព​ទáŸáŸ”
+web_fonts_disabled=បាន​បិទ​ពុម្ពអក្សរ​បណ្ដាញ ៖ មិន​អាច​ប្រើ​ពុម្ពអក្សរ PDF ដែល​បាន​បង្កប់​បាន​ទáŸÂ áŸ”
+document_colors_not_allowed=ឯកសារ PDF មិន​ážáŸ’រូវ​បាន​អនុញ្ញាážâ€‹áž²áŸ’យ​ប្រើ​ពណ៌​ផ្ទាល់​របស់​វា​ទáŸáŸ– 'អនុញ្ញាážâ€‹â€‹áž²áŸ’យ​ទំពáŸážšâ€‹áž‡áŸ’រើស​ពណ៌​ផ្ទាល់​ážáŸ’លួន' ážáŸ’រូវ​បាន​ធ្វើ​ឲ្យ​អសកម្ម​ក្នុង​​កម្មវិធី​រុករក។
diff --git a/js/pdfjs/web/locale/kn/viewer.properties b/js/pdfjs/web/locale/kn/viewer.properties
new file mode 100644
index 0000000..cf3d004
--- /dev/null
+++ b/js/pdfjs/web/locale/kn/viewer.properties
@@ -0,0 +1,193 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=ಹಿಂದಿನ ಪà³à²Ÿ
+previous_label=ಹಿಂದಿನ
+next.title=ಮà³à²‚ದಿನ ಪà³à²Ÿ
+next_label=ಮà³à²‚ದಿನ
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=ಪà³à²Ÿ
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages={{pagesCount}} ರಲà³à²²à²¿
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pagesCount}} ರಲà³à²²à²¿ {{pageNumber}})
+
+zoom_out.title=ಕಿರಿದಾಗಿಸà³
+zoom_out_label=ಕಿರಿದಾಗಿಸಿ
+zoom_in.title=ಹಿರಿದಾಗಿಸà³
+zoom_in_label=ಹಿರಿದಾಗಿಸಿ
+zoom.title=ಗಾತà³à²°à²¬à²¦à²²à²¿à²¸à³
+presentation_mode.title=ಪà³à²°à²¸à³à²¤à³à²¤à²¿ (ಪà³à²°à²¸à³†à²‚ಟೇಶನà³) ಕà³à²°à²®à²•à³à²•à³† ಬದಲಾಯಿಸà³
+presentation_mode_label=ಪà³à²°à²¸à³à²¤à³à²¤à²¿ (ಪà³à²°à²¸à³†à²‚ಟೇಶನà³) ಕà³à²°à²®
+open_file.title=ಕಡತವನà³à²¨à³ ತೆರೆ
+open_file_label=ತೆರೆಯಿರಿ
+print.title=ಮà³à²¦à³à²°à²¿à²¸à³
+print_label=ಮà³à²¦à³à²°à²¿à²¸à²¿
+download.title=ಇಳಿಸà³
+download_label=ಇಳಿಸಿಕೊಳà³à²³à²¿
+bookmark.title=ಪà³à²°à²¸à²•à³à²¤ ನೋಟ (ಪà³à²°à²¤à²¿ ಮಾಡೠಅಥವ ಹೊಸ ಕಿಟಕಿಯಲà³à²²à²¿ ತೆರೆ)
+bookmark_label=ಪà³à²°à²¸à²•à³à²¤ ನೋಟ
+
+# Secondary toolbar and context menu
+tools.title=ಉಪಕರಣಗಳà³
+tools_label=ಉಪಕರಣಗಳà³
+first_page.title=ಮೊದಲ ಪà³à²Ÿà²•à³à²•à³† ತೆರಳà³
+first_page.label=ಮೊದಲ ಪà³à²Ÿà²•à³à²•à³† ತೆರಳà³
+first_page_label=ಮೊದಲ ಪà³à²Ÿà²•à³à²•à³† ತೆರಳà³
+last_page.title=ಕೊನೆಯ ಪà³à²Ÿà²•à³à²•à³† ತೆರಳà³
+last_page.label=ಕೊನೆಯ ಪà³à²Ÿà²•à³à²•à³† ತೆರಳà³
+last_page_label=ಕೊನೆಯ ಪà³à²Ÿà²•à³à²•à³† ತೆರಳà³
+page_rotate_cw.title=ಪà³à²°à²¦à²•à³à²·à²¿à²£à³†à²¯à²²à³à²²à²¿ ತಿರà³à²—ಿಸà³
+page_rotate_cw.label=ಪà³à²°à²¦à²•à³à²·à²¿à²£à³†à²¯à²²à³à²²à²¿ ತಿರà³à²—ಿಸà³
+page_rotate_cw_label=ಪà³à²°à²¦à²•à³à²·à²¿à²£à³†à²¯à²²à³à²²à²¿ ತಿರà³à²—ಿಸà³
+page_rotate_ccw.title=ಅಪà³à²°à²¦à²•à³à²·à²¿à²£à³†à²¯à²²à³à²²à²¿ ತಿರà³à²—ಿಸà³
+page_rotate_ccw.label=ಅಪà³à²°à²¦à²•à³à²·à²¿à²£à³†à²¯à²²à³à²²à²¿ ತಿರà³à²—ಿಸà³
+page_rotate_ccw_label=ಅಪà³à²°à²¦à²•à³à²·à²¿à²£à³†à²¯à²²à³à²²à²¿ ತಿರà³à²—ಿಸà³
+
+cursor_text_select_tool.title=ಪಠà³à²¯ ಆಯà³à²•à³† ಉಪಕರಣವನà³à²¨à³ ಸಕà³à²°à²¿à²¯à²—ೊಳಿಸಿ
+cursor_text_select_tool_label=ಪಠà³à²¯ ಆಯà³à²•à³†à²¯ ಉಪಕರಣ
+cursor_hand_tool.title=ಕೈ ಉಪಕರಣವನà³à²¨à³ ಸಕà³à²°à²¿à²¯à²—ೊಳಿಸಿ
+cursor_hand_tool_label=ಕೈ ಉಪಕರಣ
+
+
+
+# Document properties dialog box
+document_properties.title=ಡಾಕà³à²¯à³à²®à³†à²‚ಟà³â€Œ ಗà³à²£à²—ಳà³...
+document_properties_label=ಡಾಕà³à²¯à³à²®à³†à²‚ಟà³â€Œ ಗà³à²£à²—ಳà³...
+document_properties_file_name=ಕಡತದ ಹೆಸರà³:
+document_properties_file_size=ಕಡತದ ಗಾತà³à²°:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} ಬೈಟà³â€à²—ಳà³)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} ಬೈಟà³â€à²—ಳà³)
+document_properties_title=ಶೀರà³à²·à²¿à²•à³†:
+document_properties_author=ಕರà³à²¤à³ƒ:
+document_properties_subject=ವಿಷಯ:
+document_properties_keywords=ಮà³à²–à³à²¯à²ªà²¦à²—ಳà³:
+document_properties_creation_date=ರಚಿಸಿದ ದಿನಾಂಕ:
+document_properties_modification_date=ಮಾರà³à²ªà²¡à²¿à²¸à²²à²¾à²¦ ದಿನಾಂಕ:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=ರಚಿಸಿದವರà³:
+document_properties_producer=PDF ಉತà³à²ªà²¾à²¦à²•:
+document_properties_version=PDF ಆವೃತà³à²¤à²¿:
+document_properties_page_count=ಪà³à²Ÿà²¦ ಎಣಿಕೆ:
+document_properties_page_size_unit_inches=ಇದರಲà³à²²à²¿
+document_properties_page_size_orientation_portrait=ಭಾವಚಿತà³à²°
+document_properties_page_size_orientation_landscape=ಪà³à²°à²•à³ƒà²¤à²¿ ಚಿತà³à²°
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_close=ಮà³à²šà³à²šà³
+
+print_progress_message=ಮà³à²¦à³à²°à²¿à²¸à³à²µà³à²¦à²•à³à²•à²¾à²—ಿ ದಸà³à²¤à²¾à²µà³‡à²œà²¨à³à²¨à³ ಸಿದà³à²§à²—ೊಳಿಸಲಾಗà³à²¤à³à²¤à²¿à²¦à³†â€¦
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=ರದà³à²¦à³ ಮಾಡà³
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=ಬದಿಪಟà³à²Ÿà²¿à²¯à²¨à³à²¨à³ ಹೊರಳಿಸà³
+toggle_sidebar_label=ಬದಿಪಟà³à²Ÿà²¿à²¯à²¨à³à²¨à³ ಹೊರಳಿಸà³
+document_outline_label=ದಸà³à²¤à²¾à²µà³‡à²œà²¿à²¨ ಹೊರರೇಖೆ
+attachments.title=ಲಗತà³à²¤à³à²—ಳನà³à²¨à³ ತೋರಿಸà³
+attachments_label=ಲಗತà³à²¤à³à²—ಳà³
+thumbs.title=ಚಿಕà³à²•à²šà²¿à²¤à³à²°à²¦à²‚ತೆ ತೋರಿಸà³
+thumbs_label=ಚಿಕà³à²•à²šà²¿à²¤à³à²°à²—ಳà³
+findbar.title=ದಸà³à²¤à²¾à²µà³‡à²œà²¿à²¨à²²à³à²²à²¿ ಹà³à²¡à³à²•à³
+findbar_label=ಹà³à²¡à³à²•à³
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=ಪà³à²Ÿ {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=ಪà³à²Ÿà²µà²¨à³à²¨à³ ಚಿಕà³à²•à²šà²¿à²¤à³à²°à²¦à²‚ತೆ ತೋರಿಸೠ{{page}}
+
+# Find panel button title and messages
+find_input.title=ಹà³à²¡à³à²•à³
+find_input.placeholder=ದಸà³à²¤à²¾à²µà³‡à²œà²¿à²¨à²²à³à²²à²¿ ಹà³à²¡à³à²•à³â€¦
+find_previous.title=ವಾಕà³à²¯à²¦ ಹಿಂದಿನ ಇರà³à²µà²¿à²•à³†à²¯à²¨à³à²¨à³ ಹà³à²¡à³à²•à³
+find_previous_label=ಹಿಂದಿನ
+find_next.title=ವಾಕà³à²¯à²¦ ಮà³à²‚ದಿನ ಇರà³à²µà²¿à²•à³†à²¯à²¨à³à²¨à³ ಹà³à²¡à³à²•à³
+find_next_label=ಮà³à²‚ದಿನ
+find_highlight=ಎಲà³à²²à²µà²¨à³à²¨à³ ಹೈಲೈಟೠಮಾಡà³
+find_match_case_label=ಕೇಸನà³à²¨à³ ಹೊಂದಿಸà³
+find_reached_top=ದಸà³à²¤à²¾à²µà³‡à²œà²¿à²¨ ಮೇಲà³à²­à²¾à²—ವನà³à²¨à³ ತಲà³à²ªà²¿à²¦à³†, ಕೆಳಗಿನಿಂದ ಆರಂಭಿಸà³
+find_reached_bottom=ದಸà³à²¤à²¾à²µà³‡à²œà²¿à²¨ ಕೊನೆಯನà³à²¨à³ ತಲà³à²ªà²¿à²¦à³†, ಮೇಲಿನಿಂದ ಆರಂಭಿಸà³
+find_not_found=ವಾಕà³à²¯à²µà³ ಕಂಡೠಬಂದಿಲà³à²²
+
+# Error panel labels
+error_more_info=ಹೆಚà³à²šà²¿à²¨ ಮಾಹಿತಿ
+error_less_info=ಕಡಿಮೆ ಮಾಹಿತಿ
+error_close=ಮà³à²šà³à²šà³
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=ಸಂದೇಶ: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=ರಾಶಿ: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=ಕಡತ: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=ಸಾಲà³: {{line}}
+rendering_error=ಪà³à²Ÿà²µà²¨à³à²¨à³ ನಿರೂಪಿಸà³à²µà²¾à²— ಒಂದೠದೋಷ ಎದà³à²°à²¾à²—ಿದೆ.
+
+# Predefined zoom values
+page_scale_width=ಪà³à²Ÿà²¦ ಅಗಲ
+page_scale_fit=ಪà³à²Ÿà²¦ ಸರಿಹೊಂದಿಕೆ
+page_scale_auto=ಸà³à²µà²¯à²‚ಚಾಲಿತ ಗಾತà³à²°à²¬à²¦à²²à²¾à²µà²£à³†
+page_scale_actual=ನಿಜವಾದ ಗಾತà³à²°
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=ದೋಷ
+loading_error=PDF ಅನà³à²¨à³ ಲೋಡೠಮಾಡà³à²µà²¾à²— ಒಂದೠದೋಷ ಎದà³à²°à²¾à²—ಿದೆ.
+invalid_file_error=ಅಮಾನà³à²¯à²µà²¾à²¦ ಅಥವ ಹಾಳಾದ PDF ಕಡತ.
+missing_file_error=PDF ಕಡತ ಇಲà³à²².
+unexpected_response_error=ಅನಿರೀಕà³à²·à²¿à²¤à²µà²¾à²¦ ಪೂರೈಕೆಗಣಕದ ಪà³à²°à²¤à²¿à²•à³à²°à²¿à²¯à³†.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} ಟಿಪà³à²ªà²£à²¿]
+password_label=PDF ಅನà³à²¨à³ ತೆರೆಯಲೠಗà³à²ªà³à²¤à²ªà²¦à²µà²¨à³à²¨à³ ನಮೂದಿಸಿ.
+password_invalid=ಅಮಾನà³à²¯à²µà²¾à²¦ ಗà³à²ªà³à²¤à²ªà²¦, ದಯವಿಟà³à²Ÿà³ ಇನà³à²¨à³Šà²®à³à²®à³† ಪà³à²°à²¯à²¤à³à²¨à²¿à²¸à²¿.
+password_ok=OK
+password_cancel=ರದà³à²¦à³ ಮಾಡà³
+
+printing_not_supported=ಎಚà³à²šà²°à²¿à²•à³†: ಈ ಜಾಲವೀಕà³à²·à²•à²¦à²²à³à²²à²¿ ಮà³à²¦à³à²°à²£à²•à³à²•à³† ಸಂಪೂರà³à²£ ಬೆಂಬಲವಿಲà³à²².
+printing_not_ready=ಎಚà³à²šà²°à²¿à²•à³†: PDF ಕಡತವೠಮà³à²¦à³à²°à²¿à²¸à²²à³ ಸಂಪೂರà³à²£à²µà²¾à²—ಿ ಲೋಡೠಆಗಿಲà³à²².
+web_fonts_disabled=ಜಾಲ ಅಕà³à²·à²°à²¶à³ˆà²²à²¿à²¯à²¨à³à²¨à³ ನಿಷà³à²•à³à²°à²¿à²¯à²—ೊಳಿಸಲಾಗಿದೆ: ಅಡಕಗೊಳಿಸಿದ PDF ಅಕà³à²·à²°à²¶à³ˆà²²à²¿à²—ಳನà³à²¨à³ ಬಳಸಲೠಸಾಧà³à²¯à²µà²¾à²—ಿಲà³à²².
+document_colors_not_allowed=PDF ದಸà³à²¤à²¾à²µà³‡à²œà³à²—ಳೠತಮà³à²®à²¦à³† ಆದ ಬಣà³à²£à²—ಳನà³à²¨à³ ಬಳಸಲೠಅನà³à²®à²¤à²¿ ಇರà³à²µà³à²¦à²¿à²²à³à²²: 'ಪà³à²Ÿà²—ಳೠತಮà³à²®à²¦à³† ಆದ ಬಣà³à²£à²µà²¨à³à²¨à³ ಆಯà³à²•à³† ಮಾಡಲೠಅನà³à²®à²¤à²¿à²¸à³' ಅನà³à²¨à³ ಜಾಲವೀಕà³à²·à²•à²¦à²²à³à²²à²¿ ನಿಷà³à²•à³à²°à²¿à²¯à²—ೊಳಿಸಲಾಗಿರà³à²¤à³à²¤à²¦à³†.
diff --git a/js/pdfjs/web/locale/ko/viewer.properties b/js/pdfjs/web/locale/ko/viewer.properties
new file mode 100644
index 0000000..ef688a9
--- /dev/null
+++ b/js/pdfjs/web/locale/ko/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=ì´ì „ 페ì´ì§€
+previous_label=ì´ì „
+next.title=ë‹¤ìŒ íŽ˜ì´ì§€
+next_label=다ìŒ
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=페ì´ì§€
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=/ {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} / {{pagesCount}})
+
+zoom_out.title=축소
+zoom_out_label=축소
+zoom_in.title=확대
+zoom_in_label=확대
+zoom.title=확대/축소
+presentation_mode.title=프레젠테ì´ì…˜ 모드로 전환
+presentation_mode_label=프레젠테ì´ì…˜ 모드
+open_file.title=íŒŒì¼ ì—´ê¸°
+open_file_label=열기
+print.title=ì¸ì‡„
+print_label=ì¸ì‡„
+download.title=다운로드
+download_label=다운로드
+bookmark.title=현재 ë·° (복사하거나 새 ì°½ì— ì—´ê¸°)
+bookmark_label=현재 뷰
+
+# Secondary toolbar and context menu
+tools.title=ë„구
+tools_label=ë„구
+first_page.title=첫 페ì´ì§€ë¡œ ì´ë™
+first_page.label=첫 페ì´ì§€ë¡œ ì´ë™
+first_page_label=첫 페ì´ì§€ë¡œ ì´ë™
+last_page.title=마지막 페ì´ì§€ë¡œ ì´ë™
+last_page.label=마지막 페ì´ì§€ë¡œ ì´ë™
+last_page_label=마지막 페ì´ì§€ë¡œ ì´ë™
+page_rotate_cw.title=시계방향으로 회전
+page_rotate_cw.label=시계방향으로 회전
+page_rotate_cw_label=시계방향으로 회전
+page_rotate_ccw.title=시계 반대방향으로 회전
+page_rotate_ccw.label=시계 반대방향으로 회전
+page_rotate_ccw_label=시계 반대방향으로 회전
+
+cursor_text_select_tool.title=í…스트 ì„ íƒ ë„구 활성화
+cursor_text_select_tool_label=í…스트 ì„ íƒ ë„구
+cursor_hand_tool.title=ì† ë„구 활성화
+cursor_hand_tool_label=ì† ë„구
+
+scroll_vertical.title=세로 스í¬ë¡¤ 사용
+scroll_vertical_label=세로 스í¬ë¡¤
+scroll_horizontal.title=가로 스í¬ë¡¤ 사용
+scroll_horizontal_label=가로 스í¬ë¡¤
+scroll_wrapped.title=ê°ì‹¼ 스í¬ë¡¤ 사용
+scroll_wrapped_label=ê°ì‹¼ 스í¬ë¡¤
+
+spread_none.title=펼ì³ì§„ 페ì´ì§€ë¥¼ 합치지 ì•ŠìŒ
+spread_none_label=펼ì³ì§ ì—†ìŒ
+spread_odd.title=홀수 페ì´ì§€ë¡œ 시작하게 펼ì³ì§„ 페ì´ì§€ 합침
+spread_odd_label=홀수 펼ì³ì§
+spread_even.title=ì§ìˆ˜ 페ì´ì§€ë¡œ 시작하게 펼ì³ì§„ 페ì´ì§€ 합침
+spread_even_label=ì§ìˆ˜ 펼ì³ì§
+
+# Document properties dialog box
+document_properties.title=문서 ì†ì„±â€¦
+document_properties_label=문서 ì†ì„±â€¦
+document_properties_file_name=íŒŒì¼ ì´ë¦„:
+document_properties_file_size=íŒŒì¼ í¬ê¸°:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}}ë°”ì´íŠ¸)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}}ë°”ì´íŠ¸)
+document_properties_title=제목:
+document_properties_author=작성ìž:
+document_properties_subject=주제:
+document_properties_keywords=키워드:
+document_properties_creation_date=작성 날짜:
+document_properties_modification_date=수정 날짜:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=작성 프로그램:
+document_properties_producer=PDF 변환 소프트웨어:
+document_properties_version=PDF 버전:
+document_properties_page_count=페ì´ì§€ 수:
+document_properties_page_size=페ì´ì§€ í¬ê¸°:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=세로 방향
+document_properties_page_size_orientation_landscape=가로 방향
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=레터
+document_properties_page_size_name_legal=리걸
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=빠른 웹 보기:
+document_properties_linearized_yes=예
+document_properties_linearized_no=아니오
+document_properties_close=닫기
+
+print_progress_message=ì¸ì‡„ 문서 준비 중…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=취소
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=íƒìƒ‰ì°½ 표시/숨기기
+toggle_sidebar_notification.title=íƒìƒ‰ì°½ 표시/숨기기 (ë¬¸ì„œì— ì•„ì›ƒë¼ì¸/ì²¨ë¶€íŒŒì¼ í¬í•¨)
+toggle_sidebar_label=íƒìƒ‰ì°½ 표시/숨기기
+document_outline.title=문서 아웃ë¼ì¸ 보기(ë”블 í´ë¦­í•´ì„œ 모든 항목 펼치기/접기)
+document_outline_label=문서 아웃ë¼ì¸
+attachments.title=ì²¨ë¶€íŒŒì¼ ë³´ê¸°
+attachments_label=첨부파ì¼
+thumbs.title=미리보기
+thumbs_label=미리보기
+findbar.title=검색
+findbar_label=검색
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas={{page}} 페ì´ì§€
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title={{page}} 페ì´ì§€
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas={{page}} 페ì´ì§€ 미리보기
+
+# Find panel button title and messages
+find_input.title=찾기
+find_input.placeholder=문서ì—ì„œ 찾기…
+find_previous.title=지정 문ìžì—´ì— ì¼ì¹˜í•˜ëŠ” 1ê°œ ë¶€ë¶„ì„ ê²€ìƒ‰
+find_previous_label=ì´ì „
+find_next.title=지정 문ìžì—´ì— ì¼ì¹˜í•˜ëŠ” ë‹¤ìŒ ë¶€ë¶„ì„ ê²€ìƒ‰
+find_next_label=다ìŒ
+find_highlight=ëª¨ë‘ ê°•ì¡° 표시
+find_match_case_label=대/ì†Œë¬¸ìž êµ¬ë¶„
+find_entire_word_label=단어 단위로
+find_reached_top=문서 처ìŒê¹Œì§€ 검색하고 ë으로 ëŒì•„와 검색했습니다.
+find_reached_bottom=문서 ë까지 검색하고 앞으로 ëŒì•„와 검색했습니다.
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{total}} 중 {{current}} ì¼ì¹˜
+find_match_count[two]={{total}} 중 {{current}} ì¼ì¹˜
+find_match_count[few]={{total}} 중 {{current}} ì¼ì¹˜
+find_match_count[many]={{total}} 중 {{current}} ì¼ì¹˜
+find_match_count[other]={{total}} 중 {{current}} ì¼ì¹˜
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]={{limit}} ì´ìƒ ì¼ì¹˜
+find_match_count_limit[one]={{limit}} ì´ìƒ ì¼ì¹˜
+find_match_count_limit[two]={{limit}} ì´ìƒ ì¼ì¹˜
+find_match_count_limit[few]={{limit}} ì´ìƒ ì¼ì¹˜
+find_match_count_limit[many]={{limit}} ì´ìƒ ì¼ì¹˜
+find_match_count_limit[other]={{limit}} ì´ìƒ ì¼ì¹˜
+find_not_found=검색 ê²°ê³¼ ì—†ìŒ
+
+# Error panel labels
+error_more_info=ì •ë³´ ë” ë³´ê¸°
+error_less_info=정보 간단히 보기
+error_close=닫기
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (빌드: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=메시지: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=스íƒ: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=파ì¼: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=줄 번호: {{line}}
+rendering_error=페ì´ì§€ë¥¼ ë Œë”ë§í•˜ëŠ” ë™ì•ˆ 오류가 ë°œìƒí–ˆìŠµë‹ˆë‹¤.
+
+# Predefined zoom values
+page_scale_width=페ì´ì§€ ë„ˆë¹„ì— ë§žì¶¤
+page_scale_fit=페ì´ì§€ì— 맞춤
+page_scale_auto=ìžë™ 맞춤
+page_scale_actual=실제 í¬ê¸°ì— 맞춤
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=오류
+loading_error=PDF를 로드하는 ë™ì•ˆ 오류가 ë°œìƒí–ˆìŠµë‹ˆë‹¤.
+invalid_file_error=잘못ë˜ì—ˆê±°ë‚˜ ì†ìƒëœ PDF 파ì¼.
+missing_file_error=PDF íŒŒì¼ ì—†ìŒ.
+unexpected_response_error=예ìƒì¹˜ 못한 서버 ì‘답입니다.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}} {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} 주ì„]
+password_label=ì´ PDF 파ì¼ì„ ì—´ 수 있는 비밀번호를 입력하세요.
+password_invalid=ìž˜ëª»ëœ ë¹„ë°€ë²ˆí˜¸ìž…ë‹ˆë‹¤. 다시 ì‹œë„하세요.
+password_ok=확ì¸
+password_cancel=취소
+
+printing_not_supported=경고: ì´ ë¸Œë¼ìš°ì €ëŠ” ì¸ì‡„를 완전히 지ì›í•˜ì§€ 않습니다.
+printing_not_ready=경고: ì´ PDF를 ì¸ì‡„를 í•  수 ìžˆì„ ì •ë„ë¡œ ì½ì–´ë“¤ì´ì§€ 못했습니다.
+web_fonts_disabled=웹 í°íŠ¸ê°€ 비활성화ë¨: ë‚´ìž¥ëœ PDF ê¸€ê¼´ì„ ì‚¬ìš©í•  수 없습니다.
+document_colors_not_allowed=PDF ë¬¸ì„œì˜ ìžì²´ ìƒ‰ìƒ í—ˆìš© 안ë¨: “페ì´ì§€ ìžì²´ ìƒ‰ìƒ í—ˆìš©â€ì´ 브ë¼ìš°ì €ì—ì„œ 비활성화 ë˜ì–´ 있습니다.
diff --git a/js/pdfjs/web/locale/lij/viewer.properties b/js/pdfjs/web/locale/lij/viewer.properties
new file mode 100644
index 0000000..71a5306
--- /dev/null
+++ b/js/pdfjs/web/locale/lij/viewer.properties
@@ -0,0 +1,242 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Pagina primma
+previous_label=Precedente
+next.title=Pagina dòppo
+next_label=Pròscima
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Pagina
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=de {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} de {{pagesCount}})
+
+zoom_out.title=Diminoisci zoom
+zoom_out_label=Diminoisci zoom
+zoom_in.title=Aomenta zoom
+zoom_in_label=Aomenta zoom
+zoom.title=Zoom
+presentation_mode.title=Vanni into mòddo de prezentaçion
+presentation_mode_label=Mòddo de prezentaçion
+open_file.title=Arvi file
+open_file_label=Arvi
+print.title=Stanpa
+print_label=Stanpa
+download.title=Descaregamento
+download_label=Descaregamento
+bookmark.title=Vixon corente (còpia ò arvi inte 'n neuvo barcon)
+bookmark_label=Vixon corente
+
+# Secondary toolbar and context menu
+tools.title=Atressi
+tools_label=Atressi
+first_page.title=Vanni a-a primma pagina
+first_page.label=Vanni a-a primma pagina
+first_page_label=Vanni a-a primma pagina
+last_page.title=Vanni a l'urtima pagina
+last_page.label=Vanni a l'urtima pagina
+last_page_label=Vanni a l'urtima pagina
+page_rotate_cw.title=Gia into verso oraio
+page_rotate_cw.label=Gia in senso do releuio
+page_rotate_cw_label=Gia into verso oraio
+page_rotate_ccw.title=Gia into verso antioraio
+page_rotate_ccw.label=Gia in senso do releuio a-a reversa
+page_rotate_ccw_label=Gia into verso antioraio
+
+cursor_text_select_tool.title=Abilita strumento de seleçion do testo
+cursor_text_select_tool_label=Strumento de seleçion do testo
+cursor_hand_tool.title=Abilita strumento man
+cursor_hand_tool_label=Strumento man
+
+scroll_vertical.title=Deuvia rebelamento verticale
+scroll_vertical_label=Rebelamento verticale
+scroll_horizontal.title=Deuvia rebelamento orizontâ
+scroll_horizontal_label=Rebelamento orizontâ
+scroll_wrapped.title=Deuvia rebelamento incapsolou
+scroll_wrapped_label=Rebelamento incapsolou
+
+spread_none.title=No unite a-a difuxon de pagina
+spread_none_label=No difuxon
+spread_odd.title=Uniscite a-a difuxon de pagina co-o numero dèspa
+spread_odd_label=Difuxon dèspa
+spread_even.title=Uniscite a-a difuxon de pagina co-o numero pari
+spread_even_label=Difuxon pari
+
+# Document properties dialog box
+document_properties.title=Propietæ do documento…
+document_properties_label=Propietæ do documento…
+document_properties_file_name=Nomme schedaio:
+document_properties_file_size=Dimenscion schedaio:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} kB ({{size_b}} byte)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} byte)
+document_properties_title=Titolo:
+document_properties_author=Aoto:
+document_properties_subject=Ogetto:
+document_properties_keywords=Paròlle ciave:
+document_properties_creation_date=Dæta creaçion:
+document_properties_modification_date=Dæta cangiamento:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Aotô originale:
+document_properties_producer=Produtô PDF:
+document_properties_version=Verscion PDF:
+document_properties_page_count=Contezzo pagine:
+document_properties_page_size=Dimenscion da pagina:
+document_properties_page_size_unit_inches=dii gròsci
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=drito
+document_properties_page_size_orientation_landscape=desteizo
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letia
+document_properties_page_size_name_legal=Lezze
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Vista veloce do Web:
+document_properties_linearized_yes=Sci
+document_properties_linearized_no=No
+document_properties_close=Særa
+
+print_progress_message=Praparo o documento pe-a stanpa…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Anulla
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Ativa/dizativa bara de scianco
+toggle_sidebar_notification.title=Cangia bara de löo (o documento o contegne di alegæ)
+toggle_sidebar_label=Ativa/dizativa bara de scianco
+document_outline.title=Fanni vedde o contorno do documento (scicca doggio pe espande/ridue tutti i elementi)
+document_outline_label=Contorno do documento
+attachments.title=Fanni vedde alegæ
+attachments_label=Alegæ
+thumbs.title=Mostra miniatue
+thumbs_label=Miniatue
+findbar.title=Treuva into documento
+findbar_label=Treuva
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Pagina {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniatua da pagina {{page}}
+
+# Find panel button title and messages
+find_input.title=Treuva
+find_input.placeholder=Treuva into documento…
+find_previous.title=Treuva a ripetiçion precedente do testo da çercâ
+find_previous_label=Precedente
+find_next.title=Treuva a ripetiçion dòppo do testo da çercâ
+find_next_label=Segoente
+find_highlight=Evidençia
+find_match_case_label=Maioscole/minoscole
+find_entire_word_label=Poula intrega
+find_reached_top=Razonto a fin da pagina, continoa da l'iniçio
+find_reached_bottom=Razonto l'iniçio da pagina, continoa da-a fin
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} de {{total}} corispondensa
+find_match_count[two]={{current}} de {{total}} corispondense
+find_match_count[few]={{current}} de {{total}} corispondense
+find_match_count[many]={{current}} de {{total}} corispondense
+find_match_count[other]={{current}} de {{total}} corispondense
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Ciù de {{limit}} corispondense
+find_match_count_limit[one]=Ciù de {{limit}} corispondensa
+find_match_count_limit[two]=Ciù de {{limit}} corispondense
+find_match_count_limit[few]=Ciù de {{limit}} corispondense
+find_match_count_limit[many]=Ciù de {{limit}} corispondense
+find_match_count_limit[other]=Ciù de {{limit}} corispondense
+find_not_found=Testo no trovou
+
+# Error panel labels
+error_more_info=Ciù informaçioin
+error_less_info=Meno informaçioin
+error_close=Særa
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Mesaggio: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stack: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Schedaio: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Linia: {{line}}
+rendering_error=Gh'é stæto 'n'erô itno rendering da pagina.
+
+# Predefined zoom values
+page_scale_width=Larghessa pagina
+page_scale_fit=Adatta a una pagina
+page_scale_auto=Zoom aotomatico
+page_scale_actual=Dimenscioin efetive
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Erô
+loading_error=S'é verificou 'n'erô itno caregamento do PDF.
+invalid_file_error=O schedaio PDF o l'é no valido ò aroinou.
+missing_file_error=O schedaio PDF o no gh'é.
+unexpected_response_error=Risposta inprevista do-u server
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Anotaçion: {{type}}]
+password_label=Dimme a paròlla segreta pe arvî sto schedaio PDF.
+password_invalid=Paròlla segreta sbalia. Preuva torna.
+password_ok=Va ben
+password_cancel=Anulla
+
+printing_not_supported=Atençion: a stanpa a no l'é conpletamente soportâ da sto navegatô.
+printing_not_ready=Atençion: o PDF o no l'é ancon caregou conpletamente pe-a stanpa.
+web_fonts_disabled=I font do web en dizativæ: inposcibile adeuviâ i carateri do PDF.
+document_colors_not_allowed=No l'é poscibile adeuviâ i pròpi coî pe-i documenti PDF: l'opçion do navegatô “Permetti a-e pagine de çerne i pròpi coî in cangio de quelli inpostæ†a l'é dizativâ.
diff --git a/js/pdfjs/web/locale/lo/viewer.properties b/js/pdfjs/web/locale/lo/viewer.properties
new file mode 100644
index 0000000..00d3309
--- /dev/null
+++ b/js/pdfjs/web/locale/lo/viewer.properties
@@ -0,0 +1,152 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=ຫນ້າàºà»ˆàº­àº™àº«àº™à»‰àº²
+previous_label=àºà»ˆàº­àº™àº«àº™à»‰àº²
+next.title=ຫນ້າຖັດໄປ
+next_label=ຖັດໄປ
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=ຫນ້າ
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=ຈາຠ{{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} ຈາຠ{{pagesCount}})
+
+zoom_out.title=ຂະຫàºàº²àºàº­àº­àº
+zoom_out_label=ຂະຫàºàº²àºàº­àº­àº
+zoom_in.title=ຂະຫàºàº²àºà»€àº‚ົ້າ
+zoom_in_label=ຂະຫàºàº²àºà»€àº‚ົ້າ
+zoom.title=ຂະຫàºàº²àº
+presentation_mode.title=ສັບປ່ຽນເປັນໂຫມດàºàº²àº™àº™àº³àºªàº°à»€àº«àº™àºµ
+presentation_mode_label=ໂຫມດàºàº²àº™àº™àº³àºªàº°à»€àº«àº™àºµ
+open_file.title=ເປີດໄຟລ໌
+open_file_label=ເປີດ
+print.title=ພິມ
+print_label=ພິມ
+download.title=ດາວໂຫລດ
+download_label=ດາວໂຫລດ
+bookmark.title=ມຸມມອງປະຈຸບັນ (ສຳເນົາ ຫລື ເປີດໃນວິນໂດໃຫມ່)
+bookmark_label=ມຸມມອງປະຈຸບັນ
+
+# Secondary toolbar and context menu
+tools.title=ເຄື່ອງມື
+tools_label=ເຄື່ອງມື
+first_page.title=ໄປທີ່ຫນ້າທຳອິດ
+first_page.label=ໄປທີ່ຫນ້າທຳອິດ
+first_page_label=ໄປທີ່ຫນ້າທຳອິດ
+last_page.title=ໄປທີ່ຫນ້າສຸດທ້າàº
+last_page.label=ໄປທີ່ຫນ້າສຸດທ້າàº
+last_page_label=ໄປທີ່ຫນ້າສຸດທ້າàº
+page_rotate_cw.title=ຫມູນຕາມເຂັມໂມງ
+page_rotate_cw.label=ຫມູນຕາມເຂັມໂມງ
+page_rotate_cw_label=ຫມູນຕາມເຂັມໂມງ
+page_rotate_ccw.title=ຫມູນທວນເຂັມໂມງ
+page_rotate_ccw.label=ຫມູນທວນເຂັມໂມງ
+page_rotate_ccw_label=ຫມູນທວນເຂັມໂມງ
+
+
+
+
+# Document properties dialog box
+document_properties_file_name=ຊື່ໄຟລ໌:
+document_properties_file_size=ຂະຫນາດໄຟລ໌:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=ລວງຕັ້ງ
+document_properties_page_size_orientation_landscape=ລວງນອນ
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=ຈົດà»àº²àº
+document_properties_page_size_name_legal=ຂà»à»‰àºàº»àº”ຫມາàº
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_close=ປິດ
+
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_close=àºàº»àºà»€àº¥àºµàº
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=ເປີດ/ປິດà»àº–ບຂ້າງ
+toggle_sidebar_notification.title=ເປີດ/ປິດà»àº–ບຂ້າງ (ເອàºàº°àºªàº²àº™àº¡àºµà»€àº„ົ້າຮ່າງ/ໄຟລ໌à»àº™àºš)
+toggle_sidebar_label=ເປີດ/ປິດà»àº–ບຂ້າງ
+document_outline_label=ເຄົ້າຮ່າງເອàºàº°àºªàº²àº™
+findbar_label=ຄົ້ນຫາ
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+
+# Find panel button title and messages
+find_input.title=ຄົ້ນຫາ
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+
+# Error panel labels
+error_more_info=ຂà»à»‰àº¡àº¹àº™à»€àºžàºµà»ˆàº¡à»€àº•àºµàº¡
+error_less_info=ຂà»à»‰àº¡àº¹àº™àº™à»‰àº­àºàº¥àº»àº‡
+error_close=ປິດ
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+rendering_error=ມີຂà»à»‰àºœàº´àº”ພາດເàºàºµàº”ຂື້ນຂະນະທີ່àºàº³àº¥àº±àº‡à»€àº£àº±àº™à»€àº”ີຫນ້າ.
+
+# Predefined zoom values
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+
+# Loading indicator messages
+loading_error_indicator=ຂà»à»‰àºœàº´àº”ພາດ
+loading_error=ມີຂà»à»‰àºœàº´àº”ພາດເàºàºµàº”ຂື້ນຂະນະທີ່àºàº³àº¥àº±àº‡à»‚ຫລດ PDF.
+invalid_file_error=ໄຟລ໌ PDF ບà»à»ˆàº–ືàºàº•à»‰àº­àº‡àº«àº¥àº·à»€àºªàºàº«àº²àº.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+password_ok=ຕົàºàº¥àº»àº‡
+password_cancel=àºàº»àºà»€àº¥àºµàº
+
diff --git a/js/pdfjs/web/locale/locale.properties b/js/pdfjs/web/locale/locale.properties
new file mode 100644
index 0000000..aa43d40
--- /dev/null
+++ b/js/pdfjs/web/locale/locale.properties
@@ -0,0 +1,303 @@
+[ach]
+@import url(ach/viewer.properties)
+
+[af]
+@import url(af/viewer.properties)
+
+[an]
+@import url(an/viewer.properties)
+
+[ar]
+@import url(ar/viewer.properties)
+
+[ast]
+@import url(ast/viewer.properties)
+
+[az]
+@import url(az/viewer.properties)
+
+[be]
+@import url(be/viewer.properties)
+
+[bg]
+@import url(bg/viewer.properties)
+
+[bn]
+@import url(bn/viewer.properties)
+
+[bo]
+@import url(bo/viewer.properties)
+
+[br]
+@import url(br/viewer.properties)
+
+[brx]
+@import url(brx/viewer.properties)
+
+[bs]
+@import url(bs/viewer.properties)
+
+[ca]
+@import url(ca/viewer.properties)
+
+[cak]
+@import url(cak/viewer.properties)
+
+[cs]
+@import url(cs/viewer.properties)
+
+[cy]
+@import url(cy/viewer.properties)
+
+[da]
+@import url(da/viewer.properties)
+
+[de]
+@import url(de/viewer.properties)
+
+[dsb]
+@import url(dsb/viewer.properties)
+
+[el]
+@import url(el/viewer.properties)
+
+[en-CA]
+@import url(en-CA/viewer.properties)
+
+[en-GB]
+@import url(en-GB/viewer.properties)
+
+[en-US]
+@import url(en-US/viewer.properties)
+
+[eo]
+@import url(eo/viewer.properties)
+
+[es-AR]
+@import url(es-AR/viewer.properties)
+
+[es-CL]
+@import url(es-CL/viewer.properties)
+
+[es-ES]
+@import url(es-ES/viewer.properties)
+
+[es-MX]
+@import url(es-MX/viewer.properties)
+
+[et]
+@import url(et/viewer.properties)
+
+[eu]
+@import url(eu/viewer.properties)
+
+[fa]
+@import url(fa/viewer.properties)
+
+[ff]
+@import url(ff/viewer.properties)
+
+[fi]
+@import url(fi/viewer.properties)
+
+[fr]
+@import url(fr/viewer.properties)
+
+[fy-NL]
+@import url(fy-NL/viewer.properties)
+
+[ga-IE]
+@import url(ga-IE/viewer.properties)
+
+[gd]
+@import url(gd/viewer.properties)
+
+[gl]
+@import url(gl/viewer.properties)
+
+[gn]
+@import url(gn/viewer.properties)
+
+[gu-IN]
+@import url(gu-IN/viewer.properties)
+
+[he]
+@import url(he/viewer.properties)
+
+[hi-IN]
+@import url(hi-IN/viewer.properties)
+
+[hr]
+@import url(hr/viewer.properties)
+
+[hsb]
+@import url(hsb/viewer.properties)
+
+[hu]
+@import url(hu/viewer.properties)
+
+[hy-AM]
+@import url(hy-AM/viewer.properties)
+
+[ia]
+@import url(ia/viewer.properties)
+
+[id]
+@import url(id/viewer.properties)
+
+[is]
+@import url(is/viewer.properties)
+
+[it]
+@import url(it/viewer.properties)
+
+[ja]
+@import url(ja/viewer.properties)
+
+[ka]
+@import url(ka/viewer.properties)
+
+[kab]
+@import url(kab/viewer.properties)
+
+[kk]
+@import url(kk/viewer.properties)
+
+[km]
+@import url(km/viewer.properties)
+
+[kn]
+@import url(kn/viewer.properties)
+
+[ko]
+@import url(ko/viewer.properties)
+
+[lij]
+@import url(lij/viewer.properties)
+
+[lo]
+@import url(lo/viewer.properties)
+
+[lt]
+@import url(lt/viewer.properties)
+
+[ltg]
+@import url(ltg/viewer.properties)
+
+[lv]
+@import url(lv/viewer.properties)
+
+[mk]
+@import url(mk/viewer.properties)
+
+[mr]
+@import url(mr/viewer.properties)
+
+[ms]
+@import url(ms/viewer.properties)
+
+[my]
+@import url(my/viewer.properties)
+
+[nb-NO]
+@import url(nb-NO/viewer.properties)
+
+[ne-NP]
+@import url(ne-NP/viewer.properties)
+
+[nl]
+@import url(nl/viewer.properties)
+
+[nn-NO]
+@import url(nn-NO/viewer.properties)
+
+[oc]
+@import url(oc/viewer.properties)
+
+[pa-IN]
+@import url(pa-IN/viewer.properties)
+
+[pl]
+@import url(pl/viewer.properties)
+
+[pt-BR]
+@import url(pt-BR/viewer.properties)
+
+[pt-PT]
+@import url(pt-PT/viewer.properties)
+
+[rm]
+@import url(rm/viewer.properties)
+
+[ro]
+@import url(ro/viewer.properties)
+
+[ru]
+@import url(ru/viewer.properties)
+
+[scn]
+@import url(scn/viewer.properties)
+
+[si]
+@import url(si/viewer.properties)
+
+[sk]
+@import url(sk/viewer.properties)
+
+[sl]
+@import url(sl/viewer.properties)
+
+[son]
+@import url(son/viewer.properties)
+
+[sq]
+@import url(sq/viewer.properties)
+
+[sr]
+@import url(sr/viewer.properties)
+
+[sv-SE]
+@import url(sv-SE/viewer.properties)
+
+[ta]
+@import url(ta/viewer.properties)
+
+[te]
+@import url(te/viewer.properties)
+
+[th]
+@import url(th/viewer.properties)
+
+[tl]
+@import url(tl/viewer.properties)
+
+[tr]
+@import url(tr/viewer.properties)
+
+[trs]
+@import url(trs/viewer.properties)
+
+[uk]
+@import url(uk/viewer.properties)
+
+[ur]
+@import url(ur/viewer.properties)
+
+[uz]
+@import url(uz/viewer.properties)
+
+[vi]
+@import url(vi/viewer.properties)
+
+[wo]
+@import url(wo/viewer.properties)
+
+[xh]
+@import url(xh/viewer.properties)
+
+[zh-CN]
+@import url(zh-CN/viewer.properties)
+
+[zh-TW]
+@import url(zh-TW/viewer.properties)
+
diff --git a/js/pdfjs/web/locale/lt/viewer.properties b/js/pdfjs/web/locale/lt/viewer.properties
new file mode 100644
index 0000000..dbdc821
--- /dev/null
+++ b/js/pdfjs/web/locale/lt/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Ankstesnis puslapis
+previous_label=Ankstesnis
+next.title=Kitas puslapis
+next_label=Kitas
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Puslapis
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=iš {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} iš {{pagesCount}})
+
+zoom_out.title=Sumažinti
+zoom_out_label=Sumažinti
+zoom_in.title=Padidinti
+zoom_in_label=Padidinti
+zoom.title=Mastelis
+presentation_mode.title=Pereiti į pateikties veikseną
+presentation_mode_label=Pateikties veiksena
+open_file.title=Atverti failÄ…
+open_file_label=Atverti
+print.title=Spausdinti
+print_label=Spausdinti
+download.title=Parsiųsti
+download_label=Parsiųsti
+bookmark.title=Esamojo rodinio saitas (kopijavimui ar atvÄ—rimui kitame lange)
+bookmark_label=Esamasis rodinys
+
+# Secondary toolbar and context menu
+tools.title=PriemonÄ—s
+tools_label=PriemonÄ—s
+first_page.title=Eiti į pirmą puslapį
+first_page.label=Eiti į pirmą puslapį
+first_page_label=Eiti į pirmą puslapį
+last_page.title=Eiti į paskutinį puslapį
+last_page.label=Eiti į paskutinį puslapį
+last_page_label=Eiti į paskutinį puslapį
+page_rotate_cw.title=Pasukti pagal laikrodžio rodyklę
+page_rotate_cw.label=Pasukti pagal laikrodžio rodyklę
+page_rotate_cw_label=Pasukti pagal laikrodžio rodyklę
+page_rotate_ccw.title=Pasukti prieš laikrodžio rodyklę
+page_rotate_ccw.label=Pasukti prieš laikrodžio rodyklę
+page_rotate_ccw_label=Pasukti prieš laikrodžio rodyklę
+
+cursor_text_select_tool.title=Įjungti teksto žymėjimo įrankį
+cursor_text_select_tool_label=Teksto žymėjimo įrankis
+cursor_hand_tool.title=Įjungti vilkimo įrankį
+cursor_hand_tool_label=Vilkimo įrankis
+
+scroll_vertical.title=Naudoti vertikalų slinkimą
+scroll_vertical_label=Vertikalus slinkimas
+scroll_horizontal.title=Naudoti horizontalų slinkimą
+scroll_horizontal_label=Horizontalus slinkimas
+scroll_wrapped.title=Naudoti išklotą slinkimą
+scroll_wrapped_label=IÅ¡klotas slinkimas
+
+spread_none.title=Nesujungti puslapių sklaidų
+spread_none_label=Be sklaidų
+spread_odd.title=Sujungti puslapių sklaidas pradedant nelyginiais puslapiais
+spread_odd_label=NelyginÄ—s sklaidos
+spread_even.title=Sujungti puslapių sklaidas pradedant lyginiais puslapiais
+spread_even_label=LyginÄ—s sklaidos
+
+# Document properties dialog box
+document_properties.title=Dokumento savybės…
+document_properties_label=Dokumento savybės…
+document_properties_file_name=Failo vardas:
+document_properties_file_size=Failo dydis:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} B)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} B)
+document_properties_title=Antraštė:
+document_properties_author=Autorius:
+document_properties_subject=Tema:
+document_properties_keywords=Reikšminiai žodžiai:
+document_properties_creation_date=Sukūrimo data:
+document_properties_modification_date=Modifikavimo data:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=KÅ«rÄ—jas:
+document_properties_producer=PDF generatorius:
+document_properties_version=PDF versija:
+document_properties_page_count=Puslapių skaiÄius:
+document_properties_page_size=Puslapio dydis:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=staÄias
+document_properties_page_size_orientation_landscape=gulsÄias
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Laiškas
+document_properties_page_size_name_legal=Dokumentas
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Spartus žiniatinklio rodinys:
+document_properties_linearized_yes=Taip
+document_properties_linearized_no=Ne
+document_properties_close=Užverti
+
+print_progress_message=Dokumentas ruošiamas spausdinimui…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Atsisakyti
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Rodyti / slėpti šoninį polangį
+toggle_sidebar_notification.title=Parankinė (dokumentas turi struktūrą / priedų)
+toggle_sidebar_label=Å oninis polangis
+document_outline.title=Rodyti dokumento struktūrą (spustelėkite dukart norėdami išplėsti/suskleisti visus elementus)
+document_outline_label=Dokumento struktūra
+attachments.title=Rodyti priedus
+attachments_label=Priedai
+thumbs.title=Rodyti puslapių miniatiūras
+thumbs_label=Miniatiūros
+findbar.title=Ieškoti dokumente
+findbar_label=Rasti
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas={{page}} puslapis
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title={{page}} puslapis
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas={{page}} puslapio miniatiūra
+
+# Find panel button title and messages
+find_input.title=Rasti
+find_input.placeholder=Rasti dokumente…
+find_previous.title=Ieškoti ankstesnio frazės egzemplioriaus
+find_previous_label=Ankstesnis
+find_next.title=Ieškoti tolesnio frazės egzemplioriaus
+find_next_label=Tolesnis
+find_highlight=Viską paryškinti
+find_match_case_label=Skirti didžiąsias ir mažąsias raides
+find_entire_word_label=Ištisi žodžiai
+find_reached_top=Pasiekus dokumento pradžią, paieška pratęsta nuo pabaigos
+find_reached_bottom=Pasiekus dokumento pabaigą, paieška pratęsta nuo pradžios
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} iš {{total}} atitikmens
+find_match_count[two]={{current}} iš {{total}} atitikmenų
+find_match_count[few]={{current}} iš {{total}} atitikmenų
+find_match_count[many]={{current}} iš {{total}} atitikmenų
+find_match_count[other]={{current}} iš {{total}} atitikmens
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Daugiau nei {{limit}} atitikmenų
+find_match_count_limit[one]=Daugiau nei {{limit}} atitikmuo
+find_match_count_limit[two]=Daugiau nei {{limit}} atitikmenys
+find_match_count_limit[few]=Daugiau nei {{limit}} atitikmenys
+find_match_count_limit[many]=Daugiau nei {{limit}} atitikmenų
+find_match_count_limit[other]=Daugiau nei {{limit}} atitikmuo
+find_not_found=Ieškoma frazė nerasta
+
+# Error panel labels
+error_more_info=IÅ¡samiau
+error_less_info=GlausÄiau
+error_close=Užverti
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v. {{version}} (darinys: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Pranešimas: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=DÄ—klas: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Failas: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=EilutÄ—: {{line}}
+rendering_error=Atvaizduojant puslapį įvyko klaida.
+
+# Predefined zoom values
+page_scale_width=Priderinti prie lapo ploÄio
+page_scale_fit=Pritaikyti prie lapo dydžio
+page_scale_auto=Automatinis mastelis
+page_scale_actual=Tikras dydis
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Klaida
+loading_error=Įkeliant PDF failą įvyko klaida.
+invalid_file_error=Tai nÄ—ra PDF failas arba jis yra sugadintas.
+missing_file_error=PDF failas nerastas.
+unexpected_response_error=NetikÄ—tas serverio atsakas.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[„{{type}}“ tipo anotacija]
+password_label=Įveskite slaptažodį šiam PDF failui atverti.
+password_invalid=Slaptažodis neteisingas. Bandykite dar kartą.
+password_ok=Gerai
+password_cancel=Atsisakyti
+
+printing_not_supported=Dėmesio! Spausdinimas šioje naršyklėje nėra pilnai realizuotas.
+printing_not_ready=Dėmesio! PDF failas dar nėra pilnai įkeltas spausdinimui.
+web_fonts_disabled=Saityno Å¡riftai iÅ¡jungti – PDF faile esanÄių Å¡riftų naudoti negalima.
+document_colors_not_allowed=PDF dokumentams neleidžiama nurodyti savo spalvų, nes išjungta naršyklės nuostata „Leisti tinklalapiams nurodyti spalvas“.
diff --git a/js/pdfjs/web/locale/ltg/viewer.properties b/js/pdfjs/web/locale/ltg/viewer.properties
new file mode 100644
index 0000000..ecdb723
--- /dev/null
+++ b/js/pdfjs/web/locale/ltg/viewer.properties
@@ -0,0 +1,220 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=ĪprÄ«kÅ¡ejÄ lopa
+previous_label=ĪprÄ«kÅ¡ejÄ
+next.title=Nuokomuo lopa
+next_label=Nuokomuo
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Lopa
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=nu {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} nu {{pagesCount}})
+
+zoom_out.title=Attuolynuot
+zoom_out_label=Attuolynuot
+zoom_in.title=PÄ«tuvynuot
+zoom_in_label=PÄ«tuvynuot
+zoom.title=Palelynuojums
+presentation_mode.title=Puorslēgtīs iz Prezentacejis režymu
+presentation_mode_label=Prezentacejis režyms
+open_file.title=Attaiseit failu
+open_file_label=Attaiseit
+print.title=Drukuošona
+print_label=DrukÅt
+download.title=Lejupīluode
+download_label=Lejupīluodeit
+bookmark.title=PoÅ¡reizejais skots (kopÄ“t voi attaiseit jaunÄ lÅ«gÄ)
+bookmark_label=Pošreizejais skots
+
+# Secondary toolbar and context menu
+tools.title=Reiki
+tools_label=Reiki
+first_page.title=Īt iz pyrmū lopu
+first_page.label=Īt iz pyrmū lopu
+first_page_label=Īt iz pyrmū lopu
+last_page.title=Īt iz piedejū lopu
+last_page.label=Īt iz piedejū lopu
+last_page_label=Īt iz piedejū lopu
+page_rotate_cw.title=Pagrīzt pa pulksteni
+page_rotate_cw.label=Pagrīzt pa pulksteni
+page_rotate_cw_label=Pagrīzt pa pulksteni
+page_rotate_ccw.title=Pagrīzt pret pulksteni
+page_rotate_ccw.label=Pagrīzt pret pulksteni
+page_rotate_ccw_label=Pagrīzt pret pulksteni
+
+cursor_text_select_tool.title=Aktivizēt teksta izvieles reiku
+cursor_text_select_tool_label=Teksta izvieles reiks
+cursor_hand_tool.title=Aktivēt rūkys reiku
+cursor_hand_tool_label=RÅ«kys reiks
+
+scroll_vertical.title=IzmontÅt vertikalÅ« ritinÅÅ¡onu
+scroll_vertical_label=VertikalÅ ritinÅÅ¡ona
+scroll_horizontal.title=IzmontÅt horizontalÅ« ritinÅÅ¡onu
+scroll_horizontal_label=HorizontalÅ ritinÅÅ¡ona
+scroll_wrapped.title=IzmontÅt mÄrÅ«gojamÅ« ritinÅÅ¡onu
+scroll_wrapped_label=MÄrÅ«gojamÅ ritinÅÅ¡ona
+
+spread_none.title=NaizmontÅt lopu atvÄruma režimu
+spread_none_label=Bez atvÄrumim
+spread_odd.title=IzmontÅt lopu atvÄrumus sÅkut nu napÅra numeru lopom
+spread_odd_label=NapÅra lopys pa kreisi
+spread_even.title=IzmontÅt lopu atvÄrumus sÅkut nu pÅra numeru lopom
+spread_even_label=PÅra lopys pa kreisi
+
+# Document properties dialog box
+document_properties.title=Dokumenta īstatiejumi…
+document_properties_label=Dokumenta īstatiejumi…
+document_properties_file_name=Faila nūsaukums:
+document_properties_file_size=Faila izmÄrs:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} biti)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} biti)
+document_properties_title=NÅ«saukums:
+document_properties_author=Autors:
+document_properties_subject=Tema:
+document_properties_keywords=AtslÄgi vuordi:
+document_properties_creation_date=Izveides datums:
+document_properties_modification_date=lobuošonys datums:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Radeituojs:
+document_properties_producer=PDF producents:
+document_properties_version=PDF verseja:
+document_properties_page_count=Lopu skaits:
+document_properties_page_size=Lopas izmÄrs:
+document_properties_page_size_unit_inches=collas
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=portreta orientaceja
+document_properties_page_size_orientation_landscape=ainovys orientaceja
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Fast Web View:
+document_properties_linearized_yes=JÄ
+document_properties_linearized_no=NÄ
+document_properties_close=Aiztaiseit
+
+print_progress_message=Preparing document for printing…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Atceļt
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Puorslēgt suonu jūslu
+toggle_sidebar_notification.title=Toggle Sidebar (document contains outline/attachments)
+toggle_sidebar_label=Puorslēgt suonu jūslu
+document_outline.title=Show Document Outline (double-click to expand/collapse all items)
+document_outline_label=Dokumenta saturs
+attachments.title=Show Attachments
+attachments_label=Attachments
+thumbs.title=Paruodeit seiktÄlus
+thumbs_label=SeiktÄli
+findbar.title=Mekleit dokumentÄ
+findbar_label=Mekleit
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Lopa {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Lopys {{page}} seiktÄls
+
+# Find panel button title and messages
+find_input.title=Mekleit
+find_input.placeholder=Mekleit dokumentÄ…
+find_previous.title=Atrast īprīkšejū
+find_previous_label=ĪprÄ«kÅ¡ejÄ
+find_next.title=Atrast nuokamū
+find_next_label=Nuokomuo
+find_highlight=Īkruosuot vysys
+find_match_case_label=Lelū, mozū burtu jiuteigs
+find_reached_top=Sasnīgts dokumenta suokums, turpynojom nu beigom
+find_reached_bottom=Sasnīgtys dokumenta beigys, turpynojom nu suokuma
+find_not_found=FrÄze nav atrosta
+
+# Error panel labels
+error_more_info=Vairuok informacejis
+error_less_info=mozuok informacejis
+error_close=Close
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Ziņuojums: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Steks: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=File: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Ryndeņa: {{line}}
+rendering_error=AttÄlojÅ«t lopu rodÄs klaida
+
+# Predefined zoom values
+page_scale_width=Lopys plotumÄ
+page_scale_fit=Ītylpynūt lopu
+page_scale_auto=Automatiskais izmÄrs
+page_scale_actual=PatÄ«sais izmÄrs
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Klaida
+loading_error=Īluodejūt PDF nūtyka klaida.
+invalid_file_error=Nadereigs voi būjuots PDF fails.
+missing_file_error=PDF fails nav atrosts.
+unexpected_response_error=Unexpected server response.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Annotation]
+password_label=Īvodit paroli, kab attaiseitu PDF failu.
+password_invalid=Napareiza parole, raugit vēļreiz.
+password_ok=Labi
+password_cancel=Atceļt
+
+printing_not_supported=Uzmaneibu: DrukuoÅ¡ona nu itei puorlÅ«ka dorbojÄs tikai daleji.
+printing_not_ready=Uzmaneibu: PDF nav pilneibÄ Ä«luodeits drukuoÅ¡onai.
+web_fonts_disabled=Å Ä·Ärsteikla fonti nav aktivizÄti: Navar Ä«gult PDF fontus.
+document_colors_not_allowed=PDF dokumentym nav atļauts izmantuot poÅ¡ym sovys kruosys: „Atļaut lopom izavieleit poÅ¡om sovys kruosys“ ir deaktiveits puorlyukÄ.
diff --git a/js/pdfjs/web/locale/lv/viewer.properties b/js/pdfjs/web/locale/lv/viewer.properties
new file mode 100644
index 0000000..18ed55e
--- /dev/null
+++ b/js/pdfjs/web/locale/lv/viewer.properties
@@ -0,0 +1,242 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=IepriekÅ¡Ä“jÄ lapa
+previous_label=IepriekÅ¡Ä“jÄ
+next.title=NÄkamÄ lapa
+next_label=NÄkamÄ
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Lapa
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=no {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} no {{pagesCount}})
+
+zoom_out.title=AttÄlinÄt\u0020
+zoom_out_label=AttÄlinÄt
+zoom_in.title=PietuvinÄt
+zoom_in_label=PietuvinÄt
+zoom.title=PalielinÄjums
+presentation_mode.title=PÄrslÄ“gties uz PrezentÄcijas režīmu
+presentation_mode_label=PrezentÄcijas režīms
+open_file.title=Atvērt failu
+open_file_label=Atvērt
+print.title=DrukÄÅ¡ana
+print_label=DrukÄt
+download.title=LejupielÄde
+download_label=LejupielÄdÄ“t
+bookmark.title=PaÅ¡reizÄ“jais skats (kopÄ“t vai atvÄ“rt jaunÄ logÄ)
+bookmark_label=Pašreizējais skats
+
+# Secondary toolbar and context menu
+tools.title=RÄ«ki
+tools_label=RÄ«ki
+first_page.title=Iet uz pirmo lapu
+first_page.label=Iet uz pirmo lapu
+first_page_label=Iet uz pirmo lapu
+last_page.title=Iet uz pēdējo lapu
+last_page.label=Iet uz pēdējo lapu
+last_page_label=Iet uz pēdējo lapu
+page_rotate_cw.title=Pagriezt pa pulksteni
+page_rotate_cw.label=Pagriezt pa pulksteni
+page_rotate_cw_label=Pagriezt pa pulksteni
+page_rotate_ccw.title=Pagriezt pret pulksteni
+page_rotate_ccw.label=Pagriezt pret pulksteni
+page_rotate_ccw_label=Pagriezt pret pulksteni
+
+cursor_text_select_tool.title=Aktivizēt teksta izvēles rīku
+cursor_text_select_tool_label=Teksta izvēles rīks
+cursor_hand_tool.title=Aktivēt rokas rīku
+cursor_hand_tool_label=Rokas rīks
+
+scroll_vertical.title=Izmantot vertikÄlo ritinÄÅ¡anu
+scroll_vertical_label=VertikÄlÄ ritinÄÅ¡ana
+scroll_horizontal.title=Izmantot horizontÄlo ritinÄÅ¡anu
+scroll_horizontal_label=HorizontÄlÄ ritinÄÅ¡ana
+scroll_wrapped.title=Izmantot apkļauto ritinÄÅ¡anu
+scroll_wrapped_label=ApkļautÄ ritinÄÅ¡ana
+
+spread_none.title=Nepievienoties lapu izpletumiem
+spread_none_label=Neizmantot izpletumus
+spread_odd.title=Izmantot lapu izpletumus sÄkot ar nepÄra numuru lapÄm
+spread_odd_label=NepÄra izpletumi
+spread_even.title=Izmantot lapu izpletumus sÄkot ar pÄra numuru lapÄm
+spread_even_label=PÄra izpletumi
+
+# Document properties dialog box
+document_properties.title=Dokumenta iestatījumi…
+document_properties_label=Dokumenta iestatījumi…
+document_properties_file_name=Faila nosaukums:
+document_properties_file_size=Faila izmērs:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} biti)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} biti)
+document_properties_title=Nosaukums:
+document_properties_author=Autors:
+document_properties_subject=TÄ“ma:
+document_properties_keywords=AtslÄ“gas vÄrdi:
+document_properties_creation_date=Izveides datums:
+document_properties_modification_date=LAbošanas datums:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=RadÄ«tÄjs:
+document_properties_producer=PDF producents:
+document_properties_version=PDF versija:
+document_properties_page_count=Lapu skaits:
+document_properties_page_size=Papīra izmērs:
+document_properties_page_size_unit_inches=collas
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=portretorientÄcija
+document_properties_page_size_orientation_landscape=ainavorientÄcija
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=VÄ“stule
+document_properties_page_size_name_legal=Juridiskie teksti
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Ä€trÄ tÄ«mekļa skats:
+document_properties_linearized_yes=JÄ
+document_properties_linearized_no=NÄ“
+document_properties_close=Aizvērt
+
+print_progress_message=Gatavo dokumentu drukÄÅ¡anai...
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Atcelt
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=PÄrslÄ“gt sÄnu joslu
+toggle_sidebar_notification.title=PÄrslÄ“gt sÄnu joslu (dokumenta saturu un pielikumus)
+toggle_sidebar_label=PÄrslÄ“gt sÄnu joslu
+document_outline.title=RÄdÄ«t dokumenta struktÅ«ru (veiciet dubultklikÅ¡Ä·i lai izvÄ“rstu/sakļautu visus vienumus)
+document_outline_label=Dokumenta saturs
+attachments.title=RÄdÄ«t pielikumus
+attachments_label=Pielikumi
+thumbs.title=ParÄdÄ«t sÄ«ktÄ“lus
+thumbs_label=Sīktēli
+findbar.title=MeklÄ“t dokumentÄ
+findbar_label=Meklēt
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Lapa {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Lapas {{page}} sīktēls
+
+# Find panel button title and messages
+find_input.title=Meklēt
+find_input.placeholder=Meklēt dokumentą
+find_previous.title=Atrast iepriekšējo
+find_previous_label=IepriekÅ¡Ä“jÄ
+find_next.title=Atrast nÄkamo
+find_next_label=NÄkamÄ
+find_highlight=IekrÄsot visas
+find_match_case_label=Lielo, mazo burtu jutīgs
+find_entire_word_label=Veselus vÄrdus
+find_reached_top=Sasniegts dokumenta sÄkums, turpinÄm no beigÄm
+find_reached_bottom=Sasniegtas dokumenta beigas, turpinÄm no sÄkuma
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} no {{total}} rezultÄta
+find_match_count[two]={{current}} no {{total}} rezultÄtiem
+find_match_count[few]={{current}} no {{total}} rezultÄtiem
+find_match_count[many]={{current}} no {{total}} rezultÄtiem
+find_match_count[other]={{current}} no {{total}} rezultÄtiem
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=VairÄk nekÄ {{limit}} rezultÄti
+find_match_count_limit[one]=VairÄk nekÄ {{limit}} rezultÄti
+find_match_count_limit[two]=VairÄk nekÄ {{limit}} rezultÄti
+find_match_count_limit[few]=VairÄk nekÄ {{limit}} rezultÄti
+find_match_count_limit[many]=VairÄk nekÄ {{limit}} rezultÄti
+find_match_count_limit[other]=VairÄk nekÄ {{limit}} rezultÄti
+find_not_found=FrÄze nav atrasta
+
+# Error panel labels
+error_more_info=VairÄk informÄcijas
+error_less_info=MAzÄk informÄcijas
+error_close=Close
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Ziņojums: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Steks: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=File: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Rindiņa: {{line}}
+rendering_error=AttÄ“lojot lapu radÄs kļūda
+
+# Predefined zoom values
+page_scale_width=Lapas platumÄ
+page_scale_fit=Ietilpinot lapu
+page_scale_auto=AutomÄtiskais izmÄ“rs
+page_scale_actual=Patiesais izmērs
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Kļūda
+loading_error=IelÄdÄ“jot PDF notika kļūda.
+invalid_file_error=NederÄ«gs vai bojÄts PDF fails.
+missing_file_error=PDF fails nav atrasts.
+unexpected_response_error=Negaidīa servera atbilde.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} anotÄcija]
+password_label=Ievadiet paroli, lai atvērtu PDF failu.
+password_invalid=Nepareiza parole, mēģiniet vēlreiz.
+password_ok=Labi
+password_cancel=Atcelt
+
+printing_not_supported=UzmanÄ«bu: DrukÄÅ¡ana no Å¡Ä« pÄrlÅ«ka darbojas tikai daļēji.
+printing_not_ready=UzmanÄ«bu: PDF nav pilnÄ«bÄ ielÄdÄ“ts drukÄÅ¡anai.
+web_fonts_disabled=Tīmekļa fonti nav aktivizēti: Nevar iegult PDF fontus.
+document_colors_not_allowed=PDF dokumentiem nav atļauts izmantot paÅ¡iem savas krÄsas: „Atļaut lapÄm izvÄ“lÄ“ties paÅ¡Äm savas krÄsas“ ir deaktivÄ“ts pÄrlÅ«kÄ.
diff --git a/js/pdfjs/web/locale/mk/viewer.properties b/js/pdfjs/web/locale/mk/viewer.properties
new file mode 100644
index 0000000..8535025
--- /dev/null
+++ b/js/pdfjs/web/locale/mk/viewer.properties
@@ -0,0 +1,145 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Претходна Ñтраница
+previous_label=Претходна
+next.title=Следна Ñтраница
+next_label=Следна
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+
+zoom_out.title=Ðамалување
+zoom_out_label=Ðамали
+zoom_in.title=Зголемување
+zoom_in_label=Зголеми
+zoom.title=Променување на големина
+presentation_mode.title=Премини во презентациÑки режим
+presentation_mode_label=ПрезентациÑки режим
+open_file.title=Отворање датотека
+open_file_label=Отвори
+print.title=Печатење
+print_label=Печати
+download.title=Преземање
+download_label=Преземи
+bookmark.title=Овој преглед (копирај или отвори во нов прозорец)
+bookmark_label=Овој преглед
+
+# Secondary toolbar and context menu
+tools.title=Ðлатки
+first_page.label=Оди до првата Ñтраница
+last_page.label=Оди до поÑледната Ñтраница
+page_rotate_cw.label=Ротирај по Ñтрелките на чаÑовникот
+page_rotate_ccw.label=Ротирај Ñпротивно од Ñтрелките на чаÑовникот
+
+
+
+
+# Document properties dialog box
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_close=Откажи
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Вклучи Ñтранична лента
+toggle_sidebar_label=Вклучи Ñтранична лента
+thumbs.title=Прикажување на икони
+thumbs_label=Икони
+findbar.title=Ðајди во документот
+findbar_label=Ðајди
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Страница {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Икона од Ñтраница {{page}}
+
+# Find panel button title and messages
+find_previous.title=Ðајди ја предходната појава на фразата
+find_previous_label=Претходно
+find_next.title=Ðајди ја Ñледната појава на фразата
+find_next_label=Следно
+find_highlight=Означи ÑÑ
+find_match_case_label=Токму така
+find_reached_top=Барањето Ñтигна до почетокот на документот и почнува од крајот
+find_reached_bottom=Барањето Ñтигна до крајот на документот и почнува од почеток
+find_not_found=Фразата не е пронајдена
+
+# Error panel labels
+error_more_info=Повеќе информации
+error_less_info=Помалку информации
+error_close=Затвори
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Порака: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stack: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Датотека: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Линија: {{line}}
+rendering_error=ÐаÑтана грешка при прикажувањето на Ñтраницата.
+
+# Predefined zoom values
+page_scale_width=Ширина на Ñтраница
+page_scale_fit=Цела Ñтраница
+page_scale_auto=ÐвтоматÑка големина
+page_scale_actual=ВиÑтинÑка големина
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+
+# Loading indicator messages
+loading_error_indicator=Грешка
+loading_error=ÐаÑтана грешка при вчитувањето на PDF-от.
+invalid_file_error=Ðевалидна или корумпирана PDF датотека.
+missing_file_error=ÐедоÑтаÑува PDF документ.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+password_cancel=Откажи
+
+printing_not_supported=Предупредување: Печатењето не е целоÑно поддржано во овој прелиÑтувач.
+printing_not_ready=Предупредување: PDF документот не е целоÑно вчитан за печатење.
+web_fonts_disabled=Интернет фонтовите Ñе оневозможени: не може да Ñе кориÑтат вградените PDF фонтови.
+document_colors_not_allowed=PDF-документите немаат дозвола да кориÑтат ÑопÑтвени бои: ПоÑтавката „Дозволи Ñтраниците Ñами да ги избираат Ñвоите бои“ е деактивирана од прелиÑтувачот.
diff --git a/js/pdfjs/web/locale/mr/viewer.properties b/js/pdfjs/web/locale/mr/viewer.properties
new file mode 100644
index 0000000..25229ea
--- /dev/null
+++ b/js/pdfjs/web/locale/mr/viewer.properties
@@ -0,0 +1,238 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=मागील पृषà¥à¤ 
+previous_label=मागील
+next.title=पà¥à¤¢à¥€à¤² पृषà¥à¤ 
+next_label=पà¥à¤¢à¥€à¤²
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=पृषà¥à¤ 
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages={{pagesCount}}पैकी
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pagesCount}} पैकी {{pageNumber}})
+
+zoom_out.title=छोटे करा
+zoom_out_label=छोटे करा
+zoom_in.title=मोठे करा
+zoom_in_label=मोठे करा
+zoom.title=लहान किंवा मोठे करा
+presentation_mode.title=पà¥à¤°à¤¸à¥à¤¤à¥à¤¤à¤¿à¤•à¤°à¤£ मोडचा वापर करा
+presentation_mode_label=पà¥à¤°à¤¸à¥à¤¤à¥à¤¤à¤¿à¤•à¤°à¤£ मोड
+open_file.title=फाइल उघडा
+open_file_label=उघडा
+print.title=छपाई करा
+print_label=छपाई करा
+download.title=डाउनलोड करा
+download_label=डाउनलोड करा
+bookmark.title=सधà¥à¤¯à¤¾à¤šà¥‡ अवलोकन (नवीन पटलात पà¥à¤°à¤¤ बनवा किंवा उघडा)
+bookmark_label=सधà¥à¤¯à¤¾à¤šà¥‡ अवलोकन
+
+# Secondary toolbar and context menu
+tools.title=साधने
+tools_label=साधने
+first_page.title=पहिलà¥à¤¯à¤¾ पृषà¥à¤ à¤¾à¤µà¤° जा
+first_page.label=पहिलà¥à¤¯à¤¾ पृषà¥à¤ à¤¾à¤µà¤° जा
+first_page_label=पहिलà¥à¤¯à¤¾ पृषà¥à¤ à¤¾à¤µà¤° जा
+last_page.title=शेवटचà¥à¤¯à¤¾ पृषà¥à¤ à¤¾à¤µà¤° जा
+last_page.label=शेवटचà¥à¤¯à¤¾ पृषà¥à¤ à¤¾à¤µà¤° जा
+last_page_label=शेवटचà¥à¤¯à¤¾ पृषà¥à¤ à¤¾à¤µà¤° जा
+page_rotate_cw.title=घडà¥à¤¯à¤¾à¤³à¤¾à¤šà¥à¤¯à¤¾ काटà¥à¤¯à¤¾à¤šà¥à¤¯à¤¾ दिशेने फिरवा
+page_rotate_cw.label=घडà¥à¤¯à¤¾à¤³à¤¾à¤šà¥à¤¯à¤¾ काटà¥à¤¯à¤¾à¤šà¥à¤¯à¤¾ दिशेने फिरवा
+page_rotate_cw_label=घडà¥à¤¯à¤¾à¤³à¤¾à¤šà¥à¤¯à¤¾ काटà¥à¤¯à¤¾à¤šà¥à¤¯à¤¾ दिशेने फिरवा
+page_rotate_ccw.title=घडà¥à¤¯à¤¾à¤³à¤¾à¤šà¥à¤¯à¤¾ काटà¥à¤¯à¤¾à¤šà¥à¤¯à¤¾ उलट दिशेने फिरवा
+page_rotate_ccw.label=घडà¥à¤¯à¤¾à¤³à¤¾à¤šà¥à¤¯à¤¾ काटà¥à¤¯à¤¾à¤šà¥à¤¯à¤¾ उलट दिशेने फिरवा
+page_rotate_ccw_label=घडà¥à¤¯à¤¾à¤³à¤¾à¤šà¥à¤¯à¤¾ काटà¥à¤¯à¤¾à¤šà¥à¤¯à¤¾ उलट दिशेने फिरवा
+
+cursor_text_select_tool.title=मजकूर निवड साधन कारà¥à¤¯à¤¾à¤¨à¥à¤µà¤¯à¥€à¤¤ करा
+cursor_text_select_tool_label=मजकूर निवड साधन
+cursor_hand_tool.title=हात साधन कारà¥à¤¯à¤¾à¤¨à¥à¤µà¤¿à¤¤ करा
+cursor_hand_tool_label=हसà¥à¤¤ साधन
+
+scroll_vertical.title=अनà¥à¤²à¤‚ब सà¥à¤•à¥à¤°à¥‹à¤²à¤¿à¤‚ग वापरा
+scroll_vertical_label=अनà¥à¤²à¤‚ब सà¥à¤•à¥à¤°à¥‹à¤²à¤¿à¤‚ग
+scroll_horizontal.title=कà¥à¤·à¥ˆà¤¤à¤¿à¤œ सà¥à¤•à¥à¤°à¥‹à¤²à¤¿à¤‚ग वापरा
+scroll_horizontal_label=कà¥à¤·à¥ˆà¤¤à¤¿à¤œ सà¥à¤•à¥à¤°à¥‹à¤²à¤¿à¤‚ग
+
+
+# Document properties dialog box
+document_properties.title=दसà¥à¤¤à¤à¤µà¤œ गà¥à¤£à¤§à¤°à¥à¤®â€¦
+document_properties_label=दसà¥à¤¤à¤à¤µà¤œ गà¥à¤£à¤§à¤°à¥à¤®â€¦
+document_properties_file_name=फाइलचे नाव:
+document_properties_file_size=फाइल आकार:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} बाइटà¥à¤¸)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} बाइटà¥à¤¸)
+document_properties_title=शिरà¥à¤·à¤•:
+document_properties_author=लेखक:
+document_properties_subject=विषय:
+document_properties_keywords=मà¥à¤–à¥à¤¯à¤¶à¤¬à¥à¤¦:
+document_properties_creation_date=निरà¥à¤®à¤¾à¤£ दिनांक:
+document_properties_modification_date=दà¥à¤°à¥‚सà¥à¤¤à¥€ दिनांक:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=निरà¥à¤®à¤¾à¤¤à¤¾:
+document_properties_producer=PDF निरà¥à¤®à¤¾à¤¤à¤¾:
+document_properties_version=PDF आवृतà¥à¤¤à¥€:
+document_properties_page_count=पृषà¥à¤  संखà¥à¤¯à¤¾:
+document_properties_page_size=पृषà¥à¤  आकार:
+document_properties_page_size_unit_inches=इंच
+document_properties_page_size_unit_millimeters=मीमी
+document_properties_page_size_orientation_portrait=उभी मांडणी
+document_properties_page_size_orientation_landscape=आडवे
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=जलद वेब दृषà¥à¤¯:
+document_properties_linearized_yes=हो
+document_properties_linearized_no=नाही
+document_properties_close=बंद करा
+
+print_progress_message=छपाई करीता पृषà¥à¤  तयार करीत आहे…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=रदà¥à¤¦ करा
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=बाजूचीपटà¥à¤Ÿà¥€ टॉगल करा
+toggle_sidebar_notification.title=बाजूची पटà¥à¤Ÿà¥€ टॉगल करा (दसà¥à¤¤à¤à¤µà¤œà¤¾à¤®à¤§à¥à¤¯à¥‡ रà¥à¤ªà¤°à¥‡à¤·à¤¾/जोडणà¥à¤¯à¤¾ आहेत)
+toggle_sidebar_label=बाजूचीपटà¥à¤Ÿà¥€ टॉगल करा
+document_outline.title=दसà¥à¤¤à¤à¤µà¤œ बाहà¥à¤¯à¤°à¥‡à¤–ा दरà¥à¤¶à¤µà¤¾ (विसà¥à¤¤à¥ƒà¤¤ करणà¥à¤¯à¤¾à¤¸à¤¾à¤ à¥€ दोनवेळा कà¥à¤²à¤¿à¤• करा /सरà¥à¤µ घटक दाखवा)
+document_outline_label=दसà¥à¤¤à¤à¤µà¤œ रूपरेषा
+attachments.title=जोडपतà¥à¤° दाखवा
+attachments_label=जोडपतà¥à¤°
+thumbs.title=थंबनेलà¥à¤¸à¥ दाखवा
+thumbs_label=थंबनेलà¥à¤¸à¥
+findbar.title=दसà¥à¤¤à¤à¤µà¤œà¤¾à¤¤ शोधा
+findbar_label=शोधा
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=पृषà¥à¤  {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=पृषà¥à¤ à¤¾à¤šà¥‡ थंबनेल {{page}}
+
+# Find panel button title and messages
+find_input.title=शोधा
+find_input.placeholder=दसà¥à¤¤à¤à¤µà¤œà¤¾à¤¤ शोधा…
+find_previous.title=वाकपà¥à¤°à¤¯à¥‹à¤—ची मागील घटना शोधा
+find_previous_label=मागील
+find_next.title=वाकपà¥à¤°à¤¯à¥‹à¤—ची पà¥à¤¢à¥€à¤² घटना शोधा
+find_next_label=पà¥à¤¢à¥€à¤²
+find_highlight=सरà¥à¤µ ठळक करा
+find_match_case_label=आकार जà¥à¤³à¤µà¤¾
+find_entire_word_label=संपूरà¥à¤£ शबà¥à¤¦
+find_reached_top=दसà¥à¤¤à¤à¤µà¤œà¤¾à¤šà¥à¤¯à¤¾ शीरà¥à¤·à¤•à¤¾à¤¸ पोहचले, तळपासून पà¥à¤¢à¥‡
+find_reached_bottom=दसà¥à¤¤à¤à¤µà¤œà¤¾à¤šà¥à¤¯à¤¾ तळाला पोहचले, शीरà¥à¤·à¤•à¤¾à¤ªà¤¾à¤¸à¥‚न पà¥à¤¢à¥‡
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{total}} पैकी {{current}} सà¥à¤¸à¤‚गत
+find_match_count[two]={{total}} पैकी {{current}} सà¥à¤¸à¤‚गत
+find_match_count[few]={{total}} पैकी {{current}} सà¥à¤¸à¤‚गत
+find_match_count[many]={{total}} पैकी {{current}} सà¥à¤¸à¤‚गत
+find_match_count[other]={{total}} पैकी {{current}} सà¥à¤¸à¤‚गत
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]={{limit}} पेकà¥à¤·à¤¾ अधिक जà¥à¤³à¤£à¥à¤¯à¤¾
+find_match_count_limit[one]={{limit}} पेकà¥à¤·à¤¾ अधिक जà¥à¤³à¤£à¥à¤¯à¤¾
+find_match_count_limit[two]={{limit}} पेकà¥à¤·à¤¾ अधिक जà¥à¤³à¤£à¥à¤¯à¤¾
+find_match_count_limit[few]={{limit}} पेकà¥à¤·à¤¾ अधिक जà¥à¤³à¤£à¥à¤¯à¤¾
+find_match_count_limit[many]={{limit}} पेकà¥à¤·à¤¾ अधिक जà¥à¤³à¤£à¥à¤¯à¤¾
+find_match_count_limit[other]={{limit}} पेकà¥à¤·à¤¾ अधिक जà¥à¤³à¤£à¥à¤¯à¤¾
+find_not_found=वाकपà¥à¤°à¤¯à¥‹à¤— आढळले नाही
+
+# Error panel labels
+error_more_info=आणखी माहिती
+error_less_info=कमी माहिती
+error_close=बंद करा
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=संदेश: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=सà¥à¤Ÿà¥…क: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=फाइल: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=रेष: {{line}}
+rendering_error=पृषà¥à¤  दाखवतेवेळी तà¥à¤°à¥à¤Ÿà¥€ आढळली.
+
+# Predefined zoom values
+page_scale_width=पृषà¥à¤ à¤¾à¤šà¥€ रूंदी
+page_scale_fit=पृषà¥à¤  बसवा
+page_scale_auto=सà¥à¤µà¤¯à¤‚ लाहन किंवा मोठे करणे
+page_scale_actual=पà¥à¤°à¤¤à¥à¤¯à¤•à¥à¤· आकार
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=तà¥à¤°à¥à¤Ÿà¥€
+loading_error=PDF लोड करतेवेळी तà¥à¤°à¥à¤Ÿà¥€ आढळली.
+invalid_file_error=अवैध किंवा दोषीत PDF फाइल.
+missing_file_error=न आढळणारी PDF फाइल.
+unexpected_response_error=अनपेकà¥à¤·à¤¿à¤¤ सरà¥à¤µà¥à¤¹à¤° पà¥à¤°à¤¤à¤¿à¤¸à¤¾à¤¦.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} टिपणà¥à¤£à¥€]
+password_label=ही PDF फाइल उघडणà¥à¤¯à¤¾à¤•à¤°à¤¿à¤¤à¤¾ पासवरà¥à¤¡ दà¥à¤¯à¤¾.
+password_invalid=अवैध पासवरà¥à¤¡. कृपया पà¥à¤¨à¥à¤¹à¤¾ पà¥à¤°à¤¯à¤¤à¥à¤¨ करा.
+password_ok=ठीक आहे
+password_cancel=रदà¥à¤¦ करा
+
+printing_not_supported=सावधानता: या बà¥à¤°à¤¾à¤‰à¤à¤°à¤¤à¤°à¥à¤«à¥‡ छपाइ पूरà¥à¤£à¤ªà¤£à¥‡ समरà¥à¤¥à¥€à¤¤ नाही.
+printing_not_ready=सावधानता: छपाईकरिता PDF पूरà¥à¤£à¤¤à¤¯à¤¾ लोड à¤à¤¾à¤²à¥‡ नाही.
+web_fonts_disabled=वेब टंक असमरà¥à¤¥à¥€à¤¤ आहेत: à¤à¤®à¥à¤¬à¥‡à¤¡à¥‡à¤¡ PDF टंक वापर अशकà¥à¤¯.
+document_colors_not_allowed=PDF दसà¥à¤¤à¤à¤µà¤œà¤¾à¤‚ना तà¥à¤¯à¤¾à¤‚चे रंग वापरणà¥à¤¯à¤¾à¤¸ अनà¥à¤®à¤¤à¥€ नाही: बà¥à¤°à¤¾à¤‰à¤à¤°à¤®à¤§à¥à¤¯à¥‡ ' पृषà¥à¤ à¤¾à¤‚ना तà¥à¤¯à¤¾à¤‚चे रंग निवडणà¥à¤¯à¤¾à¤¸ अनà¥à¤®à¤¤à¥€ दà¥à¤¯à¤¾' बंद केले आहे.
diff --git a/js/pdfjs/web/locale/ms/viewer.properties b/js/pdfjs/web/locale/ms/viewer.properties
new file mode 100644
index 0000000..3bc7907
--- /dev/null
+++ b/js/pdfjs/web/locale/ms/viewer.properties
@@ -0,0 +1,242 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Halaman Dahulu
+previous_label=Dahulu
+next.title=Halaman Berikut
+next_label=Berikut
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Halaman
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=daripada {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} daripada {{pagesCount}})
+
+zoom_out.title=Zum Keluar
+zoom_out_label=Zum Keluar
+zoom_in.title=Zum Masuk
+zoom_in_label=Zum Masuk
+zoom.title=Zum
+presentation_mode.title=Tukar ke Mod Persembahan
+presentation_mode_label=Mod Persembahan
+open_file.title=Buka Fail
+open_file_label=Buka
+print.title=Cetak
+print_label=Cetak
+download.title=Muat turun
+download_label=Muat turun
+bookmark.title=Paparan semasa (salin atau buka dalam tetingkap baru)
+bookmark_label=Paparan Semasa
+
+# Secondary toolbar and context menu
+tools.title=Alatan
+tools_label=Alatan
+first_page.title=Pergi ke Halaman Pertama
+first_page.label=Pergi ke Halaman Pertama
+first_page_label=Pergi ke Halaman Pertama
+last_page.title=Pergi ke Halaman Terakhir
+last_page.label=Pergi ke Halaman Terakhir
+last_page_label=Pergi ke Halaman Terakhir
+page_rotate_cw.title=Berputar ikut arah Jam
+page_rotate_cw.label=Berputar ikut arah Jam
+page_rotate_cw_label=Berputar ikut arah Jam
+page_rotate_ccw.title=Pusing berlawan arah jam
+page_rotate_ccw.label=Pusing berlawan arah jam
+page_rotate_ccw_label=Pusing berlawan arah jam
+
+cursor_text_select_tool.title=Dayakan Alatan Pilihan Teks
+cursor_text_select_tool_label=Alatan Pilihan Teks
+cursor_hand_tool.title=Dayakan Alatan Tangan
+cursor_hand_tool_label=Alatan Tangan
+
+scroll_vertical.title=Guna Skrol Menegak
+scroll_vertical_label=Skrol Menegak
+scroll_horizontal.title=Guna Skrol Mengufuk
+scroll_horizontal_label=Skrol Mengufuk
+scroll_wrapped.title=Guna Skrol Berbalut
+scroll_wrapped_label=Skrol Berbalut
+
+spread_none.title=Jangan hubungkan hamparan halaman
+spread_none_label=Tanpa Hamparan
+spread_odd.title=Hubungkan hamparan halaman dengan halaman nombor ganjil
+spread_odd_label=Hamparan Ganjil
+spread_even.title=Hubungkan hamparan halaman dengan halaman nombor genap
+spread_even_label=Hamparan Seimbang
+
+# Document properties dialog box
+document_properties.title=Sifat Dokumen…
+document_properties_label=Sifat Dokumen…
+document_properties_file_name=Nama fail:
+document_properties_file_size=Saiz fail:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bait)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bait)
+document_properties_title=Tajuk:
+document_properties_author=Pengarang:
+document_properties_subject=Subjek:
+document_properties_keywords=Kata kunci:
+document_properties_creation_date=Masa Dicipta:
+document_properties_modification_date=Tarikh Ubahsuai:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Pencipta:
+document_properties_producer=Pengeluar PDF:
+document_properties_version=Versi PDF:
+document_properties_page_count=Kiraan Laman:
+document_properties_page_size=Saiz Halaman:
+document_properties_page_size_unit_inches=dalam
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=potret
+document_properties_page_size_orientation_landscape=landskap
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Paparan Web Pantas:
+document_properties_linearized_yes=Ya
+document_properties_linearized_no=Tidak
+document_properties_close=Tutup
+
+print_progress_message=Menyediakan dokumen untuk dicetak…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Batal
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Togol Bar Sisi
+toggle_sidebar_notification.title=Togol Sidebar (dokumen mengandungi rangka/attachments)
+toggle_sidebar_label=Togol Bar Sisi
+document_outline.title=Papar Rangka Dokumen (klik-dua-kali untuk kembangkan/kolaps semua item)
+document_outline_label=Rangka Dokumen
+attachments.title=Papar Lampiran
+attachments_label=Lampiran
+thumbs.title=Papar Thumbnails
+thumbs_label=Imej kecil
+findbar.title=Cari didalam Dokumen
+findbar_label=Cari
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Halaman {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Halaman Imej kecil {{page}}
+
+# Find panel button title and messages
+find_input.title=Cari
+find_input.placeholder=Cari dalam dokumen…
+find_previous.title=Cari teks frasa berkenaan yang terdahulu
+find_previous_label=Dahulu
+find_next.title=Cari teks frasa berkenaan yang berikut
+find_next_label=Berikut
+find_highlight=Serlahkan semua
+find_match_case_label=Huruf sepadan
+find_entire_word_label=Seluruh perkataan
+find_reached_top=Mencapai teratas daripada dokumen, sambungan daripada bawah
+find_reached_bottom=Mencapai terakhir daripada dokumen, sambungan daripada atas
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} daripada {{total}} padanan
+find_match_count[two]={{current}} daripada {{total}} padanan
+find_match_count[few]={{current}} daripada {{total}} padanan
+find_match_count[many]={{current}} daripada {{total}} padanan
+find_match_count[other]={{current}} daripada {{total}} padanan
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Lebih daripada {{limit}} padanan
+find_match_count_limit[one]=Lebih daripada {{limit}} padanan
+find_match_count_limit[two]=Lebih daripada {{limit}} padanan
+find_match_count_limit[few]=Lebih daripada {{limit}} padanan
+find_match_count_limit[many]=Lebih daripada {{limit}} padanan
+find_match_count_limit[other]=Lebih daripada {{limit}} padanan
+find_not_found=Frasa tidak ditemui
+
+# Error panel labels
+error_more_info=Maklumat Lanjut
+error_less_info=Kurang Informasi
+error_close=Tutup
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Mesej: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Timbun: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Fail: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Garis: {{line}}
+rendering_error=Ralat berlaku ketika memberikan halaman.
+
+# Predefined zoom values
+page_scale_width=Lebar Halaman
+page_scale_fit=Muat Halaman
+page_scale_auto=Zoom Automatik
+page_scale_actual=Saiz Sebenar
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Ralat
+loading_error=Masalah berlaku semasa menuatkan sebuah PDF.
+invalid_file_error=Tidak sah atau fail PDF rosak.
+missing_file_error=Fail PDF Hilang.
+unexpected_response_error=Respon pelayan yang tidak dijangka.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Anotasi]
+password_label=Masukan kata kunci untuk membuka fail PDF ini.
+password_invalid=Kata laluan salah. Cuba lagi.
+password_ok=OK
+password_cancel=Batal
+
+printing_not_supported=Amaran: Cetakan ini tidak sepenuhnya disokong oleh pelayar ini.
+printing_not_ready=Amaran: PDF tidak sepenuhnya dimuatkan untuk dicetak.
+web_fonts_disabled=Fon web dinyahdayakan: tidak dapat menggunakan fon terbenam PDF.
+document_colors_not_allowed=Dokumen PDF tidak dibenarkan untuk menggunakan warna sendiri: “Izinkan halaman untuk memilih warna sendiri†telah dinyahaktifkan dalam pelayar.
diff --git a/js/pdfjs/web/locale/my/viewer.properties b/js/pdfjs/web/locale/my/viewer.properties
new file mode 100644
index 0000000..f567619
--- /dev/null
+++ b/js/pdfjs/web/locale/my/viewer.properties
@@ -0,0 +1,198 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=အရင် စာမျက်နှာ
+previous_label=အရင်နေရာ
+next.title=ရှေ့ စာမျက်နှာ
+next_label=နောက်á€á€á€¯
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=စာမျက်နှာ
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages={{pagesCount}} á
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pagesCount}} á {{pageNumber}})
+
+zoom_out.title=á€á€»á€¯á€¶á€·á€•á€«
+zoom_out_label=á€á€»á€¯á€¶á€·á€•á€«
+zoom_in.title=á€á€»á€²á€·á€•á€«
+zoom_in_label=á€á€»á€²á€·á€•á€«
+zoom.title=á€á€»á€¯á€¶á€·/á€á€»á€²á€·á€•á€«
+presentation_mode.title=ဆွေးနွေးá€á€„်ပြစနစ်သို့ ကူးပြောင်းပါ
+presentation_mode_label=ဆွေးနွေးá€á€„်ပြစနစ်
+open_file.title=ဖိုင်အားဖွင့်ပါá‹
+open_file_label=ဖွင့်ပါ
+print.title=ပုံနှိုပ်ပါ
+print_label=ပုံနှိုပ်ပါ
+download.title=ကူးဆွဲ
+download_label=ကူးဆွဲ
+bookmark.title=လက်ရှိ မြင်ကွင်း (á€á€„်းဒိုးအသစ်မှာ ကူးပါ သို့မဟုá€á€º ဖွင့်ပါ)
+bookmark_label=လက်ရှိ မြင်ကွင်း
+
+# Secondary toolbar and context menu
+tools.title=ကိရိယာများ
+tools_label=ကိရိယာများ
+first_page.title=ပထမ စာမျက်နှာသို့
+first_page.label=ပထမ စာမျက်နှာသို့
+first_page_label=ပထမ စာမျက်နှာသို့
+last_page.title=နောက်ဆုံး စာမျက်နှာသို့
+last_page.label=နောက်ဆုံး စာမျက်နှာသို့
+last_page_label=နောက်ဆုံး စာမျက်နှာသို့
+page_rotate_cw.title=နာရီလက်á€á€¶ အá€á€­á€¯á€„်း
+page_rotate_cw.label=နာရီလက်á€á€¶ အá€á€­á€¯á€„်း
+page_rotate_cw_label=နာရီလက်á€á€¶ အá€á€­á€¯á€„်း
+page_rotate_ccw.title=နာရီလက်á€á€¶ ပြောင်းပြန်
+page_rotate_ccw.label=နာရီလက်á€á€¶ ပြောင်းပြန်
+page_rotate_ccw_label=နာရီလက်á€á€¶ ပြောင်းပြန်
+
+
+
+
+# Document properties dialog box
+document_properties.title=မှá€á€ºá€á€™á€ºá€¸á€™á€¾á€á€ºá€›á€¬ ဂုá€á€ºá€žá€á€¹á€á€­á€™á€»á€¬á€¸
+document_properties_label=မှá€á€ºá€á€™á€ºá€¸á€™á€¾á€á€ºá€›á€¬ ဂုá€á€ºá€žá€á€¹á€á€­á€™á€»á€¬á€¸
+document_properties_file_name=ဖိုင် :
+document_properties_file_size=ဖိုင်ဆိုဒ် :
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} ကီလိုဘိုá€á€º ({{size_b}}ဘိုá€á€º)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=á€á€±á€«á€„်းစဉ်‌ -
+document_properties_author=ရေးသားသူ:
+document_properties_subject=အကြောင်းအရာ:\u0020
+document_properties_keywords=သော့á€á€»á€€á€º စာလုံး:
+document_properties_creation_date=ထုá€á€ºá€œá€¯á€•á€ºá€›á€€á€ºá€…ွဲ:
+document_properties_modification_date=ပြင်ဆင်ရက်စွဲ:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=ဖန်á€á€®á€¸á€žá€°:
+document_properties_producer=PDF ထုá€á€ºá€œá€¯á€•á€ºá€žá€°:
+document_properties_version=PDF ဗားရှင်း:
+document_properties_page_count=စာမျက်နှာအရေအá€á€½á€€á€º:
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_close=ပိá€á€º
+
+print_progress_message=Preparing document for printing…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=ပယ်​ဖျက်ပါ
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=ဘေးá€á€”်းဖွင့်ပိá€á€º
+toggle_sidebar_notification.title=ဘေးဘားá€á€”်းကို အဖွင့်/အပိá€á€º လုပ်ရန် (စာá€á€™á€ºá€¸á€á€½á€„် outline/attachments ပါá€á€„်နိုင်သည်)
+toggle_sidebar_label=ဖွင့်ပိá€á€º ဆလိုက်ဒါ
+document_outline.title=စာá€á€™á€ºá€¸á€¡á€€á€»á€‰á€ºá€¸á€á€»á€¯á€•á€ºá€€á€­á€¯ ပြပါ (စာရင်းအားလုံးကို á€á€»á€¯á€¶á€·/á€á€»á€²á€·á€›á€”် ကလစ်နှစ်á€á€»á€€á€ºá€”ှိပ်ပါ)
+document_outline_label=စာá€á€™á€ºá€¸á€¡á€€á€»á€‰á€ºá€¸á€á€»á€¯á€•á€º
+attachments.title=á€á€½á€²á€á€»á€€á€ºá€™á€»á€¬á€¸ ပြပါ
+attachments_label=á€á€½á€²á€‘ားá€á€»á€€á€ºá€™á€»á€¬á€¸
+thumbs.title=ပုံရိပ်ငယ်များကို ပြပါ
+thumbs_label=ပုံရိပ်ငယ်များ
+findbar.title=Find in Document
+findbar_label=ရှာဖွေပါ
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=စာမျက်နှာ {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=စာမျက်နှာရဲ့ ပုံရိပ်ငယ် {{page}}
+
+# Find panel button title and messages
+find_input.title=ရှာဖွေပါ
+find_input.placeholder=စာá€á€™á€ºá€¸á€‘ဲá€á€½á€„် ရှာဖွေရန်…
+find_previous.title=စကားစုရဲ့ အရင် ​ဖြစ်ပွားမှုကို ရှာဖွေပါ
+find_previous_label=နောက်သို့
+find_next.title=စကားစုရဲ့ နောက်ထပ် ​ဖြစ်ပွားမှုကို ရှာဖွေပါ
+find_next_label=ရှေ့သို့
+find_highlight=အားလုံးကို မျဉ်းသားပါ
+find_match_case_label=စာလုံး á€á€­á€¯á€€á€ºá€†á€­á€¯á€„်ပါ
+find_reached_top=စာမျက်နှာထိပ် ရောက်နေပြီአအဆုံးကနေ ပြန်စပါ
+find_reached_bottom=စာမျက်နှာအဆုံး ရောက်နေပြီአထိပ်ကနေ ပြန်စပါ
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_not_found=စကားစု မá€á€½á€±á€·á€›á€˜á€°á€¸
+
+# Error panel labels
+error_more_info=နောက်ထပ်အá€á€»á€€á€ºá€¡á€œá€€á€ºá€™á€»á€¬á€¸
+error_less_info=အနည်းငယ်မျှသော သá€á€„်းအá€á€»á€€á€ºá€¡á€œá€€á€º
+error_close=ပိá€á€º
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=မက်ဆေ့ - {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=အထပ် - {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=ဖိုင် {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=လိုင်း - {{line}}
+rendering_error=စာမျက်နှာကို ပုံဖော်နေá€á€»á€­á€”်မှာ အမှားá€á€…်á€á€¯á€á€½á€±á€·á€›á€•á€«á€á€šá€ºá‹
+
+# Predefined zoom values
+page_scale_width=စာမျက်နှာ အကျယ်
+page_scale_fit=စာမျက်နှာ ကွက်á€á€­
+page_scale_auto=အလိုအလျောက် á€á€»á€¯á€¶á€·á€á€»á€²á€·
+page_scale_actual=အမှန်á€á€€á€šá€ºá€›á€¾á€­á€á€²á€· အရွယ်
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=အမှား
+loading_error=PDF ဖိုင် ကိုဆွဲá€á€„်နေá€á€»á€­á€”်မှာ အမှားá€á€…်á€á€¯á€á€½á€±á€·á€›á€•á€«á€á€šá€ºá‹
+invalid_file_error=မရသော သို့ ပျက်နေသော PDF ဖိုင်
+missing_file_error=PDF ပျောက်ဆုံး
+unexpected_response_error=မမျှော်လင့်ထားသော ဆာဗာမှ ပြန်ကြားá€á€»á€€á€º
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} အဓိပ္ပာယ်ဖွင့်ဆိုá€á€»á€€á€º]
+password_label=ယá€á€¯ PDF ကို ဖွင့်ရန် စကားá€á€¾á€€á€ºá€€á€­á€¯ ရိုက်ပါá‹
+password_invalid=စာá€á€¾á€€á€º မှားသည်ዠထပ်ကြိုးစားကြည့်ပါá‹
+password_ok=OK
+password_cancel=ပယ်​ဖျက်ပါ
+
+printing_not_supported=သá€á€­á€•á€±á€¸á€á€»á€€á€ºáŠá€•á€›á€„့်ထုá€á€ºá€á€¼á€„်းကိုဤဘယောက်ဆာသည် ပြည့်á€á€…ွာထောက်ပံ့မထားပါ á‹
+printing_not_ready=သá€á€­á€•á€±á€¸á€á€»á€€á€º: ယá€á€¯ PDF ဖိုင်သည် ပုံနှိပ်ရန် မပြည့်စုံပါ
+web_fonts_disabled=Web fonts are disabled: unable to use embedded PDF fonts.
+document_colors_not_allowed=PDF ဖိုင်အား áŽá€„်းဤ ကိုယ်ပိုင်အရောင်များကို အသုံးပြုá€á€½á€„့်မပေးထားပါ á‹ 'စာမျက်နှာအားလုံးအားအရောင်ရွေးá€á€»á€šá€ºá€á€½á€„့်' အား ယá€á€¯ ဘယောက်ဆာá€á€½á€„် ပိá€á€ºá€‘ားá€á€¼á€„်းကြောင့်ဖြစ် သှ်
diff --git a/js/pdfjs/web/locale/nb-NO/viewer.properties b/js/pdfjs/web/locale/nb-NO/viewer.properties
new file mode 100644
index 0000000..5612abb
--- /dev/null
+++ b/js/pdfjs/web/locale/nb-NO/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Forrige side
+previous_label=Forrige
+next.title=Neste side
+next_label=Neste
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Side
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=av {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} av {{pagesCount}})
+
+zoom_out.title=Zoom ut
+zoom_out_label=Zoom ut
+zoom_in.title=Zoom inn
+zoom_in_label=Zoom inn
+zoom.title=Zoom
+presentation_mode.title=Bytt til presentasjonsmodus
+presentation_mode_label=Presentasjonsmodus
+open_file.title=Ã…pne fil
+open_file_label=Ã…pne
+print.title=Skriv ut
+print_label=Skriv ut
+download.title=Last ned
+download_label=Last ned
+bookmark.title=Nåværende visning (kopier eller åpne i et nytt vindu)
+bookmark_label=Nåværende visning
+
+# Secondary toolbar and context menu
+tools.title=Verktøy
+tools_label=Verktøy
+first_page.title=Gå til første side
+first_page.label=Gå til første side
+first_page_label=Gå til første side
+last_page.title=GÃ¥ til siste side
+last_page.label=GÃ¥ til siste side
+last_page_label=GÃ¥ til siste side
+page_rotate_cw.title=Roter med klokken
+page_rotate_cw.label=Roter med klokken
+page_rotate_cw_label=Roter med klokken
+page_rotate_ccw.title=Roter mot klokken
+page_rotate_ccw.label=Roter mot klokken
+page_rotate_ccw_label=Roter mot klokken
+
+cursor_text_select_tool.title=Aktiver tekstmarkeringsverktøy
+cursor_text_select_tool_label=Tekstmarkeringsverktøy
+cursor_hand_tool.title=Aktiver handverktøy
+cursor_hand_tool_label=Handverktøy
+
+scroll_vertical.title=Bruk vertikal rulling
+scroll_vertical_label=Vertikal rulling
+scroll_horizontal.title=Bruk horisontal rulling
+scroll_horizontal_label=Horisontal rulling
+scroll_wrapped.title=Bruk flersiderulling
+scroll_wrapped_label=Flersiderulling
+
+spread_none.title=Vis enkeltsider
+spread_none_label=Enkeltsider
+spread_odd.title=Vis oppslag med ulike sidenumre til venstre
+spread_odd_label=Oppslag med forside
+spread_even.title=Vis oppslag med like sidenumre til venstre
+spread_even_label=Oppslag uten forside
+
+# Document properties dialog box
+document_properties.title=Dokumentegenskaper …
+document_properties_label=Dokumentegenskaper …
+document_properties_file_name=Filnavn:
+document_properties_file_size=Filstørrelse:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Dokumentegenskaper …
+document_properties_author=Forfatter:
+document_properties_subject=Emne:
+document_properties_keywords=Nøkkelord:
+document_properties_creation_date=Opprettet dato:
+document_properties_modification_date=Endret dato:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Opprettet av:
+document_properties_producer=PDF-verktøy:
+document_properties_version=PDF-versjon:
+document_properties_page_count=Sideantall:
+document_properties_page_size=Sidestørrelse:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=stående
+document_properties_page_size_orientation_landscape=liggende
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Hurtig nettvisning:
+document_properties_linearized_yes=Ja
+document_properties_linearized_no=Nei
+document_properties_close=Lukk
+
+print_progress_message=Forbereder dokument for utskrift …
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Avbryt
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Slå av/på sidestolpe
+toggle_sidebar_notification.title=Vis/gjem sidestolpe (dokumentet inneholder oversikt/vedlegg)
+toggle_sidebar_label=Slå av/på sidestolpe
+document_outline.title=Vis dokumentdisposisjonen (dobbeltklikk for å utvide/skjule alle elementer)
+document_outline_label=Dokumentdisposisjon
+attachments.title=Vis vedlegg
+attachments_label=Vedlegg
+thumbs.title=Vis miniatyrbilde
+thumbs_label=Miniatyrbilde
+findbar.title=Finn i dokumentet
+findbar_label=Finn
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Side {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Side {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniatyrbilde av side {{page}}
+
+# Find panel button title and messages
+find_input.title=Søk
+find_input.placeholder=Søk i dokument…
+find_previous.title=Finn forrige forekomst av frasen
+find_previous_label=Forrige
+find_next.title=Finn neste forekomst av frasen
+find_next_label=Neste
+find_highlight=Uthev alle
+find_match_case_label=Skill store/små bokstaver
+find_entire_word_label=Hele ord
+find_reached_top=NÃ¥dde toppen av dokumentet, fortsetter fra bunnen
+find_reached_bottom=NÃ¥dde bunnen av dokumentet, fortsetter fra toppen
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} av {{total}} treff
+find_match_count[two]={{current}} av {{total}} treff
+find_match_count[few]={{current}} av {{total}} treff
+find_match_count[many]={{current}} av {{total}} treff
+find_match_count[other]={{current}} av {{total}} treff
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Mer enn {{limit}} treff
+find_match_count_limit[one]=Mer enn {{limit}} treff
+find_match_count_limit[two]=Mer enn {{limit}} treff
+find_match_count_limit[few]=Mer enn {{limit}} treff
+find_match_count_limit[many]=Mer enn {{limit}} treff
+find_match_count_limit[other]=Mer enn {{limit}} treff
+find_not_found=Fant ikke teksten
+
+# Error panel labels
+error_more_info=Mer info
+error_less_info=Mindre info
+error_close=Lukk
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (bygg: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Melding: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stakk: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Fil: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Linje: {{line}}
+rendering_error=En feil oppstod ved opptegning av siden.
+
+# Predefined zoom values
+page_scale_width=Sidebredde
+page_scale_fit=Tilpass til siden
+page_scale_auto=Automatisk zoom
+page_scale_actual=Virkelig størrelse
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}} %
+
+# Loading indicator messages
+loading_error_indicator=Feil
+loading_error=En feil oppstod ved lasting av PDF.
+invalid_file_error=Ugyldig eller skadet PDF-fil.
+missing_file_error=Manglende PDF-fil.
+unexpected_response_error=Uventet serverrespons.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} annotasjon]
+password_label=Skriv inn passordet for å åpne denne PDF-filen.
+password_invalid=Ugyldig passord. Prøv igjen.
+password_ok=OK
+password_cancel=Avbryt
+
+printing_not_supported=Advarsel: Utskrift er ikke fullstendig støttet av denne nettleseren.
+printing_not_ready=Advarsel: PDF er ikke fullstendig innlastet for utskrift.
+web_fonts_disabled=Web-fonter er avslått: Kan ikke bruke innbundne PDF-fonter.
+document_colors_not_allowed=PDF-dokumenter tillates ikke å bruke deres egne farger: "Tillat sider å velge egne farger" er deaktivert i nettleseren.
diff --git a/js/pdfjs/web/locale/ne-NP/viewer.properties b/js/pdfjs/web/locale/ne-NP/viewer.properties
new file mode 100644
index 0000000..13bf69b
--- /dev/null
+++ b/js/pdfjs/web/locale/ne-NP/viewer.properties
@@ -0,0 +1,184 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=अघिलà¥à¤²à¥‹ पृषà¥à¤ 
+previous_label=अघिलà¥à¤²à¥‹
+next.title=पछिलà¥à¤²à¥‹ पृषà¥à¤ 
+next_label=पछिलà¥à¤²à¥‹
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=पृषà¥à¤ 
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages={{pagesCount}} मधà¥à¤¯à¥‡
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pagesCount}} को {{pageNumber}})
+
+zoom_out.title=जà¥à¤® घटाउनà¥à¤¹à¥‹à¤¸à¥
+zoom_out_label=जà¥à¤® घटाउनà¥à¤¹à¥‹à¤¸à¥
+zoom_in.title=जà¥à¤® बढाउनà¥à¤¹à¥‹à¤¸à¥
+zoom_in_label=जà¥à¤® बढाउनà¥à¤¹à¥‹à¤¸à¥
+zoom.title=जà¥à¤® गरà¥à¤¨à¥à¤¹à¥‹à¤¸à¥
+presentation_mode.title=पà¥à¤°à¤¸à¥à¤¤à¥à¤¤à¤¿ मोडमा जानà¥à¤¹à¥‹à¤¸à¥
+presentation_mode_label=पà¥à¤°à¤¸à¥à¤¤à¥à¤¤à¤¿ मोड
+open_file.title=फाइल खोलà¥à¤¨à¥à¤¹à¥‹à¤¸à¥
+open_file_label=खोलà¥à¤¨à¥à¤¹à¥‹à¤¸à¥
+print.title=मà¥à¤¦à¥à¤°à¤£ गरà¥à¤¨à¥à¤¹à¥‹à¤¸à¥
+print_label=मà¥à¤¦à¥à¤°à¤£ गरà¥à¤¨à¥à¤¹à¥‹à¤¸à¥
+download.title=डाउनलोडहरू
+download_label=डाउनलोडहरू
+bookmark.title=वरà¥à¤¤à¤®à¤¾à¤¨ दृशà¥à¤¯ (पà¥à¤°à¤¤à¤¿à¤²à¤¿à¤ªà¤¿ गरà¥à¤¨à¥à¤¹à¥‹à¤¸à¥ वा नयाठसञà¥à¤à¥à¤¯à¤¾à¤²à¤®à¤¾ खà¥à¤²à¥à¤¨à¥à¤¹à¥‹à¤¸à¥)
+bookmark_label=हालको दृशà¥à¤¯
+
+# Secondary toolbar and context menu
+tools.title=औजारहरू
+tools_label=औजारहरू
+first_page.title=पहिलो पृषà¥à¤ à¤®à¤¾ जानà¥à¤¹à¥‹à¤¸à¥
+first_page.label=पहिलो पृषà¥à¤ à¤®à¤¾ जानà¥à¤¹à¥‹à¤¸à¥
+first_page_label=पहिलो पृषà¥à¤ à¤®à¤¾ जानà¥à¤¹à¥‹à¤¸à¥
+last_page.title=पछिलà¥à¤²à¥‹ पृषà¥à¤ à¤®à¤¾ जानà¥à¤¹à¥‹à¤¸à¥
+last_page.label=पछिलà¥à¤²à¥‹ पृषà¥à¤ à¤®à¤¾ जानà¥à¤¹à¥‹à¤¸à¥
+last_page_label=पछिलà¥à¤²à¥‹ पृषà¥à¤ à¤®à¤¾ जानà¥à¤¹à¥‹à¤¸à¥
+page_rotate_cw.title=घडीको दिशामा घà¥à¤®à¤¾à¤‰à¤¨à¥à¤¹à¥‹à¤¸à¥
+page_rotate_cw.label=घडीको दिशामा घà¥à¤®à¤¾à¤‰à¤¨à¥à¤¹à¥‹à¤¸à¥
+page_rotate_cw_label=घडीको दिशामा घà¥à¤®à¤¾à¤‰à¤¨à¥à¤¹à¥‹à¤¸à¥
+page_rotate_ccw.title=घडीको विपरित दिशामा घà¥à¤®à¤¾à¤‰à¤¨à¥à¤¹à¥‹à¤¸à¥
+page_rotate_ccw.label=घडीको विपरित दिशामा घà¥à¤®à¤¾à¤‰à¤¨à¥à¤¹à¥‹à¤¸à¥
+page_rotate_ccw_label=घडीको विपरित दिशामा घà¥à¤®à¤¾à¤‰à¤¨à¥à¤¹à¥‹à¤¸à¥
+
+cursor_text_select_tool.title=पाठ चयन उपकरण सकà¥à¤·à¤® गरà¥à¤¨à¥à¤¹à¥‹à¤¸à¥
+cursor_text_select_tool_label=पाठ चयन उपकरण
+cursor_hand_tool.title=हाते उपकरण सकà¥à¤·à¤® गरà¥à¤¨à¥à¤¹à¥‹à¤¸à¥
+cursor_hand_tool_label=हाते उपकरण
+
+# Document properties dialog box
+document_properties.title=कागजात विशेषताहरू...
+document_properties_label=कागजात विशेषताहरू...
+document_properties_file_name=फाइल नाम:
+document_properties_file_size=फाइल आकार:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=शीरà¥à¤·à¤•:
+document_properties_author=लेखक:
+document_properties_subject=विषयः
+document_properties_keywords=शबà¥à¤¦à¤•à¥à¤žà¥à¤œà¥€à¤ƒ
+document_properties_creation_date=सिरà¥à¤œà¤¨à¤¾ गरिà¤à¤•à¥‹ मिति:
+document_properties_modification_date=परिमारà¥à¤œà¤¿à¤¤ मिति:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=सरà¥à¤œà¤•:
+document_properties_producer=PDF निरà¥à¤®à¤¾à¤¤à¤¾:
+document_properties_version=PDF संसà¥à¤•à¤°à¤£
+document_properties_page_count=पृषà¥à¤  गणना:
+document_properties_close=बनà¥à¤¦ गरà¥à¤¨à¥à¤¹à¥‹à¤¸à¥
+
+print_progress_message=मà¥à¤¦à¥à¤°à¤£à¤•à¤¾ लागि कागजात तयारी गरिदै…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=रदà¥à¤¦ गरà¥à¤¨à¥à¤¹à¥‹à¤¸à¥
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=टगल साइडबार
+toggle_sidebar_notification.title=साइडबार टगल गरà¥à¤¨à¥à¤¹à¥‹à¤¸à¥ (कागजातमा समावेश भà¤à¤•à¥‹ कà¥à¤°à¤¾à¤¹à¤°à¥‚ रूपरेखा/attachments)
+toggle_sidebar_label=टगल साइडबार
+document_outline.title=कागजातको रूपरेखा देखाउनà¥à¤¹à¥‹à¤¸à¥ (सबै वसà¥à¤¤à¥à¤¹à¤°à¥‚ विसà¥à¤¤à¤¾à¤°/पतन गरà¥à¤¨ डबल-कà¥à¤²à¤¿à¤• गरà¥à¤¨à¥à¤¹à¥‹à¤¸à¥)
+document_outline_label=दसà¥à¤¤à¤¾à¤µà¥‡à¤œà¤•à¥‹ रूपरेखा
+attachments.title=संलगà¥à¤¨à¤¹à¤°à¥‚ देखाउनà¥à¤¹à¥‹à¤¸à¥
+attachments_label=संलगà¥à¤¨à¤•à¤¹à¤°à¥‚
+thumbs.title=थमà¥à¤¬à¤¨à¥‡à¤²à¤¹à¤°à¥‚ देखाउनà¥à¤¹à¥‹à¤¸à¥
+thumbs_label=थमà¥à¤¬à¤¨à¥‡à¤²à¤¹à¤°à¥‚
+findbar.title=कागजातमा फेला पारà¥à¤¨à¥à¤¹à¥‹à¤¸à¥
+findbar_label=फेला पारà¥à¤¨à¥à¤¹à¥‹à¤¸à¥
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=पृषà¥à¤  {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas={{page}} पृषà¥à¤ à¤•à¥‹ थमà¥à¤¬à¤¨à¥‡à¤²
+
+# Find panel button title and messages
+find_input.title=फेला पारà¥à¤¨à¥à¤¹à¥‹à¤¸à¥
+find_input.placeholder=कागजातमा फेला पारà¥à¤¨à¥à¤¹à¥‹à¤¸à¥â€¦
+find_previous.title=यस वाकà¥à¤¯à¤¾à¤‚शको अघिलà¥à¤²à¥‹ घटना फेला पारà¥à¤¨à¥à¤¹à¥‹à¤¸à¥
+find_previous_label=अघिलà¥à¤²à¥‹
+find_next.title=यस वाकà¥à¤¯à¤¾à¤‚शको पछिलà¥à¤²à¥‹ घटना फेला पारà¥à¤¨à¥à¤¹à¥‹à¤¸à¥
+find_next_label=अरà¥à¤•à¥‹
+find_highlight=सबै हाइलाइट गरà¥à¤¨à¥‡
+find_match_case_label=केस जोडा मिलाउनà¥à¤¹à¥‹à¤¸à¥
+find_reached_top=पृषà¥à¤ à¤•à¥‹ शिरà¥à¤·à¤®à¤¾ पà¥à¤—ीयो, तलबाट जारी गरिà¤à¤•à¥‹ थियो
+find_reached_bottom=पृषà¥à¤ à¤•à¥‹ अनà¥à¤¤à¥à¤¯à¤®à¤¾ पà¥à¤—ीयो, शिरà¥à¤·à¤¬à¤¾à¤Ÿ जारी गरिà¤à¤•à¥‹ थियो
+find_not_found=वाकà¥à¤¯à¤¾à¤‚श फेला परेन
+
+# Error panel labels
+error_more_info=थप जानकारी
+error_less_info=कम जानकारी
+error_close=बनà¥à¤¦ गरà¥à¤¨à¥à¤¹à¥‹à¤¸à¥
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=सनà¥à¤¦à¥‡à¤¶: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=सà¥à¤Ÿà¥à¤¯à¤¾à¤•: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=फाइल: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=लाइन: {{line}}
+rendering_error=पृषà¥à¤  पà¥à¤°à¤¤à¤¿à¤ªà¤¾à¤¦à¤¨ गरà¥à¤¦à¤¾ à¤à¤‰à¤Ÿà¤¾ तà¥à¤°à¥à¤Ÿà¤¿ देखापरà¥â€à¤¯à¥‹à¥¤
+
+# Predefined zoom values
+page_scale_width=पृषà¥à¤  चौडाइ
+page_scale_fit=पृषà¥à¤  ठिकà¥à¤• मिलà¥à¤¨à¥‡
+page_scale_auto=सà¥à¤µà¤šà¤¾à¤²à¤¿à¤¤ जà¥à¤®
+page_scale_actual=वासà¥à¤¤à¤µà¤¿à¤• आकार
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=तà¥à¤°à¥à¤Ÿà¤¿
+loading_error=यो PDF लोड गरà¥à¤¦à¤¾ à¤à¤‰à¤Ÿà¤¾ तà¥à¤°à¥à¤Ÿà¤¿ देखापरà¥â€à¤¯à¥‹à¥¤
+invalid_file_error=अवैध वा दà¥à¤·à¤¿à¤¤ PDF फाइल।
+missing_file_error=हराईरहेको PDF फाइल।
+unexpected_response_error=अपà¥à¤°à¤¤à¥à¤¯à¤¾à¤¶à¤¿à¤¤ सरà¥à¤­à¤° पà¥à¤°à¤¤à¤¿à¤•à¥à¤°à¤¿à¤¯à¤¾à¥¤
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Annotation]
+password_label=यस PDF फाइललाई खोलà¥à¤¨ गोपà¥à¤¯à¤¶à¤¬à¥à¤¦ पà¥à¤°à¤µà¤¿à¤·à¥à¤Ÿ गरà¥à¤¨à¥à¤¹à¥‹à¤¸à¥à¥¤
+password_invalid=अवैध गोपà¥à¤¯à¤¶à¤¬à¥à¤¦à¥¤ पà¥à¤¨à¤ƒ पà¥à¤°à¤¯à¤¾à¤¸ गरà¥à¤¨à¥à¤¹à¥‹à¤¸à¥à¥¤
+password_ok=ठिक छ
+password_cancel=रदà¥à¤¦ गरà¥à¤¨à¥à¤¹à¥‹à¤¸à¥
+
+printing_not_supported=चेतावनी: यो बà¥à¤°à¤¾à¤‰à¤œà¤°à¤®à¤¾ मà¥à¤¦à¥à¤°à¤£ पूरà¥à¤£à¤¤à¤¯à¤¾ समरà¥à¤¥à¤¿à¤¤ छैन।
+printing_not_ready=चेतावनी: PDF मà¥à¤¦à¥à¤°à¤£à¤•à¤¾ लागि पूरà¥à¤£à¤¤à¤¯à¤¾ लोड भà¤à¤•à¥‹ छैन।
+web_fonts_disabled=वेब फनà¥à¤Ÿ असकà¥à¤·à¤® छनà¥: à¤à¤®à¥à¤¬à¥‡à¤¡à¥‡à¤¡ PDF फनà¥à¤Ÿ पà¥à¤°à¤¯à¥‹à¤— गरà¥à¤¨ असमरà¥à¤¥à¥¤
+document_colors_not_allowed=PDF कागजातहरूलाई आफà¥à¤¨à¥ˆ रङ पà¥à¤°à¤¯à¥‹à¤— गरà¥à¤¨ अनà¥à¤®à¤¤à¤¿ छैन: 'पृषà¥à¤ à¤²à¤¾à¤ˆ आफà¥à¤¨à¥ˆ रङ चयन गरà¥à¤¨ अनà¥à¤®à¤¤à¤¿ दिने' बà¥à¤°à¤¾à¤‰à¤œà¤°à¤®à¤¾ निषà¥à¤•à¥à¤°à¤¿à¤¯ गरिà¤à¤•à¥‹ छ।
diff --git a/js/pdfjs/web/locale/nl/viewer.properties b/js/pdfjs/web/locale/nl/viewer.properties
new file mode 100644
index 0000000..af8fb68
--- /dev/null
+++ b/js/pdfjs/web/locale/nl/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Vorige pagina
+previous_label=Vorige
+next.title=Volgende pagina
+next_label=Volgende
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Pagina
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=van {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} van {{pagesCount}})
+
+zoom_out.title=Uitzoomen
+zoom_out_label=Uitzoomen
+zoom_in.title=Inzoomen
+zoom_in_label=Inzoomen
+zoom.title=Zoomen
+presentation_mode.title=Wisselen naar presentatiemodus
+presentation_mode_label=Presentatiemodus
+open_file.title=Bestand openen
+open_file_label=Openen
+print.title=Afdrukken
+print_label=Afdrukken
+download.title=Downloaden
+download_label=Downloaden
+bookmark.title=Huidige weergave (kopiëren of openen in nieuw venster)
+bookmark_label=Huidige weergave
+
+# Secondary toolbar and context menu
+tools.title=Hulpmiddelen
+tools_label=Hulpmiddelen
+first_page.title=Naar eerste pagina gaan
+first_page.label=Naar eerste pagina gaan
+first_page_label=Naar eerste pagina gaan
+last_page.title=Naar laatste pagina gaan
+last_page.label=Naar laatste pagina gaan
+last_page_label=Naar laatste pagina gaan
+page_rotate_cw.title=Rechtsom draaien
+page_rotate_cw.label=Rechtsom draaien
+page_rotate_cw_label=Rechtsom draaien
+page_rotate_ccw.title=Linksom draaien
+page_rotate_ccw.label=Linksom draaien
+page_rotate_ccw_label=Linksom draaien
+
+cursor_text_select_tool.title=Tekstselectiehulpmiddel inschakelen
+cursor_text_select_tool_label=Tekstselectiehulpmiddel
+cursor_hand_tool.title=Handhulpmiddel inschakelen
+cursor_hand_tool_label=Handhulpmiddel
+
+scroll_vertical.title=Verticaal scrollen gebruiken
+scroll_vertical_label=Verticaal scrollen
+scroll_horizontal.title=Horizontaal scrollen gebruiken
+scroll_horizontal_label=Horizontaal scrollen
+scroll_wrapped.title=Scrollen met terugloop gebruiken
+scroll_wrapped_label=Scrollen met terugloop
+
+spread_none.title=Dubbele pagina’s niet samenvoegen
+spread_none_label=Geen dubbele pagina’s
+spread_odd.title=Dubbele pagina’s samenvoegen vanaf oneven pagina’s
+spread_odd_label=Oneven dubbele pagina’s
+spread_even.title=Dubbele pagina’s samenvoegen vanaf even pagina’s
+spread_even_label=Even dubbele pagina’s
+
+# Document properties dialog box
+document_properties.title=Documenteigenschappen…
+document_properties_label=Documenteigenschappen…
+document_properties_file_name=Bestandsnaam:
+document_properties_file_size=Bestandsgrootte:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Titel:
+document_properties_author=Auteur:
+document_properties_subject=Onderwerp:
+document_properties_keywords=Trefwoorden:
+document_properties_creation_date=Aanmaakdatum:
+document_properties_modification_date=Wijzigingsdatum:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Maker:
+document_properties_producer=PDF-producent:
+document_properties_version=PDF-versie:
+document_properties_page_count=Aantal pagina’s:
+document_properties_page_size=Paginagrootte:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=staand
+document_properties_page_size_orientation_landscape=liggend
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Snelle webweergave:
+document_properties_linearized_yes=Ja
+document_properties_linearized_no=Nee
+document_properties_close=Sluiten
+
+print_progress_message=Document voorbereiden voor afdrukken…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Annuleren
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Zijbalk in-/uitschakelen
+toggle_sidebar_notification.title=Zijbalk in-/uitschakelen (document bevat overzicht/bijlagen)
+toggle_sidebar_label=Zijbalk in-/uitschakelen
+document_outline.title=Documentoverzicht tonen (dubbelklik om alle items uit/samen te vouwen)
+document_outline_label=Documentoverzicht
+attachments.title=Bijlagen tonen
+attachments_label=Bijlagen
+thumbs.title=Miniaturen tonen
+thumbs_label=Miniaturen
+findbar.title=Zoeken in document
+findbar_label=Zoeken
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Pagina {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Pagina {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniatuur van pagina {{page}}
+
+# Find panel button title and messages
+find_input.title=Zoeken
+find_input.placeholder=Zoeken in document…
+find_previous.title=De vorige overeenkomst van de tekst zoeken
+find_previous_label=Vorige
+find_next.title=De volgende overeenkomst van de tekst zoeken
+find_next_label=Volgende
+find_highlight=Alles markeren
+find_match_case_label=Hoofdlettergevoelig
+find_entire_word_label=Hele woorden
+find_reached_top=Bovenkant van document bereikt, doorgegaan vanaf onderkant
+find_reached_bottom=Onderkant van document bereikt, doorgegaan vanaf bovenkant
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} van {{total}} overeenkomst
+find_match_count[two]={{current}} van {{total}} overeenkomsten
+find_match_count[few]={{current}} van {{total}} overeenkomsten
+find_match_count[many]={{current}} van {{total}} overeenkomsten
+find_match_count[other]={{current}} van {{total}} overeenkomsten
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Meer dan {{limit}} overeenkomsten
+find_match_count_limit[one]=Meer dan {{limit}} overeenkomst
+find_match_count_limit[two]=Meer dan {{limit}} overeenkomsten
+find_match_count_limit[few]=Meer dan {{limit}} overeenkomsten
+find_match_count_limit[many]=Meer dan {{limit}} overeenkomsten
+find_match_count_limit[other]=Meer dan {{limit}} overeenkomsten
+find_not_found=Tekst niet gevonden
+
+# Error panel labels
+error_more_info=Meer informatie
+error_less_info=Minder informatie
+error_close=Sluiten
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Bericht: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stack: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Bestand: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Regel: {{line}}
+rendering_error=Er is een fout opgetreden bij het weergeven van de pagina.
+
+# Predefined zoom values
+page_scale_width=Paginabreedte
+page_scale_fit=Hele pagina
+page_scale_auto=Automatisch zoomen
+page_scale_actual=Werkelijke grootte
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Fout
+loading_error=Er is een fout opgetreden bij het laden van de PDF.
+invalid_file_error=Ongeldig of beschadigd PDF-bestand.
+missing_file_error=PDF-bestand ontbreekt.
+unexpected_response_error=Onverwacht serverantwoord.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}}-aantekening]
+password_label=Voer het wachtwoord in om dit PDF-bestand te openen.
+password_invalid=Ongeldig wachtwoord. Probeer het opnieuw.
+password_ok=OK
+password_cancel=Annuleren
+
+printing_not_supported=Waarschuwing: afdrukken wordt niet volledig ondersteund door deze browser.
+printing_not_ready=Waarschuwing: de PDF is niet volledig geladen voor afdrukken.
+web_fonts_disabled=Weblettertypen zijn uitgeschakeld: gebruik van ingebedde PDF-lettertypen is niet mogelijk.
+document_colors_not_allowed=PDF-documenten mogen hun eigen kleuren niet gebruiken: ‘Pagina’s toestaan om hun eigen kleuren te kiezen’ is uitgeschakeld in de browser.
diff --git a/js/pdfjs/web/locale/nn-NO/viewer.properties b/js/pdfjs/web/locale/nn-NO/viewer.properties
new file mode 100644
index 0000000..ad6de8f
--- /dev/null
+++ b/js/pdfjs/web/locale/nn-NO/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Føregåande side
+previous_label=Føregåande
+next.title=Neste side
+next_label=Neste
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Side
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=av {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} av {{pagesCount}})
+
+zoom_out.title=Zoom ut
+zoom_out_label=Zoom ut
+zoom_in.title=Zoom inn
+zoom_in_label=Zoom inn
+zoom.title=Zoom
+presentation_mode.title=Byt til presentasjonsmodus
+presentation_mode_label=Presentasjonsmodus
+open_file.title=Opne fil
+open_file_label=Opne
+print.title=Skriv ut
+print_label=Skriv ut
+download.title=Last ned
+download_label=Last ned
+bookmark.title=Gjeldande vising (kopier eller opne i nytt vindauge)
+bookmark_label=Gjeldande vising
+
+# Secondary toolbar and context menu
+tools.title=Verktøy
+tools_label=Verktøy
+first_page.title=Gå til første side
+first_page.label=Gå til første side
+first_page_label=Gå til første side
+last_page.title=GÃ¥ til siste side
+last_page.label=GÃ¥ til siste side
+last_page_label=GÃ¥ til siste side
+page_rotate_cw.title=Roter med klokka
+page_rotate_cw.label=Roter med klokka
+page_rotate_cw_label=Roter med klokka
+page_rotate_ccw.title=Roter mot klokka
+page_rotate_ccw.label=Roter mot klokka
+page_rotate_ccw_label=Roter mot klokka
+
+cursor_text_select_tool.title=Aktiver tekstmarkeringsverktøy
+cursor_text_select_tool_label=Tekstmarkeringsverktøy
+cursor_hand_tool.title=Aktiver handverktøy
+cursor_hand_tool_label=Handverktøy
+
+scroll_vertical.title=Bruk vertikal rulling
+scroll_vertical_label=Vertikal rulling
+scroll_horizontal.title=Bruk horisontal rulling
+scroll_horizontal_label=Horisontal rulling
+scroll_wrapped.title=Bruk fleirsiderulling
+scroll_wrapped_label=Fleirsiderulling
+
+spread_none.title=Vis enkeltsider
+spread_none_label=Enkeltside
+spread_odd.title=Vis oppslag med ulike sidenummer til venstre
+spread_odd_label=Oppslag med framside
+spread_even.title=Vis oppslag med like sidenummmer til venstre
+spread_even_label=Oppslag utan framside
+
+# Document properties dialog box
+document_properties.title=Dokumenteigenskapar…
+document_properties_label=Dokumenteigenskapar…
+document_properties_file_name=Filnamn:
+document_properties_file_size=Filstorleik:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Tittel:
+document_properties_author=Forfattar:
+document_properties_subject=Emne:
+document_properties_keywords=Stikkord:
+document_properties_creation_date=Dato oppretta:
+document_properties_modification_date=Dato endra:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Oppretta av:
+document_properties_producer=PDF-verktøy:
+document_properties_version=PDF-versjon:
+document_properties_page_count=Sidetal:
+document_properties_page_size=Sidestørrelse:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=ståande
+document_properties_page_size_orientation_landscape=liggande
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Brev
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Rask nettvising:
+document_properties_linearized_yes=Ja
+document_properties_linearized_no=Nei
+document_properties_close=Lat att
+
+print_progress_message=Førebur dokumentet for utskrift…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Avbryt
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Slå av/på sidestolpe
+toggle_sidebar_notification.title=Vis/gøym sidestolpen (dokumentet inneheld oversikt/vedlegg)
+toggle_sidebar_label=Slå av/på sidestolpe
+document_outline.title=Vis dokumentdisposisjonen (dobbelklikk for å utvide/gøyme alle elementa)
+document_outline_label=Dokumentdisposisjon
+attachments.title=Vis vedlegg
+attachments_label=Vedlegg
+thumbs.title=Vis miniatyrbilde
+thumbs_label=Miniatyrbilde
+findbar.title=Finn i dokumentet
+findbar_label=Finn
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Side {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Side {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniatyrbilde av side {{page}}
+
+# Find panel button title and messages
+find_input.title=Søk
+find_input.placeholder=Søk i dokument…
+find_previous.title=Finn førre førekomst av frasen
+find_previous_label=Førre
+find_next.title=Finn neste førekomst av frasen
+find_next_label=Neste
+find_highlight=Uthev alle
+find_match_case_label=Skil store/små bokstavar
+find_entire_word_label=Heile ord
+find_reached_top=Nådde toppen av dokumentet, fortset frå botnen
+find_reached_bottom=Nådde botnen av dokumentet, fortset frå toppen
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} av {{total}} treff
+find_match_count[two]={{current}} av {{total}} treff
+find_match_count[few]={{current}} av {{total}} treff
+find_match_count[many]={{current}} av {{total}} treff
+find_match_count[other]={{current}} av {{total}} treff
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Meir enn {{limit}} treff
+find_match_count_limit[one]=Meir enn {{limit}} treff
+find_match_count_limit[two]=Meir enn {{limit}} treff
+find_match_count_limit[few]=Meir enn {{limit}} treff
+find_match_count_limit[many]=Meir enn {{limit}} treff
+find_match_count_limit[other]=Meir enn {{limit}} treff
+find_not_found=Fann ikkje teksten
+
+# Error panel labels
+error_more_info=Meir info
+error_less_info=Mindre info
+error_close=Lat att
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (bygg: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Melding: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stakk: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Fil: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Linje: {{line}}
+rendering_error=Ein feil oppstod under vising av sida.
+
+# Predefined zoom values
+page_scale_width=Sidebreidde
+page_scale_fit=Tilpass til sida
+page_scale_auto=Automatisk skalering
+page_scale_actual=Verkeleg storleik
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Feil
+loading_error=Ein feil oppstod ved lasting av PDF.
+invalid_file_error=Ugyldig eller korrupt PDF-fil.
+missing_file_error=Manglande PDF-fil.
+unexpected_response_error=Uventa tenarrespons.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}} {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} annotasjon]
+password_label=Skriv inn passordet for å opne denne PDF-fila.
+password_invalid=Ugyldig passord. Prøv igjen.
+password_ok=OK
+password_cancel=Avbryt
+
+printing_not_supported=Åtvaring: Utskrift er ikkje fullstendig støtta av denne nettlesaren.
+printing_not_ready=Ã…tvaring: PDF ikkje fullstendig innlasta for utskrift.
+web_fonts_disabled=Web-skrifter er slått av: Kan ikkje bruke innbundne PDF-skrifter.
+document_colors_not_allowed=PDF-dokument kan ikkje bruke eigne fargar: «Tillat sider å velje eigne fargar» er deaktivert i nettlesaren.
diff --git a/js/pdfjs/web/locale/oc/viewer.properties b/js/pdfjs/web/locale/oc/viewer.properties
new file mode 100644
index 0000000..ebc7886
--- /dev/null
+++ b/js/pdfjs/web/locale/oc/viewer.properties
@@ -0,0 +1,247 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Pagina precedenta
+previous_label=Precedent
+next.title=Pagina seguenta
+next_label=Seguent
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Pagina
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=sus {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} sus {{pagesCount}})
+
+zoom_out.title=Zoom arrièr
+zoom_out_label=Zoom arrièr
+zoom_in.title=Zoom avant
+zoom_in_label=Zoom avant
+zoom.title=Zoom
+presentation_mode.title=Bascular en mòde presentacion
+presentation_mode_label=Mòde Presentacion
+open_file.title=Dobrir lo fichièr
+open_file_label=Dobrir
+print.title=Imprimir
+print_label=Imprimir
+download.title=Telecargar
+download_label=Telecargar
+bookmark.title=Afichatge corrent (copiar o dobrir dins una fenèstra novèla)
+bookmark_label=Afichatge actual
+
+# Secondary toolbar and context menu
+tools.title=Aisinas
+tools_label=Aisinas
+first_page.title=Anar a la primièra pagina
+first_page.label=Anar a la primièra pagina
+first_page_label=Anar a la primièra pagina
+last_page.title=Anar a la darrièra pagina
+last_page.label=Anar a la darrièra pagina
+last_page_label=Anar a la darrièra pagina
+page_rotate_cw.title=Rotacion orària
+page_rotate_cw.label=Rotacion orària
+page_rotate_cw_label=Rotacion orària
+page_rotate_ccw.title=Rotacion antiorària
+page_rotate_ccw.label=Rotacion antiorària
+page_rotate_ccw_label=Rotacion antiorària
+
+cursor_text_select_tool.title=Activar l'aisina de seleccion de tèxte
+cursor_text_select_tool_label=Aisina de seleccion de tèxte
+cursor_hand_tool.title=Activar l’aisina man
+cursor_hand_tool_label=Aisina man
+
+scroll_vertical.title=Utilizar lo desfilament vertical
+scroll_vertical_label=Desfilament vertical
+scroll_horizontal.title=Utilizar lo desfilament orizontal
+scroll_horizontal_label=Desfilament orizontal
+scroll_wrapped.title=Activar lo desfilament continú
+scroll_wrapped_label=Desfilament continú
+
+spread_none.title=Agropar pas las paginas doas a doas
+spread_none_label=Una sola pagina
+spread_odd.title=Mostrar doas paginas en començar per las paginas imparas a esquèrra
+spread_odd_label=Dobla pagina, impara a drecha
+spread_even.title=Mostrar doas paginas en començar per las paginas paras a esquèrra
+spread_even_label=Dobla pagina, para a drecha
+
+# Document properties dialog box
+document_properties.title=Proprietats del document…
+document_properties_label=Proprietats del document…
+document_properties_file_name=Nom del fichièr :
+document_properties_file_size=Talha del fichièr :
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} Ko ({{size_b}} octets)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} Mo ({{size_b}} octets)
+document_properties_title=Títol :
+document_properties_author=Autor :
+document_properties_subject=Subjècte :
+document_properties_keywords=Mots claus :
+document_properties_creation_date=Data de creacion :
+document_properties_modification_date=Data de modificacion :
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Creator :
+document_properties_producer=Aisina de conversion PDF :
+document_properties_version=Version PDF :
+document_properties_page_count=Nombre de paginas :
+document_properties_page_size=Talha de la pagina :
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=retrait
+document_properties_page_size_orientation_landscape=païsatge
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letra
+document_properties_page_size_name_legal=Document juridic
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Vista web rapida :
+document_properties_linearized_yes=Ã’c
+document_properties_linearized_no=Non
+document_properties_close=Tampar
+
+print_progress_message=Preparacion del document per l’impression…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Anullar
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Afichar/amagar lo panèl lateral
+toggle_sidebar_notification.title=Afichar/amagar lo panèl lateral (lo document conten esquèmas/pèças juntas)
+toggle_sidebar_label=Afichar/amagar lo panèl lateral
+document_outline.title=Mostrar los esquèmas del document (dobleclicar per espandre/reduire totes los elements)
+document_outline_label=Marcapaginas del document
+attachments.title=Visualizar las pèças juntas
+attachments_label=Pèças juntas
+thumbs.title=Afichar las vinhetas
+thumbs_label=Vinhetas
+findbar.title=Trobar dins lo document
+findbar_label=Recercar
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Pagina {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Pagina {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Vinheta de la pagina {{page}}
+
+# Find panel button title and messages
+find_input.title=Recercar
+find_input.placeholder=Cercar dins lo document…
+find_previous.title=Tròba l'ocurréncia precedenta de la frasa
+find_previous_label=Precedent
+find_next.title=Tròba l'ocurréncia venenta de la frasa
+find_next_label=Seguent
+find_highlight=Suslinhar tot
+find_match_case_label=Respectar la cassa
+find_entire_word_label=Mots entièrs
+find_reached_top=Naut de la pagina atenh, perseguida del bas
+find_reached_bottom=Bas de la pagina atench, perseguida al començament
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]=Occuréncia {{current}} sus {{total}}
+find_match_count[two]=Occuréncia {{current}} sus {{total}}
+find_match_count[few]=Occuréncia {{current}} sus {{total}}
+find_match_count[many]=Occuréncia {{current}} sus {{total}}
+find_match_count[other]=Occuréncia {{current}} sus {{total}}
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Mai de {{limit}} occuréncias
+find_match_count_limit[one]=Mai de {{limit}} occuréncia
+find_match_count_limit[two]=Mai de {{limit}} occuréncias
+find_match_count_limit[few]=Mai de {{limit}} occuréncias
+find_match_count_limit[many]=Mai de {{limit}} occuréncias
+find_match_count_limit[other]=Mai de {{limit}} occuréncias
+find_not_found=Frasa pas trobada
+
+# Error panel labels
+error_more_info=Mai de detalhs
+error_less_info=Mens d'informacions
+error_close=Tampar
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (identificant de compilacion : {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Messatge : {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Pila : {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Fichièr : {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Linha : {{line}}
+rendering_error=Una error s'es produita pendent l'afichatge de la pagina.
+
+# Predefined zoom values
+page_scale_width=Largor plena
+page_scale_fit=Pagina entièra
+page_scale_auto=Zoom automatic
+page_scale_actual=Talha vertadièra
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Error
+loading_error=Una error s'es produita pendent lo cargament del fichièr PDF.
+invalid_file_error=Fichièr PDF invalid o corromput.
+missing_file_error=Fichièr PDF mancant.
+unexpected_response_error=Responsa de servidor imprevista.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}} a {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Anotacion {{type}}]
+password_label=Picatz lo senhal per dobrir aqueste fichièr PDF.
+password_invalid=Senhal incorrècte. Tornatz ensajar.
+password_ok=D'acòrdi
+password_cancel=Anullar
+
+printing_not_supported=Atencion : l'impression es pas completament gerida per aqueste navegador.
+printing_not_ready=Atencion : lo PDF es pas entièrament cargat per lo poder imprimir.
+web_fonts_disabled=Las poliças web son desactivadas : impossible d'utilizar las poliças integradas al PDF.
+document_colors_not_allowed=Los documents PDF pòdon pas utilizar lors pròprias colors : « Autorizar las paginas web d'utilizar lors pròprias colors » es desactivat dins lo navegador.
diff --git a/js/pdfjs/web/locale/pa-IN/viewer.properties b/js/pdfjs/web/locale/pa-IN/viewer.properties
new file mode 100644
index 0000000..e1ccb65
--- /dev/null
+++ b/js/pdfjs/web/locale/pa-IN/viewer.properties
@@ -0,0 +1,246 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=ਪਿਛਲਾ ਸਫ਼ਾ
+previous_label=ਪਿੱਛੇ
+next.title=ਅਗਲਾ ਸਫ਼ਾ
+next_label=ਅੱਗੇ
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=ਸਫ਼ਾ
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages={{pagesCount}} ਵਿੱਚੋਂ
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages={{pagesCount}}) ਵਿੱਚੋਂ ({{pageNumber}}
+
+zoom_out.title=ਜ਼ੂਮ ਆਉਟ
+zoom_out_label=ਜ਼ੂਮ ਆਉਟ
+zoom_in.title=ਜ਼ੂਮ ਇਨ
+zoom_in_label=ਜ਼ੂਮ ਇਨ
+zoom.title=ਜ਼ੂਨ
+presentation_mode.title=ਪਰਿਜੈਂਟੇਸ਼ਨ ਮੋਡ ਵਿੱਚ ਜਾਓ
+presentation_mode_label=ਪਰਿਜੈਂਟੇਸ਼ਨ ਮੋਡ
+open_file.title=ਫਾਈਲ ਨੂੰ ਖੋਲà©à¨¹à©‹
+open_file_label=ਖੋਲà©à¨¹à©‹
+print.title=ਪਰਿੰਟ
+print_label=ਪਰਿੰਟ
+download.title=ਡਾਊਨਲੋਡ
+download_label=ਡਾਊਨਲੋਡ
+bookmark.title=ਮੌਜੂਦਾ à¨à¨²à¨• (ਨਵੀਂ ਵਿੰਡੋ ਵਿੱਚ ਕਾਪੀ ਕਰੋ ਜਾਂ ਖੋਲà©à¨¹à©‹)
+bookmark_label=ਮੌਜੂਦਾ à¨à¨²à¨•
+
+# Secondary toolbar and context menu
+tools.title=ਟੂਲ
+tools_label=ਟੂਲ
+first_page.title=ਪਹਿਲੇ ਸਫ਼ੇ ਉੱਤੇ ਜਾਓ
+first_page.label=ਪਹਿਲੇ ਸਫ਼ੇ ਉੱਤੇ ਜਾਓ
+first_page_label=ਪਹਿਲੇ ਸਫ਼ੇ ਉੱਤੇ ਜਾਓ
+last_page.title=ਆਖਰੀ ਸਫ਼ੇ ਉੱਤੇ ਜਾਓ
+last_page.label=ਆਖਰੀ ਸਫ਼ੇ ਉੱਤੇ ਜਾਓ
+last_page_label=ਆਖਰੀ ਸਫ਼ੇ ਉੱਤੇ ਜਾਓ
+page_rotate_cw.title=ਸੱਜੇ ਦਾਅ ਘà©à©°à¨®à¨¾à¨“
+page_rotate_cw.label=ਸੱਜੇ ਦਾਅ ਘà©à©°à¨®à¨¾à¨‰
+page_rotate_cw_label=ਸੱਜੇ ਦਾਅ ਘà©à©°à¨®à¨¾à¨“
+page_rotate_ccw.title=ਖੱਬੇ ਦਾਅ ਘà©à©°à¨®à¨¾à¨“
+page_rotate_ccw.label=ਖੱਬੇ ਦਾਅ ਘà©à©°à¨®à¨¾à¨‰
+page_rotate_ccw_label=ਖੱਬੇ ਦਾਅ ਘà©à©°à¨®à¨¾à¨“
+
+cursor_text_select_tool.title=ਲਿਖਤ ਚੋਣ ਟੂਲ ਸਮਰੱਥ ਕਰੋ
+cursor_text_select_tool_label=ਲਿਖਤ ਚੋਣ ਟੂਲ
+cursor_hand_tool.title=ਹੱਥ ਟੂਲ ਸਮਰੱਥ ਕਰੋ
+cursor_hand_tool_label=ਹੱਥ ਟੂਲ
+
+scroll_vertical.title=ਖੜà©à¨¹à¨µà©‡à¨‚ ਸਕਰਾਉਣ ਨੂੰ ਵਰਤੋਂ
+scroll_vertical_label=ਖੜà©à¨¹à¨µà¨¾à¨‚ ਸਰਕਾਉਣਾ
+scroll_horizontal.title=ਲੇਟਵੇਂ ਸਰਕਾਉਣ ਨੂੰ ਵਰਤੋਂ
+scroll_horizontal_label=ਲੇਟਵਾਂ ਸਰਕਾਉਣਾ
+scroll_wrapped.title=ਸਮੇਟੇ ਸਰਕਾਉਣ ਨੂੰ ਵਰਤੋਂ
+scroll_wrapped_label=ਸਮੇਟਿਆ ਸਰਕਾਉਣਾ
+
+spread_none.title=ਸਫ਼ਾ ਫੈਲਾਅ ਵਿੱਚ ਸ਼ਾਮਲ ਨਾ ਹੋਵੋ
+spread_none_label=ਕੋਈ ਫੈਲਾਅ ਨਹੀਂ
+spread_odd.title=ਅਜੀਬ-ਨੰਬਰ ਵਾਲੇ ਪੰਨਿਆਂ ਨਾਲ ਸ਼à©à¨°à©‚ ਹੋਣ ਵਾਲੇ ਪੰਨੇ ਸਪਰਸ਼ਾਂ ਵਿੱਚ ਸ਼ਾਮਲ ਹੋਵੋ
+spread_even.title=ਜਿਸਤ ਨੰਬਰ ਵਾਲੇ ਸਫ਼ਿਆਂ ਨਾਲ ਸ਼à©à¨°à©‚ ਹੋਣ ਵਾਲੇ ਸਫਿਆਂ ਵਿੱਚ ਸ਼ਾਮਲ ਹੋਵੋ
+
+# Document properties dialog box
+document_properties.title=…ਦਸਤਾਵੇਜ਼ ਦੀ ਵਿਸ਼ੇਸ਼ਤਾ
+document_properties_label=…ਦਸਤਾਵੇਜ਼ ਦੀ ਵਿਸ਼ੇਸ਼ਤਾ
+document_properties_file_name=ਫਾਈਲ ਦਾ ਨਾਂ:
+document_properties_file_size=ਫਾਈਲ ਦਾ ਆਕਾਰ:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} ਬਾਈਟ)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} ਬਾਈਟ)
+document_properties_title=ਟਾਈਟਲ:
+document_properties_author=ਲੇਖਕ:
+document_properties_subject=ਵਿਸ਼ਾ:
+document_properties_keywords=ਸ਼ਬਦ:
+document_properties_creation_date=ਬਣਾਉਣ ਦੀ ਮਿਤੀ:
+document_properties_modification_date=ਸੋਧ ਦੀ ਮਿਤੀ:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=ਨਿਰਮਾਤਾ:
+document_properties_producer=PDF ਪà©à¨°à©‹à¨¡à¨¿à¨Šà¨¸à¨°:
+document_properties_version=PDF ਵਰਜਨ:
+document_properties_page_count=ਸਫ਼ੇ ਦੀ ਗਿਣਤੀ:
+document_properties_page_size=ਸਫ਼ਾ ਆਕਾਰ:
+document_properties_page_size_unit_inches=ਇੰਚ
+document_properties_page_size_unit_millimeters=ਮਿਮੀ
+document_properties_page_size_orientation_portrait=ਪੋਰਟਰੇਟ
+document_properties_page_size_orientation_landscape=ਲੈਂਡਸਕੇਪ
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=ਲੈਟਰ
+document_properties_page_size_name_legal=ਕਨੂੰਨੀ
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=ਤੇਜ਼ ਵੈੱਬ à¨à¨²à¨•:
+document_properties_linearized_yes=ਹਾਂ
+document_properties_linearized_no=ਨਹੀਂ
+document_properties_close=ਬੰਦ ਕਰੋ
+
+print_progress_message=…ਪਰਿੰਟ ਕਰਨ ਲਈ ਦਸਤਾਵੇਜ਼ ਨੂੰ ਤਿਆਰ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=ਰੱਦ ਕਰੋ
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=ਬਾਹੀ ਬਦਲੋ
+toggle_sidebar_notification.title=ਬਾਹੀ ਨੂੰ ਬਦਲੋ (ਦਸਤਾਵੇਜ਼ ਖਾਕਾ/ਅਟੈਚਮੈਂਟਾਂ ਰੱਖਦਾ ਹੈ)
+toggle_sidebar_label=ਬਾਹੀ ਬਦਲੋ
+document_outline.title=ਦਸਤਾਵੇਜ਼ ਖਾਕਾ ਦਿਖਾਓ (ਸਾਰੀਆਂ ਆਈਟਮਾਂ ਨੂੰ ਫੈਲਾਉਣ/ਸਮੇਟਣ ਲਈ ਦੋ ਵਾਰ ਕਲਿੱਕ ਕਰੋ)
+document_outline_label=ਦਸਤਾਵੇਜ਼ ਖਾਕਾ
+attachments.title=ਅਟੈਚਮੈਂਟ ਵੇਖਾਓ
+attachments_label=ਅਟੈਚਮੈਂਟਾਂ
+thumbs.title=ਥੰਮਨੇਲ ਨੂੰ ਵੇਖਾਓ
+thumbs_label=ਥੰਮਨੇਲ
+findbar.title=ਦਸਤਾਵੇਜ਼ ਵਿੱਚ ਲੱਭੋ
+findbar_label=ਲੱਭੋ
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=ਸਫ਼ਾ {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=ਸਫ਼ਾ {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas={{page}} ਸਫ਼ੇ ਦਾ ਥੰਮਨੇਲ
+
+# Find panel button title and messages
+find_input.title=ਲੱਭੋ
+find_input.placeholder=…ਦਸਤਾਵੇਜ਼ 'ਚ ਲੱਭੋ
+find_previous.title=ਵਾਕ ਦੀ ਪਿਛਲੀ ਮੌਜੂਦਗੀ ਲੱਭੋ
+find_previous_label=ਪਿੱਛੇ
+find_next.title=ਵਾਕ ਦੀ ਅਗਲੀ ਮੌਜੂਦਗੀ ਲੱਭੋ
+find_next_label=ਅੱਗੇ
+find_highlight=ਸਭ ਉਭਾਰੋ
+find_match_case_label=ਅੱਖਰ ਆਕਾਰ ਨੂੰ ਮਿਲਾਉ
+find_entire_word_label=ਪੂਰੇ ਸ਼ਬਦ
+find_reached_top=ਦਸਤਾਵੇਜ਼ ਦੇ ਉੱਤੇ ਆ ਗਠਹਾਂ, ਥੱਲੇ ਤੋਂ ਜਾਰੀ ਰੱਖਿਆ ਹੈ
+find_reached_bottom=ਦਸਤਾਵੇਜ਼ ਦੇ ਅੰਤ ਉੱਤੇ ਆ ਗਠਹਾਂ, ਉੱਤੇ ਤੋਂ ਜਾਰੀ ਰੱਖਿਆ ਹੈ
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{total}} ਵਿੱਚੋਂ {{current}} ਮੇਲ
+find_match_count[two]={{total}} ਵਿੱਚੋਂ {{current}} ਮੇਲ
+find_match_count[few]={{total}} ਵਿੱਚੋਂ {{current}} ਮੇਲ
+find_match_count[many]={{total}} ਵਿੱਚੋਂ {{current}} ਮੇਲ
+find_match_count[other]={{total}} ਵਿੱਚੋਂ {{current}} ਮੇਲ
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]={{limit}} ਮੇਲਾਂ ਤੋਂ ਵੱਧ
+find_match_count_limit[one]={{limit}} ਮੇਲ ਤੋਂ ਵੱਧ
+find_match_count_limit[two]={{limit}} ਮੇਲਾਂ ਤੋਂ ਵੱਧ
+find_match_count_limit[few]={{limit}} ਮੇਲਾਂ ਤੋਂ ਵੱਧ
+find_match_count_limit[many]={{limit}} ਮੇਲਾਂ ਤੋਂ ਵੱਧ
+find_match_count_limit[other]={{limit}} ਮੇਲਾਂ ਤੋਂ ਵੱਧ
+find_not_found=ਵਾਕ ਨਹੀਂ ਲੱਭਿਆ
+
+# Error panel labels
+error_more_info=ਹੋਰ ਜਾਣਕਾਰੀ
+error_less_info=ਘੱਟ ਜਾਣਕਾਰੀ
+error_close=ਬੰਦ ਕਰੋ
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (ਬਿਲਡ: {{build}}
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=ਸà©à¨¨à©‡à¨¹à¨¾: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=ਸਟੈਕ: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=ਫਾਈਲ: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=ਲਾਈਨ: {{line}}
+rendering_error=ਸਫ਼ਾ ਰੈਡਰ ਕਰਨ ਦੇ ਦੌਰਾਨ ਗਲਤੀ ਆਈ ਹੈ।
+
+# Predefined zoom values
+page_scale_width=ਸਫ਼ੇ ਦੀ ਚੌੜਾਈ
+page_scale_fit=ਸਫ਼ਾ ਫਿੱਟ
+page_scale_auto=ਆਟੋਮੈਟਿਕ ਜ਼ੂਮ ਕਰੋ
+page_scale_actual=ਆਟੋਮੈਟਿਕ ਆਕਾਰ
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=ਗਲਤੀ
+loading_error=PDF ਲੋਡ ਕਰਨ ਦੇ ਦੌਰਾਨ ਗਲਤੀ ਆਈ ਹੈ।
+invalid_file_error=ਗਲਤ ਜਾਂ ਨਿਕਾਰਾ PDF ਫਾਈਲ ਹੈ।
+missing_file_error=ਨਾ-ਮੌਜੂਦ PDF ਫਾਈਲ।
+unexpected_response_error=ਅਣਜਾਣ ਸਰਵਰ ਜਵਾਬ।
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} ਵਿਆਖਿਆ]
+password_label=ਇਹ PDF ਫਾਈਲ ਨੂੰ ਖੋਲà©à¨¹à¨£ ਲਈ ਪਾਸਵਰਡ ਦਿਉ।
+password_invalid=ਗਲਤ ਪਾਸਵਰਡ। ਫੇਰ ਕੋਸ਼ਿਸ਼ ਕਰੋ ਜੀ।
+password_ok=ਠੀਕ ਹੈ
+password_cancel=ਰੱਦ ਕਰੋ
+
+printing_not_supported=ਸਾਵਧਾਨ: ਇਹ ਬਰਾਊਜ਼ਰ ਪਰਿੰਟ ਕਰਨ ਲਈ ਪੂਰੀ ਤਰà©à¨¹à¨¾à¨‚ ਸਹਾਇਕ ਨਹੀਂ ਹੈ।
+printing_not_ready=ਸਾਵਧਾਨ: PDF ਨੂੰ ਪਰਿੰਟ ਕਰਨ ਲਈ ਪੂਰੀ ਤਰà©à¨¹à¨¾à¨‚ ਲੋਡ ਨਹੀਂ ਹੈ।
+web_fonts_disabled=ਵੈਬ ਫੋਂਟ ਬੰਦ ਹਨ: ਇੰਬੈਡ PDF ਫੋਂਟ ਨੂੰ ਵਰਤਣ ਲਈ ਅਸਮਰੱਥ ਹੈ।
+document_colors_not_allowed=PDF ਦਸਤਾਵੇਜ਼ਾਂ ਨੂੰ ਆਪਣੇ ਰੰਗ ਵਰਤਣ ਦੀ ਇਜ਼ਾਜ਼ਤ ਨਹੀਂ ਹੈ।: ਬਰਾਊਜ਼ਰ ਵਿੱਚ “ਸਫ਼ਿਆਂ ਨੂੰ ਆਪਣੇ ਰੰਗ ਚà©à¨£à¨¨ ਦੀ ਇਜ਼ਾਜ਼ਤ ਦਿਓ†ਨਾ-ਸਰਗਰਮ ਹੈ।
diff --git a/js/pdfjs/web/locale/pl/viewer.properties b/js/pdfjs/web/locale/pl/viewer.properties
new file mode 100644
index 0000000..c18ea5e
--- /dev/null
+++ b/js/pdfjs/web/locale/pl/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Poprzednia strona
+previous_label=Poprzednia
+next.title=Następna strona
+next_label=Następna
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Strona
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=z {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} z {{pagesCount}})
+
+zoom_out.title=Pomniejsz
+zoom_out_label=Pomniejsz
+zoom_in.title=Powiększ
+zoom_in_label=Powiększ
+zoom.title=Skala
+presentation_mode.title=Przełącz na tryb prezentacji
+presentation_mode_label=Tryb prezentacji
+open_file.title=Otwórz plik
+open_file_label=Otwórz
+print.title=Drukuj
+print_label=Drukuj
+download.title=Pobierz
+download_label=Pobierz
+bookmark.title=Bieżąca pozycja (skopiuj lub otwórz jako odnośnik w nowym oknie)
+bookmark_label=Bieżąca pozycja
+
+# Secondary toolbar and context menu
+tools.title=Narzędzia
+tools_label=Narzędzia
+first_page.title=Przejdź do pierwszej strony
+first_page.label=Przejdź do pierwszej strony
+first_page_label=Przejdź do pierwszej strony
+last_page.title=Przejdź do ostatniej strony
+last_page.label=Przejdź do ostatniej strony
+last_page_label=Przejdź do ostatniej strony
+page_rotate_cw.title=Obróć zgodnie z ruchem wskazówek zegara
+page_rotate_cw.label=Obróć zgodnie z ruchem wskazówek zegara
+page_rotate_cw_label=Obróć zgodnie z ruchem wskazówek zegara
+page_rotate_ccw.title=Obróć przeciwnie do ruchu wskazówek zegara
+page_rotate_ccw.label=Obróć przeciwnie do ruchu wskazówek zegara
+page_rotate_ccw_label=Obróć przeciwnie do ruchu wskazówek zegara
+
+cursor_text_select_tool.title=Włącz narzędzie zaznaczania tekstu
+cursor_text_select_tool_label=Narzędzie zaznaczania tekstu
+cursor_hand_tool.title=Włącz narzędzie rączka
+cursor_hand_tool_label=Narzędzie rączka
+
+scroll_vertical.title=Przewijaj dokument w pionie
+scroll_vertical_label=Przewijanie pionowe
+scroll_horizontal.title=Przewijaj dokument w poziomie
+scroll_horizontal_label=Przewijanie poziome
+scroll_wrapped.title=Strony dokumentu wyświetlaj i przewijaj w kolumnach
+scroll_wrapped_label=Widok dwóch stron
+
+spread_none.title=Nie ustawiaj stron obok siebie
+spread_none_label=Brak kolumn
+spread_odd.title=Strony nieparzyste ustawiaj na lewo od parzystych
+spread_odd_label=Nieparzyste po lewej
+spread_even.title=Strony parzyste ustawiaj na lewo od nieparzystych
+spread_even_label=Parzyste po lewej
+
+# Document properties dialog box
+document_properties.title=Właściwości dokumentu…
+document_properties_label=Właściwości dokumentu…
+document_properties_file_name=Nazwa pliku:
+document_properties_file_size=Rozmiar pliku:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} B)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} B)
+document_properties_title=Tytuł:
+document_properties_author=Autor:
+document_properties_subject=Temat:
+document_properties_keywords=SÅ‚owa kluczowe:
+document_properties_creation_date=Data utworzenia:
+document_properties_modification_date=Data modyfikacji:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Utworzony przez:
+document_properties_producer=PDF wyprodukowany przez:
+document_properties_version=Wersja PDF:
+document_properties_page_count=Liczba stron:
+document_properties_page_size=Wymiary strony:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=pionowa
+document_properties_page_size_orientation_landscape=pozioma
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=US Letter
+document_properties_page_size_name_legal=US Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}}×{{height}} {{unit}} (orientacja {{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}}×{{height}} {{unit}} ({{name}}, orientacja {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Szybki podgląd w Internecie:
+document_properties_linearized_yes=tak
+document_properties_linearized_no=nie
+document_properties_close=Zamknij
+
+print_progress_message=Przygotowywanie dokumentu do druku…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Anuluj
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Przełącz panel boczny
+toggle_sidebar_notification.title=Przełącz panel boczny (dokument zawiera konspekt/załączniki)
+toggle_sidebar_label=Przełącz panel boczny
+document_outline.title=Konspekt dokumentu (podwójne kliknięcie rozwija lub zwija wszystkie pozycje)
+document_outline_label=Konspekt dokumentu
+attachments.title=Załączniki
+attachments_label=Załączniki
+thumbs.title=Miniatury
+thumbs_label=Miniatury
+findbar.title=Znajdź w dokumencie
+findbar_label=Znajdź
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas={{page}}. strona
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title={{page}}. strona
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniatura {{page}}. strony
+
+# Find panel button title and messages
+find_input.title=Znajdź
+find_input.placeholder=Znajdź w dokumencie…
+find_previous.title=Znajdź poprzednie wystąpienie tekstu
+find_previous_label=Poprzednie
+find_next.title=Znajdź następne wystąpienie tekstu
+find_next_label=Następne
+find_highlight=Wyróżnianie wszystkich
+find_match_case_label=Rozróżnianie wielkości liter
+find_entire_word_label=Całe słowa
+find_reached_top=Początek dokumentu. Wyszukiwanie od końca.
+find_reached_bottom=Koniec dokumentu. Wyszukiwanie od poczÄ…tku.
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]=Pierwsze z {{total}} trafień
+find_match_count[two]=Drugie z {{total}} trafień
+find_match_count[few]={{current}}. z {{total}} trafień
+find_match_count[many]={{current}}. z {{total}} trafień
+find_match_count[other]={{current}}. z {{total}} trafień
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Brak trafień.
+find_match_count_limit[one]=Więcej niż jedno trafienie.
+find_match_count_limit[two]=Więcej niż dwa trafienia.
+find_match_count_limit[few]=Więcej niż {{limit}} trafienia.
+find_match_count_limit[many]=Więcej niż {{limit}} trafień.
+find_match_count_limit[other]=Więcej niż {{limit}} trafień.
+find_not_found=Nie znaleziono tekstu
+
+# Error panel labels
+error_more_info=Więcej informacji
+error_less_info=Mniej informacji
+error_close=Zamknij
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (kompilacja: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Komunikat: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stos: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Plik: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Wiersz: {{line}}
+rendering_error=Podczas renderowania strony wystąpił błąd.
+
+# Predefined zoom values
+page_scale_width=Szerokość strony
+page_scale_fit=Dopasowanie strony
+page_scale_auto=Skala automatyczna
+page_scale_actual=Rozmiar oryginalny
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=BÅ‚Ä…d
+loading_error=Podczas wczytywania dokumentu PDF wystąpił błąd.
+invalid_file_error=Nieprawidłowy lub uszkodzony plik PDF.
+missing_file_error=Brak pliku PDF.
+unexpected_response_error=Nieoczekiwana odpowiedź serwera.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Adnotacja: {{type}}]
+password_label=Wprowadź hasło, aby otworzyć ten dokument PDF.
+password_invalid=Nieprawidłowe hasło. Proszę spróbować ponownie.
+password_ok=OK
+password_cancel=Anuluj
+
+printing_not_supported=Ostrzeżenie: drukowanie nie jest w pełni obsługiwane przez tę przeglądarkę.
+printing_not_ready=Ostrzeżenie: dokument PDF nie jest całkowicie wczytany, więc nie można go wydrukować.
+web_fonts_disabled=Czcionki sieciowe są wyłączone: nie można użyć osadzonych czcionek PDF.
+document_colors_not_allowed=Dokumenty PDF nie mogą używać własnych kolorów: opcja „Pozwalaj stronom stosować inne kolory†w przeglądarce jest nieaktywna.
diff --git a/js/pdfjs/web/locale/pt-BR/viewer.properties b/js/pdfjs/web/locale/pt-BR/viewer.properties
new file mode 100644
index 0000000..5947d2d
--- /dev/null
+++ b/js/pdfjs/web/locale/pt-BR/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Página anterior
+previous_label=Anterior
+next.title=Próxima página
+next_label=Próxima
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Página
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=de {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} de {{pagesCount}})
+
+zoom_out.title=Reduzir
+zoom_out_label=Reduzir
+zoom_in.title=Ampliar
+zoom_in_label=Ampliar
+zoom.title=Zoom
+presentation_mode.title=Alternar para o modo de apresentação
+presentation_mode_label=Modo de apresentação
+open_file.title=Abrir arquivo
+open_file_label=Abrir
+print.title=Imprimir
+print_label=Imprimir
+download.title=Download
+download_label=Download
+bookmark.title=Visualização atual (copiar ou abrir em uma nova janela)
+bookmark_label=Visualização atual
+
+# Secondary toolbar and context menu
+tools.title=Ferramentas
+tools_label=Ferramentas
+first_page.title=Ir para a primeira página
+first_page.label=Ir para a primeira página
+first_page_label=Ir para a primeira página
+last_page.title=Ir para a última página
+last_page.label=Ir para a última página
+last_page_label=Ir para a última página
+page_rotate_cw.title=Girar no sentido horário
+page_rotate_cw.label=Girar no sentido horário
+page_rotate_cw_label=Girar no sentido horário
+page_rotate_ccw.title=Girar no sentido anti-horário
+page_rotate_ccw.label=Girar no sentido anti-horário
+page_rotate_ccw_label=Girar no sentido anti-horário
+
+cursor_text_select_tool.title=Ativar a ferramenta de seleção de texto
+cursor_text_select_tool_label=Ferramenta de seleção de texto
+cursor_hand_tool.title=Ativar ferramenta de mão
+cursor_hand_tool_label=Ferramenta de mão
+
+scroll_vertical.title=Usar rolagem vertical
+scroll_vertical_label=Rolagem vertical
+scroll_horizontal.title=Usar rolagem horizontal
+scroll_horizontal_label=Rolagem horizontal
+scroll_wrapped.title=Usar rolagem contida
+scroll_wrapped_label=Rolagem contida
+
+spread_none.title=Não reagrupar páginas
+spread_none_label=Não estender
+spread_odd.title=Agrupar páginas começando em páginas com números ímpares
+spread_odd_label=Estender ímpares
+spread_even.title=Agrupar páginas começando em páginas com números pares
+spread_even_label=Estender pares
+
+# Document properties dialog box
+document_properties.title=Propriedades do documento…
+document_properties_label=Propriedades do documento…
+document_properties_file_name=Nome do arquivo:
+document_properties_file_size=Tamanho do arquivo:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Título:
+document_properties_author=Autor:
+document_properties_subject=Assunto:
+document_properties_keywords=Palavras-chave:
+document_properties_creation_date=Data da criação:
+document_properties_modification_date=Data da modificação:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Criação:
+document_properties_producer=Criador do PDF:
+document_properties_version=Versão do PDF:
+document_properties_page_count=Número de páginas:
+document_properties_page_size=Tamanho da página:
+document_properties_page_size_unit_inches=pol.
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=retrato
+document_properties_page_size_orientation_landscape=paisagem
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Carta
+document_properties_page_size_name_legal=Jurídico
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Visualização rápida da Web:
+document_properties_linearized_yes=Sim
+document_properties_linearized_no=Não
+document_properties_close=Fechar
+
+print_progress_message=Preparando documento para impressão…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}} %
+print_progress_close=Cancelar
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Alternar painel
+toggle_sidebar_notification.title=Alternar o painel (documento contém marcadores e anexos)
+toggle_sidebar_label=Alternar painel
+document_outline.title=Mostrar a estrutura do documento (duplo-clique para expandir/recolher todos os ítens)
+document_outline_label=Estrutura do documento
+attachments.title=Mostrar anexos
+attachments_label=Anexos
+thumbs.title=Mostrar miniaturas
+thumbs_label=Miniaturas
+findbar.title=Procurar no documento
+findbar_label=Procurar
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Página {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Página {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniatura da página {{page}}
+
+# Find panel button title and messages
+find_input.title=Procurar
+find_input.placeholder=Procurar no documento…
+find_previous.title=Procurar a ocorrência anterior da frase
+find_previous_label=Anterior
+find_next.title=Procurar a próxima ocorrência da frase
+find_next_label=Próxima
+find_highlight=Realçar tudo
+find_match_case_label=Diferenciar maiúsculas/minúsculas
+find_entire_word_label=Palavras completas
+find_reached_top=Início do documento alcançado, continuando do fim
+find_reached_bottom=Fim do documento alcançado, continuando do início
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} de {{total}} ocorrência
+find_match_count[two]={{current}} de {{total}} ocorrências
+find_match_count[few]={{current}} de {{total}} ocorrências
+find_match_count[many]={{current}} de {{total}} ocorrências
+find_match_count[other]={{current}} de {{total}} ocorrências
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Mais de {{limit}} ocorrências
+find_match_count_limit[one]=Mais de {{limit}} ocorrência
+find_match_count_limit[two]=Mais de {{limit}} ocorrências
+find_match_count_limit[few]=Mais de {{limit}} ocorrências
+find_match_count_limit[many]=Mais de {{limit}} ocorrências
+find_match_count_limit[other]=Mais de {{limit}} ocorrências
+find_not_found=Frase não encontrada
+
+# Error panel labels
+error_more_info=Mais informações
+error_less_info=Menos informações
+error_close=Fechar
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (compilação: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Mensagem: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Pilha: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Arquivo: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Linha: {{line}}
+rendering_error=Ocorreu um erro ao renderizar a página.
+
+# Predefined zoom values
+page_scale_width=Largura da página
+page_scale_fit=Ajustar à janela
+page_scale_auto=Zoom automático
+page_scale_actual=Tamanho real
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Erro
+loading_error=Ocorreu um erro ao carregar o PDF.
+invalid_file_error=Arquivo PDF corrompido ou inválido.
+missing_file_error=Arquivo PDF ausente.
+unexpected_response_error=Resposta inesperada do servidor.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Anotação {{type}}]
+password_label=Forneça a senha para abrir este arquivo PDF.
+password_invalid=Senha inválida. Tente novamente.
+password_ok=OK
+password_cancel=Cancelar
+
+printing_not_supported=Aviso: a impressão não é totalmente suportada neste navegador.
+printing_not_ready=Aviso: o PDF não está totalmente carregado para impressão.
+web_fonts_disabled=As fontes web estão desativadas: não foi possível usar fontes incorporadas do PDF.
+document_colors_not_allowed=Documentos PDF não estão autorizados a usar as próprias cores: a opção “Permitir que as páginas escolham suas próprias cores†está desativada no navegador.
diff --git a/js/pdfjs/web/locale/pt-PT/viewer.properties b/js/pdfjs/web/locale/pt-PT/viewer.properties
new file mode 100644
index 0000000..5129a52
--- /dev/null
+++ b/js/pdfjs/web/locale/pt-PT/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Página anterior
+previous_label=Anterior
+next.title=Página seguinte
+next_label=Seguinte
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Página
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=de {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} de {{pagesCount}})
+
+zoom_out.title=Reduzir
+zoom_out_label=Reduzir
+zoom_in.title=Ampliar
+zoom_in_label=Ampliar
+zoom.title=Zoom
+presentation_mode.title=Trocar para o modo de apresentação
+presentation_mode_label=Modo de apresentação
+open_file.title=Abrir ficheiro
+open_file_label=Abrir
+print.title=Imprimir
+print_label=Imprimir
+download.title=Transferir
+download_label=Transferir
+bookmark.title=Vista atual (copiar ou abrir numa nova janela)
+bookmark_label=Visão atual
+
+# Secondary toolbar and context menu
+tools.title=Ferramentas
+tools_label=Ferramentas
+first_page.title=Ir para a primeira página
+first_page.label=Ir para a primeira página
+first_page_label=Ir para a primeira página
+last_page.title=Ir para a última página
+last_page.label=Ir para a última página
+last_page_label=Ir para a última página
+page_rotate_cw.title=Rodar à direita
+page_rotate_cw.label=Rodar à direita
+page_rotate_cw_label=Rodar à direita
+page_rotate_ccw.title=Rodar à esquerda
+page_rotate_ccw.label=Rodar à esquerda
+page_rotate_ccw_label=Rodar à esquerda
+
+cursor_text_select_tool.title=Ativar ferramenta de seleção de texto
+cursor_text_select_tool_label=Ferramenta de seleção de texto
+cursor_hand_tool.title=Ativar ferramenta de mão
+cursor_hand_tool_label=Ferramenta de mão
+
+scroll_vertical.title=Utilizar deslocação vertical
+scroll_vertical_label=Deslocação vertical
+scroll_horizontal.title=Utilizar deslocação horizontal
+scroll_horizontal_label=Deslocação horizontal
+scroll_wrapped.title=Utilizar deslocação encapsulada
+scroll_wrapped_label=Deslocação encapsulada
+
+spread_none.title=Não juntar páginas dispersas
+spread_none_label=Sem spreads
+spread_odd.title=Juntar páginas dispersas a partir de páginas com números ímpares
+spread_odd_label=Spreads ímpares
+spread_even.title=Juntar páginas dispersas a partir de páginas com números pares
+spread_even_label=Spreads pares
+
+# Document properties dialog box
+document_properties.title=Propriedades do documento…
+document_properties_label=Propriedades do documento…
+document_properties_file_name=Nome do ficheiro:
+document_properties_file_size=Tamanho do ficheiro:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Título:
+document_properties_author=Autor:
+document_properties_subject=Assunto:
+document_properties_keywords=Palavras-chave:
+document_properties_creation_date=Data de criação:
+document_properties_modification_date=Data de modificação:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Criador:
+document_properties_producer=Produtor de PDF:
+document_properties_version=Versão do PDF:
+document_properties_page_count=N.º de páginas:
+document_properties_page_size=Tamanho da página:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=retrato
+document_properties_page_size_orientation_landscape=paisagem
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Carta
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Vista rápida web:
+document_properties_linearized_yes=Sim
+document_properties_linearized_no=Não
+document_properties_close=Fechar
+
+print_progress_message=A preparar o documento para impressão…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Cancelar
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Alternar barra lateral
+toggle_sidebar_notification.title=Alternar barra lateral (documento contém contorno/anexos)
+toggle_sidebar_label=Alternar barra lateral
+document_outline.title=Mostrar esquema do documento (duplo clique para expandir/colapsar todos os itens)
+document_outline_label=Esquema do documento
+attachments.title=Mostrar anexos
+attachments_label=Anexos
+thumbs.title=Mostrar miniaturas
+thumbs_label=Miniaturas
+findbar.title=Localizar em documento
+findbar_label=Localizar
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Página {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Página {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniatura da página {{page}}
+
+# Find panel button title and messages
+find_input.title=Localizar
+find_input.placeholder=Localizar em documento…
+find_previous.title=Localizar ocorrência anterior da frase
+find_previous_label=Anterior
+find_next.title=Localizar ocorrência seguinte da frase
+find_next_label=Seguinte
+find_highlight=Destacar tudo
+find_match_case_label=Correspondência
+find_entire_word_label=Palavras completas
+find_reached_top=Topo do documento atingido, a continuar a partir do fundo
+find_reached_bottom=Fim do documento atingido, a continuar a partir do topo
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} de {{total}} correspondência
+find_match_count[two]={{current}} de {{total}} correspondências
+find_match_count[few]={{current}} de {{total}} correspondências
+find_match_count[many]={{current}} de {{total}} correspondências
+find_match_count[other]={{current}} de {{total}} correspondências
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Mais de {{limit}} correspondências
+find_match_count_limit[one]=Mais de {{limit}} correspondência
+find_match_count_limit[two]=Mais de {{limit}} correspondências
+find_match_count_limit[few]=Mais de {{limit}} correspondências
+find_match_count_limit[many]=Mais de {{limit}} correspondências
+find_match_count_limit[other]=Mais de {{limit}} correspondências
+find_not_found=Frase não encontrada
+
+# Error panel labels
+error_more_info=Mais informação
+error_less_info=Menos informação
+error_close=Fechar
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (compilação: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Mensagem: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stack: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Ficheiro: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Linha: {{line}}
+rendering_error=Ocorreu um erro ao processar a página.
+
+# Predefined zoom values
+page_scale_width=Ajustar à largura
+page_scale_fit=Ajustar à página
+page_scale_auto=Zoom automático
+page_scale_actual=Tamanho real
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Erro
+loading_error=Ocorreu um erro ao carregar o PDF.
+invalid_file_error=Ficheiro PDF inválido ou danificado.
+missing_file_error=Ficheiro PDF inexistente.
+unexpected_response_error=Resposta inesperada do servidor.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Anotação {{type}}]
+password_label=Introduza a palavra-passe para abrir este ficheiro PDF.
+password_invalid=Palavra-passe inválida. Por favor, tente novamente.
+password_ok=OK
+password_cancel=Cancelar
+
+printing_not_supported=Aviso: a impressão não é totalmente suportada por este navegador.
+printing_not_ready=Aviso: o PDF ainda não está totalmente carregado.
+web_fonts_disabled=Os tipos de letra web estão desativados: não é possível utilizar os tipos de letra PDF embutidos.
+document_colors_not_allowed=Os documentos PDF não permitem a utilização das suas próprias cores: “Permitir às páginas escolher as suas próprias cores†está desativado no navegador.
diff --git a/js/pdfjs/web/locale/rm/viewer.properties b/js/pdfjs/web/locale/rm/viewer.properties
new file mode 100644
index 0000000..99aca5c
--- /dev/null
+++ b/js/pdfjs/web/locale/rm/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Pagina precedenta
+previous_label=Enavos
+next.title=Proxima pagina
+next_label=Enavant
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Pagina
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=da {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} da {{pagesCount}})
+
+zoom_out.title=Empitschnir
+zoom_out_label=Empitschnir
+zoom_in.title=Engrondir
+zoom_in_label=Engrondir
+zoom.title=Zoom
+presentation_mode.title=Midar en il modus da preschentaziun
+presentation_mode_label=Modus da preschentaziun
+open_file.title=Avrir datoteca
+open_file_label=Avrir
+print.title=Stampar
+print_label=Stampar
+download.title=Telechargiar
+download_label=Telechargiar
+bookmark.title=Vista actuala (copiar u avrir en ina nova fanestra)
+bookmark_label=Vista actuala
+
+# Secondary toolbar and context menu
+tools.title=Utensils
+tools_label=Utensils
+first_page.title=Siglir a l'emprima pagina
+first_page.label=Siglir a l'emprima pagina
+first_page_label=Siglir a l'emprima pagina
+last_page.title=Siglir a la davosa pagina
+last_page.label=Siglir a la davosa pagina
+last_page_label=Siglir a la davosa pagina
+page_rotate_cw.title=Rotar en direcziun da l'ura
+page_rotate_cw.label=Rotar en direcziun da l'ura
+page_rotate_cw_label=Rotar en direcziun da l'ura
+page_rotate_ccw.title=Rotar en direcziun cuntraria a l'ura
+page_rotate_ccw.label=Rotar en direcziun cuntraria a l'ura
+page_rotate_ccw_label=Rotar en direcziun cuntraria a l'ura
+
+cursor_text_select_tool.title=Activar l'utensil per selecziunar text
+cursor_text_select_tool_label=Utensil per selecziunar text
+cursor_hand_tool.title=Activar l'utensil da maun
+cursor_hand_tool_label=Utensil da maun
+
+scroll_vertical.title=Utilisar il defilar vertical
+scroll_vertical_label=Defilar vertical
+scroll_horizontal.title=Utilisar il defilar orizontal
+scroll_horizontal_label=Defilar orizontal
+scroll_wrapped.title=Utilisar il defilar en colonnas
+scroll_wrapped_label=Defilar en colonnas
+
+spread_none.title=Betg parallelisar las paginas
+spread_none_label=Betg parallel
+spread_odd.title=Parallelisar las paginas cun cumenzar cun paginas spèras
+spread_odd_label=Parallel spèr
+spread_even.title=Parallelisar las paginas cun cumenzar cun paginas pèras
+spread_even_label=Parallel pèr
+
+# Document properties dialog box
+document_properties.title=Caracteristicas dal document…
+document_properties_label=Caracteristicas dal document…
+document_properties_file_name=Num da la datoteca:
+document_properties_file_size=Grondezza da la datoteca:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Titel:
+document_properties_author=Autur:
+document_properties_subject=Tema:
+document_properties_keywords=Chavazzins:
+document_properties_creation_date=Data da creaziun:
+document_properties_modification_date=Data da modificaziun:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}} {{time}}
+document_properties_creator=Creà da:
+document_properties_producer=Creà il PDF cun:
+document_properties_version=Versiun da PDF:
+document_properties_page_count=Dumber da paginas:
+document_properties_page_size=Grondezza da la pagina:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=vertical
+document_properties_page_size_orientation_landscape=orizontal
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Fast Web View:
+document_properties_linearized_yes=Gea
+document_properties_linearized_no=Na
+document_properties_close=Serrar
+
+print_progress_message=Preparar il document per stampar…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Interrumper
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Activar/deactivar la trav laterala
+toggle_sidebar_notification.title=Activar/deactivar la trav laterala (structura dal document/agiuntas)
+toggle_sidebar_label=Activar/deactivar la trav laterala
+document_outline.title=Mussar la structura dal document (cliccar duas giadas per extender/cumprimer tut ils elements)
+document_outline_label=Structura dal document
+attachments.title=Mussar agiuntas
+attachments_label=Agiuntas
+thumbs.title=Mussar las miniaturas
+thumbs_label=Miniaturas
+findbar.title=Tschertgar en il document
+findbar_label=Tschertgar
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Pagina {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Pagina {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniatura da la pagina {{page}}
+
+# Find panel button title and messages
+find_input.title=Tschertgar
+find_input.placeholder=Tschertgar en il document…
+find_previous.title=Tschertgar la posiziun precedenta da l'expressiun
+find_previous_label=Enavos
+find_next.title=Tschertgar la proxima posiziun da l'expressiun
+find_next_label=Enavant
+find_highlight=Relevar tuts
+find_match_case_label=Resguardar maiusclas/minusclas
+find_entire_word_label=Pleds entirs
+find_reached_top=Il cumenzament dal document è cuntanschì, la tschertga cuntinuescha a la fin dal document
+find_reached_bottom=La fin dal document è cuntanschì, la tschertga cuntinuescha al cumenzament dal document
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} dad {{total}} correspundenza
+find_match_count[two]={{current}} da {{total}} correspundenzas
+find_match_count[few]={{current}} da {{total}} correspundenzas
+find_match_count[many]={{current}} da {{total}} correspundenzas
+find_match_count[other]={{current}} da {{total}} correspundenzas
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Dapli che {{limit}} correspundenzas
+find_match_count_limit[one]=Dapli che {{limit}} correspundenza
+find_match_count_limit[two]=Dapli che {{limit}} correspundenzas
+find_match_count_limit[few]=Dapli che {{limit}} correspundenzas
+find_match_count_limit[many]=Dapli che {{limit}} correspundenzas
+find_match_count_limit[other]=Dapli che {{limit}} correspundenzas
+find_not_found=Impussibel da chattar l'expressiun
+
+# Error panel labels
+error_more_info=Dapli infurmaziuns
+error_less_info=Damain infurmaziuns
+error_close=Serrar
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Messadi: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stack: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Datoteca: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Lingia: {{line}}
+rendering_error=Ina errur è cumparida cun visualisar questa pagina.
+
+# Predefined zoom values
+page_scale_width=Ladezza da la pagina
+page_scale_fit=Entira pagina
+page_scale_auto=Zoom automatic
+page_scale_actual=Grondezza actuala
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Errur
+loading_error=Ina errur è cumparida cun chargiar il PDF.
+invalid_file_error=Datoteca PDF nunvalida u donnegiada.
+missing_file_error=Datoteca PDF manconta.
+unexpected_response_error=Resposta nunspetgada dal server.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Annotaziun da {{type}}]
+password_label=Endatescha il pled-clav per avrir questa datoteca da PDF.
+password_invalid=Pled-clav nunvalid. Emprova anc ina giada.
+password_ok=OK
+password_cancel=Interrumper
+
+printing_not_supported=Attenziun: Il stampar na funcziunescha anc betg dal tut en quest navigatur.
+printing_not_ready=Attenziun: Il PDF n'è betg chargià cumplettamain per stampar.
+web_fonts_disabled=Scrittiras dal web èn deactivadas: impussibel dad utilisar las scrittiras integradas en il PDF.
+document_colors_not_allowed=Documents da PDF na dastgan betg duvrar las atgnas colurs: 'Permetter a paginas da tscherner lur atgna colur' è deactivà en il navigatur.
diff --git a/js/pdfjs/web/locale/ro/viewer.properties b/js/pdfjs/web/locale/ro/viewer.properties
new file mode 100644
index 0000000..8f10f7e
--- /dev/null
+++ b/js/pdfjs/web/locale/ro/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Pagina precedentă
+previous_label=ÃŽnapoi
+next.title=Pagina următoare
+next_label=ÃŽnainte
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Pagina
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=din {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} din {{pagesCount}})
+
+zoom_out.title=Micșorează
+zoom_out_label=Micșorează
+zoom_in.title=Mărește
+zoom_in_label=Mărește
+zoom.title=Zoom
+presentation_mode.title=Comută la modul de prezentare
+presentation_mode_label=Mod de prezentare
+open_file.title=Deschide un fișier
+open_file_label=Deschide
+print.title=Tipărește
+print_label=Tipărește
+download.title=Descarcă
+download_label=Descarcă
+bookmark.title=Vizualizare actuală (copiază sau deschide într-o fereastră nouă)
+bookmark_label=Vizualizare actuală
+
+# Secondary toolbar and context menu
+tools.title=Instrumente
+tools_label=Instrumente
+first_page.title=Mergi la prima pagină
+first_page.label=Mergi la prima pagină
+first_page_label=Mergi la prima pagină
+last_page.title=Mergi la ultima pagină
+last_page.label=Mergi la ultima pagină
+last_page_label=Mergi la ultima pagină
+page_rotate_cw.title=Rotește în sensul acelor de ceasornic
+page_rotate_cw.label=Rotește în sensul acelor de ceasornic
+page_rotate_cw_label=Rotește în sensul acelor de ceasornic
+page_rotate_ccw.title=Rotește în sens invers al acelor de ceasornic
+page_rotate_ccw.label=Rotește în sens invers al acelor de ceasornic
+page_rotate_ccw_label=Rotește în sens invers al acelor de ceasornic
+
+cursor_text_select_tool.title=Activează instrumentul de selecție a textului
+cursor_text_select_tool_label=Instrumentul de selecție a textului
+cursor_hand_tool.title=Activează instrumentul mână
+cursor_hand_tool_label=Unealta mână
+
+scroll_vertical.title=Folosește derularea verticală
+scroll_vertical_label=Derulare verticală
+scroll_horizontal.title=Folosește derularea orizontală
+scroll_horizontal_label=Derulare orizontală
+scroll_wrapped.title=Folosește derularea încadrată
+scroll_wrapped_label=Derulare încadrată
+
+spread_none.title=Nu uni paginile broșate
+spread_none_label=Fără pagini broșate
+spread_odd.title=Unește paginile broșate începând cu cele impare
+spread_odd_label=Broșare pagini impare
+spread_even.title=Unește paginile broșate începând cu cele pare
+spread_even_label=Broșare pagini pare
+
+# Document properties dialog box
+document_properties.title=Proprietățile documentului…
+document_properties_label=Proprietățile documentului…
+document_properties_file_name=Numele fișierului:
+document_properties_file_size=Mărimea fișierului:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} byți)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} byți)
+document_properties_title=Titlu:
+document_properties_author=Autor:
+document_properties_subject=Subiect:
+document_properties_keywords=Cuvinte cheie:
+document_properties_creation_date=Data creării:
+document_properties_modification_date=Data modificării:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Autor:
+document_properties_producer=Producător PDF:
+document_properties_version=Versiune PDF:
+document_properties_page_count=Număr de pagini:
+document_properties_page_size=Mărimea paginii:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=portret
+document_properties_page_size_orientation_landscape=peisaj
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Literă
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Vizualizare web rapidă:
+document_properties_linearized_yes=Da
+document_properties_linearized_no=Nu
+document_properties_close=ÃŽnchide
+
+print_progress_message=Se pregătește documentul pentru tipărire…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Renunță
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Comută bara laterală
+toggle_sidebar_notification.title=Comută bara laterală (documentul conține schițe/atașamente)
+toggle_sidebar_label=Comută bara laterală
+document_outline.title=Afișează schița documentului (dublu-clic pentru a extinde/restrânge toate elementele)
+document_outline_label=Schița documentului
+attachments.title=Afișează atașamentele
+attachments_label=Atașamente
+thumbs.title=Afișează miniaturi
+thumbs_label=Miniaturi
+findbar.title=Găsește în document
+findbar_label=Caută
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Pagina {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Pagina {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniatura paginii {{page}}
+
+# Find panel button title and messages
+find_input.title=Caută
+find_input.placeholder=Caută în document…
+find_previous.title=Găsește instanța anterioară în frază
+find_previous_label=Anterior
+find_next.title=Găsește instanța următoare în frază
+find_next_label=Următor
+find_highlight=Evidențiază toate aparițiile
+find_match_case_label=Corelează literele mari și mici
+find_entire_word_label=Cuvinte întregi
+find_reached_top=Am ajuns la începutul documentului, continuă de la sfârșit
+find_reached_bottom=Am ajuns la sfârșitul documentului, continuă de la început
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} din {{total}} rezultat
+find_match_count[two]={{current}} din {{total}} rezultate
+find_match_count[few]={{current}} din {{total}} rezultate
+find_match_count[many]={{current}} din {{total}} de rezultate
+find_match_count[other]={{current}} din {{total}} de rezultate
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Peste {{limit}} rezultate
+find_match_count_limit[one]=Peste {{limit}} rezultat
+find_match_count_limit[two]=Peste {{limit}} rezultate
+find_match_count_limit[few]=Peste {{limit}} rezultate
+find_match_count_limit[many]=Peste {{limit}} de rezultate
+find_match_count_limit[other]=Peste {{limit}} de rezultate
+find_not_found=Nu s-a găsit textul
+
+# Error panel labels
+error_more_info=Mai multe informații
+error_less_info=Mai puține informații
+error_close=ÃŽnchide
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (versiunea compilată: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Mesaj: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stivă: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Fișier: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Rând: {{line}}
+rendering_error=A intervenit o eroare la randarea paginii.
+
+# Predefined zoom values
+page_scale_width=Lățimea paginii
+page_scale_fit=Potrivire la pagină
+page_scale_auto=Zoom automat
+page_scale_actual=Mărime reală
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Eroare
+loading_error=A intervenit o eroare la încărcarea PDF-ului.
+invalid_file_error=Fișier PDF nevalid sau corupt.
+missing_file_error=Fișier PDF lipsă.
+unexpected_response_error=Răspuns neașteptat de la server.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Adnotare {{type}}]
+password_label=Introdu parola pentru a deschide acest fișier PDF.
+password_invalid=Parolă nevalidă. Te rugăm să încerci din nou.
+password_ok=Ok
+password_cancel=Renunță
+
+printing_not_supported=Avertisment: Tipărirea nu este suportată în totalitate de acest browser.
+printing_not_ready=Avertisment: PDF-ul nu este încărcat complet pentru tipărire.
+web_fonts_disabled=Fonturile web sunt dezactivate: nu se pot folosi fonturile PDF încorporate.
+document_colors_not_allowed=Documentele PDF nu sunt autorizate să folosească propriile culori: „Permite paginilor să aleagă propriile culori†este dezactivat în browser.
diff --git a/js/pdfjs/web/locale/ru/viewer.properties b/js/pdfjs/web/locale/ru/viewer.properties
new file mode 100644
index 0000000..bf417bc
--- /dev/null
+++ b/js/pdfjs/web/locale/ru/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=ÐŸÑ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰Ð°Ñ Ñтраница
+previous_label=ПредыдущаÑ
+next.title=Ð¡Ð»ÐµÐ´ÑƒÑŽÑ‰Ð°Ñ Ñтраница
+next_label=СледующаÑ
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Страница
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=из {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} из {{pagesCount}})
+
+zoom_out.title=Уменьшить
+zoom_out_label=Уменьшить
+zoom_in.title=Увеличить
+zoom_in_label=Увеличить
+zoom.title=МаÑштаб
+presentation_mode.title=Перейти в режим презентации
+presentation_mode_label=Режим презентации
+open_file.title=Открыть файл
+open_file_label=Открыть
+print.title=Печать
+print_label=Печать
+download.title=Загрузить
+download_label=Загрузить
+bookmark.title=СÑылка на текущий вид (Ñкопировать или открыть в новом окне)
+bookmark_label=Текущий вид
+
+# Secondary toolbar and context menu
+tools.title=ИнÑтрументы
+tools_label=ИнÑтрументы
+first_page.title=Перейти на первую Ñтраницу
+first_page.label=Перейти на первую Ñтраницу
+first_page_label=Перейти на первую Ñтраницу
+last_page.title=Перейти на поÑледнюю Ñтраницу
+last_page.label=Перейти на поÑледнюю Ñтраницу
+last_page_label=Перейти на поÑледнюю Ñтраницу
+page_rotate_cw.title=Повернуть по чаÑовой Ñтрелке
+page_rotate_cw.label=Повернуть по чаÑовой Ñтрелке
+page_rotate_cw_label=Повернуть по чаÑовой Ñтрелке
+page_rotate_ccw.title=Повернуть против чаÑовой Ñтрелки
+page_rotate_ccw.label=Повернуть против чаÑовой Ñтрелки
+page_rotate_ccw_label=Повернуть против чаÑовой Ñтрелки
+
+cursor_text_select_tool.title=Включить ИнÑтрумент «Выделение текÑта»
+cursor_text_select_tool_label=ИнÑтрумент «Выделение текÑта»
+cursor_hand_tool.title=Включить ИнÑтрумент «Рука»
+cursor_hand_tool_label=ИнÑтрумент «Рука»
+
+scroll_vertical.title=ИÑпользовать вертикальную прокрутку
+scroll_vertical_label=Ð’ÐµÑ€Ñ‚Ð¸ÐºÐ°Ð»ÑŒÐ½Ð°Ñ Ð¿Ñ€Ð¾ÐºÑ€ÑƒÑ‚ÐºÐ°
+scroll_horizontal.title=ИÑпользовать горизонтальную прокрутку
+scroll_horizontal_label=Ð“Ð¾Ñ€Ð¸Ð·Ð¾Ð½Ñ‚Ð°Ð»ÑŒÐ½Ð°Ñ Ð¿Ñ€Ð¾ÐºÑ€ÑƒÑ‚ÐºÐ°
+scroll_wrapped.title=ИÑпользовать маÑштабируемую прокрутку
+scroll_wrapped_label=МаÑÑˆÑ‚Ð°Ð±Ð¸Ñ€ÑƒÐµÐ¼Ð°Ñ Ð¿Ñ€Ð¾ÐºÑ€ÑƒÑ‚ÐºÐ°
+
+spread_none.title=Ðе иÑпользовать режим разворотов Ñтраниц
+spread_none_label=Без разворотов Ñтраниц
+spread_odd.title=Развороты начинаютÑÑ Ñ Ð½ÐµÑ‡Ñ‘Ñ‚Ð½Ñ‹Ñ… номеров Ñтраниц
+spread_odd_label=Ðечётные Ñтраницы Ñлева
+spread_even.title=Развороты начинаютÑÑ Ñ Ñ‡Ñ‘Ñ‚Ð½Ñ‹Ñ… номеров Ñтраниц
+spread_even_label=Чётные Ñтраницы Ñлева
+
+# Document properties dialog box
+document_properties.title=СвойÑтва документа…
+document_properties_label=СвойÑтва документа…
+document_properties_file_name=Ð˜Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°:
+document_properties_file_size=Размер файла:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} КБ ({{size_b}} байт)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} МБ ({{size_b}} байт)
+document_properties_title=Заголовок:
+document_properties_author=Ðвтор:
+document_properties_subject=Тема:
+document_properties_keywords=Ключевые Ñлова:
+document_properties_creation_date=Дата ÑозданиÑ:
+document_properties_modification_date=Дата изменениÑ:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Приложение:
+document_properties_producer=Производитель PDF:
+document_properties_version=ВерÑÐ¸Ñ PDF:
+document_properties_page_count=ЧиÑло Ñтраниц:
+document_properties_page_size=Размер Ñтраницы:
+document_properties_page_size_unit_inches=дюймов
+document_properties_page_size_unit_millimeters=мм
+document_properties_page_size_orientation_portrait=книжнаÑ
+document_properties_page_size_orientation_landscape=альбомнаÑ
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=БыÑтрый проÑмотр в Web:
+document_properties_linearized_yes=Да
+document_properties_linearized_no=Ðет
+document_properties_close=Закрыть
+
+print_progress_message=Подготовка документа к печати…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Отмена
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Показать/Ñкрыть боковую панель
+toggle_sidebar_notification.title=Показать/Ñкрыть боковую панель (документ имеет Ñодержание/вложениÑ)
+toggle_sidebar_label=Показать/Ñкрыть боковую панель
+document_outline.title=Показать Ñодержание документа (двойной щелчок, чтобы развернуть/Ñвернуть вÑе Ñлементы)
+document_outline_label=Содержание документа
+attachments.title=Показать вложениÑ
+attachments_label=ВложениÑ
+thumbs.title=Показать миниатюры
+thumbs_label=Миниатюры
+findbar.title=Ðайти в документе
+findbar_label=Ðайти
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Страница {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Страница {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Миниатюра Ñтраницы {{page}}
+
+# Find panel button title and messages
+find_input.title=Ðайти
+find_input.placeholder=Ðайти в документе…
+find_previous.title=Ðайти предыдущее вхождение фразы в текÑÑ‚
+find_previous_label=Ðазад
+find_next.title=Ðайти Ñледующее вхождение фразы в текÑÑ‚
+find_next_label=Далее
+find_highlight=ПодÑветить вÑе
+find_match_case_label=С учётом региÑтра
+find_entire_word_label=Слова целиком
+find_reached_top=ДоÑтигнут верх документа, продолжено Ñнизу
+find_reached_bottom=ДоÑтигнут конец документа, продолжено Ñверху
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} из {{total}} ÑовпадениÑ
+find_match_count[two]={{current}} из {{total}} Ñовпадений
+find_match_count[few]={{current}} из {{total}} Ñовпадений
+find_match_count[many]={{current}} из {{total}} Ñовпадений
+find_match_count[other]={{current}} из {{total}} Ñовпадений
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Более {{limit}} Ñовпадений
+find_match_count_limit[one]=Более {{limit}} ÑовпадениÑ
+find_match_count_limit[two]=Более {{limit}} Ñовпадений
+find_match_count_limit[few]=Более {{limit}} Ñовпадений
+find_match_count_limit[many]=Более {{limit}} Ñовпадений
+find_match_count_limit[other]=Более {{limit}} Ñовпадений
+find_not_found=Фраза не найдена
+
+# Error panel labels
+error_more_info=Детали
+error_less_info=Скрыть детали
+error_close=Закрыть
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (Ñборка: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Сообщение: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Стeк: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Файл: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Строка: {{line}}
+rendering_error=При Ñоздании Ñтраницы произошла ошибка.
+
+# Predefined zoom values
+page_scale_width=По ширине Ñтраницы
+page_scale_fit=По размеру Ñтраницы
+page_scale_auto=ÐвтоматичеÑки
+page_scale_actual=Реальный размер
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Ошибка
+loading_error=При загрузке PDF произошла ошибка.
+invalid_file_error=Ðекорректный или повреждённый PDF-файл.
+missing_file_error=PDF-файл отÑутÑтвует.
+unexpected_response_error=Ðеожиданный ответ Ñервера.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[ÐÐ½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ñ {{type}}]
+password_label=Введите пароль, чтобы открыть Ñтот PDF-файл.
+password_invalid=Ðеверный пароль. ПожалуйÑта, попробуйте Ñнова.
+password_ok=OK
+password_cancel=Отмена
+
+printing_not_supported=Предупреждение: Ð’ Ñтом браузере не полноÑтью поддерживаетÑÑ Ð¿ÐµÑ‡Ð°Ñ‚ÑŒ.
+printing_not_ready=Предупреждение: PDF не полноÑтью загружен Ð´Ð»Ñ Ð¿ÐµÑ‡Ð°Ñ‚Ð¸.
+web_fonts_disabled=Веб-шрифты отключены: невозможно иÑпользовать вÑтроенные PDF-шрифты.
+document_colors_not_allowed=PDF-документам не разрешено иÑпользовать Ñвои цвета: в браузере отключён параметр «Разрешить веб-Ñайтам иÑпользовать Ñвои цвета».
diff --git a/js/pdfjs/web/locale/scn/viewer.properties b/js/pdfjs/web/locale/scn/viewer.properties
new file mode 100644
index 0000000..e9a650a
--- /dev/null
+++ b/js/pdfjs/web/locale/scn/viewer.properties
@@ -0,0 +1,101 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+
+zoom_out.title=Cchiù nicu
+zoom_out_label=Cchiù nicu
+zoom_in.title=Cchiù granni
+zoom_in_label=Cchiù granni
+
+# Secondary toolbar and context menu
+
+
+
+
+# Document properties dialog box
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Vista web lesta:
+document_properties_linearized_yes=Se
+
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_close=Sfai
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+
+# Find panel button title and messages
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+
+# Error panel labels
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+
+# Predefined zoom values
+page_scale_width=Larghizza dâ pàggina
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+
+# Loading indicator messages
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+password_cancel=Sfai
+
diff --git a/js/pdfjs/web/locale/si/viewer.properties b/js/pdfjs/web/locale/si/viewer.properties
new file mode 100644
index 0000000..9a1d1e8
--- /dev/null
+++ b/js/pdfjs/web/locale/si/viewer.properties
@@ -0,0 +1,207 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=මීට පෙර පිටුව
+previous_label=පෙර
+next.title=මීළඟ පිටුව
+next_label=මීළඟ
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=පිටුව
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+
+zoom_out.title=කුඩ෠කරන්න
+zoom_out_label=කුඩ෠කරන්න
+zoom_in.title=විà·à·à¶½ කරන්න
+zoom_in_label=විà·à·à¶½ කරන්න
+zoom.title=විà·à·à¶½à¶«à¶º
+presentation_mode.title=ඉදිරිපත්කිරීම් ප්â€à¶»à¶šà·à¶»à¶º වෙත මà·à¶»à·”වන්න
+presentation_mode_label=ඉදිරිපත්කිරීම් ප්â€à¶»à¶šà·à¶»à¶º
+open_file.title=ගොනුව විවෘත කරන්න
+open_file_label=විවෘත කරන්න
+print.title=මුද්â€à¶»à¶«à¶º
+print_label=මුද්â€à¶»à¶«à¶º
+download.title=බà·à¶œà¶±à·Šà¶±
+download_label=බà·à¶œà¶±à·Šà¶±
+bookmark.title=දà·à¶±à¶§ ඇති දසුන (පිටපත් කරන්න හ෠නව කවුළුවක විවෘත කරන්න)
+bookmark_label=දà·à¶±à¶§ ඇති දසුන
+
+# Secondary toolbar and context menu
+tools.title=මෙවලම්
+tools_label=මෙවලම්
+first_page.title=මුල් පිටුවට යන්න
+first_page.label=මුල් පිටුවට යන්න
+first_page_label=මුල් පිටුවට යන්න
+last_page.title=අවසන් පිටුවට යන්න
+last_page.label=අවසන් පිටුවට යන්න
+last_page_label=අවසන් පිටුවට යන්න
+page_rotate_cw.title=දක්à·à·’ණà·à·€à¶»à·Šà¶­à·€ භ්â€à¶»à¶¸à¶«à¶º
+page_rotate_cw.label=දක්à·à·’ණà·à·€à¶»à·Šà¶­à·€ භ්â€à¶»à¶¸à¶«à¶º
+page_rotate_cw_label=දක්à·à·’ණà·à·€à¶»à·Šà¶­à·€ භ්â€à¶»à¶¸à¶«à¶º
+page_rotate_ccw.title=à·€à·à¶¸à·à·€à¶»à·Šà¶­à·€ භ්â€à¶»à¶¸à¶«à¶º
+page_rotate_ccw.label=à·€à·à¶¸à·à·€à¶»à·Šà¶­à·€ භ්â€à¶»à¶¸à¶«à¶º
+page_rotate_ccw_label=à·€à·à¶¸à·à·€à¶»à·Šà¶­à·€ භ්â€à¶»à¶¸à¶«à¶º
+
+cursor_hand_tool_label=අත් මෙවලම
+
+
+
+# Document properties dialog box
+document_properties.title=ලේඛන වත්කම්...
+document_properties_label=ලේඛන වත්කම්...
+document_properties_file_name=ගොනු නම:
+document_properties_file_size=ගොනු ප්â€à¶»à¶¸à·à¶«à¶º:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} බයිට)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} බයිට)
+document_properties_title=සිරස්තලය:
+document_properties_author=කතෲ
+document_properties_subject=මà·à¶­à·˜à¶šà·à·€:
+document_properties_keywords=යතුරු වදන්:
+document_properties_creation_date=නිර්මිත දිනය:
+document_properties_modification_date=වෙනස්කල දිනය:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=නිර්මà·à¶´à¶š:
+document_properties_producer=PDF නිà·à·Šà¶´à·à¶¯à¶š:
+document_properties_version=PDF නිකුතුව:
+document_properties_page_count=පිටු ගණන:
+document_properties_page_size=පිටුවේ විà·à·à¶½à¶­à·Šà·€à¶º:
+document_properties_page_size_unit_inches=අඟල්
+document_properties_page_size_unit_millimeters=මිමි
+document_properties_page_size_orientation_portrait=සිරස්
+document_properties_page_size_orientation_landscape=තිරස්
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}}×{{height}}{{unit}}{{name}}{{orientation}}
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=වේගවත් ජà·à¶½ දසුන:
+document_properties_linearized_yes=ඔව්
+document_properties_linearized_no=නà·à·„à·
+document_properties_close=වසන්න
+
+print_progress_message=ලේඛනය මුද්â€à¶»à¶«à¶º සඳහ෠සූදà·à¶±à¶¸à·Š කරමින්…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=අවලංගු කරන්න
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=පà·à¶­à·’ තීරුවට මà·à¶»à·”වන්න
+toggle_sidebar_label=පà·à¶­à·’ තීරුවට මà·à¶»à·”වන්න
+document_outline_label=ලේඛනයේ පිට මà·à¶ºà·’ම
+attachments.title=ඇමිණුම් පෙන්වන්න
+attachments_label=ඇමිණුම්
+thumbs.title=සිඟිති රූ පෙන්වන්න
+thumbs_label=සිඟිති රූ
+findbar.title=ලේඛනය තුළ සොයන්න
+findbar_label=සොයන්න
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=පිටුව {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=පිටුවෙ සිඟිත රූව {{page}}
+
+# Find panel button title and messages
+find_input.title=සොයන්න
+find_previous.title=මේ à·€à·à¶šà·Šâ€à¶º ඛණ්ඩය මීට පෙර යෙදුණු ස්ථà·à¶±à¶º සොයන්න
+find_previous_label=පෙර:
+find_next.title=මේ à·€à·à¶šà·Šâ€à¶º ඛණ්ඩය මීළඟට යෙදෙන ස්ථà·à¶±à¶º සොයන්න
+find_next_label=මීළඟ
+find_highlight=සියල්ල උද්දීපනය
+find_match_case_label=අකුරු ගළපන්න
+find_entire_word_label=සම්පූර්ණ වචන
+find_reached_top=පිටුවේ ඉහළ කෙළවරට ලගà·à·€à·’ය, පහළ සිට ඉදිරියට යමින්
+find_reached_bottom=පිටුවේ පහළ කෙළවරට ලගà·à·€à·’ය, ඉහළ සිට ඉදිරියට යමින්
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit[zero]=ගà·à¶½à¶´à·”ම් {{limit}} ට වඩà·
+find_not_found=ඔබ සෙව් වචන හමු නොවීය
+
+# Error panel labels
+error_more_info=බොහ෠තොරතුරු
+error_less_info=අවම තොරතුරු
+error_close=වසන්න
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (නිකුතුව: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=පණිවිඩය: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stack: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=ගොනුව: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=පේළිය: {{line}}
+rendering_error=පිටුව රෙන්ඩර් විමේදි ගà·à¶§à¶½à·”වක් හට ගà·à¶±à·”ණි.
+
+# Predefined zoom values
+page_scale_width=පිටුවේ පළල
+page_scale_fit=පිටුවට සුදුසු ලෙස
+page_scale_auto=ස්වයංක්â€à¶»à·“ය විà·à·à¶½à¶«à¶º
+page_scale_actual=නියමිත ප්â€à¶»à¶¸à·à¶«à¶º
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=දà·à·‚ය
+loading_error=PDF පූරණය විමේදි දà·à·‚යක් හට ගà·à¶±à·”ණි.
+invalid_file_error=දූà·à·’ත à·„à· à·ƒà·à·€à¶¯à·Šâ€à¶º PDF ගොනුව.
+missing_file_error=නà·à¶­à·’වූ PDF ගොනුව.
+unexpected_response_error=බලà·à¶´à·œà¶»à·œà¶­à·Šà¶­à·” නොවූ සේවà·à¶¯à·à¶ºà¶š ප්â€à¶»à¶­à·’චà·à¶»à¶º.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} විස්තරය]
+password_label=මෙම PDF ගොනුව විවෘත කිරීමට මුරපදය ඇතුළත් කරන්න.
+password_invalid=à·€à·à¶»à¶¯à·’ මුරපදයක්. කරුණà·à¶šà¶» නà·à·€à¶­ උත්සහ කරන්න.
+password_ok=හරි
+password_cancel=එපà·
+
+printing_not_supported=අවවà·à¶¯à¶ºà¶ºà·’: මෙම ගවේà·à¶šà¶º මුද්â€à¶»à¶«à¶º සඳහ෠සම්පූර්ණයෙන් සහය නොදක්වයි.
+printing_not_ready=අවවà·à¶¯à¶ºà¶ºà·’: මුද්â€à¶»à¶«à¶º සඳහ෠PDF සම්පූර්ණයෙන් පූර්ණය වී නොමà·à¶­.
+web_fonts_disabled=ජà·à¶½ අකුරු අක්â€à¶»à·“යයි: තිළà·à¶½à·’ PDF අකුරු භà·à·€à·’ත කළ නොහà·à¶š.
diff --git a/js/pdfjs/web/locale/sk/viewer.properties b/js/pdfjs/web/locale/sk/viewer.properties
new file mode 100644
index 0000000..a08911b
--- /dev/null
+++ b/js/pdfjs/web/locale/sk/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Predchádzajúca strana
+previous_label=Predchádzajúca
+next.title=Nasledujúca strana
+next_label=Nasledujúca
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Strana
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=z {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} z {{pagesCount}})
+
+zoom_out.title=Zmenšiť veľkosť
+zoom_out_label=Zmenšiť veľkosť
+zoom_in.title=ZväÄÅ¡iÅ¥ veľkosÅ¥
+zoom_in_label=ZväÄÅ¡iÅ¥ veľkosÅ¥
+zoom.title=Nastavenie veľkosti
+presentation_mode.title=Prepnúť na režim prezentácie
+presentation_mode_label=Režim prezentácie
+open_file.title=Otvoriť súbor
+open_file_label=Otvoriť
+print.title=TlaÄiÅ¥
+print_label=TlaÄiÅ¥
+download.title=Prevziať
+download_label=Prevziať
+bookmark.title=Aktuálne zobrazenie (kopírovať alebo otvoriť v novom okne)
+bookmark_label=Aktuálne zobrazenie
+
+# Secondary toolbar and context menu
+tools.title=Nástroje
+tools_label=Nástroje
+first_page.title=Prejsť na prvú stranu
+first_page.label=Prejsť na prvú stranu
+first_page_label=Prejsť na prvú stranu
+last_page.title=Prejsť na poslednú stranu
+last_page.label=Prejsť na poslednú stranu
+last_page_label=Prejsť na poslednú stranu
+page_rotate_cw.title=OtoÄiÅ¥ v smere hodinových ruÄiÄiek
+page_rotate_cw.label=OtoÄiÅ¥ v smere hodinových ruÄiÄiek
+page_rotate_cw_label=OtoÄiÅ¥ v smere hodinových ruÄiÄiek
+page_rotate_ccw.title=OtoÄiÅ¥ proti smeru hodinových ruÄiÄiek
+page_rotate_ccw.label=OtoÄiÅ¥ proti smeru hodinových ruÄiÄiek
+page_rotate_ccw_label=OtoÄiÅ¥ proti smeru hodinových ruÄiÄiek
+
+cursor_text_select_tool.title=Povoliť výber textu
+cursor_text_select_tool_label=Výber textu
+cursor_hand_tool.title=Povoliť nástroj ruka
+cursor_hand_tool_label=Nástroj ruka
+
+scroll_vertical.title=Používať zvislé posúvanie
+scroll_vertical_label=Zvislé posúvanie
+scroll_horizontal.title=Používať vodorovné posúvanie
+scroll_horizontal_label=Vodorovné posúvanie
+scroll_wrapped.title=Použiť postupné posúvanie
+scroll_wrapped_label=Postupné posúvanie
+
+spread_none.title=Nezdružovať stránky
+spread_none_label=Žiadne združovanie
+spread_odd.title=Združí stránky a umiestni nepárne stránky vľavo
+spread_odd_label=Združiť stránky (nepárne vľavo)
+spread_even.title=Združí stránky a umiestni párne stránky vľavo
+spread_even_label=Združiť stránky (párne vľavo)
+
+# Document properties dialog box
+document_properties.title=Vlastnosti dokumentu…
+document_properties_label=Vlastnosti dokumentu…
+document_properties_file_name=Názov súboru:
+document_properties_file_size=Veľkosť súboru:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} kB ({{size_b}} bajtov)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bajtov)
+document_properties_title=Názov:
+document_properties_author=Autor:
+document_properties_subject=Predmet:
+document_properties_keywords=KľúÄové slová:
+document_properties_creation_date=Dátum vytvorenia:
+document_properties_modification_date=Dátum úpravy:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Vytvoril:
+document_properties_producer=Tvorca PDF:
+document_properties_version=Verzia PDF:
+document_properties_page_count=PoÄet strán:
+document_properties_page_size=Veľkosť stránky:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=na výšku
+document_properties_page_size_orientation_landscape=na šírku
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=List
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Rýchle Web View:
+document_properties_linearized_yes=Ãno
+document_properties_linearized_no=Nie
+document_properties_close=Zavrieť
+
+print_progress_message=Príprava dokumentu na tlaÄ…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Zrušiť
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Prepnúť boÄný panel
+toggle_sidebar_notification.title=Prepnúť boÄný panel (dokument obsahuje osnovu/prílohy)
+toggle_sidebar_label=Prepnúť boÄný panel
+document_outline.title=Zobraziť osnovu dokumentu (dvojitým kliknutím rozbalíte/zbalíte všetky položky)
+document_outline_label=Osnova dokumentu
+attachments.title=Zobraziť prílohy
+attachments_label=Prílohy
+thumbs.title=Zobraziť miniatúry
+thumbs_label=Miniatúry
+findbar.title=Hľadať v dokumente
+findbar_label=Hľadať
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Strana {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Strana {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniatúra strany {{page}}
+
+# Find panel button title and messages
+find_input.title=Hľadať
+find_input.placeholder=Hľadať v dokumente…
+find_previous.title=Vyhľadať predchádzajúci výskyt reťazca
+find_previous_label=Predchádzajúce
+find_next.title=VyhľadaÅ¥ Äalší výskyt reÅ¥azca
+find_next_label=Ďalšie
+find_highlight=Zvýrazniť všetky
+find_match_case_label=Rozlišovať veľkosť písmen
+find_entire_word_label=Celé slová
+find_reached_top=Bol dosiahnutý zaÄiatok stránky, pokraÄuje sa od konca
+find_reached_bottom=Bol dosiahnutý koniec stránky, pokraÄuje sa od zaÄiatku
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}}. z {{total}} výsledku
+find_match_count[two]={{current}}. z {{total}} výsledkov
+find_match_count[few]={{current}}. z {{total}} výsledkov
+find_match_count[many]={{current}}. z {{total}} výsledkov
+find_match_count[other]={{current}}. z {{total}} výsledkov
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Viac než {{limit}} výsledkov
+find_match_count_limit[one]=Viac než {{limit}} výsledok
+find_match_count_limit[two]=Viac než {{limit}} výsledky
+find_match_count_limit[few]=Viac než {{limit}} výsledky
+find_match_count_limit[many]=Viac než {{limit}} výsledkov
+find_match_count_limit[other]=Viac než {{limit}} výsledkov
+find_not_found=Výraz nebol nájdený
+
+# Error panel labels
+error_more_info=Viac informácií
+error_less_info=Menej informácií
+error_close=Zavrieť
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (zostavenie: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Správa: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Zásobník: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Súbor: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Riadok: {{line}}
+rendering_error=Pri vykresľovaní stránky sa vyskytla chyba.
+
+# Predefined zoom values
+page_scale_width=Na šírku strany
+page_scale_fit=Na veľkosť strany
+page_scale_auto=Automatická veľkosť
+page_scale_actual=SkutoÄná veľkosÅ¥
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}} %
+
+# Loading indicator messages
+loading_error_indicator=Chyba
+loading_error=PoÄas naÄítavania dokumentu PDF sa vyskytla chyba.
+invalid_file_error=Neplatný alebo poškodený súbor PDF.
+missing_file_error=Chýbajúci súbor PDF.
+unexpected_response_error=NeoÄakávaná odpoveÄ zo servera.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Anotácia typu {{type}}]
+password_label=Ak chcete otvoriť tento súbor PDF, zadajte jeho heslo.
+password_invalid=Heslo nie je platné. Skúste to znova.
+password_ok=OK
+password_cancel=Zrušiť
+
+printing_not_supported=Upozornenie: tlaÄ nie je v tomto prehliadaÄi plne podporovaná.
+printing_not_ready=Upozornenie: súbor PDF nie je plne naÄítaný pre tlaÄ.
+web_fonts_disabled=Webové písma sú vypnuté: nie je možné použiť písma vložené do súboru PDF.
+document_colors_not_allowed=Dokumenty PDF nemajú povolené používaÅ¥ vlastné farby, pretože voľba "PovoliÅ¥ stránkam používaÅ¥ vlastné farby" je v nastaveniach prehliadaÄa vypnutá.
diff --git a/js/pdfjs/web/locale/sl/viewer.properties b/js/pdfjs/web/locale/sl/viewer.properties
new file mode 100644
index 0000000..86db2d9
--- /dev/null
+++ b/js/pdfjs/web/locale/sl/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Prejšnja stran
+previous_label=Nazaj
+next.title=Naslednja stran
+next_label=Naprej
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Stran
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=od {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} od {{pagesCount}})
+
+zoom_out.title=Pomanjšaj
+zoom_out_label=Pomanjšaj
+zoom_in.title=PoveÄaj
+zoom_in_label=PoveÄaj
+zoom.title=PoveÄava
+presentation_mode.title=Preklopi v naÄin predstavitve
+presentation_mode_label=NaÄin predstavitve
+open_file.title=Odpri datoteko
+open_file_label=Odpri
+print.title=Natisni
+print_label=Natisni
+download.title=Prenesi
+download_label=Prenesi
+bookmark.title=Trenutni pogled (kopiraj ali odpri v novem oknu)
+bookmark_label=Trenutni pogled
+
+# Secondary toolbar and context menu
+tools.title=Orodja
+tools_label=Orodja
+first_page.title=Pojdi na prvo stran
+first_page.label=Pojdi na prvo stran
+first_page_label=Pojdi na prvo stran
+last_page.title=Pojdi na zadnjo stran
+last_page.label=Pojdi na zadnjo stran
+last_page_label=Pojdi na zadnjo stran
+page_rotate_cw.title=Zavrti v smeri urnega kazalca
+page_rotate_cw.label=Zavrti v smeri urnega kazalca
+page_rotate_cw_label=Zavrti v smeri urnega kazalca
+page_rotate_ccw.title=Zavrti v nasprotni smeri urnega kazalca
+page_rotate_ccw.label=Zavrti v nasprotni smeri urnega kazalca
+page_rotate_ccw_label=Zavrti v nasprotni smeri urnega kazalca
+
+cursor_text_select_tool.title=OmogoÄi orodje za izbor besedila
+cursor_text_select_tool_label=Orodje za izbor besedila
+cursor_hand_tool.title=OmogoÄi roko
+cursor_hand_tool_label=Roka
+
+scroll_vertical.title=Uporabi navpiÄno drsenje
+scroll_vertical_label=NavpiÄno drsenje
+scroll_horizontal.title=Uporabi vodoravno drsenje
+scroll_horizontal_label=Vodoravno drsenje
+scroll_wrapped.title=Uporabi ovito drsenje
+scroll_wrapped_label=Ovito drsenje
+
+spread_none.title=Ne združuj razponov strani
+spread_none_label=Brez razponov
+spread_odd.title=Združuj razpone strani z zaÄetkom pri lihih straneh
+spread_odd_label=Lihi razponi
+spread_even.title=Združuj razpone strani z zaÄetkom pri sodih straneh
+spread_even_label=Sodi razponi
+
+# Document properties dialog box
+document_properties.title=Lastnosti dokumenta …
+document_properties_label=Lastnosti dokumenta …
+document_properties_file_name=Ime datoteke:
+document_properties_file_size=Velikost datoteke:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bajtov)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bajtov)
+document_properties_title=Ime:
+document_properties_author=Avtor:
+document_properties_subject=Tema:
+document_properties_keywords=KljuÄne besede:
+document_properties_creation_date=Datum nastanka:
+document_properties_modification_date=Datum spremembe:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Ustvaril:
+document_properties_producer=Izdelovalec PDF:
+document_properties_version=RazliÄica PDF:
+document_properties_page_count=Å tevilo strani:
+document_properties_page_size=Velikost strani:
+document_properties_page_size_unit_inches=palcev
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=pokonÄno
+document_properties_page_size_orientation_landscape=ležeÄe
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Pismo
+document_properties_page_size_name_legal=Pravno
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Hitri spletni ogled:
+document_properties_linearized_yes=Da
+document_properties_linearized_no=Ne
+document_properties_close=Zapri
+
+print_progress_message=Priprava dokumenta na tiskanje …
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}} %
+print_progress_close=PrekliÄi
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Preklopi stransko vrstico
+toggle_sidebar_notification.title=Preklopi stransko vrstico (dokument vsebuje oris/priponke)
+toggle_sidebar_label=Preklopi stransko vrstico
+document_outline.title=Prikaži oris dokumenta (dvokliknite za razširitev/strnitev vseh predmetov)
+document_outline_label=Oris dokumenta
+attachments.title=Prikaži priponke
+attachments_label=Priponke
+thumbs.title=Prikaži sliÄice
+thumbs_label=SliÄice
+findbar.title=Iskanje po dokumentu
+findbar_label=Najdi
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Stran {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Stran {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=SliÄica strani {{page}}
+
+# Find panel button title and messages
+find_input.title=Najdi
+find_input.placeholder=Najdi v dokumentu …
+find_previous.title=Najdi prejšnjo ponovitev iskanega
+find_previous_label=Najdi nazaj
+find_next.title=Najdi naslednjo ponovitev iskanega
+find_next_label=Najdi naprej
+find_highlight=OznaÄi vse
+find_match_case_label=Razlikuj velike/male Ärke
+find_entire_word_label=Cele besede
+find_reached_top=Dosežen zaÄetek dokumenta iz smeri konca
+find_reached_bottom=Doseženo konec dokumenta iz smeri zaÄetka
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]=Zadetek {{current}} od {{total}}
+find_match_count[two]=Zadetek {{current}} od {{total}}
+find_match_count[few]=Zadetek {{current}} od {{total}}
+find_match_count[many]=Zadetek {{current}} od {{total}}
+find_match_count[other]=Zadetek {{current}} od {{total}}
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=VeÄ kot {{limit}} zadetkov
+find_match_count_limit[one]=VeÄ kot {{limit}} zadetek
+find_match_count_limit[two]=VeÄ kot {{limit}} zadetka
+find_match_count_limit[few]=VeÄ kot {{limit}} zadetki
+find_match_count_limit[many]=VeÄ kot {{limit}} zadetkov
+find_match_count_limit[other]=VeÄ kot {{limit}} zadetkov
+find_not_found=Iskanega ni mogoÄe najti
+
+# Error panel labels
+error_more_info=VeÄ informacij
+error_less_info=Manj informacij
+error_close=Zapri
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js r{{version}} (graditev: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=SporoÄilo: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Sklad: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Datoteka: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Vrstica: {{line}}
+rendering_error=Med pripravljanjem strani je prišlo do napake!
+
+# Predefined zoom values
+page_scale_width=Å irina strani
+page_scale_fit=Prilagodi stran
+page_scale_auto=Samodejno
+page_scale_actual=Dejanska velikost
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}} %
+
+# Loading indicator messages
+loading_error_indicator=Napaka
+loading_error=Med nalaganjem datoteke PDF je prišlo do napake.
+invalid_file_error=Neveljavna ali pokvarjena datoteka PDF.
+missing_file_error=Ni datoteke PDF.
+unexpected_response_error=NepriÄakovan odgovor strežnika.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Opomba vrste {{type}}]
+password_label=Vnesite geslo za odpiranje te datoteke PDF.
+password_invalid=Neveljavno geslo. Poskusite znova.
+password_ok=V redu
+password_cancel=PrekliÄi
+
+printing_not_supported=Opozorilo: ta brskalnik ne podpira vseh možnosti tiskanja.
+printing_not_ready=Opozorilo: PDF ni v celoti naložen za tiskanje.
+web_fonts_disabled=Spletne pisave so onemogoÄene: vgradnih pisav za PDF ni mogoÄe uporabiti.
+document_colors_not_allowed=Dokumenti PDF ne smejo uporabljati svojih lastnih barv: možnost 'Dovoli stranem uporabo lastnih barv' je v brskalniku onemogoÄena.
diff --git a/js/pdfjs/web/locale/son/viewer.properties b/js/pdfjs/web/locale/son/viewer.properties
new file mode 100644
index 0000000..f5c1b46
--- /dev/null
+++ b/js/pdfjs/web/locale/son/viewer.properties
@@ -0,0 +1,180 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Moo bisante
+previous_label=Bisante
+next.title=Jinehere moo
+next_label=Jine
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Moo
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages={{pagesCount}} ra
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} ka hun {{pagesCount}}) ra
+
+zoom_out.title=Nakasandi
+zoom_out_label=Nakasandi
+zoom_in.title=Bebbeerandi
+zoom_in_label=Bebbeerandi
+zoom.title=Bebbeerandi
+presentation_mode.title=Bere cebeyan alhaali
+presentation_mode_label=Cebeyan alhaali
+open_file.title=Tuku feeri
+open_file_label=Feeri
+print.title=Kar
+print_label=Kar
+download.title=Zumandi
+download_label=Zumandi
+bookmark.title=Sohõ gunarro (bere wala feeri zanfun taaga ra)
+bookmark_label=Sohõ gunaroo
+
+# Secondary toolbar and context menu
+tools.title=Goyjinawey
+tools_label=Goyjinawey
+first_page.title=Koy moo jinaa ga
+first_page.label=Koy moo jinaa ga
+first_page_label=Koy moo jinaa ga
+last_page.title=Koy moo koraa ga
+last_page.label=Koy moo koraa ga
+last_page_label=Koy moo koraa ga
+page_rotate_cw.title=Kuubi kanbe guma here
+page_rotate_cw.label=Kuubi kanbe guma here
+page_rotate_cw_label=Kuubi kanbe guma here
+page_rotate_ccw.title=Kuubi kanbe wowa here
+page_rotate_ccw.label=Kuubi kanbe wowa here
+page_rotate_ccw_label=Kuubi kanbe wowa here
+
+
+# Document properties dialog box
+document_properties.title=Takadda mayrawey…
+document_properties_label=Takadda mayrawey…
+document_properties_file_name=Tuku maa:
+document_properties_file_size=Tuku adadu:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb=KB {{size_kb}} (cebsu-ize {{size_b}})
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb=MB {{size_mb}} (cebsu-ize {{size_b}})
+document_properties_title=Tiiramaa:
+document_properties_author=Hantumkaw:
+document_properties_subject=Dalil:
+document_properties_keywords=Kufalkalimawey:
+document_properties_creation_date=Teeyan han:
+document_properties_modification_date=Barmayan han:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Teekaw:
+document_properties_producer=PDF berandikaw:
+document_properties_version=PDF dumi:
+document_properties_page_count=Moo hinna:
+document_properties_close=Daabu
+
+print_progress_message=Goo ma takaddaa soolu k'a kar se…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Naŋ
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Kanjari ceraw zuu
+toggle_sidebar_notification.title=Kanjari ceraw-zuu (takaddaa goo nda filla-boŋ/hangandiyaŋ)
+toggle_sidebar_label=Kanjari ceraw zuu
+document_outline.title=Takaddaa korfur alhaaloo cebe (naagu cee hinka ka haya-izey kul hayandi/kankamandi)
+document_outline_label=Takadda filla-boŋ
+attachments.title=Hangarey cebe
+attachments_label=Hangarey
+thumbs.title=Kabeboy biyey cebe
+thumbs_label=Kabeboy biyey
+findbar.title=Ceeci takaddaa ra
+findbar_label=Ceeci
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title={{page}} moo
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Kabeboy bii {{page}} moo Å¡e
+
+# Find panel button title and messages
+find_input.title=Ceeci
+find_input.placeholder=Ceeci takaddaa ra…
+find_previous.title=Kalimaɲaŋoo bangayri bisantaa ceeci
+find_previous_label=Bisante
+find_next.title=Kalimaɲaŋoo hiino bangayroo ceeci
+find_next_label=Jine
+find_highlight=Ikul Å¡ilbay
+find_match_case_label=Harfu-beeriyan hawgay
+find_reached_top=A too moŋoo boŋoo, koy jine ka šinitin nda cewoo
+find_reached_bottom=A too moɲoo cewoo, koy jine šintioo ga
+find_not_found=Kalimaɲaa mana duwandi
+
+# Error panel labels
+error_more_info=Alhabar tontoni
+error_less_info=Alhabar tontoni
+error_close=Daabu
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Alhabar: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Dekeri: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Tuku: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Žeeri: {{line}}
+rendering_error=Firka bangay kaŋ moɲoo goo ma willandi.
+
+# Predefined zoom values
+page_scale_width=Mooo hayyan
+page_scale_fit=Moo sawayan
+page_scale_auto=Boŋše azzaati barmayyan
+page_scale_actual=Adadu cimi
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Firka
+loading_error=Firka bangay kaŋ PDF goo ma zumandi.
+invalid_file_error=PDF tuku laala wala laybante.
+missing_file_error=PDF tuku kumante.
+unexpected_response_error=Manti feršikaw tuuruyan maatante.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt={{type}} maasa-caw]
+password_label=Å ennikufal dam ka PDF tukoo woo feeri.
+password_invalid=Å ennikufal laalo. Ceeci koyne taare.
+password_ok=Ayyo
+password_cancel=Naŋ
+
+printing_not_supported=Yaamar: Karyan Å¡i tee ka timme nda ceecikaa woo.
+printing_not_ready=Yaamar: PDF Å¡i zunbu ka timme karyan Å¡e.
+web_fonts_disabled=Interneti Å¡igirawey kay: Å¡i hin ka goy nda PDF Å¡igira hurantey.
+document_colors_not_allowed=PDF takaddawey ši duu fondo ka ngey boŋ noonawey zaa: “Naŋ moɲey ma ngey boŋ noonawey suuba†ši dira ceecikaa ga.
diff --git a/js/pdfjs/web/locale/sq/viewer.properties b/js/pdfjs/web/locale/sq/viewer.properties
new file mode 100644
index 0000000..d786ae0
--- /dev/null
+++ b/js/pdfjs/web/locale/sq/viewer.properties
@@ -0,0 +1,239 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Faqja e Mëparshme
+previous_label=E mëparshmja
+next.title=Faqja Pasuese
+next_label=Pasuesja
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Faqe
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=nga {{pagesCount}} gjithsej
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} nga {{pagesCount}})
+
+zoom_out.title=Zvogëlojeni
+zoom_out_label=Zvogëlojeni
+zoom_in.title=Zmadhojeni
+zoom_in_label=Zmadhojini
+zoom.title=Zoom
+presentation_mode.title=Kalo te Mënyra Paraqitje
+presentation_mode_label=Mënyra Paraqitje
+open_file.title=Hapni Kartelë
+open_file_label=Hape
+print.title=Shtypje
+print_label=Shtype
+download.title=Shkarkim
+download_label=Shkarkoje
+bookmark.title=Pamja e tanishme (kopjojeni ose hapeni në dritare të re)
+bookmark_label=Pamja e Tanishme
+
+# Secondary toolbar and context menu
+tools.title=Mjete
+tools_label=Mjete
+first_page.title=Kaloni te Faqja e Parë
+first_page.label=Kaloni te Faqja e Parë
+first_page_label=Kaloni te Faqja e Parë
+last_page.title=Kaloni te Faqja e Fundit
+last_page.label=Kaloni te Faqja e Fundit
+last_page_label=Kaloni te Faqja e Fundit
+page_rotate_cw.title=Rrotullojeni Në Kahun Orar
+page_rotate_cw.label=Rrotulloje Në Kahun Orar
+page_rotate_cw_label=Rrotulloje Në Kahun Orar
+page_rotate_ccw.title=Rrotullojeni Në Kahun Kundërorar
+page_rotate_ccw.label=Rrotulloje Në Kahun Kundërorar
+page_rotate_ccw_label=Rrotulloje Në Kahun Kundërorar
+
+cursor_text_select_tool.title=Aktivizo Mjet Përzgjedhjeje Teksti
+cursor_text_select_tool_label=Mjet Përzgjedhjeje Teksti
+cursor_hand_tool.title=Aktivizo Mjetin Dorë
+cursor_hand_tool_label=Mjeti Dorë
+
+scroll_vertical.title=Përdor Rrëshqitje Vertikale
+scroll_vertical_label=Rrëshqitje Vertikale
+scroll_horizontal.title=Përdor Rrëshqitje Horizontale
+scroll_horizontal_label=Rrëshqitje Horizontale
+scroll_wrapped.title=Përdor Rrëshqitje Me Mbështjellje
+scroll_wrapped_label=Rrëshqitje Me Mbështjellje
+
+
+# Document properties dialog box
+document_properties.title=Veti Dokumenti…
+document_properties_label=Veti Dokumenti…
+document_properties_file_name=Emër kartele:
+document_properties_file_size=Madhësi kartele:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bajte)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bajte)
+document_properties_title=Titull:
+document_properties_author=Autor:
+document_properties_subject=Subjekt:
+document_properties_keywords=Fjalëkyçe:
+document_properties_creation_date=Datë Krijimi:
+document_properties_modification_date=Datë Ndryshimi:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Krijues:
+document_properties_producer=Prodhues PDF-je:
+document_properties_version=Version PDF-je:
+document_properties_page_count=Numër Faqesh:
+document_properties_page_size=Madhësi Faqeje:
+document_properties_page_size_unit_inches=inç
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=portret
+document_properties_page_size_orientation_landscape=së gjeri
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized_yes=Po
+document_properties_linearized_no=Jo
+document_properties_close=Mbylleni
+
+print_progress_message=Po përgatitet dokumenti për shtypje…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Anuloje
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Shfaqni/Fshihni Anështyllën
+toggle_sidebar_notification.title=Shfaqni Anështyllën (dokumenti përmban përvijim/bashkëngjitje)
+toggle_sidebar_label=Shfaq/Fshih Anështyllën
+document_outline.title=Shfaqni Përvijim Dokumenti (dyklikoni që të shfaqen/fshihen krejt elementët)
+document_outline_label=Përvijim Dokumenti
+attachments.title=Shfaqni Bashkëngjitje
+attachments_label=Bashkëngjitje
+thumbs.title=Shfaqni Miniatura
+thumbs_label=Miniatura
+findbar.title=Gjeni në Dokument
+findbar_label=Gjej
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Faqja {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniaturë e Faqes {{page}}
+
+# Find panel button title and messages
+find_input.title=Gjej
+find_input.placeholder=Gjeni në dokument…
+find_previous.title=Gjeni hasjen e mëparshme të togfjalëshit
+find_previous_label=E mëparshmja
+find_next.title=Gjeni hasjen pasuese të togfjalëshit
+find_next_label=Pasuesja
+find_highlight=Theksoji të tëra
+find_match_case_label=Siç është shkruar
+find_entire_word_label=Krejt fjalët
+find_reached_top=U mbërrit në krye të dokumentit, vazhduar prej fundit
+find_reached_bottom=U mbërrit në fund të dokumentit, vazhduar prej kreut
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} nga {{total}} përputhje gjithsej
+find_match_count[two]={{current}} nga {{total}} përputhje gjithsej
+find_match_count[few]={{current}} nga {{total}} përputhje gjithsej
+find_match_count[many]={{current}} nga {{total}} përputhje gjithsej
+find_match_count[other]={{current}} nga {{total}} përputhje gjithsej
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Më shumë se {{limit}} përputhje
+find_match_count_limit[one]=Më shumë se {{limit}} përputhje
+find_match_count_limit[two]=Më shumë se {{limit}} përputhje
+find_match_count_limit[few]=Më shumë se {{limit}} përputhje
+find_match_count_limit[many]=Më shumë se {{limit}} përputhje
+find_match_count_limit[other]=Më shumë se {{limit}} përputhje
+find_not_found=Togfjalësh që s’gjendet
+
+# Error panel labels
+error_more_info=Më Tepër të Dhëna
+error_less_info=Më Pak të Dhëna
+error_close=Mbylleni
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Mesazh: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stack: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Kartelë: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Rresht: {{line}}
+rendering_error=Ndodhi një gabim gjatë riprodhimit të faqes.
+
+# Predefined zoom values
+page_scale_width=Gjerësi Faqeje
+page_scale_fit=Sa Nxë Faqja
+page_scale_auto=Zoom i Vetvetishëm
+page_scale_actual=Madhësia Faktike
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Gabim
+loading_error=Ndodhi një gabim gjatë ngarkimit të PDF-së.
+invalid_file_error=Kartelë PDF e pavlefshme ose e dëmtuar.
+missing_file_error=Kartelë PDF që mungon.
+unexpected_response_error=Përgjigje shërbyesi e papritur.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Nënvizim {{type}}]
+password_label=Jepni fjalëkalimin që të hapet kjo kartelë PDF.
+password_invalid=Fjalëkalim i pavlefshëm. Ju lutemi, riprovoni.
+password_ok=OK
+password_cancel=Anuloje
+
+printing_not_supported=Kujdes: Shtypja s’mbulohet plotësisht nga ky shfletues.
+printing_not_ready=Kujdes: PDF-ja s’është ngarkuar plotësisht që ta shtypni.
+web_fonts_disabled=Shkronjat Web janë të çaktivizuara: s’arrihet të përdoren shkronja të trupëzuara në PDF.
+document_colors_not_allowed=Dokumenteve PDF s’u lejohet të përdorin ngjyrat e tyre: 'Lejoji faqet t’i zgjedhin vetë ngjyrat' është e çaktivizuar te shfletuesi.
diff --git a/js/pdfjs/web/locale/sr/viewer.properties b/js/pdfjs/web/locale/sr/viewer.properties
new file mode 100644
index 0000000..72f4cd9
--- /dev/null
+++ b/js/pdfjs/web/locale/sr/viewer.properties
@@ -0,0 +1,232 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Претходна Ñтраница
+previous_label=Претходна
+next.title=Следећа Ñтраница
+next_label=Следећа
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Страница
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=од {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} од {{pagesCount}})
+
+zoom_out.title=Умањи
+zoom_out_label=Умањи
+zoom_in.title=Увеличај
+zoom_in_label=Увеличај
+zoom.title=Увеличавање
+presentation_mode.title=Промени на приказ у режиму презентације
+presentation_mode_label=Режим презентације
+open_file.title=Отвори датотеку
+open_file_label=Отвори
+print.title=Штампај
+print_label=Штампај
+download.title=Преузми
+download_label=Преузми
+bookmark.title=Тренутни приказ (копирај или отвори нови прозор)
+bookmark_label=Тренутни приказ
+
+# Secondary toolbar and context menu
+tools.title=Ðлатке
+tools_label=Ðлатке
+first_page.title=Иди на прву Ñтраницу
+first_page.label=Иди на прву Ñтраницу
+first_page_label=Иди на прву Ñтраницу
+last_page.title=Иди на поÑледњу Ñтраницу
+last_page.label=Иди на поÑледњу Ñтраницу
+last_page_label=Иди на поÑледњу Ñтраницу
+page_rotate_cw.title=Ротирај у Ñмеру казаљке на Ñату
+page_rotate_cw.label=Ротирај у Ñмеру казаљке на Ñату
+page_rotate_cw_label=Ротирај у Ñмеру казаљке на Ñату
+page_rotate_ccw.title=Ротирај у Ñмеру Ñупротном од казаљке на Ñату
+page_rotate_ccw.label=Ротирај у Ñмеру Ñупротном од казаљке на Ñату
+page_rotate_ccw_label=Ротирај у Ñмеру Ñупротном од казаљке на Ñату
+
+cursor_text_select_tool.title=Омогући алат за Ñелектовање текÑта
+cursor_text_select_tool_label=Ðлат за Ñелектовање текÑта
+cursor_hand_tool.title=Омогући алат за померање
+cursor_hand_tool_label=Ðлат за померање
+
+scroll_vertical.title=КориÑти вертикално Ñкроловање
+scroll_vertical_label=Вертикално Ñкроловање
+scroll_horizontal.title=КориÑти хоризонтално Ñкроловање
+scroll_horizontal_label=Хоризонтално Ñкроловање
+scroll_wrapped.title=КориÑти Ñкроловање по омоту
+scroll_wrapped_label=Скроловање по омоту
+
+spread_none.title=Ðемој Ñпајати ширења Ñтраница
+spread_none_label=Без раÑпроÑтирања
+spread_odd.title=Споји ширења Ñтраница које почињу непарним бројем
+spread_odd_label=Ðепарна раÑпроÑтирања
+spread_even.title=Споји ширења Ñтраница које почињу парним бројем
+spread_even_label=Парна раÑпроÑтирања
+
+# Document properties dialog box
+document_properties.title=Параметри документа…
+document_properties_label=Параметри документа…
+document_properties_file_name=Име датотеке:
+document_properties_file_size=Величина датотеке:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} B)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} B)
+document_properties_title=ÐаÑлов:
+document_properties_author=Ðутор:
+document_properties_subject=Тема:
+document_properties_keywords=Кључне речи:
+document_properties_creation_date=Датум креирања:
+document_properties_modification_date=Датум модификације:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Стваралац:
+document_properties_producer=PDF произвођач:
+document_properties_version=PDF верзија:
+document_properties_page_count=Број Ñтраница:
+document_properties_page_size=Величина Ñтранице:
+document_properties_page_size_unit_inches=ин
+document_properties_page_size_unit_millimeters=мм
+document_properties_page_size_orientation_portrait=уÑправно
+document_properties_page_size_orientation_landscape=водоравно
+document_properties_page_size_name_a3=Ð3
+document_properties_page_size_name_a4=Ð4
+document_properties_page_size_name_letter=Слово
+document_properties_page_size_name_legal=Права
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Брз веб приказ:
+document_properties_linearized_yes=Да
+document_properties_linearized_no=Ðе
+document_properties_close=Затвори
+
+print_progress_message=Припремам документ за штампање…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Откажи
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Прикажи додатну палету
+toggle_sidebar_notification.title=Прикажи додатну траку (докуменат Ñадржи оквире/прилоге)
+toggle_sidebar_label=Прикажи додатну палету
+document_outline.title=Прикажи контуру документа (дупли клик за проширење/Ñкупљање елемената)
+document_outline_label=Контура документа
+attachments.title=Прикажи прилоге
+attachments_label=Прилози
+thumbs.title=Прикажи Ñличице
+thumbs_label=Сличице
+findbar.title=Пронађи у документу
+findbar_label=Пронађи
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Страница {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Сличица од Ñтранице {{page}}
+
+# Find panel button title and messages
+find_input.title=Пронађи
+find_input.placeholder=Пронађи у документу…
+find_previous.title=Пронађи претходну појаву фразе
+find_previous_label=Претходна
+find_next.title=Пронађи Ñледећу појаву фразе
+find_next_label=Следећа
+find_highlight=ИÑтакнути Ñве
+find_match_case_label=Подударања
+find_entire_word_label=Целе речи
+find_reached_top=ДоÑтигнут врх документа, наÑтавио Ñа дна
+find_reached_bottom=ДоÑтигнуто дно документа, наÑтавио Ñа врха
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_not_found=Фраза није пронађена
+
+# Error panel labels
+error_more_info=Више информација
+error_less_info=Мање информација
+error_close=Затвори
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Порука: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Стек: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Датотека: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Линија: {{line}}
+rendering_error=Дошло је до грешке приликом рендеровања ове Ñтранице.
+
+# Predefined zoom values
+page_scale_width=Ширина Ñтранице
+page_scale_fit=Прилагоди Ñтраницу
+page_scale_auto=ÐутоматÑко увеличавање
+page_scale_actual=Стварна величина
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Грешка
+loading_error=Дошло је до грешке приликом учитавања PDF-а.
+invalid_file_error=PDF датотека је оштећена или је неиÑправна.
+missing_file_error=PDF датотека није пронађена.
+unexpected_response_error=Ðеочекиван одговор од Ñервера.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} коментар]
+password_label=УнеÑите лозинку да биÑте отворили овај PDF докуменат.
+password_invalid=ÐеиÑправна лозинка. Покушајте поново.
+password_ok=У реду
+password_cancel=Откажи
+
+printing_not_supported=Упозорење: Штампање није у потпуноÑти подржано у овом прегледачу.
+printing_not_ready=Упозорење: PDF није у потпуноÑти учитан за штампу.
+web_fonts_disabled=Веб фонтови Ñу онемогућени: не могу кориÑтити уграђене PDF фонтове.
+document_colors_not_allowed=PDF документи не могу да кориÑте ÑопÑтвене боје: “Дозволи Ñтраницама да изаберу Ñвоје боје†је деактивирано у прегледачу.
diff --git a/js/pdfjs/web/locale/sv-SE/viewer.properties b/js/pdfjs/web/locale/sv-SE/viewer.properties
new file mode 100644
index 0000000..3d2f0cf
--- /dev/null
+++ b/js/pdfjs/web/locale/sv-SE/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Föregående sida
+previous_label=Föregående
+next.title=Nästa sida
+next_label=Nästa
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Sida
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=av {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} av {{pagesCount}})
+
+zoom_out.title=Zooma ut
+zoom_out_label=Zooma ut
+zoom_in.title=Zooma in
+zoom_in_label=Zooma in
+zoom.title=Zoom
+presentation_mode.title=Byt till presentationsläge
+presentation_mode_label=Presentationsläge
+open_file.title=Öppna fil
+open_file_label=Öppna
+print.title=Skriv ut
+print_label=Skriv ut
+download.title=Hämta
+download_label=Hämta
+bookmark.title=Aktuell vy (kopiera eller öppna i nytt fönster)
+bookmark_label=Aktuell vy
+
+# Secondary toolbar and context menu
+tools.title=Verktyg
+tools_label=Verktyg
+first_page.title=Gå till första sidan
+first_page.label=Gå till första sidan
+first_page_label=Gå till första sidan
+last_page.title=GÃ¥ till sista sidan
+last_page.label=GÃ¥ till sista sidan
+last_page_label=GÃ¥ till sista sidan
+page_rotate_cw.title=Rotera medurs
+page_rotate_cw.label=Rotera medurs
+page_rotate_cw_label=Rotera medurs
+page_rotate_ccw.title=Rotera moturs
+page_rotate_ccw.label=Rotera moturs
+page_rotate_ccw_label=Rotera moturs
+
+cursor_text_select_tool.title=Aktivera textmarkeringsverktyg
+cursor_text_select_tool_label=Textmarkeringsverktyg
+cursor_hand_tool.title=Aktivera handverktyg
+cursor_hand_tool_label=Handverktyg
+
+scroll_vertical.title=Använd vertikal rullning
+scroll_vertical_label=Vertikal rullning
+scroll_horizontal.title=Använd horisontell rullning
+scroll_horizontal_label=Horisontell rullning
+scroll_wrapped.title=Använd överlappande rullning
+scroll_wrapped_label=Överlappande rullning
+
+spread_none.title=Visa enkelsidor
+spread_none_label=Enkelsidor
+spread_odd.title=Visa uppslag med olika sidnummer till vänster
+spread_odd_label=Uppslag med framsida
+spread_even.title=Visa uppslag med lika sidnummer till vänster
+spread_even_label=Uppslag utan framsida
+
+# Document properties dialog box
+document_properties.title=Dokumentegenskaper…
+document_properties_label=Dokumentegenskaper…
+document_properties_file_name=Filnamn:
+document_properties_file_size=Filstorlek:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} kB ({{size_b}} byte)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} byte)
+document_properties_title=Titel:
+document_properties_author=Författare:
+document_properties_subject=Ämne:
+document_properties_keywords=Nyckelord:
+document_properties_creation_date=Skapades:
+document_properties_modification_date=Ändrades:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Skapare:
+document_properties_producer=PDF-producent:
+document_properties_version=PDF-version:
+document_properties_page_count=Sidantal:
+document_properties_page_size=Pappersstorlek:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=porträtt
+document_properties_page_size_orientation_landscape=landskap
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Snabb webbvisning:
+document_properties_linearized_yes=Ja
+document_properties_linearized_no=Nej
+document_properties_close=Stäng
+
+print_progress_message=Förbereder sidor för utskrift…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Avbryt
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Visa/dölj sidofält
+toggle_sidebar_notification.title=Visa/dölj sidofält (dokument innehåller översikt/bilagor)
+toggle_sidebar_label=Visa/dölj sidofält
+document_outline.title=Visa dokumentdisposition (dubbelklicka för att expandera/komprimera alla objekt)
+document_outline_label=Dokumentöversikt
+attachments.title=Visa Bilagor
+attachments_label=Bilagor
+thumbs.title=Visa miniatyrer
+thumbs_label=Miniatyrer
+findbar.title=Sök i dokument
+findbar_label=Sök
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Sida {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Sida {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Miniatyr av sida {{page}}
+
+# Find panel button title and messages
+find_input.title=Sök
+find_input.placeholder=Sök i dokument…
+find_previous.title=Hitta föregående förekomst av frasen
+find_previous_label=Föregående
+find_next.title=Hitta nästa förekomst av frasen
+find_next_label=Nästa
+find_highlight=Markera alla
+find_match_case_label=Matcha versal/gemen
+find_entire_word_label=Hela ord
+find_reached_top=Nådde början av dokumentet, började från slutet
+find_reached_bottom=Nådde slutet på dokumentet, började från början
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} av {{total}} träff
+find_match_count[two]={{current}} av {{total}} träffar
+find_match_count[few]={{current}} av {{total}} träffar
+find_match_count[many]={{current}} av {{total}} träffar
+find_match_count[other]={{current}} av {{total}} träffar
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Mer än {{limit}} träffar
+find_match_count_limit[one]=Mer än {{limit}} träff
+find_match_count_limit[two]=Mer än {{limit}} träffar
+find_match_count_limit[few]=Mer än {{limit}} träffar
+find_match_count_limit[many]=Mer än {{limit}} träffar
+find_match_count_limit[other]=Mer än {{limit}} träffar
+find_not_found=Frasen hittades inte
+
+# Error panel labels
+error_more_info=Mer information
+error_less_info=Mindre information
+error_close=Stäng
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Meddelande: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stack: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Fil: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Rad: {{line}}
+rendering_error=Ett fel uppstod vid visning av sidan.
+
+# Predefined zoom values
+page_scale_width=Sidbredd
+page_scale_fit=Anpassa sida
+page_scale_auto=Automatisk zoom
+page_scale_actual=Verklig storlek
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Fel
+loading_error=Ett fel uppstod vid laddning av PDF-filen.
+invalid_file_error=Ogiltig eller korrupt PDF-fil.
+missing_file_error=Saknad PDF-fil.
+unexpected_response_error=Oväntat svar från servern.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}} {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}}-annotering]
+password_label=Skriv in lösenordet för att öppna PDF-filen.
+password_invalid=Ogiltigt lösenord. Försök igen.
+password_ok=OK
+password_cancel=Avbryt
+
+printing_not_supported=Varning: Utskrifter stöds inte helt av den här webbläsaren.
+printing_not_ready=Varning: PDF:en är inte klar för utskrift.
+web_fonts_disabled=Webbtypsnitt är inaktiverade: kan inte använda inbäddade PDF-typsnitt.
+document_colors_not_allowed=PDF-dokument tillåts inte använda egna färger: “Låt sidor använda egna färger†är inaktiverat i webbläsaren.
diff --git a/js/pdfjs/web/locale/ta/viewer.properties b/js/pdfjs/web/locale/ta/viewer.properties
new file mode 100644
index 0000000..19a8de4
--- /dev/null
+++ b/js/pdfjs/web/locale/ta/viewer.properties
@@ -0,0 +1,201 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=à®®à¯à®¨à¯à®¤à¯ˆà®¯ பகà¯à®•à®®à¯
+previous_label=à®®à¯à®¨à¯à®¤à¯ˆà®¯à®¤à¯
+next.title=அடà¯à®¤à¯à®¤ பகà¯à®•à®®à¯
+next_label=அடà¯à®¤à¯à®¤à¯
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=பகà¯à®•à®®à¯
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages={{pagesCount}} இலà¯
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages={{pagesCount}}) இல௠({{pageNumber}}
+
+zoom_out.title=சிறிதாகà¯à®•à¯
+zoom_out_label=சிறிதாகà¯à®•à¯
+zoom_in.title=பெரிதாகà¯à®•à¯
+zoom_in_label=பெரிதாகà¯à®•à¯
+zoom.title=பெரிதாகà¯à®•à¯
+presentation_mode.title=விளகà¯à®•à®•à®¾à®Ÿà¯à®šà®¿ பயனà¯à®®à¯à®±à¯ˆà®•à¯à®•à¯ மாறà¯
+presentation_mode_label=விளகà¯à®•à®•à®¾à®Ÿà¯à®šà®¿ பயனà¯à®®à¯à®±à¯ˆ
+open_file.title=கோபà¯à®ªà®¿à®©à¯ˆ திற
+open_file_label=திற
+print.title=அசà¯à®šà®¿à®Ÿà¯
+print_label=அசà¯à®šà®¿à®Ÿà¯
+download.title=பதிவிறகà¯à®•à¯
+download_label=பதிவிறகà¯à®•à¯
+bookmark.title=தறà¯à®ªà¯‹à®¤à¯ˆà®¯ காடà¯à®šà®¿ (பà¯à®¤à®¿à®¯ சாளரதà¯à®¤à®¿à®±à¯à®•à¯ நகலெட௠அலà¯à®²à®¤à¯ பà¯à®¤à®¿à®¯ சாளரதà¯à®¤à®¿à®²à¯ திற)
+bookmark_label=தறà¯à®ªà¯‹à®¤à¯ˆà®¯ காடà¯à®šà®¿
+
+# Secondary toolbar and context menu
+tools.title=கரà¯à®µà®¿à®•à®³à¯
+tools_label=கரà¯à®µà®¿à®•à®³à¯
+first_page.title=à®®à¯à®¤à®²à¯ பகà¯à®•à®¤à¯à®¤à®¿à®±à¯à®•à¯ செலà¯à®²à®µà¯à®®à¯
+first_page.label=à®®à¯à®¤à®²à¯ பகà¯à®•à®¤à¯à®¤à®¿à®±à¯à®•à¯ செலà¯à®²à®µà¯à®®à¯
+first_page_label=à®®à¯à®¤à®²à¯ பகà¯à®•à®¤à¯à®¤à®¿à®±à¯à®•à¯ செலà¯à®²à®µà¯à®®à¯
+last_page.title=கடைசி பகà¯à®•à®¤à¯à®¤à®¿à®±à¯à®•à¯ செலà¯à®²à®µà¯à®®à¯
+last_page.label=கடைசி பகà¯à®•à®¤à¯à®¤à®¿à®±à¯à®•à¯ செலà¯à®²à®µà¯à®®à¯
+last_page_label=கடைசி பகà¯à®•à®¤à¯à®¤à®¿à®±à¯à®•à¯ செலà¯à®²à®µà¯à®®à¯
+page_rotate_cw.title=வலஞà¯à®šà¯à®´à®¿à®¯à®¾à®• சà¯à®´à®±à¯à®±à¯
+page_rotate_cw.label=வலஞà¯à®šà¯à®´à®¿à®¯à®¾à®• சà¯à®´à®±à¯à®±à¯
+page_rotate_cw_label=வலஞà¯à®šà¯à®´à®¿à®¯à®¾à®• சà¯à®´à®±à¯à®±à¯
+page_rotate_ccw.title=இடஞà¯à®šà¯à®´à®¿à®¯à®¾à®• சà¯à®´à®±à¯à®±à¯
+page_rotate_ccw.label=இடஞà¯à®šà¯à®´à®¿à®¯à®¾à®• சà¯à®´à®±à¯à®±à¯
+page_rotate_ccw_label=இடஞà¯à®šà¯à®´à®¿à®¯à®¾à®• சà¯à®´à®±à¯à®±à¯
+
+cursor_text_select_tool.title=உரைத௠தெரிவ௠கரà¯à®µà®¿à®¯à¯ˆà®šà¯ செயலà¯à®ªà®Ÿà¯à®¤à¯à®¤à¯
+cursor_text_select_tool_label=உரைத௠தெரிவ௠கரà¯à®µà®¿
+cursor_hand_tool.title=கைக௠கரà¯à®µà®¿à®•à¯à®šà¯ செயறà¯à®ªà®Ÿà¯à®¤à¯à®¤à¯
+cursor_hand_tool_label=கைகà¯à®•à¯à®°à¯à®µà®¿
+
+# Document properties dialog box
+document_properties.title=ஆவண பணà¯à®ªà¯à®•à®³à¯...
+document_properties_label=ஆவண பணà¯à®ªà¯à®•à®³à¯...
+document_properties_file_name=கோபà¯à®ªà¯ பெயரà¯:
+document_properties_file_size=கோபà¯à®ªà®¿à®©à¯ அளவà¯:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} கிபை ({{size_b}} பைடà¯à®Ÿà¯à®•à®³à¯)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} மெபை ({{size_b}} பைடà¯à®Ÿà¯à®•à®³à¯)
+document_properties_title=தலைபà¯à®ªà¯:
+document_properties_author=எழà¯à®¤à®¿à®¯à®µà®°à¯
+document_properties_subject=பொரà¯à®³à¯:
+document_properties_keywords=à®®à¯à®•à¯à®•à®¿à®¯ வாரà¯à®¤à¯à®¤à¯ˆà®•à®³à¯:
+document_properties_creation_date=படைதà¯à®¤ தேதி :
+document_properties_modification_date=திரà¯à®¤à¯à®¤à®¿à®¯ தேதி:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=உரà¯à®µà®¾à®•à¯à®•à¯à®ªà®µà®°à¯:
+document_properties_producer=பிடிஎஃப௠தயாரிபà¯à®ªà®¾à®³à®°à¯:
+document_properties_version=PDF பதிபà¯à®ªà¯:
+document_properties_page_count=பகà¯à®• எணà¯à®£à®¿à®•à¯à®•à¯ˆ:
+document_properties_page_size=பகà¯à®• அளவà¯:
+document_properties_page_size_unit_inches=இதிலà¯
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=நிலைபதிபà¯à®ªà¯
+document_properties_page_size_orientation_landscape=நிலைபரபà¯à®ªà¯
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=கடிதமà¯
+document_properties_page_size_name_legal=சடà¯à®Ÿà®ªà¯‚à®°à¯à®µ
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+document_properties_close=மூடà¯à®•
+
+print_progress_message=அசà¯à®šà®¿à®Ÿà¯à®µà®¤à®±à¯à®•à®¾à®© ஆவணம௠தயாராகிறதà¯...
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=ரதà¯à®¤à¯
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=பகà¯à®•à®ªà¯ படà¯à®Ÿà®¿à®¯à¯ˆ நிலைமாறà¯à®±à¯
+toggle_sidebar_notification.title=பகà¯à®•à®ªà¯à®ªà®Ÿà¯à®Ÿà¯ˆà®¯à¯ˆ நிலைமாறà¯à®±à¯ (வெளிகà¯à®•à¯‹à®Ÿà¯/இணைபà¯à®ªà¯à®•à®³à¯ˆ ஆவணம௠கொணà¯à®Ÿà¯à®³à¯à®³à®¤à¯)
+toggle_sidebar_label=பகà¯à®•à®ªà¯ படà¯à®Ÿà®¿à®¯à¯ˆ நிலைமாறà¯à®±à¯
+document_outline.title=ஆவண அடகà¯à®•à®¤à¯à®¤à¯ˆà®•à¯ காடà¯à®Ÿà¯ (இரà¯à®®à¯à®±à¯ˆà®šà¯ சொடà¯à®•à¯à®•à®¿ அனைதà¯à®¤à¯ உறà¯à®ªà¯à®ªà®¿à®Ÿà®¿à®•à®³à¯ˆà®¯à¯à®®à¯ விரி/சேரà¯)
+document_outline_label=ஆவண வெளிவரை
+attachments.title=இணைபà¯à®ªà¯à®•à®³à¯ˆ காணà¯à®ªà®¿
+attachments_label=இணைபà¯à®ªà¯à®•à®³à¯
+thumbs.title=சிறà¯à®ªà®Ÿà®™à¯à®•à®³à¯ˆà®•à¯ காணà¯à®ªà®¿
+thumbs_label=சிறà¯à®ªà®Ÿà®™à¯à®•à®³à¯
+findbar.title=ஆவணதà¯à®¤à®¿à®²à¯ கணà¯à®Ÿà®±à®¿
+findbar_label=தேடà¯
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=பகà¯à®•à®®à¯ {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=பகà¯à®•à®¤à¯à®¤à®¿à®©à¯ சிறà¯à®ªà®Ÿà®®à¯ {{page}}
+
+# Find panel button title and messages
+find_input.title=கணà¯à®Ÿà¯à®ªà®¿à®Ÿà®¿
+find_input.placeholder=ஆவணதà¯à®¤à®¿à®²à¯ கணà¯à®Ÿà®±à®¿â€¦
+find_previous.title=இநà¯à®¤ சொறà¯à®±à¯Šà®Ÿà®°à®¿à®©à¯ à®®à¯à®¨à¯à®¤à¯ˆà®¯ நிகழà¯à®µà¯ˆ தேடà¯
+find_previous_label=à®®à¯à®¨à¯à®¤à¯ˆà®¯à®¤à¯
+find_next.title=இநà¯à®¤ சொறà¯à®±à¯Šà®Ÿà®°à®¿à®©à¯ அடà¯à®¤à¯à®¤ நிகழà¯à®µà¯ˆ தேடà¯
+find_next_label=அடà¯à®¤à¯à®¤à¯
+find_highlight=அனைதà¯à®¤à¯ˆà®¯à¯à®®à¯ தனிபà¯à®ªà®Ÿà¯à®¤à¯à®¤à¯
+find_match_case_label=பேரெழà¯à®¤à¯à®¤à®¾à®•à¯à®•à®¤à¯à®¤à¯ˆ உணரà¯
+find_reached_top=ஆவணதà¯à®¤à®¿à®©à¯ மேல௠பகà¯à®¤à®¿à®¯à¯ˆ அடைநà¯à®¤à®¤à¯, அடிபà¯à®ªà®•à¯à®•à®¤à¯à®¤à®¿à®²à®¿à®°à¯à®¨à¯à®¤à¯ தொடரà¯à®¨à¯à®¤à®¤à¯
+find_reached_bottom=ஆவணதà¯à®¤à®¿à®©à¯ à®®à¯à®Ÿà®¿à®µà¯ˆ அடைநà¯à®¤à®¤à¯, மேலிரà¯à®¨à¯à®¤à¯ தொடரà¯à®¨à¯à®¤à®¤à¯
+find_not_found=சொறà¯à®±à¯Šà®Ÿà®°à¯ காணவிலà¯à®²à¯ˆ
+
+# Error panel labels
+error_more_info=கூடà¯à®¤à®²à¯ தகவலà¯
+error_less_info=கà¯à®±à¯ˆà®¨à¯à®¤ தகவலà¯
+error_close=மூடà¯à®•
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=செயà¯à®¤à®¿: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=ஸà¯à®Ÿà¯‡à®•à¯: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=கோபà¯à®ªà¯: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=வரி: {{line}}
+rendering_error=இநà¯à®¤à®ªà¯ பகà¯à®•à®¤à¯à®¤à¯ˆ காடà¯à®šà®¿à®ªà¯à®ªà®Ÿà¯à®¤à¯à®¤à¯à®®à¯ போத௠ஒர௠பிழை à®à®±à¯à®ªà®Ÿà¯à®Ÿà®¤à¯.
+
+# Predefined zoom values
+page_scale_width=பகà¯à®• அகலமà¯
+page_scale_fit=பகà¯à®•à®ªà¯ பொரà¯à®¤à¯à®¤à®®à¯
+page_scale_auto=தானியகà¯à®• பெரிதாகà¯à®•à®²à¯
+page_scale_actual=உணà¯à®®à¯ˆà®¯à®¾à®© அளவà¯
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=பிழை
+loading_error=PDF à® à®à®±à¯à®±à¯à®®à¯ போத௠ஒர௠பிழை à®à®±à¯à®ªà®Ÿà¯à®Ÿà®¤à¯.
+invalid_file_error=செலà¯à®²à¯à®ªà®Ÿà®¿à®¯à®¾à®•à®¾à®¤ அலà¯à®²à®¤à¯ சிதைநà¯à®¤ PDF கோபà¯à®ªà¯.
+missing_file_error=PDF கோபà¯à®ªà¯ காணவிலà¯à®²à¯ˆ.
+unexpected_response_error=சேவகன௠பதில௠எதிரà¯à®ªà®¾à®°à®¤à®¤à¯.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} விளகà¯à®•à®®à¯]
+password_label=இநà¯à®¤ PDF கோபà¯à®ªà¯ˆ திறகà¯à®• கடவà¯à®šà¯à®šà¯†à®¾à®²à¯à®²à¯ˆ உளà¯à®³à®¿à®Ÿà®µà¯à®®à¯.
+password_invalid=செலà¯à®²à¯à®ªà®Ÿà®¿à®¯à®¾à®•à®¾à®¤ கடவà¯à®šà¯à®šà¯Šà®²à¯, தயை செயà¯à®¤à¯ மீணà¯à®Ÿà¯à®®à¯ à®®à¯à®¯à®±à¯à®šà®¿ செயà¯à®•.
+password_ok=சரி
+password_cancel=ரதà¯à®¤à¯
+
+printing_not_supported=எசà¯à®šà®°à®¿à®•à¯à®•à¯ˆ: இநà¯à®¤ உலாவி அசà¯à®šà®¿à®Ÿà¯à®¤à®²à¯ˆ à®®à¯à®´à¯à®®à¯ˆà®¯à®¾à®• ஆதரிகà¯à®•à®µà®¿à®²à¯à®²à¯ˆ.
+printing_not_ready=எசà¯à®šà®°à®¿à®•à¯à®•à¯ˆ: PDF அசà¯à®šà®¿à®Ÿ à®®à¯à®´à¯à®µà®¤à¯à®®à®¾à®• à®à®±à¯à®±à®ªà¯à®ªà®Ÿà®µà®¿à®²à¯à®²à¯ˆ.
+web_fonts_disabled=வலை எழà¯à®¤à¯à®¤à¯à®°à¯à®•à¯à®•à®³à¯ à®®à¯à®Ÿà®•à¯à®•à®ªà¯à®ªà®Ÿà¯à®Ÿà¯à®³à¯à®³à®©: உடà¯à®ªà¯Šà®¤à®¿à®•à¯à®•à®ªà¯à®ªà®Ÿà¯à®Ÿ PDF எழà¯à®¤à¯à®¤à¯à®°à¯à®•à¯à®•à®³à¯ˆà®ªà¯ பயனà¯à®ªà®Ÿà¯à®¤à¯à®¤ à®®à¯à®Ÿà®¿à®¯à®µà®¿à®²à¯à®²à¯ˆ.
+document_colors_not_allowed=PDF ஆவணஙà¯à®•à®³à¯à®•à¯à®•à¯à®šà¯ சொநà¯à®¤ நிறஙà¯à®•à®³à¯ˆà®ªà¯ பயனà¯à®ªà®Ÿà¯à®¤à¯à®¤ அனà¯à®®à®¤à®¿à®¯à®¿à®²à¯à®²à¯ˆ: உலாவியில௠"பகà¯à®•à®™à¯à®•à®³à¯ தஙà¯à®•à®³à¯ சொநà¯à®¤ நிறஙà¯à®•à®³à¯ˆà®¤à¯ தேரà¯à®µà¯ செயà¯à®¤à¯à®•à¯Šà®³à¯à®³ அனà¯à®®à®¤à®¿" எனà¯à®©à¯à®®à¯ விரà¯à®ªà¯à®ªà®®à¯ à®®à¯à®Ÿà®•à¯à®•à®ªà¯à®ªà®Ÿà¯à®Ÿà¯à®³à¯à®³à®¤à¯.
diff --git a/js/pdfjs/web/locale/te/viewer.properties b/js/pdfjs/web/locale/te/viewer.properties
new file mode 100644
index 0000000..56f954d
--- /dev/null
+++ b/js/pdfjs/web/locale/te/viewer.properties
@@ -0,0 +1,222 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=à°®à±à°¨à±à°ªà°Ÿà°¿ పేజీ
+previous_label=à°•à±à°°à°¿à°¤à°‚
+next.title=తరà±à°µà°¾à°¤ పేజీ
+next_label=తరà±à°µà°¾à°¤
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=పేజీ
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=మొతà±à°¤à°‚ {{pagesCount}} లో
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=(మొతà±à°¤à°‚ {{pagesCount}} లో {{pageNumber}}వది)
+
+zoom_out.title=జూమౠతగà±à°—à°¿à°‚à°šà±
+zoom_out_label=జూమౠతగà±à°—à°¿à°‚à°šà±
+zoom_in.title=జూమౠచేయి
+zoom_in_label=జూమౠచేయి
+zoom.title=జూమà±
+presentation_mode.title=à°ªà±à°°à°¦à°°à±à°¶à°¨à°¾ రీతికి మారà±
+presentation_mode_label=à°ªà±à°°à°¦à°°à±à°¶à°¨à°¾ రీతి
+open_file.title=ఫైలౠతెరà±à°µà±
+open_file_label=తెరà±à°µà±
+print.title=à°®à±à°¦à±à°°à°¿à°‚à°šà±
+print_label=à°®à±à°¦à±à°°à°¿à°‚à°šà±
+download.title=దింపà±à°•à±‹à°³à±à°³à±
+download_label=దింపà±à°•à±‹à°³à±à°³à±
+bookmark.title=à°ªà±à°°à°¸à±à°¤à±à°¤ దరà±à°¶à°¨à°‚ (కాపీ చేయి లేదా కొతà±à°¤ విండోలో తెరà±à°µà±)
+bookmark_label=à°ªà±à°°à°¸à±à°¤à±à°¤ దరà±à°¶à°¨à°‚
+
+# Secondary toolbar and context menu
+tools.title=పనిమà±à°Ÿà±à°²à±
+tools_label=పనిమà±à°Ÿà±à°²à±
+first_page.title=మొదటి పేజీకి వెళà±à°³à±
+first_page.label=మొదటి పేజీకి వెళà±à°³à±
+first_page_label=మొదటి పేజీకి వెళà±à°³à±
+last_page.title=చివరి పేజీకి వెళà±à°³à±
+last_page.label=చివరి పేజీకి వెళà±à°³à±
+last_page_label=చివరి పేజీకి వెళà±à°³à±
+page_rotate_cw.title=సవà±à°¯à°¦à°¿à°¶à°²à±‹ తిపà±à°ªà±
+page_rotate_cw.label=సవà±à°¯à°¦à°¿à°¶à°²à±‹ తిపà±à°ªà±
+page_rotate_cw_label=సవà±à°¯à°¦à°¿à°¶à°²à±‹ తిపà±à°ªà±
+page_rotate_ccw.title=అపసవà±à°¯à°¦à°¿à°¶à°²à±‹ తిపà±à°ªà±
+page_rotate_ccw.label=అపసవà±à°¯à°¦à°¿à°¶à°²à±‹ తిపà±à°ªà±
+page_rotate_ccw_label=అపసవà±à°¯à°¦à°¿à°¶à°²à±‹ తిపà±à°ªà±
+
+cursor_text_select_tool.title=టెకà±à°¸à±à°Ÿà± ఎంపిక సాధనానà±à°¨à°¿ à°ªà±à°°à°¾à°°à°‚à°­à°¿à°‚à°šà°‚à°¡à°¿
+cursor_text_select_tool_label=టెకà±à°¸à±à°Ÿà± ఎంపిక సాధనం
+cursor_hand_tool.title=చేతి సాధనం చేతనించà±
+cursor_hand_tool_label=చేతి సాధనం
+
+scroll_vertical_label=నిలà±à°µà± à°¸à±à°•à±à°°à±‹à°²à°¿à°‚à°—à±
+
+
+# Document properties dialog box
+document_properties.title=పతà±à°°à°®à± లకà±à°·à°£à°¾à°²à±...
+document_properties_label=పతà±à°°à°®à± లకà±à°·à°£à°¾à°²à±...
+document_properties_file_name=దసà±à°¤à±à°°à°‚ పేరà±:
+document_properties_file_size=దసà±à°¤à±à°°à°‚ పరిమాణం:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=శీరà±à°·à°¿à°•:
+document_properties_author=మూలకరà±à°¤:
+document_properties_subject=విషయం:
+document_properties_keywords=à°•à±€ పదాలà±:
+document_properties_creation_date=సృషà±à°Ÿà°¿à°‚à°šà°¿à°¨ తేదీ:
+document_properties_modification_date=సవరించిన తేదీ:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=సృషà±à°Ÿà°¿à°•à°°à±à°¤:
+document_properties_producer=PDF ఉతà±à°ªà°¾à°¦à°•à°¿:
+document_properties_version=PDF వరà±à°·à°¨à±:
+document_properties_page_count=పేజీల సంఖà±à°¯:
+document_properties_page_size=కాగితం పరిమాణం:
+document_properties_page_size_unit_inches=లో
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=నిలà±à°µà±à°šà°¿à°¤à±à°°à°‚
+document_properties_page_size_orientation_landscape=à°…à°¡à±à°¡à°šà°¿à°¤à±à°°à°‚
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=లేఖ
+document_properties_page_size_name_legal=à°šà°Ÿà±à°Ÿà°ªà°°à°®à±†à±–à°¨
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized_yes=à°…à°µà±à°¨à±
+document_properties_linearized_no=కాదà±
+document_properties_close=మూసివేయి
+
+print_progress_message=à°®à±à°¦à±à°°à°¿à°‚చడానికి పతà±à°°à°®à± సిదà±à°§à°®à°µà±à°¤à±à°¨à±à°¨à°¦à°¿â€¦
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=à°°à°¦à±à°¦à±à°šà±‡à°¯à°¿
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=పకà±à°•à°ªà°Ÿà±à°Ÿà±€ మారà±à°šà±
+toggle_sidebar_label=పకà±à°•à°ªà°Ÿà±à°Ÿà±€ మారà±à°šà±
+document_outline.title=పతà±à°°à°®à± రూపమౠచూపించౠ(à°¡à°¬à±à°²à± à°•à±à°²à°¿à°•à± చేసి à°…à°¨à±à°¨à°¿ అంశాలనౠవిసà±à°¤à°°à°¿à°‚à°šà±/కూలà±à°šà±)
+document_outline_label=పతà±à°°à°®à± à°…à°µà±à°Ÿà±â€Œà°²à±ˆà°¨à±
+attachments.title=à°…à°¨à±à°¬à°‚ధాలౠచూపà±
+attachments_label=à°…à°¨à±à°¬à°‚ధాలà±
+thumbs.title=థంబà±â€Œà°¨à±ˆà°²à±à°¸à± చూపà±
+thumbs_label=థంబà±â€Œà°¨à±ˆà°²à±à°¸à±
+findbar.title=పతà±à°°à°®à±à°²à±‹ à°•à°¨à±à°—ొనà±à°®à±
+findbar_label=à°•à°¨à±à°—ొనà±
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=పేజీ {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas={{page}} పేజీ నఖచితà±à°°à°‚
+
+# Find panel button title and messages
+find_input.title=à°•à°¨à±à°—ొనà±
+find_input.placeholder=పతà±à°°à°®à±à°²à±‹ à°•à°¨à±à°—ొనà±â€¦
+find_previous.title=పదం యొకà±à°• à°®à±à°‚దౠసంభవానà±à°¨à°¿ à°•à°¨à±à°—ొనà±
+find_previous_label=à°®à±à°¨à±à°ªà°Ÿà°¿
+find_next.title=పదం యొకà±à°• తరà±à°µà°¾à°¤à°¿ సంభవానà±à°¨à°¿ à°•à°¨à±à°—ొనà±
+find_next_label=తరà±à°µà°¾à°¤
+find_highlight=à°…à°¨à±à°¨à°¿à°Ÿà°¿à°¨à°¿ ఉదà±à°¦à±€à°ªà°¨à°‚ చేయà±à°®à±
+find_match_case_label=à°…à°•à±à°·à°°à°®à±à°² తేడాతో పోలà±à°šà±
+find_entire_word_label=పూరà±à°¤à°¿ పదాలà±
+find_reached_top=పేజీ పైకి చేరà±à°•à±à°¨à±à°¨à°¦à°¿, à°•à±à°°à°¿à°‚ది à°¨à±à°‚à°¡à°¿ కొనసాగించండి
+find_reached_bottom=పేజీ చివరకౠచేరà±à°•à±à°¨à±à°¨à°¦à°¿, పైనà±à°‚à°¡à°¿ కొనసాగించండి
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_not_found=పదబంధం కనబడలేదà±
+
+# Error panel labels
+error_more_info=మరింత సమాచారం
+error_less_info=తకà±à°•à±à°µ సమాచారం
+error_close=మూసివేయి
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=సందేశం: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=à°¸à±à°Ÿà°¾à°•à±: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=ఫైలà±: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=వరà±à°¸: {{line}}
+rendering_error=పేజీనౠరెండరౠచేయà±à°Ÿà°²à±‹ à°’à°• దోషం à°Žà°¦à±à°°à±ˆà°‚ది.
+
+# Predefined zoom values
+page_scale_width=పేజీ వెడలà±à°ªà±
+page_scale_fit=పేజీ అమరà±à°ªà±
+page_scale_auto=à°¸à±à°µà°¯à°‚చాలక జూమà±
+page_scale_actual=యథారà±à°§ పరిమాణం
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=దోషం
+loading_error=PDF లోడవà±à°šà±à°¨à±à°¨à°ªà±à°ªà±à°¡à± à°’à°• దోషం à°Žà°¦à±à°°à±ˆà°‚ది.
+invalid_file_error=చెలà±à°²à°¨à°¿ లేదా పాడైన PDF ఫైలà±.
+missing_file_error=దొరకని PDF ఫైలà±.
+unexpected_response_error=à°…à°¨à±à°•à±‹à°¨à°¿ సరà±à°µà°°à± à°¸à±à°ªà°‚దన.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} టీకా]
+password_label=à°ˆ PDF ఫైలౠతెరà±à°šà±à°Ÿà°•à± సంకేతపదం à°ªà±à°°à°µà±‡à°¶à°ªà±†à°Ÿà±à°Ÿà±à°®à±.
+password_invalid=సంకేతపదం చెలà±à°²à°¦à±. దయచేసి మళà±à°³à±€ à°ªà±à°°à°¯à°¤à±à°¨à°¿à°‚à°šà°‚à°¡à°¿.
+password_ok=సరే
+password_cancel=à°°à°¦à±à°¦à±à°šà±‡à°¯à°¿
+
+printing_not_supported=హెచà±à°šà°°à°¿à°•: à°ˆ విహారిణి చేత à°®à±à°¦à±à°°à°£ పూరà±à°¤à°¿à°—à°¾ తోడà±à°ªà°¾à°Ÿà± లేదà±.
+printing_not_ready=హెచà±à°šà°°à°¿à°•: à°®à±à°¦à±à°°à°£ కొరకౠఈ PDF పూరà±à°¤à°¿à°—à°¾ లోడవలేదà±.
+web_fonts_disabled=వెబౠఫాంటà±à°²à± అచేతనించబడెనà±: ఎంబెడెడౠPDF ఫాంటà±à°²à± ఉపయోగించలేక పోయింది.
+document_colors_not_allowed=PDF పతà±à°°à°¾à°²à± వాటి à°¸à±à°µà°‚à°¤ à°°à°‚à°—à±à°²à°¨à± ఉపయోగించà±à°•à±Šà°¨à±à°Ÿà°•à± à°…à°¨à±à°®à°¤à°¿à°‚చబడవà±: విహరణి నందౠ“పేజీలనౠవాటి à°¸à±à°µà°‚à°¤ à°°à°‚à°—à±à°²à°¨à± à°Žà°‚à°šà±à°•à±Šà°¨à±à°Ÿà°•à± à°…à°¨à±à°®à°¤à°¿à°‚à°šà±â€ అచేతనం చేయబడివà±à°‚ది.
diff --git a/js/pdfjs/web/locale/th/viewer.properties b/js/pdfjs/web/locale/th/viewer.properties
new file mode 100644
index 0000000..b66865f
--- /dev/null
+++ b/js/pdfjs/web/locale/th/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=หน้าà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²
+previous_label=à¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²
+next.title=หน้าถัดไป
+next_label=ถัดไป
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=หน้า
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=จาภ{{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} จาภ{{pagesCount}})
+
+zoom_out.title=ซูมออà¸
+zoom_out_label=ซูมออà¸
+zoom_in.title=ซูมเข้า
+zoom_in_label=ซูมเข้า
+zoom.title=ซูม
+presentation_mode.title=สลับเป็นโหมดà¸à¸²à¸£à¸™à¸³à¹€à¸ªà¸™à¸­
+presentation_mode_label=โหมดà¸à¸²à¸£à¸™à¸³à¹€à¸ªà¸™à¸­
+open_file.title=เปิดไฟล์
+open_file_label=เปิด
+print.title=พิมพ์
+print_label=พิมพ์
+download.title=ดาวน์โหลด
+download_label=ดาวน์โหลด
+bookmark.title=มุมมองปัจจุบัน (คัดลอà¸à¸«à¸£à¸·à¸­à¹€à¸›à¸´à¸”ในหน้าต่างใหม่)
+bookmark_label=มุมมองปัจจุบัน
+
+# Secondary toolbar and context menu
+tools.title=เครื่องมือ
+tools_label=เครื่องมือ
+first_page.title=ไปยังหน้าà¹à¸£à¸
+first_page.label=ไปยังหน้าà¹à¸£à¸
+first_page_label=ไปยังหน้าà¹à¸£à¸
+last_page.title=ไปยังหน้าสุดท้าย
+last_page.label=ไปยังหน้าสุดท้าย
+last_page_label=ไปยังหน้าสุดท้าย
+page_rotate_cw.title=หมุนตามเข็มนาฬิà¸à¸²
+page_rotate_cw.label=หมุนตามเข็มนาฬิà¸à¸²
+page_rotate_cw_label=หมุนตามเข็มนาฬิà¸à¸²
+page_rotate_ccw.title=หมุนทวนเข็มนาฬิà¸à¸²
+page_rotate_ccw.label=หมุนทวนเข็มนาฬิà¸à¸²
+page_rotate_ccw_label=หมุนทวนเข็มนาฬิà¸à¸²
+
+cursor_text_select_tool.title=เปิดใช้งานเครื่องมือà¸à¸²à¸£à¹€à¸¥à¸·à¸­à¸à¸‚้อความ
+cursor_text_select_tool_label=เครื่องมือà¸à¸²à¸£à¹€à¸¥à¸·à¸­à¸à¸‚้อความ
+cursor_hand_tool.title=เปิดใช้งานเครื่องมือมือ
+cursor_hand_tool_label=เครื่องมือมือ
+
+scroll_vertical.title=ใช้à¸à¸²à¸£à¹€à¸¥à¸·à¹ˆà¸­à¸™à¹à¸™à¸§à¸•à¸±à¹‰à¸‡
+scroll_vertical_label=à¸à¸²à¸£à¹€à¸¥à¸·à¹ˆà¸­à¸™à¹à¸™à¸§à¸•à¸±à¹‰à¸‡
+scroll_horizontal.title=ใช้à¸à¸²à¸£à¹€à¸¥à¸·à¹ˆà¸­à¸™à¹à¸™à¸§à¸™à¸­à¸™
+scroll_horizontal_label=à¸à¸²à¸£à¹€à¸¥à¸·à¹ˆà¸­à¸™à¹à¸™à¸§à¸™à¸­à¸™
+scroll_wrapped.title=ใช้à¸à¸²à¸£à¹€à¸¥à¸·à¹ˆà¸­à¸™à¹à¸šà¸šà¸„ลุม
+scroll_wrapped_label=เลื่อนà¹à¸šà¸šà¸„ลุม
+
+spread_none.title=ไม่ต้องรวมà¸à¸²à¸£à¸à¸£à¸°à¸ˆà¸²à¸¢à¸«à¸™à¹‰à¸²
+spread_none_label=ไม่à¸à¸£à¸°à¸ˆà¸²à¸¢
+spread_odd.title=รวมà¸à¸²à¸£à¸à¸£à¸°à¸ˆà¸²à¸¢à¸«à¸™à¹‰à¸²à¹€à¸£à¸´à¹ˆà¸¡à¸ˆà¸²à¸à¸«à¸™à¹‰à¸²à¸„ี่
+spread_odd_label=à¸à¸£à¸°à¸ˆà¸²à¸¢à¸­à¸¢à¹ˆà¸²à¸‡à¹€à¸«à¸¥à¸·à¸­à¹€à¸¨à¸©
+spread_even.title=รวมà¸à¸²à¸£à¸à¸£à¸°à¸ˆà¸²à¸¢à¸«à¸™à¹‰à¸²à¹€à¸£à¸´à¹ˆà¸¡à¸ˆà¸²à¸à¸«à¸™à¹‰à¸²à¸„ู่
+spread_even_label=à¸à¸£à¸°à¸ˆà¸²à¸¢à¸­à¸¢à¹ˆà¸²à¸‡à¹€à¸—่าเทียม
+
+# Document properties dialog box
+document_properties.title=คุณสมบัติเอà¸à¸ªà¸²à¸£â€¦
+document_properties_label=คุณสมบัติเอà¸à¸ªà¸²à¸£â€¦
+document_properties_file_name=ชื่อไฟล์:
+document_properties_file_size=ขนาดไฟล์:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} ไบต์)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} ไบต์)
+document_properties_title=ชื่อเรื่อง:
+document_properties_author=ผู้สร้าง:
+document_properties_subject=ชื่อเรื่อง:
+document_properties_keywords=คำสำคัà¸:
+document_properties_creation_date=วันที่สร้าง:
+document_properties_modification_date=วันที่à¹à¸à¹‰à¹„ข:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=ผู้สร้าง:
+document_properties_producer=ผู้ผลิต PDF:
+document_properties_version=รุ่น PDF:
+document_properties_page_count=จำนวนหน้า:
+document_properties_page_size=ขนาดหน้า:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=à¹à¸™à¸§à¸•à¸±à¹‰à¸‡
+document_properties_page_size_orientation_landscape=à¹à¸™à¸§à¸™à¸­à¸™
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=จดหมาย
+document_properties_page_size_name_legal=ข้อà¸à¸Žà¸«à¸¡à¸²à¸¢
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=มุมมองเว็บà¹à¸šà¸šà¸£à¸§à¸”เร็ว:
+document_properties_linearized_yes=ใช่
+document_properties_linearized_no=ไม่
+document_properties_close=ปิด
+
+print_progress_message=à¸à¸³à¸¥à¸±à¸‡à¹€à¸•à¸£à¸µà¸¢à¸¡à¹€à¸­à¸à¸ªà¸²à¸£à¸ªà¸³à¸«à¸£à¸±à¸šà¸à¸²à¸£à¸žà¸´à¸¡à¸žà¹Œâ€¦
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=ยà¸à¹€à¸¥à¸´à¸
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=เปิด/ปิดà¹à¸–บข้าง
+toggle_sidebar_notification.title=เปิด/ปิดà¹à¸–บข้าง (เอà¸à¸ªà¸²à¸£à¸¡à¸µà¹€à¸„้าร่าง/ไฟล์à¹à¸™à¸š)
+toggle_sidebar_label=เปิด/ปิดà¹à¸–บข้าง
+document_outline.title=à¹à¸ªà¸”งเค้าร่างเอà¸à¸ªà¸²à¸£ (คลิà¸à¸ªà¸­à¸‡à¸„รั้งเพื่อขยาย/ยุบรายà¸à¸²à¸£à¸—ั้งหมด)
+document_outline_label=เค้าร่างเอà¸à¸ªà¸²à¸£
+attachments.title=à¹à¸ªà¸”งไฟล์à¹à¸™à¸š
+attachments_label=ไฟล์à¹à¸™à¸š
+thumbs.title=à¹à¸ªà¸”งภาพขนาดย่อ
+thumbs_label=ภาพขนาดย่อ
+findbar.title=ค้นหาในเอà¸à¸ªà¸²à¸£
+findbar_label=ค้นหา
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=หน้า {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=หน้า {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=ภาพขนาดย่อของหน้า {{page}}
+
+# Find panel button title and messages
+find_input.title=ค้นหา
+find_input.placeholder=ค้นหาในเอà¸à¸ªà¸²à¸£â€¦
+find_previous.title=หาตำà¹à¸«à¸™à¹ˆà¸‡à¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²à¸‚องวลี
+find_previous_label=à¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²
+find_next.title=หาตำà¹à¸«à¸™à¹ˆà¸‡à¸–ัดไปของวลี
+find_next_label=ถัดไป
+find_highlight=เน้นสีทั้งหมด
+find_match_case_label=ตัวพิมพ์ใหà¸à¹ˆà¹€à¸¥à¹‡à¸à¸•à¸£à¸‡à¸à¸±à¸™
+find_entire_word_label=ทั้งคำ
+find_reached_top=ค้นหาถึงจุดเริ่มต้นของหน้า เริ่มค้นต่อจาà¸à¸”้านล่าง
+find_reached_bottom=ค้นหาถึงจุดสิ้นสุดหน้า เริ่มค้นต่อจาà¸à¸”้านบน
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} จาภ{{total}} ที่ตรงà¸à¸±à¸™
+find_match_count[two]={{current}} จาภ{{total}} ที่ตรงà¸à¸±à¸™
+find_match_count[few]={{current}} จาภ{{total}} ที่ตรงà¸à¸±à¸™
+find_match_count[many]={{current}} จาภ{{total}} ที่ตรงà¸à¸±à¸™
+find_match_count[other]={{current}} จาภ{{total}} ที่ตรงà¸à¸±à¸™
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=มาà¸à¸à¸§à¹ˆà¸² {{limit}} ที่ตรงà¸à¸±à¸™
+find_match_count_limit[one]=มาà¸à¸à¸§à¹ˆà¸² {{limit}} ที่ตรงà¸à¸±à¸™
+find_match_count_limit[two]=มาà¸à¸à¸§à¹ˆà¸² {{limit}} ที่ตรงà¸à¸±à¸™
+find_match_count_limit[few]=มาà¸à¸à¸§à¹ˆà¸² {{limit}} ที่ตรงà¸à¸±à¸™
+find_match_count_limit[many]=มาà¸à¸à¸§à¹ˆà¸² {{limit}} ที่ตรงà¸à¸±à¸™
+find_match_count_limit[other]=มาà¸à¸à¸§à¹ˆà¸² {{limit}} ที่ตรงà¸à¸±à¸™
+find_not_found=ไม่พบวลี
+
+# Error panel labels
+error_more_info=ข้อมูลเพิ่มเติม
+error_less_info=ข้อมูลน้อยลง
+error_close=ปิด
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=ข้อความ: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=สà¹à¸•à¸: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=ไฟล์: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=บรรทัด: {{line}}
+rendering_error=เà¸à¸´à¸”ข้อผิดพลาดขณะเรนเดอร์หน้า
+
+# Predefined zoom values
+page_scale_width=ความà¸à¸§à¹‰à¸²à¸‡à¸«à¸™à¹‰à¸²
+page_scale_fit=พอดีหน้า
+page_scale_auto=ซูมอัตโนมัติ
+page_scale_actual=ขนาดจริง
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=ข้อผิดพลาด
+loading_error=เà¸à¸´à¸”ข้อผิดพลาดขณะโหลด PDF
+invalid_file_error=ไฟล์ PDF ไม่ถูà¸à¸•à¹‰à¸­à¸‡à¸«à¸£à¸·à¸­à¹€à¸ªà¸µà¸¢à¸«à¸²à¸¢
+missing_file_error=ไฟล์ PDF หายไป
+unexpected_response_error=à¸à¸²à¸£à¸•à¸­à¸šà¸ªà¸™à¸­à¸‡à¸‚องเซิร์ฟเวอร์ที่ไม่คาดคิด
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[คำอธิบายประà¸à¸­à¸š {{type}}]
+password_label=ป้อนรหัสผ่านเพื่อเปิดไฟล์ PDF นี้
+password_invalid=รหัสผ่านไม่ถูà¸à¸•à¹‰à¸­à¸‡ โปรดลองอีà¸à¸„รั้ง
+password_ok=ตà¸à¸¥à¸‡
+password_cancel=ยà¸à¹€à¸¥à¸´à¸
+
+printing_not_supported=คำเตือน: เบราว์เซอร์นี้ไม่ได้สนับสนุนà¸à¸²à¸£à¸žà¸´à¸¡à¸žà¹Œà¸­à¸¢à¹ˆà¸²à¸‡à¹€à¸•à¹‡à¸¡à¸—ี่
+printing_not_ready=คำเตือน: PDF ไม่ได้รับà¸à¸²à¸£à¹‚หลดอย่างเต็มที่สำหรับà¸à¸²à¸£à¸žà¸´à¸¡à¸žà¹Œ
+web_fonts_disabled=à¹à¸šà¸šà¸­à¸±à¸à¸©à¸£à¹€à¸§à¹‡à¸šà¸–ูà¸à¸›à¸´à¸”ใช้งาน: ไม่สามารถใช้à¹à¸šà¸šà¸­à¸±à¸à¸©à¸£ PDF à¸à¸±à¸‡à¸•à¸±à¸§
+document_colors_not_allowed=เอà¸à¸ªà¸²à¸£ PDF ไม่ได้รับอนุà¸à¸²à¸•à¹ƒà¸«à¹‰à¹ƒà¸Šà¹‰à¸ªà¸µà¸‚องตัวเอง: "อนุà¸à¸²à¸•à¹ƒà¸«à¹‰à¸«à¸™à¹‰à¸²à¹€à¸­à¸à¸ªà¸²à¸£à¸ªà¸²à¸¡à¸²à¸£à¸–เลือà¸à¸ªà¸µà¸‚องตัวเอง" ถูà¸à¸›à¸´à¸”ใช้งานในเบราว์เซอร์
diff --git a/js/pdfjs/web/locale/tl/viewer.properties b/js/pdfjs/web/locale/tl/viewer.properties
new file mode 100644
index 0000000..32b3483
--- /dev/null
+++ b/js/pdfjs/web/locale/tl/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Naunang Pahina
+previous_label=Nakaraan
+next.title=Sunod na Pahina
+next_label=Sunod
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Pahina
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=ng {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} ng {{pagesCount}})
+
+zoom_out.title=Paliitin
+zoom_out_label=Paliitin
+zoom_in.title=Palakihin
+zoom_in_label=Palakihin
+zoom.title=Mag-zoom
+presentation_mode.title=Switch to Presentation Mode
+presentation_mode_label=Presentation Mode
+open_file.title=Magbukas ng file
+open_file_label=Buksan
+print.title=i-Print
+print_label=i-Print
+download.title=Download
+download_label=Download
+bookmark.title=Kasalukuyang tingin (kopyahin o buksan sa bagong window)
+bookmark_label=Kasalukuyang tingin
+
+# Secondary toolbar and context menu
+tools.title=Mga Kagamitan
+tools_label=Mga Kagamitan
+first_page.title=Pumunta sa Unang Pahina
+first_page.label=Pumunta sa Unang Pahina
+first_page_label=Pumunta sa Unang Pahina
+last_page.title=Pumunta sa Huling Pahina
+last_page.label=Pumunta sa Huling Pahina
+last_page_label=Pumunta sa Huling Pahina
+page_rotate_cw.title=Paikutin ang Clockwise
+page_rotate_cw.label=Paikutin ang Clockwise
+page_rotate_cw_label=Paikutin ang Clockwise
+page_rotate_ccw.title=Paikutin ang Counterclockwise
+page_rotate_ccw.label=Paikutin ang Counterclockwise
+page_rotate_ccw_label=Paikutin ang Counterclockwise
+
+cursor_text_select_tool.title=Enable Text Selection Tool
+cursor_text_select_tool_label=Text Selection Tool
+cursor_hand_tool.title=Enable Hand Tool
+cursor_hand_tool_label=Hand Tool
+
+scroll_vertical.title=Use Vertical Scrolling
+scroll_vertical_label=Vertical Scrolling
+scroll_horizontal.title=Use Horizontal Scrolling
+scroll_horizontal_label=Horizontal Scrolling
+scroll_wrapped.title=Use Wrapped Scrolling
+scroll_wrapped_label=Wrapped Scrolling
+
+spread_none.title=Do not join page spreads
+spread_none_label=No Spreads
+spread_odd.title=Join page spreads starting with odd-numbered pages
+spread_odd_label=Odd Spreads
+spread_even.title=Join page spreads starting with even-numbered pages
+spread_even_label=Even Spreads
+
+# Document properties dialog box
+document_properties.title=Document Properties…
+document_properties_label=Document Properties…
+document_properties_file_name=File name:
+document_properties_file_size=File size:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Pamagat:
+document_properties_author=May Akda:
+document_properties_subject=Subject:
+document_properties_keywords=Mga keyword:
+document_properties_creation_date=Creation Date:
+document_properties_modification_date=Modification Date:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Creator:
+document_properties_producer=PDF Producer:
+document_properties_version=PDF Version:
+document_properties_page_count=Page Count:
+document_properties_page_size=Page Size:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=portrait
+document_properties_page_size_orientation_landscape=landscape
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Fast Web View:
+document_properties_linearized_yes=Oo
+document_properties_linearized_no=Hindi
+document_properties_close=Isara
+
+print_progress_message=Preparing document for printing…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Kanselahin
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Toggle Sidebar
+toggle_sidebar_notification.title=Toggle Sidebar (document contains outline/attachments)
+toggle_sidebar_label=Toggle Sidebar
+document_outline.title=Show Document Outline (double-click to expand/collapse all items)
+document_outline_label=Document Outline
+attachments.title=Show Attachments
+attachments_label=Attachments
+thumbs.title=Ipakita ang mga Thumbnails
+thumbs_label=Thumbnails
+findbar.title=Find in Document
+findbar_label=Hanapin
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Pahina {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Pahina {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Thumbnail ng Pahina {{page}}
+
+# Find panel button title and messages
+find_input.title=Hanapin
+find_input.placeholder=Find in document…
+find_previous.title=Hanapin ang nakaraang pangyayari ng parirala
+find_previous_label=Nakaraang
+find_next.title=Hanapin ang susunod na pangyayari ng parirala
+find_next_label=Susunod
+find_highlight=I-highlight lahat
+find_match_case_label=Match case
+find_entire_word_label=Whole words
+find_reached_top=Reached top of document, continued from bottom
+find_reached_bottom=Reached end of document, continued from top
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} of {{total}} match
+find_match_count[two]={{current}} of {{total}} matches
+find_match_count[few]={{current}} of {{total}} matches
+find_match_count[many]={{current}} of {{total}} matches
+find_match_count[other]={{current}} of {{total}} matches
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=More than {{limit}} matches
+find_match_count_limit[one]=More than {{limit}} match
+find_match_count_limit[two]=More than {{limit}} matches
+find_match_count_limit[few]=More than {{limit}} matches
+find_match_count_limit[many]=More than {{limit}} matches
+find_match_count_limit[other]=More than {{limit}} matches
+find_not_found=Hindi nakita ang prasko
+
+# Error panel labels
+error_more_info=Karagdagang Impormasyon
+error_less_info=Mas Kaunting Impormasyon
+error_close=Sarado
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Mensahe: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stack: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=File: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Linya: {{line}}
+rendering_error=May naganap na pagkakamali habang pagsasalin sa pahina.
+
+# Predefined zoom values
+page_scale_width=Lapad ng Pahina
+page_scale_fit=ang pahina ay angkop
+page_scale_auto=Automatic Zoom
+page_scale_actual=Totoong sukat
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Error
+loading_error=May maling nangyari habang kinakarga ang PDF.
+invalid_file_error=Di-wasto o masira ang PDF file.
+missing_file_error=Nawawalang PDF file.
+unexpected_response_error=Hindi inaasahang tugon ng server.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Annotation]
+password_label=Ipasok ang password upang buksan ang PDF file na ito.
+password_invalid=Invalid password. Please try again.
+password_ok=OK
+password_cancel=Kanselahin
+
+printing_not_supported=Warning: Printing is not fully supported by this browser.
+printing_not_ready=Warning: The PDF is not fully loaded for printing.
+web_fonts_disabled=Web fonts are disabled: unable to use embedded PDF fonts.
+document_colors_not_allowed=PDF documents are not allowed to use their own colors: “Allow pages to choose their own colors†is deactivated in the browser.
diff --git a/js/pdfjs/web/locale/tr/viewer.properties b/js/pdfjs/web/locale/tr/viewer.properties
new file mode 100644
index 0000000..f398fc9
--- /dev/null
+++ b/js/pdfjs/web/locale/tr/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Önceki sayfa
+previous_label=Önceki
+next.title=Sonraki sayfa
+next_label=Sonraki
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Sayfa
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=/ {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} / {{pagesCount}})
+
+zoom_out.title=Uzaklaştır
+zoom_out_label=Uzaklaştır
+zoom_in.title=Yaklaştır
+zoom_in_label=Yaklaştır
+zoom.title=Yakınlaştırma
+presentation_mode.title=Sunum moduna geç
+presentation_mode_label=Sunum Modu
+open_file.title=Dosya aç
+open_file_label=Aç
+print.title=Yazdır
+print_label=Yazdır
+download.title=Ä°ndir
+download_label=Ä°ndir
+bookmark.title=Geçerli görünüm (kopyala veya yeni pencerede aç)
+bookmark_label=Geçerli görünüm
+
+# Secondary toolbar and context menu
+tools.title=Araçlar
+tools_label=Araçlar
+first_page.title=Ä°lk sayfaya git
+first_page.label=Ä°lk sayfaya git
+first_page_label=Ä°lk sayfaya git
+last_page.title=Son sayfaya git
+last_page.label=Son sayfaya git
+last_page_label=Son sayfaya git
+page_rotate_cw.title=Saat yönünde döndür
+page_rotate_cw.label=Saat yönünde döndür
+page_rotate_cw_label=Saat yönünde döndür
+page_rotate_ccw.title=Saat yönünün tersine döndür
+page_rotate_ccw.label=Saat yönünün tersine döndür
+page_rotate_ccw_label=Saat yönünün tersine döndür
+
+cursor_text_select_tool.title=Metin seçme aracını etkinleştir
+cursor_text_select_tool_label=Metin seçme aracı
+cursor_hand_tool.title=El aracını etkinleştir
+cursor_hand_tool_label=El aracı
+
+scroll_vertical.title=Dikey kaydırma kullan
+scroll_vertical_label=Dikey kaydırma
+scroll_horizontal.title=Yatay kaydırma kullan
+scroll_horizontal_label=Yatay kaydırma
+scroll_wrapped.title=Yan yana kaydırmayı kullan
+scroll_wrapped_label=Yan yana kaydırma
+
+spread_none.title=Yan yana sayfaları birleştirme
+spread_none_label=BirleÅŸtirme
+spread_odd.title=Yan yana sayfaları tek numaralı sayfalardan başlayarak birleştir
+spread_odd_label=Tek numaralı
+spread_even.title=Yan yana sayfaları çift numaralı sayfalardan başlayarak birleştir
+spread_even_label=Çift numaralı
+
+# Document properties dialog box
+document_properties.title=Belge özellikleri…
+document_properties_label=Belge özellikleri…
+document_properties_file_name=Dosya adı:
+document_properties_file_size=Dosya boyutu:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bayt)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bayt)
+document_properties_title=Başlık:
+document_properties_author=Yazar:
+document_properties_subject=Konu:
+document_properties_keywords=Anahtar kelimeler:
+document_properties_creation_date=Oluturma tarihi:
+document_properties_modification_date=DeÄŸiÅŸtirme tarihi:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}} {{time}}
+document_properties_creator=OluÅŸturan:
+document_properties_producer=PDF üreticisi:
+document_properties_version=PDF sürümü:
+document_properties_page_count=Sayfa sayısı:
+document_properties_page_size=Sayfa boyutu:
+document_properties_page_size_unit_inches=inç
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=dikey
+document_properties_page_size_orientation_landscape=yatay
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Hızlı web görünümü:
+document_properties_linearized_yes=Evet
+document_properties_linearized_no=Hayır
+document_properties_close=Kapat
+
+print_progress_message=Belge yazdırılmaya hazırlanıyor…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent=%{{progress}}
+print_progress_close=Ä°ptal
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Kenar çubuğunu aç/kapat
+toggle_sidebar_notification.title=Kenar çubuğunu aç/kapat (Belge ana hat/ekler içeriyor)
+toggle_sidebar_label=Kenar çubuğunu aç/kapat
+document_outline.title=Belge ana hatlarını göster (Tüm öğeleri genişletmek/daraltmak için çift tıklayın)
+document_outline_label=Belge ana hatları
+attachments.title=Ekleri göster
+attachments_label=Ekler
+thumbs.title=Küçük resimleri göster
+thumbs_label=Küçük resimler
+findbar.title=Belgede bul
+findbar_label=Bul
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Sayfa {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Sayfa {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas={{page}}. sayfanın küçük hâli
+
+# Find panel button title and messages
+find_input.title=Bul
+find_input.placeholder=Belgede bul…
+find_previous.title=Önceki eşleşmeyi bul
+find_previous_label=Önceki
+find_next.title=Sonraki eÅŸleÅŸmeyi bul
+find_next_label=Sonraki
+find_highlight=Tümünü vurgula
+find_match_case_label=Büyük-küçük harfe duyarlı
+find_entire_word_label=Tam sözcükler
+find_reached_top=Belgenin başına ulaşıldı, sonundan devam edildi
+find_reached_bottom=Belgenin sonuna ulaşıldı, başından devam edildi
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{total}} eÅŸleÅŸmeden {{current}}. eÅŸleÅŸme
+find_match_count[two]={{total}} eÅŸleÅŸmeden {{current}}. eÅŸleÅŸme
+find_match_count[few]={{total}} eÅŸleÅŸmeden {{current}}. eÅŸleÅŸme
+find_match_count[many]={{total}} eÅŸleÅŸmeden {{current}}. eÅŸleÅŸme
+find_match_count[other]={{total}} eÅŸleÅŸmeden {{current}}. eÅŸleÅŸme
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]={{limit}} eÅŸleÅŸmeden fazla
+find_match_count_limit[one]={{limit}} eÅŸleÅŸmeden fazla
+find_match_count_limit[two]={{limit}} eÅŸleÅŸmeden fazla
+find_match_count_limit[few]={{limit}} eÅŸleÅŸmeden fazla
+find_match_count_limit[many]={{limit}} eÅŸleÅŸmeden fazla
+find_match_count_limit[other]={{limit}} eÅŸleÅŸmeden fazla
+find_not_found=Eşleşme bulunamadı
+
+# Error panel labels
+error_more_info=Daha fazla bilgi al
+error_less_info=Daha az bilgi
+error_close=Kapat
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js sürüm {{version}} (yapı: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Ä°leti: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Yığın: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Dosya: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Satır: {{line}}
+rendering_error=Sayfa yorumlanırken bir hata oluştu.
+
+# Predefined zoom values
+page_scale_width=Sayfa geniÅŸliÄŸi
+page_scale_fit=Sayfayı sığdır
+page_scale_auto=Otomatik yakınlaştır
+page_scale_actual=Gerçek boyut
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent=%{{scale}}
+
+# Loading indicator messages
+loading_error_indicator=Hata
+loading_error=PDF yüklenirken bir hata oluştu.
+invalid_file_error=Geçersiz veya bozulmuş PDF dosyası.
+missing_file_error=PDF dosyası eksik.
+unexpected_response_error=Beklenmeyen sunucu yanıtı.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} iÅŸareti]
+password_label=Bu PDF dosyasını açmak için parolasını yazın.
+password_invalid=Geçersiz parola. Lütfen yeniden deneyin.
+password_ok=Tamam
+password_cancel=Ä°ptal
+
+printing_not_supported=Uyarı: Yazdırma bu tarayıcı tarafından tam olarak desteklenmemektedir.
+printing_not_ready=Uyarı: PDF tamamen yüklenmedi ve yazdırmaya hazır değil.
+web_fonts_disabled=Web fontları devre dışı: Gömülü PDF fontları kullanılamıyor.
+document_colors_not_allowed=PDF belgelerinin kendi renklerini kullanması için izin verilmiyor: “Sayfalara kendi renklerini seçmesi için izin ver†tarayıcıda etkinleştirilmemiş.
diff --git a/js/pdfjs/web/locale/trs/viewer.properties b/js/pdfjs/web/locale/trs/viewer.properties
new file mode 100644
index 0000000..65252f7
--- /dev/null
+++ b/js/pdfjs/web/locale/trs/viewer.properties
@@ -0,0 +1,213 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Pajinâ gunâj rukùu
+previous_label=Sa gachin
+next.title=Pajinâ 'na' ñaan
+next_label=Ne' ñaan
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Ñanj
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=si'iaj {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} of {{pagesCount}})
+
+zoom_out.title=Nagi'iaj li'
+zoom_out_label=Nagi'iaj li'
+zoom_in.title=Nagi'iaj niko'
+zoom_in_label=Nagi'iaj niko'
+zoom.title=dàj nìko ma'an
+presentation_mode.title=Naduno' daj ga ma
+presentation_mode_label=Daj gà ma
+open_file.title=Na'nïn' chrû ñanj
+open_file_label=Na'nïn
+print.title=Nari' ña du'ua
+print_label=Nari' ñadu'ua
+download.title=Nadunïnj
+download_label=Nadunïnj
+bookmark.title=Daj hua ma (Guxun' nej na'nïn' riña ventana nakàa)
+bookmark_label=Daj hua ma
+
+# Secondary toolbar and context menu
+tools.title=Rasun
+tools_label=Nej rasùun
+first_page.title=gun' riña pajina asiniin
+first_page.label=Gun' riña pajina asiniin
+first_page_label=Gun' riña pajina asiniin
+last_page.title=Gun' riña pajina rukù ni'in
+last_page.label=Gun' riña pajina rukù ni'inj
+last_page_label=Gun' riña pajina rukù ni'inj
+page_rotate_cw.title=Tanikaj ne' huat
+page_rotate_cw.label=Tanikaj ne' huat
+page_rotate_cw_label=Tanikaj ne' huat
+page_rotate_ccw.title=Tanikaj ne' chînt'
+page_rotate_ccw.label=Tanikaj ne' chint
+page_rotate_ccw_label=Tanikaj ne' chint
+
+cursor_text_select_tool.title=Dugi'iaj sun' sa ganahui texto
+cursor_text_select_tool_label=Nej rasun arajsun' da' nahui' texto
+cursor_hand_tool.title=Nachrun' nej rasun
+cursor_hand_tool_label=Sa rajsun ro'o'
+
+scroll_vertical.title=Garasun' dukuán runūu
+scroll_vertical_label=Dukuán runūu
+scroll_horizontal.title=Garasun' dukuán nikin' nahui
+scroll_horizontal_label=Dukuán nikin' nahui
+scroll_wrapped.title=Garasun' sa nachree
+scroll_wrapped_label=Sa nachree
+
+spread_none.title=Si nagi'iaj nugun'un' nej pagina hua ninin
+spread_none_label=Ni'io daj hua pagina
+spread_odd.title=Nagi'iaj nugua'ant nej pajina
+spread_odd_label=Ni'io' daj hua libro gurin
+spread_even.title=NakÄj dugui' ngà nej pajinâ ayi'ì ngà da' hùi hùi
+spread_even_label=Nahuin nìko nej
+
+# Document properties dialog box
+document_properties.title=Nej sa nikÄj ñanj…
+document_properties_label=Nej sa nikÄj ñanj…
+document_properties_file_name=Si yugui archîbo:
+document_properties_file_size=Dàj yachìj archîbo:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Si yugui:
+document_properties_author=Sí girirà:
+document_properties_subject=Dugui':
+document_properties_keywords=Nej nuguan' huìi:
+document_properties_creation_date=Gui gurugui' man:
+document_properties_modification_date=Nuguan' nahuin nakà:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Guiri ro'
+document_properties_producer=Sa ri PDF:
+document_properties_version=PDF Version:
+document_properties_page_count=Si Guendâ Pâjina:
+document_properties_page_size=Dàj yachìj pâjina:
+document_properties_page_size_unit_inches=riña
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=nadu'ua
+document_properties_page_size_orientation_landscape=dàj huaj
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Da'ngà'a
+document_properties_page_size_name_legal=Nuguan' a'nï'ïn
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Nanèt chre ni'iajt riña Web:
+document_properties_linearized_yes=Ga'ue
+document_properties_linearized_no=Si ga'ue
+document_properties_close=Narán
+
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Duyichin'
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=NadunÄ barrâ nù yi'nïn
+toggle_sidebar_label=NadunÄ barrâ nù yi'nïn
+findbar_label=Narì'
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+
+# Find panel button title and messages
+find_input.title=Narì'
+find_previous_label=Sa gachîn
+find_next_label=Ne' ñaan
+find_highlight=Daran' sa ña'an
+find_match_case_label=Match case
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} si'iaj {{total}} guña gè huaj
+find_match_count[two]={{current}} si'iaj {{total}} guña gè huaj
+find_match_count[few]={{current}} si'iaj {{total}} guña gè huaj
+find_match_count[many]={{current}} si'iaj {{total}} guña gè huaj
+find_match_count[other]={{current}} of {{total}} matches
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Doj ngà da' {{limit}} nej sa nari' dugui'i
+find_match_count_limit[one]=Doj ngà da' {{limit}} sa nari' dugui'i
+find_match_count_limit[two]=Doj ngà da' {{limit}} nej sa nari' dugui'i
+find_match_count_limit[few]=Doj ngà da' {{limit}} nej sa nari' dugui'i
+find_match_count_limit[many]=Doj ngà da' {{limit}} nej sa nari' dugui'i
+find_match_count_limit[other]=Doj ngà da' {{limit}} nej sa nari' dugui'i
+find_not_found=Nu narì'ij nugua'anj
+
+# Error panel labels
+error_more_info=Doj nuguan' a'min rayi'î nan
+error_less_info=Dòj nuguan' a'min rayi'î nan
+error_close=Narán
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Message: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Naru'ui': {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Archîbo: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Lînia: {{line}}
+
+# Predefined zoom values
+page_scale_actual=Dàj yàchi akuan' nín
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Nitaj si hua hue'ej
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+password_ok=Ga'ue
+password_cancel=Duyichin'
+
diff --git a/js/pdfjs/web/locale/uk/viewer.properties b/js/pdfjs/web/locale/uk/viewer.properties
new file mode 100644
index 0000000..599c8f9
--- /dev/null
+++ b/js/pdfjs/web/locale/uk/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=ÐŸÐ¾Ð¿ÐµÑ€ÐµÐ´Ð½Ñ Ñторінка
+previous_label=ПопереднÑ
+next.title=ÐаÑтупна Ñторінка
+next_label=ÐаÑтупна
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Сторінка
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=із {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} із {{pagesCount}})
+
+zoom_out.title=Зменшити
+zoom_out_label=Зменшити
+zoom_in.title=Збільшити
+zoom_in_label=Збільшити
+zoom.title=МаÑштаб
+presentation_mode.title=Перейти в режим презентації
+presentation_mode_label=Режим презентації
+open_file.title=Відкрити файл
+open_file_label=Відкрити
+print.title=Друк
+print_label=Друк
+download.title=Завантажити
+download_label=Завантажити
+bookmark.title=Поточний виглÑд (копіювати чи відкрити в новому вікні)
+bookmark_label=Поточний виглÑд
+
+# Secondary toolbar and context menu
+tools.title=ІнÑтрументи
+tools_label=ІнÑтрументи
+first_page.title=Ðа першу Ñторінку
+first_page.label=Ðа першу Ñторінку
+first_page_label=Ðа першу Ñторінку
+last_page.title=Ðа оÑтанню Ñторінку
+last_page.label=Ðа оÑтанню Ñторінку
+last_page_label=Ðа оÑтанню Ñторінку
+page_rotate_cw.title=Повернути за годинниковою Ñтрілкою
+page_rotate_cw.label=Повернути за годинниковою Ñтрілкою
+page_rotate_cw_label=Повернути за годинниковою Ñтрілкою
+page_rotate_ccw.title=Повернути проти годинникової Ñтрілки
+page_rotate_ccw.label=Повернути проти годинникової Ñтрілки
+page_rotate_ccw_label=Повернути проти годинникової Ñтрілки
+
+cursor_text_select_tool.title=Увімкнути інÑтрумент вибору текÑту
+cursor_text_select_tool_label=ІнÑтрумент вибору текÑту
+cursor_hand_tool.title=Увімкнути інÑтрумент «Рука»
+cursor_hand_tool_label=ІнÑтрумент «Рука»
+
+scroll_vertical.title=ВикориÑтовувати вертикальне прокручуваннÑ
+scroll_vertical_label=Вертикальне прокручуваннÑ
+scroll_horizontal.title=ВикориÑтовувати горизонтальне прокручуваннÑ
+scroll_horizontal_label=Горизонтальне прокручуваннÑ
+scroll_wrapped.title=ВикориÑтовувати маÑштабоване прокручуваннÑ
+scroll_wrapped_label=МаÑштабоване прокручуваннÑ
+
+spread_none.title=Ðе викориÑтовувати розгорнуті Ñторінки
+spread_none_label=Без розгорнутих Ñторінок
+spread_odd.title=Розгорнуті Ñторінки починаютьÑÑ Ð· непарних номерів
+spread_odd_label=Ðепарні Ñторінки зліва
+spread_even.title=Розгорнуті Ñторінки починаютьÑÑ Ð· парних номерів
+spread_even_label=Парні Ñторінки зліва
+
+# Document properties dialog box
+document_properties.title=ВлаÑтивоÑÑ‚Ñ– документа…
+document_properties_label=ВлаÑтивоÑÑ‚Ñ– документа…
+document_properties_file_name=Ðазва файла:
+document_properties_file_size=Розмір файла:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} КБ ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} МБ ({{size_b}} bytes)
+document_properties_title=Заголовок:
+document_properties_author=Ðвтор:
+document_properties_subject=Тема:
+document_properties_keywords=Ключові Ñлова:
+document_properties_creation_date=Дата ÑтвореннÑ:
+document_properties_modification_date=Дата зміни:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Створено:
+document_properties_producer=Виробник PDF:
+document_properties_version=ВерÑÑ–Ñ PDF:
+document_properties_page_count=КількіÑÑ‚ÑŒ Ñторінок:
+document_properties_page_size=Розмір Ñторінки:
+document_properties_page_size_unit_inches=дюймів
+document_properties_page_size_unit_millimeters=мм
+document_properties_page_size_orientation_portrait=книжкова
+document_properties_page_size_orientation_landscape=альбомна
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Швидкий переглÑд в Інтернеті:
+document_properties_linearized_yes=Так
+document_properties_linearized_no=ÐÑ–
+document_properties_close=Закрити
+
+print_progress_message=Підготовка документу до друку…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=СкаÑувати
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Бічна панель
+toggle_sidebar_notification.title=Перемкнути бічну панель (документ має вміÑÑ‚/вкладеннÑ)
+toggle_sidebar_label=Перемкнути бічну панель
+document_outline.title=Показати Ñхему документу (подвійний клік Ð´Ð»Ñ Ñ€Ð¾Ð·Ð³Ð¾Ñ€Ñ‚Ð°Ð½Ð½Ñ/Ð·Ð³Ð¾Ñ€Ñ‚Ð°Ð½Ð½Ñ ÐµÐ»ÐµÐ¼ÐµÐ½Ñ‚Ñ–Ð²)
+document_outline_label=Схема документа
+attachments.title=Показати прикріпленнÑ
+attachments_label=ПрикріпленнÑ
+thumbs.title=Показувати еÑкізи
+thumbs_label=ЕÑкізи
+findbar.title=Знайти в документі
+findbar_label=Пошук
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Сторінка {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Сторінка {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=ЕÑкіз Ñторінки {{page}}
+
+# Find panel button title and messages
+find_input.title=Знайти
+find_input.placeholder=Знайти в документі…
+find_previous.title=Знайти попереднє Ð²Ñ…Ð¾Ð´Ð¶ÐµÐ½Ð½Ñ Ñ„Ñ€Ð°Ð·Ð¸
+find_previous_label=Попереднє
+find_next.title=Знайти наÑтупне Ð²Ñ…Ð¾Ð´Ð¶ÐµÐ½Ð½Ñ Ñ„Ñ€Ð°Ð·Ð¸
+find_next_label=ÐаÑтупне
+find_highlight=ПідÑвітити вÑе
+find_match_case_label=З урахуваннÑм регіÑтру
+find_entire_word_label=Цілі Ñлова
+find_reached_top=ДоÑÑгнуто початку документу, продовжено з кінцÑ
+find_reached_bottom=ДоÑÑгнуто ÐºÑ–Ð½Ñ†Ñ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ñƒ, продовжено з початку
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} збіг із {{total}}
+find_match_count[two]={{current}} збіги з {{total}}
+find_match_count[few]={{current}} збігів із {{total}}
+find_match_count[many]={{current}} збігів із {{total}}
+find_match_count[other]={{current}} збігів із {{total}}
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Понад {{limit}} збігів
+find_match_count_limit[one]=Більше, ніж {{limit}} збіг
+find_match_count_limit[two]=Більше, ніж {{limit}} збіги
+find_match_count_limit[few]=Більше, ніж {{limit}} збігів
+find_match_count_limit[many]=Понад {{limit}} збігів
+find_match_count_limit[other]=Понад {{limit}} збігів
+find_not_found=Фразу не знайдено
+
+# Error panel labels
+error_more_info=Більше інформації
+error_less_info=Менше інформації
+error_close=Закрити
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=ПовідомленнÑ: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Стек: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Файл: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=РÑдок: {{line}}
+rendering_error=Під Ñ‡Ð°Ñ Ð²Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ñторінки ÑталаÑÑ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°.
+
+# Predefined zoom values
+page_scale_width=За шириною
+page_scale_fit=УміÑтити
+page_scale_auto=Ðвто-маÑштаб
+page_scale_actual=ДійÑний розмір
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Помилка
+loading_error=Під Ñ‡Ð°Ñ Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ PDF ÑталаÑÑ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°.
+invalid_file_error=ÐедійÑний або пошкоджений PDF-файл.
+missing_file_error=ВідÑутній PDF-файл.
+unexpected_response_error=Ðеочікувана відповідь Ñервера.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}}-аннотаціÑ]
+password_label=Введіть пароль Ð´Ð»Ñ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ñ‚Ñ Ñ†ÑŒÐ¾Ð³Ð¾ PDF-файла.
+password_invalid=Ðевірний пароль. Спробуйте ще.
+password_ok=Гаразд
+password_cancel=СкаÑувати
+
+printing_not_supported=ПопередженнÑ: Цей браузер не повніÑÑ‚ÑŽ підтримує друк.
+printing_not_ready=ПопередженнÑ: PDF не повніÑÑ‚ÑŽ завантажений Ð´Ð»Ñ Ð´Ñ€ÑƒÐºÑƒ.
+web_fonts_disabled=Веб-шрифти вимкнено: неможливо викориÑтати вбудовані у PDF шрифти.
+document_colors_not_allowed=PDF-документам не дозволено викориÑтовувати влаÑні кольори: в браузері вимкнено параметр «Дозволити Ñторінкам викориÑтовувати влаÑні кольори».
diff --git a/js/pdfjs/web/locale/ur/viewer.properties b/js/pdfjs/web/locale/ur/viewer.properties
new file mode 100644
index 0000000..d7e360e
--- /dev/null
+++ b/js/pdfjs/web/locale/ur/viewer.properties
@@ -0,0 +1,221 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=پچھلا صÙØ­Û
+previous_label=پچھلا
+next.title=اگلا صÙØ­Û
+next_label=Ø¢Ú¯Û’
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=صÙØ­Û
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages={{pagesCount}} کا
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} کا {{pagesCount}})
+
+zoom_out.title=باÛر زوم کریں
+zoom_out_label=باÛر زوم کریں
+zoom_in.title=اندر زوم کریں
+zoom_in_label=اندر زوم کریں
+zoom.title=زوم
+presentation_mode.title=پیشکش موڈ میں چلے جائیں
+presentation_mode_label=پیشکش موڈ
+open_file.title=مسل کھولیں
+open_file_label=کھولیں
+print.title=چھاپیں
+print_label=چھاپیں
+download.title=ڈاؤن لوڈ
+download_label=ڈاؤن لوڈ
+bookmark.title=Ø­Ø§Ù„ÛŒÛ Ù†Ø¸Ø§Ø±Û (Ù†Û“ Ø¯Ø±ÛŒÚ†Û Ù…ÛŒÚº نقل کریں یا کھولیں)
+bookmark_label=Ø­Ø§Ù„ÛŒÛ Ù†Ø¸Ø§Ø±Û
+
+# Secondary toolbar and context menu
+tools.title=آلات
+tools_label=آلات
+first_page.title=Ù¾ÛÙ„Û’ صÙØ­Û Ù¾Ø± جائیں
+first_page.label=Ù¾ÛÙ„Û’ صÙØ­Û Ù¾Ø± جائیں
+first_page_label=Ù¾ÛÙ„Û’ صÙØ­Û Ù¾Ø± جائیں
+last_page.title=آخری صÙØ­Û Ù¾Ø± جائیں
+last_page.label=آخری صÙØ­Û Ù¾Ø± جائیں
+last_page_label=آخری صÙØ­Û Ù¾Ø± جائیں
+page_rotate_cw.title=گھڑی وار گھمائیں
+page_rotate_cw.label=گھڑی وار گھمائیں
+page_rotate_cw_label=گھڑی وار گھمائیں
+page_rotate_ccw.title=ضد گھڑی وار گھمائیں
+page_rotate_ccw.label=ضد گھڑی وار گھمائیں
+page_rotate_ccw_label=ضد گھڑی وار گھمائیں
+
+cursor_text_select_tool.title=متن Ú©Û’ انتخاب Ú©Û’ ٹول Ú©Ùˆ Ùعال بناے
+cursor_text_select_tool_label=متن Ú©Û’ انتخاب کا آلÛ
+cursor_hand_tool_label=Ûاتھ کا آلÛ
+
+scroll_vertical.title=عمودی اسکرولنگ کا استعمال کریں
+scroll_vertical_label=عمودی اسکرولنگ
+
+spread_none_label=کوئی پھیلاؤ Ù†Ûیں
+spread_odd_label=تاک پھیلاؤ
+spread_even_label=جÙت پھیلاؤ
+
+# Document properties dialog box
+document_properties.title=دستاویز خواص…
+document_properties_label=دستاویز خواص…\u0020
+document_properties_file_name=نام مسل:
+document_properties_file_size=مسل سائز:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=عنوان:
+document_properties_author=تخلیق کار:
+document_properties_subject=موضوع:
+document_properties_keywords=کلیدی الÙاظ:
+document_properties_creation_date=تخلیق کی تاریخ:
+document_properties_modification_date=ترمیم کی تاریخ:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}، {{time}}
+document_properties_creator=تخلیق کار:
+document_properties_producer=PDF پیدا کار:
+document_properties_version=PDF ورژن:
+document_properties_page_count=صÙØ­Û Ø´Ù…Ø§Ø±:
+document_properties_page_size=صÙÛ Ú©ÛŒ لمبائ:
+document_properties_page_size_unit_inches=میں
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=عمودی انداز
+document_properties_page_size_orientation_landscape=اÙقى انداز
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=خط
+document_properties_page_size_name_legal=قانونی
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized_yes=Ûاں
+document_properties_linearized_no=Ù†Ûیں
+document_properties_close=بند کریں
+
+print_progress_message=چھاپنے کرنے کے لیے دستاویز تیار کیے جا رھے ھیں
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent=*{{progress}}%*
+print_progress_close=منسوخ کریں
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=سلائیڈ ٹوگل کریں
+toggle_sidebar_label=سلائیڈ ٹوگل کریں
+document_outline.title=دستاویز کی سرخیاں دکھایں (تمام اشیاء وسیع / غائب کرنے کے لیے ڈبل کلک کریں)
+document_outline_label=دستاویز آؤٹ لائن
+attachments.title=منسلکات دکھائیں
+attachments_label=منسلکات
+thumbs.title=تھمبنیل دکھائیں
+thumbs_label=مجمل
+findbar.title=دستاویز میں ڈھونڈیں
+findbar_label=ڈھونڈیں
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=صÙØ­Û {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=صÙØ­Û’ کا مجمل {{page}}
+
+# Find panel button title and messages
+find_input.title=ڈھونڈیں
+find_input.placeholder=دستاویز… میں ڈھونڈیں
+find_previous.title=Ùقرے کا پچھلا وقوع ڈھونڈیں
+find_previous_label=پچھلا
+find_next.title=Ùقرے کا Ø§Ú¯Ù„Û ÙˆÙ‚ÙˆØ¹ ڈھونڈیں
+find_next_label=Ø¢Ú¯Û’
+find_highlight=تمام نمایاں کریں
+find_match_case_label=Ø­Ø±ÙˆÙ Ù…Ø´Ø§Ø¨Û Ú©Ø±ÛŒÚº
+find_entire_word_label=تمام الÙاظ
+find_reached_top=صÙØ­Û Ú©Û’ شروع پر Ù¾ÛÙ†Ú† گیا، نیچے سے جاری کیا
+find_reached_bottom=صÙØ­Û Ú©Û’ اختتام پر Ù¾ÛÙ†Ú† گیا، اوپر سے جاری کیا
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_not_found=Ùقرا Ù†Ûیں ملا
+
+# Error panel labels
+error_more_info=مزید معلومات
+error_less_info=کم معلومات
+error_close=بند کریں
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=پیغام: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=سٹیک: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=مسل: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=لائن: {{line}}
+rendering_error=صÙØ­Û Ø¨Ù†Ø§ØªÛ’ Ûوئے نقص Ø¢ گیا۔
+
+# Predefined zoom values
+page_scale_width=صÙØ­Û Ú†ÙˆÚ‘Ø§Ø¦ÛŒ
+page_scale_fit=صÙØ­Û Ùٹنگ
+page_scale_auto=خودکار زوم
+page_scale_actual=اصل سائز
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=نقص
+loading_error=PDF لوڈ کرتے وقت نقص آ گیا۔
+invalid_file_error=ناجائز یا خراب PDF مسل
+missing_file_error=PDF مسل غائب ÛÛ’Û”
+unexpected_response_error=غیرمتوقع پیش کار جواب
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} نوٹ]
+password_label=PDF مسل کھولنے کے لیے پاس ورڈ داخل کریں.
+password_invalid=ناجائز پاس ورڈ. براےؑ کرم Ø¯ÙˆØ¨Ø§Ø±Û Ú©ÙˆØ´Ø´ کریں.
+password_ok=سÛÛŒ
+password_cancel=منسوخ کریں
+
+printing_not_supported=تنبیÛ:چھاپنا اس براؤزر پر پوری طرح معاونت Ø´Ø¯Û Ù†Ûیں ÛÛ’Û”
+printing_not_ready=تنبیÛ: PDF چھپائی Ú©Û’ لیے پوری طرح لوڈ Ù†Ûیں Ûوئی۔
+web_fonts_disabled=ویب Ùانٹ نا اÛÙ„ Ûیں: شامل PDF Ùانٹ استعمال کرنے میں ناکام۔
+document_colors_not_allowed=PDF دستاویزات Ú©Ùˆ اپنے رنگ استعمال کرنے Ú©ÛŒ اجازت Ù†Ûیں: 'صÙحات Ú©Ùˆ اپنے رنگ چنیں' Ú©ÛŒ اÙجازت براؤزر میں بے عمل ÛÛ’Û”
diff --git a/js/pdfjs/web/locale/uz/viewer.properties b/js/pdfjs/web/locale/uz/viewer.properties
new file mode 100644
index 0000000..e451c74
--- /dev/null
+++ b/js/pdfjs/web/locale/uz/viewer.properties
@@ -0,0 +1,169 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Oldingi sahifa
+previous_label=Oldingi
+next.title=Keyingi sahifa
+next_label=Keyingi
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=/{{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+
+zoom_out.title=Kichiklashtirish
+zoom_out_label=Kichiklashtirish
+zoom_in.title=Kattalashtirish
+zoom_in_label=Kattalashtirish
+zoom.title=Masshtab
+presentation_mode.title=Namoyish usuliga oʻtish
+presentation_mode_label=Namoyish usuli
+open_file.title=Faylni ochish
+open_file_label=Ochish
+print.title=Chop qilish
+print_label=Chop qilish
+download.title=Yuklab olish
+download_label=Yuklab olish
+bookmark.title=Joriy koʻrinish (nusxa oling yoki yangi oynada oching)
+bookmark_label=Joriy koʻrinish
+
+# Secondary toolbar and context menu
+tools.title=Vositalar
+tools_label=Vositalar
+first_page.title=Birinchi sahifaga oʻtish
+first_page.label=Birinchi sahifaga oʻtish
+first_page_label=Birinchi sahifaga oʻtish
+last_page.title=Soʻnggi sahifaga oʻtish
+last_page.label=Soʻnggi sahifaga oʻtish
+last_page_label=Soʻnggi sahifaga oʻtish
+page_rotate_cw.title=Soat yoʻnalishi boʻyicha burish
+page_rotate_cw.label=Soat yoʻnalishi boʻyicha burish
+page_rotate_cw_label=Soat yoʻnalishi boʻyicha burish
+page_rotate_ccw.title=Soat yoʻnalishiga qarshi burish
+page_rotate_ccw.label=Soat yoʻnalishiga qarshi burish
+page_rotate_ccw_label=Soat yoʻnalishiga qarshi burish
+
+
+# Document properties dialog box
+document_properties.title=Hujjat xossalari
+document_properties_label=Hujjat xossalari
+document_properties_file_name=Fayl nomi:
+document_properties_file_size=Fayl hajmi:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} bytes)
+document_properties_title=Nomi:
+document_properties_author=Muallifi:
+document_properties_subject=Mavzusi:
+document_properties_keywords=Kalit so‘zlar
+document_properties_creation_date=Yaratilgan sanasi:
+document_properties_modification_date=O‘zgartirilgan sanasi
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Yaratuvchi:
+document_properties_producer=PDF ishlab chiqaruvchi:
+document_properties_version=PDF versiyasi:
+document_properties_page_count=Sahifa soni:
+document_properties_close=Yopish
+
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Yon panelni yoqib/oʻchirib qoʻyish
+toggle_sidebar_label=Yon panelni yoqib/oʻchirib qoʻyish
+document_outline_label=Hujjat tuzilishi
+attachments.title=Ilovalarni ko‘rsatish
+attachments_label=Ilovalar
+thumbs.title=Nishonchalarni koʻrsatish
+thumbs_label=Nishoncha
+findbar.title=Hujjat ichidan topish
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title={{page}} sahifa
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas={{page}} sahifa nishonchasi
+
+# Find panel button title and messages
+find_previous.title=Soʻzlardagi oldingi hodisani topish
+find_previous_label=Oldingi
+find_next.title=Iboradagi keyingi hodisani topish
+find_next_label=Keyingi
+find_highlight=Barchasini ajratib koʻrsatish
+find_match_case_label=Katta-kichik harflarni farqlash
+find_reached_top=Hujjatning boshigacha yetib keldik, pastdan davom ettiriladi
+find_reached_bottom=Hujjatning oxiriga yetib kelindi, yuqoridan davom ettirladi
+find_not_found=Soʻzlar topilmadi
+
+# Error panel labels
+error_more_info=Koʻproq ma`lumot
+error_less_info=Kamroq ma`lumot
+error_close=Yopish
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Xabar: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Toʻplam: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Fayl: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Satr: {{line}}
+rendering_error=Sahifa renderlanayotganda xato yuz berdi.
+
+# Predefined zoom values
+page_scale_width=Sahifa eni
+page_scale_fit=Sahifani moslashtirish
+page_scale_auto=Avtomatik masshtab
+page_scale_actual=Haqiqiy hajmi
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Xato
+loading_error=PDF yuklanayotganda xato yuz berdi.
+invalid_file_error=Xato yoki buzuq PDF fayli.
+missing_file_error=PDF fayl kerak.
+unexpected_response_error=Kutilmagan server javobi.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Annotation]
+password_label=PDF faylni ochish uchun parolni kiriting.
+password_invalid=Parol - notoʻgʻri. Qaytadan urinib koʻring.
+password_ok=OK
+
+printing_not_supported=Diqqat: chop qilish bruzer tomonidan toʻliq qoʻllab-quvvatlanmaydi.
+printing_not_ready=Diqqat: PDF fayl chop qilish uchun toʻliq yuklanmadi.
+web_fonts_disabled=Veb shriftlar oʻchirilgan: ichki PDF shriftlardan foydalanib boʻlmmaydi.
+document_colors_not_allowed=PDF hujjat oʻzining ranglaridan foydalanishga ruxsat bermaydi: 'Sahifalarga oʻzining rangidan foydalanishga ruxsat berish' ushbu brauzerda oʻchirib qoʻyilgan.
diff --git a/js/pdfjs/web/locale/vi/viewer.properties b/js/pdfjs/web/locale/vi/viewer.properties
new file mode 100644
index 0000000..b8ee16e
--- /dev/null
+++ b/js/pdfjs/web/locale/vi/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Trang trÆ°á»›c
+previous_label=TrÆ°á»›c
+next.title=Trang Sau
+next_label=Tiếp
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Trang
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=trên {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} trên {{pagesCount}})
+
+zoom_out.title=Thu nhá»
+zoom_out_label=Thu nhá»
+zoom_in.title=Phóng to
+zoom_in_label=Phóng to
+zoom.title=Thu phóng
+presentation_mode.title=Chuyển sang chế độ trình chiếu
+presentation_mode_label=Chế độ trình chiếu
+open_file.title=Mở tập tin
+open_file_label=Mở tập tin
+print.title=In
+print_label=In
+download.title=Tải xuống
+download_label=Tải xuống
+bookmark.title=Chế độ xem hiện tại (sao chép hoặc mở trong cửa sổ mới)
+bookmark_label=Chế độ xem hiện tại
+
+# Secondary toolbar and context menu
+tools.title=Công cụ
+tools_label=Công cụ
+first_page.title=VỠtrang đầu
+first_page.label=VỠtrang đầu
+first_page_label=VỠtrang đầu
+last_page.title=Äến trang cuối
+last_page.label=Äến trang cuối
+last_page_label=Äến trang cuối
+page_rotate_cw.title=Xoay theo chiá»u kim đồng hồ
+page_rotate_cw.label=Xoay theo chiá»u kim đồng hồ
+page_rotate_cw_label=Xoay theo chiá»u kim đồng hồ
+page_rotate_ccw.title=Xoay ngược chiá»u kim đồng hồ
+page_rotate_ccw.label=Xoay ngược chiá»u kim đồng hồ
+page_rotate_ccw_label=Xoay ngược chiá»u kim đồng hồ
+
+cursor_text_select_tool.title=Kích hoạt công cụ chá»n vùng văn bản
+cursor_text_select_tool_label=Công cụ chá»n vùng văn bản
+cursor_hand_tool.title=Kích hoạt công cụ con trá»
+cursor_hand_tool_label=Công cụ con trá»
+
+scroll_vertical.title=Sá»­ dụng cuá»™n dá»c
+scroll_vertical_label=Cuá»™n dá»c
+scroll_horizontal.title=Sử dụng cuộn ngang
+scroll_horizontal_label=Cuá»™n ngang
+scroll_wrapped.title=Sử dụng cuộn ngắt dòng
+scroll_wrapped_label=Cuộn ngắt dòng
+
+spread_none.title=Không nối rộng trang
+spread_none_label=Không có phân cách
+spread_odd.title=Nối trang bài bắt đầu với các trang được đánh số lẻ
+spread_odd_label=Phân cách theo số lẻ
+spread_even.title=Nối trang bài bắt đầu với các trang được đánh số chẵn
+spread_even_label=Phân cách theo số chẵn
+
+# Document properties dialog box
+document_properties.title=Thuộc tính của tài liệu…
+document_properties_label=Thuộc tính của tài liệu…
+document_properties_file_name=Tên tập tin:
+document_properties_file_size=Kích thước:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} byte)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} byte)
+document_properties_title=Tiêu Ä‘á»:
+document_properties_author=Tác giả:
+document_properties_subject=Chủ Ä‘á»:
+document_properties_keywords=Từ khóa:
+document_properties_creation_date=Ngày tạo:
+document_properties_modification_date=Ngày sửa đổi:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=NgÆ°á»i tạo:
+document_properties_producer=Phần má»m tạo PDF:
+document_properties_version=Phiên bản PDF:
+document_properties_page_count=Tổng số trang:
+document_properties_page_size=Kích thước trang:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=khổ dá»c
+document_properties_page_size_orientation_landscape=khổ ngang
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=ThÆ°
+document_properties_page_size_name_legal=Pháp lý
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=Xem nhanh trên web:
+document_properties_linearized_yes=Có
+document_properties_linearized_no=Không
+document_properties_close=Ãóng
+
+print_progress_message=Chuẩn bị trang để in…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Hủy bá»
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Bật/Tắt thanh lá»
+toggle_sidebar_notification.title=Bật tắt thanh lỠ(tài liệu bao gồm bản phác thảo/tập tin đính kèm)
+toggle_sidebar_label=Bật/Tắt thanh lá»
+document_outline.title=Hiện tài liệu phác thảo (nhấp đúp vào để mở rá»™ng/thu gá»n tất cả các mục)
+document_outline_label=Bản phác tài liệu
+attachments.title=Hiện nội dung đính kèm
+attachments_label=Nội dung đính kèm
+thumbs.title=Hiển thị ảnh thu nhá»
+thumbs_label=Ảnh thu nhá»
+findbar.title=Tìm trong tài liệu
+findbar_label=Tìm
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=Trang {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Trang {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Ảnh thu nhỠcủa trang {{page}}
+
+# Find panel button title and messages
+find_input.title=Tìm
+find_input.placeholder=Tìm trong tài liệu…
+find_previous.title=Tìm cụm từ ở phần trước
+find_previous_label=TrÆ°á»›c
+find_next.title=Tìm cụm từ ở phần sau
+find_next_label=Tiếp
+find_highlight=Tô sáng tất cả
+find_match_case_label=Phân biệt hoa, thÆ°á»ng
+find_entire_word_label=Toàn bộ từ
+find_reached_top=Äã đến phần đầu tài liệu, quay trở lại từ cuối
+find_reached_bottom=Äã đến phần cuối của tài liệu, quay trở lại từ đầu
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]={{current}} của {{total}} đã trùng
+find_match_count[two]={{current}} của {{total}} đã trùng
+find_match_count[few]={{current}} của {{total}} đã trùng
+find_match_count[many]={{current}} của {{total}} đã trùng
+find_match_count[other]={{current}} của {{total}} đã trùng
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=Nhiá»u hÆ¡n {{limit}} đã trùng
+find_match_count_limit[one]=Nhiá»u hÆ¡n {{limit}} đã trùng
+find_match_count_limit[two]=Nhiá»u hÆ¡n {{limit}} đã trùng
+find_match_count_limit[few]=Nhiá»u hÆ¡n {{limit}} đã trùng
+find_match_count_limit[many]=Nhiá»u hÆ¡n {{limit}} đã trùng
+find_match_count_limit[other]=Nhiá»u hÆ¡n {{limit}} đã trùng
+find_not_found=Không tìm thấy cụm từ này
+
+# Error panel labels
+error_more_info=Thông tin thêm
+error_less_info=Hiển thị ít thông tin hơn
+error_close=Äóng
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Thông điệp: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Stack: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Tập tin: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Dòng: {{line}}
+rendering_error=Lỗi khi hiển thị trang.
+
+# Predefined zoom values
+page_scale_width=Vừa chiá»u rá»™ng
+page_scale_fit=Vừa chiá»u cao
+page_scale_auto=Tá»± Ä‘á»™ng chá»n kích thÆ°á»›c
+page_scale_actual=Kích thước thực
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Lá»—i
+loading_error=Lỗi khi tải tài liệu PDF.
+invalid_file_error=Tập tin PDF há»ng hoặc không hợp lệ.
+missing_file_error=Thiếu tập tin PDF.
+unexpected_response_error=Máy chủ có phản hồi lạ.
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}}, {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Chú thích]
+password_label=Nhập mật khẩu để mở tập tin PDF này.
+password_invalid=Mật khẩu không đúng. Vui lòng thử lại.
+password_ok=OK
+password_cancel=Hủy bá»
+
+printing_not_supported=Cảnh báo: In ấn không được hỗ trợ đầy đủ ở trình duyệt này.
+printing_not_ready=Cảnh báo: PDF chưa được tải hết để in.
+web_fonts_disabled=Phông chữ Web bị vô hiệu hóa: không thể sử dụng các phông chữ PDF được nhúng.
+document_colors_not_allowed=Tài liệu PDF không được cho phép dùng màu riêng: 'Cho phép trang chá»n màu riêng' đã bị tắt trên trình duyệt.
diff --git a/js/pdfjs/web/locale/wo/viewer.properties b/js/pdfjs/web/locale/wo/viewer.properties
new file mode 100644
index 0000000..38c7bc1
--- /dev/null
+++ b/js/pdfjs/web/locale/wo/viewer.properties
@@ -0,0 +1,124 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Xët wi jiitu
+previous_label=Bi jiitu
+next.title=Xët wi ci topp
+next_label=Bi ci topp
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+
+zoom_out.title=Wàññi
+zoom_out_label=Wàññi
+zoom_in.title=Yaatal
+zoom_in_label=Yaatal
+zoom.title=Yambalaŋ
+presentation_mode.title=Wañarñil ci anamu wone
+presentation_mode_label=Anamu Wone
+open_file.title=Ubbi benn dencukaay
+open_file_label=Ubbi
+print.title=Móol
+print_label=Móol
+download.title=Yeb yi
+download_label=Yeb yi
+bookmark.title=Wone bi taxaw (duppi walla ubbi palanteer bu bees)
+bookmark_label=Wone bi feeñ
+
+# Secondary toolbar and context menu
+
+
+# Document properties dialog box
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_title=Bopp:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+thumbs.title=Wone nataal yu ndaw yi
+thumbs_label=Nataal yu ndaw yi
+findbar.title=Gis ci biir jukki bi
+findbar_label=Wut
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Xët {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Wiñet bu xët {{page}}
+
+# Find panel button title and messages
+find_previous.title=Seet beneen kaddu bu ni mel te jiitu
+find_previous_label=Bi jiitu
+find_next.title=Seet beneen kaddu bu ni mel
+find_next_label=Bi ci topp
+find_highlight=Melaxal lépp
+find_match_case_label=Sàmm jëmmalin wi
+find_reached_top=Jot nañu ndorteel xët wi, kontine dale ko ci suuf
+find_reached_bottom=Jot nañu jeexitalu xët wi, kontine ci ndorte
+find_not_found=Gisiñu kaddu gi
+
+# Error panel labels
+error_more_info=Xibaar yu gën bari
+error_less_info=Xibaar yu gën bari
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Bataaxal: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Juug: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Dencukaay: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Rëdd : {{line}}
+rendering_error=Am njumte bu am bi xët bi di wonewu.
+
+# Predefined zoom values
+page_scale_width=Yaatuwaay bu mët
+page_scale_fit=Xët lëmm
+page_scale_auto=Yambalaŋ ci saa si
+page_scale_actual=Dayo bi am
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+
+# Loading indicator messages
+loading_error_indicator=Njumte
+loading_error=Am na njumte ci yebum dencukaay PDF bi.
+invalid_file_error=Dencukaay PDF bi baaxul walla mu sankar.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[Karmat {{type}}]
+password_ok=OK
+password_cancel=Neenal
+
+printing_not_supported=Artu: Joowkat bii nanguwul lool mool.
diff --git a/js/pdfjs/web/locale/xh/viewer.properties b/js/pdfjs/web/locale/xh/viewer.properties
new file mode 100644
index 0000000..1fa394b
--- /dev/null
+++ b/js/pdfjs/web/locale/xh/viewer.properties
@@ -0,0 +1,184 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=Iphepha langaphambili
+previous_label=Okwangaphambili
+next.title=Iphepha elilandelayo
+next_label=Okulandelayo
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=Iphepha
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=kwali- {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} kwali {{pagesCount}})
+
+zoom_out.title=Bhekelisela Kudana
+zoom_out_label=Bhekelisela Kudana
+zoom_in.title=Sondeza Kufuphi
+zoom_in_label=Sondeza Kufuphi
+zoom.title=Yandisa / Nciphisa
+presentation_mode.title=Tshintshela kwimo yonikezelo
+presentation_mode_label=Imo yonikezelo
+open_file.title=Vula Ifayile
+open_file_label=Vula
+print.title=Printa
+print_label=Printa
+download.title=Khuphela
+download_label=Khuphela
+bookmark.title=Imbonakalo ekhoyo (kopa okanye vula kwifestile entsha)
+bookmark_label=Imbonakalo ekhoyo
+
+# Secondary toolbar and context menu
+tools.title=Izixhobo zemiyalelo
+tools_label=Izixhobo zemiyalelo
+first_page.title=Yiya kwiphepha lokuqala
+first_page.label=Yiya kwiphepha lokuqala
+first_page_label=Yiya kwiphepha lokuqala
+last_page.title=Yiya kwiphepha lokugqibela
+last_page.label=Yiya kwiphepha lokugqibela
+last_page_label=Yiya kwiphepha lokugqibela
+page_rotate_cw.title=Jikelisa ngasekunene
+page_rotate_cw.label=Jikelisa ngasekunene
+page_rotate_cw_label=Jikelisa ngasekunene
+page_rotate_ccw.title=Jikelisa ngasekhohlo
+page_rotate_ccw.label=Jikelisa ngasekhohlo
+page_rotate_ccw_label=Jikelisa ngasekhohlo
+
+cursor_text_select_tool.title=Vumela iSixhobo sokuKhetha iTeksti
+cursor_text_select_tool_label=ISixhobo sokuKhetha iTeksti
+cursor_hand_tool.title=Yenza iSixhobo seSandla siSebenze
+cursor_hand_tool_label=ISixhobo seSandla
+
+# Document properties dialog box
+document_properties.title=Iipropati zoxwebhu…
+document_properties_label=Iipropati zoxwebhu…
+document_properties_file_name=Igama lefayile:
+document_properties_file_size=Isayizi yefayile:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB (iibhayiti{{size_b}})
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB (iibhayithi{{size_b}})
+document_properties_title=Umxholo:
+document_properties_author=Umbhali:
+document_properties_subject=Umbandela:
+document_properties_keywords=Amagama aphambili:
+document_properties_creation_date=Umhla wokwenziwa kwayo:
+document_properties_modification_date=Umhla wokulungiswa kwayo:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=Umntu oyenzileyo:
+document_properties_producer=Umvelisi we-PDF:
+document_properties_version=Uhlelo lwe-PDF:
+document_properties_page_count=Inani lamaphepha:
+document_properties_close=Vala
+
+print_progress_message=Ilungisa uxwebhu ukuze iprinte…
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=Rhoxisa
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=Togola ngebha eseCaleni
+toggle_sidebar_notification.title=ISidebar yeQhosha (uxwebhu lunolwandlalo/iziqhotyoshelwa)
+toggle_sidebar_label=Togola ngebha eseCaleni
+document_outline.title=Bonisa uLwandlalo loXwebhu (cofa kabini ukuze wandise/diliza zonke izinto)
+document_outline_label=Isishwankathelo soxwebhu
+attachments.title=Bonisa iziqhotyoshelwa
+attachments_label=Iziqhoboshelo
+thumbs.title=Bonisa ukrobiso kumfanekiso
+thumbs_label=Ukrobiso kumfanekiso
+findbar.title=Fumana kuXwebhu
+findbar_label=Fumana
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=Iphepha {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=Ukrobiso kumfanekiso wephepha {{page}}
+
+# Find panel button title and messages
+find_input.title=Fumana
+find_input.placeholder=Fumana kuXwebhu…
+find_previous.title=Fumanisa isenzeko sangaphambili sebinzana lamagama
+find_previous_label=Okwangaphambili
+find_next.title=Fumanisa isenzeko esilandelayo sebinzana lamagama
+find_next_label=Okulandelayo
+find_highlight=Qaqambisa konke
+find_match_case_label=Tshatisa ngobukhulu bukanobumba
+find_reached_top=Ufike ngaphezulu ephepheni, kusukwa ngezantsi
+find_reached_bottom=Ufike ekupheleni kwephepha, kusukwa ngaphezulu
+find_not_found=Ibinzana alifunyenwanga
+
+# Error panel labels
+error_more_info=Inkcazelo Engakumbi
+error_less_info=Inkcazelo Encinane
+error_close=Vala
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=I-PDF.js v{{version}} (yakha: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=Umyalezo: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=Imfumba: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=Ifayile: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=Umgca: {{line}}
+rendering_error=Imposiso yenzekile xa bekunikezelwa iphepha.
+
+# Predefined zoom values
+page_scale_width=Ububanzi bephepha
+page_scale_fit=Ukulinganiswa kwephepha
+page_scale_auto=Ukwandisa/Ukunciphisa Ngokwayo
+page_scale_actual=Ubungakanani bokwenene
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=Imposiso
+loading_error=Imposiso yenzekile xa kulayishwa i-PDF.
+invalid_file_error=Ifayile ye-PDF engeyiyo okanye eyonakalisiweyo.
+missing_file_error=Ifayile ye-PDF edukileyo.
+unexpected_response_error=Impendulo yeseva engalindelekanga.
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} Ubhalo-nqaku]
+password_label=Faka ipasiwedi ukuze uvule le fayile yePDF.
+password_invalid=Ipasiwedi ayisebenzi. Nceda uzame kwakhona.
+password_ok=KULUNGILE
+password_cancel=Rhoxisa
+
+printing_not_supported=Isilumkiso: Ukuprinta akuxhaswa ngokupheleleyo yile bhrawuza.
+printing_not_ready=Isilumkiso: IPDF ayihlohlwanga ngokupheleleyo ukwenzela ukuprinta.
+web_fonts_disabled=Iifonti zewebhu ziqhwalelisiwe: ayikwazi ukusebenzisa iifonti ze-PDF ezincanyathelisiweyo.
+document_colors_not_allowed=Amaxwebhu ePDF akavumelekanga ukuba asebenzise imibala yawo: 'Ukuvumela amaphepha ukuba asebenzise eyawo imibala' kuvaliwe ukuba kungasebenzi kwibhrawuza.
diff --git a/js/pdfjs/web/locale/zh-CN/viewer.properties b/js/pdfjs/web/locale/zh-CN/viewer.properties
new file mode 100644
index 0000000..2dc609b
--- /dev/null
+++ b/js/pdfjs/web/locale/zh-CN/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=上一页
+previous_label=上一页
+next.title=下一页
+next_label=下一页
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=页é¢
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=/ {{pagesCount}}
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=({{pageNumber}} / {{pagesCount}})
+
+zoom_out.title=缩å°
+zoom_out_label=缩å°
+zoom_in.title=放大
+zoom_in_label=放大
+zoom.title=缩放
+presentation_mode.title=切æ¢åˆ°æ¼”示模å¼
+presentation_mode_label=演示模å¼
+open_file.title=打开文件
+open_file_label=打开
+print.title=打å°
+print_label=打å°
+download.title=下载
+download_label=下载
+bookmark.title=当å‰åœ¨çœ‹çš„内容(å¤åˆ¶æˆ–在新窗å£ä¸­æ‰“开)
+bookmark_label=当å‰åœ¨çœ‹
+
+# Secondary toolbar and context menu
+tools.title=工具
+tools_label=工具
+first_page.title=转到第一页
+first_page.label=转到第一页
+first_page_label=转到第一页
+last_page.title=转到最åŽä¸€é¡µ
+last_page.label=转到最åŽä¸€é¡µ
+last_page_label=转到最åŽä¸€é¡µ
+page_rotate_cw.title=顺时针旋转
+page_rotate_cw.label=顺时针旋转
+page_rotate_cw_label=顺时针旋转
+page_rotate_ccw.title=逆时针旋转
+page_rotate_ccw.label=逆时针旋转
+page_rotate_ccw_label=逆时针旋转
+
+cursor_text_select_tool.title=å¯ç”¨æ–‡æœ¬é€‰æ‹©å·¥å…·
+cursor_text_select_tool_label=文本选择工具
+cursor_hand_tool.title=å¯ç”¨æ‰‹å½¢å·¥å…·
+cursor_hand_tool_label=手形工具
+
+scroll_vertical.title=使用垂直滚动
+scroll_vertical_label=垂直滚动
+scroll_horizontal.title=使用水平滚动
+scroll_horizontal_label=水平滚动
+scroll_wrapped.title=使用平铺滚动
+scroll_wrapped_label=平铺滚动
+
+spread_none.title=ä¸åŠ å…¥è¡”接页
+spread_none_label=å•é¡µè§†å›¾
+spread_odd.title=加入衔接页使奇数页作为起始页
+spread_odd_label=åŒé¡µè§†å›¾
+spread_even.title=加入衔接页使å¶æ•°é¡µä½œä¸ºèµ·å§‹é¡µ
+spread_even_label=书ç±è§†å›¾
+
+# Document properties dialog box
+document_properties.title=文档属性…
+document_properties_label=文档属性…
+document_properties_file_name=文件å:
+document_properties_file_size=文件大å°:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB ({{size_b}} 字节)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB ({{size_b}} 字节)
+document_properties_title=标题:
+document_properties_author=作者:
+document_properties_subject=主题:
+document_properties_keywords=关键è¯:
+document_properties_creation_date=创建日期:
+document_properties_modification_date=修改日期:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}}, {{time}}
+document_properties_creator=创建者:
+document_properties_producer=PDF 生æˆå™¨ï¼š
+document_properties_version=PDF 版本:
+document_properties_page_count=页数:
+document_properties_page_size=页é¢å¤§å°ï¼š
+document_properties_page_size_unit_inches=英寸
+document_properties_page_size_unit_millimeters=毫米
+document_properties_page_size_orientation_portrait=纵å‘
+document_properties_page_size_orientation_landscape=横å‘
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=文本
+document_properties_page_size_name_legal=法律
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}}({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}}({{name}},{{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=快速 Web 视图:
+document_properties_linearized_yes=是
+document_properties_linearized_no=å¦
+document_properties_close=关闭
+
+print_progress_message=正在准备打å°æ–‡æ¡£â€¦
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=å–消
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=切æ¢ä¾§æ 
+toggle_sidebar_notification.title=切æ¢ä¾§æ ï¼ˆæ–‡æ¡£æ‰€å«çš„大纲/附件)
+toggle_sidebar_label=切æ¢ä¾§æ 
+document_outline.title=显示文档大纲(åŒå‡»å±•å¼€/折å æ‰€æœ‰é¡¹ï¼‰
+document_outline_label=文档大纲
+attachments.title=显示附件
+attachments_label=附件
+thumbs.title=显示缩略图
+thumbs_label=缩略图
+findbar.title=在文档中查找
+findbar_label=查找
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=é¡µç  {{page}}
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=é¡µç  {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=é¡µé¢ {{page}} 的缩略图
+
+# Find panel button title and messages
+find_input.title=查找
+find_input.placeholder=在文档中查找…
+find_previous.title=查找è¯è¯­ä¸Šä¸€æ¬¡å‡ºçŽ°çš„ä½ç½®
+find_previous_label=上一页
+find_next.title=查找è¯è¯­åŽä¸€æ¬¡å‡ºçŽ°çš„ä½ç½®
+find_next_label=下一页
+find_highlight=全部高亮显示
+find_match_case_label=区分大å°å†™
+find_entire_word_label=å­—è¯åŒ¹é…
+find_reached_top=到达文档开头,从末尾继续
+find_reached_bottom=到达文档末尾,从开头继续
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]=第 {{current}} é¡¹ï¼Œå…±åŒ¹é… {{total}} 项
+find_match_count[two]=第 {{current}} é¡¹ï¼Œå…±åŒ¹é… {{total}} 项
+find_match_count[few]=第 {{current}} é¡¹ï¼Œå…±åŒ¹é… {{total}} 项
+find_match_count[many]=第 {{current}} é¡¹ï¼Œå…±åŒ¹é… {{total}} 项
+find_match_count[other]=第 {{current}} é¡¹ï¼Œå…±åŒ¹é… {{total}} 项
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=超过 {{limit}} 项匹é…
+find_match_count_limit[one]=超过 {{limit}} 项匹é…
+find_match_count_limit[two]=超过 {{limit}} 项匹é…
+find_match_count_limit[few]=超过 {{limit}} 项匹é…
+find_match_count_limit[many]=超过 {{limit}} 项匹é…
+find_match_count_limit[other]=超过 {{limit}} 项匹é…
+find_not_found=找ä¸åˆ°æŒ‡å®šè¯è¯­
+
+# Error panel labels
+error_more_info=更多信æ¯
+error_less_info=æ›´å°‘ä¿¡æ¯
+error_close=关闭
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=ä¿¡æ¯ï¼š{{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=堆栈:{{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=文件:{{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=è¡Œå·ï¼š{{line}}
+rendering_error=渲染页é¢æ—¶å‘生错误。
+
+# Predefined zoom values
+page_scale_width=适åˆé¡µå®½
+page_scale_fit=适åˆé¡µé¢
+page_scale_auto=自动缩放
+page_scale_actual=实际大å°
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=错误
+loading_error=载入 PDF æ—¶å‘生错误。
+invalid_file_error=无效或æŸåçš„ PDF 文件。
+missing_file_error=缺少 PDF 文件。
+unexpected_response_error=æ„外的æœåŠ¡å™¨å“应。
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}},{{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} 注释]
+password_label=输入密ç ä»¥æ‰“开此 PDF 文件。
+password_invalid=密ç æ— æ•ˆã€‚请é‡è¯•ã€‚
+password_ok=确定
+password_cancel=å–消
+
+printing_not_supported=警告:此æµè§ˆå™¨å°šæœªå®Œæ•´æ”¯æŒæ‰“å°åŠŸèƒ½ã€‚
+printing_not_ready=警告:此 PDF 未完æˆè½½å…¥ï¼Œæ— æ³•æ‰“å°ã€‚
+web_fonts_disabled=Web 字体已被ç¦ç”¨ï¼šæ— æ³•ä½¿ç”¨åµŒå…¥çš„ PDF 字体。
+document_colors_not_allowed=PDF 文档无法使用自己的颜色:æµè§ˆå™¨ä¸­â€œå…许页é¢é€‰æ‹©è‡ªå·±çš„颜色â€çš„选项未被勾选。
diff --git a/js/pdfjs/web/locale/zh-TW/viewer.properties b/js/pdfjs/web/locale/zh-TW/viewer.properties
new file mode 100644
index 0000000..eb764db
--- /dev/null
+++ b/js/pdfjs/web/locale/zh-TW/viewer.properties
@@ -0,0 +1,248 @@
+# Copyright 2012 Mozilla Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=上一é 
+previous_label=上一é 
+next.title=下一é 
+next_label=下一é 
+
+# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
+page.title=第
+# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
+# representing the total number of pages in the document.
+of_pages=é ï¼Œå…± {{pagesCount}} é 
+# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
+# will be replaced by a number representing the currently visible page,
+# respectively a number representing the total number of pages in the document.
+page_of_pages=(第 {{pageNumber}} é ï¼Œå…± {{pagesCount}} é ï¼‰
+
+zoom_out.title=縮å°
+zoom_out_label=縮å°
+zoom_in.title=放大
+zoom_in_label=放大
+zoom.title=縮放
+presentation_mode.title=切æ›è‡³ç°¡å ±æ¨¡å¼
+presentation_mode_label=簡報模å¼
+open_file.title=開啟檔案
+open_file_label=é–‹å•Ÿ
+print.title=列å°
+print_label=列å°
+download.title=下載
+download_label=下載
+bookmark.title=ç›®å‰æª¢è¦–的內容(複製或開啟於新視窗)
+bookmark_label=ç›®å‰æª¢è¦–
+
+# Secondary toolbar and context menu
+tools.title=工具
+tools_label=工具
+first_page.title=跳到第一é 
+first_page.label=跳到第一é 
+first_page_label=跳到第一é 
+last_page.title=跳到最後一é 
+last_page.label=跳到最後一é 
+last_page_label=跳到最後一é 
+page_rotate_cw.title=順時é‡æ—‹è½‰
+page_rotate_cw.label=順時é‡æ—‹è½‰
+page_rotate_cw_label=順時é‡æ—‹è½‰
+page_rotate_ccw.title=逆時é‡æ—‹è½‰
+page_rotate_ccw.label=逆時é‡æ—‹è½‰
+page_rotate_ccw_label=逆時é‡æ—‹è½‰
+
+cursor_text_select_tool.title=開啟文字é¸æ“‡å·¥å…·
+cursor_text_select_tool_label=文字é¸æ“‡å·¥å…·
+cursor_hand_tool.title=é–‹å•Ÿé é¢ç§»å‹•å·¥å…·
+cursor_hand_tool_label=é é¢ç§»å‹•å·¥å…·
+
+scroll_vertical.title=使用垂直æ²å‹•ç‰ˆé¢
+scroll_vertical_label=åž‚ç›´æ²å‹•
+scroll_horizontal.title=使用水平æ²å‹•ç‰ˆé¢
+scroll_horizontal_label=æ°´å¹³æ²å‹•
+scroll_wrapped.title=使用多é æ²å‹•ç‰ˆé¢
+scroll_wrapped_label=多é æ²å‹•
+
+spread_none.title=ä¸è¦é€²è¡Œè·¨é é¡¯ç¤º
+spread_none_label=ä¸è·¨é 
+spread_odd.title=從奇數é é–‹å§‹è·¨é 
+spread_odd_label=奇數跨é 
+spread_even.title=從å¶æ•¸é é–‹å§‹è·¨é 
+spread_even_label=å¶æ•¸è·¨é 
+
+# Document properties dialog box
+document_properties.title=文件內容…
+document_properties_label=文件內容…
+document_properties_file_name=檔案å稱:
+document_properties_file_size=檔案大å°:
+# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in kilobytes, respectively in bytes.
+document_properties_kb={{size_kb}} KB({{size_b}} ä½å…ƒçµ„)
+# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
+# will be replaced by the PDF file size in megabytes, respectively in bytes.
+document_properties_mb={{size_mb}} MB({{size_b}} ä½å…ƒçµ„)
+document_properties_title=標題:
+document_properties_author=作者:
+document_properties_subject=主旨:
+document_properties_keywords=é—œéµå­—:
+document_properties_creation_date=建立日期:
+document_properties_modification_date=修改日期:
+# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
+# will be replaced by the creation/modification date, and time, of the PDF file.
+document_properties_date_string={{date}} {{time}}
+document_properties_creator=建立者:
+document_properties_producer=PDF 產生器:
+document_properties_version=PDF 版本:
+document_properties_page_count=é æ•¸:
+document_properties_page_size=é é¢å¤§å°:
+document_properties_page_size_unit_inches=in
+document_properties_page_size_unit_millimeters=mm
+document_properties_page_size_orientation_portrait=åž‚ç›´
+document_properties_page_size_orientation_landscape=æ°´å¹³
+document_properties_page_size_name_a3=A3
+document_properties_page_size_name_a4=A4
+document_properties_page_size_name_letter=Letter
+document_properties_page_size_name_legal=Legal
+# LOCALIZATION NOTE (document_properties_page_size_dimension_string):
+# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement and orientation, of the (current) page.
+document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}}({{orientation}})
+# LOCALIZATION NOTE (document_properties_page_size_dimension_name_string):
+# "{{width}}", "{{height}}", {{unit}}, {{name}}, and {{orientation}} will be replaced by
+# the size, respectively their unit of measurement, name, and orientation, of the (current) page.
+document_properties_page_size_dimension_name_string={{width}} × {{height}} {{unit}}({{name}},{{orientation}})
+# LOCALIZATION NOTE (document_properties_linearized): The linearization status of
+# the document; usually called "Fast Web View" in English locales of Adobe software.
+document_properties_linearized=快速 Web 檢視:
+document_properties_linearized_yes=是
+document_properties_linearized_no=å¦
+document_properties_close=關閉
+
+print_progress_message=正在準備列å°æ–‡ä»¶â€¦
+# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
+# a numerical per cent value.
+print_progress_percent={{progress}}%
+print_progress_close=å–消
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_sidebar.title=切æ›å´é‚Šæ¬„
+toggle_sidebar_notification.title=切æ›å´é‚Šæ””(文件包å«å¤§ç¶±æˆ–附件)
+toggle_sidebar_label=切æ›å´é‚Šæ¬„
+document_outline.title=顯示文件大綱(雙擊展開/摺疊所有項目)
+document_outline_label=文件大綱
+attachments.title=顯示附件
+attachments_label=附件
+thumbs.title=顯示縮圖
+thumbs_label=縮圖
+findbar.title=在文件中尋找
+findbar_label=尋找
+
+# LOCALIZATION NOTE (page_canvas): "{{page}}" will be replaced by the page number.
+page_canvas=第 {{page}} é 
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=é  {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=é  {{page}} 的縮圖
+
+# Find panel button title and messages
+find_input.title=尋找
+find_input.placeholder=在文件中æœå°‹â€¦
+find_previous.title=尋找文字å‰æ¬¡å‡ºç¾çš„ä½ç½®
+find_previous_label=上一個
+find_next.title=尋找文字下次出ç¾çš„ä½ç½®
+find_next_label=下一個
+find_highlight=全部強調標示
+find_match_case_label=å€åˆ†å¤§å°å¯«
+find_entire_word_label=符åˆæ•´å€‹å­—
+find_reached_top=å·²æœå°‹è‡³æ–‡ä»¶é ‚端,自底端繼續æœå°‹
+find_reached_bottom=å·²æœå°‹è‡³æ–‡ä»¶åº•ç«¯ï¼Œè‡ªé ‚端繼續æœå°‹
+# LOCALIZATION NOTE (find_match_count): The supported plural forms are
+# [one|two|few|many|other], with [other] as the default value.
+# "{{current}}" and "{{total}}" will be replaced by a number representing the
+# index of the currently active find result, respectively a number representing
+# the total number of matches in the document.
+find_match_count={[ plural(total) ]}
+find_match_count[one]=第 {{current}} 筆,共找到 {{total}} 筆
+find_match_count[two]=第 {{current}} 筆,共找到 {{total}} 筆
+find_match_count[few]=第 {{current}} 筆,共找到 {{total}} 筆
+find_match_count[many]=第 {{current}} 筆,共找到 {{total}} 筆
+find_match_count[other]=第 {{current}} 筆,共找到 {{total}} 筆
+# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
+# [zero|one|two|few|many|other], with [other] as the default value.
+# "{{limit}}" will be replaced by a numerical value.
+find_match_count_limit={[ plural(limit) ]}
+find_match_count_limit[zero]=æ‰¾åˆ°è¶…éŽ {{limit}} ç­†
+find_match_count_limit[one]=æ‰¾åˆ°è¶…éŽ {{limit}} ç­†
+find_match_count_limit[two]=æ‰¾åˆ°è¶…éŽ {{limit}} ç­†
+find_match_count_limit[few]=æ‰¾åˆ°è¶…éŽ {{limit}} ç­†
+find_match_count_limit[many]=æ‰¾åˆ°è¶…éŽ {{limit}} ç­†
+find_match_count_limit[other]=æ‰¾åˆ°è¶…éŽ {{limit}} ç­†
+find_not_found=找ä¸åˆ°æŒ‡å®šæ–‡å­—
+
+# Error panel labels
+error_more_info=更多資訊
+error_less_info=更少資訊
+error_close=關閉
+# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
+# replaced by the PDF.JS version and build ID.
+error_version_info=PDF.js v{{version}} (build: {{build}})
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=訊æ¯: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.
+error_stack=堆疊: {{stack}}
+# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
+error_file=檔案: {{file}}
+# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
+error_line=行: {{line}}
+rendering_error=æ繪é é¢æ™‚發生錯誤。
+
+# Predefined zoom values
+page_scale_width=é é¢å¯¬åº¦
+page_scale_fit=縮放至é é¢å¤§å°
+page_scale_auto=自動縮放
+page_scale_actual=實際大å°
+# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
+# numerical scale value.
+page_scale_percent={{scale}}%
+
+# Loading indicator messages
+loading_error_indicator=錯誤
+loading_error=載入 PDF 時發生錯誤。
+invalid_file_error=無效或毀æçš„ PDF 檔案。
+missing_file_error=找ä¸åˆ° PDF 檔案。
+unexpected_response_error=伺æœå™¨å›žæ‡‰æœªé æœŸçš„內容。
+
+# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
+# replaced by the modification date, and time, of the annotation.
+annotation_date_string={{date}} {{time}}
+
+# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
+# "{{type}}" will be replaced with an annotation type from a list defined in
+# the PDF spec (32000-1:2008 Table 169 – Annotation types).
+# Some common types are e.g.: "Check", "Text", "Comment", "Note"
+text_annotation_type.alt=[{{type}} 註解]
+password_label=請輸入用來開啟此 PDF 檔案的密碼。
+password_invalid=密碼ä¸æ­£ç¢ºï¼Œè«‹å†è©¦ä¸€æ¬¡ã€‚
+password_ok=確定
+password_cancel=å–消
+
+printing_not_supported=警告: æ­¤ç€è¦½å™¨æœªå®Œæ•´æ”¯æ´åˆ—å°åŠŸèƒ½ã€‚
+printing_not_ready=警告: æ­¤ PDF 未完æˆä¸‹è¼‰ä»¥ä¾›åˆ—å°ã€‚
+web_fonts_disabled=å·²åœç”¨ç¶²è·¯å­—åž‹ (Web fonts): 無法使用 PDF 內嵌字型。
+document_colors_not_allowed=ç€è¦½å™¨çš„「優先使用網é æŒ‡å®šçš„色彩ã€æœªè¢«å‹¾é¸ï¼ŒPDF 文件無法使用自己的色彩。
diff --git a/js/pdfjs/web/viewer.css b/js/pdfjs/web/viewer.css
new file mode 100644
index 0000000..f25b2e0
--- /dev/null
+++ b/js/pdfjs/web/viewer.css
@@ -0,0 +1,2442 @@
+/* Copyright 2014 Mozilla Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+.textLayer {
+ position: absolute;
+ left: 0;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ overflow: hidden;
+ opacity: 0.2;
+ line-height: 1.0;
+}
+
+.textLayer > span {
+ color: transparent;
+ position: absolute;
+ white-space: pre;
+ cursor: text;
+ -webkit-transform-origin: 0% 0%;
+ transform-origin: 0% 0%;
+}
+
+.textLayer .highlight {
+ margin: -1px;
+ padding: 1px;
+ background-color: rgba(180, 0, 170, 1);
+ border-radius: 4px;
+}
+
+.textLayer .highlight.begin {
+ border-radius: 4px 0px 0px 4px;
+}
+
+.textLayer .highlight.end {
+ border-radius: 0px 4px 4px 0px;
+}
+
+.textLayer .highlight.middle {
+ border-radius: 0px;
+}
+
+.textLayer .highlight.selected {
+ background-color: rgba(0, 100, 0, 1);
+}
+
+.textLayer ::-moz-selection {
+ background: rgba(0, 0, 255, 1);
+}
+
+.textLayer ::selection {
+ background: rgba(0, 0, 255, 1);
+}
+
+.textLayer .endOfContent {
+ display: block;
+ position: absolute;
+ left: 0px;
+ top: 100%;
+ right: 0px;
+ bottom: 0px;
+ z-index: -1;
+ cursor: default;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.textLayer .endOfContent.active {
+ top: 0px;
+}
+
+
+.annotationLayer section {
+ position: absolute;
+}
+
+.annotationLayer .linkAnnotation > a,
+.annotationLayer .buttonWidgetAnnotation.pushButton > a {
+ position: absolute;
+ font-size: 1em;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+}
+
+.annotationLayer .linkAnnotation > a:hover,
+.annotationLayer .buttonWidgetAnnotation.pushButton > a:hover {
+ opacity: 0.2;
+ background: rgba(255, 255, 0, 1);
+ box-shadow: 0px 2px 10px rgba(255, 255, 0, 1);
+}
+
+.annotationLayer .textAnnotation img {
+ position: absolute;
+ cursor: pointer;
+}
+
+.annotationLayer .textWidgetAnnotation input,
+.annotationLayer .textWidgetAnnotation textarea,
+.annotationLayer .choiceWidgetAnnotation select,
+.annotationLayer .buttonWidgetAnnotation.checkBox input,
+.annotationLayer .buttonWidgetAnnotation.radioButton input {
+ background-color: rgba(0, 54, 255, 0.13);
+ border: 1px solid transparent;
+ box-sizing: border-box;
+ font-size: 9px;
+ height: 100%;
+ margin: 0;
+ padding: 0 3px;
+ vertical-align: top;
+ width: 100%;
+}
+
+.annotationLayer .choiceWidgetAnnotation select option {
+ padding: 0;
+}
+
+.annotationLayer .buttonWidgetAnnotation.radioButton input {
+ border-radius: 50%;
+}
+
+.annotationLayer .textWidgetAnnotation textarea {
+ font: message-box;
+ font-size: 9px;
+ resize: none;
+}
+
+.annotationLayer .textWidgetAnnotation input[disabled],
+.annotationLayer .textWidgetAnnotation textarea[disabled],
+.annotationLayer .choiceWidgetAnnotation select[disabled],
+.annotationLayer .buttonWidgetAnnotation.checkBox input[disabled],
+.annotationLayer .buttonWidgetAnnotation.radioButton input[disabled] {
+ background: none;
+ border: 1px solid transparent;
+ cursor: not-allowed;
+}
+
+.annotationLayer .textWidgetAnnotation input:hover,
+.annotationLayer .textWidgetAnnotation textarea:hover,
+.annotationLayer .choiceWidgetAnnotation select:hover,
+.annotationLayer .buttonWidgetAnnotation.checkBox input:hover,
+.annotationLayer .buttonWidgetAnnotation.radioButton input:hover {
+ border: 1px solid rgba(0, 0, 0, 1);
+}
+
+.annotationLayer .textWidgetAnnotation input:focus,
+.annotationLayer .textWidgetAnnotation textarea:focus,
+.annotationLayer .choiceWidgetAnnotation select:focus {
+ background: none;
+ border: 1px solid transparent;
+}
+
+.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,
+.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,
+.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before {
+ background-color: rgba(0, 0, 0, 1);
+ content: '';
+ display: block;
+ position: absolute;
+}
+
+.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,
+.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after {
+ height: 80%;
+ left: 45%;
+ width: 1px;
+}
+
+.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before {
+ -webkit-transform: rotate(45deg);
+ transform: rotate(45deg);
+}
+
+.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after {
+ -webkit-transform: rotate(-45deg);
+ transform: rotate(-45deg);
+}
+
+.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before {
+ border-radius: 50%;
+ height: 50%;
+ left: 30%;
+ top: 20%;
+ width: 50%;
+}
+
+.annotationLayer .textWidgetAnnotation input.comb {
+ font-family: monospace;
+ padding-left: 2px;
+ padding-right: 0;
+}
+
+.annotationLayer .textWidgetAnnotation input.comb:focus {
+ /*
+ * Letter spacing is placed on the right side of each character. Hence, the
+ * letter spacing of the last character may be placed outside the visible
+ * area, causing horizontal scrolling. We avoid this by extending the width
+ * when the element has focus and revert this when it loses focus.
+ */
+ width: 115%;
+}
+
+.annotationLayer .buttonWidgetAnnotation.checkBox input,
+.annotationLayer .buttonWidgetAnnotation.radioButton input {
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ appearance: none;
+ padding: 0;
+}
+
+.annotationLayer .popupWrapper {
+ position: absolute;
+ width: 20em;
+}
+
+.annotationLayer .popup {
+ position: absolute;
+ z-index: 200;
+ max-width: 20em;
+ background-color: rgba(255, 255, 153, 1);
+ box-shadow: 0px 2px 5px rgba(136, 136, 136, 1);
+ border-radius: 2px;
+ padding: 6px;
+ margin-left: 5px;
+ cursor: pointer;
+ font: message-box;
+ font-size: 9px;
+ word-wrap: break-word;
+}
+
+.annotationLayer .popup > * {
+ font-size: 9px;
+}
+
+.annotationLayer .popup h1 {
+ display: inline-block;
+}
+
+.annotationLayer .popup span {
+ display: inline-block;
+ margin-left: 5px;
+}
+
+.annotationLayer .popup p {
+ border-top: 1px solid rgba(51, 51, 51, 1);
+ margin-top: 2px;
+ padding-top: 2px;
+}
+
+.annotationLayer .highlightAnnotation,
+.annotationLayer .underlineAnnotation,
+.annotationLayer .squigglyAnnotation,
+.annotationLayer .strikeoutAnnotation,
+.annotationLayer .freeTextAnnotation,
+.annotationLayer .lineAnnotation svg line,
+.annotationLayer .squareAnnotation svg rect,
+.annotationLayer .circleAnnotation svg ellipse,
+.annotationLayer .polylineAnnotation svg polyline,
+.annotationLayer .polygonAnnotation svg polygon,
+.annotationLayer .caretAnnotation,
+.annotationLayer .inkAnnotation svg polyline,
+.annotationLayer .stampAnnotation,
+.annotationLayer .fileAttachmentAnnotation {
+ cursor: pointer;
+}
+
+.pdfViewer .canvasWrapper {
+ overflow: hidden;
+}
+
+.pdfViewer .page {
+ direction: ltr;
+ width: 816px;
+ height: 1056px;
+ margin: 1px auto -8px auto;
+ position: relative;
+ overflow: visible;
+ border: 9px solid transparent;
+ background-clip: content-box;
+ -webkit-border-image: url(images/shadow.png) 9 9 repeat;
+ -o-border-image: url(images/shadow.png) 9 9 repeat;
+ border-image: url(images/shadow.png) 9 9 repeat;
+ background-color: rgba(255, 255, 255, 1);
+}
+
+.pdfViewer.removePageBorders .page {
+ margin: 0px auto 10px auto;
+ border: none;
+}
+
+.pdfViewer.singlePageView {
+ display: inline-block;
+}
+
+.pdfViewer.singlePageView .page {
+ margin: 0;
+ border: none;
+}
+
+.pdfViewer.scrollHorizontal, .pdfViewer.scrollWrapped, .spread {
+ margin-left: 3.5px;
+ margin-right: 3.5px;
+ text-align: center;
+}
+
+.pdfViewer.scrollHorizontal, .spread {
+ white-space: nowrap;
+}
+
+.pdfViewer.removePageBorders,
+.pdfViewer.scrollHorizontal .spread,
+.pdfViewer.scrollWrapped .spread {
+ margin-left: 0;
+ margin-right: 0;
+}
+
+.spread .page,
+.pdfViewer.scrollHorizontal .page,
+.pdfViewer.scrollWrapped .page,
+.pdfViewer.scrollHorizontal .spread,
+.pdfViewer.scrollWrapped .spread {
+ display: inline-block;
+ vertical-align: middle;
+}
+
+.spread .page,
+.pdfViewer.scrollHorizontal .page,
+.pdfViewer.scrollWrapped .page {
+ margin-left: -3.5px;
+ margin-right: -3.5px;
+}
+
+.pdfViewer.removePageBorders .spread .page,
+.pdfViewer.removePageBorders.scrollHorizontal .page,
+.pdfViewer.removePageBorders.scrollWrapped .page {
+ margin-left: 5px;
+ margin-right: 5px;
+}
+
+.pdfViewer .page canvas {
+ margin: 0;
+ display: block;
+}
+
+.pdfViewer .page canvas[hidden] {
+ display: none;
+}
+
+.pdfViewer .page .loadingIcon {
+ position: absolute;
+ display: block;
+ left: 0;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ background: url('images/loading-icon.gif') center no-repeat;
+}
+
+.pdfPresentationMode .pdfViewer {
+ margin-left: 0;
+ margin-right: 0;
+}
+
+.pdfPresentationMode .pdfViewer .page,
+.pdfPresentationMode .pdfViewer .spread {
+ display: block;
+}
+
+.pdfPresentationMode .pdfViewer .page,
+.pdfPresentationMode .pdfViewer.removePageBorders .page {
+ margin-left: auto;
+ margin-right: auto;
+}
+
+.pdfPresentationMode:-ms-fullscreen .pdfViewer .page {
+ margin-bottom: 100% !important;
+}
+
+.pdfPresentationMode:-webkit-full-screen .pdfViewer .page {
+ margin-bottom: 100%;
+ border: 0;
+}
+
+.pdfPresentationMode:-moz-full-screen .pdfViewer .page {
+ margin-bottom: 100%;
+ border: 0;
+}
+
+.pdfPresentationMode:fullscreen .pdfViewer .page {
+ margin-bottom: 100%;
+ border: 0;
+}
+
+:root {
+ --sidebar-width: 200px;
+ --sidebar-transition-duration: 200ms;
+ --sidebar-transition-timing-function: ease;
+}
+
+* {
+ padding: 0;
+ margin: 0;
+}
+
+html {
+ height: 100%;
+ width: 100%;
+ /* Font size is needed to make the activity bar the correct size. */
+ font-size: 10px;
+}
+
+body {
+ height: 100%;
+ width: 100%;
+ background-color: rgba(64, 64, 64, 1);
+ background-image: url(images/texture.png);
+}
+
+body,
+input,
+button,
+select {
+ font: message-box;
+ outline: none;
+}
+
+.hidden {
+ display: none !important;
+}
+[hidden] {
+ display: none !important;
+}
+
+#viewerContainer.pdfPresentationMode:-ms-fullscreen {
+ top: 0px !important;
+ overflow: hidden !important;
+}
+
+#viewerContainer.pdfPresentationMode:-ms-fullscreen::-ms-backdrop {
+ background-color: rgba(0, 0, 0, 1);
+}
+
+#viewerContainer.pdfPresentationMode:-webkit-full-screen {
+ top: 0px;
+ border-top: 2px solid rgba(0, 0, 0, 0);
+ background-color: rgba(0, 0, 0, 1);
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+ cursor: none;
+ -webkit-user-select: none;
+ user-select: none;
+}
+
+#viewerContainer.pdfPresentationMode:-moz-full-screen {
+ top: 0px;
+ border-top: 2px solid rgba(0, 0, 0, 0);
+ background-color: rgba(0, 0, 0, 1);
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+ cursor: none;
+ -moz-user-select: none;
+ user-select: none;
+}
+
+#viewerContainer.pdfPresentationMode:-ms-fullscreen {
+ top: 0px;
+ border-top: 2px solid rgba(0, 0, 0, 0);
+ background-color: rgba(0, 0, 0, 1);
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+ cursor: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+#viewerContainer.pdfPresentationMode:fullscreen {
+ top: 0px;
+ border-top: 2px solid rgba(0, 0, 0, 0);
+ background-color: rgba(0, 0, 0, 1);
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+ cursor: none;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.pdfPresentationMode:-webkit-full-screen a:not(.internalLink) {
+ display: none;
+}
+
+.pdfPresentationMode:-moz-full-screen a:not(.internalLink) {
+ display: none;
+}
+
+.pdfPresentationMode:-ms-fullscreen a:not(.internalLink) {
+ display: none;
+}
+
+.pdfPresentationMode:fullscreen a:not(.internalLink) {
+ display: none;
+}
+
+.pdfPresentationMode:-webkit-full-screen .textLayer > span {
+ cursor: none;
+}
+
+.pdfPresentationMode:-moz-full-screen .textLayer > span {
+ cursor: none;
+}
+
+.pdfPresentationMode:-ms-fullscreen .textLayer > span {
+ cursor: none;
+}
+
+.pdfPresentationMode:fullscreen .textLayer > span {
+ cursor: none;
+}
+
+.pdfPresentationMode.pdfPresentationModeControls > *,
+.pdfPresentationMode.pdfPresentationModeControls .textLayer > span {
+ cursor: default;
+}
+
+#outerContainer {
+ width: 100%;
+ height: 100%;
+ position: relative;
+}
+
+#sidebarContainer {
+ position: absolute;
+ top: 32px;
+ bottom: 0;
+ width: 200px;
+ width: var(--sidebar-width);
+ visibility: hidden;
+ z-index: 100;
+ border-top: 1px solid rgba(51, 51, 51, 1);
+ -webkit-transition-duration: 200ms;
+ transition-duration: 200ms;
+ -webkit-transition-duration: var(--sidebar-transition-duration);
+ transition-duration: var(--sidebar-transition-duration);
+ -webkit-transition-timing-function: ease;
+ transition-timing-function: ease;
+ -webkit-transition-timing-function: var(--sidebar-transition-timing-function);
+ transition-timing-function: var(--sidebar-transition-timing-function);
+}
+html[dir='ltr'] #sidebarContainer {
+ -webkit-transition-property: left;
+ transition-property: left;
+ left: -200px;
+ left: calc(0px - var(--sidebar-width));
+}
+html[dir='rtl'] #sidebarContainer {
+ -webkit-transition-property: right;
+ transition-property: right;
+ right: -200px;
+ right: calc(0px - var(--sidebar-width));
+}
+
+.loadingInProgress #sidebarContainer {
+ top: 36px;
+}
+
+#outerContainer.sidebarResizing #sidebarContainer {
+ /* Improve responsiveness and avoid visual glitches when the sidebar is resized. */
+ -webkit-transition-duration: 0s;
+ transition-duration: 0s;
+ /* Prevent e.g. the thumbnails being selected when the sidebar is resized. */
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+#outerContainer.sidebarMoving #sidebarContainer,
+#outerContainer.sidebarOpen #sidebarContainer {
+ visibility: visible;
+}
+html[dir='ltr'] #outerContainer.sidebarOpen #sidebarContainer {
+ left: 0px;
+}
+html[dir='rtl'] #outerContainer.sidebarOpen #sidebarContainer {
+ right: 0px;
+}
+
+#mainContainer {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ min-width: 320px;
+}
+
+#sidebarContent {
+ top: 32px;
+ bottom: 0;
+ overflow: auto;
+ -webkit-overflow-scrolling: touch;
+ position: absolute;
+ width: 100%;
+ background-color: rgba(0, 0, 0, 0.1);
+}
+html[dir='ltr'] #sidebarContent {
+ left: 0;
+ box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.25);
+}
+html[dir='rtl'] #sidebarContent {
+ right: 0;
+ box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.25);
+}
+
+#viewerContainer {
+ overflow: auto;
+ -webkit-overflow-scrolling: touch;
+ position: absolute;
+ top: 32px;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ outline: none;
+}
+#viewerContainer:not(.pdfPresentationMode) {
+ -webkit-transition-duration: 200ms;
+ transition-duration: 200ms;
+ -webkit-transition-duration: var(--sidebar-transition-duration);
+ transition-duration: var(--sidebar-transition-duration);
+ -webkit-transition-timing-function: ease;
+ transition-timing-function: ease;
+ -webkit-transition-timing-function: var(--sidebar-transition-timing-function);
+ transition-timing-function: var(--sidebar-transition-timing-function);
+}
+html[dir='ltr'] #viewerContainer {
+ box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.05);
+}
+html[dir='rtl'] #viewerContainer {
+ box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05);
+}
+
+#outerContainer.sidebarResizing #viewerContainer {
+ /* Improve responsiveness and avoid visual glitches when the sidebar is resized. */
+ -webkit-transition-duration: 0s;
+ transition-duration: 0s;
+}
+
+html[dir='ltr'] #outerContainer.sidebarOpen #viewerContainer:not(.pdfPresentationMode) {
+ -webkit-transition-property: left;
+ transition-property: left;
+ left: 200px;
+ left: var(--sidebar-width);
+}
+html[dir='rtl'] #outerContainer.sidebarOpen #viewerContainer:not(.pdfPresentationMode) {
+ -webkit-transition-property: right;
+ transition-property: right;
+ right: 200px;
+ right: var(--sidebar-width);
+}
+
+.toolbar {
+ position: relative;
+ left: 0;
+ right: 0;
+ z-index: 9999;
+ cursor: default;
+}
+
+#toolbarContainer {
+ width: 100%;
+}
+
+#toolbarSidebar {
+ width: 100%;
+ height: 32px;
+ background-color: rgba(66, 66, 66, 1); /* fallback */
+ background-image: url(images/texture.png),
+ -webkit-gradient(linear, left top, left bottom, from(rgba(77, 77, 77, 0.99)), to(rgba(64, 64, 64, 0.95)));
+ background-image: url(images/texture.png),
+ linear-gradient(rgba(77, 77, 77, 0.99), rgba(64, 64, 64, 0.95));
+}
+html[dir='ltr'] #toolbarSidebar {
+ box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.25),
+ inset 0 -1px 0 rgba(255, 255, 255, 0.05),
+ 0 1px 0 rgba(0, 0, 0, 0.15),
+ 0 0 1px rgba(0, 0, 0, 0.1);
+}
+html[dir='rtl'] #toolbarSidebar {
+ box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.25),
+ inset 0 1px 0 rgba(255, 255, 255, 0.05),
+ 0 1px 0 rgba(0, 0, 0, 0.15),
+ 0 0 1px rgba(0, 0, 0, 0.1);
+}
+
+#sidebarResizer {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ width: 6px;
+ z-index: 200;
+ cursor: ew-resize;
+}
+html[dir='ltr'] #sidebarResizer {
+ right: -6px;
+}
+html[dir='rtl'] #sidebarResizer {
+ left: -6px;
+}
+
+#toolbarContainer, .findbar, .secondaryToolbar {
+ position: relative;
+ height: 32px;
+ background-color: rgba(71, 71, 71, 1); /* fallback */
+ background-image: url(images/texture.png),
+ -webkit-gradient(linear, left top, left bottom, from(rgba(82, 82, 82, 0.99)), to(rgba(69, 69, 69, 0.95)));
+ background-image: url(images/texture.png),
+ linear-gradient(rgba(82, 82, 82, 0.99), rgba(69, 69, 69, 0.95));
+}
+html[dir='ltr'] #toolbarContainer, .findbar, .secondaryToolbar {
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.15),
+ inset 0 -1px 0 rgba(255, 255, 255, 0.05),
+ 0 1px 0 rgba(0, 0, 0, 0.15),
+ 0 1px 1px rgba(0, 0, 0, 0.1);
+}
+html[dir='rtl'] #toolbarContainer, .findbar, .secondaryToolbar {
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.15),
+ inset 0 -1px 0 rgba(255, 255, 255, 0.05),
+ 0 1px 0 rgba(0, 0, 0, 0.15),
+ 0 1px 1px rgba(0, 0, 0, 0.1);
+}
+
+#toolbarViewer {
+ height: 32px;
+}
+
+#loadingBar {
+ position: relative;
+ width: 100%;
+ height: 4px;
+ background-color: rgba(51, 51, 51, 1);
+ border-bottom: 1px solid rgba(51, 51, 51, 1);
+}
+
+#loadingBar .progress {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 0%;
+ height: 100%;
+ background-color: rgba(221, 221, 221, 1);
+ overflow: hidden;
+ -webkit-transition: width 200ms;
+ transition: width 200ms;
+}
+
+@-webkit-keyframes progressIndeterminate {
+ 0% { left: -142px; }
+ 100% { left: 0; }
+}
+
+@keyframes progressIndeterminate {
+ 0% { left: -142px; }
+ 100% { left: 0; }
+}
+
+#loadingBar .progress.indeterminate {
+ background-color: rgba(153, 153, 153, 1);
+ -webkit-transition: none;
+ transition: none;
+}
+
+#loadingBar .progress.indeterminate .glimmer {
+ position: absolute;
+ top: 0;
+ left: 0;
+ height: 100%;
+ width: calc(100% + 150px);
+ background: repeating-linear-gradient(135deg,
+ rgba(187, 187, 187, 1) 0, rgba(153, 153, 153, 1) 5px,
+ rgba(153, 153, 153, 1) 45px, rgba(221, 221, 221, 1) 55px,
+ rgba(221, 221, 221, 1) 95px, rgba(187, 187, 187, 1) 100px);
+ -webkit-animation: progressIndeterminate 950ms linear infinite;
+ animation: progressIndeterminate 950ms linear infinite;
+}
+
+.findbar, .secondaryToolbar {
+ top: 32px;
+ position: absolute;
+ z-index: 10000;
+ height: auto;
+ min-width: 16px;
+ padding: 0px 6px 0px 6px;
+ margin: 4px 2px 4px 2px;
+ color: rgba(217, 217, 217, 1);
+ font-size: 12px;
+ line-height: 14px;
+ text-align: left;
+ cursor: default;
+}
+
+.findbar {
+ min-width: 300px;
+}
+.findbar > div {
+ height: 32px;
+}
+.findbar.wrapContainers > div {
+ clear: both;
+}
+.findbar.wrapContainers > div#findbarMessageContainer {
+ height: auto;
+}
+html[dir='ltr'] .findbar {
+ left: 68px;
+}
+html[dir='rtl'] .findbar {
+ right: 68px;
+}
+
+.findbar label {
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+#findInput {
+ width: 200px;
+}
+#findInput::-webkit-input-placeholder {
+ color: rgba(191, 191, 191, 1);
+}
+#findInput::-moz-placeholder {
+ font-style: italic;
+}
+#findInput:-ms-input-placeholder {
+ font-style: italic;
+}
+#findInput::-ms-input-placeholder {
+ font-style: italic;
+}
+#findInput::placeholder {
+ font-style: italic;
+}
+#findInput[data-status="pending"] {
+ background-image: url(images/loading-small.png);
+ background-repeat: no-repeat;
+ background-position: right;
+}
+html[dir='rtl'] #findInput[data-status="pending"] {
+ background-position: left;
+}
+
+.secondaryToolbar {
+ padding: 6px;
+ height: auto;
+ z-index: 30000;
+}
+html[dir='ltr'] .secondaryToolbar {
+ right: 4px;
+}
+html[dir='rtl'] .secondaryToolbar {
+ left: 4px;
+}
+
+#secondaryToolbarButtonContainer {
+ max-width: 200px;
+ max-height: 400px;
+ overflow-y: auto;
+ -webkit-overflow-scrolling: touch;
+ margin-bottom: -4px;
+}
+
+#secondaryToolbarButtonContainer.hiddenScrollModeButtons > .scrollModeButtons,
+#secondaryToolbarButtonContainer.hiddenSpreadModeButtons > .spreadModeButtons {
+ display: none !important;
+}
+
+.doorHanger,
+.doorHangerRight {
+ border: 1px solid rgba(0, 0, 0, 0.5);
+ border-radius: 2px;
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
+}
+.doorHanger:after, .doorHanger:before,
+.doorHangerRight:after, .doorHangerRight:before {
+ bottom: 100%;
+ border: solid rgba(0, 0, 0, 0);
+ content: " ";
+ height: 0;
+ width: 0;
+ position: absolute;
+ pointer-events: none;
+}
+.doorHanger:after,
+.doorHangerRight:after {
+ border-bottom-color: rgba(82, 82, 82, 0.99);
+ border-width: 8px;
+}
+.doorHanger:before,
+.doorHangerRight:before {
+ border-bottom-color: rgba(0, 0, 0, 0.5);
+ border-width: 9px;
+}
+
+html[dir='ltr'] .doorHanger:after,
+html[dir='rtl'] .doorHangerRight:after {
+ left: 13px;
+ margin-left: -8px;
+}
+
+html[dir='ltr'] .doorHanger:before,
+html[dir='rtl'] .doorHangerRight:before {
+ left: 13px;
+ margin-left: -9px;
+}
+
+html[dir='rtl'] .doorHanger:after,
+html[dir='ltr'] .doorHangerRight:after {
+ right: 13px;
+ margin-right: -8px;
+}
+
+html[dir='rtl'] .doorHanger:before,
+html[dir='ltr'] .doorHangerRight:before {
+ right: 13px;
+ margin-right: -9px;
+}
+
+#findResultsCount {
+ background-color: rgba(217, 217, 217, 1);
+ color: rgba(82, 82, 82, 1);
+ text-align: center;
+ padding: 3px 4px;
+}
+
+#findMsg {
+ font-style: italic;
+ color: rgba(166, 183, 208, 1);
+}
+#findMsg:empty {
+ display: none;
+}
+
+#findInput.notFound {
+ background-color: rgba(255, 102, 102, 1);
+}
+
+#toolbarViewerMiddle {
+ position: absolute;
+ left: 50%;
+ -webkit-transform: translateX(-50%);
+ transform: translateX(-50%);
+}
+
+html[dir='ltr'] #toolbarViewerLeft,
+html[dir='rtl'] #toolbarViewerRight {
+ float: left;
+}
+html[dir='ltr'] #toolbarViewerRight,
+html[dir='rtl'] #toolbarViewerLeft {
+ float: right;
+}
+html[dir='ltr'] #toolbarViewerLeft > *,
+html[dir='ltr'] #toolbarViewerMiddle > *,
+html[dir='ltr'] #toolbarViewerRight > *,
+html[dir='ltr'] .findbar * {
+ position: relative;
+ float: left;
+}
+html[dir='rtl'] #toolbarViewerLeft > *,
+html[dir='rtl'] #toolbarViewerMiddle > *,
+html[dir='rtl'] #toolbarViewerRight > *,
+html[dir='rtl'] .findbar * {
+ position: relative;
+ float: right;
+}
+
+html[dir='ltr'] .splitToolbarButton {
+ margin: 3px 2px 4px 0;
+ display: inline-block;
+}
+html[dir='rtl'] .splitToolbarButton {
+ margin: 3px 0 4px 2px;
+ display: inline-block;
+}
+html[dir='ltr'] .splitToolbarButton > .toolbarButton {
+ border-radius: 0;
+ float: left;
+}
+html[dir='rtl'] .splitToolbarButton > .toolbarButton {
+ border-radius: 0;
+ float: right;
+}
+
+.toolbarButton,
+.secondaryToolbarButton,
+.overlayButton {
+ border: 0 none;
+ background: none;
+ width: 32px;
+ height: 25px;
+}
+
+.toolbarButton > span {
+ display: inline-block;
+ width: 0;
+ height: 0;
+ overflow: hidden;
+}
+
+.toolbarButton[disabled],
+.secondaryToolbarButton[disabled],
+.overlayButton[disabled] {
+ opacity: .5;
+}
+
+.splitToolbarButton.toggled .toolbarButton {
+ margin: 0;
+}
+
+.splitToolbarButton:hover > .toolbarButton,
+.splitToolbarButton:focus > .toolbarButton,
+.splitToolbarButton.toggled > .toolbarButton,
+.toolbarButton.textButton {
+ background-color: rgba(0, 0, 0, 0.12);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0.05)), to(rgba(255, 255, 255, 0)));
+ background-image: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
+ background-clip: padding-box;
+ border: 1px solid rgba(0, 0, 0, 0.35);
+ border-color: rgba(0, 0, 0, 0.32) rgba(0, 0, 0, 0.38) rgba(0, 0, 0, 0.42);
+ box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset,
+ 0 0 1px rgba(255, 255, 255, 0.15) inset,
+ 0 1px 0 rgba(255, 255, 255, 0.05);
+}
+.splitToolbarButton > .toolbarButton:hover,
+.splitToolbarButton > .toolbarButton:focus,
+.dropdownToolbarButton:hover,
+.overlayButton:hover,
+.overlayButton:focus,
+.toolbarButton.textButton:hover,
+.toolbarButton.textButton:focus {
+ background-color: rgba(0,0,0,0.2);
+ box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset,
+ 0 0 1px rgba(255, 255, 255, 0.15) inset,
+ 0 0 1px rgba(0, 0, 0, 0.05);
+ z-index: 199;
+}
+.dropdownToolbarButton:hover {
+ background-color: rgba(0, 0, 0, 0.26);
+}
+.splitToolbarButton > .toolbarButton {
+ position: relative;
+}
+html[dir='ltr'] .splitToolbarButton > .toolbarButton:first-child,
+html[dir='rtl'] .splitToolbarButton > .toolbarButton:last-child {
+ position: relative;
+ margin: 0;
+ margin-right: -1px;
+ border-top-left-radius: 2px;
+ border-bottom-left-radius: 2px;
+ border-right-color: rgba(0, 0, 0, 0);
+}
+html[dir='ltr'] .splitToolbarButton > .toolbarButton:last-child,
+html[dir='rtl'] .splitToolbarButton > .toolbarButton:first-child {
+ position: relative;
+ margin: 0;
+ margin-left: -1px;
+ border-top-right-radius: 2px;
+ border-bottom-right-radius: 2px;
+ border-left-color: rgba(0, 0, 0, 0);
+}
+.splitToolbarButtonSeparator {
+ padding: 8px 0;
+ width: 1px;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 99;
+ box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
+ display: inline-block;
+ margin: 5px 0;
+}
+html[dir='ltr'] .splitToolbarButtonSeparator {
+ float: left;
+}
+html[dir='rtl'] .splitToolbarButtonSeparator {
+ float: right;
+}
+.splitToolbarButton:hover > .splitToolbarButtonSeparator,
+.splitToolbarButton.toggled > .splitToolbarButtonSeparator {
+ padding: 12px 0;
+ margin: 1px 0;
+ box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03);
+}
+
+.toolbarButton,
+.dropdownToolbarButton,
+.secondaryToolbarButton,
+.overlayButton {
+ min-width: 16px;
+ padding: 2px 6px 0;
+ border: 1px solid rgba(0, 0, 0, 0);
+ border-radius: 2px;
+ color: rgba(255, 255, 255, 0.8);
+ font-size: 12px;
+ line-height: 14px;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ /* Opera does not support user-select, use <... unselectable="on"> instead */
+ cursor: default;
+}
+
+html[dir='ltr'] .toolbarButton,
+html[dir='ltr'] .overlayButton,
+html[dir='ltr'] .dropdownToolbarButton {
+ margin: 3px 2px 4px 0;
+}
+html[dir='rtl'] .toolbarButton,
+html[dir='rtl'] .overlayButton,
+html[dir='rtl'] .dropdownToolbarButton {
+ margin: 3px 0 4px 2px;
+}
+
+.toolbarButton:hover,
+.toolbarButton:focus,
+.dropdownToolbarButton,
+.overlayButton,
+.secondaryToolbarButton:hover,
+.secondaryToolbarButton:focus {
+ background-color: rgba(0, 0, 0, 0.12);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0.05)), to(rgba(255, 255, 255, 0)));
+ background-image: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
+ background-clip: padding-box;
+ border: 1px solid rgba(0, 0, 0, 0.35);
+ border-color: rgba(0, 0, 0, 0.32) rgba(0, 0, 0, 0.38) rgba(0, 0, 0, 0.42);
+ box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset,
+ 0 0 1px rgba(255, 255, 255, 0.15) inset,
+ 0 1px 0 rgba(255, 255, 255, 0.05);
+}
+
+.toolbarButton:hover:active,
+.overlayButton:hover:active,
+.dropdownToolbarButton:hover:active,
+.secondaryToolbarButton:hover:active {
+ background-color: rgba(0, 0, 0, 0.2);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0.05)), to(rgba(255, 255, 255, 0)));
+ background-image: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
+ border-color: rgba(0, 0, 0, 0.35) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.45);
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1) inset,
+ 0 0 1px rgba(0, 0, 0, 0.2) inset,
+ 0 1px 0 rgba(255, 255, 255, 0.05);
+}
+
+.toolbarButton.toggled,
+.splitToolbarButton.toggled > .toolbarButton.toggled,
+.secondaryToolbarButton.toggled {
+ background-color: rgba(0, 0, 0, 0.3);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0.05)), to(rgba(255, 255, 255, 0)));
+ background-image: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
+ border-color: rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.45) rgba(0, 0, 0, 0.5);
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1) inset,
+ 0 0 1px rgba(0, 0, 0, 0.2) inset,
+ 0 1px 0 rgba(255, 255, 255, 0.05);
+}
+
+.toolbarButton.toggled:hover:active,
+.splitToolbarButton.toggled > .toolbarButton.toggled:hover:active,
+.secondaryToolbarButton.toggled:hover:active {
+ background-color: rgba(0, 0, 0, 0.4);
+ border-color: rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.5) rgba(0, 0, 0, 0.55);
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2) inset,
+ 0 0 1px rgba(0, 0, 0, 0.3) inset,
+ 0 1px 0 rgba(255, 255, 255, 0.05);
+}
+
+.dropdownToolbarButton {
+ width: 140px;
+ padding: 0;
+ overflow: hidden;
+}
+.dropdownToolbarButton::after {
+ position: absolute;
+ display: inline-block;
+ top: 4px;
+ content: url(images/toolbarButton-menuArrows.png);
+}
+html[dir='ltr'] .dropdownToolbarButton::after {
+ right: 8px;
+}
+html[dir='rtl'] .dropdownToolbarButton::after {
+ left: 8px;
+}
+
+.dropdownToolbarButton > select {
+ width: 162px;
+ height: 23px;
+ font-size: 12px;
+ color: rgba(242, 242, 242, 1);
+ margin: 0;
+ padding: 3px 2px 2px;
+ border: none;
+ background: rgba(0,0,0,0); /* Opera does not support 'transparent' <select> background */
+}
+
+.dropdownToolbarButton > select > option {
+ background: rgba(61, 61, 61, 1);
+}
+
+#customScaleOption {
+ display: none;
+}
+
+#pageWidthOption {
+ border-bottom: 1px rgba(255, 255, 255, 0.5) solid;
+}
+
+html[dir='ltr'] .splitToolbarButton:first-child,
+html[dir='ltr'] .toolbarButton:first-child,
+html[dir='rtl'] .splitToolbarButton:last-child,
+html[dir='rtl'] .toolbarButton:last-child {
+ margin-left: 4px;
+}
+html[dir='ltr'] .splitToolbarButton:last-child,
+html[dir='ltr'] .toolbarButton:last-child,
+html[dir='rtl'] .splitToolbarButton:first-child,
+html[dir='rtl'] .toolbarButton:first-child {
+ margin-right: 4px;
+}
+
+.toolbarButtonSpacer {
+ width: 30px;
+ display: inline-block;
+ height: 1px;
+}
+
+html[dir='ltr'] #findPrevious {
+ margin-left: 3px;
+}
+html[dir='ltr'] #findNext {
+ margin-right: 3px;
+}
+
+html[dir='rtl'] #findPrevious {
+ margin-right: 3px;
+}
+html[dir='rtl'] #findNext {
+ margin-left: 3px;
+}
+
+.toolbarButton::before,
+.secondaryToolbarButton::before {
+ /* All matching images have a size of 16x16
+ * All relevant containers have a size of 32x25 */
+ position: absolute;
+ display: inline-block;
+ top: 4px;
+ left: 7px;
+}
+
+html[dir="ltr"] .secondaryToolbarButton::before {
+ left: 4px;
+}
+html[dir="rtl"] .secondaryToolbarButton::before {
+ right: 4px;
+}
+
+html[dir='ltr'] .toolbarButton#sidebarToggle::before {
+ content: url(images/toolbarButton-sidebarToggle.png);
+}
+html[dir='rtl'] .toolbarButton#sidebarToggle::before {
+ content: url(images/toolbarButton-sidebarToggle-rtl.png);
+}
+
+html[dir='ltr'] .toolbarButton#secondaryToolbarToggle::before {
+ content: url(images/toolbarButton-secondaryToolbarToggle.png);
+}
+html[dir='rtl'] .toolbarButton#secondaryToolbarToggle::before {
+ content: url(images/toolbarButton-secondaryToolbarToggle-rtl.png);
+}
+
+html[dir='ltr'] .toolbarButton.findPrevious::before {
+ content: url(images/findbarButton-previous.png);
+}
+html[dir='rtl'] .toolbarButton.findPrevious::before {
+ content: url(images/findbarButton-previous-rtl.png);
+}
+
+html[dir='ltr'] .toolbarButton.findNext::before {
+ content: url(images/findbarButton-next.png);
+}
+html[dir='rtl'] .toolbarButton.findNext::before {
+ content: url(images/findbarButton-next-rtl.png);
+}
+
+html[dir='ltr'] .toolbarButton.pageUp::before {
+ content: url(images/toolbarButton-pageUp.png);
+}
+html[dir='rtl'] .toolbarButton.pageUp::before {
+ content: url(images/toolbarButton-pageUp-rtl.png);
+}
+
+html[dir='ltr'] .toolbarButton.pageDown::before {
+ content: url(images/toolbarButton-pageDown.png);
+}
+html[dir='rtl'] .toolbarButton.pageDown::before {
+ content: url(images/toolbarButton-pageDown-rtl.png);
+}
+
+.toolbarButton.zoomOut::before {
+ content: url(images/toolbarButton-zoomOut.png);
+}
+
+.toolbarButton.zoomIn::before {
+ content: url(images/toolbarButton-zoomIn.png);
+}
+
+.toolbarButton.presentationMode::before,
+.secondaryToolbarButton.presentationMode::before {
+ content: url(images/toolbarButton-presentationMode.png);
+}
+
+.toolbarButton.print::before,
+.secondaryToolbarButton.print::before {
+ content: url(images/toolbarButton-print.png);
+}
+
+.toolbarButton.openFile::before,
+.secondaryToolbarButton.openFile::before {
+ content: url(images/toolbarButton-openFile.png);
+}
+
+.toolbarButton.download::before,
+.secondaryToolbarButton.download::before {
+ content: url(images/toolbarButton-download.png);
+}
+
+.toolbarButton.bookmark,
+.secondaryToolbarButton.bookmark {
+ box-sizing: border-box;
+ outline: none;
+ padding-top: 4px;
+ text-decoration: none;
+}
+.secondaryToolbarButton.bookmark {
+ padding-top: 5px;
+}
+
+.bookmark[href='#'] {
+ opacity: .5;
+ pointer-events: none;
+}
+
+.toolbarButton.bookmark::before,
+.secondaryToolbarButton.bookmark::before {
+ content: url(images/toolbarButton-bookmark.png);
+}
+
+#viewThumbnail.toolbarButton::before {
+ content: url(images/toolbarButton-viewThumbnail.png);
+}
+
+html[dir="ltr"] #viewOutline.toolbarButton::before {
+ content: url(images/toolbarButton-viewOutline.png);
+}
+html[dir="rtl"] #viewOutline.toolbarButton::before {
+ content: url(images/toolbarButton-viewOutline-rtl.png);
+}
+
+#viewAttachments.toolbarButton::before {
+ content: url(images/toolbarButton-viewAttachments.png);
+}
+
+#viewFind.toolbarButton::before {
+ content: url(images/toolbarButton-search.png);
+}
+
+.toolbarButton.pdfSidebarNotification::after {
+ position: absolute;
+ display: inline-block;
+ top: 1px;
+ /* Create a filled circle, with a diameter of 9 pixels, using only CSS: */
+ content: '';
+ background-color: rgba(112, 219, 85, 1);
+ height: 9px;
+ width: 9px;
+ border-radius: 50%;
+}
+html[dir='ltr'] .toolbarButton.pdfSidebarNotification::after {
+ left: 17px;
+}
+html[dir='rtl'] .toolbarButton.pdfSidebarNotification::after {
+ right: 17px;
+}
+
+.secondaryToolbarButton {
+ position: relative;
+ margin: 0 0 4px 0;
+ padding: 3px 0 1px 0;
+ height: auto;
+ min-height: 25px;
+ width: auto;
+ min-width: 100%;
+ white-space: normal;
+}
+html[dir="ltr"] .secondaryToolbarButton {
+ padding-left: 24px;
+ text-align: left;
+}
+html[dir="rtl"] .secondaryToolbarButton {
+ padding-right: 24px;
+ text-align: right;
+}
+html[dir="ltr"] .secondaryToolbarButton.bookmark {
+ padding-left: 27px;
+}
+html[dir="rtl"] .secondaryToolbarButton.bookmark {
+ padding-right: 27px;
+}
+
+html[dir="ltr"] .secondaryToolbarButton > span {
+ padding-right: 4px;
+}
+html[dir="rtl"] .secondaryToolbarButton > span {
+ padding-left: 4px;
+}
+
+.secondaryToolbarButton.firstPage::before {
+ content: url(images/secondaryToolbarButton-firstPage.png);
+}
+
+.secondaryToolbarButton.lastPage::before {
+ content: url(images/secondaryToolbarButton-lastPage.png);
+}
+
+.secondaryToolbarButton.rotateCcw::before {
+ content: url(images/secondaryToolbarButton-rotateCcw.png);
+}
+
+.secondaryToolbarButton.rotateCw::before {
+ content: url(images/secondaryToolbarButton-rotateCw.png);
+}
+
+.secondaryToolbarButton.selectTool::before {
+ content: url(images/secondaryToolbarButton-selectTool.png);
+}
+
+.secondaryToolbarButton.handTool::before {
+ content: url(images/secondaryToolbarButton-handTool.png);
+}
+
+.secondaryToolbarButton.scrollVertical::before {
+ content: url(images/secondaryToolbarButton-scrollVertical.png);
+}
+
+.secondaryToolbarButton.scrollHorizontal::before {
+ content: url(images/secondaryToolbarButton-scrollHorizontal.png);
+}
+
+.secondaryToolbarButton.scrollWrapped::before {
+ content: url(images/secondaryToolbarButton-scrollWrapped.png);
+}
+
+.secondaryToolbarButton.spreadNone::before {
+ content: url(images/secondaryToolbarButton-spreadNone.png);
+}
+
+.secondaryToolbarButton.spreadOdd::before {
+ content: url(images/secondaryToolbarButton-spreadOdd.png);
+}
+
+.secondaryToolbarButton.spreadEven::before {
+ content: url(images/secondaryToolbarButton-spreadEven.png);
+}
+
+.secondaryToolbarButton.documentProperties::before {
+ content: url(images/secondaryToolbarButton-documentProperties.png);
+}
+
+.verticalToolbarSeparator {
+ display: block;
+ padding: 8px 0;
+ margin: 8px 4px;
+ width: 1px;
+ background-color: rgba(0, 0, 0, 0.5);
+ box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
+}
+html[dir='ltr'] .verticalToolbarSeparator {
+ margin-left: 2px;
+}
+html[dir='rtl'] .verticalToolbarSeparator {
+ margin-right: 2px;
+}
+
+.horizontalToolbarSeparator {
+ display: block;
+ margin: 0 0 4px 0;
+ height: 1px;
+ width: 100%;
+ background-color: rgba(0, 0, 0, 0.5);
+ box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
+}
+
+.toolbarField {
+ padding: 3px 6px;
+ margin: 4px 0 4px 0;
+ border-radius: 2px;
+ background-color: rgba(255, 255, 255, 0.09);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0.05)), to(rgba(255, 255, 255, 0)));
+ background-image: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
+ background-clip: padding-box;
+ border-width: 1px;
+ border-style: solid;
+ border-color: rgba(0, 0, 0, 0.32) rgba(0, 0, 0, 0.38) rgba(0, 0, 0, 0.42);
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05) inset,
+ 0 1px 0 rgba(255, 255, 255, 0.05);
+ color: rgba(242, 242, 242, 1);
+ font-size: 12px;
+ line-height: 14px;
+ outline-style: none;
+}
+
+.toolbarField[type=checkbox] {
+ display: inline-block;
+ margin: 8px 0px;
+}
+
+.toolbarField.pageNumber {
+ -moz-appearance: textfield; /* hides the spinner in moz */
+ min-width: 16px;
+ text-align: right;
+ width: 40px;
+}
+
+.toolbarField.pageNumber.visiblePageIsLoading {
+ background-image: url(images/loading-small.png);
+ background-repeat: no-repeat;
+ background-position: 1px;
+}
+
+.toolbarField.pageNumber::-webkit-inner-spin-button,
+.toolbarField.pageNumber::-webkit-outer-spin-button {
+ -webkit-appearance: none;
+ margin: 0;
+}
+
+.toolbarField:hover {
+ background-color: rgba(255, 255, 255, 0.11);
+ border-color: rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.43) rgba(0, 0, 0, 0.45);
+}
+
+.toolbarField:focus {
+ background-color: rgba(255, 255, 255, 0.15);
+ border-color: rgba(77, 184, 255, 0.8) rgba(77, 184, 255, 0.85) rgba(77, 184, 255, 0.9);
+}
+
+.toolbarLabel {
+ min-width: 16px;
+ padding: 3px 6px 3px 2px;
+ margin: 4px 2px 4px 0;
+ border: 1px solid rgba(0, 0, 0, 0);
+ border-radius: 2px;
+ color: rgba(217, 217, 217, 1);
+ font-size: 12px;
+ line-height: 14px;
+ text-align: left;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ cursor: default;
+}
+
+#thumbnailView {
+ position: absolute;
+ width: calc(100% - 60px);
+ top: 0;
+ bottom: 0;
+ padding: 10px 30px 0;
+ overflow: auto;
+ -webkit-overflow-scrolling: touch;
+}
+
+#thumbnailView > a:active,
+#thumbnailView > a:focus {
+ outline: 0;
+}
+
+.thumbnail {
+ margin: 0 10px 5px 10px;
+}
+html[dir='ltr'] .thumbnail {
+ float: left;
+}
+html[dir='rtl'] .thumbnail {
+ float: right;
+}
+
+#thumbnailView > a:last-of-type > .thumbnail {
+ margin-bottom: 10px;
+}
+
+#thumbnailView > a:last-of-type > .thumbnail:not([data-loaded]) {
+ margin-bottom: 9px;
+}
+
+.thumbnail:not([data-loaded]) {
+ border: 1px dashed rgba(255, 255, 255, 0.5);
+ margin: -1px 9px 4px 9px;
+}
+
+.thumbnailImage {
+ border: 1px solid rgba(0, 0, 0, 0);
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
+ opacity: 0.8;
+ z-index: 99;
+ background-color: rgba(255, 255, 255, 1);
+ background-clip: content-box;
+}
+
+.thumbnailSelectionRing {
+ border-radius: 2px;
+ padding: 7px;
+}
+
+a:focus > .thumbnail > .thumbnailSelectionRing > .thumbnailImage,
+.thumbnail:hover > .thumbnailSelectionRing > .thumbnailImage {
+ opacity: .9;
+}
+
+a:focus > .thumbnail > .thumbnailSelectionRing,
+.thumbnail:hover > .thumbnailSelectionRing {
+ background-color: rgba(255, 255, 255, 0.15);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0.05)), to(rgba(255, 255, 255, 0)));
+ background-image: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
+ background-clip: padding-box;
+ box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset,
+ 0 0 1px rgba(255, 255, 255, 0.2) inset,
+ 0 0 1px rgba(0, 0, 0, 0.2);
+ color: rgba(255, 255, 255, 0.9);
+}
+
+.thumbnail.selected > .thumbnailSelectionRing > .thumbnailImage {
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
+ opacity: 1;
+}
+
+.thumbnail.selected > .thumbnailSelectionRing {
+ background-color: rgba(255, 255, 255, 0.3);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0.05)), to(rgba(255, 255, 255, 0)));
+ background-image: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
+ background-clip: padding-box;
+ box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset,
+ 0 0 1px rgba(255, 255, 255, 0.1) inset,
+ 0 0 1px rgba(0, 0, 0, 0.2);
+ color: rgba(255, 255, 255,1);
+}
+
+#outlineView,
+#attachmentsView {
+ position: absolute;
+ width: calc(100% - 8px);
+ top: 0;
+ bottom: 0;
+ overflow: auto;
+ -webkit-overflow-scrolling: touch;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+#outlineView {
+ padding: 4px 4px 0;
+}
+#attachmentsView {
+ padding: 3px 4px 0;
+}
+
+html[dir='ltr'] .outlineWithDeepNesting > .outlineItem,
+html[dir='ltr'] .outlineItem > .outlineItems {
+ margin-left: 20px;
+}
+
+html[dir='rtl'] .outlineWithDeepNesting > .outlineItem,
+html[dir='rtl'] .outlineItem > .outlineItems {
+ margin-right: 20px;
+}
+
+.outlineItem > a,
+.attachmentsItem > button {
+ text-decoration: none;
+ display: inline-block;
+ min-width: 95%;
+ min-width: calc(100% - 4px); /* Subtract the right padding (left, in RTL mode)
+ of the container. */
+ height: auto;
+ margin-bottom: 1px;
+ border-radius: 2px;
+ color: rgba(255, 255, 255, 0.8);
+ font-size: 13px;
+ line-height: 15px;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ white-space: normal;
+}
+
+.attachmentsItem > button {
+ border: 0 none;
+ background: none;
+ cursor: pointer;
+ width: 100%;
+}
+
+html[dir='ltr'] .outlineItem > a {
+ padding: 2px 0 5px 4px;
+}
+html[dir='ltr'] .attachmentsItem > button {
+ padding: 2px 0 3px 7px;
+ text-align: left;
+}
+
+html[dir='rtl'] .outlineItem > a {
+ padding: 2px 4px 5px 0;
+}
+html[dir='rtl'] .attachmentsItem > button {
+ padding: 2px 7px 3px 0;
+ text-align: right;
+}
+
+.outlineItemToggler {
+ position: relative;
+ height: 0;
+ width: 0;
+ color: rgba(255, 255, 255, 0.5);
+}
+.outlineItemToggler::before {
+ content: url(images/treeitem-expanded.png);
+ display: inline-block;
+ position: absolute;
+}
+html[dir='ltr'] .outlineItemToggler.outlineItemsHidden::before {
+ content: url(images/treeitem-collapsed.png);
+}
+html[dir='rtl'] .outlineItemToggler.outlineItemsHidden::before {
+ content: url(images/treeitem-collapsed-rtl.png);
+}
+.outlineItemToggler.outlineItemsHidden ~ .outlineItems {
+ display: none;
+}
+html[dir='ltr'] .outlineItemToggler {
+ float: left;
+}
+html[dir='rtl'] .outlineItemToggler {
+ float: right;
+}
+html[dir='ltr'] .outlineItemToggler::before {
+ right: 4px;
+}
+html[dir='rtl'] .outlineItemToggler::before {
+ left: 4px;
+}
+
+.outlineItemToggler:hover,
+.outlineItemToggler:hover + a,
+.outlineItemToggler:hover ~ .outlineItems,
+.outlineItem > a:hover,
+.attachmentsItem > button:hover {
+ background-color: rgba(255, 255, 255, 0.02);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0.05)), to(rgba(255, 255, 255, 0)));
+ background-image: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
+ background-clip: padding-box;
+ box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset,
+ 0 0 1px rgba(255, 255, 255, 0.2) inset,
+ 0 0 1px rgba(0, 0, 0, 0.2);
+ border-radius: 2px;
+ color: rgba(255, 255, 255, 0.9);
+}
+
+.outlineItem.selected {
+ background-color: rgba(255, 255, 255, 0.08);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0.05)), to(rgba(255, 255, 255, 0)));
+ background-image: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
+ background-clip: padding-box;
+ box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset,
+ 0 0 1px rgba(255, 255, 255, 0.1) inset,
+ 0 0 1px rgba(0, 0, 0, 0.2);
+ color: rgba(255, 255, 255, 1);
+}
+
+.noResults {
+ font-size: 12px;
+ color: rgba(255, 255, 255, 0.8);
+ font-style: italic;
+ cursor: default;
+}
+
+/* TODO: file FF bug to support ::-moz-selection:window-inactive
+ so we can override the opaque grey background when the window is inactive;
+ see https://bugzilla.mozilla.org/show_bug.cgi?id=706209 */
+::-moz-selection {
+ background: rgba(0, 0, 255, 0.3);
+}
+::selection {
+ background: rgba(0, 0, 255, 0.3);
+}
+
+#errorWrapper {
+ background: none repeat scroll 0 0 rgba(255, 85, 85, 1);
+ color: rgba(255, 255, 255, 1);
+ left: 0;
+ position: absolute;
+ right: 0;
+ z-index: 1000;
+ padding: 3px;
+ font-size: 0.8em;
+}
+.loadingInProgress #errorWrapper {
+ top: 37px;
+}
+
+#errorMessageLeft {
+ float: left;
+}
+
+#errorMessageRight {
+ float: right;
+}
+
+#errorMoreInfo {
+ background-color: rgba(255, 255, 255, 1);
+ color: rgba(0, 0, 0, 1);
+ padding: 3px;
+ margin: 3px;
+ width: 98%;
+}
+
+.overlayButton {
+ width: auto;
+ margin: 3px 4px 2px 4px !important;
+ padding: 2px 6px 3px 6px;
+}
+
+#overlayContainer {
+ display: table;
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0, 0, 0, 0.2);
+ z-index: 40000;
+}
+#overlayContainer > * {
+ overflow: auto;
+ -webkit-overflow-scrolling: touch;
+}
+
+#overlayContainer > .container {
+ display: table-cell;
+ vertical-align: middle;
+ text-align: center;
+}
+
+#overlayContainer > .container > .dialog {
+ display: inline-block;
+ padding: 15px;
+ border-spacing: 4px;
+ color: rgba(217, 217, 217, 1);
+ font-size: 12px;
+ line-height: 14px;
+ background-color: rgba(71, 71, 71, 1); /* fallback */
+ background-image: url(images/texture.png),
+ -webkit-gradient(linear, left top, left bottom, from(rgba(82, 82, 82,0.99)), to(rgba(69, 69, 69, 0.95)));
+ background-image: url(images/texture.png),
+ linear-gradient(rgba(82, 82, 82,0.99), rgba(69, 69, 69, 0.95));
+ border: 1px solid rgba(0, 0, 0, 0.5);
+ border-radius: 4px;
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
+}
+
+.dialog > .row {
+ display: table-row;
+}
+
+.dialog > .row > * {
+ display: table-cell;
+}
+
+.dialog .toolbarField {
+ margin: 5px 0;
+}
+
+.dialog .separator {
+ display: block;
+ margin: 4px 0 4px 0;
+ height: 1px;
+ width: 100%;
+ background-color: rgba(0, 0, 0, 0.5);
+ box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
+}
+
+.dialog .buttonRow {
+ text-align: center;
+ vertical-align: middle;
+}
+
+.dialog :link {
+ color: rgba(255, 255, 255, 1);
+}
+
+#passwordOverlay > .dialog {
+ text-align: center;
+}
+#passwordOverlay .toolbarField {
+ width: 200px;
+}
+
+#documentPropertiesOverlay > .dialog {
+ text-align: left;
+}
+#documentPropertiesOverlay .row > * {
+ min-width: 100px;
+}
+html[dir='ltr'] #documentPropertiesOverlay .row > * {
+ text-align: left;
+}
+html[dir='rtl'] #documentPropertiesOverlay .row > * {
+ text-align: right;
+}
+#documentPropertiesOverlay .row > span {
+ width: 125px;
+ word-wrap: break-word;
+}
+#documentPropertiesOverlay .row > p {
+ max-width: 225px;
+ word-wrap: break-word;
+}
+#documentPropertiesOverlay .buttonRow {
+ margin-top: 10px;
+}
+
+.clearBoth {
+ clear: both;
+}
+
+.fileInput {
+ background: rgba(255, 255, 255, 1);
+ color: rgba(0, 0, 0, 1);
+ margin-top: 5px;
+ visibility: hidden;
+ position: fixed;
+ right: 0;
+ top: 0;
+}
+
+#PDFBug {
+ background: none repeat scroll 0 0 rgba(255, 255, 255, 1);
+ border: 1px solid rgba(102, 102, 102, 1);
+ position: fixed;
+ top: 32px;
+ right: 0;
+ bottom: 0;
+ font-size: 10px;
+ padding: 0;
+ width: 300px;
+}
+#PDFBug .controls {
+ background: rgba(238, 238, 238, 1);
+ border-bottom: 1px solid rgba(102, 102, 102, 1);
+ padding: 3px;
+}
+#PDFBug .panels {
+ bottom: 0;
+ left: 0;
+ overflow: auto;
+ -webkit-overflow-scrolling: touch;
+ position: absolute;
+ right: 0;
+ top: 27px;
+}
+#PDFBug .panels > div {
+ padding: 5px;
+}
+#PDFBug button.active {
+ font-weight: bold;
+}
+.debuggerShowText {
+ background: none repeat scroll 0 0 rgba(255, 255, 0, 1);
+ color: rgba(0, 0, 255, 1);
+}
+.debuggerHideText:hover {
+ background: none repeat scroll 0 0 rgba(255, 255, 0, 1);
+}
+#PDFBug .stats {
+ font-family: courier;
+ font-size: 10px;
+ white-space: pre;
+}
+#PDFBug .stats .title {
+ font-weight: bold;
+}
+#PDFBug table {
+ font-size: 10px;
+}
+
+#viewer.textLayer-visible .textLayer {
+ opacity: 1.0;
+}
+
+#viewer.textLayer-visible .canvasWrapper {
+ background-color: rgba(128, 255, 128, 1);
+}
+
+#viewer.textLayer-visible .canvasWrapper canvas {
+ mix-blend-mode: screen;
+}
+
+#viewer.textLayer-visible .textLayer > span {
+ background-color: rgba(255, 255, 0, 0.1);
+ color: rgba(0, 0, 0, 1);
+ border: solid 1px rgba(255, 0, 0, 0.5);
+ box-sizing: border-box;
+}
+
+#viewer.textLayer-hover .textLayer > span:hover {
+ background-color: rgba(255, 255, 255, 1);
+ color: rgba(0, 0, 0, 1);
+}
+
+#viewer.textLayer-shadow .textLayer > span {
+ background-color: rgba(255, 255, 255, 0.6);
+ color: rgba(0, 0, 0, 1);
+}
+
+.grab-to-pan-grab {
+ cursor: url("images/grab.cur"), move !important;
+ cursor: -webkit-grab !important;
+ cursor: grab !important;
+}
+.grab-to-pan-grab *:not(input):not(textarea):not(button):not(select):not(:link) {
+ cursor: inherit !important;
+}
+.grab-to-pan-grab:active,
+.grab-to-pan-grabbing {
+ cursor: url("images/grabbing.cur"), move !important;
+ cursor: -webkit-grabbing !important;
+ cursor: grabbing !important;
+ position: fixed;
+ background: rgba(0, 0, 0, 0);
+ display: block;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ overflow: hidden;
+ z-index: 50000; /* should be higher than anything else in PDF.js! */
+}
+
+@page {
+ margin: 0;
+}
+
+#printContainer {
+ display: none;
+}
+
+@media screen and (-webkit-min-device-pixel-ratio: 1.1), screen and (min-resolution: 1.1dppx) {
+ /* Rules for Retina screens */
+ .toolbarButton::before {
+ -webkit-transform: scale(0.5);
+ transform: scale(0.5);
+ top: -5px;
+ }
+
+ .secondaryToolbarButton::before {
+ -webkit-transform: scale(0.5);
+ transform: scale(0.5);
+ top: -4px;
+ }
+
+ html[dir='ltr'] .toolbarButton::before,
+ html[dir='rtl'] .toolbarButton::before {
+ left: -1px;
+ }
+
+ html[dir='ltr'] .secondaryToolbarButton::before {
+ left: -2px;
+ }
+ html[dir='rtl'] .secondaryToolbarButton::before {
+ left: 186px;
+ }
+
+ .toolbarField.pageNumber.visiblePageIsLoading,
+ #findInput[data-status="pending"] {
+ background-image: url(images/loading-small@2x.png);
+ background-size: 16px 17px;
+ }
+
+ .dropdownToolbarButton::after {
+ -webkit-transform: scale(0.5);
+ transform: scale(0.5);
+ top: -5px;
+ content: url(images/toolbarButton-menuArrows@2x.png);
+ }
+ html[dir='ltr'] .dropdownToolbarButton::after {
+ right: 4px;
+ }
+ html[dir='rtl'] .dropdownToolbarButton::after {
+ left: 4px;
+ }
+
+ html[dir='ltr'] .toolbarButton#sidebarToggle::before {
+ content: url(images/toolbarButton-sidebarToggle@2x.png);
+ }
+ html[dir='rtl'] .toolbarButton#sidebarToggle::before {
+ content: url(images/toolbarButton-sidebarToggle-rtl@2x.png);
+ }
+
+ html[dir='ltr'] .toolbarButton#secondaryToolbarToggle::before {
+ content: url(images/toolbarButton-secondaryToolbarToggle@2x.png);
+ }
+ html[dir='rtl'] .toolbarButton#secondaryToolbarToggle::before {
+ content: url(images/toolbarButton-secondaryToolbarToggle-rtl@2x.png);
+ }
+
+ html[dir='ltr'] .toolbarButton.findPrevious::before {
+ content: url(images/findbarButton-previous@2x.png);
+ }
+ html[dir='rtl'] .toolbarButton.findPrevious::before {
+ content: url(images/findbarButton-previous-rtl@2x.png);
+ }
+
+ html[dir='ltr'] .toolbarButton.findNext::before {
+ content: url(images/findbarButton-next@2x.png);
+ }
+ html[dir='rtl'] .toolbarButton.findNext::before {
+ content: url(images/findbarButton-next-rtl@2x.png);
+ }
+
+ html[dir='ltr'] .toolbarButton.pageUp::before {
+ content: url(images/toolbarButton-pageUp@2x.png);
+ }
+ html[dir='rtl'] .toolbarButton.pageUp::before {
+ content: url(images/toolbarButton-pageUp-rtl@2x.png);
+ }
+
+ html[dir='ltr'] .toolbarButton.pageDown::before {
+ content: url(images/toolbarButton-pageDown@2x.png);
+ }
+ html[dir='rtl'] .toolbarButton.pageDown::before {
+ content: url(images/toolbarButton-pageDown-rtl@2x.png);
+ }
+
+ .toolbarButton.zoomIn::before {
+ content: url(images/toolbarButton-zoomIn@2x.png);
+ }
+
+ .toolbarButton.zoomOut::before {
+ content: url(images/toolbarButton-zoomOut@2x.png);
+ }
+
+ .toolbarButton.presentationMode::before,
+ .secondaryToolbarButton.presentationMode::before {
+ content: url(images/toolbarButton-presentationMode@2x.png);
+ }
+
+ .toolbarButton.print::before,
+ .secondaryToolbarButton.print::before {
+ content: url(images/toolbarButton-print@2x.png);
+ }
+
+ .toolbarButton.openFile::before,
+ .secondaryToolbarButton.openFile::before {
+ content: url(images/toolbarButton-openFile@2x.png);
+ }
+
+ .toolbarButton.download::before,
+ .secondaryToolbarButton.download::before {
+ content: url(images/toolbarButton-download@2x.png);
+ }
+
+ .toolbarButton.bookmark::before,
+ .secondaryToolbarButton.bookmark::before {
+ content: url(images/toolbarButton-bookmark@2x.png);
+ }
+
+ #viewThumbnail.toolbarButton::before {
+ content: url(images/toolbarButton-viewThumbnail@2x.png);
+ }
+
+ html[dir="ltr"] #viewOutline.toolbarButton::before {
+ content: url(images/toolbarButton-viewOutline@2x.png);
+ }
+ html[dir="rtl"] #viewOutline.toolbarButton::before {
+ content: url(images/toolbarButton-viewOutline-rtl@2x.png);
+ }
+
+ #viewAttachments.toolbarButton::before {
+ content: url(images/toolbarButton-viewAttachments@2x.png);
+ }
+
+ #viewFind.toolbarButton::before {
+ content: url(images/toolbarButton-search@2x.png);
+ }
+
+ .secondaryToolbarButton.firstPage::before {
+ content: url(images/secondaryToolbarButton-firstPage@2x.png);
+ }
+
+ .secondaryToolbarButton.lastPage::before {
+ content: url(images/secondaryToolbarButton-lastPage@2x.png);
+ }
+
+ .secondaryToolbarButton.rotateCcw::before {
+ content: url(images/secondaryToolbarButton-rotateCcw@2x.png);
+ }
+
+ .secondaryToolbarButton.rotateCw::before {
+ content: url(images/secondaryToolbarButton-rotateCw@2x.png);
+ }
+
+ .secondaryToolbarButton.selectTool::before {
+ content: url(images/secondaryToolbarButton-selectTool@2x.png);
+ }
+
+ .secondaryToolbarButton.handTool::before {
+ content: url(images/secondaryToolbarButton-handTool@2x.png);
+ }
+
+ .secondaryToolbarButton.scrollVertical::before {
+ content: url(images/secondaryToolbarButton-scrollVertical@2x.png);
+ }
+
+ .secondaryToolbarButton.scrollHorizontal::before {
+ content: url(images/secondaryToolbarButton-scrollHorizontal@2x.png);
+ }
+
+ .secondaryToolbarButton.scrollWrapped::before {
+ content: url(images/secondaryToolbarButton-scrollWrapped@2x.png);
+ }
+
+ .secondaryToolbarButton.spreadNone::before {
+ content: url(images/secondaryToolbarButton-spreadNone@2x.png);
+ }
+
+ .secondaryToolbarButton.spreadOdd::before {
+ content: url(images/secondaryToolbarButton-spreadOdd@2x.png);
+ }
+
+ .secondaryToolbarButton.spreadEven::before {
+ content: url(images/secondaryToolbarButton-spreadEven@2x.png);
+ }
+
+ .secondaryToolbarButton.documentProperties::before {
+ content: url(images/secondaryToolbarButton-documentProperties@2x.png);
+ }
+
+ .outlineItemToggler::before {
+ -webkit-transform: scale(0.5);
+ transform: scale(0.5);
+ top: -1px;
+ content: url(images/treeitem-expanded@2x.png);
+ }
+ html[dir='ltr'] .outlineItemToggler.outlineItemsHidden::before {
+ content: url(images/treeitem-collapsed@2x.png);
+ }
+ html[dir='rtl'] .outlineItemToggler.outlineItemsHidden::before {
+ content: url(images/treeitem-collapsed-rtl@2x.png);
+ }
+ html[dir='ltr'] .outlineItemToggler::before {
+ right: 0;
+ }
+ html[dir='rtl'] .outlineItemToggler::before {
+ left: 0;
+ }
+}
+
+@media print {
+ /* General rules for printing. */
+ body {
+ background: rgba(0, 0, 0, 0) none;
+ }
+
+ /* Rules for browsers that don't support mozPrintCallback. */
+ #sidebarContainer, #secondaryToolbar, .toolbar, #loadingBox, #errorWrapper, .textLayer {
+ display: none;
+ }
+ #viewerContainer {
+ overflow: visible;
+ }
+
+ #mainContainer, #viewerContainer, .page, .page canvas {
+ position: static;
+ padding: 0;
+ margin: 0;
+ }
+
+ .page {
+ float: left;
+ display: none;
+ border: none;
+ box-shadow: none;
+ background-clip: content-box;
+ background-color: rgba(255, 255, 255, 1);
+ }
+
+ .page[data-loaded] {
+ display: block;
+ }
+
+ .fileInput {
+ display: none;
+ }
+
+ /* Rules for browsers that support PDF.js printing */
+ body[data-pdfjsprinting] #outerContainer {
+ display: none;
+ }
+ body[data-pdfjsprinting] #printContainer {
+ display: block;
+ }
+ #printContainer {
+ height: 100%;
+ }
+ /* wrapper around (scaled) print canvas elements */
+ #printContainer > div {
+ position: relative;
+ top: 0;
+ left: 0;
+ width: 1px;
+ height: 1px;
+ overflow: visible;
+ page-break-after: always;
+ page-break-inside: avoid;
+ }
+ #printContainer canvas,
+ #printContainer img {
+ display: block;
+ }
+}
+
+.visibleLargeView,
+.visibleMediumView,
+.visibleSmallView {
+ display: none;
+}
+
+@media all and (max-width: 900px) {
+ #toolbarViewerMiddle {
+ display: table;
+ margin: auto;
+ left: auto;
+ position: inherit;
+ -webkit-transform: none;
+ transform: none;
+ }
+}
+
+@media all and (max-width: 840px) {
+ #sidebarContent {
+ background-color: rgba(0, 0, 0, 0.7);
+ }
+
+ html[dir='ltr'] #outerContainer.sidebarOpen #viewerContainer {
+ left: 0px !important;
+ }
+ html[dir='rtl'] #outerContainer.sidebarOpen #viewerContainer {
+ right: 0px !important;
+ }
+
+ #outerContainer .hiddenLargeView,
+ #outerContainer .hiddenMediumView {
+ display: inherit;
+ }
+ #outerContainer .visibleLargeView,
+ #outerContainer .visibleMediumView {
+ display: none;
+ }
+}
+
+@media all and (max-width: 770px) {
+ #outerContainer .hiddenLargeView {
+ display: none;
+ }
+ #outerContainer .visibleLargeView {
+ display: inherit;
+ }
+}
+
+@media all and (max-width: 700px) {
+ #outerContainer .hiddenMediumView {
+ display: none;
+ }
+ #outerContainer .visibleMediumView {
+ display: inherit;
+ }
+}
+
+@media all and (max-width: 640px) {
+ .hiddenSmallView, .hiddenSmallView * {
+ display: none;
+ }
+ .visibleSmallView {
+ display: inherit;
+ }
+ .toolbarButtonSpacer {
+ width: 0;
+ }
+ html[dir='ltr'] .findbar {
+ left: 38px;
+ }
+ html[dir='rtl'] .findbar {
+ right: 38px;
+ }
+}
+
+@media all and (max-width: 535px) {
+ #scaleSelectContainer {
+ display: none;
+ }
+}
diff --git a/js/pdfjs/web/viewer.html b/js/pdfjs/web/viewer.html
new file mode 100644
index 0000000..7670ff5
--- /dev/null
+++ b/js/pdfjs/web/viewer.html
@@ -0,0 +1,394 @@
+<!DOCTYPE html>
+<!--
+Copyright 2012 Mozilla Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Adobe CMap resources are covered by their own copyright but the same license:
+
+ Copyright 1990-2015 Adobe Systems Incorporated.
+
+See https://github.com/adobe-type-tools/cmap-resources
+-->
+<html dir="ltr" mozdisallowselectionprint>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+ <meta name="google" content="notranslate">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <title>PDF.js viewer</title>
+
+
+ <link rel="stylesheet" href="viewer.css">
+
+
+<!-- This snippet is used in production (included from viewer.html) -->
+<link rel="resource" type="application/l10n" href="locale/locale.properties">
+<script src="../build/pdf.js"></script>
+
+
+ <script src="viewer.js"></script>
+
+ </head>
+
+ <body tabindex="1" class="loadingInProgress">
+ <div id="outerContainer">
+
+ <div id="sidebarContainer">
+ <div id="toolbarSidebar">
+ <div class="splitToolbarButton toggled">
+ <button id="viewThumbnail" class="toolbarButton toggled" title="Show Thumbnails" tabindex="2" data-l10n-id="thumbs">
+ <span data-l10n-id="thumbs_label">Thumbnails</span>
+ </button>
+ <button id="viewOutline" class="toolbarButton" title="Show Document Outline (double-click to expand/collapse all items)" tabindex="3" data-l10n-id="document_outline">
+ <span data-l10n-id="document_outline_label">Document Outline</span>
+ </button>
+ <button id="viewAttachments" class="toolbarButton" title="Show Attachments" tabindex="4" data-l10n-id="attachments">
+ <span data-l10n-id="attachments_label">Attachments</span>
+ </button>
+ </div>
+ </div>
+ <div id="sidebarContent">
+ <div id="thumbnailView">
+ </div>
+ <div id="outlineView" class="hidden">
+ </div>
+ <div id="attachmentsView" class="hidden">
+ </div>
+ </div>
+ <div id="sidebarResizer" class="hidden"></div>
+ </div> <!-- sidebarContainer -->
+
+ <div id="mainContainer">
+ <div class="findbar hidden doorHanger" id="findbar">
+ <div id="findbarInputContainer">
+ <input id="findInput" class="toolbarField" title="Find" placeholder="Find in document…" tabindex="91" data-l10n-id="find_input">
+ <div class="splitToolbarButton">
+ <button id="findPrevious" class="toolbarButton findPrevious" title="Find the previous occurrence of the phrase" tabindex="92" data-l10n-id="find_previous">
+ <span data-l10n-id="find_previous_label">Previous</span>
+ </button>
+ <div class="splitToolbarButtonSeparator"></div>
+ <button id="findNext" class="toolbarButton findNext" title="Find the next occurrence of the phrase" tabindex="93" data-l10n-id="find_next">
+ <span data-l10n-id="find_next_label">Next</span>
+ </button>
+ </div>
+ </div>
+
+ <div id="findbarOptionsOneContainer">
+ <input type="checkbox" id="findHighlightAll" class="toolbarField" tabindex="94">
+ <label for="findHighlightAll" class="toolbarLabel" data-l10n-id="find_highlight">Highlight all</label>
+ <input type="checkbox" id="findMatchCase" class="toolbarField" tabindex="95">
+ <label for="findMatchCase" class="toolbarLabel" data-l10n-id="find_match_case_label">Match case</label>
+ </div>
+ <div id="findbarOptionsTwoContainer">
+ <input type="checkbox" id="findEntireWord" class="toolbarField" tabindex="96">
+ <label for="findEntireWord" class="toolbarLabel" data-l10n-id="find_entire_word_label">Whole words</label>
+ <span id="findResultsCount" class="toolbarLabel hidden"></span>
+ </div>
+
+ <div id="findbarMessageContainer">
+ <span id="findMsg" class="toolbarLabel"></span>
+ </div>
+ </div> <!-- findbar -->
+
+ <div id="secondaryToolbar" class="secondaryToolbar hidden doorHangerRight">
+ <div id="secondaryToolbarButtonContainer">
+ <button id="secondaryPresentationMode" class="secondaryToolbarButton presentationMode visibleLargeView" title="Switch to Presentation Mode" tabindex="51" data-l10n-id="presentation_mode">
+ <span data-l10n-id="presentation_mode_label">Presentation Mode</span>
+ </button>
+
+ <button id="secondaryOpenFile" class="secondaryToolbarButton openFile visibleLargeView" title="Open File" tabindex="52" data-l10n-id="open_file">
+ <span data-l10n-id="open_file_label">Open</span>
+ </button>
+
+ <button id="secondaryPrint" class="secondaryToolbarButton print visibleMediumView" title="Print" tabindex="53" data-l10n-id="print">
+ <span data-l10n-id="print_label">Print</span>
+ </button>
+
+ <button id="secondaryDownload" class="secondaryToolbarButton download visibleMediumView" title="Download" tabindex="54" data-l10n-id="download">
+ <span data-l10n-id="download_label">Download</span>
+ </button>
+
+ <a href="#" id="secondaryViewBookmark" class="secondaryToolbarButton bookmark visibleSmallView" title="Current view (copy or open in new window)" tabindex="55" data-l10n-id="bookmark">
+ <span data-l10n-id="bookmark_label">Current View</span>
+ </a>
+
+ <div class="horizontalToolbarSeparator visibleLargeView"></div>
+
+ <button id="firstPage" class="secondaryToolbarButton firstPage" title="Go to First Page" tabindex="56" data-l10n-id="first_page">
+ <span data-l10n-id="first_page_label">Go to First Page</span>
+ </button>
+ <button id="lastPage" class="secondaryToolbarButton lastPage" title="Go to Last Page" tabindex="57" data-l10n-id="last_page">
+ <span data-l10n-id="last_page_label">Go to Last Page</span>
+ </button>
+
+ <div class="horizontalToolbarSeparator"></div>
+
+ <button id="pageRotateCw" class="secondaryToolbarButton rotateCw" title="Rotate Clockwise" tabindex="58" data-l10n-id="page_rotate_cw">
+ <span data-l10n-id="page_rotate_cw_label">Rotate Clockwise</span>
+ </button>
+ <button id="pageRotateCcw" class="secondaryToolbarButton rotateCcw" title="Rotate Counterclockwise" tabindex="59" data-l10n-id="page_rotate_ccw">
+ <span data-l10n-id="page_rotate_ccw_label">Rotate Counterclockwise</span>
+ </button>
+
+ <div class="horizontalToolbarSeparator"></div>
+
+ <button id="cursorSelectTool" class="secondaryToolbarButton selectTool toggled" title="Enable Text Selection Tool" tabindex="60" data-l10n-id="cursor_text_select_tool">
+ <span data-l10n-id="cursor_text_select_tool_label">Text Selection Tool</span>
+ </button>
+ <button id="cursorHandTool" class="secondaryToolbarButton handTool" title="Enable Hand Tool" tabindex="61" data-l10n-id="cursor_hand_tool">
+ <span data-l10n-id="cursor_hand_tool_label">Hand Tool</span>
+ </button>
+
+ <div class="horizontalToolbarSeparator"></div>
+
+ <button id="scrollVertical" class="secondaryToolbarButton scrollModeButtons scrollVertical toggled" title="Use Vertical Scrolling" tabindex="62" data-l10n-id="scroll_vertical">
+ <span data-l10n-id="scroll_vertical_label">Vertical Scrolling</span>
+ </button>
+ <button id="scrollHorizontal" class="secondaryToolbarButton scrollModeButtons scrollHorizontal" title="Use Horizontal Scrolling" tabindex="63" data-l10n-id="scroll_horizontal">
+ <span data-l10n-id="scroll_horizontal_label">Horizontal Scrolling</span>
+ </button>
+ <button id="scrollWrapped" class="secondaryToolbarButton scrollModeButtons scrollWrapped" title="Use Wrapped Scrolling" tabindex="64" data-l10n-id="scroll_wrapped">
+ <span data-l10n-id="scroll_wrapped_label">Wrapped Scrolling</span>
+ </button>
+
+ <div class="horizontalToolbarSeparator scrollModeButtons"></div>
+
+ <button id="spreadNone" class="secondaryToolbarButton spreadModeButtons spreadNone toggled" title="Do not join page spreads" tabindex="65" data-l10n-id="spread_none">
+ <span data-l10n-id="spread_none_label">No Spreads</span>
+ </button>
+ <button id="spreadOdd" class="secondaryToolbarButton spreadModeButtons spreadOdd" title="Join page spreads starting with odd-numbered pages" tabindex="66" data-l10n-id="spread_odd">
+ <span data-l10n-id="spread_odd_label">Odd Spreads</span>
+ </button>
+ <button id="spreadEven" class="secondaryToolbarButton spreadModeButtons spreadEven" title="Join page spreads starting with even-numbered pages" tabindex="67" data-l10n-id="spread_even">
+ <span data-l10n-id="spread_even_label">Even Spreads</span>
+ </button>
+
+ <div class="horizontalToolbarSeparator spreadModeButtons"></div>
+
+ <button id="documentProperties" class="secondaryToolbarButton documentProperties" title="Document Properties…" tabindex="68" data-l10n-id="document_properties">
+ <span data-l10n-id="document_properties_label">Document Properties…</span>
+ </button>
+ </div>
+ </div> <!-- secondaryToolbar -->
+
+ <div class="toolbar">
+ <div id="toolbarContainer">
+ <div id="toolbarViewer">
+ <div id="toolbarViewerLeft">
+ <button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="11" data-l10n-id="toggle_sidebar">
+ <span data-l10n-id="toggle_sidebar_label">Toggle Sidebar</span>
+ </button>
+ <div class="toolbarButtonSpacer"></div>
+ <button id="viewFind" class="toolbarButton" title="Find in Document" tabindex="12" data-l10n-id="findbar">
+ <span data-l10n-id="findbar_label">Find</span>
+ </button>
+ <div class="splitToolbarButton hiddenSmallView">
+ <button class="toolbarButton pageUp" title="Previous Page" id="previous" tabindex="13" data-l10n-id="previous">
+ <span data-l10n-id="previous_label">Previous</span>
+ </button>
+ <div class="splitToolbarButtonSeparator"></div>
+ <button class="toolbarButton pageDown" title="Next Page" id="next" tabindex="14" data-l10n-id="next">
+ <span data-l10n-id="next_label">Next</span>
+ </button>
+ </div>
+ <input type="number" id="pageNumber" class="toolbarField pageNumber" title="Page" value="1" size="4" min="1" tabindex="15" data-l10n-id="page">
+ <span id="numPages" class="toolbarLabel"></span>
+ </div>
+ <div id="toolbarViewerRight">
+ <button id="presentationMode" class="toolbarButton presentationMode hiddenLargeView" title="Switch to Presentation Mode" tabindex="31" data-l10n-id="presentation_mode">
+ <span data-l10n-id="presentation_mode_label">Presentation Mode</span>
+ </button>
+
+ <button id="openFile" class="toolbarButton openFile hiddenLargeView" title="Open File" tabindex="32" data-l10n-id="open_file">
+ <span data-l10n-id="open_file_label">Open</span>
+ </button>
+
+ <button id="print" class="toolbarButton print hiddenMediumView" title="Print" tabindex="33" data-l10n-id="print">
+ <span data-l10n-id="print_label">Print</span>
+ </button>
+
+ <button id="download" class="toolbarButton download hiddenMediumView" title="Download" tabindex="34" data-l10n-id="download">
+ <span data-l10n-id="download_label">Download</span>
+ </button>
+ <a href="#" id="viewBookmark" class="toolbarButton bookmark hiddenSmallView" title="Current view (copy or open in new window)" tabindex="35" data-l10n-id="bookmark">
+ <span data-l10n-id="bookmark_label">Current View</span>
+ </a>
+
+ <div class="verticalToolbarSeparator hiddenSmallView"></div>
+
+ <button id="secondaryToolbarToggle" class="toolbarButton" title="Tools" tabindex="36" data-l10n-id="tools">
+ <span data-l10n-id="tools_label">Tools</span>
+ </button>
+ </div>
+ <div id="toolbarViewerMiddle">
+ <div class="splitToolbarButton">
+ <button id="zoomOut" class="toolbarButton zoomOut" title="Zoom Out" tabindex="21" data-l10n-id="zoom_out">
+ <span data-l10n-id="zoom_out_label">Zoom Out</span>
+ </button>
+ <div class="splitToolbarButtonSeparator"></div>
+ <button id="zoomIn" class="toolbarButton zoomIn" title="Zoom In" tabindex="22" data-l10n-id="zoom_in">
+ <span data-l10n-id="zoom_in_label">Zoom In</span>
+ </button>
+ </div>
+ <span id="scaleSelectContainer" class="dropdownToolbarButton">
+ <select id="scaleSelect" title="Zoom" tabindex="23" data-l10n-id="zoom">
+ <option id="pageAutoOption" title="" value="auto" selected="selected" data-l10n-id="page_scale_auto">Automatic Zoom</option>
+ <option id="pageActualOption" title="" value="page-actual" data-l10n-id="page_scale_actual">Actual Size</option>
+ <option id="pageFitOption" title="" value="page-fit" data-l10n-id="page_scale_fit">Page Fit</option>
+ <option id="pageWidthOption" title="" value="page-width" data-l10n-id="page_scale_width">Page Width</option>
+ <option id="customScaleOption" title="" value="custom" disabled="disabled" hidden="true"></option>
+ <option title="" value="0.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 50 }'>50%</option>
+ <option title="" value="0.75" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 75 }'>75%</option>
+ <option title="" value="1" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 100 }'>100%</option>
+ <option title="" value="1.25" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 125 }'>125%</option>
+ <option title="" value="1.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 150 }'>150%</option>
+ <option title="" value="2" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 200 }'>200%</option>
+ <option title="" value="3" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 300 }'>300%</option>
+ <option title="" value="4" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 400 }'>400%</option>
+ </select>
+ </span>
+ </div>
+ </div>
+ <div id="loadingBar">
+ <div class="progress">
+ <div class="glimmer">
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <menu type="context" id="viewerContextMenu">
+ <menuitem id="contextFirstPage" label="First Page"
+ data-l10n-id="first_page"></menuitem>
+ <menuitem id="contextLastPage" label="Last Page"
+ data-l10n-id="last_page"></menuitem>
+ <menuitem id="contextPageRotateCw" label="Rotate Clockwise"
+ data-l10n-id="page_rotate_cw"></menuitem>
+ <menuitem id="contextPageRotateCcw" label="Rotate Counter-Clockwise"
+ data-l10n-id="page_rotate_ccw"></menuitem>
+ </menu>
+
+ <div id="viewerContainer" tabindex="0">
+ <div id="viewer" class="pdfViewer"></div>
+ </div>
+
+ <div id="errorWrapper" hidden='true'>
+ <div id="errorMessageLeft">
+ <span id="errorMessage"></span>
+ <button id="errorShowMore" data-l10n-id="error_more_info">
+ More Information
+ </button>
+ <button id="errorShowLess" data-l10n-id="error_less_info" hidden='true'>
+ Less Information
+ </button>
+ </div>
+ <div id="errorMessageRight">
+ <button id="errorClose" data-l10n-id="error_close">
+ Close
+ </button>
+ </div>
+ <div class="clearBoth"></div>
+ <textarea id="errorMoreInfo" hidden='true' readonly="readonly"></textarea>
+ </div>
+ </div> <!-- mainContainer -->
+
+ <div id="overlayContainer" class="hidden">
+ <div id="passwordOverlay" class="container hidden">
+ <div class="dialog">
+ <div class="row">
+ <p id="passwordText" data-l10n-id="password_label">Enter the password to open this PDF file:</p>
+ </div>
+ <div class="row">
+ <input type="password" id="password" class="toolbarField">
+ </div>
+ <div class="buttonRow">
+ <button id="passwordCancel" class="overlayButton"><span data-l10n-id="password_cancel">Cancel</span></button>
+ <button id="passwordSubmit" class="overlayButton"><span data-l10n-id="password_ok">OK</span></button>
+ </div>
+ </div>
+ </div>
+ <div id="documentPropertiesOverlay" class="container hidden">
+ <div class="dialog">
+ <div class="row">
+ <span data-l10n-id="document_properties_file_name">File name:</span> <p id="fileNameField">-</p>
+ </div>
+ <div class="row">
+ <span data-l10n-id="document_properties_file_size">File size:</span> <p id="fileSizeField">-</p>
+ </div>
+ <div class="separator"></div>
+ <div class="row">
+ <span data-l10n-id="document_properties_title">Title:</span> <p id="titleField">-</p>
+ </div>
+ <div class="row">
+ <span data-l10n-id="document_properties_author">Author:</span> <p id="authorField">-</p>
+ </div>
+ <div class="row">
+ <span data-l10n-id="document_properties_subject">Subject:</span> <p id="subjectField">-</p>
+ </div>
+ <div class="row">
+ <span data-l10n-id="document_properties_keywords">Keywords:</span> <p id="keywordsField">-</p>
+ </div>
+ <div class="row">
+ <span data-l10n-id="document_properties_creation_date">Creation Date:</span> <p id="creationDateField">-</p>
+ </div>
+ <div class="row">
+ <span data-l10n-id="document_properties_modification_date">Modification Date:</span> <p id="modificationDateField">-</p>
+ </div>
+ <div class="row">
+ <span data-l10n-id="document_properties_creator">Creator:</span> <p id="creatorField">-</p>
+ </div>
+ <div class="separator"></div>
+ <div class="row">
+ <span data-l10n-id="document_properties_producer">PDF Producer:</span> <p id="producerField">-</p>
+ </div>
+ <div class="row">
+ <span data-l10n-id="document_properties_version">PDF Version:</span> <p id="versionField">-</p>
+ </div>
+ <div class="row">
+ <span data-l10n-id="document_properties_page_count">Page Count:</span> <p id="pageCountField">-</p>
+ </div>
+ <div class="row">
+ <span data-l10n-id="document_properties_page_size">Page Size:</span> <p id="pageSizeField">-</p>
+ </div>
+ <div class="separator"></div>
+ <div class="row">
+ <span data-l10n-id="document_properties_linearized">Fast Web View:</span> <p id="linearizedField">-</p>
+ </div>
+ <div class="buttonRow">
+ <button id="documentPropertiesClose" class="overlayButton"><span data-l10n-id="document_properties_close">Close</span></button>
+ </div>
+ </div>
+ </div>
+ <div id="printServiceOverlay" class="container hidden">
+ <div class="dialog">
+ <div class="row">
+ <span data-l10n-id="print_progress_message">Preparing document for printing…</span>
+ </div>
+ <div class="row">
+ <progress value="0" max="100"></progress>
+ <span data-l10n-id="print_progress_percent" data-l10n-args='{ "progress": 0 }' class="relative-progress">0%</span>
+ </div>
+ <div class="buttonRow">
+ <button id="printCancel" class="overlayButton"><span data-l10n-id="print_progress_close">Cancel</span></button>
+ </div>
+ </div>
+ </div>
+ </div> <!-- overlayContainer -->
+
+ </div> <!-- outerContainer -->
+ <div id="printContainer"></div>
+ </body>
+</html>
+
diff --git a/js/pdfjs/web/viewer.js b/js/pdfjs/web/viewer.js
new file mode 100644
index 0000000..6ecebce
--- /dev/null
+++ b/js/pdfjs/web/viewer.js
@@ -0,0 +1,13202 @@
+/**
+ * @licstart The following is the entire license notice for the
+ * Javascript code in this page
+ *
+ * Copyright 2020 Mozilla Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * @licend The above is the entire license notice for the
+ * Javascript code in this page
+ */
+
+/******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId]) {
+/******/ return installedModules[moduleId].exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ i: moduleId,
+/******/ l: false,
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Flag the module as loaded
+/******/ module.l = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/******/
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+/******/
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+/******/
+/******/ // define getter function for harmony exports
+/******/ __webpack_require__.d = function(exports, name, getter) {
+/******/ if(!__webpack_require__.o(exports, name)) {
+/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
+/******/ }
+/******/ };
+/******/
+/******/ // define __esModule on exports
+/******/ __webpack_require__.r = function(exports) {
+/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+/******/ }
+/******/ Object.defineProperty(exports, '__esModule', { value: true });
+/******/ };
+/******/
+/******/ // create a fake namespace object
+/******/ // mode & 1: value is a module id, require it
+/******/ // mode & 2: merge all properties of value into the ns
+/******/ // mode & 4: return value when already ns object
+/******/ // mode & 8|1: behave like require
+/******/ __webpack_require__.t = function(value, mode) {
+/******/ if(mode & 1) value = __webpack_require__(value);
+/******/ if(mode & 8) return value;
+/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
+/******/ var ns = Object.create(null);
+/******/ __webpack_require__.r(ns);
+/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
+/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
+/******/ return ns;
+/******/ };
+/******/
+/******/ // getDefaultExport function for compatibility with non-harmony modules
+/******/ __webpack_require__.n = function(module) {
+/******/ var getter = module && module.__esModule ?
+/******/ function getDefault() { return module['default']; } :
+/******/ function getModuleExports() { return module; };
+/******/ __webpack_require__.d(getter, 'a', getter);
+/******/ return getter;
+/******/ };
+/******/
+/******/ // Object.prototype.hasOwnProperty.call
+/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+/******/
+/******/
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(__webpack_require__.s = 0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+;
+let pdfjsWebApp, pdfjsWebAppOptions;
+{
+ pdfjsWebApp = __webpack_require__(1);
+ pdfjsWebAppOptions = __webpack_require__(3);
+}
+;
+{
+ __webpack_require__(33);
+}
+;
+{
+ __webpack_require__(38);
+}
+
+function getViewerConfiguration() {
+ return {
+ appContainer: document.body,
+ mainContainer: document.getElementById("viewerContainer"),
+ viewerContainer: document.getElementById("viewer"),
+ eventBus: null,
+ toolbar: {
+ container: document.getElementById("toolbarViewer"),
+ numPages: document.getElementById("numPages"),
+ pageNumber: document.getElementById("pageNumber"),
+ scaleSelectContainer: document.getElementById("scaleSelectContainer"),
+ scaleSelect: document.getElementById("scaleSelect"),
+ customScaleOption: document.getElementById("customScaleOption"),
+ previous: document.getElementById("previous"),
+ next: document.getElementById("next"),
+ zoomIn: document.getElementById("zoomIn"),
+ zoomOut: document.getElementById("zoomOut"),
+ viewFind: document.getElementById("viewFind"),
+ openFile: document.getElementById("openFile"),
+ print: document.getElementById("print"),
+ presentationModeButton: document.getElementById("presentationMode"),
+ download: document.getElementById("download"),
+ viewBookmark: document.getElementById("viewBookmark")
+ },
+ secondaryToolbar: {
+ toolbar: document.getElementById("secondaryToolbar"),
+ toggleButton: document.getElementById("secondaryToolbarToggle"),
+ toolbarButtonContainer: document.getElementById("secondaryToolbarButtonContainer"),
+ presentationModeButton: document.getElementById("secondaryPresentationMode"),
+ openFileButton: document.getElementById("secondaryOpenFile"),
+ printButton: document.getElementById("secondaryPrint"),
+ downloadButton: document.getElementById("secondaryDownload"),
+ viewBookmarkButton: document.getElementById("secondaryViewBookmark"),
+ firstPageButton: document.getElementById("firstPage"),
+ lastPageButton: document.getElementById("lastPage"),
+ pageRotateCwButton: document.getElementById("pageRotateCw"),
+ pageRotateCcwButton: document.getElementById("pageRotateCcw"),
+ cursorSelectToolButton: document.getElementById("cursorSelectTool"),
+ cursorHandToolButton: document.getElementById("cursorHandTool"),
+ scrollVerticalButton: document.getElementById("scrollVertical"),
+ scrollHorizontalButton: document.getElementById("scrollHorizontal"),
+ scrollWrappedButton: document.getElementById("scrollWrapped"),
+ spreadNoneButton: document.getElementById("spreadNone"),
+ spreadOddButton: document.getElementById("spreadOdd"),
+ spreadEvenButton: document.getElementById("spreadEven"),
+ documentPropertiesButton: document.getElementById("documentProperties")
+ },
+ fullscreen: {
+ contextFirstPage: document.getElementById("contextFirstPage"),
+ contextLastPage: document.getElementById("contextLastPage"),
+ contextPageRotateCw: document.getElementById("contextPageRotateCw"),
+ contextPageRotateCcw: document.getElementById("contextPageRotateCcw")
+ },
+ sidebar: {
+ outerContainer: document.getElementById("outerContainer"),
+ viewerContainer: document.getElementById("viewerContainer"),
+ toggleButton: document.getElementById("sidebarToggle"),
+ thumbnailButton: document.getElementById("viewThumbnail"),
+ outlineButton: document.getElementById("viewOutline"),
+ attachmentsButton: document.getElementById("viewAttachments"),
+ thumbnailView: document.getElementById("thumbnailView"),
+ outlineView: document.getElementById("outlineView"),
+ attachmentsView: document.getElementById("attachmentsView")
+ },
+ sidebarResizer: {
+ outerContainer: document.getElementById("outerContainer"),
+ resizer: document.getElementById("sidebarResizer")
+ },
+ findBar: {
+ bar: document.getElementById("findbar"),
+ toggleButton: document.getElementById("viewFind"),
+ findField: document.getElementById("findInput"),
+ highlightAllCheckbox: document.getElementById("findHighlightAll"),
+ caseSensitiveCheckbox: document.getElementById("findMatchCase"),
+ entireWordCheckbox: document.getElementById("findEntireWord"),
+ findMsg: document.getElementById("findMsg"),
+ findResultsCount: document.getElementById("findResultsCount"),
+ findPreviousButton: document.getElementById("findPrevious"),
+ findNextButton: document.getElementById("findNext")
+ },
+ passwordOverlay: {
+ overlayName: "passwordOverlay",
+ container: document.getElementById("passwordOverlay"),
+ label: document.getElementById("passwordText"),
+ input: document.getElementById("password"),
+ submitButton: document.getElementById("passwordSubmit"),
+ cancelButton: document.getElementById("passwordCancel")
+ },
+ documentProperties: {
+ overlayName: "documentPropertiesOverlay",
+ container: document.getElementById("documentPropertiesOverlay"),
+ closeButton: document.getElementById("documentPropertiesClose"),
+ fields: {
+ fileName: document.getElementById("fileNameField"),
+ fileSize: document.getElementById("fileSizeField"),
+ title: document.getElementById("titleField"),
+ author: document.getElementById("authorField"),
+ subject: document.getElementById("subjectField"),
+ keywords: document.getElementById("keywordsField"),
+ creationDate: document.getElementById("creationDateField"),
+ modificationDate: document.getElementById("modificationDateField"),
+ creator: document.getElementById("creatorField"),
+ producer: document.getElementById("producerField"),
+ version: document.getElementById("versionField"),
+ pageCount: document.getElementById("pageCountField"),
+ pageSize: document.getElementById("pageSizeField"),
+ linearized: document.getElementById("linearizedField")
+ }
+ },
+ errorWrapper: {
+ container: document.getElementById("errorWrapper"),
+ errorMessage: document.getElementById("errorMessage"),
+ closeButton: document.getElementById("errorClose"),
+ errorMoreInfo: document.getElementById("errorMoreInfo"),
+ moreInfoButton: document.getElementById("errorShowMore"),
+ lessInfoButton: document.getElementById("errorShowLess")
+ },
+ printContainer: document.getElementById("printContainer"),
+ openFileInputName: "fileInput",
+ debuggerScriptPath: "./debugger.js"
+ };
+}
+
+function webViewerLoad() {
+ const config = getViewerConfiguration();
+ window.PDFViewerApplication = pdfjsWebApp.PDFViewerApplication;
+ window.PDFViewerApplicationOptions = pdfjsWebAppOptions.AppOptions;
+ const event = document.createEvent("CustomEvent");
+ event.initCustomEvent("webviewerloaded", true, true, {});
+ document.dispatchEvent(event);
+ pdfjsWebApp.PDFViewerApplication.run(config);
+}
+
+if (document.readyState === "interactive" || document.readyState === "complete") {
+ webViewerLoad();
+} else {
+ document.addEventListener("DOMContentLoaded", webViewerLoad, true);
+}
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PDFPrintServiceFactory = exports.DefaultExternalServices = exports.PDFViewerApplication = void 0;
+
+var _ui_utils = __webpack_require__(2);
+
+var _app_options = __webpack_require__(3);
+
+var _pdfjsLib = __webpack_require__(4);
+
+var _pdf_cursor_tools = __webpack_require__(6);
+
+var _pdf_rendering_queue = __webpack_require__(8);
+
+var _pdf_sidebar = __webpack_require__(9);
+
+var _overlay_manager = __webpack_require__(10);
+
+var _password_prompt = __webpack_require__(11);
+
+var _pdf_attachment_viewer = __webpack_require__(12);
+
+var _pdf_document_properties = __webpack_require__(13);
+
+var _pdf_find_bar = __webpack_require__(14);
+
+var _pdf_find_controller = __webpack_require__(15);
+
+var _pdf_history = __webpack_require__(17);
+
+var _pdf_link_service = __webpack_require__(18);
+
+var _pdf_outline_viewer = __webpack_require__(19);
+
+var _pdf_presentation_mode = __webpack_require__(20);
+
+var _pdf_sidebar_resizer = __webpack_require__(21);
+
+var _pdf_thumbnail_viewer = __webpack_require__(22);
+
+var _pdf_viewer = __webpack_require__(24);
+
+var _secondary_toolbar = __webpack_require__(29);
+
+var _toolbar = __webpack_require__(31);
+
+var _view_history = __webpack_require__(32);
+
+const DEFAULT_SCALE_DELTA = 1.1;
+const DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT = 5000;
+const FORCE_PAGES_LOADED_TIMEOUT = 10000;
+const WHEEL_ZOOM_DISABLED_TIMEOUT = 1000;
+const ViewOnLoad = {
+ UNKNOWN: -1,
+ PREVIOUS: 0,
+ INITIAL: 1
+};
+
+class DefaultExternalServices {
+ constructor() {
+ throw new Error("Cannot initialize DefaultExternalServices.");
+ }
+
+ static updateFindControlState(data) {}
+
+ static updateFindMatchesCount(data) {}
+
+ static initPassiveLoading(callbacks) {}
+
+ static fallback(data, callback) {}
+
+ static reportTelemetry(data) {}
+
+ static createDownloadManager(options) {
+ throw new Error("Not implemented: createDownloadManager");
+ }
+
+ static createPreferences() {
+ throw new Error("Not implemented: createPreferences");
+ }
+
+ static createL10n(options) {
+ throw new Error("Not implemented: createL10n");
+ }
+
+ static get supportsIntegratedFind() {
+ return (0, _pdfjsLib.shadow)(this, "supportsIntegratedFind", false);
+ }
+
+ static get supportsDocumentFonts() {
+ return (0, _pdfjsLib.shadow)(this, "supportsDocumentFonts", true);
+ }
+
+ static get supportedMouseWheelZoomModifierKeys() {
+ return (0, _pdfjsLib.shadow)(this, "supportedMouseWheelZoomModifierKeys", {
+ ctrlKey: true,
+ metaKey: true
+ });
+ }
+
+}
+
+exports.DefaultExternalServices = DefaultExternalServices;
+const PDFViewerApplication = {
+ initialBookmark: document.location.hash.substring(1),
+ _initializedCapability: (0, _pdfjsLib.createPromiseCapability)(),
+ fellback: false,
+ appConfig: null,
+ pdfDocument: null,
+ pdfLoadingTask: null,
+ printService: null,
+ pdfViewer: null,
+ pdfThumbnailViewer: null,
+ pdfRenderingQueue: null,
+ pdfPresentationMode: null,
+ pdfDocumentProperties: null,
+ pdfLinkService: null,
+ pdfHistory: null,
+ pdfSidebar: null,
+ pdfSidebarResizer: null,
+ pdfOutlineViewer: null,
+ pdfAttachmentViewer: null,
+ pdfCursorTools: null,
+ store: null,
+ downloadManager: null,
+ overlayManager: null,
+ preferences: null,
+ toolbar: null,
+ secondaryToolbar: null,
+ eventBus: null,
+ l10n: null,
+ isInitialViewSet: false,
+ downloadComplete: false,
+ isViewerEmbedded: window.parent !== window,
+ url: "",
+ baseUrl: "",
+ externalServices: DefaultExternalServices,
+ _boundEvents: {},
+ contentDispositionFilename: null,
+
+ async initialize(appConfig) {
+ this.preferences = this.externalServices.createPreferences();
+ this.appConfig = appConfig;
+ await this._readPreferences();
+ await this._parseHashParameters();
+ await this._initializeL10n();
+
+ if (this.isViewerEmbedded && _app_options.AppOptions.get("externalLinkTarget") === _pdfjsLib.LinkTarget.NONE) {
+ _app_options.AppOptions.set("externalLinkTarget", _pdfjsLib.LinkTarget.TOP);
+ }
+
+ await this._initializeViewerComponents();
+ this.bindEvents();
+ this.bindWindowEvents();
+ const appContainer = appConfig.appContainer || document.documentElement;
+ this.l10n.translate(appContainer).then(() => {
+ this.eventBus.dispatch("localized", {
+ source: this
+ });
+ });
+
+ this._initializedCapability.resolve();
+ },
+
+ async _readPreferences() {
+ if (_app_options.AppOptions.get("disablePreferences") === true) {
+ return;
+ }
+
+ try {
+ const prefs = await this.preferences.getAll();
+
+ for (const name in prefs) {
+ _app_options.AppOptions.set(name, prefs[name]);
+ }
+ } catch (reason) {
+ console.error(`_readPreferences: "${reason.message}".`);
+ }
+ },
+
+ async _parseHashParameters() {
+ if (!_app_options.AppOptions.get("pdfBugEnabled")) {
+ return undefined;
+ }
+
+ const hash = document.location.hash.substring(1);
+
+ if (!hash) {
+ return undefined;
+ }
+
+ const hashParams = (0, _ui_utils.parseQueryString)(hash),
+ waitOn = [];
+
+ if ("disableworker" in hashParams && hashParams["disableworker"] === "true") {
+ waitOn.push(loadFakeWorker());
+ }
+
+ if ("disablerange" in hashParams) {
+ _app_options.AppOptions.set("disableRange", hashParams["disablerange"] === "true");
+ }
+
+ if ("disablestream" in hashParams) {
+ _app_options.AppOptions.set("disableStream", hashParams["disablestream"] === "true");
+ }
+
+ if ("disableautofetch" in hashParams) {
+ _app_options.AppOptions.set("disableAutoFetch", hashParams["disableautofetch"] === "true");
+ }
+
+ if ("disablefontface" in hashParams) {
+ _app_options.AppOptions.set("disableFontFace", hashParams["disablefontface"] === "true");
+ }
+
+ if ("disablehistory" in hashParams) {
+ _app_options.AppOptions.set("disableHistory", hashParams["disablehistory"] === "true");
+ }
+
+ if ("webgl" in hashParams) {
+ _app_options.AppOptions.set("enableWebGL", hashParams["webgl"] === "true");
+ }
+
+ if ("verbosity" in hashParams) {
+ _app_options.AppOptions.set("verbosity", hashParams["verbosity"] | 0);
+ }
+
+ if ("textlayer" in hashParams) {
+ switch (hashParams["textlayer"]) {
+ case "off":
+ _app_options.AppOptions.set("textLayerMode", _ui_utils.TextLayerMode.DISABLE);
+
+ break;
+
+ case "visible":
+ case "shadow":
+ case "hover":
+ const viewer = this.appConfig.viewerContainer;
+ viewer.classList.add("textLayer-" + hashParams["textlayer"]);
+ break;
+ }
+ }
+
+ if ("pdfbug" in hashParams) {
+ _app_options.AppOptions.set("pdfBug", true);
+
+ const enabled = hashParams["pdfbug"].split(",");
+ waitOn.push(loadAndEnablePDFBug(enabled));
+ }
+
+ if ("locale" in hashParams) {
+ _app_options.AppOptions.set("locale", hashParams["locale"]);
+ }
+
+ return Promise.all(waitOn).catch(reason => {
+ console.error(`_parseHashParameters: "${reason.message}".`);
+ });
+ },
+
+ async _initializeL10n() {
+ this.l10n = this.externalServices.createL10n({
+ locale: _app_options.AppOptions.get("locale")
+ });
+ const dir = await this.l10n.getDirection();
+ document.getElementsByTagName("html")[0].dir = dir;
+ },
+
+ async _initializeViewerComponents() {
+ const appConfig = this.appConfig;
+ this.overlayManager = new _overlay_manager.OverlayManager();
+ const eventBus = appConfig.eventBus || new _ui_utils.EventBus({
+ dispatchToDOM: _app_options.AppOptions.get("eventBusDispatchToDOM")
+ });
+ this.eventBus = eventBus;
+ const pdfRenderingQueue = new _pdf_rendering_queue.PDFRenderingQueue();
+ pdfRenderingQueue.onIdle = this.cleanup.bind(this);
+ this.pdfRenderingQueue = pdfRenderingQueue;
+ const pdfLinkService = new _pdf_link_service.PDFLinkService({
+ eventBus,
+ externalLinkTarget: _app_options.AppOptions.get("externalLinkTarget"),
+ externalLinkRel: _app_options.AppOptions.get("externalLinkRel"),
+ ignoreDestinationZoom: _app_options.AppOptions.get("ignoreDestinationZoom")
+ });
+ this.pdfLinkService = pdfLinkService;
+ const downloadManager = this.externalServices.createDownloadManager({
+ disableCreateObjectURL: _app_options.AppOptions.get("disableCreateObjectURL")
+ });
+ this.downloadManager = downloadManager;
+ const findController = new _pdf_find_controller.PDFFindController({
+ linkService: pdfLinkService,
+ eventBus
+ });
+ this.findController = findController;
+ const container = appConfig.mainContainer;
+ const viewer = appConfig.viewerContainer;
+ this.pdfViewer = new _pdf_viewer.PDFViewer({
+ container,
+ viewer,
+ eventBus,
+ renderingQueue: pdfRenderingQueue,
+ linkService: pdfLinkService,
+ downloadManager,
+ findController,
+ renderer: _app_options.AppOptions.get("renderer"),
+ enableWebGL: _app_options.AppOptions.get("enableWebGL"),
+ l10n: this.l10n,
+ textLayerMode: _app_options.AppOptions.get("textLayerMode"),
+ imageResourcesPath: _app_options.AppOptions.get("imageResourcesPath"),
+ renderInteractiveForms: _app_options.AppOptions.get("renderInteractiveForms"),
+ enablePrintAutoRotate: _app_options.AppOptions.get("enablePrintAutoRotate"),
+ useOnlyCssZoom: _app_options.AppOptions.get("useOnlyCssZoom"),
+ maxCanvasPixels: _app_options.AppOptions.get("maxCanvasPixels")
+ });
+ pdfRenderingQueue.setViewer(this.pdfViewer);
+ pdfLinkService.setViewer(this.pdfViewer);
+ this.pdfThumbnailViewer = new _pdf_thumbnail_viewer.PDFThumbnailViewer({
+ container: appConfig.sidebar.thumbnailView,
+ renderingQueue: pdfRenderingQueue,
+ linkService: pdfLinkService,
+ l10n: this.l10n
+ });
+ pdfRenderingQueue.setThumbnailViewer(this.pdfThumbnailViewer);
+ this.pdfHistory = new _pdf_history.PDFHistory({
+ linkService: pdfLinkService,
+ eventBus
+ });
+ pdfLinkService.setHistory(this.pdfHistory);
+
+ if (!this.supportsIntegratedFind) {
+ this.findBar = new _pdf_find_bar.PDFFindBar(appConfig.findBar, eventBus, this.l10n);
+ }
+
+ this.pdfDocumentProperties = new _pdf_document_properties.PDFDocumentProperties(appConfig.documentProperties, this.overlayManager, eventBus, this.l10n);
+ this.pdfCursorTools = new _pdf_cursor_tools.PDFCursorTools({
+ container,
+ eventBus,
+ cursorToolOnLoad: _app_options.AppOptions.get("cursorToolOnLoad")
+ });
+ this.toolbar = new _toolbar.Toolbar(appConfig.toolbar, eventBus, this.l10n);
+ this.secondaryToolbar = new _secondary_toolbar.SecondaryToolbar(appConfig.secondaryToolbar, container, eventBus);
+
+ if (this.supportsFullscreen) {
+ this.pdfPresentationMode = new _pdf_presentation_mode.PDFPresentationMode({
+ container,
+ pdfViewer: this.pdfViewer,
+ eventBus,
+ contextMenuItems: appConfig.fullscreen
+ });
+ }
+
+ this.passwordPrompt = new _password_prompt.PasswordPrompt(appConfig.passwordOverlay, this.overlayManager, this.l10n);
+ this.pdfOutlineViewer = new _pdf_outline_viewer.PDFOutlineViewer({
+ container: appConfig.sidebar.outlineView,
+ eventBus,
+ linkService: pdfLinkService
+ });
+ this.pdfAttachmentViewer = new _pdf_attachment_viewer.PDFAttachmentViewer({
+ container: appConfig.sidebar.attachmentsView,
+ eventBus,
+ downloadManager
+ });
+ this.pdfSidebar = new _pdf_sidebar.PDFSidebar({
+ elements: appConfig.sidebar,
+ pdfViewer: this.pdfViewer,
+ pdfThumbnailViewer: this.pdfThumbnailViewer,
+ eventBus,
+ l10n: this.l10n
+ });
+ this.pdfSidebar.onToggled = this.forceRendering.bind(this);
+ this.pdfSidebarResizer = new _pdf_sidebar_resizer.PDFSidebarResizer(appConfig.sidebarResizer, eventBus, this.l10n);
+ },
+
+ run(config) {
+ this.initialize(config).then(webViewerInitialized);
+ },
+
+ get initialized() {
+ return this._initializedCapability.settled;
+ },
+
+ get initializedPromise() {
+ return this._initializedCapability.promise;
+ },
+
+ zoomIn(ticks) {
+ if (this.pdfViewer.isInPresentationMode) {
+ return;
+ }
+
+ let newScale = this.pdfViewer.currentScale;
+
+ do {
+ newScale = (newScale * DEFAULT_SCALE_DELTA).toFixed(2);
+ newScale = Math.ceil(newScale * 10) / 10;
+ newScale = Math.min(_ui_utils.MAX_SCALE, newScale);
+ } while (--ticks > 0 && newScale < _ui_utils.MAX_SCALE);
+
+ this.pdfViewer.currentScaleValue = newScale;
+ },
+
+ zoomOut(ticks) {
+ if (this.pdfViewer.isInPresentationMode) {
+ return;
+ }
+
+ let newScale = this.pdfViewer.currentScale;
+
+ do {
+ newScale = (newScale / DEFAULT_SCALE_DELTA).toFixed(2);
+ newScale = Math.floor(newScale * 10) / 10;
+ newScale = Math.max(_ui_utils.MIN_SCALE, newScale);
+ } while (--ticks > 0 && newScale > _ui_utils.MIN_SCALE);
+
+ this.pdfViewer.currentScaleValue = newScale;
+ },
+
+ zoomReset() {
+ if (this.pdfViewer.isInPresentationMode) {
+ return;
+ }
+
+ this.pdfViewer.currentScaleValue = _ui_utils.DEFAULT_SCALE_VALUE;
+ },
+
+ get pagesCount() {
+ return this.pdfDocument ? this.pdfDocument.numPages : 0;
+ },
+
+ set page(val) {
+ this.pdfViewer.currentPageNumber = val;
+ },
+
+ get page() {
+ return this.pdfViewer.currentPageNumber;
+ },
+
+ get printing() {
+ return !!this.printService;
+ },
+
+ get supportsPrinting() {
+ return PDFPrintServiceFactory.instance.supportsPrinting;
+ },
+
+ get supportsFullscreen() {
+ let support;
+ const doc = document.documentElement;
+ support = !!(doc.requestFullscreen || doc.mozRequestFullScreen || doc.webkitRequestFullScreen || doc.msRequestFullscreen);
+
+ if (document.fullscreenEnabled === false || document.mozFullScreenEnabled === false || document.webkitFullscreenEnabled === false || document.msFullscreenEnabled === false) {
+ support = false;
+ }
+
+ return (0, _pdfjsLib.shadow)(this, "supportsFullscreen", support);
+ },
+
+ get supportsIntegratedFind() {
+ return this.externalServices.supportsIntegratedFind;
+ },
+
+ get supportsDocumentFonts() {
+ return this.externalServices.supportsDocumentFonts;
+ },
+
+ get loadingBar() {
+ const bar = new _ui_utils.ProgressBar("#loadingBar");
+ return (0, _pdfjsLib.shadow)(this, "loadingBar", bar);
+ },
+
+ get supportedMouseWheelZoomModifierKeys() {
+ return this.externalServices.supportedMouseWheelZoomModifierKeys;
+ },
+
+ initPassiveLoading() {
+ throw new Error("Not implemented: initPassiveLoading");
+ },
+
+ setTitleUsingUrl(url = "") {
+ this.url = url;
+ this.baseUrl = url.split("#")[0];
+ let title = (0, _ui_utils.getPDFFileNameFromURL)(url, "");
+
+ if (!title) {
+ try {
+ title = decodeURIComponent((0, _pdfjsLib.getFilenameFromUrl)(url)) || url;
+ } catch (ex) {
+ title = url;
+ }
+ }
+
+ this.setTitle(title);
+ },
+
+ setTitle(title) {
+ if (this.isViewerEmbedded) {
+ return;
+ }
+
+ document.title = title;
+ },
+
+ async close() {
+ const errorWrapper = this.appConfig.errorWrapper.container;
+ errorWrapper.setAttribute("hidden", "true");
+
+ if (!this.pdfLoadingTask) {
+ return undefined;
+ }
+
+ const promise = this.pdfLoadingTask.destroy();
+ this.pdfLoadingTask = null;
+
+ if (this.pdfDocument) {
+ this.pdfDocument = null;
+ this.pdfThumbnailViewer.setDocument(null);
+ this.pdfViewer.setDocument(null);
+ this.pdfLinkService.setDocument(null);
+ this.pdfDocumentProperties.setDocument(null);
+ }
+
+ this.store = null;
+ this.isInitialViewSet = false;
+ this.downloadComplete = false;
+ this.url = "";
+ this.baseUrl = "";
+ this.contentDispositionFilename = null;
+ this.pdfSidebar.reset();
+ this.pdfOutlineViewer.reset();
+ this.pdfAttachmentViewer.reset();
+
+ if (this.pdfHistory) {
+ this.pdfHistory.reset();
+ }
+
+ if (this.findBar) {
+ this.findBar.reset();
+ }
+
+ this.toolbar.reset();
+ this.secondaryToolbar.reset();
+
+ if (typeof PDFBug !== "undefined") {
+ PDFBug.cleanup();
+ }
+
+ return promise;
+ },
+
+ async open(file, args) {
+ if (this.pdfLoadingTask) {
+ await this.close();
+ }
+
+ const workerParameters = _app_options.AppOptions.getAll(_app_options.OptionKind.WORKER);
+
+ for (const key in workerParameters) {
+ _pdfjsLib.GlobalWorkerOptions[key] = workerParameters[key];
+ }
+
+ const parameters = Object.create(null);
+
+ if (typeof file === "string") {
+ this.setTitleUsingUrl(file);
+ parameters.url = file;
+ } else if (file && "byteLength" in file) {
+ parameters.data = file;
+ } else if (file.url && file.originalUrl) {
+ this.setTitleUsingUrl(file.originalUrl);
+ parameters.url = file.url;
+ }
+
+ const apiParameters = _app_options.AppOptions.getAll(_app_options.OptionKind.API);
+
+ for (const key in apiParameters) {
+ let value = apiParameters[key];
+
+ if (key === "docBaseUrl" && !value) {}
+
+ parameters[key] = value;
+ }
+
+ if (args) {
+ for (const key in args) {
+ const value = args[key];
+
+ if (key === "length") {
+ this.pdfDocumentProperties.setFileSize(value);
+ }
+
+ parameters[key] = value;
+ }
+ }
+
+ const loadingTask = (0, _pdfjsLib.getDocument)(parameters);
+ this.pdfLoadingTask = loadingTask;
+
+ loadingTask.onPassword = (updateCallback, reason) => {
+ this.pdfLinkService.externalLinkEnabled = false;
+ this.passwordPrompt.setUpdateCallback(updateCallback, reason);
+ this.passwordPrompt.open();
+ };
+
+ loadingTask.onProgress = ({
+ loaded,
+ total
+ }) => {
+ this.progress(loaded / total);
+ };
+
+ loadingTask.onUnsupportedFeature = this.fallback.bind(this);
+ return loadingTask.promise.then(pdfDocument => {
+ this.load(pdfDocument);
+ }, exception => {
+ if (loadingTask !== this.pdfLoadingTask) {
+ return undefined;
+ }
+
+ const message = exception && exception.message;
+ let loadingErrorMessage;
+
+ if (exception instanceof _pdfjsLib.InvalidPDFException) {
+ loadingErrorMessage = this.l10n.get("invalid_file_error", null, "Invalid or corrupted PDF file.");
+ } else if (exception instanceof _pdfjsLib.MissingPDFException) {
+ loadingErrorMessage = this.l10n.get("missing_file_error", null, "Missing PDF file.");
+ } else if (exception instanceof _pdfjsLib.UnexpectedResponseException) {
+ loadingErrorMessage = this.l10n.get("unexpected_response_error", null, "Unexpected server response.");
+ } else {
+ loadingErrorMessage = this.l10n.get("loading_error", null, "An error occurred while loading the PDF.");
+ }
+
+ return loadingErrorMessage.then(msg => {
+ this.error(msg, {
+ message
+ });
+ throw new Error(msg);
+ });
+ });
+ },
+
+ download() {
+ function downloadByUrl() {
+ downloadManager.downloadUrl(url, filename);
+ }
+
+ const url = this.baseUrl;
+ const filename = this.contentDispositionFilename || (0, _ui_utils.getPDFFileNameFromURL)(this.url);
+ const downloadManager = this.downloadManager;
+
+ downloadManager.onerror = err => {
+ this.error(`PDF failed to download: ${err}`);
+ };
+
+ if (!this.pdfDocument || !this.downloadComplete) {
+ downloadByUrl();
+ return;
+ }
+
+ this.pdfDocument.getData().then(function (data) {
+ const blob = new Blob([data], {
+ type: "application/pdf"
+ });
+ downloadManager.download(blob, url, filename);
+ }).catch(downloadByUrl);
+ },
+
+ fallback(featureId) {
+ if (this.fellback) {
+ return;
+ }
+
+ this.fellback = true;
+ this.externalServices.fallback({
+ featureId,
+ url: this.baseUrl
+ }, function response(download) {
+ if (!download) {
+ return;
+ }
+
+ PDFViewerApplication.download();
+ });
+ },
+
+ error(message, moreInfo) {
+ const moreInfoText = [this.l10n.get("error_version_info", {
+ version: _pdfjsLib.version || "?",
+ build: _pdfjsLib.build || "?"
+ }, "PDF.js v{{version}} (build: {{build}})")];
+
+ if (moreInfo) {
+ moreInfoText.push(this.l10n.get("error_message", {
+ message: moreInfo.message
+ }, "Message: {{message}}"));
+
+ if (moreInfo.stack) {
+ moreInfoText.push(this.l10n.get("error_stack", {
+ stack: moreInfo.stack
+ }, "Stack: {{stack}}"));
+ } else {
+ if (moreInfo.filename) {
+ moreInfoText.push(this.l10n.get("error_file", {
+ file: moreInfo.filename
+ }, "File: {{file}}"));
+ }
+
+ if (moreInfo.lineNumber) {
+ moreInfoText.push(this.l10n.get("error_line", {
+ line: moreInfo.lineNumber
+ }, "Line: {{line}}"));
+ }
+ }
+ }
+
+ const errorWrapperConfig = this.appConfig.errorWrapper;
+ const errorWrapper = errorWrapperConfig.container;
+ errorWrapper.removeAttribute("hidden");
+ const errorMessage = errorWrapperConfig.errorMessage;
+ errorMessage.textContent = message;
+ const closeButton = errorWrapperConfig.closeButton;
+
+ closeButton.onclick = function () {
+ errorWrapper.setAttribute("hidden", "true");
+ };
+
+ const errorMoreInfo = errorWrapperConfig.errorMoreInfo;
+ const moreInfoButton = errorWrapperConfig.moreInfoButton;
+ const lessInfoButton = errorWrapperConfig.lessInfoButton;
+
+ moreInfoButton.onclick = function () {
+ errorMoreInfo.removeAttribute("hidden");
+ moreInfoButton.setAttribute("hidden", "true");
+ lessInfoButton.removeAttribute("hidden");
+ errorMoreInfo.style.height = errorMoreInfo.scrollHeight + "px";
+ };
+
+ lessInfoButton.onclick = function () {
+ errorMoreInfo.setAttribute("hidden", "true");
+ moreInfoButton.removeAttribute("hidden");
+ lessInfoButton.setAttribute("hidden", "true");
+ };
+
+ moreInfoButton.oncontextmenu = _ui_utils.noContextMenuHandler;
+ lessInfoButton.oncontextmenu = _ui_utils.noContextMenuHandler;
+ closeButton.oncontextmenu = _ui_utils.noContextMenuHandler;
+ moreInfoButton.removeAttribute("hidden");
+ lessInfoButton.setAttribute("hidden", "true");
+ Promise.all(moreInfoText).then(parts => {
+ errorMoreInfo.value = parts.join("\n");
+ });
+ },
+
+ progress(level) {
+ if (this.downloadComplete) {
+ return;
+ }
+
+ const percent = Math.round(level * 100);
+
+ if (percent > this.loadingBar.percent || isNaN(percent)) {
+ this.loadingBar.percent = percent;
+ const disableAutoFetch = this.pdfDocument ? this.pdfDocument.loadingParams["disableAutoFetch"] : _app_options.AppOptions.get("disableAutoFetch");
+
+ if (disableAutoFetch && percent) {
+ if (this.disableAutoFetchLoadingBarTimeout) {
+ clearTimeout(this.disableAutoFetchLoadingBarTimeout);
+ this.disableAutoFetchLoadingBarTimeout = null;
+ }
+
+ this.loadingBar.show();
+ this.disableAutoFetchLoadingBarTimeout = setTimeout(() => {
+ this.loadingBar.hide();
+ this.disableAutoFetchLoadingBarTimeout = null;
+ }, DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT);
+ }
+ }
+ },
+
+ load(pdfDocument) {
+ this.pdfDocument = pdfDocument;
+ pdfDocument.getDownloadInfo().then(() => {
+ this.downloadComplete = true;
+ this.loadingBar.hide();
+ firstPagePromise.then(() => {
+ this.eventBus.dispatch("documentloaded", {
+ source: this
+ });
+ });
+ });
+ const pageLayoutPromise = pdfDocument.getPageLayout().catch(function () {});
+ const pageModePromise = pdfDocument.getPageMode().catch(function () {});
+ const openActionPromise = pdfDocument.getOpenAction().catch(function () {});
+ this.toolbar.setPagesCount(pdfDocument.numPages, false);
+ this.secondaryToolbar.setPagesCount(pdfDocument.numPages);
+ const store = this.store = new _view_history.ViewHistory(pdfDocument.fingerprint);
+ let baseDocumentUrl;
+ baseDocumentUrl = null;
+ this.pdfLinkService.setDocument(pdfDocument, baseDocumentUrl);
+ this.pdfDocumentProperties.setDocument(pdfDocument, this.url);
+ const pdfViewer = this.pdfViewer;
+ pdfViewer.setDocument(pdfDocument);
+ const {
+ firstPagePromise,
+ onePageRendered,
+ pagesPromise
+ } = pdfViewer;
+ const pdfThumbnailViewer = this.pdfThumbnailViewer;
+ pdfThumbnailViewer.setDocument(pdfDocument);
+ firstPagePromise.then(pdfPage => {
+ this.loadingBar.setWidth(this.appConfig.viewerContainer);
+ const storePromise = store.getMultiple({
+ page: null,
+ zoom: _ui_utils.DEFAULT_SCALE_VALUE,
+ scrollLeft: "0",
+ scrollTop: "0",
+ rotation: null,
+ sidebarView: _pdf_sidebar.SidebarView.UNKNOWN,
+ scrollMode: _ui_utils.ScrollMode.UNKNOWN,
+ spreadMode: _ui_utils.SpreadMode.UNKNOWN
+ }).catch(() => {});
+ Promise.all([_ui_utils.animationStarted, storePromise, pageLayoutPromise, pageModePromise, openActionPromise]).then(async ([timeStamp, values = {}, pageLayout, pageMode, openAction]) => {
+ const viewOnLoad = _app_options.AppOptions.get("viewOnLoad");
+
+ this._initializePdfHistory({
+ fingerprint: pdfDocument.fingerprint,
+ viewOnLoad,
+ initialDest: openAction && openAction.dest
+ });
+
+ const initialBookmark = this.initialBookmark;
+
+ const zoom = _app_options.AppOptions.get("defaultZoomValue");
+
+ let hash = zoom ? `zoom=${zoom}` : null;
+ let rotation = null;
+
+ let sidebarView = _app_options.AppOptions.get("sidebarViewOnLoad");
+
+ let scrollMode = _app_options.AppOptions.get("scrollModeOnLoad");
+
+ let spreadMode = _app_options.AppOptions.get("spreadModeOnLoad");
+
+ if (values.page && viewOnLoad !== ViewOnLoad.INITIAL) {
+ hash = `page=${values.page}&zoom=${zoom || values.zoom},` + `${values.scrollLeft},${values.scrollTop}`;
+ rotation = parseInt(values.rotation, 10);
+
+ if (sidebarView === _pdf_sidebar.SidebarView.UNKNOWN) {
+ sidebarView = values.sidebarView | 0;
+ }
+
+ if (scrollMode === _ui_utils.ScrollMode.UNKNOWN) {
+ scrollMode = values.scrollMode | 0;
+ }
+
+ if (spreadMode === _ui_utils.SpreadMode.UNKNOWN) {
+ spreadMode = values.spreadMode | 0;
+ }
+ }
+
+ if (pageMode && sidebarView === _pdf_sidebar.SidebarView.UNKNOWN) {
+ sidebarView = apiPageModeToSidebarView(pageMode);
+ }
+
+ if (pageLayout && spreadMode === _ui_utils.SpreadMode.UNKNOWN) {
+ spreadMode = apiPageLayoutToSpreadMode(pageLayout);
+ }
+
+ this.setInitialView(hash, {
+ rotation,
+ sidebarView,
+ scrollMode,
+ spreadMode
+ });
+ this.eventBus.dispatch("documentinit", {
+ source: this
+ });
+
+ if (!this.isViewerEmbedded) {
+ pdfViewer.focus();
+ }
+
+ await Promise.race([pagesPromise, new Promise(resolve => {
+ setTimeout(resolve, FORCE_PAGES_LOADED_TIMEOUT);
+ })]);
+
+ if (!initialBookmark && !hash) {
+ return;
+ }
+
+ if (pdfViewer.hasEqualPageSizes) {
+ return;
+ }
+
+ this.initialBookmark = initialBookmark;
+ pdfViewer.currentScaleValue = pdfViewer.currentScaleValue;
+ this.setInitialView(hash);
+ }).catch(() => {
+ this.setInitialView();
+ }).then(function () {
+ pdfViewer.update();
+ });
+ });
+ pdfDocument.getPageLabels().then(labels => {
+ if (!labels || _app_options.AppOptions.get("disablePageLabels")) {
+ return;
+ }
+
+ const numLabels = labels.length;
+
+ if (numLabels !== this.pagesCount) {
+ console.error("The number of Page Labels does not match " + "the number of pages in the document.");
+ return;
+ }
+
+ let i = 0;
+
+ while (i < numLabels && labels[i] === (i + 1).toString()) {
+ i++;
+ }
+
+ if (i === numLabels) {
+ return;
+ }
+
+ pdfViewer.setPageLabels(labels);
+ pdfThumbnailViewer.setPageLabels(labels);
+ this.toolbar.setPagesCount(pdfDocument.numPages, true);
+ this.toolbar.setPageNumber(pdfViewer.currentPageNumber, pdfViewer.currentPageLabel);
+ });
+ pagesPromise.then(async () => {
+ const [openAction, javaScript] = await Promise.all([openActionPromise, pdfDocument.getJavaScript()]);
+ let triggerAutoPrint = false;
+
+ if (openAction && openAction.action === "Print") {
+ triggerAutoPrint = true;
+ }
+
+ if (javaScript) {
+ javaScript.some(js => {
+ if (!js) {
+ return false;
+ }
+
+ console.warn("Warning: JavaScript is not supported");
+ this.fallback(_pdfjsLib.UNSUPPORTED_FEATURES.javaScript);
+ return true;
+ });
+
+ if (!triggerAutoPrint) {
+ for (const js of javaScript) {
+ if (js && _ui_utils.AutoPrintRegExp.test(js)) {
+ triggerAutoPrint = true;
+ break;
+ }
+ }
+ }
+ }
+
+ if (!this.supportsPrinting) {
+ return;
+ }
+
+ if (triggerAutoPrint) {
+ setTimeout(function () {
+ window.print();
+ });
+ }
+ });
+ onePageRendered.then(() => {
+ pdfDocument.getOutline().then(outline => {
+ this.pdfOutlineViewer.render({
+ outline
+ });
+ });
+ pdfDocument.getAttachments().then(attachments => {
+ this.pdfAttachmentViewer.render({
+ attachments
+ });
+ });
+ });
+ pdfDocument.getMetadata().then(({
+ info,
+ metadata,
+ contentDispositionFilename
+ }) => {
+ this.documentInfo = info;
+ this.metadata = metadata;
+ this.contentDispositionFilename = contentDispositionFilename;
+ console.log("PDF " + pdfDocument.fingerprint + " [" + info.PDFFormatVersion + " " + (info.Producer || "-").trim() + " / " + (info.Creator || "-").trim() + "]" + " (PDF.js: " + (_pdfjsLib.version || "-") + (_app_options.AppOptions.get("enableWebGL") ? " [WebGL]" : "") + ")");
+ let pdfTitle;
+ const infoTitle = info && info["Title"];
+
+ if (infoTitle) {
+ pdfTitle = infoTitle;
+ }
+
+ const metadataTitle = metadata && metadata.get("dc:title");
+
+ if (metadataTitle) {
+ if (metadataTitle !== "Untitled" && !/[\uFFF0-\uFFFF]/g.test(metadataTitle)) {
+ pdfTitle = metadataTitle;
+ }
+ }
+
+ if (pdfTitle) {
+ this.setTitle(`${pdfTitle} - ${contentDispositionFilename || document.title}`);
+ } else if (contentDispositionFilename) {
+ this.setTitle(contentDispositionFilename);
+ }
+
+ if (info.IsAcroFormPresent) {
+ console.warn("Warning: AcroForm/XFA is not supported");
+ this.fallback(_pdfjsLib.UNSUPPORTED_FEATURES.forms);
+ }
+
+ let versionId = "other";
+ const KNOWN_VERSIONS = ["1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "2.0", "2.1", "2.2", "2.3"];
+
+ if (KNOWN_VERSIONS.includes(info.PDFFormatVersion)) {
+ versionId = `v${info.PDFFormatVersion.replace(".", "_")}`;
+ }
+
+ let generatorId = "other";
+ const KNOWN_GENERATORS = ["acrobat distiller", "acrobat pdfwriter", "adobe livecycle", "adobe pdf library", "adobe photoshop", "ghostscript", "tcpdf", "cairo", "dvipdfm", "dvips", "pdftex", "pdfkit", "itext", "prince", "quarkxpress", "mac os x", "microsoft", "openoffice", "oracle", "luradocument", "pdf-xchange", "antenna house", "aspose.cells", "fpdf"];
+
+ if (info.Producer) {
+ const producer = info.Producer.toLowerCase();
+ KNOWN_GENERATORS.some(function (generator) {
+ if (!producer.includes(generator)) {
+ return false;
+ }
+
+ generatorId = generator.replace(/[ .\-]/g, "_");
+ return true;
+ });
+ }
+
+ let formType = null;
+
+ if (info.IsAcroFormPresent) {
+ formType = info.IsXFAPresent ? "xfa" : "acroform";
+ }
+
+ this.externalServices.reportTelemetry({
+ type: "documentInfo",
+ version: versionId,
+ generator: generatorId,
+ formType
+ });
+ });
+ },
+
+ _initializePdfHistory({
+ fingerprint,
+ viewOnLoad,
+ initialDest = null
+ }) {
+ if (_app_options.AppOptions.get("disableHistory") || this.isViewerEmbedded) {
+ return;
+ }
+
+ this.pdfHistory.initialize({
+ fingerprint,
+ resetHistory: viewOnLoad === ViewOnLoad.INITIAL,
+ updateUrl: _app_options.AppOptions.get("historyUpdateUrl")
+ });
+
+ if (this.pdfHistory.initialBookmark) {
+ this.initialBookmark = this.pdfHistory.initialBookmark;
+ this.initialRotation = this.pdfHistory.initialRotation;
+ }
+
+ if (initialDest && !this.initialBookmark && viewOnLoad === ViewOnLoad.UNKNOWN) {
+ this.initialBookmark = JSON.stringify(initialDest);
+ this.pdfHistory.push({
+ explicitDest: initialDest,
+ pageNumber: null
+ });
+ }
+ },
+
+ setInitialView(storedHash, {
+ rotation,
+ sidebarView,
+ scrollMode,
+ spreadMode
+ } = {}) {
+ const setRotation = angle => {
+ if ((0, _ui_utils.isValidRotation)(angle)) {
+ this.pdfViewer.pagesRotation = angle;
+ }
+ };
+
+ const setViewerModes = (scroll, spread) => {
+ if ((0, _ui_utils.isValidScrollMode)(scroll)) {
+ this.pdfViewer.scrollMode = scroll;
+ }
+
+ if ((0, _ui_utils.isValidSpreadMode)(spread)) {
+ this.pdfViewer.spreadMode = spread;
+ }
+ };
+
+ this.isInitialViewSet = true;
+ this.pdfSidebar.setInitialView(sidebarView);
+ setViewerModes(scrollMode, spreadMode);
+
+ if (this.initialBookmark) {
+ setRotation(this.initialRotation);
+ delete this.initialRotation;
+ this.pdfLinkService.setHash(this.initialBookmark);
+ this.initialBookmark = null;
+ } else if (storedHash) {
+ setRotation(rotation);
+ this.pdfLinkService.setHash(storedHash);
+ }
+
+ this.toolbar.setPageNumber(this.pdfViewer.currentPageNumber, this.pdfViewer.currentPageLabel);
+ this.secondaryToolbar.setPageNumber(this.pdfViewer.currentPageNumber);
+
+ if (!this.pdfViewer.currentScaleValue) {
+ this.pdfViewer.currentScaleValue = _ui_utils.DEFAULT_SCALE_VALUE;
+ }
+ },
+
+ cleanup() {
+ if (!this.pdfDocument) {
+ return;
+ }
+
+ this.pdfViewer.cleanup();
+ this.pdfThumbnailViewer.cleanup();
+
+ if (this.pdfViewer.renderer !== _ui_utils.RendererType.SVG) {
+ this.pdfDocument.cleanup();
+ }
+ },
+
+ forceRendering() {
+ this.pdfRenderingQueue.printing = this.printing;
+ this.pdfRenderingQueue.isThumbnailViewEnabled = this.pdfSidebar.isThumbnailViewVisible;
+ this.pdfRenderingQueue.renderHighestPriority();
+ },
+
+ beforePrint() {
+ if (this.printService) {
+ return;
+ }
+
+ if (!this.supportsPrinting) {
+ this.l10n.get("printing_not_supported", null, "Warning: Printing is not fully supported by this browser.").then(printMessage => {
+ this.error(printMessage);
+ });
+ return;
+ }
+
+ if (!this.pdfViewer.pageViewsReady) {
+ this.l10n.get("printing_not_ready", null, "Warning: The PDF is not fully loaded for printing.").then(notReadyMessage => {
+ window.alert(notReadyMessage);
+ });
+ return;
+ }
+
+ const pagesOverview = this.pdfViewer.getPagesOverview();
+ const printContainer = this.appConfig.printContainer;
+ const printService = PDFPrintServiceFactory.instance.createPrintService(this.pdfDocument, pagesOverview, printContainer, this.l10n);
+ this.printService = printService;
+ this.forceRendering();
+ printService.layout();
+ this.externalServices.reportTelemetry({
+ type: "print"
+ });
+ },
+
+ afterPrint() {
+ if (this.printService) {
+ this.printService.destroy();
+ this.printService = null;
+ }
+
+ this.forceRendering();
+ },
+
+ rotatePages(delta) {
+ if (!this.pdfDocument) {
+ return;
+ }
+
+ const newRotation = (this.pdfViewer.pagesRotation + 360 + delta) % 360;
+ this.pdfViewer.pagesRotation = newRotation;
+ },
+
+ requestPresentationMode() {
+ if (!this.pdfPresentationMode) {
+ return;
+ }
+
+ this.pdfPresentationMode.request();
+ },
+
+ bindEvents() {
+ const {
+ eventBus,
+ _boundEvents
+ } = this;
+ _boundEvents.beforePrint = this.beforePrint.bind(this);
+ _boundEvents.afterPrint = this.afterPrint.bind(this);
+
+ eventBus._on("resize", webViewerResize);
+
+ eventBus._on("hashchange", webViewerHashchange);
+
+ eventBus._on("beforeprint", _boundEvents.beforePrint);
+
+ eventBus._on("afterprint", _boundEvents.afterPrint);
+
+ eventBus._on("pagerendered", webViewerPageRendered);
+
+ eventBus._on("updateviewarea", webViewerUpdateViewarea);
+
+ eventBus._on("pagechanging", webViewerPageChanging);
+
+ eventBus._on("scalechanging", webViewerScaleChanging);
+
+ eventBus._on("rotationchanging", webViewerRotationChanging);
+
+ eventBus._on("sidebarviewchanged", webViewerSidebarViewChanged);
+
+ eventBus._on("pagemode", webViewerPageMode);
+
+ eventBus._on("namedaction", webViewerNamedAction);
+
+ eventBus._on("presentationmodechanged", webViewerPresentationModeChanged);
+
+ eventBus._on("presentationmode", webViewerPresentationMode);
+
+ eventBus._on("print", webViewerPrint);
+
+ eventBus._on("download", webViewerDownload);
+
+ eventBus._on("firstpage", webViewerFirstPage);
+
+ eventBus._on("lastpage", webViewerLastPage);
+
+ eventBus._on("nextpage", webViewerNextPage);
+
+ eventBus._on("previouspage", webViewerPreviousPage);
+
+ eventBus._on("zoomin", webViewerZoomIn);
+
+ eventBus._on("zoomout", webViewerZoomOut);
+
+ eventBus._on("zoomreset", webViewerZoomReset);
+
+ eventBus._on("pagenumberchanged", webViewerPageNumberChanged);
+
+ eventBus._on("scalechanged", webViewerScaleChanged);
+
+ eventBus._on("rotatecw", webViewerRotateCw);
+
+ eventBus._on("rotateccw", webViewerRotateCcw);
+
+ eventBus._on("switchscrollmode", webViewerSwitchScrollMode);
+
+ eventBus._on("scrollmodechanged", webViewerScrollModeChanged);
+
+ eventBus._on("switchspreadmode", webViewerSwitchSpreadMode);
+
+ eventBus._on("spreadmodechanged", webViewerSpreadModeChanged);
+
+ eventBus._on("documentproperties", webViewerDocumentProperties);
+
+ eventBus._on("find", webViewerFind);
+
+ eventBus._on("findfromurlhash", webViewerFindFromUrlHash);
+
+ eventBus._on("updatefindmatchescount", webViewerUpdateFindMatchesCount);
+
+ eventBus._on("updatefindcontrolstate", webViewerUpdateFindControlState);
+
+ eventBus._on("fileinputchange", webViewerFileInputChange);
+
+ eventBus._on("openfile", webViewerOpenFile);
+ },
+
+ bindWindowEvents() {
+ const {
+ eventBus,
+ _boundEvents
+ } = this;
+
+ _boundEvents.windowResize = () => {
+ eventBus.dispatch("resize", {
+ source: window
+ });
+ };
+
+ _boundEvents.windowHashChange = () => {
+ eventBus.dispatch("hashchange", {
+ source: window,
+ hash: document.location.hash.substring(1)
+ });
+ };
+
+ _boundEvents.windowBeforePrint = () => {
+ eventBus.dispatch("beforeprint", {
+ source: window
+ });
+ };
+
+ _boundEvents.windowAfterPrint = () => {
+ eventBus.dispatch("afterprint", {
+ source: window
+ });
+ };
+
+ window.addEventListener("visibilitychange", webViewerVisibilityChange);
+ window.addEventListener("wheel", webViewerWheel, {
+ passive: false
+ });
+ window.addEventListener("click", webViewerClick);
+ window.addEventListener("keydown", webViewerKeyDown);
+ window.addEventListener("resize", _boundEvents.windowResize);
+ window.addEventListener("hashchange", _boundEvents.windowHashChange);
+ window.addEventListener("beforeprint", _boundEvents.windowBeforePrint);
+ window.addEventListener("afterprint", _boundEvents.windowAfterPrint);
+ },
+
+ unbindEvents() {
+ const {
+ eventBus,
+ _boundEvents
+ } = this;
+
+ eventBus._off("resize", webViewerResize);
+
+ eventBus._off("hashchange", webViewerHashchange);
+
+ eventBus._off("beforeprint", _boundEvents.beforePrint);
+
+ eventBus._off("afterprint", _boundEvents.afterPrint);
+
+ eventBus._off("pagerendered", webViewerPageRendered);
+
+ eventBus._off("updateviewarea", webViewerUpdateViewarea);
+
+ eventBus._off("pagechanging", webViewerPageChanging);
+
+ eventBus._off("scalechanging", webViewerScaleChanging);
+
+ eventBus._off("rotationchanging", webViewerRotationChanging);
+
+ eventBus._off("sidebarviewchanged", webViewerSidebarViewChanged);
+
+ eventBus._off("pagemode", webViewerPageMode);
+
+ eventBus._off("namedaction", webViewerNamedAction);
+
+ eventBus._off("presentationmodechanged", webViewerPresentationModeChanged);
+
+ eventBus._off("presentationmode", webViewerPresentationMode);
+
+ eventBus._off("print", webViewerPrint);
+
+ eventBus._off("download", webViewerDownload);
+
+ eventBus._off("firstpage", webViewerFirstPage);
+
+ eventBus._off("lastpage", webViewerLastPage);
+
+ eventBus._off("nextpage", webViewerNextPage);
+
+ eventBus._off("previouspage", webViewerPreviousPage);
+
+ eventBus._off("zoomin", webViewerZoomIn);
+
+ eventBus._off("zoomout", webViewerZoomOut);
+
+ eventBus._off("zoomreset", webViewerZoomReset);
+
+ eventBus._off("pagenumberchanged", webViewerPageNumberChanged);
+
+ eventBus._off("scalechanged", webViewerScaleChanged);
+
+ eventBus._off("rotatecw", webViewerRotateCw);
+
+ eventBus._off("rotateccw", webViewerRotateCcw);
+
+ eventBus._off("switchscrollmode", webViewerSwitchScrollMode);
+
+ eventBus._off("scrollmodechanged", webViewerScrollModeChanged);
+
+ eventBus._off("switchspreadmode", webViewerSwitchSpreadMode);
+
+ eventBus._off("spreadmodechanged", webViewerSpreadModeChanged);
+
+ eventBus._off("documentproperties", webViewerDocumentProperties);
+
+ eventBus._off("find", webViewerFind);
+
+ eventBus._off("findfromurlhash", webViewerFindFromUrlHash);
+
+ eventBus._off("updatefindmatchescount", webViewerUpdateFindMatchesCount);
+
+ eventBus._off("updatefindcontrolstate", webViewerUpdateFindControlState);
+
+ eventBus._off("fileinputchange", webViewerFileInputChange);
+
+ eventBus._off("openfile", webViewerOpenFile);
+
+ _boundEvents.beforePrint = null;
+ _boundEvents.afterPrint = null;
+ },
+
+ unbindWindowEvents() {
+ const {
+ _boundEvents
+ } = this;
+ window.removeEventListener("visibilitychange", webViewerVisibilityChange);
+ window.removeEventListener("wheel", webViewerWheel);
+ window.removeEventListener("click", webViewerClick);
+ window.removeEventListener("keydown", webViewerKeyDown);
+ window.removeEventListener("resize", _boundEvents.windowResize);
+ window.removeEventListener("hashchange", _boundEvents.windowHashChange);
+ window.removeEventListener("beforeprint", _boundEvents.windowBeforePrint);
+ window.removeEventListener("afterprint", _boundEvents.windowAfterPrint);
+ _boundEvents.windowResize = null;
+ _boundEvents.windowHashChange = null;
+ _boundEvents.windowBeforePrint = null;
+ _boundEvents.windowAfterPrint = null;
+ }
+
+};
+exports.PDFViewerApplication = PDFViewerApplication;
+let validateFileURL;
+{
+ const HOSTED_VIEWER_ORIGINS = ["null", "http://mozilla.github.io", "https://mozilla.github.io"];
+
+ validateFileURL = function (file) {
+ if (file === undefined) {
+ return;
+ }
+
+ try {
+ const viewerOrigin = new URL(window.location.href).origin || "null";
+
+ if (HOSTED_VIEWER_ORIGINS.includes(viewerOrigin)) {
+ return;
+ }
+
+ const {
+ origin,
+ protocol
+ } = new URL(file, window.location.href);
+
+ if (origin !== viewerOrigin && protocol !== "blob:") {
+ throw new Error("file origin does not match viewer's");
+ }
+ } catch (ex) {
+ const message = ex && ex.message;
+ PDFViewerApplication.l10n.get("loading_error", null, "An error occurred while loading the PDF.").then(loadingErrorMessage => {
+ PDFViewerApplication.error(loadingErrorMessage, {
+ message
+ });
+ });
+ throw ex;
+ }
+ };
+}
+
+async function loadFakeWorker() {
+ if (!_pdfjsLib.GlobalWorkerOptions.workerSrc) {
+ _pdfjsLib.GlobalWorkerOptions.workerSrc = _app_options.AppOptions.get("workerSrc");
+ }
+
+ return (0, _pdfjsLib.loadScript)(_pdfjsLib.PDFWorker.getWorkerSrc());
+}
+
+function loadAndEnablePDFBug(enabledTabs) {
+ const appConfig = PDFViewerApplication.appConfig;
+ return (0, _pdfjsLib.loadScript)(appConfig.debuggerScriptPath).then(function () {
+ PDFBug.enable(enabledTabs);
+ PDFBug.init({
+ OPS: _pdfjsLib.OPS
+ }, appConfig.mainContainer);
+ });
+}
+
+function webViewerInitialized() {
+ const appConfig = PDFViewerApplication.appConfig;
+ let file;
+ const queryString = document.location.search.substring(1);
+ const params = (0, _ui_utils.parseQueryString)(queryString);
+ file = "file" in params ? params.file : _app_options.AppOptions.get("defaultUrl");
+ validateFileURL(file);
+ const fileInput = document.createElement("input");
+ fileInput.id = appConfig.openFileInputName;
+ fileInput.className = "fileInput";
+ fileInput.setAttribute("type", "file");
+ fileInput.oncontextmenu = _ui_utils.noContextMenuHandler;
+ document.body.appendChild(fileInput);
+
+ if (!window.File || !window.FileReader || !window.FileList || !window.Blob) {
+ appConfig.toolbar.openFile.setAttribute("hidden", "true");
+ appConfig.secondaryToolbar.openFileButton.setAttribute("hidden", "true");
+ } else {
+ fileInput.value = null;
+ }
+
+ fileInput.addEventListener("change", function (evt) {
+ const files = evt.target.files;
+
+ if (!files || files.length === 0) {
+ return;
+ }
+
+ PDFViewerApplication.eventBus.dispatch("fileinputchange", {
+ source: this,
+ fileInput: evt.target
+ });
+ });
+ appConfig.mainContainer.addEventListener("dragover", function (evt) {
+ evt.preventDefault();
+ evt.dataTransfer.dropEffect = "move";
+ });
+ appConfig.mainContainer.addEventListener("drop", function (evt) {
+ evt.preventDefault();
+ const files = evt.dataTransfer.files;
+
+ if (!files || files.length === 0) {
+ return;
+ }
+
+ PDFViewerApplication.eventBus.dispatch("fileinputchange", {
+ source: this,
+ fileInput: evt.dataTransfer
+ });
+ });
+
+ if (!PDFViewerApplication.supportsDocumentFonts) {
+ _app_options.AppOptions.set("disableFontFace", true);
+
+ PDFViewerApplication.l10n.get("web_fonts_disabled", null, "Web fonts are disabled: unable to use embedded PDF fonts.").then(msg => {
+ console.warn(msg);
+ });
+ }
+
+ if (!PDFViewerApplication.supportsPrinting) {
+ appConfig.toolbar.print.classList.add("hidden");
+ appConfig.secondaryToolbar.printButton.classList.add("hidden");
+ }
+
+ if (!PDFViewerApplication.supportsFullscreen) {
+ appConfig.toolbar.presentationModeButton.classList.add("hidden");
+ appConfig.secondaryToolbar.presentationModeButton.classList.add("hidden");
+ }
+
+ if (PDFViewerApplication.supportsIntegratedFind) {
+ appConfig.toolbar.viewFind.classList.add("hidden");
+ }
+
+ appConfig.mainContainer.addEventListener("transitionend", function (evt) {
+ if (evt.target === this) {
+ PDFViewerApplication.eventBus.dispatch("resize", {
+ source: this
+ });
+ }
+ }, true);
+
+ try {
+ webViewerOpenFileViaURL(file);
+ } catch (reason) {
+ PDFViewerApplication.l10n.get("loading_error", null, "An error occurred while loading the PDF.").then(msg => {
+ PDFViewerApplication.error(msg, reason);
+ });
+ }
+}
+
+let webViewerOpenFileViaURL;
+{
+ webViewerOpenFileViaURL = function (file) {
+ if (file && file.lastIndexOf("file:", 0) === 0) {
+ PDFViewerApplication.setTitleUsingUrl(file);
+ const xhr = new XMLHttpRequest();
+
+ xhr.onload = function () {
+ PDFViewerApplication.open(new Uint8Array(xhr.response));
+ };
+
+ xhr.open("GET", file);
+ xhr.responseType = "arraybuffer";
+ xhr.send();
+ return;
+ }
+
+ if (file) {
+ PDFViewerApplication.open(file);
+ }
+ };
+}
+
+function webViewerPageRendered(evt) {
+ const pageNumber = evt.pageNumber;
+ const pageIndex = pageNumber - 1;
+ const pageView = PDFViewerApplication.pdfViewer.getPageView(pageIndex);
+
+ if (pageNumber === PDFViewerApplication.page) {
+ PDFViewerApplication.toolbar.updateLoadingIndicatorState(false);
+ }
+
+ if (!pageView) {
+ return;
+ }
+
+ if (PDFViewerApplication.pdfSidebar.isThumbnailViewVisible) {
+ const thumbnailView = PDFViewerApplication.pdfThumbnailViewer.getThumbnail(pageIndex);
+ thumbnailView.setImage(pageView);
+ }
+
+ if (typeof Stats !== "undefined" && Stats.enabled && pageView.stats) {
+ Stats.add(pageNumber, pageView.stats);
+ }
+
+ if (pageView.error) {
+ PDFViewerApplication.l10n.get("rendering_error", null, "An error occurred while rendering the page.").then(msg => {
+ PDFViewerApplication.error(msg, pageView.error);
+ });
+ }
+
+ PDFViewerApplication.externalServices.reportTelemetry({
+ type: "pageInfo",
+ timestamp: evt.timestamp
+ });
+ PDFViewerApplication.pdfDocument.getStats().then(function (stats) {
+ PDFViewerApplication.externalServices.reportTelemetry({
+ type: "documentStats",
+ stats
+ });
+ });
+}
+
+function webViewerPageMode({
+ mode
+}) {
+ let view;
+
+ switch (mode) {
+ case "thumbs":
+ view = _pdf_sidebar.SidebarView.THUMBS;
+ break;
+
+ case "bookmarks":
+ case "outline":
+ view = _pdf_sidebar.SidebarView.OUTLINE;
+ break;
+
+ case "attachments":
+ view = _pdf_sidebar.SidebarView.ATTACHMENTS;
+ break;
+
+ case "none":
+ view = _pdf_sidebar.SidebarView.NONE;
+ break;
+
+ default:
+ console.error('Invalid "pagemode" hash parameter: ' + mode);
+ return;
+ }
+
+ PDFViewerApplication.pdfSidebar.switchView(view, true);
+}
+
+function webViewerNamedAction(evt) {
+ const action = evt.action;
+
+ switch (action) {
+ case "GoToPage":
+ PDFViewerApplication.appConfig.toolbar.pageNumber.select();
+ break;
+
+ case "Find":
+ if (!PDFViewerApplication.supportsIntegratedFind) {
+ PDFViewerApplication.findBar.toggle();
+ }
+
+ break;
+ }
+}
+
+function webViewerPresentationModeChanged({
+ active,
+ switchInProgress
+}) {
+ let state = _ui_utils.PresentationModeState.NORMAL;
+
+ if (switchInProgress) {
+ state = _ui_utils.PresentationModeState.CHANGING;
+ } else if (active) {
+ state = _ui_utils.PresentationModeState.FULLSCREEN;
+ }
+
+ PDFViewerApplication.pdfViewer.presentationModeState = state;
+}
+
+function webViewerSidebarViewChanged(evt) {
+ PDFViewerApplication.pdfRenderingQueue.isThumbnailViewEnabled = PDFViewerApplication.pdfSidebar.isThumbnailViewVisible;
+ const store = PDFViewerApplication.store;
+
+ if (store && PDFViewerApplication.isInitialViewSet) {
+ store.set("sidebarView", evt.view).catch(function () {});
+ }
+}
+
+function webViewerUpdateViewarea(evt) {
+ const location = evt.location,
+ store = PDFViewerApplication.store;
+
+ if (store && PDFViewerApplication.isInitialViewSet) {
+ store.setMultiple({
+ page: location.pageNumber,
+ zoom: location.scale,
+ scrollLeft: location.left,
+ scrollTop: location.top,
+ rotation: location.rotation
+ }).catch(function () {});
+ }
+
+ const href = PDFViewerApplication.pdfLinkService.getAnchorUrl(location.pdfOpenParams);
+ PDFViewerApplication.appConfig.toolbar.viewBookmark.href = href;
+ PDFViewerApplication.appConfig.secondaryToolbar.viewBookmarkButton.href = href;
+ const currentPage = PDFViewerApplication.pdfViewer.getPageView(PDFViewerApplication.page - 1);
+ const loading = currentPage.renderingState !== _pdf_rendering_queue.RenderingStates.FINISHED;
+ PDFViewerApplication.toolbar.updateLoadingIndicatorState(loading);
+}
+
+function webViewerScrollModeChanged(evt) {
+ const store = PDFViewerApplication.store;
+
+ if (store && PDFViewerApplication.isInitialViewSet) {
+ store.set("scrollMode", evt.mode).catch(function () {});
+ }
+}
+
+function webViewerSpreadModeChanged(evt) {
+ const store = PDFViewerApplication.store;
+
+ if (store && PDFViewerApplication.isInitialViewSet) {
+ store.set("spreadMode", evt.mode).catch(function () {});
+ }
+}
+
+function webViewerResize() {
+ const {
+ pdfDocument,
+ pdfViewer
+ } = PDFViewerApplication;
+
+ if (!pdfDocument) {
+ return;
+ }
+
+ const currentScaleValue = pdfViewer.currentScaleValue;
+
+ if (currentScaleValue === "auto" || currentScaleValue === "page-fit" || currentScaleValue === "page-width") {
+ pdfViewer.currentScaleValue = currentScaleValue;
+ }
+
+ pdfViewer.update();
+}
+
+function webViewerHashchange(evt) {
+ const hash = evt.hash;
+
+ if (!hash) {
+ return;
+ }
+
+ if (!PDFViewerApplication.isInitialViewSet) {
+ PDFViewerApplication.initialBookmark = hash;
+ } else if (!PDFViewerApplication.pdfHistory.popStateInProgress) {
+ PDFViewerApplication.pdfLinkService.setHash(hash);
+ }
+}
+
+let webViewerFileInputChange, webViewerOpenFile;
+{
+ webViewerFileInputChange = function (evt) {
+ if (PDFViewerApplication.pdfViewer && PDFViewerApplication.pdfViewer.isInPresentationMode) {
+ return;
+ }
+
+ const file = evt.fileInput.files[0];
+
+ if (URL.createObjectURL && !_app_options.AppOptions.get("disableCreateObjectURL")) {
+ let url = URL.createObjectURL(file);
+
+ if (file.name) {
+ url = {
+ url,
+ originalUrl: file.name
+ };
+ }
+
+ PDFViewerApplication.open(url);
+ } else {
+ PDFViewerApplication.setTitleUsingUrl(file.name);
+ const fileReader = new FileReader();
+
+ fileReader.onload = function webViewerChangeFileReaderOnload(event) {
+ const buffer = event.target.result;
+ PDFViewerApplication.open(new Uint8Array(buffer));
+ };
+
+ fileReader.readAsArrayBuffer(file);
+ }
+
+ const appConfig = PDFViewerApplication.appConfig;
+ appConfig.toolbar.viewBookmark.setAttribute("hidden", "true");
+ appConfig.secondaryToolbar.viewBookmarkButton.setAttribute("hidden", "true");
+ appConfig.toolbar.download.setAttribute("hidden", "true");
+ appConfig.secondaryToolbar.downloadButton.setAttribute("hidden", "true");
+ };
+
+ webViewerOpenFile = function (evt) {
+ const openFileInputName = PDFViewerApplication.appConfig.openFileInputName;
+ document.getElementById(openFileInputName).click();
+ };
+}
+
+function webViewerPresentationMode() {
+ PDFViewerApplication.requestPresentationMode();
+}
+
+function webViewerPrint() {
+ window.print();
+}
+
+function webViewerDownload() {
+ PDFViewerApplication.download();
+}
+
+function webViewerFirstPage() {
+ if (PDFViewerApplication.pdfDocument) {
+ PDFViewerApplication.page = 1;
+ }
+}
+
+function webViewerLastPage() {
+ if (PDFViewerApplication.pdfDocument) {
+ PDFViewerApplication.page = PDFViewerApplication.pagesCount;
+ }
+}
+
+function webViewerNextPage() {
+ PDFViewerApplication.page++;
+}
+
+function webViewerPreviousPage() {
+ PDFViewerApplication.page--;
+}
+
+function webViewerZoomIn() {
+ PDFViewerApplication.zoomIn();
+}
+
+function webViewerZoomOut() {
+ PDFViewerApplication.zoomOut();
+}
+
+function webViewerZoomReset() {
+ PDFViewerApplication.zoomReset();
+}
+
+function webViewerPageNumberChanged(evt) {
+ const pdfViewer = PDFViewerApplication.pdfViewer;
+
+ if (evt.value !== "") {
+ pdfViewer.currentPageLabel = evt.value;
+ }
+
+ if (evt.value !== pdfViewer.currentPageNumber.toString() && evt.value !== pdfViewer.currentPageLabel) {
+ PDFViewerApplication.toolbar.setPageNumber(pdfViewer.currentPageNumber, pdfViewer.currentPageLabel);
+ }
+}
+
+function webViewerScaleChanged(evt) {
+ PDFViewerApplication.pdfViewer.currentScaleValue = evt.value;
+}
+
+function webViewerRotateCw() {
+ PDFViewerApplication.rotatePages(90);
+}
+
+function webViewerRotateCcw() {
+ PDFViewerApplication.rotatePages(-90);
+}
+
+function webViewerSwitchScrollMode(evt) {
+ PDFViewerApplication.pdfViewer.scrollMode = evt.mode;
+}
+
+function webViewerSwitchSpreadMode(evt) {
+ PDFViewerApplication.pdfViewer.spreadMode = evt.mode;
+}
+
+function webViewerDocumentProperties() {
+ PDFViewerApplication.pdfDocumentProperties.open();
+}
+
+function webViewerFind(evt) {
+ PDFViewerApplication.findController.executeCommand("find" + evt.type, {
+ query: evt.query,
+ phraseSearch: evt.phraseSearch,
+ caseSensitive: evt.caseSensitive,
+ entireWord: evt.entireWord,
+ highlightAll: evt.highlightAll,
+ findPrevious: evt.findPrevious
+ });
+}
+
+function webViewerFindFromUrlHash(evt) {
+ PDFViewerApplication.findController.executeCommand("find", {
+ query: evt.query,
+ phraseSearch: evt.phraseSearch,
+ caseSensitive: false,
+ entireWord: false,
+ highlightAll: true,
+ findPrevious: false
+ });
+}
+
+function webViewerUpdateFindMatchesCount({
+ matchesCount
+}) {
+ if (PDFViewerApplication.supportsIntegratedFind) {
+ PDFViewerApplication.externalServices.updateFindMatchesCount(matchesCount);
+ } else {
+ PDFViewerApplication.findBar.updateResultsCount(matchesCount);
+ }
+}
+
+function webViewerUpdateFindControlState({
+ state,
+ previous,
+ matchesCount
+}) {
+ if (PDFViewerApplication.supportsIntegratedFind) {
+ PDFViewerApplication.externalServices.updateFindControlState({
+ result: state,
+ findPrevious: previous,
+ matchesCount
+ });
+ } else {
+ PDFViewerApplication.findBar.updateUIState(state, previous, matchesCount);
+ }
+}
+
+function webViewerScaleChanging(evt) {
+ PDFViewerApplication.toolbar.setPageScale(evt.presetValue, evt.scale);
+ PDFViewerApplication.pdfViewer.update();
+}
+
+function webViewerRotationChanging(evt) {
+ PDFViewerApplication.pdfThumbnailViewer.pagesRotation = evt.pagesRotation;
+ PDFViewerApplication.forceRendering();
+ PDFViewerApplication.pdfViewer.currentPageNumber = evt.pageNumber;
+}
+
+function webViewerPageChanging(evt) {
+ const page = evt.pageNumber;
+ PDFViewerApplication.toolbar.setPageNumber(page, evt.pageLabel || null);
+ PDFViewerApplication.secondaryToolbar.setPageNumber(page);
+
+ if (PDFViewerApplication.pdfSidebar.isThumbnailViewVisible) {
+ PDFViewerApplication.pdfThumbnailViewer.scrollThumbnailIntoView(page);
+ }
+
+ if (typeof Stats !== "undefined" && Stats.enabled) {
+ const pageView = PDFViewerApplication.pdfViewer.getPageView(page - 1);
+
+ if (pageView && pageView.stats) {
+ Stats.add(page, pageView.stats);
+ }
+ }
+}
+
+function webViewerVisibilityChange(evt) {
+ if (document.visibilityState === "visible") {
+ setZoomDisabledTimeout();
+ }
+}
+
+let zoomDisabledTimeout = null;
+
+function setZoomDisabledTimeout() {
+ if (zoomDisabledTimeout) {
+ clearTimeout(zoomDisabledTimeout);
+ }
+
+ zoomDisabledTimeout = setTimeout(function () {
+ zoomDisabledTimeout = null;
+ }, WHEEL_ZOOM_DISABLED_TIMEOUT);
+}
+
+function webViewerWheel(evt) {
+ const {
+ pdfViewer,
+ supportedMouseWheelZoomModifierKeys
+ } = PDFViewerApplication;
+
+ if (pdfViewer.isInPresentationMode) {
+ return;
+ }
+
+ if (evt.ctrlKey && supportedMouseWheelZoomModifierKeys.ctrlKey || evt.metaKey && supportedMouseWheelZoomModifierKeys.metaKey) {
+ evt.preventDefault();
+
+ if (zoomDisabledTimeout || document.visibilityState === "hidden") {
+ return;
+ }
+
+ const previousScale = pdfViewer.currentScale;
+ const delta = (0, _ui_utils.normalizeWheelEventDelta)(evt);
+ const MOUSE_WHEEL_DELTA_PER_PAGE_SCALE = 3.0;
+ const ticks = delta * MOUSE_WHEEL_DELTA_PER_PAGE_SCALE;
+
+ if (ticks < 0) {
+ PDFViewerApplication.zoomOut(-ticks);
+ } else {
+ PDFViewerApplication.zoomIn(ticks);
+ }
+
+ const currentScale = pdfViewer.currentScale;
+
+ if (previousScale !== currentScale) {
+ const scaleCorrectionFactor = currentScale / previousScale - 1;
+ const rect = pdfViewer.container.getBoundingClientRect();
+ const dx = evt.clientX - rect.left;
+ const dy = evt.clientY - rect.top;
+ pdfViewer.container.scrollLeft += dx * scaleCorrectionFactor;
+ pdfViewer.container.scrollTop += dy * scaleCorrectionFactor;
+ }
+ } else {
+ setZoomDisabledTimeout();
+ }
+}
+
+function webViewerClick(evt) {
+ if (!PDFViewerApplication.secondaryToolbar.isOpen) {
+ return;
+ }
+
+ const appConfig = PDFViewerApplication.appConfig;
+
+ if (PDFViewerApplication.pdfViewer.containsElement(evt.target) || appConfig.toolbar.container.contains(evt.target) && evt.target !== appConfig.secondaryToolbar.toggleButton) {
+ PDFViewerApplication.secondaryToolbar.close();
+ }
+}
+
+function webViewerKeyDown(evt) {
+ if (PDFViewerApplication.overlayManager.active) {
+ return;
+ }
+
+ let handled = false,
+ ensureViewerFocused = false;
+ const cmd = (evt.ctrlKey ? 1 : 0) | (evt.altKey ? 2 : 0) | (evt.shiftKey ? 4 : 0) | (evt.metaKey ? 8 : 0);
+ const pdfViewer = PDFViewerApplication.pdfViewer;
+ const isViewerInPresentationMode = pdfViewer && pdfViewer.isInPresentationMode;
+
+ if (cmd === 1 || cmd === 8 || cmd === 5 || cmd === 12) {
+ switch (evt.keyCode) {
+ case 70:
+ if (!PDFViewerApplication.supportsIntegratedFind) {
+ PDFViewerApplication.findBar.open();
+ handled = true;
+ }
+
+ break;
+
+ case 71:
+ if (!PDFViewerApplication.supportsIntegratedFind) {
+ const findState = PDFViewerApplication.findController.state;
+
+ if (findState) {
+ PDFViewerApplication.findController.executeCommand("findagain", {
+ query: findState.query,
+ phraseSearch: findState.phraseSearch,
+ caseSensitive: findState.caseSensitive,
+ entireWord: findState.entireWord,
+ highlightAll: findState.highlightAll,
+ findPrevious: cmd === 5 || cmd === 12
+ });
+ }
+
+ handled = true;
+ }
+
+ break;
+
+ case 61:
+ case 107:
+ case 187:
+ case 171:
+ if (!isViewerInPresentationMode) {
+ PDFViewerApplication.zoomIn();
+ }
+
+ handled = true;
+ break;
+
+ case 173:
+ case 109:
+ case 189:
+ if (!isViewerInPresentationMode) {
+ PDFViewerApplication.zoomOut();
+ }
+
+ handled = true;
+ break;
+
+ case 48:
+ case 96:
+ if (!isViewerInPresentationMode) {
+ setTimeout(function () {
+ PDFViewerApplication.zoomReset();
+ });
+ handled = false;
+ }
+
+ break;
+
+ case 38:
+ if (isViewerInPresentationMode || PDFViewerApplication.page > 1) {
+ PDFViewerApplication.page = 1;
+ handled = true;
+ ensureViewerFocused = true;
+ }
+
+ break;
+
+ case 40:
+ if (isViewerInPresentationMode || PDFViewerApplication.page < PDFViewerApplication.pagesCount) {
+ PDFViewerApplication.page = PDFViewerApplication.pagesCount;
+ handled = true;
+ ensureViewerFocused = true;
+ }
+
+ break;
+ }
+ }
+
+ if (cmd === 1 || cmd === 8) {
+ switch (evt.keyCode) {
+ case 83:
+ PDFViewerApplication.download();
+ handled = true;
+ break;
+ }
+ }
+
+ if (cmd === 3 || cmd === 10) {
+ switch (evt.keyCode) {
+ case 80:
+ PDFViewerApplication.requestPresentationMode();
+ handled = true;
+ break;
+
+ case 71:
+ PDFViewerApplication.appConfig.toolbar.pageNumber.select();
+ handled = true;
+ break;
+ }
+ }
+
+ if (handled) {
+ if (ensureViewerFocused && !isViewerInPresentationMode) {
+ pdfViewer.focus();
+ }
+
+ evt.preventDefault();
+ return;
+ }
+
+ const curElement = document.activeElement || document.querySelector(":focus");
+ const curElementTagName = curElement && curElement.tagName.toUpperCase();
+
+ if (curElementTagName === "INPUT" || curElementTagName === "TEXTAREA" || curElementTagName === "SELECT" || curElement && curElement.isContentEditable) {
+ if (evt.keyCode !== 27) {
+ return;
+ }
+ }
+
+ if (cmd === 0) {
+ let turnPage = 0,
+ turnOnlyIfPageFit = false;
+
+ switch (evt.keyCode) {
+ case 38:
+ case 33:
+ if (pdfViewer.isVerticalScrollbarEnabled) {
+ turnOnlyIfPageFit = true;
+ }
+
+ turnPage = -1;
+ break;
+
+ case 8:
+ if (!isViewerInPresentationMode) {
+ turnOnlyIfPageFit = true;
+ }
+
+ turnPage = -1;
+ break;
+
+ case 37:
+ if (pdfViewer.isHorizontalScrollbarEnabled) {
+ turnOnlyIfPageFit = true;
+ }
+
+ case 75:
+ case 80:
+ turnPage = -1;
+ break;
+
+ case 27:
+ if (PDFViewerApplication.secondaryToolbar.isOpen) {
+ PDFViewerApplication.secondaryToolbar.close();
+ handled = true;
+ }
+
+ if (!PDFViewerApplication.supportsIntegratedFind && PDFViewerApplication.findBar.opened) {
+ PDFViewerApplication.findBar.close();
+ handled = true;
+ }
+
+ break;
+
+ case 40:
+ case 34:
+ if (pdfViewer.isVerticalScrollbarEnabled) {
+ turnOnlyIfPageFit = true;
+ }
+
+ turnPage = 1;
+ break;
+
+ case 13:
+ case 32:
+ if (!isViewerInPresentationMode) {
+ turnOnlyIfPageFit = true;
+ }
+
+ turnPage = 1;
+ break;
+
+ case 39:
+ if (pdfViewer.isHorizontalScrollbarEnabled) {
+ turnOnlyIfPageFit = true;
+ }
+
+ case 74:
+ case 78:
+ turnPage = 1;
+ break;
+
+ case 36:
+ if (isViewerInPresentationMode || PDFViewerApplication.page > 1) {
+ PDFViewerApplication.page = 1;
+ handled = true;
+ ensureViewerFocused = true;
+ }
+
+ break;
+
+ case 35:
+ if (isViewerInPresentationMode || PDFViewerApplication.page < PDFViewerApplication.pagesCount) {
+ PDFViewerApplication.page = PDFViewerApplication.pagesCount;
+ handled = true;
+ ensureViewerFocused = true;
+ }
+
+ break;
+
+ case 83:
+ PDFViewerApplication.pdfCursorTools.switchTool(_pdf_cursor_tools.CursorTool.SELECT);
+ break;
+
+ case 72:
+ PDFViewerApplication.pdfCursorTools.switchTool(_pdf_cursor_tools.CursorTool.HAND);
+ break;
+
+ case 82:
+ PDFViewerApplication.rotatePages(90);
+ break;
+
+ case 115:
+ PDFViewerApplication.pdfSidebar.toggle();
+ break;
+ }
+
+ if (turnPage !== 0 && (!turnOnlyIfPageFit || pdfViewer.currentScaleValue === "page-fit")) {
+ if (turnPage > 0) {
+ if (PDFViewerApplication.page < PDFViewerApplication.pagesCount) {
+ PDFViewerApplication.page++;
+ }
+ } else {
+ if (PDFViewerApplication.page > 1) {
+ PDFViewerApplication.page--;
+ }
+ }
+
+ handled = true;
+ }
+ }
+
+ if (cmd === 4) {
+ switch (evt.keyCode) {
+ case 13:
+ case 32:
+ if (!isViewerInPresentationMode && pdfViewer.currentScaleValue !== "page-fit") {
+ break;
+ }
+
+ if (PDFViewerApplication.page > 1) {
+ PDFViewerApplication.page--;
+ }
+
+ handled = true;
+ break;
+
+ case 82:
+ PDFViewerApplication.rotatePages(-90);
+ break;
+ }
+ }
+
+ if (!handled && !isViewerInPresentationMode) {
+ if (evt.keyCode >= 33 && evt.keyCode <= 40 || evt.keyCode === 32 && curElementTagName !== "BUTTON") {
+ ensureViewerFocused = true;
+ }
+ }
+
+ if (ensureViewerFocused && !pdfViewer.containsElement(curElement)) {
+ pdfViewer.focus();
+ }
+
+ if (handled) {
+ evt.preventDefault();
+ }
+}
+
+function apiPageLayoutToSpreadMode(layout) {
+ switch (layout) {
+ case "SinglePage":
+ case "OneColumn":
+ return _ui_utils.SpreadMode.NONE;
+
+ case "TwoColumnLeft":
+ case "TwoPageLeft":
+ return _ui_utils.SpreadMode.ODD;
+
+ case "TwoColumnRight":
+ case "TwoPageRight":
+ return _ui_utils.SpreadMode.EVEN;
+ }
+
+ return _ui_utils.SpreadMode.NONE;
+}
+
+function apiPageModeToSidebarView(mode) {
+ switch (mode) {
+ case "UseNone":
+ return _pdf_sidebar.SidebarView.NONE;
+
+ case "UseThumbs":
+ return _pdf_sidebar.SidebarView.THUMBS;
+
+ case "UseOutlines":
+ return _pdf_sidebar.SidebarView.OUTLINE;
+
+ case "UseAttachments":
+ return _pdf_sidebar.SidebarView.ATTACHMENTS;
+
+ case "UseOC":
+ }
+
+ return _pdf_sidebar.SidebarView.NONE;
+}
+
+const PDFPrintServiceFactory = {
+ instance: {
+ supportsPrinting: false,
+
+ createPrintService() {
+ throw new Error("Not implemented: createPrintService");
+ }
+
+ }
+};
+exports.PDFPrintServiceFactory = PDFPrintServiceFactory;
+
+/***/ }),
+/* 2 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.isValidRotation = isValidRotation;
+exports.isValidScrollMode = isValidScrollMode;
+exports.isValidSpreadMode = isValidSpreadMode;
+exports.isPortraitOrientation = isPortraitOrientation;
+exports.getGlobalEventBus = getGlobalEventBus;
+exports.clamp = clamp;
+exports.getPDFFileNameFromURL = getPDFFileNameFromURL;
+exports.noContextMenuHandler = noContextMenuHandler;
+exports.parseQueryString = parseQueryString;
+exports.backtrackBeforeAllVisibleElements = backtrackBeforeAllVisibleElements;
+exports.getVisibleElements = getVisibleElements;
+exports.roundToDivide = roundToDivide;
+exports.getPageSizeInches = getPageSizeInches;
+exports.approximateFraction = approximateFraction;
+exports.getOutputScale = getOutputScale;
+exports.scrollIntoView = scrollIntoView;
+exports.watchScroll = watchScroll;
+exports.binarySearchFirstItem = binarySearchFirstItem;
+exports.normalizeWheelEventDelta = normalizeWheelEventDelta;
+exports.waitOnEventOrTimeout = waitOnEventOrTimeout;
+exports.moveToEndOfArray = moveToEndOfArray;
+exports.WaitOnType = exports.animationStarted = exports.ProgressBar = exports.EventBus = exports.NullL10n = exports.SpreadMode = exports.ScrollMode = exports.TextLayerMode = exports.RendererType = exports.PresentationModeState = exports.VERTICAL_PADDING = exports.SCROLLBAR_PADDING = exports.MAX_AUTO_SCALE = exports.UNKNOWN_SCALE = exports.MAX_SCALE = exports.MIN_SCALE = exports.DEFAULT_SCALE = exports.DEFAULT_SCALE_VALUE = exports.CSS_UNITS = exports.AutoPrintRegExp = void 0;
+const CSS_UNITS = 96.0 / 72.0;
+exports.CSS_UNITS = CSS_UNITS;
+const DEFAULT_SCALE_VALUE = "auto";
+exports.DEFAULT_SCALE_VALUE = DEFAULT_SCALE_VALUE;
+const DEFAULT_SCALE = 1.0;
+exports.DEFAULT_SCALE = DEFAULT_SCALE;
+const MIN_SCALE = 0.1;
+exports.MIN_SCALE = MIN_SCALE;
+const MAX_SCALE = 10.0;
+exports.MAX_SCALE = MAX_SCALE;
+const UNKNOWN_SCALE = 0;
+exports.UNKNOWN_SCALE = UNKNOWN_SCALE;
+const MAX_AUTO_SCALE = 1.25;
+exports.MAX_AUTO_SCALE = MAX_AUTO_SCALE;
+const SCROLLBAR_PADDING = 40;
+exports.SCROLLBAR_PADDING = SCROLLBAR_PADDING;
+const VERTICAL_PADDING = 5;
+exports.VERTICAL_PADDING = VERTICAL_PADDING;
+const PresentationModeState = {
+ UNKNOWN: 0,
+ NORMAL: 1,
+ CHANGING: 2,
+ FULLSCREEN: 3
+};
+exports.PresentationModeState = PresentationModeState;
+const RendererType = {
+ CANVAS: "canvas",
+ SVG: "svg"
+};
+exports.RendererType = RendererType;
+const TextLayerMode = {
+ DISABLE: 0,
+ ENABLE: 1,
+ ENABLE_ENHANCE: 2
+};
+exports.TextLayerMode = TextLayerMode;
+const ScrollMode = {
+ UNKNOWN: -1,
+ VERTICAL: 0,
+ HORIZONTAL: 1,
+ WRAPPED: 2
+};
+exports.ScrollMode = ScrollMode;
+const SpreadMode = {
+ UNKNOWN: -1,
+ NONE: 0,
+ ODD: 1,
+ EVEN: 2
+};
+exports.SpreadMode = SpreadMode;
+const AutoPrintRegExp = /\bprint\s*\(/;
+exports.AutoPrintRegExp = AutoPrintRegExp;
+
+function formatL10nValue(text, args) {
+ if (!args) {
+ return text;
+ }
+
+ return text.replace(/\{\{\s*(\w+)\s*\}\}/g, (all, name) => {
+ return name in args ? args[name] : "{{" + name + "}}";
+ });
+}
+
+const NullL10n = {
+ async getLanguage() {
+ return "en-us";
+ },
+
+ async getDirection() {
+ return "ltr";
+ },
+
+ async get(property, args, fallback) {
+ return formatL10nValue(fallback, args);
+ },
+
+ async translate(element) {}
+
+};
+exports.NullL10n = NullL10n;
+
+function getOutputScale(ctx) {
+ const devicePixelRatio = window.devicePixelRatio || 1;
+ const backingStoreRatio = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1;
+ const pixelRatio = devicePixelRatio / backingStoreRatio;
+ return {
+ sx: pixelRatio,
+ sy: pixelRatio,
+ scaled: pixelRatio !== 1
+ };
+}
+
+function scrollIntoView(element, spot, skipOverflowHiddenElements = false) {
+ let parent = element.offsetParent;
+
+ if (!parent) {
+ console.error("offsetParent is not set -- cannot scroll");
+ return;
+ }
+
+ let offsetY = element.offsetTop + element.clientTop;
+ let offsetX = element.offsetLeft + element.clientLeft;
+
+ while (parent.clientHeight === parent.scrollHeight && parent.clientWidth === parent.scrollWidth || skipOverflowHiddenElements && getComputedStyle(parent).overflow === "hidden") {
+ if (parent.dataset._scaleY) {
+ offsetY /= parent.dataset._scaleY;
+ offsetX /= parent.dataset._scaleX;
+ }
+
+ offsetY += parent.offsetTop;
+ offsetX += parent.offsetLeft;
+ parent = parent.offsetParent;
+
+ if (!parent) {
+ return;
+ }
+ }
+
+ if (spot) {
+ if (spot.top !== undefined) {
+ offsetY += spot.top;
+ }
+
+ if (spot.left !== undefined) {
+ offsetX += spot.left;
+ parent.scrollLeft = offsetX;
+ }
+ }
+
+ parent.scrollTop = offsetY;
+}
+
+function watchScroll(viewAreaElement, callback) {
+ const debounceScroll = function (evt) {
+ if (rAF) {
+ return;
+ }
+
+ rAF = window.requestAnimationFrame(function viewAreaElementScrolled() {
+ rAF = null;
+ const currentX = viewAreaElement.scrollLeft;
+ const lastX = state.lastX;
+
+ if (currentX !== lastX) {
+ state.right = currentX > lastX;
+ }
+
+ state.lastX = currentX;
+ const currentY = viewAreaElement.scrollTop;
+ const lastY = state.lastY;
+
+ if (currentY !== lastY) {
+ state.down = currentY > lastY;
+ }
+
+ state.lastY = currentY;
+ callback(state);
+ });
+ };
+
+ const state = {
+ right: true,
+ down: true,
+ lastX: viewAreaElement.scrollLeft,
+ lastY: viewAreaElement.scrollTop,
+ _eventHandler: debounceScroll
+ };
+ let rAF = null;
+ viewAreaElement.addEventListener("scroll", debounceScroll, true);
+ return state;
+}
+
+function parseQueryString(query) {
+ const parts = query.split("&");
+ const params = Object.create(null);
+
+ for (let i = 0, ii = parts.length; i < ii; ++i) {
+ const param = parts[i].split("=");
+ const key = param[0].toLowerCase();
+ const value = param.length > 1 ? param[1] : null;
+ params[decodeURIComponent(key)] = decodeURIComponent(value);
+ }
+
+ return params;
+}
+
+function binarySearchFirstItem(items, condition) {
+ let minIndex = 0;
+ let maxIndex = items.length - 1;
+
+ if (items.length === 0 || !condition(items[maxIndex])) {
+ return items.length;
+ }
+
+ if (condition(items[minIndex])) {
+ return minIndex;
+ }
+
+ while (minIndex < maxIndex) {
+ const currentIndex = minIndex + maxIndex >> 1;
+ const currentItem = items[currentIndex];
+
+ if (condition(currentItem)) {
+ maxIndex = currentIndex;
+ } else {
+ minIndex = currentIndex + 1;
+ }
+ }
+
+ return minIndex;
+}
+
+function approximateFraction(x) {
+ if (Math.floor(x) === x) {
+ return [x, 1];
+ }
+
+ const xinv = 1 / x;
+ const limit = 8;
+
+ if (xinv > limit) {
+ return [1, limit];
+ } else if (Math.floor(xinv) === xinv) {
+ return [1, xinv];
+ }
+
+ const x_ = x > 1 ? xinv : x;
+ let a = 0,
+ b = 1,
+ c = 1,
+ d = 1;
+
+ while (true) {
+ const p = a + c,
+ q = b + d;
+
+ if (q > limit) {
+ break;
+ }
+
+ if (x_ <= p / q) {
+ c = p;
+ d = q;
+ } else {
+ a = p;
+ b = q;
+ }
+ }
+
+ let result;
+
+ if (x_ - a / b < c / d - x_) {
+ result = x_ === x ? [a, b] : [b, a];
+ } else {
+ result = x_ === x ? [c, d] : [d, c];
+ }
+
+ return result;
+}
+
+function roundToDivide(x, div) {
+ const r = x % div;
+ return r === 0 ? x : Math.round(x - r + div);
+}
+
+function getPageSizeInches({
+ view,
+ userUnit,
+ rotate
+}) {
+ const [x1, y1, x2, y2] = view;
+ const changeOrientation = rotate % 180 !== 0;
+ const width = (x2 - x1) / 72 * userUnit;
+ const height = (y2 - y1) / 72 * userUnit;
+ return {
+ width: changeOrientation ? height : width,
+ height: changeOrientation ? width : height
+ };
+}
+
+function backtrackBeforeAllVisibleElements(index, views, top) {
+ if (index < 2) {
+ return index;
+ }
+
+ let elt = views[index].div;
+ let pageTop = elt.offsetTop + elt.clientTop;
+
+ if (pageTop >= top) {
+ elt = views[index - 1].div;
+ pageTop = elt.offsetTop + elt.clientTop;
+ }
+
+ for (let i = index - 2; i >= 0; --i) {
+ elt = views[i].div;
+
+ if (elt.offsetTop + elt.clientTop + elt.clientHeight <= pageTop) {
+ break;
+ }
+
+ index = i;
+ }
+
+ return index;
+}
+
+function getVisibleElements(scrollEl, views, sortByVisibility = false, horizontal = false) {
+ const top = scrollEl.scrollTop,
+ bottom = top + scrollEl.clientHeight;
+ const left = scrollEl.scrollLeft,
+ right = left + scrollEl.clientWidth;
+
+ function isElementBottomAfterViewTop(view) {
+ const element = view.div;
+ const elementBottom = element.offsetTop + element.clientTop + element.clientHeight;
+ return elementBottom > top;
+ }
+
+ function isElementRightAfterViewLeft(view) {
+ const element = view.div;
+ const elementRight = element.offsetLeft + element.clientLeft + element.clientWidth;
+ return elementRight > left;
+ }
+
+ const visible = [],
+ numViews = views.length;
+ let firstVisibleElementInd = numViews === 0 ? 0 : binarySearchFirstItem(views, horizontal ? isElementRightAfterViewLeft : isElementBottomAfterViewTop);
+
+ if (firstVisibleElementInd > 0 && firstVisibleElementInd < numViews && !horizontal) {
+ firstVisibleElementInd = backtrackBeforeAllVisibleElements(firstVisibleElementInd, views, top);
+ }
+
+ let lastEdge = horizontal ? right : -1;
+
+ for (let i = firstVisibleElementInd; i < numViews; i++) {
+ const view = views[i],
+ element = view.div;
+ const currentWidth = element.offsetLeft + element.clientLeft;
+ const currentHeight = element.offsetTop + element.clientTop;
+ const viewWidth = element.clientWidth,
+ viewHeight = element.clientHeight;
+ const viewRight = currentWidth + viewWidth;
+ const viewBottom = currentHeight + viewHeight;
+
+ if (lastEdge === -1) {
+ if (viewBottom >= bottom) {
+ lastEdge = viewBottom;
+ }
+ } else if ((horizontal ? currentWidth : currentHeight) > lastEdge) {
+ break;
+ }
+
+ if (viewBottom <= top || currentHeight >= bottom || viewRight <= left || currentWidth >= right) {
+ continue;
+ }
+
+ const hiddenHeight = Math.max(0, top - currentHeight) + Math.max(0, viewBottom - bottom);
+ const hiddenWidth = Math.max(0, left - currentWidth) + Math.max(0, viewRight - right);
+ const percent = (viewHeight - hiddenHeight) * (viewWidth - hiddenWidth) * 100 / viewHeight / viewWidth | 0;
+ visible.push({
+ id: view.id,
+ x: currentWidth,
+ y: currentHeight,
+ view,
+ percent
+ });
+ }
+
+ const first = visible[0],
+ last = visible[visible.length - 1];
+
+ if (sortByVisibility) {
+ visible.sort(function (a, b) {
+ const pc = a.percent - b.percent;
+
+ if (Math.abs(pc) > 0.001) {
+ return -pc;
+ }
+
+ return a.id - b.id;
+ });
+ }
+
+ return {
+ first,
+ last,
+ views: visible
+ };
+}
+
+function noContextMenuHandler(evt) {
+ evt.preventDefault();
+}
+
+function isDataSchema(url) {
+ let i = 0;
+ const ii = url.length;
+
+ while (i < ii && url[i].trim() === "") {
+ i++;
+ }
+
+ return url.substring(i, i + 5).toLowerCase() === "data:";
+}
+
+function getPDFFileNameFromURL(url, defaultFilename = "document.pdf") {
+ if (typeof url !== "string") {
+ return defaultFilename;
+ }
+
+ if (isDataSchema(url)) {
+ console.warn("getPDFFileNameFromURL: " + 'ignoring "data:" URL for performance reasons.');
+ return defaultFilename;
+ }
+
+ const reURI = /^(?:(?:[^:]+:)?\/\/[^\/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/;
+ const reFilename = /[^\/?#=]+\.pdf\b(?!.*\.pdf\b)/i;
+ const splitURI = reURI.exec(url);
+ let suggestedFilename = reFilename.exec(splitURI[1]) || reFilename.exec(splitURI[2]) || reFilename.exec(splitURI[3]);
+
+ if (suggestedFilename) {
+ suggestedFilename = suggestedFilename[0];
+
+ if (suggestedFilename.includes("%")) {
+ try {
+ suggestedFilename = reFilename.exec(decodeURIComponent(suggestedFilename))[0];
+ } catch (ex) {}
+ }
+ }
+
+ return suggestedFilename || defaultFilename;
+}
+
+function normalizeWheelEventDelta(evt) {
+ let delta = Math.sqrt(evt.deltaX * evt.deltaX + evt.deltaY * evt.deltaY);
+ const angle = Math.atan2(evt.deltaY, evt.deltaX);
+
+ if (-0.25 * Math.PI < angle && angle < 0.75 * Math.PI) {
+ delta = -delta;
+ }
+
+ const MOUSE_DOM_DELTA_PIXEL_MODE = 0;
+ const MOUSE_DOM_DELTA_LINE_MODE = 1;
+ const MOUSE_PIXELS_PER_LINE = 30;
+ const MOUSE_LINES_PER_PAGE = 30;
+
+ if (evt.deltaMode === MOUSE_DOM_DELTA_PIXEL_MODE) {
+ delta /= MOUSE_PIXELS_PER_LINE * MOUSE_LINES_PER_PAGE;
+ } else if (evt.deltaMode === MOUSE_DOM_DELTA_LINE_MODE) {
+ delta /= MOUSE_LINES_PER_PAGE;
+ }
+
+ return delta;
+}
+
+function isValidRotation(angle) {
+ return Number.isInteger(angle) && angle % 90 === 0;
+}
+
+function isValidScrollMode(mode) {
+ return Number.isInteger(mode) && Object.values(ScrollMode).includes(mode) && mode !== ScrollMode.UNKNOWN;
+}
+
+function isValidSpreadMode(mode) {
+ return Number.isInteger(mode) && Object.values(SpreadMode).includes(mode) && mode !== SpreadMode.UNKNOWN;
+}
+
+function isPortraitOrientation(size) {
+ return size.width <= size.height;
+}
+
+const WaitOnType = {
+ EVENT: "event",
+ TIMEOUT: "timeout"
+};
+exports.WaitOnType = WaitOnType;
+
+function waitOnEventOrTimeout({
+ target,
+ name,
+ delay = 0
+}) {
+ return new Promise(function (resolve, reject) {
+ if (typeof target !== "object" || !(name && typeof name === "string") || !(Number.isInteger(delay) && delay >= 0)) {
+ throw new Error("waitOnEventOrTimeout - invalid parameters.");
+ }
+
+ function handler(type) {
+ if (target instanceof EventBus) {
+ target._off(name, eventHandler);
+ } else {
+ target.removeEventListener(name, eventHandler);
+ }
+
+ if (timeout) {
+ clearTimeout(timeout);
+ }
+
+ resolve(type);
+ }
+
+ const eventHandler = handler.bind(null, WaitOnType.EVENT);
+
+ if (target instanceof EventBus) {
+ target._on(name, eventHandler);
+ } else {
+ target.addEventListener(name, eventHandler);
+ }
+
+ const timeoutHandler = handler.bind(null, WaitOnType.TIMEOUT);
+ const timeout = setTimeout(timeoutHandler, delay);
+ });
+}
+
+const animationStarted = new Promise(function (resolve) {
+ window.requestAnimationFrame(resolve);
+});
+exports.animationStarted = animationStarted;
+
+function dispatchDOMEvent(eventName, args = null) {
+ const details = Object.create(null);
+
+ if (args && args.length > 0) {
+ const obj = args[0];
+
+ for (const key in obj) {
+ const value = obj[key];
+
+ if (key === "source") {
+ if (value === window || value === document) {
+ return;
+ }
+
+ continue;
+ }
+
+ details[key] = value;
+ }
+ }
+
+ const event = document.createEvent("CustomEvent");
+ event.initCustomEvent(eventName, true, true, details);
+ document.dispatchEvent(event);
+}
+
+class EventBus {
+ constructor({
+ dispatchToDOM = false
+ } = {}) {
+ this._listeners = Object.create(null);
+ this._dispatchToDOM = dispatchToDOM === true;
+
+ if (dispatchToDOM) {
+ console.error("The `eventBusDispatchToDOM` option/preference is deprecated, " + "add event listeners to the EventBus instance rather than the DOM.");
+ }
+ }
+
+ on(eventName, listener) {
+ this._on(eventName, listener, {
+ external: true
+ });
+ }
+
+ off(eventName, listener) {
+ this._off(eventName, listener, {
+ external: true
+ });
+ }
+
+ dispatch(eventName) {
+ const eventListeners = this._listeners[eventName];
+
+ if (!eventListeners || eventListeners.length === 0) {
+ if (this._dispatchToDOM) {
+ const args = Array.prototype.slice.call(arguments, 1);
+ dispatchDOMEvent(eventName, args);
+ }
+
+ return;
+ }
+
+ const args = Array.prototype.slice.call(arguments, 1);
+ let externalListeners;
+ eventListeners.slice(0).forEach(function ({
+ listener,
+ external
+ }) {
+ if (external) {
+ if (!externalListeners) {
+ externalListeners = [];
+ }
+
+ externalListeners.push(listener);
+ return;
+ }
+
+ listener.apply(null, args);
+ });
+
+ if (externalListeners) {
+ externalListeners.forEach(function (listener) {
+ listener.apply(null, args);
+ });
+ externalListeners = null;
+ }
+
+ if (this._dispatchToDOM) {
+ dispatchDOMEvent(eventName, args);
+ }
+ }
+
+ _on(eventName, listener, options = null) {
+ let eventListeners = this._listeners[eventName];
+
+ if (!eventListeners) {
+ this._listeners[eventName] = eventListeners = [];
+ }
+
+ eventListeners.push({
+ listener,
+ external: (options && options.external) === true
+ });
+ }
+
+ _off(eventName, listener, options = null) {
+ const eventListeners = this._listeners[eventName];
+
+ if (!eventListeners) {
+ return;
+ }
+
+ for (let i = 0, ii = eventListeners.length; i < ii; i++) {
+ if (eventListeners[i].listener === listener) {
+ eventListeners.splice(i, 1);
+ return;
+ }
+ }
+ }
+
+}
+
+exports.EventBus = EventBus;
+let globalEventBus = null;
+
+function getGlobalEventBus(dispatchToDOM = false) {
+ console.error("getGlobalEventBus is deprecated, use a manually created EventBus instance instead.");
+
+ if (!globalEventBus) {
+ globalEventBus = new EventBus({
+ dispatchToDOM
+ });
+ }
+
+ return globalEventBus;
+}
+
+function clamp(v, min, max) {
+ return Math.min(Math.max(v, min), max);
+}
+
+class ProgressBar {
+ constructor(id, {
+ height,
+ width,
+ units
+ } = {}) {
+ this.visible = true;
+ this.div = document.querySelector(id + " .progress");
+ this.bar = this.div.parentNode;
+ this.height = height || 100;
+ this.width = width || 100;
+ this.units = units || "%";
+ this.div.style.height = this.height + this.units;
+ this.percent = 0;
+ }
+
+ _updateBar() {
+ if (this._indeterminate) {
+ this.div.classList.add("indeterminate");
+ this.div.style.width = this.width + this.units;
+ return;
+ }
+
+ this.div.classList.remove("indeterminate");
+ const progressSize = this.width * this._percent / 100;
+ this.div.style.width = progressSize + this.units;
+ }
+
+ get percent() {
+ return this._percent;
+ }
+
+ set percent(val) {
+ this._indeterminate = isNaN(val);
+ this._percent = clamp(val, 0, 100);
+
+ this._updateBar();
+ }
+
+ setWidth(viewer) {
+ if (!viewer) {
+ return;
+ }
+
+ const container = viewer.parentNode;
+ const scrollbarWidth = container.offsetWidth - viewer.offsetWidth;
+
+ if (scrollbarWidth > 0) {
+ this.bar.style.width = `calc(100% - ${scrollbarWidth}px)`;
+ }
+ }
+
+ hide() {
+ if (!this.visible) {
+ return;
+ }
+
+ this.visible = false;
+ this.bar.classList.add("hidden");
+ document.body.classList.remove("loadingInProgress");
+ }
+
+ show() {
+ if (this.visible) {
+ return;
+ }
+
+ this.visible = true;
+ document.body.classList.add("loadingInProgress");
+ this.bar.classList.remove("hidden");
+ }
+
+}
+
+exports.ProgressBar = ProgressBar;
+
+function moveToEndOfArray(arr, condition) {
+ const moved = [],
+ len = arr.length;
+ let write = 0;
+
+ for (let read = 0; read < len; ++read) {
+ if (condition(arr[read])) {
+ moved.push(arr[read]);
+ } else {
+ arr[write] = arr[read];
+ ++write;
+ }
+ }
+
+ for (let read = 0; write < len; ++read, ++write) {
+ arr[write] = moved[read];
+ }
+}
+
+/***/ }),
+/* 3 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.OptionKind = exports.AppOptions = void 0;
+
+var _pdfjsLib = __webpack_require__(4);
+
+var _viewer_compatibility = __webpack_require__(5);
+
+const OptionKind = {
+ VIEWER: 0x02,
+ API: 0x04,
+ WORKER: 0x08,
+ PREFERENCE: 0x80
+};
+exports.OptionKind = OptionKind;
+const defaultOptions = {
+ cursorToolOnLoad: {
+ value: 0,
+ kind: OptionKind.VIEWER + OptionKind.PREFERENCE
+ },
+ defaultUrl: {
+ value: "compressed.tracemonkey-pldi-09.pdf",
+ kind: OptionKind.VIEWER
+ },
+ defaultZoomValue: {
+ value: "",
+ kind: OptionKind.VIEWER + OptionKind.PREFERENCE
+ },
+ disableHistory: {
+ value: false,
+ kind: OptionKind.VIEWER
+ },
+ disablePageLabels: {
+ value: false,
+ kind: OptionKind.VIEWER + OptionKind.PREFERENCE
+ },
+ enablePrintAutoRotate: {
+ value: false,
+ kind: OptionKind.VIEWER + OptionKind.PREFERENCE
+ },
+ enableWebGL: {
+ value: false,
+ kind: OptionKind.VIEWER + OptionKind.PREFERENCE
+ },
+ eventBusDispatchToDOM: {
+ value: false,
+ kind: OptionKind.VIEWER + OptionKind.PREFERENCE
+ },
+ externalLinkRel: {
+ value: "noopener noreferrer nofollow",
+ kind: OptionKind.VIEWER
+ },
+ externalLinkTarget: {
+ value: 0,
+ kind: OptionKind.VIEWER + OptionKind.PREFERENCE
+ },
+ historyUpdateUrl: {
+ value: false,
+ kind: OptionKind.VIEWER + OptionKind.PREFERENCE
+ },
+ ignoreDestinationZoom: {
+ value: false,
+ kind: OptionKind.VIEWER + OptionKind.PREFERENCE
+ },
+ imageResourcesPath: {
+ value: "./images/",
+ kind: OptionKind.VIEWER
+ },
+ maxCanvasPixels: {
+ value: 16777216,
+ compatibility: _viewer_compatibility.viewerCompatibilityParams.maxCanvasPixels,
+ kind: OptionKind.VIEWER
+ },
+ pdfBugEnabled: {
+ value: false,
+ kind: OptionKind.VIEWER + OptionKind.PREFERENCE
+ },
+ renderer: {
+ value: "canvas",
+ kind: OptionKind.VIEWER + OptionKind.PREFERENCE
+ },
+ renderInteractiveForms: {
+ value: false,
+ kind: OptionKind.VIEWER + OptionKind.PREFERENCE
+ },
+ sidebarViewOnLoad: {
+ value: -1,
+ kind: OptionKind.VIEWER + OptionKind.PREFERENCE
+ },
+ scrollModeOnLoad: {
+ value: -1,
+ kind: OptionKind.VIEWER + OptionKind.PREFERENCE
+ },
+ spreadModeOnLoad: {
+ value: -1,
+ kind: OptionKind.VIEWER + OptionKind.PREFERENCE
+ },
+ textLayerMode: {
+ value: 1,
+ kind: OptionKind.VIEWER + OptionKind.PREFERENCE
+ },
+ useOnlyCssZoom: {
+ value: false,
+ kind: OptionKind.VIEWER + OptionKind.PREFERENCE
+ },
+ viewOnLoad: {
+ value: 0,
+ kind: OptionKind.VIEWER + OptionKind.PREFERENCE
+ },
+ cMapPacked: {
+ value: true,
+ kind: OptionKind.API
+ },
+ cMapUrl: {
+ value: "../web/cmaps/",
+ kind: OptionKind.API
+ },
+ disableAutoFetch: {
+ value: false,
+ kind: OptionKind.API + OptionKind.PREFERENCE
+ },
+ disableCreateObjectURL: {
+ value: false,
+ compatibility: _pdfjsLib.apiCompatibilityParams.disableCreateObjectURL,
+ kind: OptionKind.API
+ },
+ disableFontFace: {
+ value: false,
+ kind: OptionKind.API + OptionKind.PREFERENCE
+ },
+ disableRange: {
+ value: false,
+ kind: OptionKind.API + OptionKind.PREFERENCE
+ },
+ disableStream: {
+ value: false,
+ kind: OptionKind.API + OptionKind.PREFERENCE
+ },
+ docBaseUrl: {
+ value: "",
+ kind: OptionKind.API
+ },
+ isEvalSupported: {
+ value: true,
+ kind: OptionKind.API
+ },
+ maxImageSize: {
+ value: -1,
+ kind: OptionKind.API
+ },
+ pdfBug: {
+ value: false,
+ kind: OptionKind.API
+ },
+ verbosity: {
+ value: 1,
+ kind: OptionKind.API
+ },
+ workerPort: {
+ value: null,
+ kind: OptionKind.WORKER
+ },
+ workerSrc: {
+ value: "../build/pdf.worker.js",
+ kind: OptionKind.WORKER
+ }
+};
+{
+ defaultOptions.disablePreferences = {
+ value: false,
+ kind: OptionKind.VIEWER
+ };
+ defaultOptions.locale = {
+ value: typeof navigator !== "undefined" ? navigator.language : "en-US",
+ kind: OptionKind.VIEWER
+ };
+ defaultOptions.printResolution = {
+ value: 150,
+ kind: OptionKind.VIEWER
+ };
+}
+const userOptions = Object.create(null);
+
+class AppOptions {
+ constructor() {
+ throw new Error("Cannot initialize AppOptions.");
+ }
+
+ static get(name) {
+ const userOption = userOptions[name];
+
+ if (userOption !== undefined) {
+ return userOption;
+ }
+
+ const defaultOption = defaultOptions[name];
+
+ if (defaultOption !== undefined) {
+ return defaultOption.compatibility || defaultOption.value;
+ }
+
+ return undefined;
+ }
+
+ static getAll(kind = null) {
+ const options = Object.create(null);
+
+ for (const name in defaultOptions) {
+ const defaultOption = defaultOptions[name];
+
+ if (kind) {
+ if ((kind & defaultOption.kind) === 0) {
+ continue;
+ }
+
+ if (kind === OptionKind.PREFERENCE) {
+ const value = defaultOption.value,
+ valueType = typeof value;
+
+ if (valueType === "boolean" || valueType === "string" || valueType === "number" && Number.isInteger(value)) {
+ options[name] = value;
+ continue;
+ }
+
+ throw new Error(`Invalid type for preference: ${name}`);
+ }
+ }
+
+ const userOption = userOptions[name];
+ options[name] = userOption !== undefined ? userOption : defaultOption.compatibility || defaultOption.value;
+ }
+
+ return options;
+ }
+
+ static set(name, value) {
+ userOptions[name] = value;
+ }
+
+ static remove(name) {
+ delete userOptions[name];
+ }
+
+}
+
+exports.AppOptions = AppOptions;
+
+/***/ }),
+/* 4 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+let pdfjsLib;
+
+if (typeof window !== "undefined" && window["pdfjs-dist/build/pdf"]) {
+ pdfjsLib = window["pdfjs-dist/build/pdf"];
+} else {
+ pdfjsLib = require("../build/pdf.js");
+}
+
+module.exports = pdfjsLib;
+
+/***/ }),
+/* 5 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+const compatibilityParams = Object.create(null);
+{
+ const userAgent = typeof navigator !== "undefined" && navigator.userAgent || "";
+ const platform = typeof navigator !== "undefined" && navigator.platform || "";
+ const maxTouchPoints = typeof navigator !== "undefined" && navigator.maxTouchPoints || 1;
+ const isAndroid = /Android/.test(userAgent);
+ const isIOS = /\b(iPad|iPhone|iPod)(?=;)/.test(userAgent) || platform === "MacIntel" && maxTouchPoints > 1;
+
+ (function checkCanvasSizeLimitation() {
+ if (isIOS || isAndroid) {
+ compatibilityParams.maxCanvasPixels = 5242880;
+ }
+ })();
+}
+exports.viewerCompatibilityParams = Object.freeze(compatibilityParams);
+
+/***/ }),
+/* 6 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PDFCursorTools = exports.CursorTool = void 0;
+
+var _grab_to_pan = __webpack_require__(7);
+
+const CursorTool = {
+ SELECT: 0,
+ HAND: 1,
+ ZOOM: 2
+};
+exports.CursorTool = CursorTool;
+
+class PDFCursorTools {
+ constructor({
+ container,
+ eventBus,
+ cursorToolOnLoad = CursorTool.SELECT
+ }) {
+ this.container = container;
+ this.eventBus = eventBus;
+ this.active = CursorTool.SELECT;
+ this.activeBeforePresentationMode = null;
+ this.handTool = new _grab_to_pan.GrabToPan({
+ element: this.container
+ });
+
+ this._addEventListeners();
+
+ Promise.resolve().then(() => {
+ this.switchTool(cursorToolOnLoad);
+ });
+ }
+
+ get activeTool() {
+ return this.active;
+ }
+
+ switchTool(tool) {
+ if (this.activeBeforePresentationMode !== null) {
+ return;
+ }
+
+ if (tool === this.active) {
+ return;
+ }
+
+ const disableActiveTool = () => {
+ switch (this.active) {
+ case CursorTool.SELECT:
+ break;
+
+ case CursorTool.HAND:
+ this.handTool.deactivate();
+ break;
+
+ case CursorTool.ZOOM:
+ }
+ };
+
+ switch (tool) {
+ case CursorTool.SELECT:
+ disableActiveTool();
+ break;
+
+ case CursorTool.HAND:
+ disableActiveTool();
+ this.handTool.activate();
+ break;
+
+ case CursorTool.ZOOM:
+ default:
+ console.error(`switchTool: "${tool}" is an unsupported value.`);
+ return;
+ }
+
+ this.active = tool;
+
+ this._dispatchEvent();
+ }
+
+ _dispatchEvent() {
+ this.eventBus.dispatch("cursortoolchanged", {
+ source: this,
+ tool: this.active
+ });
+ }
+
+ _addEventListeners() {
+ this.eventBus._on("switchcursortool", evt => {
+ this.switchTool(evt.tool);
+ });
+
+ this.eventBus._on("presentationmodechanged", evt => {
+ if (evt.switchInProgress) {
+ return;
+ }
+
+ let previouslyActive;
+
+ if (evt.active) {
+ previouslyActive = this.active;
+ this.switchTool(CursorTool.SELECT);
+ this.activeBeforePresentationMode = previouslyActive;
+ } else {
+ previouslyActive = this.activeBeforePresentationMode;
+ this.activeBeforePresentationMode = null;
+ this.switchTool(previouslyActive);
+ }
+ });
+ }
+
+}
+
+exports.PDFCursorTools = PDFCursorTools;
+
+/***/ }),
+/* 7 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.GrabToPan = GrabToPan;
+
+function GrabToPan(options) {
+ this.element = options.element;
+ this.document = options.element.ownerDocument;
+
+ if (typeof options.ignoreTarget === "function") {
+ this.ignoreTarget = options.ignoreTarget;
+ }
+
+ this.onActiveChanged = options.onActiveChanged;
+ this.activate = this.activate.bind(this);
+ this.deactivate = this.deactivate.bind(this);
+ this.toggle = this.toggle.bind(this);
+ this._onmousedown = this._onmousedown.bind(this);
+ this._onmousemove = this._onmousemove.bind(this);
+ this._endPan = this._endPan.bind(this);
+ const overlay = this.overlay = document.createElement("div");
+ overlay.className = "grab-to-pan-grabbing";
+}
+
+GrabToPan.prototype = {
+ CSS_CLASS_GRAB: "grab-to-pan-grab",
+ activate: function GrabToPan_activate() {
+ if (!this.active) {
+ this.active = true;
+ this.element.addEventListener("mousedown", this._onmousedown, true);
+ this.element.classList.add(this.CSS_CLASS_GRAB);
+
+ if (this.onActiveChanged) {
+ this.onActiveChanged(true);
+ }
+ }
+ },
+ deactivate: function GrabToPan_deactivate() {
+ if (this.active) {
+ this.active = false;
+ this.element.removeEventListener("mousedown", this._onmousedown, true);
+
+ this._endPan();
+
+ this.element.classList.remove(this.CSS_CLASS_GRAB);
+
+ if (this.onActiveChanged) {
+ this.onActiveChanged(false);
+ }
+ }
+ },
+ toggle: function GrabToPan_toggle() {
+ if (this.active) {
+ this.deactivate();
+ } else {
+ this.activate();
+ }
+ },
+ ignoreTarget: function GrabToPan_ignoreTarget(node) {
+ return node[matchesSelector]("a[href], a[href] *, input, textarea, button, button *, select, option");
+ },
+ _onmousedown: function GrabToPan__onmousedown(event) {
+ if (event.button !== 0 || this.ignoreTarget(event.target)) {
+ return;
+ }
+
+ if (event.originalTarget) {
+ try {
+ event.originalTarget.tagName;
+ } catch (e) {
+ return;
+ }
+ }
+
+ this.scrollLeftStart = this.element.scrollLeft;
+ this.scrollTopStart = this.element.scrollTop;
+ this.clientXStart = event.clientX;
+ this.clientYStart = event.clientY;
+ this.document.addEventListener("mousemove", this._onmousemove, true);
+ this.document.addEventListener("mouseup", this._endPan, true);
+ this.element.addEventListener("scroll", this._endPan, true);
+ event.preventDefault();
+ event.stopPropagation();
+ const focusedElement = document.activeElement;
+
+ if (focusedElement && !focusedElement.contains(event.target)) {
+ focusedElement.blur();
+ }
+ },
+ _onmousemove: function GrabToPan__onmousemove(event) {
+ this.element.removeEventListener("scroll", this._endPan, true);
+
+ if (isLeftMouseReleased(event)) {
+ this._endPan();
+
+ return;
+ }
+
+ const xDiff = event.clientX - this.clientXStart;
+ const yDiff = event.clientY - this.clientYStart;
+ const scrollTop = this.scrollTopStart - yDiff;
+ const scrollLeft = this.scrollLeftStart - xDiff;
+
+ if (this.element.scrollTo) {
+ this.element.scrollTo({
+ top: scrollTop,
+ left: scrollLeft,
+ behavior: "instant"
+ });
+ } else {
+ this.element.scrollTop = scrollTop;
+ this.element.scrollLeft = scrollLeft;
+ }
+
+ if (!this.overlay.parentNode) {
+ document.body.appendChild(this.overlay);
+ }
+ },
+ _endPan: function GrabToPan__endPan() {
+ this.element.removeEventListener("scroll", this._endPan, true);
+ this.document.removeEventListener("mousemove", this._onmousemove, true);
+ this.document.removeEventListener("mouseup", this._endPan, true);
+ this.overlay.remove();
+ }
+};
+let matchesSelector;
+["webkitM", "mozM", "msM", "oM", "m"].some(function (prefix) {
+ let name = prefix + "atches";
+
+ if (name in document.documentElement) {
+ matchesSelector = name;
+ }
+
+ name += "Selector";
+
+ if (name in document.documentElement) {
+ matchesSelector = name;
+ }
+
+ return matchesSelector;
+});
+const isNotIEorIsIE10plus = !document.documentMode || document.documentMode > 9;
+const chrome = window.chrome;
+const isChrome15OrOpera15plus = chrome && (chrome.webstore || chrome.app);
+const isSafari6plus = /Apple/.test(navigator.vendor) && /Version\/([6-9]\d*|[1-5]\d+)/.test(navigator.userAgent);
+
+function isLeftMouseReleased(event) {
+ if ("buttons" in event && isNotIEorIsIE10plus) {
+ return !(event.buttons & 1);
+ }
+
+ if (isChrome15OrOpera15plus || isSafari6plus) {
+ return event.which === 0;
+ }
+
+ return false;
+}
+
+/***/ }),
+/* 8 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PDFRenderingQueue = exports.RenderingStates = void 0;
+const CLEANUP_TIMEOUT = 30000;
+const RenderingStates = {
+ INITIAL: 0,
+ RUNNING: 1,
+ PAUSED: 2,
+ FINISHED: 3
+};
+exports.RenderingStates = RenderingStates;
+
+class PDFRenderingQueue {
+ constructor() {
+ this.pdfViewer = null;
+ this.pdfThumbnailViewer = null;
+ this.onIdle = null;
+ this.highestPriorityPage = null;
+ this.idleTimeout = null;
+ this.printing = false;
+ this.isThumbnailViewEnabled = false;
+ }
+
+ setViewer(pdfViewer) {
+ this.pdfViewer = pdfViewer;
+ }
+
+ setThumbnailViewer(pdfThumbnailViewer) {
+ this.pdfThumbnailViewer = pdfThumbnailViewer;
+ }
+
+ isHighestPriority(view) {
+ return this.highestPriorityPage === view.renderingId;
+ }
+
+ renderHighestPriority(currentlyVisiblePages) {
+ if (this.idleTimeout) {
+ clearTimeout(this.idleTimeout);
+ this.idleTimeout = null;
+ }
+
+ if (this.pdfViewer.forceRendering(currentlyVisiblePages)) {
+ return;
+ }
+
+ if (this.pdfThumbnailViewer && this.isThumbnailViewEnabled) {
+ if (this.pdfThumbnailViewer.forceRendering()) {
+ return;
+ }
+ }
+
+ if (this.printing) {
+ return;
+ }
+
+ if (this.onIdle) {
+ this.idleTimeout = setTimeout(this.onIdle.bind(this), CLEANUP_TIMEOUT);
+ }
+ }
+
+ getHighestPriority(visible, views, scrolledDown) {
+ const visibleViews = visible.views;
+ const numVisible = visibleViews.length;
+
+ if (numVisible === 0) {
+ return null;
+ }
+
+ for (let i = 0; i < numVisible; ++i) {
+ const view = visibleViews[i].view;
+
+ if (!this.isViewFinished(view)) {
+ return view;
+ }
+ }
+
+ if (scrolledDown) {
+ const nextPageIndex = visible.last.id;
+
+ if (views[nextPageIndex] && !this.isViewFinished(views[nextPageIndex])) {
+ return views[nextPageIndex];
+ }
+ } else {
+ const previousPageIndex = visible.first.id - 2;
+
+ if (views[previousPageIndex] && !this.isViewFinished(views[previousPageIndex])) {
+ return views[previousPageIndex];
+ }
+ }
+
+ return null;
+ }
+
+ isViewFinished(view) {
+ return view.renderingState === RenderingStates.FINISHED;
+ }
+
+ renderView(view) {
+ switch (view.renderingState) {
+ case RenderingStates.FINISHED:
+ return false;
+
+ case RenderingStates.PAUSED:
+ this.highestPriorityPage = view.renderingId;
+ view.resume();
+ break;
+
+ case RenderingStates.RUNNING:
+ this.highestPriorityPage = view.renderingId;
+ break;
+
+ case RenderingStates.INITIAL:
+ this.highestPriorityPage = view.renderingId;
+ view.draw().finally(() => {
+ this.renderHighestPriority();
+ }).catch(reason => {
+ console.error(`renderView: "${reason}"`);
+ });
+ break;
+ }
+
+ return true;
+ }
+
+}
+
+exports.PDFRenderingQueue = PDFRenderingQueue;
+
+/***/ }),
+/* 9 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PDFSidebar = exports.SidebarView = void 0;
+
+var _ui_utils = __webpack_require__(2);
+
+var _pdf_rendering_queue = __webpack_require__(8);
+
+const UI_NOTIFICATION_CLASS = "pdfSidebarNotification";
+const SidebarView = {
+ UNKNOWN: -1,
+ NONE: 0,
+ THUMBS: 1,
+ OUTLINE: 2,
+ ATTACHMENTS: 3,
+ LAYERS: 4
+};
+exports.SidebarView = SidebarView;
+
+class PDFSidebar {
+ constructor({
+ elements,
+ pdfViewer,
+ pdfThumbnailViewer,
+ eventBus,
+ l10n = _ui_utils.NullL10n,
+ disableNotification = false
+ }) {
+ this.isOpen = false;
+ this.active = SidebarView.THUMBS;
+ this.isInitialViewSet = false;
+ this.onToggled = null;
+ this.pdfViewer = pdfViewer;
+ this.pdfThumbnailViewer = pdfThumbnailViewer;
+ this.outerContainer = elements.outerContainer;
+ this.viewerContainer = elements.viewerContainer;
+ this.toggleButton = elements.toggleButton;
+ this.thumbnailButton = elements.thumbnailButton;
+ this.outlineButton = elements.outlineButton;
+ this.attachmentsButton = elements.attachmentsButton;
+ this.thumbnailView = elements.thumbnailView;
+ this.outlineView = elements.outlineView;
+ this.attachmentsView = elements.attachmentsView;
+ this.eventBus = eventBus;
+ this.l10n = l10n;
+ this._disableNotification = disableNotification;
+
+ this._addEventListeners();
+ }
+
+ reset() {
+ this.isInitialViewSet = false;
+
+ this._hideUINotification(null);
+
+ this.switchView(SidebarView.THUMBS);
+ this.outlineButton.disabled = false;
+ this.attachmentsButton.disabled = false;
+ }
+
+ get visibleView() {
+ return this.isOpen ? this.active : SidebarView.NONE;
+ }
+
+ get isThumbnailViewVisible() {
+ return this.isOpen && this.active === SidebarView.THUMBS;
+ }
+
+ get isOutlineViewVisible() {
+ return this.isOpen && this.active === SidebarView.OUTLINE;
+ }
+
+ get isAttachmentsViewVisible() {
+ return this.isOpen && this.active === SidebarView.ATTACHMENTS;
+ }
+
+ setInitialView(view = SidebarView.NONE) {
+ if (this.isInitialViewSet) {
+ return;
+ }
+
+ this.isInitialViewSet = true;
+
+ if (view === SidebarView.NONE || view === SidebarView.UNKNOWN) {
+ this._dispatchEvent();
+
+ return;
+ }
+
+ if (!this._switchView(view, true)) {
+ this._dispatchEvent();
+ }
+ }
+
+ switchView(view, forceOpen = false) {
+ this._switchView(view, forceOpen);
+ }
+
+ _switchView(view, forceOpen = false) {
+ const isViewChanged = view !== this.active;
+ let shouldForceRendering = false;
+
+ switch (view) {
+ case SidebarView.NONE:
+ if (this.isOpen) {
+ this.close();
+ return true;
+ }
+
+ return false;
+
+ case SidebarView.THUMBS:
+ if (this.isOpen && isViewChanged) {
+ shouldForceRendering = true;
+ }
+
+ break;
+
+ case SidebarView.OUTLINE:
+ if (this.outlineButton.disabled) {
+ return false;
+ }
+
+ break;
+
+ case SidebarView.ATTACHMENTS:
+ if (this.attachmentsButton.disabled) {
+ return false;
+ }
+
+ break;
+
+ default:
+ console.error(`PDFSidebar._switchView: "${view}" is not a valid view.`);
+ return false;
+ }
+
+ this.active = view;
+ this.thumbnailButton.classList.toggle("toggled", view === SidebarView.THUMBS);
+ this.outlineButton.classList.toggle("toggled", view === SidebarView.OUTLINE);
+ this.attachmentsButton.classList.toggle("toggled", view === SidebarView.ATTACHMENTS);
+ this.thumbnailView.classList.toggle("hidden", view !== SidebarView.THUMBS);
+ this.outlineView.classList.toggle("hidden", view !== SidebarView.OUTLINE);
+ this.attachmentsView.classList.toggle("hidden", view !== SidebarView.ATTACHMENTS);
+
+ if (forceOpen && !this.isOpen) {
+ this.open();
+ return true;
+ }
+
+ if (shouldForceRendering) {
+ this._updateThumbnailViewer();
+
+ this._forceRendering();
+ }
+
+ if (isViewChanged) {
+ this._dispatchEvent();
+ }
+
+ this._hideUINotification(this.active);
+
+ return isViewChanged;
+ }
+
+ open() {
+ if (this.isOpen) {
+ return;
+ }
+
+ this.isOpen = true;
+ this.toggleButton.classList.add("toggled");
+ this.outerContainer.classList.add("sidebarMoving", "sidebarOpen");
+
+ if (this.active === SidebarView.THUMBS) {
+ this._updateThumbnailViewer();
+ }
+
+ this._forceRendering();
+
+ this._dispatchEvent();
+
+ this._hideUINotification(this.active);
+ }
+
+ close() {
+ if (!this.isOpen) {
+ return;
+ }
+
+ this.isOpen = false;
+ this.toggleButton.classList.remove("toggled");
+ this.outerContainer.classList.add("sidebarMoving");
+ this.outerContainer.classList.remove("sidebarOpen");
+
+ this._forceRendering();
+
+ this._dispatchEvent();
+ }
+
+ toggle() {
+ if (this.isOpen) {
+ this.close();
+ } else {
+ this.open();
+ }
+ }
+
+ _dispatchEvent() {
+ this.eventBus.dispatch("sidebarviewchanged", {
+ source: this,
+ view: this.visibleView
+ });
+ }
+
+ _forceRendering() {
+ if (this.onToggled) {
+ this.onToggled();
+ } else {
+ this.pdfViewer.forceRendering();
+ this.pdfThumbnailViewer.forceRendering();
+ }
+ }
+
+ _updateThumbnailViewer() {
+ const {
+ pdfViewer,
+ pdfThumbnailViewer
+ } = this;
+ const pagesCount = pdfViewer.pagesCount;
+
+ for (let pageIndex = 0; pageIndex < pagesCount; pageIndex++) {
+ const pageView = pdfViewer.getPageView(pageIndex);
+
+ if (pageView && pageView.renderingState === _pdf_rendering_queue.RenderingStates.FINISHED) {
+ const thumbnailView = pdfThumbnailViewer.getThumbnail(pageIndex);
+ thumbnailView.setImage(pageView);
+ }
+ }
+
+ pdfThumbnailViewer.scrollThumbnailIntoView(pdfViewer.currentPageNumber);
+ }
+
+ _showUINotification(view) {
+ if (this._disableNotification) {
+ return;
+ }
+
+ this.l10n.get("toggle_sidebar_notification.title", null, "Toggle Sidebar (document contains outline/attachments)").then(msg => {
+ this.toggleButton.title = msg;
+ });
+
+ if (!this.isOpen) {
+ this.toggleButton.classList.add(UI_NOTIFICATION_CLASS);
+ } else if (view === this.active) {
+ return;
+ }
+
+ switch (view) {
+ case SidebarView.OUTLINE:
+ this.outlineButton.classList.add(UI_NOTIFICATION_CLASS);
+ break;
+
+ case SidebarView.ATTACHMENTS:
+ this.attachmentsButton.classList.add(UI_NOTIFICATION_CLASS);
+ break;
+ }
+ }
+
+ _hideUINotification(view) {
+ if (this._disableNotification) {
+ return;
+ }
+
+ const removeNotification = sidebarView => {
+ switch (sidebarView) {
+ case SidebarView.OUTLINE:
+ this.outlineButton.classList.remove(UI_NOTIFICATION_CLASS);
+ break;
+
+ case SidebarView.ATTACHMENTS:
+ this.attachmentsButton.classList.remove(UI_NOTIFICATION_CLASS);
+ break;
+ }
+ };
+
+ if (!this.isOpen && view !== null) {
+ return;
+ }
+
+ this.toggleButton.classList.remove(UI_NOTIFICATION_CLASS);
+
+ if (view !== null) {
+ removeNotification(view);
+ return;
+ }
+
+ for (view in SidebarView) {
+ removeNotification(SidebarView[view]);
+ }
+
+ this.l10n.get("toggle_sidebar.title", null, "Toggle Sidebar").then(msg => {
+ this.toggleButton.title = msg;
+ });
+ }
+
+ _addEventListeners() {
+ this.viewerContainer.addEventListener("transitionend", evt => {
+ if (evt.target === this.viewerContainer) {
+ this.outerContainer.classList.remove("sidebarMoving");
+ }
+ });
+ this.toggleButton.addEventListener("click", () => {
+ this.toggle();
+ });
+ this.thumbnailButton.addEventListener("click", () => {
+ this.switchView(SidebarView.THUMBS);
+ });
+ this.outlineButton.addEventListener("click", () => {
+ this.switchView(SidebarView.OUTLINE);
+ });
+ this.outlineButton.addEventListener("dblclick", () => {
+ this.eventBus.dispatch("toggleoutlinetree", {
+ source: this
+ });
+ });
+ this.attachmentsButton.addEventListener("click", () => {
+ this.switchView(SidebarView.ATTACHMENTS);
+ });
+
+ this.eventBus._on("outlineloaded", evt => {
+ const outlineCount = evt.outlineCount;
+ this.outlineButton.disabled = !outlineCount;
+
+ if (outlineCount) {
+ this._showUINotification(SidebarView.OUTLINE);
+ } else if (this.active === SidebarView.OUTLINE) {
+ this.switchView(SidebarView.THUMBS);
+ }
+ });
+
+ this.eventBus._on("attachmentsloaded", evt => {
+ if (evt.attachmentsCount) {
+ this.attachmentsButton.disabled = false;
+
+ this._showUINotification(SidebarView.ATTACHMENTS);
+
+ return;
+ }
+
+ Promise.resolve().then(() => {
+ if (this.attachmentsView.hasChildNodes()) {
+ return;
+ }
+
+ this.attachmentsButton.disabled = true;
+
+ if (this.active === SidebarView.ATTACHMENTS) {
+ this.switchView(SidebarView.THUMBS);
+ }
+ });
+ });
+
+ this.eventBus._on("presentationmodechanged", evt => {
+ if (!evt.active && !evt.switchInProgress && this.isThumbnailViewVisible) {
+ this._updateThumbnailViewer();
+ }
+ });
+ }
+
+}
+
+exports.PDFSidebar = PDFSidebar;
+
+/***/ }),
+/* 10 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.OverlayManager = void 0;
+
+class OverlayManager {
+ constructor() {
+ this._overlays = {};
+ this._active = null;
+ this._keyDownBound = this._keyDown.bind(this);
+ }
+
+ get active() {
+ return this._active;
+ }
+
+ async register(name, element, callerCloseMethod = null, canForceClose = false) {
+ let container;
+
+ if (!name || !element || !(container = element.parentNode)) {
+ throw new Error("Not enough parameters.");
+ } else if (this._overlays[name]) {
+ throw new Error("The overlay is already registered.");
+ }
+
+ this._overlays[name] = {
+ element,
+ container,
+ callerCloseMethod,
+ canForceClose
+ };
+ }
+
+ async unregister(name) {
+ if (!this._overlays[name]) {
+ throw new Error("The overlay does not exist.");
+ } else if (this._active === name) {
+ throw new Error("The overlay cannot be removed while it is active.");
+ }
+
+ delete this._overlays[name];
+ }
+
+ async open(name) {
+ if (!this._overlays[name]) {
+ throw new Error("The overlay does not exist.");
+ } else if (this._active) {
+ if (this._overlays[name].canForceClose) {
+ this._closeThroughCaller();
+ } else if (this._active === name) {
+ throw new Error("The overlay is already active.");
+ } else {
+ throw new Error("Another overlay is currently active.");
+ }
+ }
+
+ this._active = name;
+
+ this._overlays[this._active].element.classList.remove("hidden");
+
+ this._overlays[this._active].container.classList.remove("hidden");
+
+ window.addEventListener("keydown", this._keyDownBound);
+ }
+
+ async close(name) {
+ if (!this._overlays[name]) {
+ throw new Error("The overlay does not exist.");
+ } else if (!this._active) {
+ throw new Error("The overlay is currently not active.");
+ } else if (this._active !== name) {
+ throw new Error("Another overlay is currently active.");
+ }
+
+ this._overlays[this._active].container.classList.add("hidden");
+
+ this._overlays[this._active].element.classList.add("hidden");
+
+ this._active = null;
+ window.removeEventListener("keydown", this._keyDownBound);
+ }
+
+ _keyDown(evt) {
+ if (this._active && evt.keyCode === 27) {
+ this._closeThroughCaller();
+
+ evt.preventDefault();
+ }
+ }
+
+ _closeThroughCaller() {
+ if (this._overlays[this._active].callerCloseMethod) {
+ this._overlays[this._active].callerCloseMethod();
+ }
+
+ if (this._active) {
+ this.close(this._active);
+ }
+ }
+
+}
+
+exports.OverlayManager = OverlayManager;
+
+/***/ }),
+/* 11 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PasswordPrompt = void 0;
+
+var _ui_utils = __webpack_require__(2);
+
+var _pdfjsLib = __webpack_require__(4);
+
+class PasswordPrompt {
+ constructor(options, overlayManager, l10n = _ui_utils.NullL10n) {
+ this.overlayName = options.overlayName;
+ this.container = options.container;
+ this.label = options.label;
+ this.input = options.input;
+ this.submitButton = options.submitButton;
+ this.cancelButton = options.cancelButton;
+ this.overlayManager = overlayManager;
+ this.l10n = l10n;
+ this.updateCallback = null;
+ this.reason = null;
+ this.submitButton.addEventListener("click", this.verify.bind(this));
+ this.cancelButton.addEventListener("click", this.close.bind(this));
+ this.input.addEventListener("keydown", e => {
+ if (e.keyCode === 13) {
+ this.verify();
+ }
+ });
+ this.overlayManager.register(this.overlayName, this.container, this.close.bind(this), true);
+ }
+
+ open() {
+ this.overlayManager.open(this.overlayName).then(() => {
+ this.input.focus();
+ let promptString;
+
+ if (this.reason === _pdfjsLib.PasswordResponses.INCORRECT_PASSWORD) {
+ promptString = this.l10n.get("password_invalid", null, "Invalid password. Please try again.");
+ } else {
+ promptString = this.l10n.get("password_label", null, "Enter the password to open this PDF file.");
+ }
+
+ promptString.then(msg => {
+ this.label.textContent = msg;
+ });
+ });
+ }
+
+ close() {
+ this.overlayManager.close(this.overlayName).then(() => {
+ this.input.value = "";
+ });
+ }
+
+ verify() {
+ const password = this.input.value;
+
+ if (password && password.length > 0) {
+ this.close();
+ this.updateCallback(password);
+ }
+ }
+
+ setUpdateCallback(updateCallback, reason) {
+ this.updateCallback = updateCallback;
+ this.reason = reason;
+ }
+
+}
+
+exports.PasswordPrompt = PasswordPrompt;
+
+/***/ }),
+/* 12 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PDFAttachmentViewer = void 0;
+
+var _pdfjsLib = __webpack_require__(4);
+
+class PDFAttachmentViewer {
+ constructor({
+ container,
+ eventBus,
+ downloadManager
+ }) {
+ this.container = container;
+ this.eventBus = eventBus;
+ this.downloadManager = downloadManager;
+ this.reset();
+
+ this.eventBus._on("fileattachmentannotation", this._appendAttachment.bind(this));
+ }
+
+ reset(keepRenderedCapability = false) {
+ this.attachments = null;
+ this.container.textContent = "";
+
+ if (!keepRenderedCapability) {
+ this._renderedCapability = (0, _pdfjsLib.createPromiseCapability)();
+ }
+ }
+
+ _dispatchEvent(attachmentsCount) {
+ this._renderedCapability.resolve();
+
+ this.eventBus.dispatch("attachmentsloaded", {
+ source: this,
+ attachmentsCount
+ });
+ }
+
+ _bindPdfLink(button, content, filename) {
+ if (this.downloadManager.disableCreateObjectURL) {
+ throw new Error('bindPdfLink: Unsupported "disableCreateObjectURL" value.');
+ }
+
+ let blobUrl;
+
+ button.onclick = function () {
+ if (!blobUrl) {
+ blobUrl = (0, _pdfjsLib.createObjectURL)(content, "application/pdf");
+ }
+
+ let viewerUrl;
+ viewerUrl = "?file=" + encodeURIComponent(blobUrl + "#" + filename);
+ window.open(viewerUrl);
+ return false;
+ };
+ }
+
+ _bindLink(button, content, filename) {
+ button.onclick = () => {
+ this.downloadManager.downloadData(content, filename, "");
+ return false;
+ };
+ }
+
+ render({
+ attachments,
+ keepRenderedCapability = false
+ }) {
+ let attachmentsCount = 0;
+
+ if (this.attachments) {
+ this.reset(keepRenderedCapability === true);
+ }
+
+ this.attachments = attachments || null;
+
+ if (!attachments) {
+ this._dispatchEvent(attachmentsCount);
+
+ return;
+ }
+
+ const names = Object.keys(attachments).sort(function (a, b) {
+ return a.toLowerCase().localeCompare(b.toLowerCase());
+ });
+ attachmentsCount = names.length;
+
+ for (let i = 0; i < attachmentsCount; i++) {
+ const item = attachments[names[i]];
+ const filename = (0, _pdfjsLib.removeNullCharacters)((0, _pdfjsLib.getFilenameFromUrl)(item.filename));
+ const div = document.createElement("div");
+ div.className = "attachmentsItem";
+ const button = document.createElement("button");
+ button.textContent = filename;
+
+ if (/\.pdf$/i.test(filename) && !this.downloadManager.disableCreateObjectURL) {
+ this._bindPdfLink(button, item.content, filename);
+ } else {
+ this._bindLink(button, item.content, filename);
+ }
+
+ div.appendChild(button);
+ this.container.appendChild(div);
+ }
+
+ this._dispatchEvent(attachmentsCount);
+ }
+
+ _appendAttachment({
+ id,
+ filename,
+ content
+ }) {
+ this._renderedCapability.promise.then(() => {
+ let attachments = this.attachments;
+
+ if (!attachments) {
+ attachments = Object.create(null);
+ } else {
+ for (const name in attachments) {
+ if (id === name) {
+ return;
+ }
+ }
+ }
+
+ attachments[id] = {
+ filename,
+ content
+ };
+ this.render({
+ attachments,
+ keepRenderedCapability: true
+ });
+ });
+ }
+
+}
+
+exports.PDFAttachmentViewer = PDFAttachmentViewer;
+
+/***/ }),
+/* 13 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PDFDocumentProperties = void 0;
+
+var _pdfjsLib = __webpack_require__(4);
+
+var _ui_utils = __webpack_require__(2);
+
+const DEFAULT_FIELD_CONTENT = "-";
+const NON_METRIC_LOCALES = ["en-us", "en-lr", "my"];
+const US_PAGE_NAMES = {
+ "8.5x11": "Letter",
+ "8.5x14": "Legal"
+};
+const METRIC_PAGE_NAMES = {
+ "297x420": "A3",
+ "210x297": "A4"
+};
+
+function getPageName(size, isPortrait, pageNames) {
+ const width = isPortrait ? size.width : size.height;
+ const height = isPortrait ? size.height : size.width;
+ return pageNames[`${width}x${height}`];
+}
+
+class PDFDocumentProperties {
+ constructor({
+ overlayName,
+ fields,
+ container,
+ closeButton
+ }, overlayManager, eventBus, l10n = _ui_utils.NullL10n) {
+ this.overlayName = overlayName;
+ this.fields = fields;
+ this.container = container;
+ this.overlayManager = overlayManager;
+ this.l10n = l10n;
+
+ this._reset();
+
+ if (closeButton) {
+ closeButton.addEventListener("click", this.close.bind(this));
+ }
+
+ this.overlayManager.register(this.overlayName, this.container, this.close.bind(this));
+
+ if (eventBus) {
+ eventBus._on("pagechanging", evt => {
+ this._currentPageNumber = evt.pageNumber;
+ });
+
+ eventBus._on("rotationchanging", evt => {
+ this._pagesRotation = evt.pagesRotation;
+ });
+ }
+
+ this._isNonMetricLocale = true;
+ l10n.getLanguage().then(locale => {
+ this._isNonMetricLocale = NON_METRIC_LOCALES.includes(locale);
+ });
+ }
+
+ open() {
+ const freezeFieldData = data => {
+ Object.defineProperty(this, "fieldData", {
+ value: Object.freeze(data),
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+ };
+
+ Promise.all([this.overlayManager.open(this.overlayName), this._dataAvailableCapability.promise]).then(() => {
+ const currentPageNumber = this._currentPageNumber;
+ const pagesRotation = this._pagesRotation;
+
+ if (this.fieldData && currentPageNumber === this.fieldData["_currentPageNumber"] && pagesRotation === this.fieldData["_pagesRotation"]) {
+ this._updateUI();
+
+ return;
+ }
+
+ this.pdfDocument.getMetadata().then(({
+ info,
+ metadata,
+ contentDispositionFilename
+ }) => {
+ return Promise.all([info, metadata, contentDispositionFilename || (0, _ui_utils.getPDFFileNameFromURL)(this.url || ""), this._parseFileSize(this.maybeFileSize), this._parseDate(info.CreationDate), this._parseDate(info.ModDate), this.pdfDocument.getPage(currentPageNumber).then(pdfPage => {
+ return this._parsePageSize((0, _ui_utils.getPageSizeInches)(pdfPage), pagesRotation);
+ }), this._parseLinearization(info.IsLinearized)]);
+ }).then(([info, metadata, fileName, fileSize, creationDate, modDate, pageSize, isLinearized]) => {
+ freezeFieldData({
+ fileName,
+ fileSize,
+ title: info.Title,
+ author: info.Author,
+ subject: info.Subject,
+ keywords: info.Keywords,
+ creationDate,
+ modificationDate: modDate,
+ creator: info.Creator,
+ producer: info.Producer,
+ version: info.PDFFormatVersion,
+ pageCount: this.pdfDocument.numPages,
+ pageSize,
+ linearized: isLinearized,
+ _currentPageNumber: currentPageNumber,
+ _pagesRotation: pagesRotation
+ });
+
+ this._updateUI();
+
+ return this.pdfDocument.getDownloadInfo();
+ }).then(({
+ length
+ }) => {
+ this.maybeFileSize = length;
+ return this._parseFileSize(length);
+ }).then(fileSize => {
+ if (fileSize === this.fieldData["fileSize"]) {
+ return;
+ }
+
+ const data = Object.assign(Object.create(null), this.fieldData);
+ data["fileSize"] = fileSize;
+ freezeFieldData(data);
+
+ this._updateUI();
+ });
+ });
+ }
+
+ close() {
+ this.overlayManager.close(this.overlayName);
+ }
+
+ setDocument(pdfDocument, url = null) {
+ if (this.pdfDocument) {
+ this._reset();
+
+ this._updateUI(true);
+ }
+
+ if (!pdfDocument) {
+ return;
+ }
+
+ this.pdfDocument = pdfDocument;
+ this.url = url;
+
+ this._dataAvailableCapability.resolve();
+ }
+
+ setFileSize(fileSize) {
+ if (Number.isInteger(fileSize) && fileSize > 0) {
+ this.maybeFileSize = fileSize;
+ }
+ }
+
+ _reset() {
+ this.pdfDocument = null;
+ this.url = null;
+ this.maybeFileSize = 0;
+ delete this.fieldData;
+ this._dataAvailableCapability = (0, _pdfjsLib.createPromiseCapability)();
+ this._currentPageNumber = 1;
+ this._pagesRotation = 0;
+ }
+
+ _updateUI(reset = false) {
+ if (reset || !this.fieldData) {
+ for (const id in this.fields) {
+ this.fields[id].textContent = DEFAULT_FIELD_CONTENT;
+ }
+
+ return;
+ }
+
+ if (this.overlayManager.active !== this.overlayName) {
+ return;
+ }
+
+ for (const id in this.fields) {
+ const content = this.fieldData[id];
+ this.fields[id].textContent = content || content === 0 ? content : DEFAULT_FIELD_CONTENT;
+ }
+ }
+
+ async _parseFileSize(fileSize = 0) {
+ const kb = fileSize / 1024;
+
+ if (!kb) {
+ return undefined;
+ } else if (kb < 1024) {
+ return this.l10n.get("document_properties_kb", {
+ size_kb: (+kb.toPrecision(3)).toLocaleString(),
+ size_b: fileSize.toLocaleString()
+ }, "{{size_kb}} KB ({{size_b}} bytes)");
+ }
+
+ return this.l10n.get("document_properties_mb", {
+ size_mb: (+(kb / 1024).toPrecision(3)).toLocaleString(),
+ size_b: fileSize.toLocaleString()
+ }, "{{size_mb}} MB ({{size_b}} bytes)");
+ }
+
+ async _parsePageSize(pageSizeInches, pagesRotation) {
+ if (!pageSizeInches) {
+ return undefined;
+ }
+
+ if (pagesRotation % 180 !== 0) {
+ pageSizeInches = {
+ width: pageSizeInches.height,
+ height: pageSizeInches.width
+ };
+ }
+
+ const isPortrait = (0, _ui_utils.isPortraitOrientation)(pageSizeInches);
+ let sizeInches = {
+ width: Math.round(pageSizeInches.width * 100) / 100,
+ height: Math.round(pageSizeInches.height * 100) / 100
+ };
+ let sizeMillimeters = {
+ width: Math.round(pageSizeInches.width * 25.4 * 10) / 10,
+ height: Math.round(pageSizeInches.height * 25.4 * 10) / 10
+ };
+ let pageName = null;
+ let rawName = getPageName(sizeInches, isPortrait, US_PAGE_NAMES) || getPageName(sizeMillimeters, isPortrait, METRIC_PAGE_NAMES);
+
+ if (!rawName && !(Number.isInteger(sizeMillimeters.width) && Number.isInteger(sizeMillimeters.height))) {
+ const exactMillimeters = {
+ width: pageSizeInches.width * 25.4,
+ height: pageSizeInches.height * 25.4
+ };
+ const intMillimeters = {
+ width: Math.round(sizeMillimeters.width),
+ height: Math.round(sizeMillimeters.height)
+ };
+
+ if (Math.abs(exactMillimeters.width - intMillimeters.width) < 0.1 && Math.abs(exactMillimeters.height - intMillimeters.height) < 0.1) {
+ rawName = getPageName(intMillimeters, isPortrait, METRIC_PAGE_NAMES);
+
+ if (rawName) {
+ sizeInches = {
+ width: Math.round(intMillimeters.width / 25.4 * 100) / 100,
+ height: Math.round(intMillimeters.height / 25.4 * 100) / 100
+ };
+ sizeMillimeters = intMillimeters;
+ }
+ }
+ }
+
+ if (rawName) {
+ pageName = this.l10n.get("document_properties_page_size_name_" + rawName.toLowerCase(), null, rawName);
+ }
+
+ return Promise.all([this._isNonMetricLocale ? sizeInches : sizeMillimeters, this.l10n.get("document_properties_page_size_unit_" + (this._isNonMetricLocale ? "inches" : "millimeters"), null, this._isNonMetricLocale ? "in" : "mm"), pageName, this.l10n.get("document_properties_page_size_orientation_" + (isPortrait ? "portrait" : "landscape"), null, isPortrait ? "portrait" : "landscape")]).then(([{
+ width,
+ height
+ }, unit, name, orientation]) => {
+ return this.l10n.get("document_properties_page_size_dimension_" + (name ? "name_" : "") + "string", {
+ width: width.toLocaleString(),
+ height: height.toLocaleString(),
+ unit,
+ name,
+ orientation
+ }, "{{width}} × {{height}} {{unit}} (" + (name ? "{{name}}, " : "") + "{{orientation}})");
+ });
+ }
+
+ async _parseDate(inputDate) {
+ const dateObject = _pdfjsLib.PDFDateString.toDateObject(inputDate);
+
+ if (!dateObject) {
+ return undefined;
+ }
+
+ return this.l10n.get("document_properties_date_string", {
+ date: dateObject.toLocaleDateString(),
+ time: dateObject.toLocaleTimeString()
+ }, "{{date}}, {{time}}");
+ }
+
+ _parseLinearization(isLinearized) {
+ return this.l10n.get("document_properties_linearized_" + (isLinearized ? "yes" : "no"), null, isLinearized ? "Yes" : "No");
+ }
+
+}
+
+exports.PDFDocumentProperties = PDFDocumentProperties;
+
+/***/ }),
+/* 14 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PDFFindBar = void 0;
+
+var _ui_utils = __webpack_require__(2);
+
+var _pdf_find_controller = __webpack_require__(15);
+
+const MATCHES_COUNT_LIMIT = 1000;
+
+class PDFFindBar {
+ constructor(options, eventBus, l10n = _ui_utils.NullL10n) {
+ this.opened = false;
+ this.bar = options.bar || null;
+ this.toggleButton = options.toggleButton || null;
+ this.findField = options.findField || null;
+ this.highlightAll = options.highlightAllCheckbox || null;
+ this.caseSensitive = options.caseSensitiveCheckbox || null;
+ this.entireWord = options.entireWordCheckbox || null;
+ this.findMsg = options.findMsg || null;
+ this.findResultsCount = options.findResultsCount || null;
+ this.findPreviousButton = options.findPreviousButton || null;
+ this.findNextButton = options.findNextButton || null;
+ this.eventBus = eventBus || (0, _ui_utils.getGlobalEventBus)();
+ this.l10n = l10n;
+ this.toggleButton.addEventListener("click", () => {
+ this.toggle();
+ });
+ this.findField.addEventListener("input", () => {
+ this.dispatchEvent("");
+ });
+ this.bar.addEventListener("keydown", e => {
+ switch (e.keyCode) {
+ case 13:
+ if (e.target === this.findField) {
+ this.dispatchEvent("again", e.shiftKey);
+ }
+
+ break;
+
+ case 27:
+ this.close();
+ break;
+ }
+ });
+ this.findPreviousButton.addEventListener("click", () => {
+ this.dispatchEvent("again", true);
+ });
+ this.findNextButton.addEventListener("click", () => {
+ this.dispatchEvent("again", false);
+ });
+ this.highlightAll.addEventListener("click", () => {
+ this.dispatchEvent("highlightallchange");
+ });
+ this.caseSensitive.addEventListener("click", () => {
+ this.dispatchEvent("casesensitivitychange");
+ });
+ this.entireWord.addEventListener("click", () => {
+ this.dispatchEvent("entirewordchange");
+ });
+
+ this.eventBus._on("resize", this._adjustWidth.bind(this));
+ }
+
+ reset() {
+ this.updateUIState();
+ }
+
+ dispatchEvent(type, findPrev) {
+ this.eventBus.dispatch("find", {
+ source: this,
+ type,
+ query: this.findField.value,
+ phraseSearch: true,
+ caseSensitive: this.caseSensitive.checked,
+ entireWord: this.entireWord.checked,
+ highlightAll: this.highlightAll.checked,
+ findPrevious: findPrev
+ });
+ }
+
+ updateUIState(state, previous, matchesCount) {
+ let notFound = false;
+ let findMsg = "";
+ let status = "";
+
+ switch (state) {
+ case _pdf_find_controller.FindState.FOUND:
+ break;
+
+ case _pdf_find_controller.FindState.PENDING:
+ status = "pending";
+ break;
+
+ case _pdf_find_controller.FindState.NOT_FOUND:
+ findMsg = this.l10n.get("find_not_found", null, "Phrase not found");
+ notFound = true;
+ break;
+
+ case _pdf_find_controller.FindState.WRAPPED:
+ if (previous) {
+ findMsg = this.l10n.get("find_reached_top", null, "Reached top of document, continued from bottom");
+ } else {
+ findMsg = this.l10n.get("find_reached_bottom", null, "Reached end of document, continued from top");
+ }
+
+ break;
+ }
+
+ this.findField.classList.toggle("notFound", notFound);
+ this.findField.setAttribute("data-status", status);
+ Promise.resolve(findMsg).then(msg => {
+ this.findMsg.textContent = msg;
+
+ this._adjustWidth();
+ });
+ this.updateResultsCount(matchesCount);
+ }
+
+ updateResultsCount({
+ current = 0,
+ total = 0
+ } = {}) {
+ if (!this.findResultsCount) {
+ return;
+ }
+
+ const limit = MATCHES_COUNT_LIMIT;
+ let matchesCountMsg = "";
+
+ if (total > 0) {
+ if (total > limit) {
+ matchesCountMsg = this.l10n.get("find_match_count_limit", {
+ limit
+ }, "More than {{limit}} match" + (limit !== 1 ? "es" : ""));
+ } else {
+ matchesCountMsg = this.l10n.get("find_match_count", {
+ current,
+ total
+ }, "{{current}} of {{total}} match" + (total !== 1 ? "es" : ""));
+ }
+ }
+
+ Promise.resolve(matchesCountMsg).then(msg => {
+ this.findResultsCount.textContent = msg;
+ this.findResultsCount.classList.toggle("hidden", !total);
+
+ this._adjustWidth();
+ });
+ }
+
+ open() {
+ if (!this.opened) {
+ this.opened = true;
+ this.toggleButton.classList.add("toggled");
+ this.bar.classList.remove("hidden");
+ }
+
+ this.findField.select();
+ this.findField.focus();
+
+ this._adjustWidth();
+ }
+
+ close() {
+ if (!this.opened) {
+ return;
+ }
+
+ this.opened = false;
+ this.toggleButton.classList.remove("toggled");
+ this.bar.classList.add("hidden");
+ this.eventBus.dispatch("findbarclose", {
+ source: this
+ });
+ }
+
+ toggle() {
+ if (this.opened) {
+ this.close();
+ } else {
+ this.open();
+ }
+ }
+
+ _adjustWidth() {
+ if (!this.opened) {
+ return;
+ }
+
+ this.bar.classList.remove("wrapContainers");
+ const findbarHeight = this.bar.clientHeight;
+ const inputContainerHeight = this.bar.firstElementChild.clientHeight;
+
+ if (findbarHeight > inputContainerHeight) {
+ this.bar.classList.add("wrapContainers");
+ }
+ }
+
+}
+
+exports.PDFFindBar = PDFFindBar;
+
+/***/ }),
+/* 15 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PDFFindController = exports.FindState = void 0;
+
+var _ui_utils = __webpack_require__(2);
+
+var _pdfjsLib = __webpack_require__(4);
+
+var _pdf_find_utils = __webpack_require__(16);
+
+const FindState = {
+ FOUND: 0,
+ NOT_FOUND: 1,
+ WRAPPED: 2,
+ PENDING: 3
+};
+exports.FindState = FindState;
+const FIND_TIMEOUT = 250;
+const MATCH_SCROLL_OFFSET_TOP = -50;
+const MATCH_SCROLL_OFFSET_LEFT = -400;
+const CHARACTERS_TO_NORMALIZE = {
+ "\u2018": "'",
+ "\u2019": "'",
+ "\u201A": "'",
+ "\u201B": "'",
+ "\u201C": '"',
+ "\u201D": '"',
+ "\u201E": '"',
+ "\u201F": '"',
+ "\u00BC": "1/4",
+ "\u00BD": "1/2",
+ "\u00BE": "3/4"
+};
+let normalizationRegex = null;
+
+function normalize(text) {
+ if (!normalizationRegex) {
+ const replace = Object.keys(CHARACTERS_TO_NORMALIZE).join("");
+ normalizationRegex = new RegExp(`[${replace}]`, "g");
+ }
+
+ return text.replace(normalizationRegex, function (ch) {
+ return CHARACTERS_TO_NORMALIZE[ch];
+ });
+}
+
+class PDFFindController {
+ constructor({
+ linkService,
+ eventBus
+ }) {
+ this._linkService = linkService;
+ this._eventBus = eventBus || (0, _ui_utils.getGlobalEventBus)();
+
+ this._reset();
+
+ eventBus._on("findbarclose", this._onFindBarClose.bind(this));
+ }
+
+ get highlightMatches() {
+ return this._highlightMatches;
+ }
+
+ get pageMatches() {
+ return this._pageMatches;
+ }
+
+ get pageMatchesLength() {
+ return this._pageMatchesLength;
+ }
+
+ get selected() {
+ return this._selected;
+ }
+
+ get state() {
+ return this._state;
+ }
+
+ setDocument(pdfDocument) {
+ if (this._pdfDocument) {
+ this._reset();
+ }
+
+ if (!pdfDocument) {
+ return;
+ }
+
+ this._pdfDocument = pdfDocument;
+
+ this._firstPageCapability.resolve();
+ }
+
+ executeCommand(cmd, state) {
+ if (!state) {
+ return;
+ }
+
+ const pdfDocument = this._pdfDocument;
+
+ if (this._state === null || this._shouldDirtyMatch(cmd, state)) {
+ this._dirtyMatch = true;
+ }
+
+ this._state = state;
+
+ if (cmd !== "findhighlightallchange") {
+ this._updateUIState(FindState.PENDING);
+ }
+
+ this._firstPageCapability.promise.then(() => {
+ if (!this._pdfDocument || pdfDocument && this._pdfDocument !== pdfDocument) {
+ return;
+ }
+
+ this._extractText();
+
+ const findbarClosed = !this._highlightMatches;
+ const pendingTimeout = !!this._findTimeout;
+
+ if (this._findTimeout) {
+ clearTimeout(this._findTimeout);
+ this._findTimeout = null;
+ }
+
+ if (cmd === "find") {
+ this._findTimeout = setTimeout(() => {
+ this._nextMatch();
+
+ this._findTimeout = null;
+ }, FIND_TIMEOUT);
+ } else if (this._dirtyMatch) {
+ this._nextMatch();
+ } else if (cmd === "findagain") {
+ this._nextMatch();
+
+ if (findbarClosed && this._state.highlightAll) {
+ this._updateAllPages();
+ }
+ } else if (cmd === "findhighlightallchange") {
+ if (pendingTimeout) {
+ this._nextMatch();
+ } else {
+ this._highlightMatches = true;
+ }
+
+ this._updateAllPages();
+ } else {
+ this._nextMatch();
+ }
+ });
+ }
+
+ scrollMatchIntoView({
+ element = null,
+ pageIndex = -1,
+ matchIndex = -1
+ }) {
+ if (!this._scrollMatches || !element) {
+ return;
+ } else if (matchIndex === -1 || matchIndex !== this._selected.matchIdx) {
+ return;
+ } else if (pageIndex === -1 || pageIndex !== this._selected.pageIdx) {
+ return;
+ }
+
+ this._scrollMatches = false;
+ const spot = {
+ top: MATCH_SCROLL_OFFSET_TOP,
+ left: MATCH_SCROLL_OFFSET_LEFT
+ };
+ (0, _ui_utils.scrollIntoView)(element, spot, true);
+ }
+
+ _reset() {
+ this._highlightMatches = false;
+ this._scrollMatches = false;
+ this._pdfDocument = null;
+ this._pageMatches = [];
+ this._pageMatchesLength = [];
+ this._state = null;
+ this._selected = {
+ pageIdx: -1,
+ matchIdx: -1
+ };
+ this._offset = {
+ pageIdx: null,
+ matchIdx: null,
+ wrapped: false
+ };
+ this._extractTextPromises = [];
+ this._pageContents = [];
+ this._matchesCountTotal = 0;
+ this._pagesToSearch = null;
+ this._pendingFindMatches = Object.create(null);
+ this._resumePageIdx = null;
+ this._dirtyMatch = false;
+ clearTimeout(this._findTimeout);
+ this._findTimeout = null;
+ this._firstPageCapability = (0, _pdfjsLib.createPromiseCapability)();
+ }
+
+ get _query() {
+ if (this._state.query !== this._rawQuery) {
+ this._rawQuery = this._state.query;
+ this._normalizedQuery = normalize(this._state.query);
+ }
+
+ return this._normalizedQuery;
+ }
+
+ _shouldDirtyMatch(cmd, state) {
+ if (state.query !== this._state.query) {
+ return true;
+ }
+
+ switch (cmd) {
+ case "findagain":
+ const pageNumber = this._selected.pageIdx + 1;
+ const linkService = this._linkService;
+
+ if (pageNumber >= 1 && pageNumber <= linkService.pagesCount && pageNumber !== linkService.page && !linkService.isPageVisible(pageNumber)) {
+ return true;
+ }
+
+ return false;
+
+ case "findhighlightallchange":
+ return false;
+ }
+
+ return true;
+ }
+
+ _prepareMatches(matchesWithLength, matches, matchesLength) {
+ function isSubTerm(currentIndex) {
+ const currentElem = matchesWithLength[currentIndex];
+ const nextElem = matchesWithLength[currentIndex + 1];
+
+ if (currentIndex < matchesWithLength.length - 1 && currentElem.match === nextElem.match) {
+ currentElem.skipped = true;
+ return true;
+ }
+
+ for (let i = currentIndex - 1; i >= 0; i--) {
+ const prevElem = matchesWithLength[i];
+
+ if (prevElem.skipped) {
+ continue;
+ }
+
+ if (prevElem.match + prevElem.matchLength < currentElem.match) {
+ break;
+ }
+
+ if (prevElem.match + prevElem.matchLength >= currentElem.match + currentElem.matchLength) {
+ currentElem.skipped = true;
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ matchesWithLength.sort(function (a, b) {
+ return a.match === b.match ? a.matchLength - b.matchLength : a.match - b.match;
+ });
+
+ for (let i = 0, len = matchesWithLength.length; i < len; i++) {
+ if (isSubTerm(i)) {
+ continue;
+ }
+
+ matches.push(matchesWithLength[i].match);
+ matchesLength.push(matchesWithLength[i].matchLength);
+ }
+ }
+
+ _isEntireWord(content, startIdx, length) {
+ if (startIdx > 0) {
+ const first = content.charCodeAt(startIdx);
+ const limit = content.charCodeAt(startIdx - 1);
+
+ if ((0, _pdf_find_utils.getCharacterType)(first) === (0, _pdf_find_utils.getCharacterType)(limit)) {
+ return false;
+ }
+ }
+
+ const endIdx = startIdx + length - 1;
+
+ if (endIdx < content.length - 1) {
+ const last = content.charCodeAt(endIdx);
+ const limit = content.charCodeAt(endIdx + 1);
+
+ if ((0, _pdf_find_utils.getCharacterType)(last) === (0, _pdf_find_utils.getCharacterType)(limit)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ _calculatePhraseMatch(query, pageIndex, pageContent, entireWord) {
+ const matches = [];
+ const queryLen = query.length;
+ let matchIdx = -queryLen;
+
+ while (true) {
+ matchIdx = pageContent.indexOf(query, matchIdx + queryLen);
+
+ if (matchIdx === -1) {
+ break;
+ }
+
+ if (entireWord && !this._isEntireWord(pageContent, matchIdx, queryLen)) {
+ continue;
+ }
+
+ matches.push(matchIdx);
+ }
+
+ this._pageMatches[pageIndex] = matches;
+ }
+
+ _calculateWordMatch(query, pageIndex, pageContent, entireWord) {
+ const matchesWithLength = [];
+ const queryArray = query.match(/\S+/g);
+
+ for (let i = 0, len = queryArray.length; i < len; i++) {
+ const subquery = queryArray[i];
+ const subqueryLen = subquery.length;
+ let matchIdx = -subqueryLen;
+
+ while (true) {
+ matchIdx = pageContent.indexOf(subquery, matchIdx + subqueryLen);
+
+ if (matchIdx === -1) {
+ break;
+ }
+
+ if (entireWord && !this._isEntireWord(pageContent, matchIdx, subqueryLen)) {
+ continue;
+ }
+
+ matchesWithLength.push({
+ match: matchIdx,
+ matchLength: subqueryLen,
+ skipped: false
+ });
+ }
+ }
+
+ this._pageMatchesLength[pageIndex] = [];
+ this._pageMatches[pageIndex] = [];
+
+ this._prepareMatches(matchesWithLength, this._pageMatches[pageIndex], this._pageMatchesLength[pageIndex]);
+ }
+
+ _calculateMatch(pageIndex) {
+ let pageContent = this._pageContents[pageIndex];
+ let query = this._query;
+ const {
+ caseSensitive,
+ entireWord,
+ phraseSearch
+ } = this._state;
+
+ if (query.length === 0) {
+ return;
+ }
+
+ if (!caseSensitive) {
+ pageContent = pageContent.toLowerCase();
+ query = query.toLowerCase();
+ }
+
+ if (phraseSearch) {
+ this._calculatePhraseMatch(query, pageIndex, pageContent, entireWord);
+ } else {
+ this._calculateWordMatch(query, pageIndex, pageContent, entireWord);
+ }
+
+ if (this._state.highlightAll) {
+ this._updatePage(pageIndex);
+ }
+
+ if (this._resumePageIdx === pageIndex) {
+ this._resumePageIdx = null;
+
+ this._nextPageMatch();
+ }
+
+ const pageMatchesCount = this._pageMatches[pageIndex].length;
+
+ if (pageMatchesCount > 0) {
+ this._matchesCountTotal += pageMatchesCount;
+
+ this._updateUIResultsCount();
+ }
+ }
+
+ _extractText() {
+ if (this._extractTextPromises.length > 0) {
+ return;
+ }
+
+ let promise = Promise.resolve();
+
+ for (let i = 0, ii = this._linkService.pagesCount; i < ii; i++) {
+ const extractTextCapability = (0, _pdfjsLib.createPromiseCapability)();
+ this._extractTextPromises[i] = extractTextCapability.promise;
+ promise = promise.then(() => {
+ return this._pdfDocument.getPage(i + 1).then(pdfPage => {
+ return pdfPage.getTextContent({
+ normalizeWhitespace: true
+ });
+ }).then(textContent => {
+ const textItems = textContent.items;
+ const strBuf = [];
+
+ for (let j = 0, jj = textItems.length; j < jj; j++) {
+ strBuf.push(textItems[j].str);
+ }
+
+ this._pageContents[i] = normalize(strBuf.join(""));
+ extractTextCapability.resolve(i);
+ }, reason => {
+ console.error(`Unable to get text content for page ${i + 1}`, reason);
+ this._pageContents[i] = "";
+ extractTextCapability.resolve(i);
+ });
+ });
+ }
+ }
+
+ _updatePage(index) {
+ if (this._scrollMatches && this._selected.pageIdx === index) {
+ this._linkService.page = index + 1;
+ }
+
+ this._eventBus.dispatch("updatetextlayermatches", {
+ source: this,
+ pageIndex: index
+ });
+ }
+
+ _updateAllPages() {
+ this._eventBus.dispatch("updatetextlayermatches", {
+ source: this,
+ pageIndex: -1
+ });
+ }
+
+ _nextMatch() {
+ const previous = this._state.findPrevious;
+ const currentPageIndex = this._linkService.page - 1;
+ const numPages = this._linkService.pagesCount;
+ this._highlightMatches = true;
+
+ if (this._dirtyMatch) {
+ this._dirtyMatch = false;
+ this._selected.pageIdx = this._selected.matchIdx = -1;
+ this._offset.pageIdx = currentPageIndex;
+ this._offset.matchIdx = null;
+ this._offset.wrapped = false;
+ this._resumePageIdx = null;
+ this._pageMatches.length = 0;
+ this._pageMatchesLength.length = 0;
+ this._matchesCountTotal = 0;
+
+ this._updateAllPages();
+
+ for (let i = 0; i < numPages; i++) {
+ if (this._pendingFindMatches[i] === true) {
+ continue;
+ }
+
+ this._pendingFindMatches[i] = true;
+
+ this._extractTextPromises[i].then(pageIdx => {
+ delete this._pendingFindMatches[pageIdx];
+
+ this._calculateMatch(pageIdx);
+ });
+ }
+ }
+
+ if (this._query === "") {
+ this._updateUIState(FindState.FOUND);
+
+ return;
+ }
+
+ if (this._resumePageIdx) {
+ return;
+ }
+
+ const offset = this._offset;
+ this._pagesToSearch = numPages;
+
+ if (offset.matchIdx !== null) {
+ const numPageMatches = this._pageMatches[offset.pageIdx].length;
+
+ if (!previous && offset.matchIdx + 1 < numPageMatches || previous && offset.matchIdx > 0) {
+ offset.matchIdx = previous ? offset.matchIdx - 1 : offset.matchIdx + 1;
+
+ this._updateMatch(true);
+
+ return;
+ }
+
+ this._advanceOffsetPage(previous);
+ }
+
+ this._nextPageMatch();
+ }
+
+ _matchesReady(matches) {
+ const offset = this._offset;
+ const numMatches = matches.length;
+ const previous = this._state.findPrevious;
+
+ if (numMatches) {
+ offset.matchIdx = previous ? numMatches - 1 : 0;
+
+ this._updateMatch(true);
+
+ return true;
+ }
+
+ this._advanceOffsetPage(previous);
+
+ if (offset.wrapped) {
+ offset.matchIdx = null;
+
+ if (this._pagesToSearch < 0) {
+ this._updateMatch(false);
+
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ _nextPageMatch() {
+ if (this._resumePageIdx !== null) {
+ console.error("There can only be one pending page.");
+ }
+
+ let matches = null;
+
+ do {
+ const pageIdx = this._offset.pageIdx;
+ matches = this._pageMatches[pageIdx];
+
+ if (!matches) {
+ this._resumePageIdx = pageIdx;
+ break;
+ }
+ } while (!this._matchesReady(matches));
+ }
+
+ _advanceOffsetPage(previous) {
+ const offset = this._offset;
+ const numPages = this._linkService.pagesCount;
+ offset.pageIdx = previous ? offset.pageIdx - 1 : offset.pageIdx + 1;
+ offset.matchIdx = null;
+ this._pagesToSearch--;
+
+ if (offset.pageIdx >= numPages || offset.pageIdx < 0) {
+ offset.pageIdx = previous ? numPages - 1 : 0;
+ offset.wrapped = true;
+ }
+ }
+
+ _updateMatch(found = false) {
+ let state = FindState.NOT_FOUND;
+ const wrapped = this._offset.wrapped;
+ this._offset.wrapped = false;
+
+ if (found) {
+ const previousPage = this._selected.pageIdx;
+ this._selected.pageIdx = this._offset.pageIdx;
+ this._selected.matchIdx = this._offset.matchIdx;
+ state = wrapped ? FindState.WRAPPED : FindState.FOUND;
+
+ if (previousPage !== -1 && previousPage !== this._selected.pageIdx) {
+ this._updatePage(previousPage);
+ }
+ }
+
+ this._updateUIState(state, this._state.findPrevious);
+
+ if (this._selected.pageIdx !== -1) {
+ this._scrollMatches = true;
+
+ this._updatePage(this._selected.pageIdx);
+ }
+ }
+
+ _onFindBarClose(evt) {
+ const pdfDocument = this._pdfDocument;
+
+ this._firstPageCapability.promise.then(() => {
+ if (!this._pdfDocument || pdfDocument && this._pdfDocument !== pdfDocument) {
+ return;
+ }
+
+ if (this._findTimeout) {
+ clearTimeout(this._findTimeout);
+ this._findTimeout = null;
+ }
+
+ if (this._resumePageIdx) {
+ this._resumePageIdx = null;
+ this._dirtyMatch = true;
+ }
+
+ this._updateUIState(FindState.FOUND);
+
+ this._highlightMatches = false;
+
+ this._updateAllPages();
+ });
+ }
+
+ _requestMatchesCount() {
+ const {
+ pageIdx,
+ matchIdx
+ } = this._selected;
+ let current = 0,
+ total = this._matchesCountTotal;
+
+ if (matchIdx !== -1) {
+ for (let i = 0; i < pageIdx; i++) {
+ current += this._pageMatches[i] && this._pageMatches[i].length || 0;
+ }
+
+ current += matchIdx + 1;
+ }
+
+ if (current < 1 || current > total) {
+ current = total = 0;
+ }
+
+ return {
+ current,
+ total
+ };
+ }
+
+ _updateUIResultsCount() {
+ this._eventBus.dispatch("updatefindmatchescount", {
+ source: this,
+ matchesCount: this._requestMatchesCount()
+ });
+ }
+
+ _updateUIState(state, previous) {
+ this._eventBus.dispatch("updatefindcontrolstate", {
+ source: this,
+ state,
+ previous,
+ matchesCount: this._requestMatchesCount()
+ });
+ }
+
+}
+
+exports.PDFFindController = PDFFindController;
+
+/***/ }),
+/* 16 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.getCharacterType = getCharacterType;
+exports.CharacterType = void 0;
+const CharacterType = {
+ SPACE: 0,
+ ALPHA_LETTER: 1,
+ PUNCT: 2,
+ HAN_LETTER: 3,
+ KATAKANA_LETTER: 4,
+ HIRAGANA_LETTER: 5,
+ HALFWIDTH_KATAKANA_LETTER: 6,
+ THAI_LETTER: 7
+};
+exports.CharacterType = CharacterType;
+
+function isAlphabeticalScript(charCode) {
+ return charCode < 0x2e80;
+}
+
+function isAscii(charCode) {
+ return (charCode & 0xff80) === 0;
+}
+
+function isAsciiAlpha(charCode) {
+ return charCode >= 0x61 && charCode <= 0x7a || charCode >= 0x41 && charCode <= 0x5a;
+}
+
+function isAsciiDigit(charCode) {
+ return charCode >= 0x30 && charCode <= 0x39;
+}
+
+function isAsciiSpace(charCode) {
+ return charCode === 0x20 || charCode === 0x09 || charCode === 0x0d || charCode === 0x0a;
+}
+
+function isHan(charCode) {
+ return charCode >= 0x3400 && charCode <= 0x9fff || charCode >= 0xf900 && charCode <= 0xfaff;
+}
+
+function isKatakana(charCode) {
+ return charCode >= 0x30a0 && charCode <= 0x30ff;
+}
+
+function isHiragana(charCode) {
+ return charCode >= 0x3040 && charCode <= 0x309f;
+}
+
+function isHalfwidthKatakana(charCode) {
+ return charCode >= 0xff60 && charCode <= 0xff9f;
+}
+
+function isThai(charCode) {
+ return (charCode & 0xff80) === 0x0e00;
+}
+
+function getCharacterType(charCode) {
+ if (isAlphabeticalScript(charCode)) {
+ if (isAscii(charCode)) {
+ if (isAsciiSpace(charCode)) {
+ return CharacterType.SPACE;
+ } else if (isAsciiAlpha(charCode) || isAsciiDigit(charCode) || charCode === 0x5f) {
+ return CharacterType.ALPHA_LETTER;
+ }
+
+ return CharacterType.PUNCT;
+ } else if (isThai(charCode)) {
+ return CharacterType.THAI_LETTER;
+ } else if (charCode === 0xa0) {
+ return CharacterType.SPACE;
+ }
+
+ return CharacterType.ALPHA_LETTER;
+ }
+
+ if (isHan(charCode)) {
+ return CharacterType.HAN_LETTER;
+ } else if (isKatakana(charCode)) {
+ return CharacterType.KATAKANA_LETTER;
+ } else if (isHiragana(charCode)) {
+ return CharacterType.HIRAGANA_LETTER;
+ } else if (isHalfwidthKatakana(charCode)) {
+ return CharacterType.HALFWIDTH_KATAKANA_LETTER;
+ }
+
+ return CharacterType.ALPHA_LETTER;
+}
+
+/***/ }),
+/* 17 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.isDestHashesEqual = isDestHashesEqual;
+exports.isDestArraysEqual = isDestArraysEqual;
+exports.PDFHistory = void 0;
+
+var _ui_utils = __webpack_require__(2);
+
+const HASH_CHANGE_TIMEOUT = 1000;
+const POSITION_UPDATED_THRESHOLD = 50;
+const UPDATE_VIEWAREA_TIMEOUT = 1000;
+
+function getCurrentHash() {
+ return document.location.hash;
+}
+
+class PDFHistory {
+ constructor({
+ linkService,
+ eventBus
+ }) {
+ this.linkService = linkService;
+ this.eventBus = eventBus || (0, _ui_utils.getGlobalEventBus)();
+ this._initialized = false;
+ this._fingerprint = "";
+ this.reset();
+ this._boundEvents = null;
+ this._isViewerInPresentationMode = false;
+
+ this.eventBus._on("presentationmodechanged", evt => {
+ this._isViewerInPresentationMode = evt.active || evt.switchInProgress;
+ });
+
+ this.eventBus._on("pagesinit", () => {
+ this._isPagesLoaded = false;
+
+ const onPagesLoaded = evt => {
+ this.eventBus._off("pagesloaded", onPagesLoaded);
+
+ this._isPagesLoaded = !!evt.pagesCount;
+ };
+
+ this.eventBus._on("pagesloaded", onPagesLoaded);
+ });
+ }
+
+ initialize({
+ fingerprint,
+ resetHistory = false,
+ updateUrl = false
+ }) {
+ if (!fingerprint || typeof fingerprint !== "string") {
+ console.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.');
+ return;
+ }
+
+ if (this._initialized) {
+ this.reset();
+ }
+
+ const reInitialized = this._fingerprint !== "" && this._fingerprint !== fingerprint;
+ this._fingerprint = fingerprint;
+ this._updateUrl = updateUrl === true;
+ this._initialized = true;
+
+ this._bindEvents();
+
+ const state = window.history.state;
+ this._popStateInProgress = false;
+ this._blockHashChange = 0;
+ this._currentHash = getCurrentHash();
+ this._numPositionUpdates = 0;
+ this._uid = this._maxUid = 0;
+ this._destination = null;
+ this._position = null;
+
+ if (!this._isValidState(state, true) || resetHistory) {
+ const {
+ hash,
+ page,
+ rotation
+ } = this._parseCurrentHash();
+
+ if (!hash || reInitialized || resetHistory) {
+ this._pushOrReplaceState(null, true);
+
+ return;
+ }
+
+ this._pushOrReplaceState({
+ hash,
+ page,
+ rotation
+ }, true);
+
+ return;
+ }
+
+ const destination = state.destination;
+
+ this._updateInternalState(destination, state.uid, true);
+
+ if (this._uid > this._maxUid) {
+ this._maxUid = this._uid;
+ }
+
+ if (destination.rotation !== undefined) {
+ this._initialRotation = destination.rotation;
+ }
+
+ if (destination.dest) {
+ this._initialBookmark = JSON.stringify(destination.dest);
+ this._destination.page = null;
+ } else if (destination.hash) {
+ this._initialBookmark = destination.hash;
+ } else if (destination.page) {
+ this._initialBookmark = `page=${destination.page}`;
+ }
+ }
+
+ reset() {
+ if (this._initialized) {
+ this._pageHide();
+
+ this._initialized = false;
+
+ this._unbindEvents();
+ }
+
+ if (this._updateViewareaTimeout) {
+ clearTimeout(this._updateViewareaTimeout);
+ this._updateViewareaTimeout = null;
+ }
+
+ this._initialBookmark = null;
+ this._initialRotation = null;
+ }
+
+ push({
+ namedDest = null,
+ explicitDest,
+ pageNumber
+ }) {
+ if (!this._initialized) {
+ return;
+ }
+
+ if (namedDest && typeof namedDest !== "string") {
+ console.error("PDFHistory.push: " + `"${namedDest}" is not a valid namedDest parameter.`);
+ return;
+ } else if (!Array.isArray(explicitDest)) {
+ console.error("PDFHistory.push: " + `"${explicitDest}" is not a valid explicitDest parameter.`);
+ return;
+ } else if (!(Number.isInteger(pageNumber) && pageNumber > 0 && pageNumber <= this.linkService.pagesCount)) {
+ if (pageNumber !== null || this._destination) {
+ console.error("PDFHistory.push: " + `"${pageNumber}" is not a valid pageNumber parameter.`);
+ return;
+ }
+ }
+
+ const hash = namedDest || JSON.stringify(explicitDest);
+
+ if (!hash) {
+ return;
+ }
+
+ let forceReplace = false;
+
+ if (this._destination && (isDestHashesEqual(this._destination.hash, hash) || isDestArraysEqual(this._destination.dest, explicitDest))) {
+ if (this._destination.page) {
+ return;
+ }
+
+ forceReplace = true;
+ }
+
+ if (this._popStateInProgress && !forceReplace) {
+ return;
+ }
+
+ this._pushOrReplaceState({
+ dest: explicitDest,
+ hash,
+ page: pageNumber,
+ rotation: this.linkService.rotation
+ }, forceReplace);
+
+ if (!this._popStateInProgress) {
+ this._popStateInProgress = true;
+ Promise.resolve().then(() => {
+ this._popStateInProgress = false;
+ });
+ }
+ }
+
+ pushCurrentPosition() {
+ if (!this._initialized || this._popStateInProgress) {
+ return;
+ }
+
+ this._tryPushCurrentPosition();
+ }
+
+ back() {
+ if (!this._initialized || this._popStateInProgress) {
+ return;
+ }
+
+ const state = window.history.state;
+
+ if (this._isValidState(state) && state.uid > 0) {
+ window.history.back();
+ }
+ }
+
+ forward() {
+ if (!this._initialized || this._popStateInProgress) {
+ return;
+ }
+
+ const state = window.history.state;
+
+ if (this._isValidState(state) && state.uid < this._maxUid) {
+ window.history.forward();
+ }
+ }
+
+ get popStateInProgress() {
+ return this._initialized && (this._popStateInProgress || this._blockHashChange > 0);
+ }
+
+ get initialBookmark() {
+ return this._initialized ? this._initialBookmark : null;
+ }
+
+ get initialRotation() {
+ return this._initialized ? this._initialRotation : null;
+ }
+
+ _pushOrReplaceState(destination, forceReplace = false) {
+ const shouldReplace = forceReplace || !this._destination;
+ const newState = {
+ fingerprint: this._fingerprint,
+ uid: shouldReplace ? this._uid : this._uid + 1,
+ destination
+ };
+
+ this._updateInternalState(destination, newState.uid);
+
+ let newUrl;
+
+ if (this._updateUrl && destination && destination.hash) {
+ const baseUrl = document.location.href.split("#")[0];
+
+ if (!baseUrl.startsWith("file://")) {
+ newUrl = `${baseUrl}#${destination.hash}`;
+ }
+ }
+
+ if (shouldReplace) {
+ window.history.replaceState(newState, "", newUrl);
+ } else {
+ this._maxUid = this._uid;
+ window.history.pushState(newState, "", newUrl);
+ }
+ }
+
+ _tryPushCurrentPosition(temporary = false) {
+ if (!this._position) {
+ return;
+ }
+
+ let position = this._position;
+
+ if (temporary) {
+ position = Object.assign(Object.create(null), this._position);
+ position.temporary = true;
+ }
+
+ if (!this._destination) {
+ this._pushOrReplaceState(position);
+
+ return;
+ }
+
+ if (this._destination.temporary) {
+ this._pushOrReplaceState(position, true);
+
+ return;
+ }
+
+ if (this._destination.hash === position.hash) {
+ return;
+ }
+
+ if (!this._destination.page && (POSITION_UPDATED_THRESHOLD <= 0 || this._numPositionUpdates <= POSITION_UPDATED_THRESHOLD)) {
+ return;
+ }
+
+ let forceReplace = false;
+
+ if (this._destination.page >= position.first && this._destination.page <= position.page) {
+ if (this._destination.dest || !this._destination.first) {
+ return;
+ }
+
+ forceReplace = true;
+ }
+
+ this._pushOrReplaceState(position, forceReplace);
+ }
+
+ _isValidState(state, checkReload = false) {
+ if (!state) {
+ return false;
+ }
+
+ if (state.fingerprint !== this._fingerprint) {
+ if (checkReload) {
+ if (typeof state.fingerprint !== "string" || state.fingerprint.length !== this._fingerprint.length) {
+ return false;
+ }
+
+ const [perfEntry] = performance.getEntriesByType("navigation");
+
+ if (!perfEntry || perfEntry.type !== "reload") {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ }
+
+ if (!Number.isInteger(state.uid) || state.uid < 0) {
+ return false;
+ }
+
+ if (state.destination === null || typeof state.destination !== "object") {
+ return false;
+ }
+
+ return true;
+ }
+
+ _updateInternalState(destination, uid, removeTemporary = false) {
+ if (this._updateViewareaTimeout) {
+ clearTimeout(this._updateViewareaTimeout);
+ this._updateViewareaTimeout = null;
+ }
+
+ if (removeTemporary && destination && destination.temporary) {
+ delete destination.temporary;
+ }
+
+ this._destination = destination;
+ this._uid = uid;
+ this._numPositionUpdates = 0;
+ }
+
+ _parseCurrentHash() {
+ const hash = unescape(getCurrentHash()).substring(1);
+ let page = (0, _ui_utils.parseQueryString)(hash).page | 0;
+
+ if (!(Number.isInteger(page) && page > 0 && page <= this.linkService.pagesCount)) {
+ page = null;
+ }
+
+ return {
+ hash,
+ page,
+ rotation: this.linkService.rotation
+ };
+ }
+
+ _updateViewarea({
+ location
+ }) {
+ if (this._updateViewareaTimeout) {
+ clearTimeout(this._updateViewareaTimeout);
+ this._updateViewareaTimeout = null;
+ }
+
+ this._position = {
+ hash: this._isViewerInPresentationMode ? `page=${location.pageNumber}` : location.pdfOpenParams.substring(1),
+ page: this.linkService.page,
+ first: location.pageNumber,
+ rotation: location.rotation
+ };
+
+ if (this._popStateInProgress) {
+ return;
+ }
+
+ if (POSITION_UPDATED_THRESHOLD > 0 && this._isPagesLoaded && this._destination && !this._destination.page) {
+ this._numPositionUpdates++;
+ }
+
+ if (UPDATE_VIEWAREA_TIMEOUT > 0) {
+ this._updateViewareaTimeout = setTimeout(() => {
+ if (!this._popStateInProgress) {
+ this._tryPushCurrentPosition(true);
+ }
+
+ this._updateViewareaTimeout = null;
+ }, UPDATE_VIEWAREA_TIMEOUT);
+ }
+ }
+
+ _popState({
+ state
+ }) {
+ const newHash = getCurrentHash(),
+ hashChanged = this._currentHash !== newHash;
+ this._currentHash = newHash;
+
+ if (!state) {
+ this._uid++;
+
+ const {
+ hash,
+ page,
+ rotation
+ } = this._parseCurrentHash();
+
+ this._pushOrReplaceState({
+ hash,
+ page,
+ rotation
+ }, true);
+
+ return;
+ }
+
+ if (!this._isValidState(state)) {
+ return;
+ }
+
+ this._popStateInProgress = true;
+
+ if (hashChanged) {
+ this._blockHashChange++;
+ (0, _ui_utils.waitOnEventOrTimeout)({
+ target: window,
+ name: "hashchange",
+ delay: HASH_CHANGE_TIMEOUT
+ }).then(() => {
+ this._blockHashChange--;
+ });
+ }
+
+ const destination = state.destination;
+
+ this._updateInternalState(destination, state.uid, true);
+
+ if (this._uid > this._maxUid) {
+ this._maxUid = this._uid;
+ }
+
+ if ((0, _ui_utils.isValidRotation)(destination.rotation)) {
+ this.linkService.rotation = destination.rotation;
+ }
+
+ if (destination.dest) {
+ this.linkService.navigateTo(destination.dest);
+ } else if (destination.hash) {
+ this.linkService.setHash(destination.hash);
+ } else if (destination.page) {
+ this.linkService.page = destination.page;
+ }
+
+ Promise.resolve().then(() => {
+ this._popStateInProgress = false;
+ });
+ }
+
+ _pageHide() {
+ if (!this._destination || this._destination.temporary) {
+ this._tryPushCurrentPosition();
+ }
+ }
+
+ _bindEvents() {
+ if (this._boundEvents) {
+ return;
+ }
+
+ this._boundEvents = {
+ updateViewarea: this._updateViewarea.bind(this),
+ popState: this._popState.bind(this),
+ pageHide: this._pageHide.bind(this)
+ };
+
+ this.eventBus._on("updateviewarea", this._boundEvents.updateViewarea);
+
+ window.addEventListener("popstate", this._boundEvents.popState);
+ window.addEventListener("pagehide", this._boundEvents.pageHide);
+ }
+
+ _unbindEvents() {
+ if (!this._boundEvents) {
+ return;
+ }
+
+ this.eventBus._off("updateviewarea", this._boundEvents.updateViewarea);
+
+ window.removeEventListener("popstate", this._boundEvents.popState);
+ window.removeEventListener("pagehide", this._boundEvents.pageHide);
+ this._boundEvents = null;
+ }
+
+}
+
+exports.PDFHistory = PDFHistory;
+
+function isDestHashesEqual(destHash, pushHash) {
+ if (typeof destHash !== "string" || typeof pushHash !== "string") {
+ return false;
+ }
+
+ if (destHash === pushHash) {
+ return true;
+ }
+
+ const {
+ nameddest
+ } = (0, _ui_utils.parseQueryString)(destHash);
+
+ if (nameddest === pushHash) {
+ return true;
+ }
+
+ return false;
+}
+
+function isDestArraysEqual(firstDest, secondDest) {
+ function isEntryEqual(first, second) {
+ if (typeof first !== typeof second) {
+ return false;
+ }
+
+ if (Array.isArray(first) || Array.isArray(second)) {
+ return false;
+ }
+
+ if (first !== null && typeof first === "object" && second !== null) {
+ if (Object.keys(first).length !== Object.keys(second).length) {
+ return false;
+ }
+
+ for (const key in first) {
+ if (!isEntryEqual(first[key], second[key])) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ return first === second || Number.isNaN(first) && Number.isNaN(second);
+ }
+
+ if (!(Array.isArray(firstDest) && Array.isArray(secondDest))) {
+ return false;
+ }
+
+ if (firstDest.length !== secondDest.length) {
+ return false;
+ }
+
+ for (let i = 0, ii = firstDest.length; i < ii; i++) {
+ if (!isEntryEqual(firstDest[i], secondDest[i])) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+/***/ }),
+/* 18 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.SimpleLinkService = exports.PDFLinkService = void 0;
+
+var _ui_utils = __webpack_require__(2);
+
+class PDFLinkService {
+ constructor({
+ eventBus,
+ externalLinkTarget = null,
+ externalLinkRel = null,
+ externalLinkEnabled = true,
+ ignoreDestinationZoom = false
+ } = {}) {
+ this.eventBus = eventBus || (0, _ui_utils.getGlobalEventBus)();
+ this.externalLinkTarget = externalLinkTarget;
+ this.externalLinkRel = externalLinkRel;
+ this.externalLinkEnabled = externalLinkEnabled;
+ this._ignoreDestinationZoom = ignoreDestinationZoom;
+ this.baseUrl = null;
+ this.pdfDocument = null;
+ this.pdfViewer = null;
+ this.pdfHistory = null;
+ this._pagesRefCache = null;
+ }
+
+ setDocument(pdfDocument, baseUrl = null) {
+ this.baseUrl = baseUrl;
+ this.pdfDocument = pdfDocument;
+ this._pagesRefCache = Object.create(null);
+ }
+
+ setViewer(pdfViewer) {
+ this.pdfViewer = pdfViewer;
+ }
+
+ setHistory(pdfHistory) {
+ this.pdfHistory = pdfHistory;
+ }
+
+ get pagesCount() {
+ return this.pdfDocument ? this.pdfDocument.numPages : 0;
+ }
+
+ get page() {
+ return this.pdfViewer.currentPageNumber;
+ }
+
+ set page(value) {
+ this.pdfViewer.currentPageNumber = value;
+ }
+
+ get rotation() {
+ return this.pdfViewer.pagesRotation;
+ }
+
+ set rotation(value) {
+ this.pdfViewer.pagesRotation = value;
+ }
+
+ navigateTo(dest) {
+ const goToDestination = ({
+ namedDest,
+ explicitDest
+ }) => {
+ const destRef = explicitDest[0];
+ let pageNumber;
+
+ if (destRef instanceof Object) {
+ pageNumber = this._cachedPageNumber(destRef);
+
+ if (pageNumber === null) {
+ this.pdfDocument.getPageIndex(destRef).then(pageIndex => {
+ this.cachePageRef(pageIndex + 1, destRef);
+ goToDestination({
+ namedDest,
+ explicitDest
+ });
+ }).catch(() => {
+ console.error(`PDFLinkService.navigateTo: "${destRef}" is not ` + `a valid page reference, for dest="${dest}".`);
+ });
+ return;
+ }
+ } else if (Number.isInteger(destRef)) {
+ pageNumber = destRef + 1;
+ } else {
+ console.error(`PDFLinkService.navigateTo: "${destRef}" is not ` + `a valid destination reference, for dest="${dest}".`);
+ return;
+ }
+
+ if (!pageNumber || pageNumber < 1 || pageNumber > this.pagesCount) {
+ console.error(`PDFLinkService.navigateTo: "${pageNumber}" is not ` + `a valid page number, for dest="${dest}".`);
+ return;
+ }
+
+ if (this.pdfHistory) {
+ this.pdfHistory.pushCurrentPosition();
+ this.pdfHistory.push({
+ namedDest,
+ explicitDest,
+ pageNumber
+ });
+ }
+
+ this.pdfViewer.scrollPageIntoView({
+ pageNumber,
+ destArray: explicitDest,
+ ignoreDestinationZoom: this._ignoreDestinationZoom
+ });
+ };
+
+ new Promise((resolve, reject) => {
+ if (typeof dest === "string") {
+ this.pdfDocument.getDestination(dest).then(destArray => {
+ resolve({
+ namedDest: dest,
+ explicitDest: destArray
+ });
+ });
+ return;
+ }
+
+ resolve({
+ namedDest: "",
+ explicitDest: dest
+ });
+ }).then(data => {
+ if (!Array.isArray(data.explicitDest)) {
+ console.error(`PDFLinkService.navigateTo: "${data.explicitDest}" is` + ` not a valid destination array, for dest="${dest}".`);
+ return;
+ }
+
+ goToDestination(data);
+ });
+ }
+
+ getDestinationHash(dest) {
+ if (typeof dest === "string") {
+ return this.getAnchorUrl("#" + escape(dest));
+ }
+
+ if (Array.isArray(dest)) {
+ const str = JSON.stringify(dest);
+ return this.getAnchorUrl("#" + escape(str));
+ }
+
+ return this.getAnchorUrl("");
+ }
+
+ getAnchorUrl(anchor) {
+ return (this.baseUrl || "") + anchor;
+ }
+
+ setHash(hash) {
+ let pageNumber, dest;
+
+ if (hash.includes("=")) {
+ const params = (0, _ui_utils.parseQueryString)(hash);
+
+ if ("search" in params) {
+ this.eventBus.dispatch("findfromurlhash", {
+ source: this,
+ query: params["search"].replace(/"/g, ""),
+ phraseSearch: params["phrase"] === "true"
+ });
+ }
+
+ if ("nameddest" in params) {
+ this.navigateTo(params.nameddest);
+ return;
+ }
+
+ if ("page" in params) {
+ pageNumber = params.page | 0 || 1;
+ }
+
+ if ("zoom" in params) {
+ const zoomArgs = params.zoom.split(",");
+ const zoomArg = zoomArgs[0];
+ const zoomArgNumber = parseFloat(zoomArg);
+
+ if (!zoomArg.includes("Fit")) {
+ dest = [null, {
+ name: "XYZ"
+ }, zoomArgs.length > 1 ? zoomArgs[1] | 0 : null, zoomArgs.length > 2 ? zoomArgs[2] | 0 : null, zoomArgNumber ? zoomArgNumber / 100 : zoomArg];
+ } else {
+ if (zoomArg === "Fit" || zoomArg === "FitB") {
+ dest = [null, {
+ name: zoomArg
+ }];
+ } else if (zoomArg === "FitH" || zoomArg === "FitBH" || zoomArg === "FitV" || zoomArg === "FitBV") {
+ dest = [null, {
+ name: zoomArg
+ }, zoomArgs.length > 1 ? zoomArgs[1] | 0 : null];
+ } else if (zoomArg === "FitR") {
+ if (zoomArgs.length !== 5) {
+ console.error('PDFLinkService.setHash: Not enough parameters for "FitR".');
+ } else {
+ dest = [null, {
+ name: zoomArg
+ }, zoomArgs[1] | 0, zoomArgs[2] | 0, zoomArgs[3] | 0, zoomArgs[4] | 0];
+ }
+ } else {
+ console.error(`PDFLinkService.setHash: "${zoomArg}" is not ` + "a valid zoom value.");
+ }
+ }
+ }
+
+ if (dest) {
+ this.pdfViewer.scrollPageIntoView({
+ pageNumber: pageNumber || this.page,
+ destArray: dest,
+ allowNegativeOffset: true
+ });
+ } else if (pageNumber) {
+ this.page = pageNumber;
+ }
+
+ if ("pagemode" in params) {
+ this.eventBus.dispatch("pagemode", {
+ source: this,
+ mode: params.pagemode
+ });
+ }
+ } else {
+ dest = unescape(hash);
+
+ try {
+ dest = JSON.parse(dest);
+
+ if (!Array.isArray(dest)) {
+ dest = dest.toString();
+ }
+ } catch (ex) {}
+
+ if (typeof dest === "string" || isValidExplicitDestination(dest)) {
+ this.navigateTo(dest);
+ return;
+ }
+
+ console.error(`PDFLinkService.setHash: "${unescape(hash)}" is not ` + "a valid destination.");
+ }
+ }
+
+ executeNamedAction(action) {
+ switch (action) {
+ case "GoBack":
+ if (this.pdfHistory) {
+ this.pdfHistory.back();
+ }
+
+ break;
+
+ case "GoForward":
+ if (this.pdfHistory) {
+ this.pdfHistory.forward();
+ }
+
+ break;
+
+ case "NextPage":
+ if (this.page < this.pagesCount) {
+ this.page++;
+ }
+
+ break;
+
+ case "PrevPage":
+ if (this.page > 1) {
+ this.page--;
+ }
+
+ break;
+
+ case "LastPage":
+ this.page = this.pagesCount;
+ break;
+
+ case "FirstPage":
+ this.page = 1;
+ break;
+
+ default:
+ break;
+ }
+
+ this.eventBus.dispatch("namedaction", {
+ source: this,
+ action
+ });
+ }
+
+ cachePageRef(pageNum, pageRef) {
+ if (!pageRef) {
+ return;
+ }
+
+ const refStr = pageRef.gen === 0 ? `${pageRef.num}R` : `${pageRef.num}R${pageRef.gen}`;
+ this._pagesRefCache[refStr] = pageNum;
+ }
+
+ _cachedPageNumber(pageRef) {
+ const refStr = pageRef.gen === 0 ? `${pageRef.num}R` : `${pageRef.num}R${pageRef.gen}`;
+ return this._pagesRefCache && this._pagesRefCache[refStr] || null;
+ }
+
+ isPageVisible(pageNumber) {
+ return this.pdfViewer.isPageVisible(pageNumber);
+ }
+
+}
+
+exports.PDFLinkService = PDFLinkService;
+
+function isValidExplicitDestination(dest) {
+ if (!Array.isArray(dest)) {
+ return false;
+ }
+
+ const destLength = dest.length;
+
+ if (destLength < 2) {
+ return false;
+ }
+
+ const page = dest[0];
+
+ if (!(typeof page === "object" && Number.isInteger(page.num) && Number.isInteger(page.gen)) && !(Number.isInteger(page) && page >= 0)) {
+ return false;
+ }
+
+ const zoom = dest[1];
+
+ if (!(typeof zoom === "object" && typeof zoom.name === "string")) {
+ return false;
+ }
+
+ let allowNull = true;
+
+ switch (zoom.name) {
+ case "XYZ":
+ if (destLength !== 5) {
+ return false;
+ }
+
+ break;
+
+ case "Fit":
+ case "FitB":
+ return destLength === 2;
+
+ case "FitH":
+ case "FitBH":
+ case "FitV":
+ case "FitBV":
+ if (destLength !== 3) {
+ return false;
+ }
+
+ break;
+
+ case "FitR":
+ if (destLength !== 6) {
+ return false;
+ }
+
+ allowNull = false;
+ break;
+
+ default:
+ return false;
+ }
+
+ for (let i = 2; i < destLength; i++) {
+ const param = dest[i];
+
+ if (!(typeof param === "number" || allowNull && param === null)) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+class SimpleLinkService {
+ constructor() {
+ this.externalLinkTarget = null;
+ this.externalLinkRel = null;
+ this.externalLinkEnabled = true;
+ this._ignoreDestinationZoom = false;
+ }
+
+ get pagesCount() {
+ return 0;
+ }
+
+ get page() {
+ return 0;
+ }
+
+ set page(value) {}
+
+ get rotation() {
+ return 0;
+ }
+
+ set rotation(value) {}
+
+ navigateTo(dest) {}
+
+ getDestinationHash(dest) {
+ return "#";
+ }
+
+ getAnchorUrl(hash) {
+ return "#";
+ }
+
+ setHash(hash) {}
+
+ executeNamedAction(action) {}
+
+ cachePageRef(pageNum, pageRef) {}
+
+ isPageVisible(pageNumber) {
+ return true;
+ }
+
+}
+
+exports.SimpleLinkService = SimpleLinkService;
+
+/***/ }),
+/* 19 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PDFOutlineViewer = void 0;
+
+var _pdfjsLib = __webpack_require__(4);
+
+const DEFAULT_TITLE = "\u2013";
+
+class PDFOutlineViewer {
+ constructor({
+ container,
+ linkService,
+ eventBus
+ }) {
+ this.container = container;
+ this.linkService = linkService;
+ this.eventBus = eventBus;
+ this.reset();
+
+ eventBus._on("toggleoutlinetree", this.toggleOutlineTree.bind(this));
+ }
+
+ reset() {
+ this.outline = null;
+ this.lastToggleIsShow = true;
+ this.container.textContent = "";
+ this.container.classList.remove("outlineWithDeepNesting");
+ }
+
+ _dispatchEvent(outlineCount) {
+ this.eventBus.dispatch("outlineloaded", {
+ source: this,
+ outlineCount
+ });
+ }
+
+ _bindLink(element, {
+ url,
+ newWindow,
+ dest
+ }) {
+ const {
+ linkService
+ } = this;
+
+ if (url) {
+ (0, _pdfjsLib.addLinkAttributes)(element, {
+ url,
+ target: newWindow ? _pdfjsLib.LinkTarget.BLANK : linkService.externalLinkTarget,
+ rel: linkService.externalLinkRel,
+ enabled: linkService.externalLinkEnabled
+ });
+ return;
+ }
+
+ element.href = linkService.getDestinationHash(dest);
+
+ element.onclick = () => {
+ if (dest) {
+ linkService.navigateTo(dest);
+ }
+
+ return false;
+ };
+ }
+
+ _setStyles(element, {
+ bold,
+ italic
+ }) {
+ if (bold) {
+ element.style.fontWeight = "bold";
+ }
+
+ if (italic) {
+ element.style.fontStyle = "italic";
+ }
+ }
+
+ _addToggleButton(div, {
+ count,
+ items
+ }) {
+ const toggler = document.createElement("div");
+ toggler.className = "outlineItemToggler";
+
+ if (count < 0 && Math.abs(count) === items.length) {
+ toggler.classList.add("outlineItemsHidden");
+ }
+
+ toggler.onclick = evt => {
+ evt.stopPropagation();
+ toggler.classList.toggle("outlineItemsHidden");
+
+ if (evt.shiftKey) {
+ const shouldShowAll = !toggler.classList.contains("outlineItemsHidden");
+
+ this._toggleOutlineItem(div, shouldShowAll);
+ }
+ };
+
+ div.insertBefore(toggler, div.firstChild);
+ }
+
+ _toggleOutlineItem(root, show = false) {
+ this.lastToggleIsShow = show;
+
+ for (const toggler of root.querySelectorAll(".outlineItemToggler")) {
+ toggler.classList.toggle("outlineItemsHidden", !show);
+ }
+ }
+
+ toggleOutlineTree() {
+ if (!this.outline) {
+ return;
+ }
+
+ this._toggleOutlineItem(this.container, !this.lastToggleIsShow);
+ }
+
+ render({
+ outline
+ }) {
+ let outlineCount = 0;
+
+ if (this.outline) {
+ this.reset();
+ }
+
+ this.outline = outline || null;
+
+ if (!outline) {
+ this._dispatchEvent(outlineCount);
+
+ return;
+ }
+
+ const fragment = document.createDocumentFragment();
+ const queue = [{
+ parent: fragment,
+ items: this.outline
+ }];
+ let hasAnyNesting = false;
+
+ while (queue.length > 0) {
+ const levelData = queue.shift();
+
+ for (const item of levelData.items) {
+ const div = document.createElement("div");
+ div.className = "outlineItem";
+ const element = document.createElement("a");
+
+ this._bindLink(element, item);
+
+ this._setStyles(element, item);
+
+ element.textContent = (0, _pdfjsLib.removeNullCharacters)(item.title) || DEFAULT_TITLE;
+ div.appendChild(element);
+
+ if (item.items.length > 0) {
+ hasAnyNesting = true;
+
+ this._addToggleButton(div, item);
+
+ const itemsDiv = document.createElement("div");
+ itemsDiv.className = "outlineItems";
+ div.appendChild(itemsDiv);
+ queue.push({
+ parent: itemsDiv,
+ items: item.items
+ });
+ }
+
+ levelData.parent.appendChild(div);
+ outlineCount++;
+ }
+ }
+
+ if (hasAnyNesting) {
+ this.container.classList.add("outlineWithDeepNesting");
+ this.lastToggleIsShow = fragment.querySelectorAll(".outlineItemsHidden").length === 0;
+ }
+
+ this.container.appendChild(fragment);
+
+ this._dispatchEvent(outlineCount);
+ }
+
+}
+
+exports.PDFOutlineViewer = PDFOutlineViewer;
+
+/***/ }),
+/* 20 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PDFPresentationMode = void 0;
+
+var _ui_utils = __webpack_require__(2);
+
+const DELAY_BEFORE_RESETTING_SWITCH_IN_PROGRESS = 1500;
+const DELAY_BEFORE_HIDING_CONTROLS = 3000;
+const ACTIVE_SELECTOR = "pdfPresentationMode";
+const CONTROLS_SELECTOR = "pdfPresentationModeControls";
+const MOUSE_SCROLL_COOLDOWN_TIME = 50;
+const PAGE_SWITCH_THRESHOLD = 0.1;
+const SWIPE_MIN_DISTANCE_THRESHOLD = 50;
+const SWIPE_ANGLE_THRESHOLD = Math.PI / 6;
+
+class PDFPresentationMode {
+ constructor({
+ container,
+ pdfViewer,
+ eventBus,
+ contextMenuItems = null
+ }) {
+ this.container = container;
+ this.pdfViewer = pdfViewer;
+ this.eventBus = eventBus;
+ this.active = false;
+ this.args = null;
+ this.contextMenuOpen = false;
+ this.mouseScrollTimeStamp = 0;
+ this.mouseScrollDelta = 0;
+ this.touchSwipeState = null;
+
+ if (contextMenuItems) {
+ contextMenuItems.contextFirstPage.addEventListener("click", () => {
+ this.contextMenuOpen = false;
+ this.eventBus.dispatch("firstpage", {
+ source: this
+ });
+ });
+ contextMenuItems.contextLastPage.addEventListener("click", () => {
+ this.contextMenuOpen = false;
+ this.eventBus.dispatch("lastpage", {
+ source: this
+ });
+ });
+ contextMenuItems.contextPageRotateCw.addEventListener("click", () => {
+ this.contextMenuOpen = false;
+ this.eventBus.dispatch("rotatecw", {
+ source: this
+ });
+ });
+ contextMenuItems.contextPageRotateCcw.addEventListener("click", () => {
+ this.contextMenuOpen = false;
+ this.eventBus.dispatch("rotateccw", {
+ source: this
+ });
+ });
+ }
+ }
+
+ request() {
+ if (this.switchInProgress || this.active || !this.pdfViewer.pagesCount) {
+ return false;
+ }
+
+ this._addFullscreenChangeListeners();
+
+ this._setSwitchInProgress();
+
+ this._notifyStateChange();
+
+ if (this.container.requestFullscreen) {
+ this.container.requestFullscreen();
+ } else if (this.container.mozRequestFullScreen) {
+ this.container.mozRequestFullScreen();
+ } else if (this.container.webkitRequestFullscreen) {
+ this.container.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
+ } else if (this.container.msRequestFullscreen) {
+ this.container.msRequestFullscreen();
+ } else {
+ return false;
+ }
+
+ this.args = {
+ page: this.pdfViewer.currentPageNumber,
+ previousScale: this.pdfViewer.currentScaleValue
+ };
+ return true;
+ }
+
+ _mouseWheel(evt) {
+ if (!this.active) {
+ return;
+ }
+
+ evt.preventDefault();
+ const delta = (0, _ui_utils.normalizeWheelEventDelta)(evt);
+ const currentTime = new Date().getTime();
+ const storedTime = this.mouseScrollTimeStamp;
+
+ if (currentTime > storedTime && currentTime - storedTime < MOUSE_SCROLL_COOLDOWN_TIME) {
+ return;
+ }
+
+ if (this.mouseScrollDelta > 0 && delta < 0 || this.mouseScrollDelta < 0 && delta > 0) {
+ this._resetMouseScrollState();
+ }
+
+ this.mouseScrollDelta += delta;
+
+ if (Math.abs(this.mouseScrollDelta) >= PAGE_SWITCH_THRESHOLD) {
+ const totalDelta = this.mouseScrollDelta;
+
+ this._resetMouseScrollState();
+
+ const success = totalDelta > 0 ? this._goToPreviousPage() : this._goToNextPage();
+
+ if (success) {
+ this.mouseScrollTimeStamp = currentTime;
+ }
+ }
+ }
+
+ get isFullscreen() {
+ return !!(document.fullscreenElement || document.mozFullScreen || document.webkitIsFullScreen || document.msFullscreenElement);
+ }
+
+ _goToPreviousPage() {
+ const page = this.pdfViewer.currentPageNumber;
+
+ if (page <= 1) {
+ return false;
+ }
+
+ this.pdfViewer.currentPageNumber = page - 1;
+ return true;
+ }
+
+ _goToNextPage() {
+ const page = this.pdfViewer.currentPageNumber;
+
+ if (page >= this.pdfViewer.pagesCount) {
+ return false;
+ }
+
+ this.pdfViewer.currentPageNumber = page + 1;
+ return true;
+ }
+
+ _notifyStateChange() {
+ this.eventBus.dispatch("presentationmodechanged", {
+ source: this,
+ active: this.active,
+ switchInProgress: !!this.switchInProgress
+ });
+ }
+
+ _setSwitchInProgress() {
+ if (this.switchInProgress) {
+ clearTimeout(this.switchInProgress);
+ }
+
+ this.switchInProgress = setTimeout(() => {
+ this._removeFullscreenChangeListeners();
+
+ delete this.switchInProgress;
+
+ this._notifyStateChange();
+ }, DELAY_BEFORE_RESETTING_SWITCH_IN_PROGRESS);
+ }
+
+ _resetSwitchInProgress() {
+ if (this.switchInProgress) {
+ clearTimeout(this.switchInProgress);
+ delete this.switchInProgress;
+ }
+ }
+
+ _enter() {
+ this.active = true;
+
+ this._resetSwitchInProgress();
+
+ this._notifyStateChange();
+
+ this.container.classList.add(ACTIVE_SELECTOR);
+ setTimeout(() => {
+ this.pdfViewer.currentPageNumber = this.args.page;
+ this.pdfViewer.currentScaleValue = "page-fit";
+ }, 0);
+
+ this._addWindowListeners();
+
+ this._showControls();
+
+ this.contextMenuOpen = false;
+ this.container.setAttribute("contextmenu", "viewerContextMenu");
+ window.getSelection().removeAllRanges();
+ }
+
+ _exit() {
+ const page = this.pdfViewer.currentPageNumber;
+ this.container.classList.remove(ACTIVE_SELECTOR);
+ setTimeout(() => {
+ this.active = false;
+
+ this._removeFullscreenChangeListeners();
+
+ this._notifyStateChange();
+
+ this.pdfViewer.currentScaleValue = this.args.previousScale;
+ this.pdfViewer.currentPageNumber = page;
+ this.args = null;
+ }, 0);
+
+ this._removeWindowListeners();
+
+ this._hideControls();
+
+ this._resetMouseScrollState();
+
+ this.container.removeAttribute("contextmenu");
+ this.contextMenuOpen = false;
+ }
+
+ _mouseDown(evt) {
+ if (this.contextMenuOpen) {
+ this.contextMenuOpen = false;
+ evt.preventDefault();
+ return;
+ }
+
+ if (evt.button === 0) {
+ const isInternalLink = evt.target.href && evt.target.classList.contains("internalLink");
+
+ if (!isInternalLink) {
+ evt.preventDefault();
+
+ if (evt.shiftKey) {
+ this._goToPreviousPage();
+ } else {
+ this._goToNextPage();
+ }
+ }
+ }
+ }
+
+ _contextMenu() {
+ this.contextMenuOpen = true;
+ }
+
+ _showControls() {
+ if (this.controlsTimeout) {
+ clearTimeout(this.controlsTimeout);
+ } else {
+ this.container.classList.add(CONTROLS_SELECTOR);
+ }
+
+ this.controlsTimeout = setTimeout(() => {
+ this.container.classList.remove(CONTROLS_SELECTOR);
+ delete this.controlsTimeout;
+ }, DELAY_BEFORE_HIDING_CONTROLS);
+ }
+
+ _hideControls() {
+ if (!this.controlsTimeout) {
+ return;
+ }
+
+ clearTimeout(this.controlsTimeout);
+ this.container.classList.remove(CONTROLS_SELECTOR);
+ delete this.controlsTimeout;
+ }
+
+ _resetMouseScrollState() {
+ this.mouseScrollTimeStamp = 0;
+ this.mouseScrollDelta = 0;
+ }
+
+ _touchSwipe(evt) {
+ if (!this.active) {
+ return;
+ }
+
+ if (evt.touches.length > 1) {
+ this.touchSwipeState = null;
+ return;
+ }
+
+ switch (evt.type) {
+ case "touchstart":
+ this.touchSwipeState = {
+ startX: evt.touches[0].pageX,
+ startY: evt.touches[0].pageY,
+ endX: evt.touches[0].pageX,
+ endY: evt.touches[0].pageY
+ };
+ break;
+
+ case "touchmove":
+ if (this.touchSwipeState === null) {
+ return;
+ }
+
+ this.touchSwipeState.endX = evt.touches[0].pageX;
+ this.touchSwipeState.endY = evt.touches[0].pageY;
+ evt.preventDefault();
+ break;
+
+ case "touchend":
+ if (this.touchSwipeState === null) {
+ return;
+ }
+
+ let delta = 0;
+ const dx = this.touchSwipeState.endX - this.touchSwipeState.startX;
+ const dy = this.touchSwipeState.endY - this.touchSwipeState.startY;
+ const absAngle = Math.abs(Math.atan2(dy, dx));
+
+ if (Math.abs(dx) > SWIPE_MIN_DISTANCE_THRESHOLD && (absAngle <= SWIPE_ANGLE_THRESHOLD || absAngle >= Math.PI - SWIPE_ANGLE_THRESHOLD)) {
+ delta = dx;
+ } else if (Math.abs(dy) > SWIPE_MIN_DISTANCE_THRESHOLD && Math.abs(absAngle - Math.PI / 2) <= SWIPE_ANGLE_THRESHOLD) {
+ delta = dy;
+ }
+
+ if (delta > 0) {
+ this._goToPreviousPage();
+ } else if (delta < 0) {
+ this._goToNextPage();
+ }
+
+ break;
+ }
+ }
+
+ _addWindowListeners() {
+ this.showControlsBind = this._showControls.bind(this);
+ this.mouseDownBind = this._mouseDown.bind(this);
+ this.mouseWheelBind = this._mouseWheel.bind(this);
+ this.resetMouseScrollStateBind = this._resetMouseScrollState.bind(this);
+ this.contextMenuBind = this._contextMenu.bind(this);
+ this.touchSwipeBind = this._touchSwipe.bind(this);
+ window.addEventListener("mousemove", this.showControlsBind);
+ window.addEventListener("mousedown", this.mouseDownBind);
+ window.addEventListener("wheel", this.mouseWheelBind);
+ window.addEventListener("keydown", this.resetMouseScrollStateBind);
+ window.addEventListener("contextmenu", this.contextMenuBind);
+ window.addEventListener("touchstart", this.touchSwipeBind);
+ window.addEventListener("touchmove", this.touchSwipeBind);
+ window.addEventListener("touchend", this.touchSwipeBind);
+ }
+
+ _removeWindowListeners() {
+ window.removeEventListener("mousemove", this.showControlsBind);
+ window.removeEventListener("mousedown", this.mouseDownBind);
+ window.removeEventListener("wheel", this.mouseWheelBind);
+ window.removeEventListener("keydown", this.resetMouseScrollStateBind);
+ window.removeEventListener("contextmenu", this.contextMenuBind);
+ window.removeEventListener("touchstart", this.touchSwipeBind);
+ window.removeEventListener("touchmove", this.touchSwipeBind);
+ window.removeEventListener("touchend", this.touchSwipeBind);
+ delete this.showControlsBind;
+ delete this.mouseDownBind;
+ delete this.mouseWheelBind;
+ delete this.resetMouseScrollStateBind;
+ delete this.contextMenuBind;
+ delete this.touchSwipeBind;
+ }
+
+ _fullscreenChange() {
+ if (this.isFullscreen) {
+ this._enter();
+ } else {
+ this._exit();
+ }
+ }
+
+ _addFullscreenChangeListeners() {
+ this.fullscreenChangeBind = this._fullscreenChange.bind(this);
+ window.addEventListener("fullscreenchange", this.fullscreenChangeBind);
+ window.addEventListener("mozfullscreenchange", this.fullscreenChangeBind);
+ window.addEventListener("webkitfullscreenchange", this.fullscreenChangeBind);
+ window.addEventListener("MSFullscreenChange", this.fullscreenChangeBind);
+ }
+
+ _removeFullscreenChangeListeners() {
+ window.removeEventListener("fullscreenchange", this.fullscreenChangeBind);
+ window.removeEventListener("mozfullscreenchange", this.fullscreenChangeBind);
+ window.removeEventListener("webkitfullscreenchange", this.fullscreenChangeBind);
+ window.removeEventListener("MSFullscreenChange", this.fullscreenChangeBind);
+ delete this.fullscreenChangeBind;
+ }
+
+}
+
+exports.PDFPresentationMode = PDFPresentationMode;
+
+/***/ }),
+/* 21 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PDFSidebarResizer = void 0;
+
+var _ui_utils = __webpack_require__(2);
+
+const SIDEBAR_WIDTH_VAR = "--sidebar-width";
+const SIDEBAR_MIN_WIDTH = 200;
+const SIDEBAR_RESIZING_CLASS = "sidebarResizing";
+
+class PDFSidebarResizer {
+ constructor(options, eventBus, l10n = _ui_utils.NullL10n) {
+ this.enabled = false;
+ this.isRTL = false;
+ this.sidebarOpen = false;
+ this.doc = document.documentElement;
+ this._width = null;
+ this._outerContainerWidth = null;
+ this._boundEvents = Object.create(null);
+ this.outerContainer = options.outerContainer;
+ this.resizer = options.resizer;
+ this.eventBus = eventBus;
+ this.l10n = l10n;
+
+ if (typeof CSS === "undefined" || typeof CSS.supports !== "function" || !CSS.supports(SIDEBAR_WIDTH_VAR, `calc(-1 * ${SIDEBAR_MIN_WIDTH}px)`)) {
+ console.warn("PDFSidebarResizer: " + "The browser does not support resizing of the sidebar.");
+ return;
+ }
+
+ this.enabled = true;
+ this.resizer.classList.remove("hidden");
+ this.l10n.getDirection().then(dir => {
+ this.isRTL = dir === "rtl";
+ });
+
+ this._addEventListeners();
+ }
+
+ get outerContainerWidth() {
+ if (!this._outerContainerWidth) {
+ this._outerContainerWidth = this.outerContainer.clientWidth;
+ }
+
+ return this._outerContainerWidth;
+ }
+
+ _updateWidth(width = 0) {
+ if (!this.enabled) {
+ return false;
+ }
+
+ const newWidth = (0, _ui_utils.clamp)(width, SIDEBAR_MIN_WIDTH, Math.floor(this.outerContainerWidth / 2));
+
+ if (newWidth === this._width) {
+ return false;
+ }
+
+ this._width = newWidth;
+ this.doc.style.setProperty(SIDEBAR_WIDTH_VAR, `${newWidth}px`);
+ return true;
+ }
+
+ _mouseMove(evt) {
+ let width = evt.clientX;
+
+ if (this.isRTL) {
+ width = this.outerContainerWidth - width;
+ }
+
+ this._updateWidth(width);
+ }
+
+ _mouseUp(evt) {
+ this.outerContainer.classList.remove(SIDEBAR_RESIZING_CLASS);
+ this.eventBus.dispatch("resize", {
+ source: this
+ });
+ const _boundEvents = this._boundEvents;
+ window.removeEventListener("mousemove", _boundEvents.mouseMove);
+ window.removeEventListener("mouseup", _boundEvents.mouseUp);
+ }
+
+ _addEventListeners() {
+ if (!this.enabled) {
+ return;
+ }
+
+ const _boundEvents = this._boundEvents;
+ _boundEvents.mouseMove = this._mouseMove.bind(this);
+ _boundEvents.mouseUp = this._mouseUp.bind(this);
+ this.resizer.addEventListener("mousedown", evt => {
+ if (evt.button !== 0) {
+ return;
+ }
+
+ this.outerContainer.classList.add(SIDEBAR_RESIZING_CLASS);
+ window.addEventListener("mousemove", _boundEvents.mouseMove);
+ window.addEventListener("mouseup", _boundEvents.mouseUp);
+ });
+
+ this.eventBus._on("sidebarviewchanged", evt => {
+ this.sidebarOpen = !!(evt && evt.view);
+ });
+
+ this.eventBus._on("resize", evt => {
+ if (!evt || evt.source !== window) {
+ return;
+ }
+
+ this._outerContainerWidth = null;
+
+ if (!this._width) {
+ return;
+ }
+
+ if (!this.sidebarOpen) {
+ this._updateWidth(this._width);
+
+ return;
+ }
+
+ this.outerContainer.classList.add(SIDEBAR_RESIZING_CLASS);
+
+ const updated = this._updateWidth(this._width);
+
+ Promise.resolve().then(() => {
+ this.outerContainer.classList.remove(SIDEBAR_RESIZING_CLASS);
+
+ if (updated) {
+ this.eventBus.dispatch("resize", {
+ source: this
+ });
+ }
+ });
+ });
+ }
+
+}
+
+exports.PDFSidebarResizer = PDFSidebarResizer;
+
+/***/ }),
+/* 22 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PDFThumbnailViewer = void 0;
+
+var _ui_utils = __webpack_require__(2);
+
+var _pdf_thumbnail_view = __webpack_require__(23);
+
+const THUMBNAIL_SCROLL_MARGIN = -19;
+const THUMBNAIL_SELECTED_CLASS = "selected";
+
+class PDFThumbnailViewer {
+ constructor({
+ container,
+ linkService,
+ renderingQueue,
+ l10n = _ui_utils.NullL10n
+ }) {
+ this.container = container;
+ this.linkService = linkService;
+ this.renderingQueue = renderingQueue;
+ this.l10n = l10n;
+ this.scroll = (0, _ui_utils.watchScroll)(this.container, this._scrollUpdated.bind(this));
+
+ this._resetView();
+ }
+
+ _scrollUpdated() {
+ this.renderingQueue.renderHighestPriority();
+ }
+
+ getThumbnail(index) {
+ return this._thumbnails[index];
+ }
+
+ _getVisibleThumbs() {
+ return (0, _ui_utils.getVisibleElements)(this.container, this._thumbnails);
+ }
+
+ scrollThumbnailIntoView(pageNumber) {
+ if (!this.pdfDocument) {
+ return;
+ }
+
+ const thumbnailView = this._thumbnails[pageNumber - 1];
+
+ if (!thumbnailView) {
+ console.error('scrollThumbnailIntoView: Invalid "pageNumber" parameter.');
+ return;
+ }
+
+ if (pageNumber !== this._currentPageNumber) {
+ const prevThumbnailView = this._thumbnails[this._currentPageNumber - 1];
+ prevThumbnailView.div.classList.remove(THUMBNAIL_SELECTED_CLASS);
+ thumbnailView.div.classList.add(THUMBNAIL_SELECTED_CLASS);
+ }
+
+ const visibleThumbs = this._getVisibleThumbs();
+
+ const numVisibleThumbs = visibleThumbs.views.length;
+
+ if (numVisibleThumbs > 0) {
+ const first = visibleThumbs.first.id;
+ const last = numVisibleThumbs > 1 ? visibleThumbs.last.id : first;
+ let shouldScroll = false;
+
+ if (pageNumber <= first || pageNumber >= last) {
+ shouldScroll = true;
+ } else {
+ visibleThumbs.views.some(function (view) {
+ if (view.id !== pageNumber) {
+ return false;
+ }
+
+ shouldScroll = view.percent < 100;
+ return true;
+ });
+ }
+
+ if (shouldScroll) {
+ (0, _ui_utils.scrollIntoView)(thumbnailView.div, {
+ top: THUMBNAIL_SCROLL_MARGIN
+ });
+ }
+ }
+
+ this._currentPageNumber = pageNumber;
+ }
+
+ get pagesRotation() {
+ return this._pagesRotation;
+ }
+
+ set pagesRotation(rotation) {
+ if (!(0, _ui_utils.isValidRotation)(rotation)) {
+ throw new Error("Invalid thumbnails rotation angle.");
+ }
+
+ if (!this.pdfDocument) {
+ return;
+ }
+
+ if (this._pagesRotation === rotation) {
+ return;
+ }
+
+ this._pagesRotation = rotation;
+
+ for (let i = 0, ii = this._thumbnails.length; i < ii; i++) {
+ this._thumbnails[i].update(rotation);
+ }
+ }
+
+ cleanup() {
+ _pdf_thumbnail_view.PDFThumbnailView.cleanup();
+ }
+
+ _resetView() {
+ this._thumbnails = [];
+ this._currentPageNumber = 1;
+ this._pageLabels = null;
+ this._pagesRotation = 0;
+ this._pagesRequests = new WeakMap();
+ this.container.textContent = "";
+ }
+
+ setDocument(pdfDocument) {
+ if (this.pdfDocument) {
+ this._cancelRendering();
+
+ this._resetView();
+ }
+
+ this.pdfDocument = pdfDocument;
+
+ if (!pdfDocument) {
+ return;
+ }
+
+ pdfDocument.getPage(1).then(firstPdfPage => {
+ const pagesCount = pdfDocument.numPages;
+ const viewport = firstPdfPage.getViewport({
+ scale: 1
+ });
+
+ for (let pageNum = 1; pageNum <= pagesCount; ++pageNum) {
+ const thumbnail = new _pdf_thumbnail_view.PDFThumbnailView({
+ container: this.container,
+ id: pageNum,
+ defaultViewport: viewport.clone(),
+ linkService: this.linkService,
+ renderingQueue: this.renderingQueue,
+ disableCanvasToImageConversion: false,
+ l10n: this.l10n
+ });
+
+ this._thumbnails.push(thumbnail);
+ }
+
+ const firstThumbnailView = this._thumbnails[0];
+
+ if (firstThumbnailView) {
+ firstThumbnailView.setPdfPage(firstPdfPage);
+ }
+
+ const thumbnailView = this._thumbnails[this._currentPageNumber - 1];
+ thumbnailView.div.classList.add(THUMBNAIL_SELECTED_CLASS);
+ }).catch(reason => {
+ console.error("Unable to initialize thumbnail viewer", reason);
+ });
+ }
+
+ _cancelRendering() {
+ for (let i = 0, ii = this._thumbnails.length; i < ii; i++) {
+ if (this._thumbnails[i]) {
+ this._thumbnails[i].cancelRendering();
+ }
+ }
+ }
+
+ setPageLabels(labels) {
+ if (!this.pdfDocument) {
+ return;
+ }
+
+ if (!labels) {
+ this._pageLabels = null;
+ } else if (!(Array.isArray(labels) && this.pdfDocument.numPages === labels.length)) {
+ this._pageLabels = null;
+ console.error("PDFThumbnailViewer_setPageLabels: Invalid page labels.");
+ } else {
+ this._pageLabels = labels;
+ }
+
+ for (let i = 0, ii = this._thumbnails.length; i < ii; i++) {
+ const label = this._pageLabels && this._pageLabels[i];
+
+ this._thumbnails[i].setPageLabel(label);
+ }
+ }
+
+ _ensurePdfPageLoaded(thumbView) {
+ if (thumbView.pdfPage) {
+ return Promise.resolve(thumbView.pdfPage);
+ }
+
+ if (this._pagesRequests.has(thumbView)) {
+ return this._pagesRequests.get(thumbView);
+ }
+
+ const promise = this.pdfDocument.getPage(thumbView.id).then(pdfPage => {
+ if (!thumbView.pdfPage) {
+ thumbView.setPdfPage(pdfPage);
+ }
+
+ this._pagesRequests.delete(thumbView);
+
+ return pdfPage;
+ }).catch(reason => {
+ console.error("Unable to get page for thumb view", reason);
+
+ this._pagesRequests.delete(thumbView);
+ });
+
+ this._pagesRequests.set(thumbView, promise);
+
+ return promise;
+ }
+
+ forceRendering() {
+ const visibleThumbs = this._getVisibleThumbs();
+
+ const thumbView = this.renderingQueue.getHighestPriority(visibleThumbs, this._thumbnails, this.scroll.down);
+
+ if (thumbView) {
+ this._ensurePdfPageLoaded(thumbView).then(() => {
+ this.renderingQueue.renderView(thumbView);
+ });
+
+ return true;
+ }
+
+ return false;
+ }
+
+}
+
+exports.PDFThumbnailViewer = PDFThumbnailViewer;
+
+/***/ }),
+/* 23 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PDFThumbnailView = void 0;
+
+var _pdfjsLib = __webpack_require__(4);
+
+var _ui_utils = __webpack_require__(2);
+
+var _pdf_rendering_queue = __webpack_require__(8);
+
+const MAX_NUM_SCALING_STEPS = 3;
+const THUMBNAIL_CANVAS_BORDER_WIDTH = 1;
+const THUMBNAIL_WIDTH = 98;
+
+const TempImageFactory = function TempImageFactoryClosure() {
+ let tempCanvasCache = null;
+ return {
+ getCanvas(width, height) {
+ let tempCanvas = tempCanvasCache;
+
+ if (!tempCanvas) {
+ tempCanvas = document.createElement("canvas");
+ tempCanvasCache = tempCanvas;
+ }
+
+ tempCanvas.width = width;
+ tempCanvas.height = height;
+ tempCanvas.mozOpaque = true;
+ const ctx = tempCanvas.getContext("2d", {
+ alpha: false
+ });
+ ctx.save();
+ ctx.fillStyle = "rgb(255, 255, 255)";
+ ctx.fillRect(0, 0, width, height);
+ ctx.restore();
+ return tempCanvas;
+ },
+
+ destroyCanvas() {
+ const tempCanvas = tempCanvasCache;
+
+ if (tempCanvas) {
+ tempCanvas.width = 0;
+ tempCanvas.height = 0;
+ }
+
+ tempCanvasCache = null;
+ }
+
+ };
+}();
+
+class PDFThumbnailView {
+ constructor({
+ container,
+ id,
+ defaultViewport,
+ linkService,
+ renderingQueue,
+ disableCanvasToImageConversion = false,
+ l10n = _ui_utils.NullL10n
+ }) {
+ this.id = id;
+ this.renderingId = "thumbnail" + id;
+ this.pageLabel = null;
+ this.pdfPage = null;
+ this.rotation = 0;
+ this.viewport = defaultViewport;
+ this.pdfPageRotate = defaultViewport.rotation;
+ this.linkService = linkService;
+ this.renderingQueue = renderingQueue;
+ this.renderTask = null;
+ this.renderingState = _pdf_rendering_queue.RenderingStates.INITIAL;
+ this.resume = null;
+ this.disableCanvasToImageConversion = disableCanvasToImageConversion;
+ this.pageWidth = this.viewport.width;
+ this.pageHeight = this.viewport.height;
+ this.pageRatio = this.pageWidth / this.pageHeight;
+ this.canvasWidth = THUMBNAIL_WIDTH;
+ this.canvasHeight = this.canvasWidth / this.pageRatio | 0;
+ this.scale = this.canvasWidth / this.pageWidth;
+ this.l10n = l10n;
+ const anchor = document.createElement("a");
+ anchor.href = linkService.getAnchorUrl("#page=" + id);
+
+ this._thumbPageTitle.then(msg => {
+ anchor.title = msg;
+ });
+
+ anchor.onclick = function () {
+ linkService.page = id;
+ return false;
+ };
+
+ this.anchor = anchor;
+ const div = document.createElement("div");
+ div.className = "thumbnail";
+ div.setAttribute("data-page-number", this.id);
+ this.div = div;
+ const ring = document.createElement("div");
+ ring.className = "thumbnailSelectionRing";
+ const borderAdjustment = 2 * THUMBNAIL_CANVAS_BORDER_WIDTH;
+ ring.style.width = this.canvasWidth + borderAdjustment + "px";
+ ring.style.height = this.canvasHeight + borderAdjustment + "px";
+ this.ring = ring;
+ div.appendChild(ring);
+ anchor.appendChild(div);
+ container.appendChild(anchor);
+ }
+
+ setPdfPage(pdfPage) {
+ this.pdfPage = pdfPage;
+ this.pdfPageRotate = pdfPage.rotate;
+ const totalRotation = (this.rotation + this.pdfPageRotate) % 360;
+ this.viewport = pdfPage.getViewport({
+ scale: 1,
+ rotation: totalRotation
+ });
+ this.reset();
+ }
+
+ reset() {
+ this.cancelRendering();
+ this.renderingState = _pdf_rendering_queue.RenderingStates.INITIAL;
+ this.pageWidth = this.viewport.width;
+ this.pageHeight = this.viewport.height;
+ this.pageRatio = this.pageWidth / this.pageHeight;
+ this.canvasHeight = this.canvasWidth / this.pageRatio | 0;
+ this.scale = this.canvasWidth / this.pageWidth;
+ this.div.removeAttribute("data-loaded");
+ const ring = this.ring;
+ const childNodes = ring.childNodes;
+
+ for (let i = childNodes.length - 1; i >= 0; i--) {
+ ring.removeChild(childNodes[i]);
+ }
+
+ const borderAdjustment = 2 * THUMBNAIL_CANVAS_BORDER_WIDTH;
+ ring.style.width = this.canvasWidth + borderAdjustment + "px";
+ ring.style.height = this.canvasHeight + borderAdjustment + "px";
+
+ if (this.canvas) {
+ this.canvas.width = 0;
+ this.canvas.height = 0;
+ delete this.canvas;
+ }
+
+ if (this.image) {
+ this.image.removeAttribute("src");
+ delete this.image;
+ }
+ }
+
+ update(rotation) {
+ if (typeof rotation !== "undefined") {
+ this.rotation = rotation;
+ }
+
+ const totalRotation = (this.rotation + this.pdfPageRotate) % 360;
+ this.viewport = this.viewport.clone({
+ scale: 1,
+ rotation: totalRotation
+ });
+ this.reset();
+ }
+
+ cancelRendering() {
+ if (this.renderTask) {
+ this.renderTask.cancel();
+ this.renderTask = null;
+ }
+
+ this.resume = null;
+ }
+
+ _getPageDrawContext(noCtxScale = false) {
+ const canvas = document.createElement("canvas");
+ this.canvas = canvas;
+ canvas.mozOpaque = true;
+ const ctx = canvas.getContext("2d", {
+ alpha: false
+ });
+ const outputScale = (0, _ui_utils.getOutputScale)(ctx);
+ canvas.width = this.canvasWidth * outputScale.sx | 0;
+ canvas.height = this.canvasHeight * outputScale.sy | 0;
+ canvas.style.width = this.canvasWidth + "px";
+ canvas.style.height = this.canvasHeight + "px";
+
+ if (!noCtxScale && outputScale.scaled) {
+ ctx.scale(outputScale.sx, outputScale.sy);
+ }
+
+ return ctx;
+ }
+
+ _convertCanvasToImage() {
+ if (!this.canvas) {
+ return;
+ }
+
+ if (this.renderingState !== _pdf_rendering_queue.RenderingStates.FINISHED) {
+ return;
+ }
+
+ const className = "thumbnailImage";
+
+ if (this.disableCanvasToImageConversion) {
+ this.canvas.className = className;
+
+ this._thumbPageCanvas.then(msg => {
+ this.canvas.setAttribute("aria-label", msg);
+ });
+
+ this.div.setAttribute("data-loaded", true);
+ this.ring.appendChild(this.canvas);
+ return;
+ }
+
+ const image = document.createElement("img");
+ image.className = className;
+
+ this._thumbPageCanvas.then(msg => {
+ image.setAttribute("aria-label", msg);
+ });
+
+ image.style.width = this.canvasWidth + "px";
+ image.style.height = this.canvasHeight + "px";
+ image.src = this.canvas.toDataURL();
+ this.image = image;
+ this.div.setAttribute("data-loaded", true);
+ this.ring.appendChild(image);
+ this.canvas.width = 0;
+ this.canvas.height = 0;
+ delete this.canvas;
+ }
+
+ draw() {
+ if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) {
+ console.error("Must be in new state before drawing");
+ return Promise.resolve(undefined);
+ }
+
+ const {
+ pdfPage
+ } = this;
+
+ if (!pdfPage) {
+ this.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED;
+ return Promise.reject(new Error("pdfPage is not loaded"));
+ }
+
+ this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING;
+ const renderCapability = (0, _pdfjsLib.createPromiseCapability)();
+
+ const finishRenderTask = error => {
+ if (renderTask === this.renderTask) {
+ this.renderTask = null;
+ }
+
+ if (error instanceof _pdfjsLib.RenderingCancelledException) {
+ renderCapability.resolve(undefined);
+ return;
+ }
+
+ this.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED;
+
+ this._convertCanvasToImage();
+
+ if (!error) {
+ renderCapability.resolve(undefined);
+ } else {
+ renderCapability.reject(error);
+ }
+ };
+
+ const ctx = this._getPageDrawContext();
+
+ const drawViewport = this.viewport.clone({
+ scale: this.scale
+ });
+
+ const renderContinueCallback = cont => {
+ if (!this.renderingQueue.isHighestPriority(this)) {
+ this.renderingState = _pdf_rendering_queue.RenderingStates.PAUSED;
+
+ this.resume = () => {
+ this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING;
+ cont();
+ };
+
+ return;
+ }
+
+ cont();
+ };
+
+ const renderContext = {
+ canvasContext: ctx,
+ viewport: drawViewport
+ };
+ const renderTask = this.renderTask = pdfPage.render(renderContext);
+ renderTask.onContinue = renderContinueCallback;
+ renderTask.promise.then(function () {
+ finishRenderTask(null);
+ }, function (error) {
+ finishRenderTask(error);
+ });
+ return renderCapability.promise;
+ }
+
+ setImage(pageView) {
+ if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) {
+ return;
+ }
+
+ const img = pageView.canvas;
+
+ if (!img) {
+ return;
+ }
+
+ if (!this.pdfPage) {
+ this.setPdfPage(pageView.pdfPage);
+ }
+
+ this.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED;
+
+ const ctx = this._getPageDrawContext(true);
+
+ const canvas = ctx.canvas;
+
+ if (img.width <= 2 * canvas.width) {
+ ctx.drawImage(img, 0, 0, img.width, img.height, 0, 0, canvas.width, canvas.height);
+
+ this._convertCanvasToImage();
+
+ return;
+ }
+
+ let reducedWidth = canvas.width << MAX_NUM_SCALING_STEPS;
+ let reducedHeight = canvas.height << MAX_NUM_SCALING_STEPS;
+ const reducedImage = TempImageFactory.getCanvas(reducedWidth, reducedHeight);
+ const reducedImageCtx = reducedImage.getContext("2d");
+
+ while (reducedWidth > img.width || reducedHeight > img.height) {
+ reducedWidth >>= 1;
+ reducedHeight >>= 1;
+ }
+
+ reducedImageCtx.drawImage(img, 0, 0, img.width, img.height, 0, 0, reducedWidth, reducedHeight);
+
+ while (reducedWidth > 2 * canvas.width) {
+ reducedImageCtx.drawImage(reducedImage, 0, 0, reducedWidth, reducedHeight, 0, 0, reducedWidth >> 1, reducedHeight >> 1);
+ reducedWidth >>= 1;
+ reducedHeight >>= 1;
+ }
+
+ ctx.drawImage(reducedImage, 0, 0, reducedWidth, reducedHeight, 0, 0, canvas.width, canvas.height);
+
+ this._convertCanvasToImage();
+ }
+
+ get _thumbPageTitle() {
+ return this.l10n.get("thumb_page_title", {
+ page: this.pageLabel !== null ? this.pageLabel : this.id
+ }, "Page {{page}}");
+ }
+
+ get _thumbPageCanvas() {
+ return this.l10n.get("thumb_page_canvas", {
+ page: this.pageLabel !== null ? this.pageLabel : this.id
+ }, "Thumbnail of Page {{page}}");
+ }
+
+ setPageLabel(label) {
+ this.pageLabel = typeof label === "string" ? label : null;
+
+ this._thumbPageTitle.then(msg => {
+ this.anchor.title = msg;
+ });
+
+ if (this.renderingState !== _pdf_rendering_queue.RenderingStates.FINISHED) {
+ return;
+ }
+
+ this._thumbPageCanvas.then(msg => {
+ if (this.image) {
+ this.image.setAttribute("aria-label", msg);
+ } else if (this.disableCanvasToImageConversion && this.canvas) {
+ this.canvas.setAttribute("aria-label", msg);
+ }
+ });
+ }
+
+ static cleanup() {
+ TempImageFactory.destroyCanvas();
+ }
+
+}
+
+exports.PDFThumbnailView = PDFThumbnailView;
+
+/***/ }),
+/* 24 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PDFViewer = void 0;
+
+var _base_viewer = __webpack_require__(25);
+
+var _pdfjsLib = __webpack_require__(4);
+
+class PDFViewer extends _base_viewer.BaseViewer {
+ get _setDocumentViewerElement() {
+ return (0, _pdfjsLib.shadow)(this, "_setDocumentViewerElement", this.viewer);
+ }
+
+ _scrollIntoView({
+ pageDiv,
+ pageSpot = null,
+ pageNumber = null
+ }) {
+ if (!pageSpot && !this.isInPresentationMode) {
+ const left = pageDiv.offsetLeft + pageDiv.clientLeft;
+ const right = left + pageDiv.clientWidth;
+ const {
+ scrollLeft,
+ clientWidth
+ } = this.container;
+
+ if (this._isScrollModeHorizontal || left < scrollLeft || right > scrollLeft + clientWidth) {
+ pageSpot = {
+ left: 0,
+ top: 0
+ };
+ }
+ }
+
+ super._scrollIntoView({
+ pageDiv,
+ pageSpot,
+ pageNumber
+ });
+ }
+
+ _getVisiblePages() {
+ if (this.isInPresentationMode) {
+ return this._getCurrentVisiblePage();
+ }
+
+ return super._getVisiblePages();
+ }
+
+ _updateHelper(visiblePages) {
+ if (this.isInPresentationMode) {
+ return;
+ }
+
+ let currentId = this._currentPageNumber;
+ let stillFullyVisible = false;
+
+ for (const page of visiblePages) {
+ if (page.percent < 100) {
+ break;
+ }
+
+ if (page.id === currentId) {
+ stillFullyVisible = true;
+ break;
+ }
+ }
+
+ if (!stillFullyVisible) {
+ currentId = visiblePages[0].id;
+ }
+
+ this._setCurrentPageNumber(currentId);
+ }
+
+}
+
+exports.PDFViewer = PDFViewer;
+
+/***/ }),
+/* 25 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.BaseViewer = void 0;
+
+var _ui_utils = __webpack_require__(2);
+
+var _pdf_rendering_queue = __webpack_require__(8);
+
+var _annotation_layer_builder = __webpack_require__(26);
+
+var _pdfjsLib = __webpack_require__(4);
+
+var _pdf_page_view = __webpack_require__(27);
+
+var _pdf_link_service = __webpack_require__(18);
+
+var _text_layer_builder = __webpack_require__(28);
+
+const DEFAULT_CACHE_SIZE = 10;
+
+function PDFPageViewBuffer(size) {
+ const data = [];
+
+ this.push = function (view) {
+ const i = data.indexOf(view);
+
+ if (i >= 0) {
+ data.splice(i, 1);
+ }
+
+ data.push(view);
+
+ if (data.length > size) {
+ data.shift().destroy();
+ }
+ };
+
+ this.resize = function (newSize, pagesToKeep) {
+ size = newSize;
+
+ if (pagesToKeep) {
+ const pageIdsToKeep = new Set();
+
+ for (let i = 0, iMax = pagesToKeep.length; i < iMax; ++i) {
+ pageIdsToKeep.add(pagesToKeep[i].id);
+ }
+
+ (0, _ui_utils.moveToEndOfArray)(data, function (page) {
+ return pageIdsToKeep.has(page.id);
+ });
+ }
+
+ while (data.length > size) {
+ data.shift().destroy();
+ }
+ };
+}
+
+function isSameScale(oldScale, newScale) {
+ if (newScale === oldScale) {
+ return true;
+ }
+
+ if (Math.abs(newScale - oldScale) < 1e-15) {
+ return true;
+ }
+
+ return false;
+}
+
+class BaseViewer {
+ constructor(options) {
+ if (this.constructor === BaseViewer) {
+ throw new Error("Cannot initialize BaseViewer.");
+ }
+
+ this._name = this.constructor.name;
+ this.container = options.container;
+ this.viewer = options.viewer || options.container.firstElementChild;
+ this.eventBus = options.eventBus || (0, _ui_utils.getGlobalEventBus)();
+ this.linkService = options.linkService || new _pdf_link_service.SimpleLinkService();
+ this.downloadManager = options.downloadManager || null;
+ this.findController = options.findController || null;
+ this.removePageBorders = options.removePageBorders || false;
+ this.textLayerMode = Number.isInteger(options.textLayerMode) ? options.textLayerMode : _ui_utils.TextLayerMode.ENABLE;
+ this.imageResourcesPath = options.imageResourcesPath || "";
+ this.renderInteractiveForms = options.renderInteractiveForms || false;
+ this.enablePrintAutoRotate = options.enablePrintAutoRotate || false;
+ this.renderer = options.renderer || _ui_utils.RendererType.CANVAS;
+ this.enableWebGL = options.enableWebGL || false;
+ this.useOnlyCssZoom = options.useOnlyCssZoom || false;
+ this.maxCanvasPixels = options.maxCanvasPixels;
+ this.l10n = options.l10n || _ui_utils.NullL10n;
+ this.defaultRenderingQueue = !options.renderingQueue;
+
+ if (this.defaultRenderingQueue) {
+ this.renderingQueue = new _pdf_rendering_queue.PDFRenderingQueue();
+ this.renderingQueue.setViewer(this);
+ } else {
+ this.renderingQueue = options.renderingQueue;
+ }
+
+ this.scroll = (0, _ui_utils.watchScroll)(this.container, this._scrollUpdate.bind(this));
+ this.presentationModeState = _ui_utils.PresentationModeState.UNKNOWN;
+ this._onBeforeDraw = this._onAfterDraw = null;
+
+ this._resetView();
+
+ if (this.removePageBorders) {
+ this.viewer.classList.add("removePageBorders");
+ }
+
+ Promise.resolve().then(() => {
+ this.eventBus.dispatch("baseviewerinit", {
+ source: this
+ });
+ });
+ }
+
+ get pagesCount() {
+ return this._pages.length;
+ }
+
+ getPageView(index) {
+ return this._pages[index];
+ }
+
+ get pageViewsReady() {
+ if (!this._pagesCapability.settled) {
+ return false;
+ }
+
+ return this._pages.every(function (pageView) {
+ return pageView && pageView.pdfPage;
+ });
+ }
+
+ get currentPageNumber() {
+ return this._currentPageNumber;
+ }
+
+ set currentPageNumber(val) {
+ if (!Number.isInteger(val)) {
+ throw new Error("Invalid page number.");
+ }
+
+ if (!this.pdfDocument) {
+ return;
+ }
+
+ if (!this._setCurrentPageNumber(val, true)) {
+ console.error(`${this._name}.currentPageNumber: "${val}" is not a valid page.`);
+ }
+ }
+
+ _setCurrentPageNumber(val, resetCurrentPageView = false) {
+ if (this._currentPageNumber === val) {
+ if (resetCurrentPageView) {
+ this._resetCurrentPageView();
+ }
+
+ return true;
+ }
+
+ if (!(0 < val && val <= this.pagesCount)) {
+ return false;
+ }
+
+ this._currentPageNumber = val;
+ this.eventBus.dispatch("pagechanging", {
+ source: this,
+ pageNumber: val,
+ pageLabel: this._pageLabels && this._pageLabels[val - 1]
+ });
+
+ if (resetCurrentPageView) {
+ this._resetCurrentPageView();
+ }
+
+ return true;
+ }
+
+ get currentPageLabel() {
+ return this._pageLabels && this._pageLabels[this._currentPageNumber - 1];
+ }
+
+ set currentPageLabel(val) {
+ if (!this.pdfDocument) {
+ return;
+ }
+
+ let page = val | 0;
+
+ if (this._pageLabels) {
+ const i = this._pageLabels.indexOf(val);
+
+ if (i >= 0) {
+ page = i + 1;
+ }
+ }
+
+ if (!this._setCurrentPageNumber(page, true)) {
+ console.error(`${this._name}.currentPageLabel: "${val}" is not a valid page.`);
+ }
+ }
+
+ get currentScale() {
+ return this._currentScale !== _ui_utils.UNKNOWN_SCALE ? this._currentScale : _ui_utils.DEFAULT_SCALE;
+ }
+
+ set currentScale(val) {
+ if (isNaN(val)) {
+ throw new Error("Invalid numeric scale.");
+ }
+
+ if (!this.pdfDocument) {
+ return;
+ }
+
+ this._setScale(val, false);
+ }
+
+ get currentScaleValue() {
+ return this._currentScaleValue;
+ }
+
+ set currentScaleValue(val) {
+ if (!this.pdfDocument) {
+ return;
+ }
+
+ this._setScale(val, false);
+ }
+
+ get pagesRotation() {
+ return this._pagesRotation;
+ }
+
+ set pagesRotation(rotation) {
+ if (!(0, _ui_utils.isValidRotation)(rotation)) {
+ throw new Error("Invalid pages rotation angle.");
+ }
+
+ if (!this.pdfDocument) {
+ return;
+ }
+
+ if (this._pagesRotation === rotation) {
+ return;
+ }
+
+ this._pagesRotation = rotation;
+ const pageNumber = this._currentPageNumber;
+
+ for (let i = 0, ii = this._pages.length; i < ii; i++) {
+ const pageView = this._pages[i];
+ pageView.update(pageView.scale, rotation);
+ }
+
+ if (this._currentScaleValue) {
+ this._setScale(this._currentScaleValue, true);
+ }
+
+ this.eventBus.dispatch("rotationchanging", {
+ source: this,
+ pagesRotation: rotation,
+ pageNumber
+ });
+
+ if (this.defaultRenderingQueue) {
+ this.update();
+ }
+ }
+
+ get firstPagePromise() {
+ return this.pdfDocument ? this._firstPageCapability.promise : null;
+ }
+
+ get onePageRendered() {
+ return this.pdfDocument ? this._onePageRenderedCapability.promise : null;
+ }
+
+ get pagesPromise() {
+ return this.pdfDocument ? this._pagesCapability.promise : null;
+ }
+
+ get _setDocumentViewerElement() {
+ throw new Error("Not implemented: _setDocumentViewerElement");
+ }
+
+ setDocument(pdfDocument) {
+ if (this.pdfDocument) {
+ this._cancelRendering();
+
+ this._resetView();
+
+ if (this.findController) {
+ this.findController.setDocument(null);
+ }
+ }
+
+ this.pdfDocument = pdfDocument;
+
+ if (!pdfDocument) {
+ return;
+ }
+
+ const pagesCount = pdfDocument.numPages;
+ const firstPagePromise = pdfDocument.getPage(1);
+
+ this._pagesCapability.promise.then(() => {
+ this.eventBus.dispatch("pagesloaded", {
+ source: this,
+ pagesCount
+ });
+ });
+
+ this._onBeforeDraw = evt => {
+ const pageView = this._pages[evt.pageNumber - 1];
+
+ if (!pageView) {
+ return;
+ }
+
+ this._buffer.push(pageView);
+ };
+
+ this.eventBus._on("pagerender", this._onBeforeDraw);
+
+ this._onAfterDraw = evt => {
+ if (evt.cssTransform || this._onePageRenderedCapability.settled) {
+ return;
+ }
+
+ this._onePageRenderedCapability.resolve();
+
+ this.eventBus._off("pagerendered", this._onAfterDraw);
+
+ this._onAfterDraw = null;
+ };
+
+ this.eventBus._on("pagerendered", this._onAfterDraw);
+
+ firstPagePromise.then(firstPdfPage => {
+ this._firstPageCapability.resolve(firstPdfPage);
+
+ const scale = this.currentScale;
+ const viewport = firstPdfPage.getViewport({
+ scale: scale * _ui_utils.CSS_UNITS
+ });
+ const textLayerFactory = this.textLayerMode !== _ui_utils.TextLayerMode.DISABLE ? this : null;
+
+ for (let pageNum = 1; pageNum <= pagesCount; ++pageNum) {
+ const pageView = new _pdf_page_view.PDFPageView({
+ container: this._setDocumentViewerElement,
+ eventBus: this.eventBus,
+ id: pageNum,
+ scale,
+ defaultViewport: viewport.clone(),
+ renderingQueue: this.renderingQueue,
+ textLayerFactory,
+ textLayerMode: this.textLayerMode,
+ annotationLayerFactory: this,
+ imageResourcesPath: this.imageResourcesPath,
+ renderInteractiveForms: this.renderInteractiveForms,
+ renderer: this.renderer,
+ enableWebGL: this.enableWebGL,
+ useOnlyCssZoom: this.useOnlyCssZoom,
+ maxCanvasPixels: this.maxCanvasPixels,
+ l10n: this.l10n
+ });
+
+ this._pages.push(pageView);
+ }
+
+ const firstPageView = this._pages[0];
+
+ if (firstPageView) {
+ firstPageView.setPdfPage(firstPdfPage);
+ this.linkService.cachePageRef(1, firstPdfPage.ref);
+ }
+
+ if (this._spreadMode !== _ui_utils.SpreadMode.NONE) {
+ this._updateSpreadMode();
+ }
+
+ this._onePageRenderedCapability.promise.then(() => {
+ if (this.findController) {
+ this.findController.setDocument(pdfDocument);
+ }
+
+ if (pdfDocument.loadingParams["disableAutoFetch"] || pagesCount > 7500) {
+ this._pagesCapability.resolve();
+
+ return;
+ }
+
+ let getPagesLeft = pagesCount - 1;
+
+ if (getPagesLeft <= 0) {
+ this._pagesCapability.resolve();
+
+ return;
+ }
+
+ for (let pageNum = 2; pageNum <= pagesCount; ++pageNum) {
+ pdfDocument.getPage(pageNum).then(pdfPage => {
+ const pageView = this._pages[pageNum - 1];
+
+ if (!pageView.pdfPage) {
+ pageView.setPdfPage(pdfPage);
+ }
+
+ this.linkService.cachePageRef(pageNum, pdfPage.ref);
+
+ if (--getPagesLeft === 0) {
+ this._pagesCapability.resolve();
+ }
+ }, reason => {
+ console.error(`Unable to get page ${pageNum} to initialize viewer`, reason);
+
+ if (--getPagesLeft === 0) {
+ this._pagesCapability.resolve();
+ }
+ });
+ }
+ });
+
+ this.eventBus.dispatch("pagesinit", {
+ source: this
+ });
+
+ if (this.defaultRenderingQueue) {
+ this.update();
+ }
+ }).catch(reason => {
+ console.error("Unable to initialize viewer", reason);
+ });
+ }
+
+ setPageLabels(labels) {
+ if (!this.pdfDocument) {
+ return;
+ }
+
+ if (!labels) {
+ this._pageLabels = null;
+ } else if (!(Array.isArray(labels) && this.pdfDocument.numPages === labels.length)) {
+ this._pageLabels = null;
+ console.error(`${this._name}.setPageLabels: Invalid page labels.`);
+ } else {
+ this._pageLabels = labels;
+ }
+
+ for (let i = 0, ii = this._pages.length; i < ii; i++) {
+ const pageView = this._pages[i];
+ const label = this._pageLabels && this._pageLabels[i];
+ pageView.setPageLabel(label);
+ }
+ }
+
+ _resetView() {
+ this._pages = [];
+ this._currentPageNumber = 1;
+ this._currentScale = _ui_utils.UNKNOWN_SCALE;
+ this._currentScaleValue = null;
+ this._pageLabels = null;
+ this._buffer = new PDFPageViewBuffer(DEFAULT_CACHE_SIZE);
+ this._location = null;
+ this._pagesRotation = 0;
+ this._pagesRequests = new WeakMap();
+ this._firstPageCapability = (0, _pdfjsLib.createPromiseCapability)();
+ this._onePageRenderedCapability = (0, _pdfjsLib.createPromiseCapability)();
+ this._pagesCapability = (0, _pdfjsLib.createPromiseCapability)();
+ this._scrollMode = _ui_utils.ScrollMode.VERTICAL;
+ this._spreadMode = _ui_utils.SpreadMode.NONE;
+
+ if (this._onBeforeDraw) {
+ this.eventBus._off("pagerender", this._onBeforeDraw);
+
+ this._onBeforeDraw = null;
+ }
+
+ if (this._onAfterDraw) {
+ this.eventBus._off("pagerendered", this._onAfterDraw);
+
+ this._onAfterDraw = null;
+ }
+
+ this.viewer.textContent = "";
+
+ this._updateScrollMode();
+ }
+
+ _scrollUpdate() {
+ if (this.pagesCount === 0) {
+ return;
+ }
+
+ this.update();
+ }
+
+ _scrollIntoView({
+ pageDiv,
+ pageSpot = null,
+ pageNumber = null
+ }) {
+ (0, _ui_utils.scrollIntoView)(pageDiv, pageSpot);
+ }
+
+ _setScaleUpdatePages(newScale, newValue, noScroll = false, preset = false) {
+ this._currentScaleValue = newValue.toString();
+
+ if (isSameScale(this._currentScale, newScale)) {
+ if (preset) {
+ this.eventBus.dispatch("scalechanging", {
+ source: this,
+ scale: newScale,
+ presetValue: newValue
+ });
+ }
+
+ return;
+ }
+
+ for (let i = 0, ii = this._pages.length; i < ii; i++) {
+ this._pages[i].update(newScale);
+ }
+
+ this._currentScale = newScale;
+
+ if (!noScroll) {
+ let page = this._currentPageNumber,
+ dest;
+
+ if (this._location && !(this.isInPresentationMode || this.isChangingPresentationMode)) {
+ page = this._location.pageNumber;
+ dest = [null, {
+ name: "XYZ"
+ }, this._location.left, this._location.top, null];
+ }
+
+ this.scrollPageIntoView({
+ pageNumber: page,
+ destArray: dest,
+ allowNegativeOffset: true
+ });
+ }
+
+ this.eventBus.dispatch("scalechanging", {
+ source: this,
+ scale: newScale,
+ presetValue: preset ? newValue : undefined
+ });
+
+ if (this.defaultRenderingQueue) {
+ this.update();
+ }
+ }
+
+ _setScale(value, noScroll = false) {
+ let scale = parseFloat(value);
+
+ if (scale > 0) {
+ this._setScaleUpdatePages(scale, value, noScroll, false);
+ } else {
+ const currentPage = this._pages[this._currentPageNumber - 1];
+
+ if (!currentPage) {
+ return;
+ }
+
+ const noPadding = this.isInPresentationMode || this.removePageBorders;
+ let hPadding = noPadding ? 0 : _ui_utils.SCROLLBAR_PADDING;
+ let vPadding = noPadding ? 0 : _ui_utils.VERTICAL_PADDING;
+
+ if (!noPadding && this._isScrollModeHorizontal) {
+ [hPadding, vPadding] = [vPadding, hPadding];
+ }
+
+ const pageWidthScale = (this.container.clientWidth - hPadding) / currentPage.width * currentPage.scale;
+ const pageHeightScale = (this.container.clientHeight - vPadding) / currentPage.height * currentPage.scale;
+
+ switch (value) {
+ case "page-actual":
+ scale = 1;
+ break;
+
+ case "page-width":
+ scale = pageWidthScale;
+ break;
+
+ case "page-height":
+ scale = pageHeightScale;
+ break;
+
+ case "page-fit":
+ scale = Math.min(pageWidthScale, pageHeightScale);
+ break;
+
+ case "auto":
+ const horizontalScale = (0, _ui_utils.isPortraitOrientation)(currentPage) ? pageWidthScale : Math.min(pageHeightScale, pageWidthScale);
+ scale = Math.min(_ui_utils.MAX_AUTO_SCALE, horizontalScale);
+ break;
+
+ default:
+ console.error(`${this._name}._setScale: "${value}" is an unknown zoom value.`);
+ return;
+ }
+
+ this._setScaleUpdatePages(scale, value, noScroll, true);
+ }
+ }
+
+ _resetCurrentPageView() {
+ if (this.isInPresentationMode) {
+ this._setScale(this._currentScaleValue, true);
+ }
+
+ const pageView = this._pages[this._currentPageNumber - 1];
+
+ this._scrollIntoView({
+ pageDiv: pageView.div
+ });
+ }
+
+ scrollPageIntoView({
+ pageNumber,
+ destArray = null,
+ allowNegativeOffset = false,
+ ignoreDestinationZoom = false
+ }) {
+ if (!this.pdfDocument) {
+ return;
+ }
+
+ const pageView = Number.isInteger(pageNumber) && this._pages[pageNumber - 1];
+
+ if (!pageView) {
+ console.error(`${this._name}.scrollPageIntoView: ` + `"${pageNumber}" is not a valid pageNumber parameter.`);
+ return;
+ }
+
+ if (this.isInPresentationMode || !destArray) {
+ this._setCurrentPageNumber(pageNumber, true);
+
+ return;
+ }
+
+ let x = 0,
+ y = 0;
+ let width = 0,
+ height = 0,
+ widthScale,
+ heightScale;
+ const changeOrientation = pageView.rotation % 180 !== 0;
+ const pageWidth = (changeOrientation ? pageView.height : pageView.width) / pageView.scale / _ui_utils.CSS_UNITS;
+ const pageHeight = (changeOrientation ? pageView.width : pageView.height) / pageView.scale / _ui_utils.CSS_UNITS;
+ let scale = 0;
+
+ switch (destArray[1].name) {
+ case "XYZ":
+ x = destArray[2];
+ y = destArray[3];
+ scale = destArray[4];
+ x = x !== null ? x : 0;
+ y = y !== null ? y : pageHeight;
+ break;
+
+ case "Fit":
+ case "FitB":
+ scale = "page-fit";
+ break;
+
+ case "FitH":
+ case "FitBH":
+ y = destArray[2];
+ scale = "page-width";
+
+ if (y === null && this._location) {
+ x = this._location.left;
+ y = this._location.top;
+ }
+
+ break;
+
+ case "FitV":
+ case "FitBV":
+ x = destArray[2];
+ width = pageWidth;
+ height = pageHeight;
+ scale = "page-height";
+ break;
+
+ case "FitR":
+ x = destArray[2];
+ y = destArray[3];
+ width = destArray[4] - x;
+ height = destArray[5] - y;
+ const hPadding = this.removePageBorders ? 0 : _ui_utils.SCROLLBAR_PADDING;
+ const vPadding = this.removePageBorders ? 0 : _ui_utils.VERTICAL_PADDING;
+ widthScale = (this.container.clientWidth - hPadding) / width / _ui_utils.CSS_UNITS;
+ heightScale = (this.container.clientHeight - vPadding) / height / _ui_utils.CSS_UNITS;
+ scale = Math.min(Math.abs(widthScale), Math.abs(heightScale));
+ break;
+
+ default:
+ console.error(`${this._name}.scrollPageIntoView: ` + `"${destArray[1].name}" is not a valid destination type.`);
+ return;
+ }
+
+ if (!ignoreDestinationZoom) {
+ if (scale && scale !== this._currentScale) {
+ this.currentScaleValue = scale;
+ } else if (this._currentScale === _ui_utils.UNKNOWN_SCALE) {
+ this.currentScaleValue = _ui_utils.DEFAULT_SCALE_VALUE;
+ }
+ }
+
+ if (scale === "page-fit" && !destArray[4]) {
+ this._scrollIntoView({
+ pageDiv: pageView.div,
+ pageNumber
+ });
+
+ return;
+ }
+
+ const boundingRect = [pageView.viewport.convertToViewportPoint(x, y), pageView.viewport.convertToViewportPoint(x + width, y + height)];
+ let left = Math.min(boundingRect[0][0], boundingRect[1][0]);
+ let top = Math.min(boundingRect[0][1], boundingRect[1][1]);
+
+ if (!allowNegativeOffset) {
+ left = Math.max(left, 0);
+ top = Math.max(top, 0);
+ }
+
+ this._scrollIntoView({
+ pageDiv: pageView.div,
+ pageSpot: {
+ left,
+ top
+ },
+ pageNumber
+ });
+ }
+
+ _updateLocation(firstPage) {
+ const currentScale = this._currentScale;
+ const currentScaleValue = this._currentScaleValue;
+ const normalizedScaleValue = parseFloat(currentScaleValue) === currentScale ? Math.round(currentScale * 10000) / 100 : currentScaleValue;
+ const pageNumber = firstPage.id;
+ let pdfOpenParams = "#page=" + pageNumber;
+ pdfOpenParams += "&zoom=" + normalizedScaleValue;
+ const currentPageView = this._pages[pageNumber - 1];
+ const container = this.container;
+ const topLeft = currentPageView.getPagePoint(container.scrollLeft - firstPage.x, container.scrollTop - firstPage.y);
+ const intLeft = Math.round(topLeft[0]);
+ const intTop = Math.round(topLeft[1]);
+ pdfOpenParams += "," + intLeft + "," + intTop;
+ this._location = {
+ pageNumber,
+ scale: normalizedScaleValue,
+ top: intTop,
+ left: intLeft,
+ rotation: this._pagesRotation,
+ pdfOpenParams
+ };
+ }
+
+ _updateHelper(visiblePages) {
+ throw new Error("Not implemented: _updateHelper");
+ }
+
+ update() {
+ const visible = this._getVisiblePages();
+
+ const visiblePages = visible.views,
+ numVisiblePages = visiblePages.length;
+
+ if (numVisiblePages === 0) {
+ return;
+ }
+
+ const newCacheSize = Math.max(DEFAULT_CACHE_SIZE, 2 * numVisiblePages + 1);
+
+ this._buffer.resize(newCacheSize, visiblePages);
+
+ this.renderingQueue.renderHighestPriority(visible);
+
+ this._updateHelper(visiblePages);
+
+ this._updateLocation(visible.first);
+
+ this.eventBus.dispatch("updateviewarea", {
+ source: this,
+ location: this._location
+ });
+ }
+
+ containsElement(element) {
+ return this.container.contains(element);
+ }
+
+ focus() {
+ this.container.focus();
+ }
+
+ get _isScrollModeHorizontal() {
+ return this.isInPresentationMode ? false : this._scrollMode === _ui_utils.ScrollMode.HORIZONTAL;
+ }
+
+ get isInPresentationMode() {
+ return this.presentationModeState === _ui_utils.PresentationModeState.FULLSCREEN;
+ }
+
+ get isChangingPresentationMode() {
+ return this.presentationModeState === _ui_utils.PresentationModeState.CHANGING;
+ }
+
+ get isHorizontalScrollbarEnabled() {
+ return this.isInPresentationMode ? false : this.container.scrollWidth > this.container.clientWidth;
+ }
+
+ get isVerticalScrollbarEnabled() {
+ return this.isInPresentationMode ? false : this.container.scrollHeight > this.container.clientHeight;
+ }
+
+ _getCurrentVisiblePage() {
+ if (!this.pagesCount) {
+ return {
+ views: []
+ };
+ }
+
+ const pageView = this._pages[this._currentPageNumber - 1];
+ const element = pageView.div;
+ const view = {
+ id: pageView.id,
+ x: element.offsetLeft + element.clientLeft,
+ y: element.offsetTop + element.clientTop,
+ view: pageView
+ };
+ return {
+ first: view,
+ last: view,
+ views: [view]
+ };
+ }
+
+ _getVisiblePages() {
+ return (0, _ui_utils.getVisibleElements)(this.container, this._pages, true, this._isScrollModeHorizontal);
+ }
+
+ isPageVisible(pageNumber) {
+ if (!this.pdfDocument) {
+ return false;
+ }
+
+ if (pageNumber < 1 || pageNumber > this.pagesCount) {
+ console.error(`${this._name}.isPageVisible: "${pageNumber}" is out of bounds.`);
+ return false;
+ }
+
+ return this._getVisiblePages().views.some(function (view) {
+ return view.id === pageNumber;
+ });
+ }
+
+ cleanup() {
+ for (let i = 0, ii = this._pages.length; i < ii; i++) {
+ if (this._pages[i] && this._pages[i].renderingState !== _pdf_rendering_queue.RenderingStates.FINISHED) {
+ this._pages[i].reset();
+ }
+ }
+ }
+
+ _cancelRendering() {
+ for (let i = 0, ii = this._pages.length; i < ii; i++) {
+ if (this._pages[i]) {
+ this._pages[i].cancelRendering();
+ }
+ }
+ }
+
+ _ensurePdfPageLoaded(pageView) {
+ if (pageView.pdfPage) {
+ return Promise.resolve(pageView.pdfPage);
+ }
+
+ if (this._pagesRequests.has(pageView)) {
+ return this._pagesRequests.get(pageView);
+ }
+
+ const promise = this.pdfDocument.getPage(pageView.id).then(pdfPage => {
+ if (!pageView.pdfPage) {
+ pageView.setPdfPage(pdfPage);
+ }
+
+ this._pagesRequests.delete(pageView);
+
+ return pdfPage;
+ }).catch(reason => {
+ console.error("Unable to get page for page view", reason);
+
+ this._pagesRequests.delete(pageView);
+ });
+
+ this._pagesRequests.set(pageView, promise);
+
+ return promise;
+ }
+
+ forceRendering(currentlyVisiblePages) {
+ const visiblePages = currentlyVisiblePages || this._getVisiblePages();
+
+ const scrollAhead = this._isScrollModeHorizontal ? this.scroll.right : this.scroll.down;
+ const pageView = this.renderingQueue.getHighestPriority(visiblePages, this._pages, scrollAhead);
+
+ if (pageView) {
+ this._ensurePdfPageLoaded(pageView).then(() => {
+ this.renderingQueue.renderView(pageView);
+ });
+
+ return true;
+ }
+
+ return false;
+ }
+
+ createTextLayerBuilder(textLayerDiv, pageIndex, viewport, enhanceTextSelection = false, eventBus) {
+ return new _text_layer_builder.TextLayerBuilder({
+ textLayerDiv,
+ eventBus,
+ pageIndex,
+ viewport,
+ findController: this.isInPresentationMode ? null : this.findController,
+ enhanceTextSelection: this.isInPresentationMode ? false : enhanceTextSelection
+ });
+ }
+
+ createAnnotationLayerBuilder(pageDiv, pdfPage, imageResourcesPath = "", renderInteractiveForms = false, l10n = _ui_utils.NullL10n) {
+ return new _annotation_layer_builder.AnnotationLayerBuilder({
+ pageDiv,
+ pdfPage,
+ imageResourcesPath,
+ renderInteractiveForms,
+ linkService: this.linkService,
+ downloadManager: this.downloadManager,
+ l10n
+ });
+ }
+
+ get hasEqualPageSizes() {
+ const firstPageView = this._pages[0];
+
+ for (let i = 1, ii = this._pages.length; i < ii; ++i) {
+ const pageView = this._pages[i];
+
+ if (pageView.width !== firstPageView.width || pageView.height !== firstPageView.height) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ getPagesOverview() {
+ const pagesOverview = this._pages.map(function (pageView) {
+ const viewport = pageView.pdfPage.getViewport({
+ scale: 1
+ });
+ return {
+ width: viewport.width,
+ height: viewport.height,
+ rotation: viewport.rotation
+ };
+ });
+
+ if (!this.enablePrintAutoRotate) {
+ return pagesOverview;
+ }
+
+ const isFirstPagePortrait = (0, _ui_utils.isPortraitOrientation)(pagesOverview[0]);
+ return pagesOverview.map(function (size) {
+ if (isFirstPagePortrait === (0, _ui_utils.isPortraitOrientation)(size)) {
+ return size;
+ }
+
+ return {
+ width: size.height,
+ height: size.width,
+ rotation: (size.rotation + 90) % 360
+ };
+ });
+ }
+
+ get scrollMode() {
+ return this._scrollMode;
+ }
+
+ set scrollMode(mode) {
+ if (this._scrollMode === mode) {
+ return;
+ }
+
+ if (!(0, _ui_utils.isValidScrollMode)(mode)) {
+ throw new Error(`Invalid scroll mode: ${mode}`);
+ }
+
+ this._scrollMode = mode;
+ this.eventBus.dispatch("scrollmodechanged", {
+ source: this,
+ mode
+ });
+
+ this._updateScrollMode(this._currentPageNumber);
+ }
+
+ _updateScrollMode(pageNumber = null) {
+ const scrollMode = this._scrollMode,
+ viewer = this.viewer;
+ viewer.classList.toggle("scrollHorizontal", scrollMode === _ui_utils.ScrollMode.HORIZONTAL);
+ viewer.classList.toggle("scrollWrapped", scrollMode === _ui_utils.ScrollMode.WRAPPED);
+
+ if (!this.pdfDocument || !pageNumber) {
+ return;
+ }
+
+ if (this._currentScaleValue && isNaN(this._currentScaleValue)) {
+ this._setScale(this._currentScaleValue, true);
+ }
+
+ this._setCurrentPageNumber(pageNumber, true);
+
+ this.update();
+ }
+
+ get spreadMode() {
+ return this._spreadMode;
+ }
+
+ set spreadMode(mode) {
+ if (this._spreadMode === mode) {
+ return;
+ }
+
+ if (!(0, _ui_utils.isValidSpreadMode)(mode)) {
+ throw new Error(`Invalid spread mode: ${mode}`);
+ }
+
+ this._spreadMode = mode;
+ this.eventBus.dispatch("spreadmodechanged", {
+ source: this,
+ mode
+ });
+
+ this._updateSpreadMode(this._currentPageNumber);
+ }
+
+ _updateSpreadMode(pageNumber = null) {
+ if (!this.pdfDocument) {
+ return;
+ }
+
+ const viewer = this.viewer,
+ pages = this._pages;
+ viewer.textContent = "";
+
+ if (this._spreadMode === _ui_utils.SpreadMode.NONE) {
+ for (let i = 0, iMax = pages.length; i < iMax; ++i) {
+ viewer.appendChild(pages[i].div);
+ }
+ } else {
+ const parity = this._spreadMode - 1;
+ let spread = null;
+
+ for (let i = 0, iMax = pages.length; i < iMax; ++i) {
+ if (spread === null) {
+ spread = document.createElement("div");
+ spread.className = "spread";
+ viewer.appendChild(spread);
+ } else if (i % 2 === parity) {
+ spread = spread.cloneNode(false);
+ viewer.appendChild(spread);
+ }
+
+ spread.appendChild(pages[i].div);
+ }
+ }
+
+ if (!pageNumber) {
+ return;
+ }
+
+ this._setCurrentPageNumber(pageNumber, true);
+
+ this.update();
+ }
+
+}
+
+exports.BaseViewer = BaseViewer;
+
+/***/ }),
+/* 26 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.DefaultAnnotationLayerFactory = exports.AnnotationLayerBuilder = void 0;
+
+var _pdfjsLib = __webpack_require__(4);
+
+var _ui_utils = __webpack_require__(2);
+
+var _pdf_link_service = __webpack_require__(18);
+
+class AnnotationLayerBuilder {
+ constructor({
+ pageDiv,
+ pdfPage,
+ linkService,
+ downloadManager,
+ imageResourcesPath = "",
+ renderInteractiveForms = false,
+ l10n = _ui_utils.NullL10n
+ }) {
+ this.pageDiv = pageDiv;
+ this.pdfPage = pdfPage;
+ this.linkService = linkService;
+ this.downloadManager = downloadManager;
+ this.imageResourcesPath = imageResourcesPath;
+ this.renderInteractiveForms = renderInteractiveForms;
+ this.l10n = l10n;
+ this.div = null;
+ this._cancelled = false;
+ }
+
+ render(viewport, intent = "display") {
+ this.pdfPage.getAnnotations({
+ intent
+ }).then(annotations => {
+ if (this._cancelled) {
+ return;
+ }
+
+ const parameters = {
+ viewport: viewport.clone({
+ dontFlip: true
+ }),
+ div: this.div,
+ annotations,
+ page: this.pdfPage,
+ imageResourcesPath: this.imageResourcesPath,
+ renderInteractiveForms: this.renderInteractiveForms,
+ linkService: this.linkService,
+ downloadManager: this.downloadManager
+ };
+
+ if (this.div) {
+ _pdfjsLib.AnnotationLayer.update(parameters);
+ } else {
+ if (annotations.length === 0) {
+ return;
+ }
+
+ this.div = document.createElement("div");
+ this.div.className = "annotationLayer";
+ this.pageDiv.appendChild(this.div);
+ parameters.div = this.div;
+
+ _pdfjsLib.AnnotationLayer.render(parameters);
+
+ this.l10n.translate(this.div);
+ }
+ });
+ }
+
+ cancel() {
+ this._cancelled = true;
+ }
+
+ hide() {
+ if (!this.div) {
+ return;
+ }
+
+ this.div.setAttribute("hidden", "true");
+ }
+
+}
+
+exports.AnnotationLayerBuilder = AnnotationLayerBuilder;
+
+class DefaultAnnotationLayerFactory {
+ createAnnotationLayerBuilder(pageDiv, pdfPage, imageResourcesPath = "", renderInteractiveForms = false, l10n = _ui_utils.NullL10n) {
+ return new AnnotationLayerBuilder({
+ pageDiv,
+ pdfPage,
+ imageResourcesPath,
+ renderInteractiveForms,
+ linkService: new _pdf_link_service.SimpleLinkService(),
+ l10n
+ });
+ }
+
+}
+
+exports.DefaultAnnotationLayerFactory = DefaultAnnotationLayerFactory;
+
+/***/ }),
+/* 27 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PDFPageView = void 0;
+
+var _ui_utils = __webpack_require__(2);
+
+var _pdfjsLib = __webpack_require__(4);
+
+var _pdf_rendering_queue = __webpack_require__(8);
+
+var _viewer_compatibility = __webpack_require__(5);
+
+const MAX_CANVAS_PIXELS = _viewer_compatibility.viewerCompatibilityParams.maxCanvasPixels || 16777216;
+
+class PDFPageView {
+ constructor(options) {
+ const container = options.container;
+ const defaultViewport = options.defaultViewport;
+ this.id = options.id;
+ this.renderingId = "page" + this.id;
+ this.pdfPage = null;
+ this.pageLabel = null;
+ this.rotation = 0;
+ this.scale = options.scale || _ui_utils.DEFAULT_SCALE;
+ this.viewport = defaultViewport;
+ this.pdfPageRotate = defaultViewport.rotation;
+ this.hasRestrictedScaling = false;
+ this.textLayerMode = Number.isInteger(options.textLayerMode) ? options.textLayerMode : _ui_utils.TextLayerMode.ENABLE;
+ this.imageResourcesPath = options.imageResourcesPath || "";
+ this.renderInteractiveForms = options.renderInteractiveForms || false;
+ this.useOnlyCssZoom = options.useOnlyCssZoom || false;
+ this.maxCanvasPixels = options.maxCanvasPixels || MAX_CANVAS_PIXELS;
+ this.eventBus = options.eventBus || (0, _ui_utils.getGlobalEventBus)();
+ this.renderingQueue = options.renderingQueue;
+ this.textLayerFactory = options.textLayerFactory;
+ this.annotationLayerFactory = options.annotationLayerFactory;
+ this.renderer = options.renderer || _ui_utils.RendererType.CANVAS;
+ this.enableWebGL = options.enableWebGL || false;
+ this.l10n = options.l10n || _ui_utils.NullL10n;
+ this.paintTask = null;
+ this.paintedViewportMap = new WeakMap();
+ this.renderingState = _pdf_rendering_queue.RenderingStates.INITIAL;
+ this.resume = null;
+ this.error = null;
+ this.annotationLayer = null;
+ this.textLayer = null;
+ this.zoomLayer = null;
+ const div = document.createElement("div");
+ div.className = "page";
+ div.style.width = Math.floor(this.viewport.width) + "px";
+ div.style.height = Math.floor(this.viewport.height) + "px";
+ div.setAttribute("data-page-number", this.id);
+ this.div = div;
+ container.appendChild(div);
+ }
+
+ setPdfPage(pdfPage) {
+ this.pdfPage = pdfPage;
+ this.pdfPageRotate = pdfPage.rotate;
+ const totalRotation = (this.rotation + this.pdfPageRotate) % 360;
+ this.viewport = pdfPage.getViewport({
+ scale: this.scale * _ui_utils.CSS_UNITS,
+ rotation: totalRotation
+ });
+ this.stats = pdfPage.stats;
+ this.reset();
+ }
+
+ destroy() {
+ this.reset();
+
+ if (this.pdfPage) {
+ this.pdfPage.cleanup();
+ }
+ }
+
+ _resetZoomLayer(removeFromDOM = false) {
+ if (!this.zoomLayer) {
+ return;
+ }
+
+ const zoomLayerCanvas = this.zoomLayer.firstChild;
+ this.paintedViewportMap.delete(zoomLayerCanvas);
+ zoomLayerCanvas.width = 0;
+ zoomLayerCanvas.height = 0;
+
+ if (removeFromDOM) {
+ this.zoomLayer.remove();
+ }
+
+ this.zoomLayer = null;
+ }
+
+ reset(keepZoomLayer = false, keepAnnotations = false) {
+ this.cancelRendering(keepAnnotations);
+ this.renderingState = _pdf_rendering_queue.RenderingStates.INITIAL;
+ const div = this.div;
+ div.style.width = Math.floor(this.viewport.width) + "px";
+ div.style.height = Math.floor(this.viewport.height) + "px";
+ const childNodes = div.childNodes;
+ const currentZoomLayerNode = keepZoomLayer && this.zoomLayer || null;
+ const currentAnnotationNode = keepAnnotations && this.annotationLayer && this.annotationLayer.div || null;
+
+ for (let i = childNodes.length - 1; i >= 0; i--) {
+ const node = childNodes[i];
+
+ if (currentZoomLayerNode === node || currentAnnotationNode === node) {
+ continue;
+ }
+
+ div.removeChild(node);
+ }
+
+ div.removeAttribute("data-loaded");
+
+ if (currentAnnotationNode) {
+ this.annotationLayer.hide();
+ } else if (this.annotationLayer) {
+ this.annotationLayer.cancel();
+ this.annotationLayer = null;
+ }
+
+ if (!currentZoomLayerNode) {
+ if (this.canvas) {
+ this.paintedViewportMap.delete(this.canvas);
+ this.canvas.width = 0;
+ this.canvas.height = 0;
+ delete this.canvas;
+ }
+
+ this._resetZoomLayer();
+ }
+
+ if (this.svg) {
+ this.paintedViewportMap.delete(this.svg);
+ delete this.svg;
+ }
+
+ this.loadingIconDiv = document.createElement("div");
+ this.loadingIconDiv.className = "loadingIcon";
+ div.appendChild(this.loadingIconDiv);
+ }
+
+ update(scale, rotation) {
+ this.scale = scale || this.scale;
+
+ if (typeof rotation !== "undefined") {
+ this.rotation = rotation;
+ }
+
+ const totalRotation = (this.rotation + this.pdfPageRotate) % 360;
+ this.viewport = this.viewport.clone({
+ scale: this.scale * _ui_utils.CSS_UNITS,
+ rotation: totalRotation
+ });
+
+ if (this.svg) {
+ this.cssTransform(this.svg, true);
+ this.eventBus.dispatch("pagerendered", {
+ source: this,
+ pageNumber: this.id,
+ cssTransform: true,
+ timestamp: performance.now()
+ });
+ return;
+ }
+
+ let isScalingRestricted = false;
+
+ if (this.canvas && this.maxCanvasPixels > 0) {
+ const outputScale = this.outputScale;
+
+ if ((Math.floor(this.viewport.width) * outputScale.sx | 0) * (Math.floor(this.viewport.height) * outputScale.sy | 0) > this.maxCanvasPixels) {
+ isScalingRestricted = true;
+ }
+ }
+
+ if (this.canvas) {
+ if (this.useOnlyCssZoom || this.hasRestrictedScaling && isScalingRestricted) {
+ this.cssTransform(this.canvas, true);
+ this.eventBus.dispatch("pagerendered", {
+ source: this,
+ pageNumber: this.id,
+ cssTransform: true,
+ timestamp: performance.now()
+ });
+ return;
+ }
+
+ if (!this.zoomLayer && !this.canvas.hasAttribute("hidden")) {
+ this.zoomLayer = this.canvas.parentNode;
+ this.zoomLayer.style.position = "absolute";
+ }
+ }
+
+ if (this.zoomLayer) {
+ this.cssTransform(this.zoomLayer.firstChild);
+ }
+
+ this.reset(true, true);
+ }
+
+ cancelRendering(keepAnnotations = false) {
+ if (this.paintTask) {
+ this.paintTask.cancel();
+ this.paintTask = null;
+ }
+
+ this.resume = null;
+
+ if (this.textLayer) {
+ this.textLayer.cancel();
+ this.textLayer = null;
+ }
+
+ if (!keepAnnotations && this.annotationLayer) {
+ this.annotationLayer.cancel();
+ this.annotationLayer = null;
+ }
+ }
+
+ cssTransform(target, redrawAnnotations = false) {
+ const width = this.viewport.width;
+ const height = this.viewport.height;
+ const div = this.div;
+ target.style.width = target.parentNode.style.width = div.style.width = Math.floor(width) + "px";
+ target.style.height = target.parentNode.style.height = div.style.height = Math.floor(height) + "px";
+ const relativeRotation = this.viewport.rotation - this.paintedViewportMap.get(target).rotation;
+ const absRotation = Math.abs(relativeRotation);
+ let scaleX = 1,
+ scaleY = 1;
+
+ if (absRotation === 90 || absRotation === 270) {
+ scaleX = height / width;
+ scaleY = width / height;
+ }
+
+ const cssTransform = "rotate(" + relativeRotation + "deg) " + "scale(" + scaleX + "," + scaleY + ")";
+ target.style.transform = cssTransform;
+
+ if (this.textLayer) {
+ const textLayerViewport = this.textLayer.viewport;
+ const textRelativeRotation = this.viewport.rotation - textLayerViewport.rotation;
+ const textAbsRotation = Math.abs(textRelativeRotation);
+ let scale = width / textLayerViewport.width;
+
+ if (textAbsRotation === 90 || textAbsRotation === 270) {
+ scale = width / textLayerViewport.height;
+ }
+
+ const textLayerDiv = this.textLayer.textLayerDiv;
+ let transX, transY;
+
+ switch (textAbsRotation) {
+ case 0:
+ transX = transY = 0;
+ break;
+
+ case 90:
+ transX = 0;
+ transY = "-" + textLayerDiv.style.height;
+ break;
+
+ case 180:
+ transX = "-" + textLayerDiv.style.width;
+ transY = "-" + textLayerDiv.style.height;
+ break;
+
+ case 270:
+ transX = "-" + textLayerDiv.style.width;
+ transY = 0;
+ break;
+
+ default:
+ console.error("Bad rotation value.");
+ break;
+ }
+
+ textLayerDiv.style.transform = "rotate(" + textAbsRotation + "deg) " + "scale(" + scale + ", " + scale + ") " + "translate(" + transX + ", " + transY + ")";
+ textLayerDiv.style.transformOrigin = "0% 0%";
+ }
+
+ if (redrawAnnotations && this.annotationLayer) {
+ this.annotationLayer.render(this.viewport, "display");
+ }
+ }
+
+ get width() {
+ return this.viewport.width;
+ }
+
+ get height() {
+ return this.viewport.height;
+ }
+
+ getPagePoint(x, y) {
+ return this.viewport.convertToPdfPoint(x, y);
+ }
+
+ draw() {
+ if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) {
+ console.error("Must be in new state before drawing");
+ this.reset();
+ }
+
+ const {
+ div,
+ pdfPage
+ } = this;
+
+ if (!pdfPage) {
+ this.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED;
+
+ if (this.loadingIconDiv) {
+ div.removeChild(this.loadingIconDiv);
+ delete this.loadingIconDiv;
+ }
+
+ return Promise.reject(new Error("pdfPage is not loaded"));
+ }
+
+ this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING;
+ const canvasWrapper = document.createElement("div");
+ canvasWrapper.style.width = div.style.width;
+ canvasWrapper.style.height = div.style.height;
+ canvasWrapper.classList.add("canvasWrapper");
+
+ if (this.annotationLayer && this.annotationLayer.div) {
+ div.insertBefore(canvasWrapper, this.annotationLayer.div);
+ } else {
+ div.appendChild(canvasWrapper);
+ }
+
+ let textLayer = null;
+
+ if (this.textLayerMode !== _ui_utils.TextLayerMode.DISABLE && this.textLayerFactory) {
+ const textLayerDiv = document.createElement("div");
+ textLayerDiv.className = "textLayer";
+ textLayerDiv.style.width = canvasWrapper.style.width;
+ textLayerDiv.style.height = canvasWrapper.style.height;
+
+ if (this.annotationLayer && this.annotationLayer.div) {
+ div.insertBefore(textLayerDiv, this.annotationLayer.div);
+ } else {
+ div.appendChild(textLayerDiv);
+ }
+
+ textLayer = this.textLayerFactory.createTextLayerBuilder(textLayerDiv, this.id - 1, this.viewport, this.textLayerMode === _ui_utils.TextLayerMode.ENABLE_ENHANCE, this.eventBus);
+ }
+
+ this.textLayer = textLayer;
+ let renderContinueCallback = null;
+
+ if (this.renderingQueue) {
+ renderContinueCallback = cont => {
+ if (!this.renderingQueue.isHighestPriority(this)) {
+ this.renderingState = _pdf_rendering_queue.RenderingStates.PAUSED;
+
+ this.resume = () => {
+ this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING;
+ cont();
+ };
+
+ return;
+ }
+
+ cont();
+ };
+ }
+
+ const finishPaintTask = async error => {
+ if (paintTask === this.paintTask) {
+ this.paintTask = null;
+ }
+
+ if (error instanceof _pdfjsLib.RenderingCancelledException) {
+ this.error = null;
+ return;
+ }
+
+ this.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED;
+
+ if (this.loadingIconDiv) {
+ div.removeChild(this.loadingIconDiv);
+ delete this.loadingIconDiv;
+ }
+
+ this._resetZoomLayer(true);
+
+ this.error = error;
+ this.stats = pdfPage.stats;
+ this.eventBus.dispatch("pagerendered", {
+ source: this,
+ pageNumber: this.id,
+ cssTransform: false,
+ timestamp: performance.now()
+ });
+
+ if (error) {
+ throw error;
+ }
+ };
+
+ const paintTask = this.renderer === _ui_utils.RendererType.SVG ? this.paintOnSvg(canvasWrapper) : this.paintOnCanvas(canvasWrapper);
+ paintTask.onRenderContinue = renderContinueCallback;
+ this.paintTask = paintTask;
+ const resultPromise = paintTask.promise.then(function () {
+ return finishPaintTask(null).then(function () {
+ if (textLayer) {
+ const readableStream = pdfPage.streamTextContent({
+ normalizeWhitespace: true
+ });
+ textLayer.setTextContentStream(readableStream);
+ textLayer.render();
+ }
+ });
+ }, function (reason) {
+ return finishPaintTask(reason);
+ });
+
+ if (this.annotationLayerFactory) {
+ if (!this.annotationLayer) {
+ this.annotationLayer = this.annotationLayerFactory.createAnnotationLayerBuilder(div, pdfPage, this.imageResourcesPath, this.renderInteractiveForms, this.l10n);
+ }
+
+ this.annotationLayer.render(this.viewport, "display");
+ }
+
+ div.setAttribute("data-loaded", true);
+ this.eventBus.dispatch("pagerender", {
+ source: this,
+ pageNumber: this.id
+ });
+ return resultPromise;
+ }
+
+ paintOnCanvas(canvasWrapper) {
+ const renderCapability = (0, _pdfjsLib.createPromiseCapability)();
+ const result = {
+ promise: renderCapability.promise,
+
+ onRenderContinue(cont) {
+ cont();
+ },
+
+ cancel() {
+ renderTask.cancel();
+ }
+
+ };
+ const viewport = this.viewport;
+ const canvas = document.createElement("canvas");
+ this.l10n.get("page_canvas", {
+ page: this.id
+ }, "Page {{page}}").then(msg => {
+ canvas.setAttribute("aria-label", msg);
+ });
+ canvas.setAttribute("hidden", "hidden");
+ let isCanvasHidden = true;
+
+ const showCanvas = function () {
+ if (isCanvasHidden) {
+ canvas.removeAttribute("hidden");
+ isCanvasHidden = false;
+ }
+ };
+
+ canvasWrapper.appendChild(canvas);
+ this.canvas = canvas;
+ canvas.mozOpaque = true;
+ const ctx = canvas.getContext("2d", {
+ alpha: false
+ });
+ const outputScale = (0, _ui_utils.getOutputScale)(ctx);
+ this.outputScale = outputScale;
+
+ if (this.useOnlyCssZoom) {
+ const actualSizeViewport = viewport.clone({
+ scale: _ui_utils.CSS_UNITS
+ });
+ outputScale.sx *= actualSizeViewport.width / viewport.width;
+ outputScale.sy *= actualSizeViewport.height / viewport.height;
+ outputScale.scaled = true;
+ }
+
+ if (this.maxCanvasPixels > 0) {
+ const pixelsInViewport = viewport.width * viewport.height;
+ const maxScale = Math.sqrt(this.maxCanvasPixels / pixelsInViewport);
+
+ if (outputScale.sx > maxScale || outputScale.sy > maxScale) {
+ outputScale.sx = maxScale;
+ outputScale.sy = maxScale;
+ outputScale.scaled = true;
+ this.hasRestrictedScaling = true;
+ } else {
+ this.hasRestrictedScaling = false;
+ }
+ }
+
+ const sfx = (0, _ui_utils.approximateFraction)(outputScale.sx);
+ const sfy = (0, _ui_utils.approximateFraction)(outputScale.sy);
+ canvas.width = (0, _ui_utils.roundToDivide)(viewport.width * outputScale.sx, sfx[0]);
+ canvas.height = (0, _ui_utils.roundToDivide)(viewport.height * outputScale.sy, sfy[0]);
+ canvas.style.width = (0, _ui_utils.roundToDivide)(viewport.width, sfx[1]) + "px";
+ canvas.style.height = (0, _ui_utils.roundToDivide)(viewport.height, sfy[1]) + "px";
+ this.paintedViewportMap.set(canvas, viewport);
+ const transform = !outputScale.scaled ? null : [outputScale.sx, 0, 0, outputScale.sy, 0, 0];
+ const renderContext = {
+ canvasContext: ctx,
+ transform,
+ viewport: this.viewport,
+ enableWebGL: this.enableWebGL,
+ renderInteractiveForms: this.renderInteractiveForms
+ };
+ const renderTask = this.pdfPage.render(renderContext);
+
+ renderTask.onContinue = function (cont) {
+ showCanvas();
+
+ if (result.onRenderContinue) {
+ result.onRenderContinue(cont);
+ } else {
+ cont();
+ }
+ };
+
+ renderTask.promise.then(function () {
+ showCanvas();
+ renderCapability.resolve(undefined);
+ }, function (error) {
+ showCanvas();
+ renderCapability.reject(error);
+ });
+ return result;
+ }
+
+ paintOnSvg(wrapper) {
+ let cancelled = false;
+
+ const ensureNotCancelled = () => {
+ if (cancelled) {
+ throw new _pdfjsLib.RenderingCancelledException(`Rendering cancelled, page ${this.id}`, "svg");
+ }
+ };
+
+ const pdfPage = this.pdfPage;
+ const actualSizeViewport = this.viewport.clone({
+ scale: _ui_utils.CSS_UNITS
+ });
+ const promise = pdfPage.getOperatorList().then(opList => {
+ ensureNotCancelled();
+ const svgGfx = new _pdfjsLib.SVGGraphics(pdfPage.commonObjs, pdfPage.objs);
+ return svgGfx.getSVG(opList, actualSizeViewport).then(svg => {
+ ensureNotCancelled();
+ this.svg = svg;
+ this.paintedViewportMap.set(svg, actualSizeViewport);
+ svg.style.width = wrapper.style.width;
+ svg.style.height = wrapper.style.height;
+ this.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED;
+ wrapper.appendChild(svg);
+ });
+ });
+ return {
+ promise,
+
+ onRenderContinue(cont) {
+ cont();
+ },
+
+ cancel() {
+ cancelled = true;
+ }
+
+ };
+ }
+
+ setPageLabel(label) {
+ this.pageLabel = typeof label === "string" ? label : null;
+
+ if (this.pageLabel !== null) {
+ this.div.setAttribute("data-page-label", this.pageLabel);
+ } else {
+ this.div.removeAttribute("data-page-label");
+ }
+ }
+
+}
+
+exports.PDFPageView = PDFPageView;
+
+/***/ }),
+/* 28 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.DefaultTextLayerFactory = exports.TextLayerBuilder = void 0;
+
+var _ui_utils = __webpack_require__(2);
+
+var _pdfjsLib = __webpack_require__(4);
+
+const EXPAND_DIVS_TIMEOUT = 300;
+
+class TextLayerBuilder {
+ constructor({
+ textLayerDiv,
+ eventBus,
+ pageIndex,
+ viewport,
+ findController = null,
+ enhanceTextSelection = false
+ }) {
+ this.textLayerDiv = textLayerDiv;
+ this.eventBus = eventBus || (0, _ui_utils.getGlobalEventBus)();
+ this.textContent = null;
+ this.textContentItemsStr = [];
+ this.textContentStream = null;
+ this.renderingDone = false;
+ this.pageIdx = pageIndex;
+ this.pageNumber = this.pageIdx + 1;
+ this.matches = [];
+ this.viewport = viewport;
+ this.textDivs = [];
+ this.findController = findController;
+ this.textLayerRenderTask = null;
+ this.enhanceTextSelection = enhanceTextSelection;
+ this._onUpdateTextLayerMatches = null;
+
+ this._bindMouse();
+ }
+
+ _finishRendering() {
+ this.renderingDone = true;
+
+ if (!this.enhanceTextSelection) {
+ const endOfContent = document.createElement("div");
+ endOfContent.className = "endOfContent";
+ this.textLayerDiv.appendChild(endOfContent);
+ }
+
+ this.eventBus.dispatch("textlayerrendered", {
+ source: this,
+ pageNumber: this.pageNumber,
+ numTextDivs: this.textDivs.length
+ });
+ }
+
+ render(timeout = 0) {
+ if (!(this.textContent || this.textContentStream) || this.renderingDone) {
+ return;
+ }
+
+ this.cancel();
+ this.textDivs = [];
+ const textLayerFrag = document.createDocumentFragment();
+ this.textLayerRenderTask = (0, _pdfjsLib.renderTextLayer)({
+ textContent: this.textContent,
+ textContentStream: this.textContentStream,
+ container: textLayerFrag,
+ viewport: this.viewport,
+ textDivs: this.textDivs,
+ textContentItemsStr: this.textContentItemsStr,
+ timeout,
+ enhanceTextSelection: this.enhanceTextSelection
+ });
+ this.textLayerRenderTask.promise.then(() => {
+ this.textLayerDiv.appendChild(textLayerFrag);
+
+ this._finishRendering();
+
+ this._updateMatches();
+ }, function (reason) {});
+
+ if (!this._onUpdateTextLayerMatches) {
+ this._onUpdateTextLayerMatches = evt => {
+ if (evt.pageIndex === this.pageIdx || evt.pageIndex === -1) {
+ this._updateMatches();
+ }
+ };
+
+ this.eventBus._on("updatetextlayermatches", this._onUpdateTextLayerMatches);
+ }
+ }
+
+ cancel() {
+ if (this.textLayerRenderTask) {
+ this.textLayerRenderTask.cancel();
+ this.textLayerRenderTask = null;
+ }
+
+ if (this._onUpdateTextLayerMatches) {
+ this.eventBus._off("updatetextlayermatches", this._onUpdateTextLayerMatches);
+
+ this._onUpdateTextLayerMatches = null;
+ }
+ }
+
+ setTextContentStream(readableStream) {
+ this.cancel();
+ this.textContentStream = readableStream;
+ }
+
+ setTextContent(textContent) {
+ this.cancel();
+ this.textContent = textContent;
+ }
+
+ _convertMatches(matches, matchesLength) {
+ if (!matches) {
+ return [];
+ }
+
+ const {
+ findController,
+ textContentItemsStr
+ } = this;
+ let i = 0,
+ iIndex = 0;
+ const end = textContentItemsStr.length - 1;
+ const queryLen = findController.state.query.length;
+ const result = [];
+
+ for (let m = 0, mm = matches.length; m < mm; m++) {
+ let matchIdx = matches[m];
+
+ while (i !== end && matchIdx >= iIndex + textContentItemsStr[i].length) {
+ iIndex += textContentItemsStr[i].length;
+ i++;
+ }
+
+ if (i === textContentItemsStr.length) {
+ console.error("Could not find a matching mapping");
+ }
+
+ const match = {
+ begin: {
+ divIdx: i,
+ offset: matchIdx - iIndex
+ }
+ };
+
+ if (matchesLength) {
+ matchIdx += matchesLength[m];
+ } else {
+ matchIdx += queryLen;
+ }
+
+ while (i !== end && matchIdx > iIndex + textContentItemsStr[i].length) {
+ iIndex += textContentItemsStr[i].length;
+ i++;
+ }
+
+ match.end = {
+ divIdx: i,
+ offset: matchIdx - iIndex
+ };
+ result.push(match);
+ }
+
+ return result;
+ }
+
+ _renderMatches(matches) {
+ if (matches.length === 0) {
+ return;
+ }
+
+ const {
+ findController,
+ pageIdx,
+ textContentItemsStr,
+ textDivs
+ } = this;
+ const isSelectedPage = pageIdx === findController.selected.pageIdx;
+ const selectedMatchIdx = findController.selected.matchIdx;
+ const highlightAll = findController.state.highlightAll;
+ let prevEnd = null;
+ const infinity = {
+ divIdx: -1,
+ offset: undefined
+ };
+
+ function beginText(begin, className) {
+ const divIdx = begin.divIdx;
+ textDivs[divIdx].textContent = "";
+ appendTextToDiv(divIdx, 0, begin.offset, className);
+ }
+
+ function appendTextToDiv(divIdx, fromOffset, toOffset, className) {
+ const div = textDivs[divIdx];
+ const content = textContentItemsStr[divIdx].substring(fromOffset, toOffset);
+ const node = document.createTextNode(content);
+
+ if (className) {
+ const span = document.createElement("span");
+ span.className = className;
+ span.appendChild(node);
+ div.appendChild(span);
+ return;
+ }
+
+ div.appendChild(node);
+ }
+
+ let i0 = selectedMatchIdx,
+ i1 = i0 + 1;
+
+ if (highlightAll) {
+ i0 = 0;
+ i1 = matches.length;
+ } else if (!isSelectedPage) {
+ return;
+ }
+
+ for (let i = i0; i < i1; i++) {
+ const match = matches[i];
+ const begin = match.begin;
+ const end = match.end;
+ const isSelected = isSelectedPage && i === selectedMatchIdx;
+ const highlightSuffix = isSelected ? " selected" : "";
+
+ if (isSelected) {
+ findController.scrollMatchIntoView({
+ element: textDivs[begin.divIdx],
+ pageIndex: pageIdx,
+ matchIndex: selectedMatchIdx
+ });
+ }
+
+ if (!prevEnd || begin.divIdx !== prevEnd.divIdx) {
+ if (prevEnd !== null) {
+ appendTextToDiv(prevEnd.divIdx, prevEnd.offset, infinity.offset);
+ }
+
+ beginText(begin);
+ } else {
+ appendTextToDiv(prevEnd.divIdx, prevEnd.offset, begin.offset);
+ }
+
+ if (begin.divIdx === end.divIdx) {
+ appendTextToDiv(begin.divIdx, begin.offset, end.offset, "highlight" + highlightSuffix);
+ } else {
+ appendTextToDiv(begin.divIdx, begin.offset, infinity.offset, "highlight begin" + highlightSuffix);
+
+ for (let n0 = begin.divIdx + 1, n1 = end.divIdx; n0 < n1; n0++) {
+ textDivs[n0].className = "highlight middle" + highlightSuffix;
+ }
+
+ beginText(end, "highlight end" + highlightSuffix);
+ }
+
+ prevEnd = end;
+ }
+
+ if (prevEnd) {
+ appendTextToDiv(prevEnd.divIdx, prevEnd.offset, infinity.offset);
+ }
+ }
+
+ _updateMatches() {
+ if (!this.renderingDone) {
+ return;
+ }
+
+ const {
+ findController,
+ matches,
+ pageIdx,
+ textContentItemsStr,
+ textDivs
+ } = this;
+ let clearedUntilDivIdx = -1;
+
+ for (let i = 0, ii = matches.length; i < ii; i++) {
+ const match = matches[i];
+ const begin = Math.max(clearedUntilDivIdx, match.begin.divIdx);
+
+ for (let n = begin, end = match.end.divIdx; n <= end; n++) {
+ const div = textDivs[n];
+ div.textContent = textContentItemsStr[n];
+ div.className = "";
+ }
+
+ clearedUntilDivIdx = match.end.divIdx + 1;
+ }
+
+ if (!findController || !findController.highlightMatches) {
+ return;
+ }
+
+ const pageMatches = findController.pageMatches[pageIdx] || null;
+ const pageMatchesLength = findController.pageMatchesLength[pageIdx] || null;
+ this.matches = this._convertMatches(pageMatches, pageMatchesLength);
+
+ this._renderMatches(this.matches);
+ }
+
+ _bindMouse() {
+ const div = this.textLayerDiv;
+ let expandDivsTimer = null;
+ div.addEventListener("mousedown", evt => {
+ if (this.enhanceTextSelection && this.textLayerRenderTask) {
+ this.textLayerRenderTask.expandTextDivs(true);
+
+ if (expandDivsTimer) {
+ clearTimeout(expandDivsTimer);
+ expandDivsTimer = null;
+ }
+
+ return;
+ }
+
+ const end = div.querySelector(".endOfContent");
+
+ if (!end) {
+ return;
+ }
+
+ let adjustTop = evt.target !== div;
+ adjustTop = adjustTop && window.getComputedStyle(end).getPropertyValue("-moz-user-select") !== "none";
+
+ if (adjustTop) {
+ const divBounds = div.getBoundingClientRect();
+ const r = Math.max(0, (evt.pageY - divBounds.top) / divBounds.height);
+ end.style.top = (r * 100).toFixed(2) + "%";
+ }
+
+ end.classList.add("active");
+ });
+ div.addEventListener("mouseup", () => {
+ if (this.enhanceTextSelection && this.textLayerRenderTask) {
+ expandDivsTimer = setTimeout(() => {
+ if (this.textLayerRenderTask) {
+ this.textLayerRenderTask.expandTextDivs(false);
+ }
+
+ expandDivsTimer = null;
+ }, EXPAND_DIVS_TIMEOUT);
+ return;
+ }
+
+ const end = div.querySelector(".endOfContent");
+
+ if (!end) {
+ return;
+ }
+
+ end.style.top = "";
+ end.classList.remove("active");
+ });
+ }
+
+}
+
+exports.TextLayerBuilder = TextLayerBuilder;
+
+class DefaultTextLayerFactory {
+ createTextLayerBuilder(textLayerDiv, pageIndex, viewport, enhanceTextSelection = false, eventBus) {
+ return new TextLayerBuilder({
+ textLayerDiv,
+ pageIndex,
+ viewport,
+ enhanceTextSelection,
+ eventBus
+ });
+ }
+
+}
+
+exports.DefaultTextLayerFactory = DefaultTextLayerFactory;
+
+/***/ }),
+/* 29 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.SecondaryToolbar = void 0;
+
+var _ui_utils = __webpack_require__(2);
+
+var _pdf_cursor_tools = __webpack_require__(6);
+
+var _pdf_single_page_viewer = __webpack_require__(30);
+
+class SecondaryToolbar {
+ constructor(options, mainContainer, eventBus) {
+ this.toolbar = options.toolbar;
+ this.toggleButton = options.toggleButton;
+ this.toolbarButtonContainer = options.toolbarButtonContainer;
+ this.buttons = [{
+ element: options.presentationModeButton,
+ eventName: "presentationmode",
+ close: true
+ }, {
+ element: options.openFileButton,
+ eventName: "openfile",
+ close: true
+ }, {
+ element: options.printButton,
+ eventName: "print",
+ close: true
+ }, {
+ element: options.downloadButton,
+ eventName: "download",
+ close: true
+ }, {
+ element: options.viewBookmarkButton,
+ eventName: null,
+ close: true
+ }, {
+ element: options.firstPageButton,
+ eventName: "firstpage",
+ close: true
+ }, {
+ element: options.lastPageButton,
+ eventName: "lastpage",
+ close: true
+ }, {
+ element: options.pageRotateCwButton,
+ eventName: "rotatecw",
+ close: false
+ }, {
+ element: options.pageRotateCcwButton,
+ eventName: "rotateccw",
+ close: false
+ }, {
+ element: options.cursorSelectToolButton,
+ eventName: "switchcursortool",
+ eventDetails: {
+ tool: _pdf_cursor_tools.CursorTool.SELECT
+ },
+ close: true
+ }, {
+ element: options.cursorHandToolButton,
+ eventName: "switchcursortool",
+ eventDetails: {
+ tool: _pdf_cursor_tools.CursorTool.HAND
+ },
+ close: true
+ }, {
+ element: options.scrollVerticalButton,
+ eventName: "switchscrollmode",
+ eventDetails: {
+ mode: _ui_utils.ScrollMode.VERTICAL
+ },
+ close: true
+ }, {
+ element: options.scrollHorizontalButton,
+ eventName: "switchscrollmode",
+ eventDetails: {
+ mode: _ui_utils.ScrollMode.HORIZONTAL
+ },
+ close: true
+ }, {
+ element: options.scrollWrappedButton,
+ eventName: "switchscrollmode",
+ eventDetails: {
+ mode: _ui_utils.ScrollMode.WRAPPED
+ },
+ close: true
+ }, {
+ element: options.spreadNoneButton,
+ eventName: "switchspreadmode",
+ eventDetails: {
+ mode: _ui_utils.SpreadMode.NONE
+ },
+ close: true
+ }, {
+ element: options.spreadOddButton,
+ eventName: "switchspreadmode",
+ eventDetails: {
+ mode: _ui_utils.SpreadMode.ODD
+ },
+ close: true
+ }, {
+ element: options.spreadEvenButton,
+ eventName: "switchspreadmode",
+ eventDetails: {
+ mode: _ui_utils.SpreadMode.EVEN
+ },
+ close: true
+ }, {
+ element: options.documentPropertiesButton,
+ eventName: "documentproperties",
+ close: true
+ }];
+ this.items = {
+ firstPage: options.firstPageButton,
+ lastPage: options.lastPageButton,
+ pageRotateCw: options.pageRotateCwButton,
+ pageRotateCcw: options.pageRotateCcwButton
+ };
+ this.mainContainer = mainContainer;
+ this.eventBus = eventBus;
+ this.opened = false;
+ this.containerHeight = null;
+ this.previousContainerHeight = null;
+ this.reset();
+
+ this._bindClickListeners();
+
+ this._bindCursorToolsListener(options);
+
+ this._bindScrollModeListener(options);
+
+ this._bindSpreadModeListener(options);
+
+ this.eventBus._on("resize", this._setMaxHeight.bind(this));
+
+ this.eventBus._on("baseviewerinit", evt => {
+ if (evt.source instanceof _pdf_single_page_viewer.PDFSinglePageViewer) {
+ this.toolbarButtonContainer.classList.add("hiddenScrollModeButtons", "hiddenSpreadModeButtons");
+ } else {
+ this.toolbarButtonContainer.classList.remove("hiddenScrollModeButtons", "hiddenSpreadModeButtons");
+ }
+ });
+ }
+
+ get isOpen() {
+ return this.opened;
+ }
+
+ setPageNumber(pageNumber) {
+ this.pageNumber = pageNumber;
+
+ this._updateUIState();
+ }
+
+ setPagesCount(pagesCount) {
+ this.pagesCount = pagesCount;
+
+ this._updateUIState();
+ }
+
+ reset() {
+ this.pageNumber = 0;
+ this.pagesCount = 0;
+
+ this._updateUIState();
+
+ this.eventBus.dispatch("secondarytoolbarreset", {
+ source: this
+ });
+ }
+
+ _updateUIState() {
+ this.items.firstPage.disabled = this.pageNumber <= 1;
+ this.items.lastPage.disabled = this.pageNumber >= this.pagesCount;
+ this.items.pageRotateCw.disabled = this.pagesCount === 0;
+ this.items.pageRotateCcw.disabled = this.pagesCount === 0;
+ }
+
+ _bindClickListeners() {
+ this.toggleButton.addEventListener("click", this.toggle.bind(this));
+
+ for (const {
+ element,
+ eventName,
+ close,
+ eventDetails
+ } of this.buttons) {
+ element.addEventListener("click", evt => {
+ if (eventName !== null) {
+ const details = {
+ source: this
+ };
+
+ for (const property in eventDetails) {
+ details[property] = eventDetails[property];
+ }
+
+ this.eventBus.dispatch(eventName, details);
+ }
+
+ if (close) {
+ this.close();
+ }
+ });
+ }
+ }
+
+ _bindCursorToolsListener(buttons) {
+ this.eventBus._on("cursortoolchanged", function ({
+ tool
+ }) {
+ buttons.cursorSelectToolButton.classList.toggle("toggled", tool === _pdf_cursor_tools.CursorTool.SELECT);
+ buttons.cursorHandToolButton.classList.toggle("toggled", tool === _pdf_cursor_tools.CursorTool.HAND);
+ });
+ }
+
+ _bindScrollModeListener(buttons) {
+ function scrollModeChanged({
+ mode
+ }) {
+ buttons.scrollVerticalButton.classList.toggle("toggled", mode === _ui_utils.ScrollMode.VERTICAL);
+ buttons.scrollHorizontalButton.classList.toggle("toggled", mode === _ui_utils.ScrollMode.HORIZONTAL);
+ buttons.scrollWrappedButton.classList.toggle("toggled", mode === _ui_utils.ScrollMode.WRAPPED);
+ const isScrollModeHorizontal = mode === _ui_utils.ScrollMode.HORIZONTAL;
+ buttons.spreadNoneButton.disabled = isScrollModeHorizontal;
+ buttons.spreadOddButton.disabled = isScrollModeHorizontal;
+ buttons.spreadEvenButton.disabled = isScrollModeHorizontal;
+ }
+
+ this.eventBus._on("scrollmodechanged", scrollModeChanged);
+
+ this.eventBus._on("secondarytoolbarreset", evt => {
+ if (evt.source === this) {
+ scrollModeChanged({
+ mode: _ui_utils.ScrollMode.VERTICAL
+ });
+ }
+ });
+ }
+
+ _bindSpreadModeListener(buttons) {
+ function spreadModeChanged({
+ mode
+ }) {
+ buttons.spreadNoneButton.classList.toggle("toggled", mode === _ui_utils.SpreadMode.NONE);
+ buttons.spreadOddButton.classList.toggle("toggled", mode === _ui_utils.SpreadMode.ODD);
+ buttons.spreadEvenButton.classList.toggle("toggled", mode === _ui_utils.SpreadMode.EVEN);
+ }
+
+ this.eventBus._on("spreadmodechanged", spreadModeChanged);
+
+ this.eventBus._on("secondarytoolbarreset", evt => {
+ if (evt.source === this) {
+ spreadModeChanged({
+ mode: _ui_utils.SpreadMode.NONE
+ });
+ }
+ });
+ }
+
+ open() {
+ if (this.opened) {
+ return;
+ }
+
+ this.opened = true;
+
+ this._setMaxHeight();
+
+ this.toggleButton.classList.add("toggled");
+ this.toolbar.classList.remove("hidden");
+ }
+
+ close() {
+ if (!this.opened) {
+ return;
+ }
+
+ this.opened = false;
+ this.toolbar.classList.add("hidden");
+ this.toggleButton.classList.remove("toggled");
+ }
+
+ toggle() {
+ if (this.opened) {
+ this.close();
+ } else {
+ this.open();
+ }
+ }
+
+ _setMaxHeight() {
+ if (!this.opened) {
+ return;
+ }
+
+ this.containerHeight = this.mainContainer.clientHeight;
+
+ if (this.containerHeight === this.previousContainerHeight) {
+ return;
+ }
+
+ this.toolbarButtonContainer.style.maxHeight = `${this.containerHeight - _ui_utils.SCROLLBAR_PADDING}px`;
+ this.previousContainerHeight = this.containerHeight;
+ }
+
+}
+
+exports.SecondaryToolbar = SecondaryToolbar;
+
+/***/ }),
+/* 30 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PDFSinglePageViewer = void 0;
+
+var _base_viewer = __webpack_require__(25);
+
+var _pdfjsLib = __webpack_require__(4);
+
+class PDFSinglePageViewer extends _base_viewer.BaseViewer {
+ constructor(options) {
+ super(options);
+
+ this.eventBus._on("pagesinit", evt => {
+ this._ensurePageViewVisible();
+ });
+ }
+
+ get _setDocumentViewerElement() {
+ return (0, _pdfjsLib.shadow)(this, "_setDocumentViewerElement", this._shadowViewer);
+ }
+
+ _resetView() {
+ super._resetView();
+
+ this._previousPageNumber = 1;
+ this._shadowViewer = document.createDocumentFragment();
+ this._updateScrollDown = null;
+ }
+
+ _ensurePageViewVisible() {
+ const pageView = this._pages[this._currentPageNumber - 1];
+ const previousPageView = this._pages[this._previousPageNumber - 1];
+ const viewerNodes = this.viewer.childNodes;
+
+ switch (viewerNodes.length) {
+ case 0:
+ this.viewer.appendChild(pageView.div);
+ break;
+
+ case 1:
+ if (viewerNodes[0] !== previousPageView.div) {
+ throw new Error("_ensurePageViewVisible: Unexpected previously visible page.");
+ }
+
+ if (pageView === previousPageView) {
+ break;
+ }
+
+ this._shadowViewer.appendChild(previousPageView.div);
+
+ this.viewer.appendChild(pageView.div);
+ this.container.scrollTop = 0;
+ break;
+
+ default:
+ throw new Error("_ensurePageViewVisible: Only one page should be visible at a time.");
+ }
+
+ this._previousPageNumber = this._currentPageNumber;
+ }
+
+ _scrollUpdate() {
+ if (this._updateScrollDown) {
+ this._updateScrollDown();
+ }
+
+ super._scrollUpdate();
+ }
+
+ _scrollIntoView({
+ pageDiv,
+ pageSpot = null,
+ pageNumber = null
+ }) {
+ if (pageNumber) {
+ this._setCurrentPageNumber(pageNumber);
+ }
+
+ const scrolledDown = this._currentPageNumber >= this._previousPageNumber;
+
+ this._ensurePageViewVisible();
+
+ this.update();
+
+ super._scrollIntoView({
+ pageDiv,
+ pageSpot,
+ pageNumber
+ });
+
+ this._updateScrollDown = () => {
+ this.scroll.down = scrolledDown;
+ this._updateScrollDown = null;
+ };
+ }
+
+ _getVisiblePages() {
+ return this._getCurrentVisiblePage();
+ }
+
+ _updateHelper(visiblePages) {}
+
+ get _isScrollModeHorizontal() {
+ return (0, _pdfjsLib.shadow)(this, "_isScrollModeHorizontal", false);
+ }
+
+ _updateScrollMode() {}
+
+ _updateSpreadMode() {}
+
+}
+
+exports.PDFSinglePageViewer = PDFSinglePageViewer;
+
+/***/ }),
+/* 31 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.Toolbar = void 0;
+
+var _ui_utils = __webpack_require__(2);
+
+const PAGE_NUMBER_LOADING_INDICATOR = "visiblePageIsLoading";
+const SCALE_SELECT_CONTAINER_WIDTH = 140;
+const SCALE_SELECT_WIDTH = 162;
+
+class Toolbar {
+ constructor(options, eventBus, l10n = _ui_utils.NullL10n) {
+ this.toolbar = options.container;
+ this.eventBus = eventBus;
+ this.l10n = l10n;
+ this.buttons = [{
+ element: options.previous,
+ eventName: "previouspage"
+ }, {
+ element: options.next,
+ eventName: "nextpage"
+ }, {
+ element: options.zoomIn,
+ eventName: "zoomin"
+ }, {
+ element: options.zoomOut,
+ eventName: "zoomout"
+ }, {
+ element: options.openFile,
+ eventName: "openfile"
+ }, {
+ element: options.print,
+ eventName: "print"
+ }, {
+ element: options.presentationModeButton,
+ eventName: "presentationmode"
+ }, {
+ element: options.download,
+ eventName: "download"
+ }, {
+ element: options.viewBookmark,
+ eventName: null
+ }];
+ this.items = {
+ numPages: options.numPages,
+ pageNumber: options.pageNumber,
+ scaleSelectContainer: options.scaleSelectContainer,
+ scaleSelect: options.scaleSelect,
+ customScaleOption: options.customScaleOption,
+ previous: options.previous,
+ next: options.next,
+ zoomIn: options.zoomIn,
+ zoomOut: options.zoomOut
+ };
+ this._wasLocalized = false;
+ this.reset();
+
+ this._bindListeners();
+ }
+
+ setPageNumber(pageNumber, pageLabel) {
+ this.pageNumber = pageNumber;
+ this.pageLabel = pageLabel;
+
+ this._updateUIState(false);
+ }
+
+ setPagesCount(pagesCount, hasPageLabels) {
+ this.pagesCount = pagesCount;
+ this.hasPageLabels = hasPageLabels;
+
+ this._updateUIState(true);
+ }
+
+ setPageScale(pageScaleValue, pageScale) {
+ this.pageScaleValue = (pageScaleValue || pageScale).toString();
+ this.pageScale = pageScale;
+
+ this._updateUIState(false);
+ }
+
+ reset() {
+ this.pageNumber = 0;
+ this.pageLabel = null;
+ this.hasPageLabels = false;
+ this.pagesCount = 0;
+ this.pageScaleValue = _ui_utils.DEFAULT_SCALE_VALUE;
+ this.pageScale = _ui_utils.DEFAULT_SCALE;
+
+ this._updateUIState(true);
+
+ this.updateLoadingIndicatorState();
+ }
+
+ _bindListeners() {
+ const {
+ pageNumber,
+ scaleSelect
+ } = this.items;
+ const self = this;
+
+ for (const {
+ element,
+ eventName
+ } of this.buttons) {
+ element.addEventListener("click", evt => {
+ if (eventName !== null) {
+ this.eventBus.dispatch(eventName, {
+ source: this
+ });
+ }
+ });
+ }
+
+ pageNumber.addEventListener("click", function () {
+ this.select();
+ });
+ pageNumber.addEventListener("change", function () {
+ self.eventBus.dispatch("pagenumberchanged", {
+ source: self,
+ value: this.value
+ });
+ });
+ scaleSelect.addEventListener("change", function () {
+ if (this.value === "custom") {
+ return;
+ }
+
+ self.eventBus.dispatch("scalechanged", {
+ source: self,
+ value: this.value
+ });
+ });
+ scaleSelect.oncontextmenu = _ui_utils.noContextMenuHandler;
+
+ this.eventBus._on("localized", () => {
+ this._wasLocalized = true;
+
+ this._adjustScaleWidth();
+
+ this._updateUIState(true);
+ });
+ }
+
+ _updateUIState(resetNumPages = false) {
+ if (!this._wasLocalized) {
+ return;
+ }
+
+ const {
+ pageNumber,
+ pagesCount,
+ pageScaleValue,
+ pageScale,
+ items
+ } = this;
+
+ if (resetNumPages) {
+ if (this.hasPageLabels) {
+ items.pageNumber.type = "text";
+ } else {
+ items.pageNumber.type = "number";
+ this.l10n.get("of_pages", {
+ pagesCount
+ }, "of {{pagesCount}}").then(msg => {
+ items.numPages.textContent = msg;
+ });
+ }
+
+ items.pageNumber.max = pagesCount;
+ }
+
+ if (this.hasPageLabels) {
+ items.pageNumber.value = this.pageLabel;
+ this.l10n.get("page_of_pages", {
+ pageNumber,
+ pagesCount
+ }, "({{pageNumber}} of {{pagesCount}})").then(msg => {
+ items.numPages.textContent = msg;
+ });
+ } else {
+ items.pageNumber.value = pageNumber;
+ }
+
+ items.previous.disabled = pageNumber <= 1;
+ items.next.disabled = pageNumber >= pagesCount;
+ items.zoomOut.disabled = pageScale <= _ui_utils.MIN_SCALE;
+ items.zoomIn.disabled = pageScale >= _ui_utils.MAX_SCALE;
+ const customScale = Math.round(pageScale * 10000) / 100;
+ this.l10n.get("page_scale_percent", {
+ scale: customScale
+ }, "{{scale}}%").then(msg => {
+ let predefinedValueFound = false;
+
+ for (const option of items.scaleSelect.options) {
+ if (option.value !== pageScaleValue) {
+ option.selected = false;
+ continue;
+ }
+
+ option.selected = true;
+ predefinedValueFound = true;
+ }
+
+ if (!predefinedValueFound) {
+ items.customScaleOption.textContent = msg;
+ items.customScaleOption.selected = true;
+ }
+ });
+ }
+
+ updateLoadingIndicatorState(loading = false) {
+ const pageNumberInput = this.items.pageNumber;
+ pageNumberInput.classList.toggle(PAGE_NUMBER_LOADING_INDICATOR, loading);
+ }
+
+ async _adjustScaleWidth() {
+ const {
+ items,
+ l10n
+ } = this;
+ const predefinedValuesPromise = Promise.all([l10n.get("page_scale_auto", null, "Automatic Zoom"), l10n.get("page_scale_actual", null, "Actual Size"), l10n.get("page_scale_fit", null, "Page Fit"), l10n.get("page_scale_width", null, "Page Width")]);
+ let canvas = document.createElement("canvas");
+ canvas.mozOpaque = true;
+ let ctx = canvas.getContext("2d", {
+ alpha: false
+ });
+ await _ui_utils.animationStarted;
+ const {
+ fontSize,
+ fontFamily
+ } = getComputedStyle(items.scaleSelect);
+ ctx.font = `${fontSize} ${fontFamily}`;
+ let maxWidth = 0;
+
+ for (const predefinedValue of await predefinedValuesPromise) {
+ const {
+ width
+ } = ctx.measureText(predefinedValue);
+
+ if (width > maxWidth) {
+ maxWidth = width;
+ }
+ }
+
+ const overflow = SCALE_SELECT_WIDTH - SCALE_SELECT_CONTAINER_WIDTH;
+ maxWidth += 1.5 * overflow;
+
+ if (maxWidth > SCALE_SELECT_CONTAINER_WIDTH) {
+ items.scaleSelect.style.width = `${maxWidth + overflow}px`;
+ items.scaleSelectContainer.style.width = `${maxWidth}px`;
+ }
+
+ canvas.width = 0;
+ canvas.height = 0;
+ canvas = ctx = null;
+ }
+
+}
+
+exports.Toolbar = Toolbar;
+
+/***/ }),
+/* 32 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.ViewHistory = void 0;
+const DEFAULT_VIEW_HISTORY_CACHE_SIZE = 20;
+
+class ViewHistory {
+ constructor(fingerprint, cacheSize = DEFAULT_VIEW_HISTORY_CACHE_SIZE) {
+ this.fingerprint = fingerprint;
+ this.cacheSize = cacheSize;
+ this._initializedPromise = this._readFromStorage().then(databaseStr => {
+ const database = JSON.parse(databaseStr || "{}");
+
+ if (!("files" in database)) {
+ database.files = [];
+ } else {
+ while (database.files.length >= this.cacheSize) {
+ database.files.shift();
+ }
+ }
+
+ let index = -1;
+
+ for (let i = 0, length = database.files.length; i < length; i++) {
+ const branch = database.files[i];
+
+ if (branch.fingerprint === this.fingerprint) {
+ index = i;
+ break;
+ }
+ }
+
+ if (index === -1) {
+ index = database.files.push({
+ fingerprint: this.fingerprint
+ }) - 1;
+ }
+
+ this.file = database.files[index];
+ this.database = database;
+ });
+ }
+
+ async _writeToStorage() {
+ const databaseStr = JSON.stringify(this.database);
+ localStorage.setItem("pdfjs.history", databaseStr);
+ }
+
+ async _readFromStorage() {
+ return localStorage.getItem("pdfjs.history");
+ }
+
+ async set(name, val) {
+ await this._initializedPromise;
+ this.file[name] = val;
+ return this._writeToStorage();
+ }
+
+ async setMultiple(properties) {
+ await this._initializedPromise;
+
+ for (const name in properties) {
+ this.file[name] = properties[name];
+ }
+
+ return this._writeToStorage();
+ }
+
+ async get(name, defaultValue) {
+ await this._initializedPromise;
+ const val = this.file[name];
+ return val !== undefined ? val : defaultValue;
+ }
+
+ async getMultiple(properties) {
+ await this._initializedPromise;
+ const values = Object.create(null);
+
+ for (const name in properties) {
+ const val = this.file[name];
+ values[name] = val !== undefined ? val : properties[name];
+ }
+
+ return values;
+ }
+
+}
+
+exports.ViewHistory = ViewHistory;
+
+/***/ }),
+/* 33 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.GenericCom = void 0;
+
+var _app = __webpack_require__(1);
+
+var _preferences = __webpack_require__(34);
+
+var _download_manager = __webpack_require__(35);
+
+var _genericl10n = __webpack_require__(36);
+
+;
+const GenericCom = {};
+exports.GenericCom = GenericCom;
+
+class GenericPreferences extends _preferences.BasePreferences {
+ async _writeToStorage(prefObj) {
+ localStorage.setItem("pdfjs.preferences", JSON.stringify(prefObj));
+ }
+
+ async _readFromStorage(prefObj) {
+ return JSON.parse(localStorage.getItem("pdfjs.preferences"));
+ }
+
+}
+
+class GenericExternalServices extends _app.DefaultExternalServices {
+ static createDownloadManager(options) {
+ return new _download_manager.DownloadManager(options);
+ }
+
+ static createPreferences() {
+ return new GenericPreferences();
+ }
+
+ static createL10n({
+ locale = "en-US"
+ }) {
+ return new _genericl10n.GenericL10n(locale);
+ }
+
+}
+
+_app.PDFViewerApplication.externalServices = GenericExternalServices;
+
+/***/ }),
+/* 34 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.BasePreferences = void 0;
+let defaultPreferences = null;
+
+function getDefaultPreferences() {
+ if (!defaultPreferences) {
+ defaultPreferences = Promise.resolve({
+ "cursorToolOnLoad": 0,
+ "defaultZoomValue": "",
+ "disablePageLabels": false,
+ "enablePrintAutoRotate": false,
+ "enableWebGL": false,
+ "eventBusDispatchToDOM": false,
+ "externalLinkTarget": 0,
+ "historyUpdateUrl": false,
+ "ignoreDestinationZoom": false,
+ "pdfBugEnabled": false,
+ "renderer": "canvas",
+ "renderInteractiveForms": false,
+ "sidebarViewOnLoad": -1,
+ "scrollModeOnLoad": -1,
+ "spreadModeOnLoad": -1,
+ "textLayerMode": 1,
+ "useOnlyCssZoom": false,
+ "viewOnLoad": 0,
+ "disableAutoFetch": false,
+ "disableFontFace": false,
+ "disableRange": false,
+ "disableStream": false
+ });
+ }
+
+ return defaultPreferences;
+}
+
+class BasePreferences {
+ constructor() {
+ if (this.constructor === BasePreferences) {
+ throw new Error("Cannot initialize BasePreferences.");
+ }
+
+ this.prefs = null;
+ this._initializedPromise = getDefaultPreferences().then(defaults => {
+ Object.defineProperty(this, "defaults", {
+ value: Object.freeze(defaults),
+ writable: false,
+ enumerable: true,
+ configurable: false
+ });
+ this.prefs = Object.assign(Object.create(null), defaults);
+ return this._readFromStorage(defaults);
+ }).then(prefs => {
+ if (!prefs) {
+ return;
+ }
+
+ for (const name in prefs) {
+ const defaultValue = this.defaults[name],
+ prefValue = prefs[name];
+
+ if (defaultValue === undefined || typeof prefValue !== typeof defaultValue) {
+ continue;
+ }
+
+ this.prefs[name] = prefValue;
+ }
+ });
+ }
+
+ async _writeToStorage(prefObj) {
+ throw new Error("Not implemented: _writeToStorage");
+ }
+
+ async _readFromStorage(prefObj) {
+ throw new Error("Not implemented: _readFromStorage");
+ }
+
+ async reset() {
+ await this._initializedPromise;
+ this.prefs = Object.assign(Object.create(null), this.defaults);
+ return this._writeToStorage(this.defaults);
+ }
+
+ async set(name, value) {
+ await this._initializedPromise;
+ const defaultValue = this.defaults[name];
+
+ if (defaultValue === undefined) {
+ throw new Error(`Set preference: "${name}" is undefined.`);
+ } else if (value === undefined) {
+ throw new Error("Set preference: no value is specified.");
+ }
+
+ const valueType = typeof value;
+ const defaultType = typeof defaultValue;
+
+ if (valueType !== defaultType) {
+ if (valueType === "number" && defaultType === "string") {
+ value = value.toString();
+ } else {
+ throw new Error(`Set preference: "${value}" is a ${valueType}, ` + `expected a ${defaultType}.`);
+ }
+ } else {
+ if (valueType === "number" && !Number.isInteger(value)) {
+ throw new Error(`Set preference: "${value}" must be an integer.`);
+ }
+ }
+
+ this.prefs[name] = value;
+ return this._writeToStorage(this.prefs);
+ }
+
+ async get(name) {
+ await this._initializedPromise;
+ const defaultValue = this.defaults[name];
+
+ if (defaultValue === undefined) {
+ throw new Error(`Get preference: "${name}" is undefined.`);
+ } else {
+ const prefValue = this.prefs[name];
+
+ if (prefValue !== undefined) {
+ return prefValue;
+ }
+ }
+
+ return defaultValue;
+ }
+
+ async getAll() {
+ await this._initializedPromise;
+ return Object.assign(Object.create(null), this.defaults, this.prefs);
+ }
+
+}
+
+exports.BasePreferences = BasePreferences;
+
+/***/ }),
+/* 35 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.DownloadManager = void 0;
+
+var _pdfjsLib = __webpack_require__(4);
+
+;
+const DISABLE_CREATE_OBJECT_URL = _pdfjsLib.apiCompatibilityParams.disableCreateObjectURL || false;
+
+function download(blobUrl, filename) {
+ const a = document.createElement("a");
+
+ if (!a.click) {
+ throw new Error('DownloadManager: "a.click()" is not supported.');
+ }
+
+ a.href = blobUrl;
+ a.target = "_parent";
+
+ if ("download" in a) {
+ a.download = filename;
+ }
+
+ (document.body || document.documentElement).appendChild(a);
+ a.click();
+ a.remove();
+}
+
+class DownloadManager {
+ constructor({
+ disableCreateObjectURL = DISABLE_CREATE_OBJECT_URL
+ }) {
+ this.disableCreateObjectURL = disableCreateObjectURL;
+ }
+
+ downloadUrl(url, filename) {
+ if (!(0, _pdfjsLib.createValidAbsoluteUrl)(url, "http://example.com")) {
+ return;
+ }
+
+ download(url + "#pdfjs.action=download", filename);
+ }
+
+ downloadData(data, filename, contentType) {
+ if (navigator.msSaveBlob) {
+ navigator.msSaveBlob(new Blob([data], {
+ type: contentType
+ }), filename);
+ return;
+ }
+
+ const blobUrl = (0, _pdfjsLib.createObjectURL)(data, contentType, this.disableCreateObjectURL);
+ download(blobUrl, filename);
+ }
+
+ download(blob, url, filename) {
+ if (navigator.msSaveBlob) {
+ if (!navigator.msSaveBlob(blob, filename)) {
+ this.downloadUrl(url, filename);
+ }
+
+ return;
+ }
+
+ if (this.disableCreateObjectURL) {
+ this.downloadUrl(url, filename);
+ return;
+ }
+
+ const blobUrl = URL.createObjectURL(blob);
+ download(blobUrl, filename);
+ }
+
+}
+
+exports.DownloadManager = DownloadManager;
+
+/***/ }),
+/* 36 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.GenericL10n = void 0;
+
+__webpack_require__(37);
+
+const webL10n = document.webL10n;
+
+class GenericL10n {
+ constructor(lang) {
+ this._lang = lang;
+ this._ready = new Promise((resolve, reject) => {
+ webL10n.setLanguage(lang, () => {
+ resolve(webL10n);
+ });
+ });
+ }
+
+ async getLanguage() {
+ const l10n = await this._ready;
+ return l10n.getLanguage();
+ }
+
+ async getDirection() {
+ const l10n = await this._ready;
+ return l10n.getDirection();
+ }
+
+ async get(property, args, fallback) {
+ const l10n = await this._ready;
+ return l10n.get(property, args, fallback);
+ }
+
+ async translate(element) {
+ const l10n = await this._ready;
+ return l10n.translate(element);
+ }
+
+}
+
+exports.GenericL10n = GenericL10n;
+
+/***/ }),
+/* 37 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+document.webL10n = function (window, document, undefined) {
+ var gL10nData = {};
+ var gTextData = '';
+ var gTextProp = 'textContent';
+ var gLanguage = '';
+ var gMacros = {};
+ var gReadyState = 'loading';
+ var gAsyncResourceLoading = true;
+
+ function getL10nResourceLinks() {
+ return document.querySelectorAll('link[type="application/l10n"]');
+ }
+
+ function getL10nDictionary() {
+ var script = document.querySelector('script[type="application/l10n"]');
+ return script ? JSON.parse(script.innerHTML) : null;
+ }
+
+ function getTranslatableChildren(element) {
+ return element ? element.querySelectorAll('*[data-l10n-id]') : [];
+ }
+
+ function getL10nAttributes(element) {
+ if (!element) return {};
+ var l10nId = element.getAttribute('data-l10n-id');
+ var l10nArgs = element.getAttribute('data-l10n-args');
+ var args = {};
+
+ if (l10nArgs) {
+ try {
+ args = JSON.parse(l10nArgs);
+ } catch (e) {
+ console.warn('could not parse arguments for #' + l10nId);
+ }
+ }
+
+ return {
+ id: l10nId,
+ args: args
+ };
+ }
+
+ function xhrLoadText(url, onSuccess, onFailure) {
+ onSuccess = onSuccess || function _onSuccess(data) {};
+
+ onFailure = onFailure || function _onFailure() {};
+
+ var xhr = new XMLHttpRequest();
+ xhr.open('GET', url, gAsyncResourceLoading);
+
+ if (xhr.overrideMimeType) {
+ xhr.overrideMimeType('text/plain; charset=utf-8');
+ }
+
+ xhr.onreadystatechange = function () {
+ if (xhr.readyState == 4) {
+ if (xhr.status == 200 || xhr.status === 0) {
+ onSuccess(xhr.responseText);
+ } else {
+ onFailure();
+ }
+ }
+ };
+
+ xhr.onerror = onFailure;
+ xhr.ontimeout = onFailure;
+
+ try {
+ xhr.send(null);
+ } catch (e) {
+ onFailure();
+ }
+ }
+
+ function parseResource(href, lang, successCallback, failureCallback) {
+ var baseURL = href.replace(/[^\/]*$/, '') || './';
+
+ function evalString(text) {
+ if (text.lastIndexOf('\\') < 0) return text;
+ return text.replace(/\\\\/g, '\\').replace(/\\n/g, '\n').replace(/\\r/g, '\r').replace(/\\t/g, '\t').replace(/\\b/g, '\b').replace(/\\f/g, '\f').replace(/\\{/g, '{').replace(/\\}/g, '}').replace(/\\"/g, '"').replace(/\\'/g, "'");
+ }
+
+ function parseProperties(text, parsedPropertiesCallback) {
+ var dictionary = {};
+ var reBlank = /^\s*|\s*$/;
+ var reComment = /^\s*#|^\s*$/;
+ var reSection = /^\s*\[(.*)\]\s*$/;
+ var reImport = /^\s*@import\s+url\((.*)\)\s*$/i;
+ var reSplit = /^([^=\s]*)\s*=\s*(.+)$/;
+
+ function parseRawLines(rawText, extendedSyntax, parsedRawLinesCallback) {
+ var entries = rawText.replace(reBlank, '').split(/[\r\n]+/);
+ var currentLang = '*';
+ var genericLang = lang.split('-', 1)[0];
+ var skipLang = false;
+ var match = '';
+
+ function nextEntry() {
+ while (true) {
+ if (!entries.length) {
+ parsedRawLinesCallback();
+ return;
+ }
+
+ var line = entries.shift();
+ if (reComment.test(line)) continue;
+
+ if (extendedSyntax) {
+ match = reSection.exec(line);
+
+ if (match) {
+ currentLang = match[1].toLowerCase();
+ skipLang = currentLang !== '*' && currentLang !== lang && currentLang !== genericLang;
+ continue;
+ } else if (skipLang) {
+ continue;
+ }
+
+ match = reImport.exec(line);
+
+ if (match) {
+ loadImport(baseURL + match[1], nextEntry);
+ return;
+ }
+ }
+
+ var tmp = line.match(reSplit);
+
+ if (tmp && tmp.length == 3) {
+ dictionary[tmp[1]] = evalString(tmp[2]);
+ }
+ }
+ }
+
+ nextEntry();
+ }
+
+ function loadImport(url, callback) {
+ xhrLoadText(url, function (content) {
+ parseRawLines(content, false, callback);
+ }, function () {
+ console.warn(url + ' not found.');
+ callback();
+ });
+ }
+
+ parseRawLines(text, true, function () {
+ parsedPropertiesCallback(dictionary);
+ });
+ }
+
+ xhrLoadText(href, function (response) {
+ gTextData += response;
+ parseProperties(response, function (data) {
+ for (var key in data) {
+ var id,
+ prop,
+ index = key.lastIndexOf('.');
+
+ if (index > 0) {
+ id = key.substring(0, index);
+ prop = key.substring(index + 1);
+ } else {
+ id = key;
+ prop = gTextProp;
+ }
+
+ if (!gL10nData[id]) {
+ gL10nData[id] = {};
+ }
+
+ gL10nData[id][prop] = data[key];
+ }
+
+ if (successCallback) {
+ successCallback();
+ }
+ });
+ }, failureCallback);
+ }
+
+ function loadLocale(lang, callback) {
+ if (lang) {
+ lang = lang.toLowerCase();
+ }
+
+ callback = callback || function _callback() {};
+
+ clear();
+ gLanguage = lang;
+ var langLinks = getL10nResourceLinks();
+ var langCount = langLinks.length;
+
+ if (langCount === 0) {
+ var dict = getL10nDictionary();
+
+ if (dict && dict.locales && dict.default_locale) {
+ console.log('using the embedded JSON directory, early way out');
+ gL10nData = dict.locales[lang];
+
+ if (!gL10nData) {
+ var defaultLocale = dict.default_locale.toLowerCase();
+
+ for (var anyCaseLang in dict.locales) {
+ anyCaseLang = anyCaseLang.toLowerCase();
+
+ if (anyCaseLang === lang) {
+ gL10nData = dict.locales[lang];
+ break;
+ } else if (anyCaseLang === defaultLocale) {
+ gL10nData = dict.locales[defaultLocale];
+ }
+ }
+ }
+
+ callback();
+ } else {
+ console.log('no resource to load, early way out');
+ }
+
+ gReadyState = 'complete';
+ return;
+ }
+
+ var onResourceLoaded = null;
+ var gResourceCount = 0;
+
+ onResourceLoaded = function () {
+ gResourceCount++;
+
+ if (gResourceCount >= langCount) {
+ callback();
+ gReadyState = 'complete';
+ }
+ };
+
+ function L10nResourceLink(link) {
+ var href = link.href;
+
+ this.load = function (lang, callback) {
+ parseResource(href, lang, callback, function () {
+ console.warn(href + ' not found.');
+ console.warn('"' + lang + '" resource not found');
+ gLanguage = '';
+ callback();
+ });
+ };
+ }
+
+ for (var i = 0; i < langCount; i++) {
+ var resource = new L10nResourceLink(langLinks[i]);
+ resource.load(lang, onResourceLoaded);
+ }
+ }
+
+ function clear() {
+ gL10nData = {};
+ gTextData = '';
+ gLanguage = '';
+ }
+
+ function getPluralRules(lang) {
+ var locales2rules = {
+ 'af': 3,
+ 'ak': 4,
+ 'am': 4,
+ 'ar': 1,
+ 'asa': 3,
+ 'az': 0,
+ 'be': 11,
+ 'bem': 3,
+ 'bez': 3,
+ 'bg': 3,
+ 'bh': 4,
+ 'bm': 0,
+ 'bn': 3,
+ 'bo': 0,
+ 'br': 20,
+ 'brx': 3,
+ 'bs': 11,
+ 'ca': 3,
+ 'cgg': 3,
+ 'chr': 3,
+ 'cs': 12,
+ 'cy': 17,
+ 'da': 3,
+ 'de': 3,
+ 'dv': 3,
+ 'dz': 0,
+ 'ee': 3,
+ 'el': 3,
+ 'en': 3,
+ 'eo': 3,
+ 'es': 3,
+ 'et': 3,
+ 'eu': 3,
+ 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': 19,
+ 'sk': 12,
+ 'sl': 14,
+ 'sma': 7,
+ 'smi': 7,
+ 'smj': 7,
+ 'smn': 7,
+ 'sms': 7,
+ 'sn': 3,
+ 'so': 3,
+ 'sq': 3,
+ 'sr': 11,
+ 'ss': 3,
+ 'ssy': 3,
+ 'st': 3,
+ 'sv': 3,
+ 'sw': 3,
+ 'syr': 3,
+ 'ta': 3,
+ 'te': 3,
+ 'teo': 3,
+ 'th': 0,
+ 'ti': 4,
+ 'tig': 3,
+ 'tk': 3,
+ 'tl': 4,
+ 'tn': 3,
+ 'to': 0,
+ 'tr': 0,
+ 'ts': 3,
+ 'tzm': 22,
+ 'uk': 11,
+ 'ur': 3,
+ 've': 3,
+ 'vi': 0,
+ 'vun': 3,
+ 'wa': 4,
+ 'wae': 3,
+ 'wo': 0,
+ 'xh': 3,
+ 'xog': 3,
+ 'yo': 0,
+ 'zh': 0,
+ 'zu': 3
+ };
+
+ function isIn(n, list) {
+ return list.indexOf(n) !== -1;
+ }
+
+ function isBetween(n, start, end) {
+ return start <= n && n <= end;
+ }
+
+ var pluralRules = {
+ '0': function (n) {
+ return 'other';
+ },
+ '1': function (n) {
+ if (isBetween(n % 100, 3, 10)) return 'few';
+ if (n === 0) return 'zero';
+ if (isBetween(n % 100, 11, 99)) return 'many';
+ if (n == 2) return 'two';
+ if (n == 1) return 'one';
+ return 'other';
+ },
+ '2': function (n) {
+ if (n !== 0 && n % 10 === 0) return 'many';
+ if (n == 2) return 'two';
+ if (n == 1) return 'one';
+ return 'other';
+ },
+ '3': function (n) {
+ if (n == 1) return 'one';
+ return 'other';
+ },
+ '4': function (n) {
+ if (isBetween(n, 0, 1)) return 'one';
+ return 'other';
+ },
+ '5': function (n) {
+ if (isBetween(n, 0, 2) && n != 2) return 'one';
+ return 'other';
+ },
+ '6': function (n) {
+ if (n === 0) return 'zero';
+ if (n % 10 == 1 && n % 100 != 11) return 'one';
+ return 'other';
+ },
+ '7': function (n) {
+ if (n == 2) return 'two';
+ if (n == 1) return 'one';
+ return 'other';
+ },
+ '8': function (n) {
+ if (isBetween(n, 3, 6)) return 'few';
+ if (isBetween(n, 7, 10)) return 'many';
+ if (n == 2) return 'two';
+ if (n == 1) return 'one';
+ return 'other';
+ },
+ '9': function (n) {
+ if (n === 0 || n != 1 && isBetween(n % 100, 1, 19)) return 'few';
+ if (n == 1) return 'one';
+ return 'other';
+ },
+ '10': function (n) {
+ if (isBetween(n % 10, 2, 9) && !isBetween(n % 100, 11, 19)) return 'few';
+ if (n % 10 == 1 && !isBetween(n % 100, 11, 19)) return 'one';
+ return 'other';
+ },
+ '11': function (n) {
+ if (isBetween(n % 10, 2, 4) && !isBetween(n % 100, 12, 14)) return 'few';
+ if (n % 10 === 0 || isBetween(n % 10, 5, 9) || isBetween(n % 100, 11, 14)) return 'many';
+ if (n % 10 == 1 && n % 100 != 11) return 'one';
+ return 'other';
+ },
+ '12': function (n) {
+ if (isBetween(n, 2, 4)) return 'few';
+ if (n == 1) return 'one';
+ return 'other';
+ },
+ '13': function (n) {
+ if (isBetween(n % 10, 2, 4) && !isBetween(n % 100, 12, 14)) return 'few';
+ if (n != 1 && isBetween(n % 10, 0, 1) || isBetween(n % 10, 5, 9) || isBetween(n % 100, 12, 14)) return 'many';
+ if (n == 1) return 'one';
+ return 'other';
+ },
+ '14': function (n) {
+ if (isBetween(n % 100, 3, 4)) return 'few';
+ if (n % 100 == 2) return 'two';
+ if (n % 100 == 1) return 'one';
+ return 'other';
+ },
+ '15': function (n) {
+ if (n === 0 || isBetween(n % 100, 2, 10)) return 'few';
+ if (isBetween(n % 100, 11, 19)) return 'many';
+ if (n == 1) return 'one';
+ return 'other';
+ },
+ '16': function (n) {
+ if (n % 10 == 1 && n != 11) return 'one';
+ return 'other';
+ },
+ '17': function (n) {
+ if (n == 3) return 'few';
+ if (n === 0) return 'zero';
+ if (n == 6) return 'many';
+ if (n == 2) return 'two';
+ if (n == 1) return 'one';
+ return 'other';
+ },
+ '18': function (n) {
+ if (n === 0) return 'zero';
+ if (isBetween(n, 0, 2) && n !== 0 && n != 2) return 'one';
+ return 'other';
+ },
+ '19': function (n) {
+ if (isBetween(n, 2, 10)) return 'few';
+ if (isBetween(n, 0, 1)) return 'one';
+ return 'other';
+ },
+ '20': function (n) {
+ if ((isBetween(n % 10, 3, 4) || n % 10 == 9) && !(isBetween(n % 100, 10, 19) || isBetween(n % 100, 70, 79) || isBetween(n % 100, 90, 99))) return 'few';
+ if (n % 1000000 === 0 && n !== 0) return 'many';
+ if (n % 10 == 2 && !isIn(n % 100, [12, 72, 92])) return 'two';
+ if (n % 10 == 1 && !isIn(n % 100, [11, 71, 91])) return 'one';
+ return 'other';
+ },
+ '21': function (n) {
+ if (n === 0) return 'zero';
+ if (n == 1) return 'one';
+ return 'other';
+ },
+ '22': function (n) {
+ if (isBetween(n, 0, 1) || isBetween(n, 11, 99)) return 'one';
+ return 'other';
+ },
+ '23': function (n) {
+ if (isBetween(n % 10, 1, 2) || n % 20 === 0) return 'one';
+ return 'other';
+ },
+ '24': function (n) {
+ if (isBetween(n, 3, 10) || isBetween(n, 13, 19)) return 'few';
+ if (isIn(n, [2, 12])) return 'two';
+ if (isIn(n, [1, 11])) return 'one';
+ return 'other';
+ }
+ };
+ var index = locales2rules[lang.replace(/-.*$/, '')];
+
+ if (!(index in pluralRules)) {
+ console.warn('plural form unknown for [' + lang + ']');
+ return function () {
+ return 'other';
+ };
+ }
+
+ return pluralRules[index];
+ }
+
+ gMacros.plural = function (str, param, key, prop) {
+ var n = parseFloat(param);
+ if (isNaN(n)) return str;
+ if (prop != gTextProp) return str;
+
+ if (!gMacros._pluralRules) {
+ gMacros._pluralRules = getPluralRules(gLanguage);
+ }
+
+ var index = '[' + gMacros._pluralRules(n) + ']';
+
+ if (n === 0 && key + '[zero]' in gL10nData) {
+ str = gL10nData[key + '[zero]'][prop];
+ } else if (n == 1 && key + '[one]' in gL10nData) {
+ str = gL10nData[key + '[one]'][prop];
+ } else if (n == 2 && key + '[two]' in gL10nData) {
+ str = gL10nData[key + '[two]'][prop];
+ } else if (key + index in gL10nData) {
+ str = gL10nData[key + index][prop];
+ } else if (key + '[other]' in gL10nData) {
+ str = gL10nData[key + '[other]'][prop];
+ }
+
+ return str;
+ };
+
+ function getL10nData(key, args, fallback) {
+ var data = gL10nData[key];
+
+ if (!data) {
+ console.warn('#' + key + ' is undefined.');
+
+ if (!fallback) {
+ return null;
+ }
+
+ data = fallback;
+ }
+
+ var rv = {};
+
+ for (var prop in data) {
+ var str = data[prop];
+ str = substIndexes(str, args, key, prop);
+ str = substArguments(str, args, key);
+ rv[prop] = str;
+ }
+
+ return rv;
+ }
+
+ function substIndexes(str, args, key, prop) {
+ var reIndex = /\{\[\s*([a-zA-Z]+)\(([a-zA-Z]+)\)\s*\]\}/;
+ var reMatch = reIndex.exec(str);
+ if (!reMatch || !reMatch.length) return str;
+ var macroName = reMatch[1];
+ var paramName = reMatch[2];
+ var param;
+
+ if (args && paramName in args) {
+ param = args[paramName];
+ } else if (paramName in gL10nData) {
+ param = gL10nData[paramName];
+ }
+
+ if (macroName in gMacros) {
+ var macro = gMacros[macroName];
+ str = macro(str, param, key, prop);
+ }
+
+ return str;
+ }
+
+ function substArguments(str, args, key) {
+ var reArgs = /\{\{\s*(.+?)\s*\}\}/g;
+ return str.replace(reArgs, function (matched_text, arg) {
+ if (args && arg in args) {
+ return args[arg];
+ }
+
+ if (arg in gL10nData) {
+ return gL10nData[arg];
+ }
+
+ console.log('argument {{' + arg + '}} for #' + key + ' is undefined.');
+ return matched_text;
+ });
+ }
+
+ function translateElement(element) {
+ var l10n = getL10nAttributes(element);
+ if (!l10n.id) return;
+ var data = getL10nData(l10n.id, l10n.args);
+
+ if (!data) {
+ console.warn('#' + l10n.id + ' is undefined.');
+ return;
+ }
+
+ if (data[gTextProp]) {
+ if (getChildElementCount(element) === 0) {
+ element[gTextProp] = data[gTextProp];
+ } else {
+ var children = element.childNodes;
+ var found = false;
+
+ for (var i = 0, l = children.length; i < l; i++) {
+ if (children[i].nodeType === 3 && /\S/.test(children[i].nodeValue)) {
+ if (found) {
+ children[i].nodeValue = '';
+ } else {
+ children[i].nodeValue = data[gTextProp];
+ found = true;
+ }
+ }
+ }
+
+ if (!found) {
+ var textNode = document.createTextNode(data[gTextProp]);
+ element.insertBefore(textNode, element.firstChild);
+ }
+ }
+
+ delete data[gTextProp];
+ }
+
+ for (var k in data) {
+ element[k] = data[k];
+ }
+ }
+
+ function getChildElementCount(element) {
+ if (element.children) {
+ return element.children.length;
+ }
+
+ if (typeof element.childElementCount !== 'undefined') {
+ return element.childElementCount;
+ }
+
+ var count = 0;
+
+ for (var i = 0; i < element.childNodes.length; i++) {
+ count += element.nodeType === 1 ? 1 : 0;
+ }
+
+ return count;
+ }
+
+ function translateFragment(element) {
+ element = element || document.documentElement;
+ var children = getTranslatableChildren(element);
+ var elementCount = children.length;
+
+ for (var i = 0; i < elementCount; i++) {
+ translateElement(children[i]);
+ }
+
+ translateElement(element);
+ }
+
+ return {
+ get: function (key, args, fallbackString) {
+ var index = key.lastIndexOf('.');
+ var prop = gTextProp;
+
+ if (index > 0) {
+ prop = key.substring(index + 1);
+ key = key.substring(0, index);
+ }
+
+ var fallback;
+
+ if (fallbackString) {
+ fallback = {};
+ fallback[prop] = fallbackString;
+ }
+
+ var data = getL10nData(key, args, fallback);
+
+ if (data && prop in data) {
+ return data[prop];
+ }
+
+ return '{{' + key + '}}';
+ },
+ getData: function () {
+ return gL10nData;
+ },
+ getText: function () {
+ return gTextData;
+ },
+ getLanguage: function () {
+ return gLanguage;
+ },
+ setLanguage: function (lang, callback) {
+ loadLocale(lang, function () {
+ if (callback) callback();
+ });
+ },
+ getDirection: function () {
+ var rtlList = ['ar', 'he', 'fa', 'ps', 'ur'];
+ var shortCode = gLanguage.split('-', 1)[0];
+ return rtlList.indexOf(shortCode) >= 0 ? 'rtl' : 'ltr';
+ },
+ translate: translateFragment,
+ getReadyState: function () {
+ return gReadyState;
+ },
+ ready: function (callback) {
+ if (!callback) {
+ return;
+ } else if (gReadyState == 'complete' || gReadyState == 'interactive') {
+ window.setTimeout(function () {
+ callback();
+ });
+ } else if (document.addEventListener) {
+ document.addEventListener('localized', function once() {
+ document.removeEventListener('localized', once);
+ callback();
+ });
+ }
+ }
+ };
+}(window, document);
+
+/***/ }),
+/* 38 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PDFPrintService = PDFPrintService;
+
+var _ui_utils = __webpack_require__(2);
+
+var _app = __webpack_require__(1);
+
+var _app_options = __webpack_require__(3);
+
+let activeService = null;
+let overlayManager = null;
+
+function renderPage(activeServiceOnEntry, pdfDocument, pageNumber, size) {
+ const scratchCanvas = activeService.scratchCanvas;
+ const PRINT_RESOLUTION = _app_options.AppOptions.get("printResolution") || 150;
+ const PRINT_UNITS = PRINT_RESOLUTION / 72.0;
+ scratchCanvas.width = Math.floor(size.width * PRINT_UNITS);
+ scratchCanvas.height = Math.floor(size.height * PRINT_UNITS);
+ const width = Math.floor(size.width * _ui_utils.CSS_UNITS) + "px";
+ const height = Math.floor(size.height * _ui_utils.CSS_UNITS) + "px";
+ const ctx = scratchCanvas.getContext("2d");
+ ctx.save();
+ ctx.fillStyle = "rgb(255, 255, 255)";
+ ctx.fillRect(0, 0, scratchCanvas.width, scratchCanvas.height);
+ ctx.restore();
+ return pdfDocument.getPage(pageNumber).then(function (pdfPage) {
+ const renderContext = {
+ canvasContext: ctx,
+ transform: [PRINT_UNITS, 0, 0, PRINT_UNITS, 0, 0],
+ viewport: pdfPage.getViewport({
+ scale: 1,
+ rotation: size.rotation
+ }),
+ intent: "print"
+ };
+ return pdfPage.render(renderContext).promise;
+ }).then(function () {
+ return {
+ width,
+ height
+ };
+ });
+}
+
+function PDFPrintService(pdfDocument, pagesOverview, printContainer, l10n) {
+ this.pdfDocument = pdfDocument;
+ this.pagesOverview = pagesOverview;
+ this.printContainer = printContainer;
+ this.l10n = l10n || _ui_utils.NullL10n;
+ this.disableCreateObjectURL = pdfDocument.loadingParams["disableCreateObjectURL"];
+ this.currentPage = -1;
+ this.scratchCanvas = document.createElement("canvas");
+}
+
+PDFPrintService.prototype = {
+ layout() {
+ this.throwIfInactive();
+ const body = document.querySelector("body");
+ body.setAttribute("data-pdfjsprinting", true);
+ const hasEqualPageSizes = this.pagesOverview.every(function (size) {
+ return size.width === this.pagesOverview[0].width && size.height === this.pagesOverview[0].height;
+ }, this);
+
+ if (!hasEqualPageSizes) {
+ console.warn("Not all pages have the same size. The printed " + "result may be incorrect!");
+ }
+
+ this.pageStyleSheet = document.createElement("style");
+ const pageSize = this.pagesOverview[0];
+ this.pageStyleSheet.textContent = "@supports ((size:A4) and (size:1pt 1pt)) {" + "@page { size: " + pageSize.width + "pt " + pageSize.height + "pt;}" + "}";
+ body.appendChild(this.pageStyleSheet);
+ },
+
+ destroy() {
+ if (activeService !== this) {
+ return;
+ }
+
+ this.printContainer.textContent = "";
+ const body = document.querySelector("body");
+ body.removeAttribute("data-pdfjsprinting");
+
+ if (this.pageStyleSheet) {
+ this.pageStyleSheet.remove();
+ this.pageStyleSheet = null;
+ }
+
+ this.scratchCanvas.width = this.scratchCanvas.height = 0;
+ this.scratchCanvas = null;
+ activeService = null;
+ ensureOverlay().then(function () {
+ if (overlayManager.active !== "printServiceOverlay") {
+ return;
+ }
+
+ overlayManager.close("printServiceOverlay");
+ });
+ },
+
+ renderPages() {
+ const pageCount = this.pagesOverview.length;
+
+ const renderNextPage = (resolve, reject) => {
+ this.throwIfInactive();
+
+ if (++this.currentPage >= pageCount) {
+ renderProgress(pageCount, pageCount, this.l10n);
+ resolve();
+ return;
+ }
+
+ const index = this.currentPage;
+ renderProgress(index, pageCount, this.l10n);
+ renderPage(this, this.pdfDocument, index + 1, this.pagesOverview[index]).then(this.useRenderedPage.bind(this)).then(function () {
+ renderNextPage(resolve, reject);
+ }, reject);
+ };
+
+ return new Promise(renderNextPage);
+ },
+
+ useRenderedPage(printItem) {
+ this.throwIfInactive();
+ const img = document.createElement("img");
+ img.style.width = printItem.width;
+ img.style.height = printItem.height;
+ const scratchCanvas = this.scratchCanvas;
+
+ if ("toBlob" in scratchCanvas && !this.disableCreateObjectURL) {
+ scratchCanvas.toBlob(function (blob) {
+ img.src = URL.createObjectURL(blob);
+ });
+ } else {
+ img.src = scratchCanvas.toDataURL();
+ }
+
+ const wrapper = document.createElement("div");
+ wrapper.appendChild(img);
+ this.printContainer.appendChild(wrapper);
+ return new Promise(function (resolve, reject) {
+ img.onload = resolve;
+ img.onerror = reject;
+ });
+ },
+
+ performPrint() {
+ this.throwIfInactive();
+ return new Promise(resolve => {
+ setTimeout(() => {
+ if (!this.active) {
+ resolve();
+ return;
+ }
+
+ print.call(window);
+ setTimeout(resolve, 20);
+ }, 0);
+ });
+ },
+
+ get active() {
+ return this === activeService;
+ },
+
+ throwIfInactive() {
+ if (!this.active) {
+ throw new Error("This print request was cancelled or completed.");
+ }
+ }
+
+};
+const print = window.print;
+
+window.print = function () {
+ if (activeService) {
+ console.warn("Ignored window.print() because of a pending print job.");
+ return;
+ }
+
+ ensureOverlay().then(function () {
+ if (activeService) {
+ overlayManager.open("printServiceOverlay");
+ }
+ });
+
+ try {
+ dispatchEvent("beforeprint");
+ } finally {
+ if (!activeService) {
+ console.error("Expected print service to be initialized.");
+ ensureOverlay().then(function () {
+ if (overlayManager.active === "printServiceOverlay") {
+ overlayManager.close("printServiceOverlay");
+ }
+ });
+ return;
+ }
+
+ const activeServiceOnEntry = activeService;
+ activeService.renderPages().then(function () {
+ return activeServiceOnEntry.performPrint();
+ }).catch(function () {}).then(function () {
+ if (activeServiceOnEntry.active) {
+ abort();
+ }
+ });
+ }
+};
+
+function dispatchEvent(eventType) {
+ const event = document.createEvent("CustomEvent");
+ event.initCustomEvent(eventType, false, false, "custom");
+ window.dispatchEvent(event);
+}
+
+function abort() {
+ if (activeService) {
+ activeService.destroy();
+ dispatchEvent("afterprint");
+ }
+}
+
+function renderProgress(index, total, l10n) {
+ const progressContainer = document.getElementById("printServiceOverlay");
+ const progress = Math.round(100 * index / total);
+ const progressBar = progressContainer.querySelector("progress");
+ const progressPerc = progressContainer.querySelector(".relative-progress");
+ progressBar.value = progress;
+ l10n.get("print_progress_percent", {
+ progress
+ }, progress + "%").then(msg => {
+ progressPerc.textContent = msg;
+ });
+}
+
+window.addEventListener("keydown", function (event) {
+ if (event.keyCode === 80 && (event.ctrlKey || event.metaKey) && !event.altKey && (!event.shiftKey || window.chrome || window.opera)) {
+ window.print();
+ event.preventDefault();
+
+ if (event.stopImmediatePropagation) {
+ event.stopImmediatePropagation();
+ } else {
+ event.stopPropagation();
+ }
+ }
+}, true);
+
+if ("onbeforeprint" in window) {
+ const stopPropagationIfNeeded = function (event) {
+ if (event.detail !== "custom" && event.stopImmediatePropagation) {
+ event.stopImmediatePropagation();
+ }
+ };
+
+ window.addEventListener("beforeprint", stopPropagationIfNeeded);
+ window.addEventListener("afterprint", stopPropagationIfNeeded);
+}
+
+let overlayPromise;
+
+function ensureOverlay() {
+ if (!overlayPromise) {
+ overlayManager = _app.PDFViewerApplication.overlayManager;
+
+ if (!overlayManager) {
+ throw new Error("The overlay manager has not yet been initialized.");
+ }
+
+ overlayPromise = overlayManager.register("printServiceOverlay", document.getElementById("printServiceOverlay"), abort, true);
+ document.getElementById("printCancel").onclick = abort;
+ }
+
+ return overlayPromise;
+}
+
+_app.PDFPrintServiceFactory.instance = {
+ supportsPrinting: true,
+
+ createPrintService(pdfDocument, pagesOverview, printContainer, l10n) {
+ if (activeService) {
+ throw new Error("The print service is created and active.");
+ }
+
+ activeService = new PDFPrintService(pdfDocument, pagesOverview, printContainer, l10n);
+ return activeService;
+ }
+
+};
+
+/***/ })
+/******/ ]);
+//# sourceMappingURL=viewer.js.map \ No newline at end of file
diff --git a/js/pdfjs/web/viewer.js.map b/js/pdfjs/web/viewer.js.map
new file mode 100644
index 0000000..db13f69
--- /dev/null
+++ b/js/pdfjs/web/viewer.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///web/viewer.js","webpack:///web/app.js","webpack:///web/ui_utils.js","webpack:///web/app_options.js","webpack:///web/pdfjs.js","webpack:///web/viewer_compatibility.js","webpack:///web/pdf_cursor_tools.js","webpack:///web/grab_to_pan.js","webpack:///web/pdf_rendering_queue.js","webpack:///web/pdf_sidebar.js","webpack:///web/overlay_manager.js","webpack:///web/password_prompt.js","webpack:///web/pdf_attachment_viewer.js","webpack:///web/pdf_document_properties.js","webpack:///web/pdf_find_bar.js","webpack:///web/pdf_find_controller.js","webpack:///web/pdf_find_utils.js","webpack:///web/pdf_history.js","webpack:///web/pdf_link_service.js","webpack:///web/pdf_outline_viewer.js","webpack:///web/pdf_presentation_mode.js","webpack:///web/pdf_sidebar_resizer.js","webpack:///web/pdf_thumbnail_viewer.js","webpack:///web/pdf_thumbnail_view.js","webpack:///web/pdf_viewer.js","webpack:///web/base_viewer.js","webpack:///web/annotation_layer_builder.js","webpack:///web/pdf_page_view.js","webpack:///web/text_layer_builder.js","webpack:///web/secondary_toolbar.js","webpack:///web/pdf_single_page_viewer.js","webpack:///web/toolbar.js","webpack:///web/view_history.js","webpack:///web/genericcom.js","webpack:///web/preferences.js","webpack:///web/download_manager.js","webpack:///web/genericl10n.js","webpack:///external/webL10n/l10n.js","webpack:///web/pdf_print_service.js"],"names":["pdfjsWebApp","require","pdfjsWebAppOptions","appContainer","document","mainContainer","viewerContainer","eventBus","toolbar","container","numPages","pageNumber","scaleSelectContainer","scaleSelect","customScaleOption","previous","next","zoomIn","zoomOut","viewFind","openFile","print","presentationModeButton","download","viewBookmark","secondaryToolbar","toggleButton","toolbarButtonContainer","openFileButton","printButton","downloadButton","viewBookmarkButton","firstPageButton","lastPageButton","pageRotateCwButton","pageRotateCcwButton","cursorSelectToolButton","cursorHandToolButton","scrollVerticalButton","scrollHorizontalButton","scrollWrappedButton","spreadNoneButton","spreadOddButton","spreadEvenButton","documentPropertiesButton","fullscreen","contextFirstPage","contextLastPage","contextPageRotateCw","contextPageRotateCcw","sidebar","outerContainer","thumbnailButton","outlineButton","attachmentsButton","thumbnailView","outlineView","attachmentsView","sidebarResizer","resizer","findBar","bar","findField","highlightAllCheckbox","caseSensitiveCheckbox","entireWordCheckbox","findMsg","findResultsCount","findPreviousButton","findNextButton","passwordOverlay","overlayName","label","input","submitButton","cancelButton","documentProperties","closeButton","fields","fileName","fileSize","title","author","subject","keywords","creationDate","modificationDate","creator","producer","version","pageCount","pageSize","linearized","errorWrapper","errorMessage","errorMoreInfo","moreInfoButton","lessInfoButton","printContainer","openFileInputName","debuggerScriptPath","config","getViewerConfiguration","window","event","webViewerLoad","DEFAULT_SCALE_DELTA","DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT","FORCE_PAGES_LOADED_TIMEOUT","WHEEL_ZOOM_DISABLED_TIMEOUT","ViewOnLoad","UNKNOWN","PREVIOUS","INITIAL","constructor","shadow","ctrlKey","metaKey","PDFViewerApplication","initialBookmark","_initializedCapability","fellback","appConfig","pdfDocument","pdfLoadingTask","printService","pdfViewer","pdfThumbnailViewer","pdfRenderingQueue","pdfPresentationMode","pdfDocumentProperties","pdfLinkService","pdfHistory","pdfSidebar","pdfSidebarResizer","pdfOutlineViewer","pdfAttachmentViewer","pdfCursorTools","store","downloadManager","overlayManager","preferences","l10n","isInitialViewSet","downloadComplete","isViewerEmbedded","url","baseUrl","externalServices","_boundEvents","contentDispositionFilename","AppOptions","LinkTarget","source","prefs","console","reason","hash","hashParams","parseQueryString","waitOn","loadFakeWorker","TextLayerMode","viewer","enabled","loadAndEnablePDFBug","locale","dir","dispatchToDOM","externalLinkTarget","externalLinkRel","ignoreDestinationZoom","disableCreateObjectURL","findController","linkService","renderingQueue","renderer","enableWebGL","textLayerMode","imageResourcesPath","renderInteractiveForms","enablePrintAutoRotate","useOnlyCssZoom","maxCanvasPixels","cursorToolOnLoad","contextMenuItems","elements","run","newScale","Math","zoomReset","PDFPrintServiceFactory","doc","support","initPassiveLoading","setTitleUsingUrl","getPDFFileNameFromURL","decodeURIComponent","getFilenameFromUrl","setTitle","promise","PDFBug","workerParameters","OptionKind","GlobalWorkerOptions","parameters","Object","file","apiParameters","value","key","args","loadingTask","getDocument","loaded","exception","message","loadingErrorMessage","msg","filename","err","downloadByUrl","blob","type","fallback","error","moreInfoText","build","moreInfo","stack","line","errorWrapperConfig","Promise","parts","progress","percent","level","isNaN","disableAutoFetch","clearTimeout","load","firstPagePromise","pageLayoutPromise","pageModePromise","openActionPromise","baseDocumentUrl","pdfPage","storePromise","page","zoom","scrollLeft","scrollTop","rotation","sidebarView","SidebarView","scrollMode","ScrollMode","spreadMode","SpreadMode","values","viewOnLoad","fingerprint","initialDest","openAction","parseInt","pageMode","apiPageModeToSidebarView","pageLayout","apiPageLayoutToSpreadMode","resolve","setTimeout","labels","numLabels","i","pagesPromise","triggerAutoPrint","javaScript","js","UNSUPPORTED_FEATURES","AutoPrintRegExp","onePageRendered","outline","attachments","info","infoTitle","pdfTitle","metadataTitle","metadata","versionId","KNOWN_VERSIONS","generatorId","KNOWN_GENERATORS","generator","formType","_initializePdfHistory","resetHistory","updateUrl","JSON","explicitDest","setInitialView","setRotation","angle","isValidRotation","setViewerModes","isValidScrollMode","isValidSpreadMode","cleanup","RendererType","forceRendering","beforePrint","printMessage","notReadyMessage","pagesOverview","afterPrint","rotatePages","newRotation","requestPresentationMode","bindEvents","bindWindowEvents","passive","unbindEvents","unbindWindowEvents","HOSTED_VIEWER_ORIGINS","validateFileURL","viewerOrigin","origin","protocol","ex","loadScript","PDFWorker","OPS","queryString","params","fileInput","files","evt","webViewerOpenFileViaURL","xhr","pageIndex","pageView","Stats","timestamp","view","action","state","PresentationModeState","location","href","currentPage","loading","RenderingStates","currentScaleValue","webViewerFileInputChange","URL","originalUrl","fileReader","buffer","webViewerOpenFile","query","phraseSearch","caseSensitive","entireWord","highlightAll","findPrevious","result","setZoomDisabledTimeout","zoomDisabledTimeout","supportedMouseWheelZoomModifierKeys","previousScale","delta","normalizeWheelEventDelta","MOUSE_WHEEL_DELTA_PER_PAGE_SCALE","ticks","currentScale","scaleCorrectionFactor","rect","dx","dy","handled","ensureViewerFocused","cmd","isViewerInPresentationMode","findState","curElement","curElementTagName","turnPage","turnOnlyIfPageFit","CursorTool","instance","supportsPrinting","createPrintService","CSS_UNITS","DEFAULT_SCALE_VALUE","DEFAULT_SCALE","MIN_SCALE","MAX_SCALE","UNKNOWN_SCALE","MAX_AUTO_SCALE","SCROLLBAR_PADDING","VERTICAL_PADDING","NORMAL","CHANGING","FULLSCREEN","CANVAS","SVG","DISABLE","ENABLE","ENABLE_ENHANCE","VERTICAL","HORIZONTAL","WRAPPED","NONE","ODD","EVEN","name","NullL10n","formatL10nValue","devicePixelRatio","backingStoreRatio","ctx","pixelRatio","sx","sy","scaled","skipOverflowHiddenElements","parent","element","offsetY","offsetX","getComputedStyle","spot","debounceScroll","rAF","currentX","viewAreaElement","lastX","currentY","lastY","callback","right","down","_eventHandler","ii","param","minIndex","maxIndex","items","condition","currentIndex","currentItem","xinv","limit","x_","x","a","b","c","d","p","q","r","changeOrientation","rotate","width","height","index","elt","views","pageTop","sortByVisibility","horizontal","top","scrollEl","bottom","left","elementBottom","elementRight","visible","numViews","firstVisibleElementInd","binarySearchFirstItem","backtrackBeforeAllVisibleElements","lastEdge","currentWidth","currentHeight","viewWidth","viewHeight","viewRight","viewBottom","hiddenHeight","hiddenWidth","id","y","first","last","pc","defaultFilename","isDataSchema","reURI","reFilename","splitURI","suggestedFilename","MOUSE_DOM_DELTA_PIXEL_MODE","MOUSE_DOM_DELTA_LINE_MODE","MOUSE_PIXELS_PER_LINE","MOUSE_LINES_PER_PAGE","Number","mode","size","WaitOnType","EVENT","TIMEOUT","delay","target","eventHandler","handler","timeoutHandler","timeout","animationStarted","details","obj","on","external","off","dispatch","eventListeners","Array","dispatchDOMEvent","externalListeners","listener","_on","options","_off","globalEventBus","units","_updateBar","progressSize","clamp","setWidth","scrollbarWidth","hide","show","moved","len","arr","write","read","VIEWER","API","WORKER","PREFERENCE","defaultOptions","kind","defaultUrl","defaultZoomValue","disableHistory","disablePageLabels","eventBusDispatchToDOM","historyUpdateUrl","compatibility","viewerCompatibilityParams","pdfBugEnabled","sidebarViewOnLoad","scrollModeOnLoad","spreadModeOnLoad","cMapPacked","cMapUrl","apiCompatibilityParams","disableFontFace","disableRange","disableStream","docBaseUrl","isEvalSupported","maxImageSize","pdfBug","verbosity","workerPort","workerSrc","navigator","userOptions","userOption","defaultOption","valueType","pdfjsLib","__non_webpack_require__","module","compatibilityParams","userAgent","platform","maxTouchPoints","isAndroid","isIOS","exports","SELECT","HAND","ZOOM","switchTool","tool","disableActiveTool","_dispatchEvent","_addEventListeners","previouslyActive","overlay","GrabToPan","CSS_CLASS_GRAB","activate","deactivate","toggle","ignoreTarget","node","_onmousedown","focusedElement","_onmousemove","isLeftMouseReleased","xDiff","yDiff","behavior","_endPan","prefix","matchesSelector","isNotIEorIsIE10plus","chrome","isChrome15OrOpera15plus","isSafari6plus","CLEANUP_TIMEOUT","RUNNING","PAUSED","FINISHED","setViewer","setThumbnailViewer","isHighestPriority","renderHighestPriority","getHighestPriority","visibleViews","numVisible","nextPageIndex","previousPageIndex","isViewFinished","renderView","UI_NOTIFICATION_CLASS","THUMBS","OUTLINE","ATTACHMENTS","LAYERS","disableNotification","reset","switchView","forceOpen","_switchView","isViewChanged","shouldForceRendering","open","close","_forceRendering","_updateThumbnailViewer","pagesCount","_showUINotification","_hideUINotification","removeNotification","outlineCount","callerCloseMethod","canForceClose","_keyDown","_closeThroughCaller","e","PasswordResponses","promptString","verify","password","setUpdateCallback","keepRenderedCapability","_bindPdfLink","button","blobUrl","createObjectURL","viewerUrl","encodeURIComponent","_bindLink","render","attachmentsCount","names","item","removeNullCharacters","div","_appendAttachment","DEFAULT_FIELD_CONTENT","NON_METRIC_LOCALES","US_PAGE_NAMES","METRIC_PAGE_NAMES","isPortrait","pageNames","freezeFieldData","data","writable","enumerable","configurable","currentPageNumber","pagesRotation","getPageSizeInches","_currentPageNumber","_pagesRotation","setDocument","setFileSize","_reset","_updateUI","content","kb","size_kb","size_b","size_mb","pageSizeInches","isPortraitOrientation","sizeInches","sizeMillimeters","pageName","rawName","getPageName","exactMillimeters","intMillimeters","dateObject","PDFDateString","date","time","_parseLinearization","isLinearized","MATCHES_COUNT_LIMIT","dispatchEvent","updateUIState","notFound","status","FindState","updateResultsCount","current","total","matchesCountMsg","_adjustWidth","findbarHeight","inputContainerHeight","FOUND","NOT_FOUND","PENDING","FIND_TIMEOUT","MATCH_SCROLL_OFFSET_TOP","MATCH_SCROLL_OFFSET_LEFT","CHARACTERS_TO_NORMALIZE","normalizationRegex","replace","executeCommand","findbarClosed","pendingTimeout","scrollMatchIntoView","matchIndex","scrollIntoView","pageIdx","matchIdx","wrapped","normalize","_shouldDirtyMatch","_prepareMatches","currentElem","matchesWithLength","nextElem","prevElem","isSubTerm","matches","matchesLength","_isEntireWord","startIdx","getCharacterType","endIdx","_calculatePhraseMatch","queryLen","pageContent","_calculateWordMatch","queryArray","subquery","subqueryLen","match","matchLength","skipped","_calculateMatch","pageMatchesCount","_extractText","extractTextCapability","normalizeWhitespace","textContent","textItems","strBuf","j","jj","_updatePage","_updateAllPages","_nextMatch","currentPageIndex","offset","numPageMatches","_matchesReady","numMatches","_nextPageMatch","_advanceOffsetPage","_updateMatch","found","previousPage","_onFindBarClose","_requestMatchesCount","_updateUIResultsCount","matchesCount","_updateUIState","CharacterType","SPACE","ALPHA_LETTER","PUNCT","HAN_LETTER","KATAKANA_LETTER","HIRAGANA_LETTER","HALFWIDTH_KATAKANA_LETTER","THAI_LETTER","charCode","isAlphabeticalScript","isAscii","isAsciiSpace","isAsciiAlpha","isAsciiDigit","isThai","isHan","isKatakana","isHiragana","isHalfwidthKatakana","HASH_CHANGE_TIMEOUT","POSITION_UPDATED_THRESHOLD","UPDATE_VIEWAREA_TIMEOUT","onPagesLoaded","initialize","reInitialized","getCurrentHash","destination","push","namedDest","forceReplace","isDestArraysEqual","dest","pushCurrentPosition","back","forward","_pushOrReplaceState","shouldReplace","newState","uid","newUrl","_tryPushCurrentPosition","temporary","position","_isValidState","checkReload","performance","perfEntry","_updateInternalState","removeTemporary","_parseCurrentHash","unescape","_updateViewarea","_popState","newHash","hashChanged","waitOnEventOrTimeout","_pageHide","_bindEvents","updateViewarea","popState","pageHide","_unbindEvents","destHash","nameddest","second","isEntryEqual","firstDest","secondDest","externalLinkEnabled","setHistory","navigateTo","goToDestination","destRef","destArray","getDestinationHash","escape","str","getAnchorUrl","setHash","zoomArgs","zoomArg","zoomArgNumber","parseFloat","allowNegativeOffset","isValidExplicitDestination","executeNamedAction","cachePageRef","refStr","pageRef","_cachedPageNumber","isPageVisible","destLength","allowNull","DEFAULT_TITLE","addLinkAttributes","newWindow","rel","_setStyles","_addToggleButton","toggler","count","shouldShowAll","_toggleOutlineItem","root","toggleOutlineTree","fragment","queue","hasAnyNesting","levelData","itemsDiv","DELAY_BEFORE_RESETTING_SWITCH_IN_PROGRESS","DELAY_BEFORE_HIDING_CONTROLS","ACTIVE_SELECTOR","CONTROLS_SELECTOR","MOUSE_SCROLL_COOLDOWN_TIME","PAGE_SWITCH_THRESHOLD","SWIPE_MIN_DISTANCE_THRESHOLD","SWIPE_ANGLE_THRESHOLD","request","Element","_mouseWheel","currentTime","storedTime","totalDelta","success","_goToPreviousPage","_goToNextPage","_notifyStateChange","active","switchInProgress","_setSwitchInProgress","_resetSwitchInProgress","_enter","_exit","_mouseDown","isInternalLink","_contextMenu","_showControls","_hideControls","_resetMouseScrollState","_touchSwipe","startX","startY","endX","endY","absAngle","_addWindowListeners","_removeWindowListeners","_fullscreenChange","_addFullscreenChangeListeners","_removeFullscreenChangeListeners","SIDEBAR_WIDTH_VAR","SIDEBAR_MIN_WIDTH","SIDEBAR_RESIZING_CLASS","CSS","_updateWidth","newWidth","_mouseMove","_mouseUp","updated","THUMBNAIL_SCROLL_MARGIN","THUMBNAIL_SELECTED_CLASS","watchScroll","_scrollUpdated","getThumbnail","_getVisibleThumbs","getVisibleElements","scrollThumbnailIntoView","prevThumbnailView","visibleThumbs","numVisibleThumbs","shouldScroll","PDFThumbnailView","_resetView","firstPdfPage","viewport","scale","pageNum","thumbnail","defaultViewport","disableCanvasToImageConversion","firstThumbnailView","_cancelRendering","setPageLabels","_ensurePdfPageLoaded","thumbView","MAX_NUM_SCALING_STEPS","THUMBNAIL_CANVAS_BORDER_WIDTH","THUMBNAIL_WIDTH","TempImageFactory","tempCanvasCache","getCanvas","tempCanvas","alpha","destroyCanvas","anchor","ring","borderAdjustment","setPdfPage","totalRotation","childNodes","update","cancelRendering","_getPageDrawContext","noCtxScale","canvas","outputScale","getOutputScale","_convertCanvasToImage","className","image","draw","renderCapability","finishRenderTask","renderTask","drawViewport","renderContinueCallback","cont","renderContext","canvasContext","setImage","img","reducedWidth","reducedHeight","reducedImage","reducedImageCtx","setPageLabel","_scrollIntoView","pageSpot","pageDiv","_getVisiblePages","_updateHelper","currentId","stillFullyVisible","visiblePages","DEFAULT_CACHE_SIZE","pageIdsToKeep","iMax","pagesToKeep","moveToEndOfArray","getPageView","_setCurrentPageNumber","resetCurrentPageView","val","pageLabel","textLayerFactory","annotationLayerFactory","firstPageView","getPagesLeft","_scrollUpdate","_setScaleUpdatePages","noScroll","preset","newValue","isSameScale","presetValue","_setScale","noPadding","hPadding","vPadding","pageWidthScale","pageHeightScale","horizontalScale","_resetCurrentPageView","scrollPageIntoView","pageWidth","pageHeight","widthScale","heightScale","boundingRect","_updateLocation","normalizedScaleValue","firstPage","pdfOpenParams","currentPageView","topLeft","intLeft","intTop","numVisiblePages","newCacheSize","containsElement","focus","_getCurrentVisiblePage","currentlyVisiblePages","scrollAhead","createTextLayerBuilder","enhanceTextSelection","createAnnotationLayerBuilder","getPagesOverview","isFirstPagePortrait","_updateScrollMode","_updateSpreadMode","pages","parity","spread","intent","annotations","dontFlip","AnnotationLayer","cancel","MAX_CANVAS_PIXELS","destroy","_resetZoomLayer","removeFromDOM","zoomLayerCanvas","keepZoomLayer","keepAnnotations","currentZoomLayerNode","currentAnnotationNode","cssTransform","isScalingRestricted","redrawAnnotations","relativeRotation","absRotation","scaleX","scaleY","textLayerViewport","textRelativeRotation","textAbsRotation","textLayerDiv","transX","transY","getPagePoint","canvasWrapper","textLayer","finishPaintTask","paintTask","resultPromise","readableStream","paintOnCanvas","onRenderContinue","isCanvasHidden","showCanvas","actualSizeViewport","pixelsInViewport","maxScale","sfx","approximateFraction","sfy","roundToDivide","transform","paintOnSvg","cancelled","ensureNotCancelled","opList","svgGfx","svg","wrapper","EXPAND_DIVS_TIMEOUT","_finishRendering","endOfContent","numTextDivs","textLayerFrag","textContentStream","textDivs","textContentItemsStr","setTextContentStream","setTextContent","_convertMatches","iIndex","end","m","mm","begin","divIdx","_renderMatches","isSelectedPage","selectedMatchIdx","prevEnd","infinity","appendTextToDiv","span","i0","i1","isSelected","highlightSuffix","beginText","n0","n1","_updateMatches","clearedUntilDivIdx","n","pageMatches","pageMatchesLength","_bindMouse","expandDivsTimer","adjustTop","divBounds","eventName","eventDetails","lastPage","pageRotateCw","pageRotateCcw","setPageNumber","setPagesCount","_bindClickListeners","_bindCursorToolsListener","buttons","_bindScrollModeListener","isScrollModeHorizontal","scrollModeChanged","_bindSpreadModeListener","spreadModeChanged","_setMaxHeight","_ensurePageViewVisible","previousPageView","viewerNodes","scrolledDown","PAGE_NUMBER_LOADING_INDICATOR","SCALE_SELECT_CONTAINER_WIDTH","SCALE_SELECT_WIDTH","setPageScale","_bindListeners","self","resetNumPages","pageScale","customScale","predefinedValueFound","option","updateLoadingIndicatorState","pageNumberInput","predefinedValuesPromise","maxWidth","overflow","DEFAULT_VIEW_HISTORY_CACHE_SIZE","cacheSize","databaseStr","database","length","branch","localStorage","properties","GenericCom","defaultPreferences","defaults","defaultValue","prefValue","defaultType","DISABLE_CREATE_OBJECT_URL","downloadUrl","createValidAbsoluteUrl","downloadData","webL10n","gL10nData","gTextData","gTextProp","gLanguage","gMacros","gReadyState","gAsyncResourceLoading","script","l10nId","l10nArgs","onSuccess","onFailure","baseURL","text","dictionary","reBlank","reComment","reSection","reImport","reSplit","entries","rawText","currentLang","genericLang","lang","skipLang","parsedRawLinesCallback","loadImport","tmp","evalString","nextEntry","xhrLoadText","parseRawLines","parsedPropertiesCallback","parseProperties","prop","successCallback","clear","langLinks","getL10nResourceLinks","langCount","dict","getL10nDictionary","defaultLocale","anyCaseLang","onResourceLoaded","gResourceCount","link","parseResource","resource","locales2rules","list","start","pluralRules","isBetween","getPluralRules","rv","substIndexes","substArguments","reIndex","reMatch","macroName","paramName","macro","reArgs","arg","getL10nAttributes","getL10nData","getChildElementCount","children","l","textNode","getTranslatableChildren","elementCount","translateElement","get","getData","getText","getLanguage","setLanguage","loadLocale","getDirection","rtlList","shortCode","translate","getReadyState","ready","activeService","scratchCanvas","PRINT_RESOLUTION","PRINT_UNITS","PDFPrintService","layout","body","hasEqualPageSizes","ensureOverlay","renderPages","renderNextPage","renderProgress","renderPage","useRenderedPage","printItem","performPrint","throwIfInactive","activeServiceOnEntry","abort","progressContainer","progressBar","progressPerc","stopPropagationIfNeeded","overlayPromise"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;Q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L0C,QAK1CA;AACAjsC,qCAAmC;AAAnCA;AAAmC,GAAnCA,EAAiD4F,WAAjD5F,UAAsE4E,OAAO;AAC3EsnC,+BAD2E,GAC3EA;AAPwC,GAM1ClsC;AA5RF;;AAiSAvC,mCAEE,iBAAgB;AAGd,MACEC,yBACC,iBAAiBA,MADlBA,YAEA,CAACA,MAFDA,WAGC,CAACA,MAAD,YAAmBD,OAAnB,UAAoCA,OAJvC,KACEC,CADF,EAKE;AACAD,WADA,KACAA;AAIAC,UALA,cAKAA;;AACA,QAAIA,MAAJ,0BAAoC;AAClCA,YADkC,wBAClCA;AADF,WAEO;AACLA,YADK,eACLA;AATF;AARY;AAFlBD,GAjSA,IAiSAA;;AA0BA,IAAI,mBAAJ,QAA+B;AAG7B,QAAM0uC,0BAA0B,iBAAgB;AAC9C,QAAIzuC,6BAA6BA,MAAjC,0BAAiE;AAC/DA,YAD+D,wBAC/DA;AAF4C;AAHnB,GAG7B;;AAKAD,yCAR6B,uBAQ7BA;AACAA,wCAT6B,uBAS7BA;AApUF;;AAuUA,IAvUA,cAuUA;;AACA,yBAAyB;AACvB,MAAI,CAAJ,gBAAqB;AACnBqC,qBAAiBtB,0BADE,cACnBsB;;AACA,QAAI,CAAJ,gBAAqB;AACnB,YAAM,UADa,mDACb,CAAN;AAHiB;;AAMnBssC,qBAAiBtsC,+CAEfxI,wBAFewI,qBAEfxI,CAFewI,SANE,IAMFA,CAAjBssC;AAMA90C,qDAZmB,KAYnBA;AAbqB;;AAevB,SAfuB,cAevB;AAvVF;;AA0VA2L,uCAAkC;AAChCsM,oBADgC;;AAGhCC,uEAAqE;AACnE,uBAAmB;AACjB,YAAM,UADW,0CACX,CAAN;AAFiE;;AAInEq7B,oBAAgB,gEAJmD,IAInD,CAAhBA;AAMA,WAVmE,aAUnE;AAb8B;;AAAA,CAAlC5nC,C","file":"viewer.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/* Copyright 2016 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\"use strict\";\n\nif (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"CHROME\")) {\n var defaultUrl; // eslint-disable-line no-var\n\n (function rewriteUrlClosure() {\n // Run this code outside DOMContentLoaded to make sure that the URL\n // is rewritten as soon as possible.\n const queryString = document.location.search.slice(1);\n const m = /(^|&)file=([^&]*)/.exec(queryString);\n defaultUrl = m ? decodeURIComponent(m[2]) : \"\";\n\n // Example: chrome-extension://.../http://example.com/file.pdf\n const humanReadableUrl = \"/\" + defaultUrl + location.hash;\n history.replaceState(history.state, \"\", humanReadableUrl);\n if (top === window) {\n // eslint-disable-next-line no-undef\n chrome.runtime.sendMessage(\"showPageAction\");\n }\n })();\n}\n\nlet pdfjsWebApp, pdfjsWebAppOptions;\nif (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"PRODUCTION\")) {\n pdfjsWebApp = require(\"./app.js\");\n pdfjsWebAppOptions = require(\"./app_options.js\");\n}\n\nif (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n require(\"./firefoxcom.js\");\n require(\"./firefox_print_service.js\");\n}\nif (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"GENERIC\")) {\n require(\"./genericcom.js\");\n}\nif (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"CHROME\")) {\n require(\"./chromecom.js\");\n}\nif (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"CHROME || GENERIC\")) {\n require(\"./pdf_print_service.js\");\n}\n\nfunction getViewerConfiguration() {\n return {\n appContainer: document.body,\n mainContainer: document.getElementById(\"viewerContainer\"),\n viewerContainer: document.getElementById(\"viewer\"),\n eventBus: null,\n toolbar: {\n container: document.getElementById(\"toolbarViewer\"),\n numPages: document.getElementById(\"numPages\"),\n pageNumber: document.getElementById(\"pageNumber\"),\n scaleSelectContainer: document.getElementById(\"scaleSelectContainer\"),\n scaleSelect: document.getElementById(\"scaleSelect\"),\n customScaleOption: document.getElementById(\"customScaleOption\"),\n previous: document.getElementById(\"previous\"),\n next: document.getElementById(\"next\"),\n zoomIn: document.getElementById(\"zoomIn\"),\n zoomOut: document.getElementById(\"zoomOut\"),\n viewFind: document.getElementById(\"viewFind\"),\n openFile: document.getElementById(\"openFile\"),\n print: document.getElementById(\"print\"),\n presentationModeButton: document.getElementById(\"presentationMode\"),\n download: document.getElementById(\"download\"),\n viewBookmark: document.getElementById(\"viewBookmark\"),\n },\n secondaryToolbar: {\n toolbar: document.getElementById(\"secondaryToolbar\"),\n toggleButton: document.getElementById(\"secondaryToolbarToggle\"),\n toolbarButtonContainer: document.getElementById(\n \"secondaryToolbarButtonContainer\"\n ),\n presentationModeButton: document.getElementById(\n \"secondaryPresentationMode\"\n ),\n openFileButton: document.getElementById(\"secondaryOpenFile\"),\n printButton: document.getElementById(\"secondaryPrint\"),\n downloadButton: document.getElementById(\"secondaryDownload\"),\n viewBookmarkButton: document.getElementById(\"secondaryViewBookmark\"),\n firstPageButton: document.getElementById(\"firstPage\"),\n lastPageButton: document.getElementById(\"lastPage\"),\n pageRotateCwButton: document.getElementById(\"pageRotateCw\"),\n pageRotateCcwButton: document.getElementById(\"pageRotateCcw\"),\n cursorSelectToolButton: document.getElementById(\"cursorSelectTool\"),\n cursorHandToolButton: document.getElementById(\"cursorHandTool\"),\n scrollVerticalButton: document.getElementById(\"scrollVertical\"),\n scrollHorizontalButton: document.getElementById(\"scrollHorizontal\"),\n scrollWrappedButton: document.getElementById(\"scrollWrapped\"),\n spreadNoneButton: document.getElementById(\"spreadNone\"),\n spreadOddButton: document.getElementById(\"spreadOdd\"),\n spreadEvenButton: document.getElementById(\"spreadEven\"),\n documentPropertiesButton: document.getElementById(\"documentProperties\"),\n },\n fullscreen: {\n contextFirstPage: document.getElementById(\"contextFirstPage\"),\n contextLastPage: document.getElementById(\"contextLastPage\"),\n contextPageRotateCw: document.getElementById(\"contextPageRotateCw\"),\n contextPageRotateCcw: document.getElementById(\"contextPageRotateCcw\"),\n },\n sidebar: {\n // Divs (and sidebar button)\n outerContainer: document.getElementById(\"outerContainer\"),\n viewerContainer: document.getElementById(\"viewerContainer\"),\n toggleButton: document.getElementById(\"sidebarToggle\"),\n // Buttons\n thumbnailButton: document.getElementById(\"viewThumbnail\"),\n outlineButton: document.getElementById(\"viewOutline\"),\n attachmentsButton: document.getElementById(\"viewAttachments\"),\n // Views\n thumbnailView: document.getElementById(\"thumbnailView\"),\n outlineView: document.getElementById(\"outlineView\"),\n attachmentsView: document.getElementById(\"attachmentsView\"),\n },\n sidebarResizer: {\n outerContainer: document.getElementById(\"outerContainer\"),\n resizer: document.getElementById(\"sidebarResizer\"),\n },\n findBar: {\n bar: document.getElementById(\"findbar\"),\n toggleButton: document.getElementById(\"viewFind\"),\n findField: document.getElementById(\"findInput\"),\n highlightAllCheckbox: document.getElementById(\"findHighlightAll\"),\n caseSensitiveCheckbox: document.getElementById(\"findMatchCase\"),\n entireWordCheckbox: document.getElementById(\"findEntireWord\"),\n findMsg: document.getElementById(\"findMsg\"),\n findResultsCount: document.getElementById(\"findResultsCount\"),\n findPreviousButton: document.getElementById(\"findPrevious\"),\n findNextButton: document.getElementById(\"findNext\"),\n },\n passwordOverlay: {\n overlayName: \"passwordOverlay\",\n container: document.getElementById(\"passwordOverlay\"),\n label: document.getElementById(\"passwordText\"),\n input: document.getElementById(\"password\"),\n submitButton: document.getElementById(\"passwordSubmit\"),\n cancelButton: document.getElementById(\"passwordCancel\"),\n },\n documentProperties: {\n overlayName: \"documentPropertiesOverlay\",\n container: document.getElementById(\"documentPropertiesOverlay\"),\n closeButton: document.getElementById(\"documentPropertiesClose\"),\n fields: {\n fileName: document.getElementById(\"fileNameField\"),\n fileSize: document.getElementById(\"fileSizeField\"),\n title: document.getElementById(\"titleField\"),\n author: document.getElementById(\"authorField\"),\n subject: document.getElementById(\"subjectField\"),\n keywords: document.getElementById(\"keywordsField\"),\n creationDate: document.getElementById(\"creationDateField\"),\n modificationDate: document.getElementById(\"modificationDateField\"),\n creator: document.getElementById(\"creatorField\"),\n producer: document.getElementById(\"producerField\"),\n version: document.getElementById(\"versionField\"),\n pageCount: document.getElementById(\"pageCountField\"),\n pageSize: document.getElementById(\"pageSizeField\"),\n linearized: document.getElementById(\"linearizedField\"),\n },\n },\n errorWrapper: {\n container: document.getElementById(\"errorWrapper\"),\n errorMessage: document.getElementById(\"errorMessage\"),\n closeButton: document.getElementById(\"errorClose\"),\n errorMoreInfo: document.getElementById(\"errorMoreInfo\"),\n moreInfoButton: document.getElementById(\"errorShowMore\"),\n lessInfoButton: document.getElementById(\"errorShowLess\"),\n },\n printContainer: document.getElementById(\"printContainer\"),\n openFileInputName: \"fileInput\",\n debuggerScriptPath: \"./debugger.js\",\n };\n}\n\nfunction webViewerLoad() {\n const config = getViewerConfiguration();\n if (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"PRODUCTION\")) {\n Promise.all([\n SystemJS.import(\"pdfjs-web/app.js\"),\n SystemJS.import(\"pdfjs-web/app_options.js\"),\n SystemJS.import(\"pdfjs-web/genericcom.js\"),\n SystemJS.import(\"pdfjs-web/pdf_print_service.js\"),\n ]).then(function([app, appOptions, ...otherModules]) {\n window.PDFViewerApplication = app.PDFViewerApplication;\n window.PDFViewerApplicationOptions = appOptions.AppOptions;\n app.PDFViewerApplication.run(config);\n });\n } else {\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"CHROME\")) {\n pdfjsWebAppOptions.AppOptions.set(\"defaultUrl\", defaultUrl);\n }\n\n window.PDFViewerApplication = pdfjsWebApp.PDFViewerApplication;\n window.PDFViewerApplicationOptions = pdfjsWebAppOptions.AppOptions;\n\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"GENERIC\")) {\n // Give custom implementations of the default viewer a simpler way to\n // set various `AppOptions`, by dispatching an event once all viewer\n // files are loaded but *before* the viewer initialization has run.\n const event = document.createEvent(\"CustomEvent\");\n event.initCustomEvent(\"webviewerloaded\", true, true, {});\n document.dispatchEvent(event);\n }\n\n pdfjsWebApp.PDFViewerApplication.run(config);\n }\n}\n\nif (\n document.readyState === \"interactive\" ||\n document.readyState === \"complete\"\n) {\n webViewerLoad();\n} else {\n document.addEventListener(\"DOMContentLoaded\", webViewerLoad, true);\n}\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* globals PDFBug, Stats */\n\nimport {\n animationStarted,\n AutoPrintRegExp,\n DEFAULT_SCALE_VALUE,\n EventBus,\n getPDFFileNameFromURL,\n isValidRotation,\n isValidScrollMode,\n isValidSpreadMode,\n MAX_SCALE,\n MIN_SCALE,\n noContextMenuHandler,\n normalizeWheelEventDelta,\n parseQueryString,\n PresentationModeState,\n ProgressBar,\n RendererType,\n ScrollMode,\n SpreadMode,\n TextLayerMode,\n} from \"./ui_utils.js\";\nimport { AppOptions, OptionKind } from \"./app_options.js\";\nimport {\n build,\n createPromiseCapability,\n getDocument,\n getFilenameFromUrl,\n GlobalWorkerOptions,\n InvalidPDFException,\n LinkTarget,\n loadScript,\n MissingPDFException,\n OPS,\n PDFWorker,\n shadow,\n UnexpectedResponseException,\n UNSUPPORTED_FEATURES,\n version,\n} from \"pdfjs-lib\";\nimport { CursorTool, PDFCursorTools } from \"./pdf_cursor_tools.js\";\nimport { PDFRenderingQueue, RenderingStates } from \"./pdf_rendering_queue.js\";\nimport { PDFSidebar, SidebarView } from \"./pdf_sidebar.js\";\nimport { OverlayManager } from \"./overlay_manager.js\";\nimport { PasswordPrompt } from \"./password_prompt.js\";\nimport { PDFAttachmentViewer } from \"./pdf_attachment_viewer.js\";\nimport { PDFDocumentProperties } from \"./pdf_document_properties.js\";\nimport { PDFFindBar } from \"./pdf_find_bar.js\";\nimport { PDFFindController } from \"./pdf_find_controller.js\";\nimport { PDFHistory } from \"./pdf_history.js\";\nimport { PDFLinkService } from \"./pdf_link_service.js\";\nimport { PDFOutlineViewer } from \"./pdf_outline_viewer.js\";\nimport { PDFPresentationMode } from \"./pdf_presentation_mode.js\";\nimport { PDFSidebarResizer } from \"./pdf_sidebar_resizer.js\";\nimport { PDFThumbnailViewer } from \"./pdf_thumbnail_viewer.js\";\nimport { PDFViewer } from \"./pdf_viewer.js\";\nimport { SecondaryToolbar } from \"./secondary_toolbar.js\";\nimport { Toolbar } from \"./toolbar.js\";\nimport { ViewHistory } from \"./view_history.js\";\n\nconst DEFAULT_SCALE_DELTA = 1.1;\nconst DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT = 5000; // ms\nconst FORCE_PAGES_LOADED_TIMEOUT = 10000; // ms\nconst WHEEL_ZOOM_DISABLED_TIMEOUT = 1000; // ms\n\nconst ViewOnLoad = {\n UNKNOWN: -1,\n PREVIOUS: 0, // Default value.\n INITIAL: 1,\n};\n\nclass DefaultExternalServices {\n constructor() {\n throw new Error(\"Cannot initialize DefaultExternalServices.\");\n }\n\n static updateFindControlState(data) {}\n\n static updateFindMatchesCount(data) {}\n\n static initPassiveLoading(callbacks) {}\n\n static fallback(data, callback) {}\n\n static reportTelemetry(data) {}\n\n static createDownloadManager(options) {\n throw new Error(\"Not implemented: createDownloadManager\");\n }\n\n static createPreferences() {\n throw new Error(\"Not implemented: createPreferences\");\n }\n\n static createL10n(options) {\n throw new Error(\"Not implemented: createL10n\");\n }\n\n static get supportsIntegratedFind() {\n return shadow(this, \"supportsIntegratedFind\", false);\n }\n\n static get supportsDocumentFonts() {\n return shadow(this, \"supportsDocumentFonts\", true);\n }\n\n static get supportedMouseWheelZoomModifierKeys() {\n return shadow(this, \"supportedMouseWheelZoomModifierKeys\", {\n ctrlKey: true,\n metaKey: true,\n });\n }\n}\n\nconst PDFViewerApplication = {\n initialBookmark: document.location.hash.substring(1),\n _initializedCapability: createPromiseCapability(),\n fellback: false,\n appConfig: null,\n pdfDocument: null,\n pdfLoadingTask: null,\n printService: null,\n /** @type {PDFViewer} */\n pdfViewer: null,\n /** @type {PDFThumbnailViewer} */\n pdfThumbnailViewer: null,\n /** @type {PDFRenderingQueue} */\n pdfRenderingQueue: null,\n /** @type {PDFPresentationMode} */\n pdfPresentationMode: null,\n /** @type {PDFDocumentProperties} */\n pdfDocumentProperties: null,\n /** @type {PDFLinkService} */\n pdfLinkService: null,\n /** @type {PDFHistory} */\n pdfHistory: null,\n /** @type {PDFSidebar} */\n pdfSidebar: null,\n /** @type {PDFSidebarResizer} */\n pdfSidebarResizer: null,\n /** @type {PDFOutlineViewer} */\n pdfOutlineViewer: null,\n /** @type {PDFAttachmentViewer} */\n pdfAttachmentViewer: null,\n /** @type {PDFCursorTools} */\n pdfCursorTools: null,\n /** @type {ViewHistory} */\n store: null,\n /** @type {DownloadManager} */\n downloadManager: null,\n /** @type {OverlayManager} */\n overlayManager: null,\n /** @type {Preferences} */\n preferences: null,\n /** @type {Toolbar} */\n toolbar: null,\n /** @type {SecondaryToolbar} */\n secondaryToolbar: null,\n /** @type {EventBus} */\n eventBus: null,\n /** @type {IL10n} */\n l10n: null,\n isInitialViewSet: false,\n downloadComplete: false,\n isViewerEmbedded: window.parent !== window,\n url: \"\",\n baseUrl: \"\",\n externalServices: DefaultExternalServices,\n _boundEvents: {},\n contentDispositionFilename: null,\n\n // Called once when the document is loaded.\n async initialize(appConfig) {\n this.preferences = this.externalServices.createPreferences();\n this.appConfig = appConfig;\n\n await this._readPreferences();\n await this._parseHashParameters();\n await this._initializeL10n();\n\n if (\n this.isViewerEmbedded &&\n AppOptions.get(\"externalLinkTarget\") === LinkTarget.NONE\n ) {\n // Prevent external links from \"replacing\" the viewer,\n // when it's embedded in e.g. an <iframe> or an <object>.\n AppOptions.set(\"externalLinkTarget\", LinkTarget.TOP);\n }\n await this._initializeViewerComponents();\n\n // Bind the various event handlers *after* the viewer has been\n // initialized, to prevent errors if an event arrives too soon.\n this.bindEvents();\n this.bindWindowEvents();\n\n // We can start UI localization now.\n const appContainer = appConfig.appContainer || document.documentElement;\n this.l10n.translate(appContainer).then(() => {\n // Dispatch the 'localized' event on the `eventBus` once the viewer\n // has been fully initialized and translated.\n this.eventBus.dispatch(\"localized\", { source: this });\n });\n\n this._initializedCapability.resolve();\n },\n\n /**\n * @private\n */\n async _readPreferences() {\n if (AppOptions.get(\"disablePreferences\") === true) {\n // Give custom implementations of the default viewer a simpler way to\n // opt-out of having the `Preferences` override existing `AppOptions`.\n return;\n }\n try {\n const prefs = await this.preferences.getAll();\n for (const name in prefs) {\n AppOptions.set(name, prefs[name]);\n }\n } catch (reason) {\n console.error(`_readPreferences: \"${reason.message}\".`);\n }\n },\n\n /**\n * Potentially parse special debugging flags in the hash section of the URL.\n * @private\n */\n async _parseHashParameters() {\n if (\n typeof PDFJSDev !== \"undefined\" &&\n PDFJSDev.test(\"PRODUCTION\") &&\n !AppOptions.get(\"pdfBugEnabled\")\n ) {\n return undefined;\n }\n const hash = document.location.hash.substring(1);\n if (!hash) {\n return undefined;\n }\n const hashParams = parseQueryString(hash),\n waitOn = [];\n\n if (\n \"disableworker\" in hashParams &&\n hashParams[\"disableworker\"] === \"true\"\n ) {\n waitOn.push(loadFakeWorker());\n }\n if (\"disablerange\" in hashParams) {\n AppOptions.set(\"disableRange\", hashParams[\"disablerange\"] === \"true\");\n }\n if (\"disablestream\" in hashParams) {\n AppOptions.set(\"disableStream\", hashParams[\"disablestream\"] === \"true\");\n }\n if (\"disableautofetch\" in hashParams) {\n AppOptions.set(\n \"disableAutoFetch\",\n hashParams[\"disableautofetch\"] === \"true\"\n );\n }\n if (\"disablefontface\" in hashParams) {\n AppOptions.set(\n \"disableFontFace\",\n hashParams[\"disablefontface\"] === \"true\"\n );\n }\n if (\"disablehistory\" in hashParams) {\n AppOptions.set(\"disableHistory\", hashParams[\"disablehistory\"] === \"true\");\n }\n if (\"webgl\" in hashParams) {\n AppOptions.set(\"enableWebGL\", hashParams[\"webgl\"] === \"true\");\n }\n if (\"verbosity\" in hashParams) {\n AppOptions.set(\"verbosity\", hashParams[\"verbosity\"] | 0);\n }\n if (\"textlayer\" in hashParams) {\n switch (hashParams[\"textlayer\"]) {\n case \"off\":\n AppOptions.set(\"textLayerMode\", TextLayerMode.DISABLE);\n break;\n case \"visible\":\n case \"shadow\":\n case \"hover\":\n const viewer = this.appConfig.viewerContainer;\n viewer.classList.add(\"textLayer-\" + hashParams[\"textlayer\"]);\n break;\n }\n }\n if (\"pdfbug\" in hashParams) {\n AppOptions.set(\"pdfBug\", true);\n const enabled = hashParams[\"pdfbug\"].split(\",\");\n waitOn.push(loadAndEnablePDFBug(enabled));\n }\n // It is not possible to change locale for the (various) extension builds.\n if (\n (typeof PDFJSDev === \"undefined\" ||\n PDFJSDev.test(\"!PRODUCTION || GENERIC\")) &&\n \"locale\" in hashParams\n ) {\n AppOptions.set(\"locale\", hashParams[\"locale\"]);\n }\n\n return Promise.all(waitOn).catch(reason => {\n console.error(`_parseHashParameters: \"${reason.message}\".`);\n });\n },\n\n /**\n * @private\n */\n async _initializeL10n() {\n this.l10n = this.externalServices.createL10n({\n locale: AppOptions.get(\"locale\"),\n });\n const dir = await this.l10n.getDirection();\n document.getElementsByTagName(\"html\")[0].dir = dir;\n },\n\n /**\n * @private\n */\n async _initializeViewerComponents() {\n const appConfig = this.appConfig;\n\n this.overlayManager = new OverlayManager();\n\n const eventBus =\n appConfig.eventBus ||\n new EventBus({ dispatchToDOM: AppOptions.get(\"eventBusDispatchToDOM\") });\n this.eventBus = eventBus;\n\n const pdfRenderingQueue = new PDFRenderingQueue();\n pdfRenderingQueue.onIdle = this.cleanup.bind(this);\n this.pdfRenderingQueue = pdfRenderingQueue;\n\n const pdfLinkService = new PDFLinkService({\n eventBus,\n externalLinkTarget: AppOptions.get(\"externalLinkTarget\"),\n externalLinkRel: AppOptions.get(\"externalLinkRel\"),\n ignoreDestinationZoom: AppOptions.get(\"ignoreDestinationZoom\"),\n });\n this.pdfLinkService = pdfLinkService;\n\n const downloadManager = this.externalServices.createDownloadManager({\n disableCreateObjectURL: AppOptions.get(\"disableCreateObjectURL\"),\n });\n this.downloadManager = downloadManager;\n\n const findController = new PDFFindController({\n linkService: pdfLinkService,\n eventBus,\n });\n this.findController = findController;\n\n const container = appConfig.mainContainer;\n const viewer = appConfig.viewerContainer;\n this.pdfViewer = new PDFViewer({\n container,\n viewer,\n eventBus,\n renderingQueue: pdfRenderingQueue,\n linkService: pdfLinkService,\n downloadManager,\n findController,\n renderer: AppOptions.get(\"renderer\"),\n enableWebGL: AppOptions.get(\"enableWebGL\"),\n l10n: this.l10n,\n textLayerMode: AppOptions.get(\"textLayerMode\"),\n imageResourcesPath: AppOptions.get(\"imageResourcesPath\"),\n renderInteractiveForms: AppOptions.get(\"renderInteractiveForms\"),\n enablePrintAutoRotate: AppOptions.get(\"enablePrintAutoRotate\"),\n useOnlyCssZoom: AppOptions.get(\"useOnlyCssZoom\"),\n maxCanvasPixels: AppOptions.get(\"maxCanvasPixels\"),\n });\n pdfRenderingQueue.setViewer(this.pdfViewer);\n pdfLinkService.setViewer(this.pdfViewer);\n\n this.pdfThumbnailViewer = new PDFThumbnailViewer({\n container: appConfig.sidebar.thumbnailView,\n renderingQueue: pdfRenderingQueue,\n linkService: pdfLinkService,\n l10n: this.l10n,\n });\n pdfRenderingQueue.setThumbnailViewer(this.pdfThumbnailViewer);\n\n this.pdfHistory = new PDFHistory({\n linkService: pdfLinkService,\n eventBus,\n });\n pdfLinkService.setHistory(this.pdfHistory);\n\n if (!this.supportsIntegratedFind) {\n this.findBar = new PDFFindBar(appConfig.findBar, eventBus, this.l10n);\n }\n\n this.pdfDocumentProperties = new PDFDocumentProperties(\n appConfig.documentProperties,\n this.overlayManager,\n eventBus,\n this.l10n\n );\n\n this.pdfCursorTools = new PDFCursorTools({\n container,\n eventBus,\n cursorToolOnLoad: AppOptions.get(\"cursorToolOnLoad\"),\n });\n\n this.toolbar = new Toolbar(appConfig.toolbar, eventBus, this.l10n);\n\n this.secondaryToolbar = new SecondaryToolbar(\n appConfig.secondaryToolbar,\n container,\n eventBus\n );\n\n if (this.supportsFullscreen) {\n this.pdfPresentationMode = new PDFPresentationMode({\n container,\n pdfViewer: this.pdfViewer,\n eventBus,\n contextMenuItems: appConfig.fullscreen,\n });\n }\n\n this.passwordPrompt = new PasswordPrompt(\n appConfig.passwordOverlay,\n this.overlayManager,\n this.l10n\n );\n\n this.pdfOutlineViewer = new PDFOutlineViewer({\n container: appConfig.sidebar.outlineView,\n eventBus,\n linkService: pdfLinkService,\n });\n\n this.pdfAttachmentViewer = new PDFAttachmentViewer({\n container: appConfig.sidebar.attachmentsView,\n eventBus,\n downloadManager,\n });\n\n this.pdfSidebar = new PDFSidebar({\n elements: appConfig.sidebar,\n pdfViewer: this.pdfViewer,\n pdfThumbnailViewer: this.pdfThumbnailViewer,\n eventBus,\n l10n: this.l10n,\n });\n this.pdfSidebar.onToggled = this.forceRendering.bind(this);\n\n this.pdfSidebarResizer = new PDFSidebarResizer(\n appConfig.sidebarResizer,\n eventBus,\n this.l10n\n );\n },\n\n run(config) {\n this.initialize(config).then(webViewerInitialized);\n },\n\n get initialized() {\n return this._initializedCapability.settled;\n },\n\n get initializedPromise() {\n return this._initializedCapability.promise;\n },\n\n zoomIn(ticks) {\n if (this.pdfViewer.isInPresentationMode) {\n return;\n }\n let newScale = this.pdfViewer.currentScale;\n do {\n newScale = (newScale * DEFAULT_SCALE_DELTA).toFixed(2);\n newScale = Math.ceil(newScale * 10) / 10;\n newScale = Math.min(MAX_SCALE, newScale);\n } while (--ticks > 0 && newScale < MAX_SCALE);\n this.pdfViewer.currentScaleValue = newScale;\n },\n\n zoomOut(ticks) {\n if (this.pdfViewer.isInPresentationMode) {\n return;\n }\n let newScale = this.pdfViewer.currentScale;\n do {\n newScale = (newScale / DEFAULT_SCALE_DELTA).toFixed(2);\n newScale = Math.floor(newScale * 10) / 10;\n newScale = Math.max(MIN_SCALE, newScale);\n } while (--ticks > 0 && newScale > MIN_SCALE);\n this.pdfViewer.currentScaleValue = newScale;\n },\n\n zoomReset() {\n if (this.pdfViewer.isInPresentationMode) {\n return;\n }\n this.pdfViewer.currentScaleValue = DEFAULT_SCALE_VALUE;\n },\n\n get pagesCount() {\n return this.pdfDocument ? this.pdfDocument.numPages : 0;\n },\n\n set page(val) {\n this.pdfViewer.currentPageNumber = val;\n },\n\n get page() {\n return this.pdfViewer.currentPageNumber;\n },\n\n get printing() {\n return !!this.printService;\n },\n\n get supportsPrinting() {\n return PDFPrintServiceFactory.instance.supportsPrinting;\n },\n\n get supportsFullscreen() {\n let support;\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n support =\n document.fullscreenEnabled === true ||\n document.mozFullScreenEnabled === true;\n } else {\n const doc = document.documentElement;\n support = !!(\n doc.requestFullscreen ||\n doc.mozRequestFullScreen ||\n doc.webkitRequestFullScreen ||\n doc.msRequestFullscreen\n );\n\n if (\n document.fullscreenEnabled === false ||\n document.mozFullScreenEnabled === false ||\n document.webkitFullscreenEnabled === false ||\n document.msFullscreenEnabled === false\n ) {\n support = false;\n }\n }\n return shadow(this, \"supportsFullscreen\", support);\n },\n\n get supportsIntegratedFind() {\n return this.externalServices.supportsIntegratedFind;\n },\n\n get supportsDocumentFonts() {\n return this.externalServices.supportsDocumentFonts;\n },\n\n get loadingBar() {\n const bar = new ProgressBar(\"#loadingBar\");\n return shadow(this, \"loadingBar\", bar);\n },\n\n get supportedMouseWheelZoomModifierKeys() {\n return this.externalServices.supportedMouseWheelZoomModifierKeys;\n },\n\n initPassiveLoading() {\n if (\n typeof PDFJSDev === \"undefined\" ||\n !PDFJSDev.test(\"MOZCENTRAL || CHROME\")\n ) {\n throw new Error(\"Not implemented: initPassiveLoading\");\n }\n this.externalServices.initPassiveLoading({\n onOpenWithTransport(url, length, transport) {\n PDFViewerApplication.open(url, { length, range: transport });\n },\n onOpenWithData(data) {\n PDFViewerApplication.open(data);\n },\n onOpenWithURL(url, length, originalUrl) {\n let file = url,\n args = null;\n if (length !== undefined) {\n args = { length };\n }\n if (originalUrl !== undefined) {\n file = { url, originalUrl };\n }\n PDFViewerApplication.open(file, args);\n },\n onError(err) {\n PDFViewerApplication.l10n\n .get(\n \"loading_error\",\n null,\n \"An error occurred while loading the PDF.\"\n )\n .then(msg => {\n PDFViewerApplication.error(msg, err);\n });\n },\n onProgress(loaded, total) {\n PDFViewerApplication.progress(loaded / total);\n },\n });\n },\n\n setTitleUsingUrl(url = \"\") {\n this.url = url;\n this.baseUrl = url.split(\"#\")[0];\n let title = getPDFFileNameFromURL(url, \"\");\n if (!title) {\n try {\n title = decodeURIComponent(getFilenameFromUrl(url)) || url;\n } catch (ex) {\n // decodeURIComponent may throw URIError,\n // fall back to using the unprocessed url in that case\n title = url;\n }\n }\n this.setTitle(title);\n },\n\n setTitle(title) {\n if (this.isViewerEmbedded) {\n // Embedded PDF viewers should not be changing their parent page's title.\n return;\n }\n document.title = title;\n },\n\n /**\n * Closes opened PDF document.\n * @returns {Promise} - Returns the promise, which is resolved when all\n * destruction is completed.\n */\n async close() {\n const errorWrapper = this.appConfig.errorWrapper.container;\n errorWrapper.setAttribute(\"hidden\", \"true\");\n\n if (!this.pdfLoadingTask) {\n return undefined;\n }\n\n const promise = this.pdfLoadingTask.destroy();\n this.pdfLoadingTask = null;\n\n if (this.pdfDocument) {\n this.pdfDocument = null;\n\n this.pdfThumbnailViewer.setDocument(null);\n this.pdfViewer.setDocument(null);\n this.pdfLinkService.setDocument(null);\n this.pdfDocumentProperties.setDocument(null);\n }\n this.store = null;\n this.isInitialViewSet = false;\n this.downloadComplete = false;\n this.url = \"\";\n this.baseUrl = \"\";\n this.contentDispositionFilename = null;\n\n this.pdfSidebar.reset();\n this.pdfOutlineViewer.reset();\n this.pdfAttachmentViewer.reset();\n\n if (this.pdfHistory) {\n this.pdfHistory.reset();\n }\n if (this.findBar) {\n this.findBar.reset();\n }\n this.toolbar.reset();\n this.secondaryToolbar.reset();\n\n if (typeof PDFBug !== \"undefined\") {\n PDFBug.cleanup();\n }\n return promise;\n },\n\n /**\n * Opens PDF document specified by URL or array with additional arguments.\n * @param {string|TypedArray|ArrayBuffer} file - PDF location or binary data.\n * @param {Object} [args] - Additional arguments for the getDocument call,\n * e.g. HTTP headers ('httpHeaders') or alternative\n * data transport ('range').\n * @returns {Promise} - Returns the promise, which is resolved when document\n * is opened.\n */\n async open(file, args) {\n if (this.pdfLoadingTask) {\n // We need to destroy already opened document.\n await this.close();\n }\n // Set the necessary global worker parameters, using the available options.\n const workerParameters = AppOptions.getAll(OptionKind.WORKER);\n for (const key in workerParameters) {\n GlobalWorkerOptions[key] = workerParameters[key];\n }\n\n const parameters = Object.create(null);\n if (typeof file === \"string\") {\n // URL\n this.setTitleUsingUrl(file);\n parameters.url = file;\n } else if (file && \"byteLength\" in file) {\n // ArrayBuffer\n parameters.data = file;\n } else if (file.url && file.originalUrl) {\n this.setTitleUsingUrl(file.originalUrl);\n parameters.url = file.url;\n }\n // Set the necessary API parameters, using the available options.\n const apiParameters = AppOptions.getAll(OptionKind.API);\n for (const key in apiParameters) {\n let value = apiParameters[key];\n\n if (key === \"docBaseUrl\" && !value) {\n if (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"PRODUCTION\")) {\n value = document.URL.split(\"#\")[0];\n } else if (PDFJSDev.test(\"MOZCENTRAL || CHROME\")) {\n value = this.baseUrl;\n }\n }\n parameters[key] = value;\n }\n\n if (args) {\n for (const key in args) {\n const value = args[key];\n\n if (key === \"length\") {\n this.pdfDocumentProperties.setFileSize(value);\n }\n parameters[key] = value;\n }\n }\n\n const loadingTask = getDocument(parameters);\n this.pdfLoadingTask = loadingTask;\n\n loadingTask.onPassword = (updateCallback, reason) => {\n this.pdfLinkService.externalLinkEnabled = false;\n this.passwordPrompt.setUpdateCallback(updateCallback, reason);\n this.passwordPrompt.open();\n };\n\n loadingTask.onProgress = ({ loaded, total }) => {\n this.progress(loaded / total);\n };\n\n // Listen for unsupported features to trigger the fallback UI.\n loadingTask.onUnsupportedFeature = this.fallback.bind(this);\n\n return loadingTask.promise.then(\n pdfDocument => {\n this.load(pdfDocument);\n },\n exception => {\n if (loadingTask !== this.pdfLoadingTask) {\n return undefined; // Ignore errors for previously opened PDF files.\n }\n\n const message = exception && exception.message;\n let loadingErrorMessage;\n if (exception instanceof InvalidPDFException) {\n // change error message also for other builds\n loadingErrorMessage = this.l10n.get(\n \"invalid_file_error\",\n null,\n \"Invalid or corrupted PDF file.\"\n );\n } else if (exception instanceof MissingPDFException) {\n // special message for missing PDF's\n loadingErrorMessage = this.l10n.get(\n \"missing_file_error\",\n null,\n \"Missing PDF file.\"\n );\n } else if (exception instanceof UnexpectedResponseException) {\n loadingErrorMessage = this.l10n.get(\n \"unexpected_response_error\",\n null,\n \"Unexpected server response.\"\n );\n } else {\n loadingErrorMessage = this.l10n.get(\n \"loading_error\",\n null,\n \"An error occurred while loading the PDF.\"\n );\n }\n\n return loadingErrorMessage.then(msg => {\n this.error(msg, { message });\n throw new Error(msg);\n });\n }\n );\n },\n\n download() {\n function downloadByUrl() {\n downloadManager.downloadUrl(url, filename);\n }\n\n const url = this.baseUrl;\n // Use this.url instead of this.baseUrl to perform filename detection based\n // on the reference fragment as ultimate fallback if needed.\n const filename =\n this.contentDispositionFilename || getPDFFileNameFromURL(this.url);\n const downloadManager = this.downloadManager;\n downloadManager.onerror = err => {\n // This error won't really be helpful because it's likely the\n // fallback won't work either (or is already open).\n this.error(`PDF failed to download: ${err}`);\n };\n\n // When the PDF document isn't ready, or the PDF file is still downloading,\n // simply download using the URL.\n if (!this.pdfDocument || !this.downloadComplete) {\n downloadByUrl();\n return;\n }\n\n this.pdfDocument\n .getData()\n .then(function(data) {\n const blob = new Blob([data], { type: \"application/pdf\" });\n downloadManager.download(blob, url, filename);\n })\n .catch(downloadByUrl); // Error occurred, try downloading with the URL.\n },\n\n fallback(featureId) {\n if (\n typeof PDFJSDev === \"undefined\" ||\n PDFJSDev.test(\"MOZCENTRAL || GENERIC\")\n ) {\n // Only trigger the fallback once so we don't spam the user with messages\n // for one PDF.\n if (this.fellback) {\n return;\n }\n this.fellback = true;\n this.externalServices.fallback(\n {\n featureId,\n url: this.baseUrl,\n },\n function response(download) {\n if (!download) {\n return;\n }\n PDFViewerApplication.download();\n }\n );\n }\n },\n\n /**\n * Show the error box.\n * @param {string} message - A message that is human readable.\n * @param {Object} [moreInfo] - Further information about the error that is\n * more technical. Should have a 'message' and\n * optionally a 'stack' property.\n */\n error(message, moreInfo) {\n const moreInfoText = [\n this.l10n.get(\n \"error_version_info\",\n { version: version || \"?\", build: build || \"?\" },\n \"PDF.js v{{version}} (build: {{build}})\"\n ),\n ];\n if (moreInfo) {\n moreInfoText.push(\n this.l10n.get(\n \"error_message\",\n { message: moreInfo.message },\n \"Message: {{message}}\"\n )\n );\n if (moreInfo.stack) {\n moreInfoText.push(\n this.l10n.get(\n \"error_stack\",\n { stack: moreInfo.stack },\n \"Stack: {{stack}}\"\n )\n );\n } else {\n if (moreInfo.filename) {\n moreInfoText.push(\n this.l10n.get(\n \"error_file\",\n { file: moreInfo.filename },\n \"File: {{file}}\"\n )\n );\n }\n if (moreInfo.lineNumber) {\n moreInfoText.push(\n this.l10n.get(\n \"error_line\",\n { line: moreInfo.lineNumber },\n \"Line: {{line}}\"\n )\n );\n }\n }\n }\n\n if (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"MOZCENTRAL\")) {\n const errorWrapperConfig = this.appConfig.errorWrapper;\n const errorWrapper = errorWrapperConfig.container;\n errorWrapper.removeAttribute(\"hidden\");\n\n const errorMessage = errorWrapperConfig.errorMessage;\n errorMessage.textContent = message;\n\n const closeButton = errorWrapperConfig.closeButton;\n closeButton.onclick = function() {\n errorWrapper.setAttribute(\"hidden\", \"true\");\n };\n\n const errorMoreInfo = errorWrapperConfig.errorMoreInfo;\n const moreInfoButton = errorWrapperConfig.moreInfoButton;\n const lessInfoButton = errorWrapperConfig.lessInfoButton;\n moreInfoButton.onclick = function() {\n errorMoreInfo.removeAttribute(\"hidden\");\n moreInfoButton.setAttribute(\"hidden\", \"true\");\n lessInfoButton.removeAttribute(\"hidden\");\n errorMoreInfo.style.height = errorMoreInfo.scrollHeight + \"px\";\n };\n lessInfoButton.onclick = function() {\n errorMoreInfo.setAttribute(\"hidden\", \"true\");\n moreInfoButton.removeAttribute(\"hidden\");\n lessInfoButton.setAttribute(\"hidden\", \"true\");\n };\n moreInfoButton.oncontextmenu = noContextMenuHandler;\n lessInfoButton.oncontextmenu = noContextMenuHandler;\n closeButton.oncontextmenu = noContextMenuHandler;\n moreInfoButton.removeAttribute(\"hidden\");\n lessInfoButton.setAttribute(\"hidden\", \"true\");\n Promise.all(moreInfoText).then(parts => {\n errorMoreInfo.value = parts.join(\"\\n\");\n });\n } else {\n Promise.all(moreInfoText).then(parts => {\n console.error(message + \"\\n\" + parts.join(\"\\n\"));\n });\n this.fallback();\n }\n },\n\n progress(level) {\n if (this.downloadComplete) {\n // Don't accidentally show the loading bar again when the entire file has\n // already been fetched (only an issue when disableAutoFetch is enabled).\n return;\n }\n const percent = Math.round(level * 100);\n // When we transition from full request to range requests, it's possible\n // that we discard some of the loaded data. This can cause the loading\n // bar to move backwards. So prevent this by only updating the bar if it\n // increases.\n if (percent > this.loadingBar.percent || isNaN(percent)) {\n this.loadingBar.percent = percent;\n\n // When disableAutoFetch is enabled, it's not uncommon for the entire file\n // to never be fetched (depends on e.g. the file structure). In this case\n // the loading bar will not be completely filled, nor will it be hidden.\n // To prevent displaying a partially filled loading bar permanently, we\n // hide it when no data has been loaded during a certain amount of time.\n const disableAutoFetch = this.pdfDocument\n ? this.pdfDocument.loadingParams[\"disableAutoFetch\"]\n : AppOptions.get(\"disableAutoFetch\");\n\n if (disableAutoFetch && percent) {\n if (this.disableAutoFetchLoadingBarTimeout) {\n clearTimeout(this.disableAutoFetchLoadingBarTimeout);\n this.disableAutoFetchLoadingBarTimeout = null;\n }\n this.loadingBar.show();\n\n this.disableAutoFetchLoadingBarTimeout = setTimeout(() => {\n this.loadingBar.hide();\n this.disableAutoFetchLoadingBarTimeout = null;\n }, DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT);\n }\n }\n },\n\n load(pdfDocument) {\n this.pdfDocument = pdfDocument;\n\n pdfDocument.getDownloadInfo().then(() => {\n this.downloadComplete = true;\n this.loadingBar.hide();\n\n firstPagePromise.then(() => {\n this.eventBus.dispatch(\"documentloaded\", { source: this });\n });\n });\n\n // Since the `setInitialView` call below depends on this being resolved,\n // fetch it early to avoid delaying initial rendering of the PDF document.\n const pageLayoutPromise = pdfDocument.getPageLayout().catch(function() {\n /* Avoid breaking initial rendering; ignoring errors. */\n });\n const pageModePromise = pdfDocument.getPageMode().catch(function() {\n /* Avoid breaking initial rendering; ignoring errors. */\n });\n const openActionPromise = pdfDocument.getOpenAction().catch(function() {\n /* Avoid breaking initial rendering; ignoring errors. */\n });\n\n this.toolbar.setPagesCount(pdfDocument.numPages, false);\n this.secondaryToolbar.setPagesCount(pdfDocument.numPages);\n\n const store = (this.store = new ViewHistory(pdfDocument.fingerprint));\n\n let baseDocumentUrl;\n if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) {\n baseDocumentUrl = null;\n } else if (PDFJSDev.test(\"MOZCENTRAL\")) {\n baseDocumentUrl = this.baseUrl;\n } else if (PDFJSDev.test(\"CHROME\")) {\n baseDocumentUrl = location.href.split(\"#\")[0];\n }\n this.pdfLinkService.setDocument(pdfDocument, baseDocumentUrl);\n this.pdfDocumentProperties.setDocument(pdfDocument, this.url);\n\n const pdfViewer = this.pdfViewer;\n pdfViewer.setDocument(pdfDocument);\n const { firstPagePromise, onePageRendered, pagesPromise } = pdfViewer;\n\n const pdfThumbnailViewer = this.pdfThumbnailViewer;\n pdfThumbnailViewer.setDocument(pdfDocument);\n\n firstPagePromise.then(pdfPage => {\n this.loadingBar.setWidth(this.appConfig.viewerContainer);\n\n const storePromise = store\n .getMultiple({\n page: null,\n zoom: DEFAULT_SCALE_VALUE,\n scrollLeft: \"0\",\n scrollTop: \"0\",\n rotation: null,\n sidebarView: SidebarView.UNKNOWN,\n scrollMode: ScrollMode.UNKNOWN,\n spreadMode: SpreadMode.UNKNOWN,\n })\n .catch(() => {\n /* Unable to read from storage; ignoring errors. */\n });\n\n Promise.all([\n animationStarted,\n storePromise,\n pageLayoutPromise,\n pageModePromise,\n openActionPromise,\n ])\n .then(\n async ([\n timeStamp,\n values = {},\n pageLayout,\n pageMode,\n openAction,\n ]) => {\n const viewOnLoad = AppOptions.get(\"viewOnLoad\");\n\n this._initializePdfHistory({\n fingerprint: pdfDocument.fingerprint,\n viewOnLoad,\n initialDest: openAction && openAction.dest,\n });\n const initialBookmark = this.initialBookmark;\n\n // Initialize the default values, from user preferences.\n const zoom = AppOptions.get(\"defaultZoomValue\");\n let hash = zoom ? `zoom=${zoom}` : null;\n\n let rotation = null;\n let sidebarView = AppOptions.get(\"sidebarViewOnLoad\");\n let scrollMode = AppOptions.get(\"scrollModeOnLoad\");\n let spreadMode = AppOptions.get(\"spreadModeOnLoad\");\n\n if (values.page && viewOnLoad !== ViewOnLoad.INITIAL) {\n hash =\n `page=${values.page}&zoom=${zoom || values.zoom},` +\n `${values.scrollLeft},${values.scrollTop}`;\n\n rotation = parseInt(values.rotation, 10);\n // Always let user preferences take precedence over the view\n // history.\n if (sidebarView === SidebarView.UNKNOWN) {\n sidebarView = values.sidebarView | 0;\n }\n if (scrollMode === ScrollMode.UNKNOWN) {\n scrollMode = values.scrollMode | 0;\n }\n if (spreadMode === SpreadMode.UNKNOWN) {\n spreadMode = values.spreadMode | 0;\n }\n }\n // Always let the user preference/view history take precedence.\n if (pageMode && sidebarView === SidebarView.UNKNOWN) {\n sidebarView = apiPageModeToSidebarView(pageMode);\n }\n if (pageLayout && spreadMode === SpreadMode.UNKNOWN) {\n spreadMode = apiPageLayoutToSpreadMode(pageLayout);\n }\n\n this.setInitialView(hash, {\n rotation,\n sidebarView,\n scrollMode,\n spreadMode,\n });\n this.eventBus.dispatch(\"documentinit\", { source: this });\n // Make all navigation keys work on document load,\n // unless the viewer is embedded in a web page.\n if (!this.isViewerEmbedded) {\n pdfViewer.focus();\n }\n\n // For documents with different page sizes, once all pages are\n // resolved, ensure that the correct location becomes visible on\n // load.\n // (To reduce the risk, in very large and/or slow loading documents,\n // that the location changes *after* the user has started\n // interacting with the viewer, wait for either `pagesPromise` or\n // a timeout.)\n await Promise.race([\n pagesPromise,\n new Promise(resolve => {\n setTimeout(resolve, FORCE_PAGES_LOADED_TIMEOUT);\n }),\n ]);\n if (!initialBookmark && !hash) {\n return;\n }\n if (pdfViewer.hasEqualPageSizes) {\n return;\n }\n this.initialBookmark = initialBookmark;\n\n // eslint-disable-next-line no-self-assign\n pdfViewer.currentScaleValue = pdfViewer.currentScaleValue;\n // Re-apply the initial document location.\n this.setInitialView(hash);\n }\n )\n .catch(() => {\n // Ensure that the document is always completely initialized,\n // even if there are any errors thrown above.\n this.setInitialView();\n })\n .then(function() {\n // At this point, rendering of the initial page(s) should always have\n // started (and may even have completed).\n // To prevent any future issues, e.g. the document being completely\n // blank on load, always trigger rendering here.\n pdfViewer.update();\n });\n });\n\n pdfDocument.getPageLabels().then(labels => {\n if (!labels || AppOptions.get(\"disablePageLabels\")) {\n return;\n }\n const numLabels = labels.length;\n if (numLabels !== this.pagesCount) {\n console.error(\n \"The number of Page Labels does not match \" +\n \"the number of pages in the document.\"\n );\n return;\n }\n let i = 0;\n // Ignore page labels that correspond to standard page numbering.\n while (i < numLabels && labels[i] === (i + 1).toString()) {\n i++;\n }\n if (i === numLabels) {\n return;\n }\n\n pdfViewer.setPageLabels(labels);\n pdfThumbnailViewer.setPageLabels(labels);\n\n // Changing toolbar page display to use labels and we need to set\n // the label of the current page.\n this.toolbar.setPagesCount(pdfDocument.numPages, true);\n this.toolbar.setPageNumber(\n pdfViewer.currentPageNumber,\n pdfViewer.currentPageLabel\n );\n });\n\n pagesPromise.then(async () => {\n const [openAction, javaScript] = await Promise.all([\n openActionPromise,\n pdfDocument.getJavaScript(),\n ]);\n let triggerAutoPrint = false;\n\n if (openAction && openAction.action === \"Print\") {\n triggerAutoPrint = true;\n }\n if (javaScript) {\n javaScript.some(js => {\n if (!js) {\n // Don't warn/fallback for empty JavaScript actions.\n return false;\n }\n console.warn(\"Warning: JavaScript is not supported\");\n this.fallback(UNSUPPORTED_FEATURES.javaScript);\n return true;\n });\n\n if (!triggerAutoPrint) {\n // Hack to support auto printing.\n for (const js of javaScript) {\n if (js && AutoPrintRegExp.test(js)) {\n triggerAutoPrint = true;\n break;\n }\n }\n }\n }\n\n if (!this.supportsPrinting) {\n return;\n }\n if (triggerAutoPrint) {\n setTimeout(function() {\n window.print();\n });\n }\n });\n\n onePageRendered.then(() => {\n pdfDocument.getOutline().then(outline => {\n this.pdfOutlineViewer.render({ outline });\n });\n pdfDocument.getAttachments().then(attachments => {\n this.pdfAttachmentViewer.render({ attachments });\n });\n });\n\n pdfDocument\n .getMetadata()\n .then(({ info, metadata, contentDispositionFilename }) => {\n this.documentInfo = info;\n this.metadata = metadata;\n this.contentDispositionFilename = contentDispositionFilename;\n\n // Provides some basic debug information\n console.log(\n \"PDF \" +\n pdfDocument.fingerprint +\n \" [\" +\n info.PDFFormatVersion +\n \" \" +\n (info.Producer || \"-\").trim() +\n \" / \" +\n (info.Creator || \"-\").trim() +\n \"]\" +\n \" (PDF.js: \" +\n (version || \"-\") +\n (AppOptions.get(\"enableWebGL\") ? \" [WebGL]\" : \"\") +\n \")\"\n );\n\n let pdfTitle;\n\n const infoTitle = info && info[\"Title\"];\n if (infoTitle) {\n pdfTitle = infoTitle;\n }\n const metadataTitle = metadata && metadata.get(\"dc:title\");\n if (metadataTitle) {\n // Ghostscript can produce invalid 'dc:title' Metadata entries:\n // - The title may be \"Untitled\" (fixes bug 1031612).\n // - The title may contain incorrectly encoded characters, which thus\n // looks broken, hence we ignore the Metadata entry when it\n // contains characters from the Specials Unicode block\n // (fixes bug 1605526).\n if (\n metadataTitle !== \"Untitled\" &&\n !/[\\uFFF0-\\uFFFF]/g.test(metadataTitle)\n ) {\n pdfTitle = metadataTitle;\n }\n }\n\n if (pdfTitle) {\n this.setTitle(\n `${pdfTitle} - ${contentDispositionFilename || document.title}`\n );\n } else if (contentDispositionFilename) {\n this.setTitle(contentDispositionFilename);\n }\n\n if (info.IsAcroFormPresent) {\n console.warn(\"Warning: AcroForm/XFA is not supported\");\n this.fallback(UNSUPPORTED_FEATURES.forms);\n }\n\n if (\n typeof PDFJSDev === \"undefined\" ||\n PDFJSDev.test(\"MOZCENTRAL || GENERIC\")\n ) {\n // Telemetry labels must be C++ variable friendly.\n let versionId = \"other\";\n // Keep these in sync with mozilla central's Histograms.json.\n const KNOWN_VERSIONS = [\n \"1.0\",\n \"1.1\",\n \"1.2\",\n \"1.3\",\n \"1.4\",\n \"1.5\",\n \"1.6\",\n \"1.7\",\n \"1.8\",\n \"1.9\",\n \"2.0\",\n \"2.1\",\n \"2.2\",\n \"2.3\",\n ];\n if (KNOWN_VERSIONS.includes(info.PDFFormatVersion)) {\n versionId = `v${info.PDFFormatVersion.replace(\".\", \"_\")}`;\n }\n\n let generatorId = \"other\";\n // Keep these in sync with mozilla central's Histograms.json.\n const KNOWN_GENERATORS = [\n \"acrobat distiller\",\n \"acrobat pdfwriter\",\n \"adobe livecycle\",\n \"adobe pdf library\",\n \"adobe photoshop\",\n \"ghostscript\",\n \"tcpdf\",\n \"cairo\",\n \"dvipdfm\",\n \"dvips\",\n \"pdftex\",\n \"pdfkit\",\n \"itext\",\n \"prince\",\n \"quarkxpress\",\n \"mac os x\",\n \"microsoft\",\n \"openoffice\",\n \"oracle\",\n \"luradocument\",\n \"pdf-xchange\",\n \"antenna house\",\n \"aspose.cells\",\n \"fpdf\",\n ];\n if (info.Producer) {\n const producer = info.Producer.toLowerCase();\n KNOWN_GENERATORS.some(function(generator) {\n if (!producer.includes(generator)) {\n return false;\n }\n generatorId = generator.replace(/[ .\\-]/g, \"_\");\n return true;\n });\n }\n\n let formType = null;\n if (info.IsAcroFormPresent) {\n formType = info.IsXFAPresent ? \"xfa\" : \"acroform\";\n }\n this.externalServices.reportTelemetry({\n type: \"documentInfo\",\n version: versionId,\n generator: generatorId,\n formType,\n });\n }\n });\n },\n\n /**\n * @private\n */\n _initializePdfHistory({ fingerprint, viewOnLoad, initialDest = null }) {\n if (AppOptions.get(\"disableHistory\") || this.isViewerEmbedded) {\n // The browsing history is only enabled when the viewer is standalone,\n // i.e. not when it is embedded in a web page.\n return;\n }\n this.pdfHistory.initialize({\n fingerprint,\n resetHistory: viewOnLoad === ViewOnLoad.INITIAL,\n updateUrl: AppOptions.get(\"historyUpdateUrl\"),\n });\n\n if (this.pdfHistory.initialBookmark) {\n this.initialBookmark = this.pdfHistory.initialBookmark;\n\n this.initialRotation = this.pdfHistory.initialRotation;\n }\n\n // Always let the browser history/document hash take precedence.\n if (\n initialDest &&\n !this.initialBookmark &&\n viewOnLoad === ViewOnLoad.UNKNOWN\n ) {\n this.initialBookmark = JSON.stringify(initialDest);\n // TODO: Re-factor the `PDFHistory` initialization to remove this hack\n // that's currently necessary to prevent weird initial history state.\n this.pdfHistory.push({ explicitDest: initialDest, pageNumber: null });\n }\n },\n\n setInitialView(\n storedHash,\n { rotation, sidebarView, scrollMode, spreadMode } = {}\n ) {\n const setRotation = angle => {\n if (isValidRotation(angle)) {\n this.pdfViewer.pagesRotation = angle;\n }\n };\n const setViewerModes = (scroll, spread) => {\n if (isValidScrollMode(scroll)) {\n this.pdfViewer.scrollMode = scroll;\n }\n if (isValidSpreadMode(spread)) {\n this.pdfViewer.spreadMode = spread;\n }\n };\n this.isInitialViewSet = true;\n this.pdfSidebar.setInitialView(sidebarView);\n\n setViewerModes(scrollMode, spreadMode);\n\n if (this.initialBookmark) {\n setRotation(this.initialRotation);\n delete this.initialRotation;\n\n this.pdfLinkService.setHash(this.initialBookmark);\n this.initialBookmark = null;\n } else if (storedHash) {\n setRotation(rotation);\n\n this.pdfLinkService.setHash(storedHash);\n }\n\n // Ensure that the correct page number is displayed in the UI,\n // even if the active page didn't change during document load.\n this.toolbar.setPageNumber(\n this.pdfViewer.currentPageNumber,\n this.pdfViewer.currentPageLabel\n );\n this.secondaryToolbar.setPageNumber(this.pdfViewer.currentPageNumber);\n\n if (!this.pdfViewer.currentScaleValue) {\n // Scale was not initialized: invalid bookmark or scale was not specified.\n // Setting the default one.\n this.pdfViewer.currentScaleValue = DEFAULT_SCALE_VALUE;\n }\n },\n\n cleanup() {\n if (!this.pdfDocument) {\n return; // run cleanup when document is loaded\n }\n this.pdfViewer.cleanup();\n this.pdfThumbnailViewer.cleanup();\n\n // We don't want to remove fonts used by active page SVGs.\n if (this.pdfViewer.renderer !== RendererType.SVG) {\n this.pdfDocument.cleanup();\n }\n },\n\n forceRendering() {\n this.pdfRenderingQueue.printing = this.printing;\n this.pdfRenderingQueue.isThumbnailViewEnabled = this.pdfSidebar.isThumbnailViewVisible;\n this.pdfRenderingQueue.renderHighestPriority();\n },\n\n beforePrint() {\n if (this.printService) {\n // There is no way to suppress beforePrint/afterPrint events,\n // but PDFPrintService may generate double events -- this will ignore\n // the second event that will be coming from native window.print().\n return;\n }\n\n if (!this.supportsPrinting) {\n this.l10n\n .get(\n \"printing_not_supported\",\n null,\n \"Warning: Printing is not fully supported by this browser.\"\n )\n .then(printMessage => {\n this.error(printMessage);\n });\n return;\n }\n\n // The beforePrint is a sync method and we need to know layout before\n // returning from this method. Ensure that we can get sizes of the pages.\n if (!this.pdfViewer.pageViewsReady) {\n this.l10n\n .get(\n \"printing_not_ready\",\n null,\n \"Warning: The PDF is not fully loaded for printing.\"\n )\n .then(notReadyMessage => {\n window.alert(notReadyMessage);\n });\n return;\n }\n\n const pagesOverview = this.pdfViewer.getPagesOverview();\n const printContainer = this.appConfig.printContainer;\n const printService = PDFPrintServiceFactory.instance.createPrintService(\n this.pdfDocument,\n pagesOverview,\n printContainer,\n this.l10n\n );\n this.printService = printService;\n this.forceRendering();\n\n printService.layout();\n\n if (\n typeof PDFJSDev === \"undefined\" ||\n PDFJSDev.test(\"MOZCENTRAL || GENERIC\")\n ) {\n this.externalServices.reportTelemetry({\n type: \"print\",\n });\n }\n },\n\n afterPrint() {\n if (this.printService) {\n this.printService.destroy();\n this.printService = null;\n }\n this.forceRendering();\n },\n\n rotatePages(delta) {\n if (!this.pdfDocument) {\n return;\n }\n const newRotation = (this.pdfViewer.pagesRotation + 360 + delta) % 360;\n this.pdfViewer.pagesRotation = newRotation;\n // Note that the thumbnail viewer is updated, and rendering is triggered,\n // in the 'rotationchanging' event handler.\n },\n\n requestPresentationMode() {\n if (!this.pdfPresentationMode) {\n return;\n }\n this.pdfPresentationMode.request();\n },\n\n bindEvents() {\n const { eventBus, _boundEvents } = this;\n\n _boundEvents.beforePrint = this.beforePrint.bind(this);\n _boundEvents.afterPrint = this.afterPrint.bind(this);\n\n eventBus._on(\"resize\", webViewerResize);\n eventBus._on(\"hashchange\", webViewerHashchange);\n eventBus._on(\"beforeprint\", _boundEvents.beforePrint);\n eventBus._on(\"afterprint\", _boundEvents.afterPrint);\n eventBus._on(\"pagerendered\", webViewerPageRendered);\n eventBus._on(\"updateviewarea\", webViewerUpdateViewarea);\n eventBus._on(\"pagechanging\", webViewerPageChanging);\n eventBus._on(\"scalechanging\", webViewerScaleChanging);\n eventBus._on(\"rotationchanging\", webViewerRotationChanging);\n eventBus._on(\"sidebarviewchanged\", webViewerSidebarViewChanged);\n eventBus._on(\"pagemode\", webViewerPageMode);\n eventBus._on(\"namedaction\", webViewerNamedAction);\n eventBus._on(\"presentationmodechanged\", webViewerPresentationModeChanged);\n eventBus._on(\"presentationmode\", webViewerPresentationMode);\n eventBus._on(\"print\", webViewerPrint);\n eventBus._on(\"download\", webViewerDownload);\n eventBus._on(\"firstpage\", webViewerFirstPage);\n eventBus._on(\"lastpage\", webViewerLastPage);\n eventBus._on(\"nextpage\", webViewerNextPage);\n eventBus._on(\"previouspage\", webViewerPreviousPage);\n eventBus._on(\"zoomin\", webViewerZoomIn);\n eventBus._on(\"zoomout\", webViewerZoomOut);\n eventBus._on(\"zoomreset\", webViewerZoomReset);\n eventBus._on(\"pagenumberchanged\", webViewerPageNumberChanged);\n eventBus._on(\"scalechanged\", webViewerScaleChanged);\n eventBus._on(\"rotatecw\", webViewerRotateCw);\n eventBus._on(\"rotateccw\", webViewerRotateCcw);\n eventBus._on(\"switchscrollmode\", webViewerSwitchScrollMode);\n eventBus._on(\"scrollmodechanged\", webViewerScrollModeChanged);\n eventBus._on(\"switchspreadmode\", webViewerSwitchSpreadMode);\n eventBus._on(\"spreadmodechanged\", webViewerSpreadModeChanged);\n eventBus._on(\"documentproperties\", webViewerDocumentProperties);\n eventBus._on(\"find\", webViewerFind);\n eventBus._on(\"findfromurlhash\", webViewerFindFromUrlHash);\n eventBus._on(\"updatefindmatchescount\", webViewerUpdateFindMatchesCount);\n eventBus._on(\"updatefindcontrolstate\", webViewerUpdateFindControlState);\n if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) {\n eventBus._on(\"fileinputchange\", webViewerFileInputChange);\n eventBus._on(\"openfile\", webViewerOpenFile);\n }\n },\n\n bindWindowEvents() {\n const { eventBus, _boundEvents } = this;\n\n _boundEvents.windowResize = () => {\n eventBus.dispatch(\"resize\", { source: window });\n };\n _boundEvents.windowHashChange = () => {\n eventBus.dispatch(\"hashchange\", {\n source: window,\n hash: document.location.hash.substring(1),\n });\n };\n _boundEvents.windowBeforePrint = () => {\n eventBus.dispatch(\"beforeprint\", { source: window });\n };\n _boundEvents.windowAfterPrint = () => {\n eventBus.dispatch(\"afterprint\", { source: window });\n };\n\n window.addEventListener(\"visibilitychange\", webViewerVisibilityChange);\n window.addEventListener(\"wheel\", webViewerWheel, { passive: false });\n window.addEventListener(\"click\", webViewerClick);\n window.addEventListener(\"keydown\", webViewerKeyDown);\n window.addEventListener(\"resize\", _boundEvents.windowResize);\n window.addEventListener(\"hashchange\", _boundEvents.windowHashChange);\n window.addEventListener(\"beforeprint\", _boundEvents.windowBeforePrint);\n window.addEventListener(\"afterprint\", _boundEvents.windowAfterPrint);\n },\n\n unbindEvents() {\n const { eventBus, _boundEvents } = this;\n\n eventBus._off(\"resize\", webViewerResize);\n eventBus._off(\"hashchange\", webViewerHashchange);\n eventBus._off(\"beforeprint\", _boundEvents.beforePrint);\n eventBus._off(\"afterprint\", _boundEvents.afterPrint);\n eventBus._off(\"pagerendered\", webViewerPageRendered);\n eventBus._off(\"updateviewarea\", webViewerUpdateViewarea);\n eventBus._off(\"pagechanging\", webViewerPageChanging);\n eventBus._off(\"scalechanging\", webViewerScaleChanging);\n eventBus._off(\"rotationchanging\", webViewerRotationChanging);\n eventBus._off(\"sidebarviewchanged\", webViewerSidebarViewChanged);\n eventBus._off(\"pagemode\", webViewerPageMode);\n eventBus._off(\"namedaction\", webViewerNamedAction);\n eventBus._off(\"presentationmodechanged\", webViewerPresentationModeChanged);\n eventBus._off(\"presentationmode\", webViewerPresentationMode);\n eventBus._off(\"print\", webViewerPrint);\n eventBus._off(\"download\", webViewerDownload);\n eventBus._off(\"firstpage\", webViewerFirstPage);\n eventBus._off(\"lastpage\", webViewerLastPage);\n eventBus._off(\"nextpage\", webViewerNextPage);\n eventBus._off(\"previouspage\", webViewerPreviousPage);\n eventBus._off(\"zoomin\", webViewerZoomIn);\n eventBus._off(\"zoomout\", webViewerZoomOut);\n eventBus._off(\"zoomreset\", webViewerZoomReset);\n eventBus._off(\"pagenumberchanged\", webViewerPageNumberChanged);\n eventBus._off(\"scalechanged\", webViewerScaleChanged);\n eventBus._off(\"rotatecw\", webViewerRotateCw);\n eventBus._off(\"rotateccw\", webViewerRotateCcw);\n eventBus._off(\"switchscrollmode\", webViewerSwitchScrollMode);\n eventBus._off(\"scrollmodechanged\", webViewerScrollModeChanged);\n eventBus._off(\"switchspreadmode\", webViewerSwitchSpreadMode);\n eventBus._off(\"spreadmodechanged\", webViewerSpreadModeChanged);\n eventBus._off(\"documentproperties\", webViewerDocumentProperties);\n eventBus._off(\"find\", webViewerFind);\n eventBus._off(\"findfromurlhash\", webViewerFindFromUrlHash);\n eventBus._off(\"updatefindmatchescount\", webViewerUpdateFindMatchesCount);\n eventBus._off(\"updatefindcontrolstate\", webViewerUpdateFindControlState);\n if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) {\n eventBus._off(\"fileinputchange\", webViewerFileInputChange);\n eventBus._off(\"openfile\", webViewerOpenFile);\n }\n\n _boundEvents.beforePrint = null;\n _boundEvents.afterPrint = null;\n },\n\n unbindWindowEvents() {\n const { _boundEvents } = this;\n\n window.removeEventListener(\"visibilitychange\", webViewerVisibilityChange);\n window.removeEventListener(\"wheel\", webViewerWheel);\n window.removeEventListener(\"click\", webViewerClick);\n window.removeEventListener(\"keydown\", webViewerKeyDown);\n window.removeEventListener(\"resize\", _boundEvents.windowResize);\n window.removeEventListener(\"hashchange\", _boundEvents.windowHashChange);\n window.removeEventListener(\"beforeprint\", _boundEvents.windowBeforePrint);\n window.removeEventListener(\"afterprint\", _boundEvents.windowAfterPrint);\n\n _boundEvents.windowResize = null;\n _boundEvents.windowHashChange = null;\n _boundEvents.windowBeforePrint = null;\n _boundEvents.windowAfterPrint = null;\n },\n};\n\nlet validateFileURL;\nif (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) {\n const HOSTED_VIEWER_ORIGINS = [\n \"null\",\n \"http://mozilla.github.io\",\n \"https://mozilla.github.io\",\n ];\n validateFileURL = function(file) {\n if (file === undefined) {\n return;\n }\n try {\n const viewerOrigin = new URL(window.location.href).origin || \"null\";\n if (HOSTED_VIEWER_ORIGINS.includes(viewerOrigin)) {\n // Hosted or local viewer, allow for any file locations\n return;\n }\n const { origin, protocol } = new URL(file, window.location.href);\n // Removing of the following line will not guarantee that the viewer will\n // start accepting URLs from foreign origin -- CORS headers on the remote\n // server must be properly configured.\n // IE10 / IE11 does not include an origin in `blob:`-URLs. So don't block\n // any blob:-URL. The browser's same-origin policy will block requests to\n // blob:-URLs from other origins, so this is safe.\n if (origin !== viewerOrigin && protocol !== \"blob:\") {\n throw new Error(\"file origin does not match viewer's\");\n }\n } catch (ex) {\n const message = ex && ex.message;\n PDFViewerApplication.l10n\n .get(\"loading_error\", null, \"An error occurred while loading the PDF.\")\n .then(loadingErrorMessage => {\n PDFViewerApplication.error(loadingErrorMessage, { message });\n });\n throw ex;\n }\n };\n}\n\nasync function loadFakeWorker() {\n if (!GlobalWorkerOptions.workerSrc) {\n GlobalWorkerOptions.workerSrc = AppOptions.get(\"workerSrc\");\n }\n if (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"PRODUCTION\")) {\n if (typeof SystemJS !== \"object\") {\n throw new Error(\"SystemJS must be used to load fake worker.\");\n }\n window.pdfjsWorker = await SystemJS.import(\"pdfjs/core/worker.js\");\n return undefined;\n }\n return loadScript(PDFWorker.getWorkerSrc());\n}\n\nfunction loadAndEnablePDFBug(enabledTabs) {\n const appConfig = PDFViewerApplication.appConfig;\n return loadScript(appConfig.debuggerScriptPath).then(function() {\n PDFBug.enable(enabledTabs);\n PDFBug.init({ OPS }, appConfig.mainContainer);\n });\n}\n\nfunction webViewerInitialized() {\n const appConfig = PDFViewerApplication.appConfig;\n let file;\n if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) {\n const queryString = document.location.search.substring(1);\n const params = parseQueryString(queryString);\n file = \"file\" in params ? params.file : AppOptions.get(\"defaultUrl\");\n validateFileURL(file);\n } else if (PDFJSDev.test(\"MOZCENTRAL\")) {\n file = window.location.href.split(\"#\")[0];\n } else if (PDFJSDev.test(\"CHROME\")) {\n file = AppOptions.get(\"defaultUrl\");\n }\n\n if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) {\n const fileInput = document.createElement(\"input\");\n fileInput.id = appConfig.openFileInputName;\n fileInput.className = \"fileInput\";\n fileInput.setAttribute(\"type\", \"file\");\n fileInput.oncontextmenu = noContextMenuHandler;\n document.body.appendChild(fileInput);\n\n if (\n !window.File ||\n !window.FileReader ||\n !window.FileList ||\n !window.Blob\n ) {\n appConfig.toolbar.openFile.setAttribute(\"hidden\", \"true\");\n appConfig.secondaryToolbar.openFileButton.setAttribute(\"hidden\", \"true\");\n } else {\n fileInput.value = null;\n }\n\n fileInput.addEventListener(\"change\", function(evt) {\n const files = evt.target.files;\n if (!files || files.length === 0) {\n return;\n }\n PDFViewerApplication.eventBus.dispatch(\"fileinputchange\", {\n source: this,\n fileInput: evt.target,\n });\n });\n\n // Enable dragging-and-dropping a new PDF file onto the viewerContainer.\n appConfig.mainContainer.addEventListener(\"dragover\", function(evt) {\n evt.preventDefault();\n\n evt.dataTransfer.dropEffect = \"move\";\n });\n appConfig.mainContainer.addEventListener(\"drop\", function(evt) {\n evt.preventDefault();\n\n const files = evt.dataTransfer.files;\n if (!files || files.length === 0) {\n return;\n }\n PDFViewerApplication.eventBus.dispatch(\"fileinputchange\", {\n source: this,\n fileInput: evt.dataTransfer,\n });\n });\n } else {\n appConfig.toolbar.openFile.setAttribute(\"hidden\", \"true\");\n appConfig.secondaryToolbar.openFileButton.setAttribute(\"hidden\", \"true\");\n }\n\n if (\n (typeof PDFJSDev === \"undefined\" ||\n PDFJSDev.test(\"MOZCENTRAL || GENERIC\")) &&\n !PDFViewerApplication.supportsDocumentFonts\n ) {\n AppOptions.set(\"disableFontFace\", true);\n PDFViewerApplication.l10n\n .get(\n \"web_fonts_disabled\",\n null,\n \"Web fonts are disabled: unable to use embedded PDF fonts.\"\n )\n .then(msg => {\n console.warn(msg);\n });\n }\n\n if (!PDFViewerApplication.supportsPrinting) {\n appConfig.toolbar.print.classList.add(\"hidden\");\n appConfig.secondaryToolbar.printButton.classList.add(\"hidden\");\n }\n\n if (!PDFViewerApplication.supportsFullscreen) {\n appConfig.toolbar.presentationModeButton.classList.add(\"hidden\");\n appConfig.secondaryToolbar.presentationModeButton.classList.add(\"hidden\");\n }\n\n if (PDFViewerApplication.supportsIntegratedFind) {\n appConfig.toolbar.viewFind.classList.add(\"hidden\");\n }\n\n appConfig.mainContainer.addEventListener(\n \"transitionend\",\n function(evt) {\n if (evt.target === /* mainContainer */ this) {\n PDFViewerApplication.eventBus.dispatch(\"resize\", { source: this });\n }\n },\n true\n );\n\n try {\n webViewerOpenFileViaURL(file);\n } catch (reason) {\n PDFViewerApplication.l10n\n .get(\"loading_error\", null, \"An error occurred while loading the PDF.\")\n .then(msg => {\n PDFViewerApplication.error(msg, reason);\n });\n }\n}\n\nlet webViewerOpenFileViaURL;\nif (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) {\n webViewerOpenFileViaURL = function(file) {\n if (file && file.lastIndexOf(\"file:\", 0) === 0) {\n // file:-scheme. Load the contents in the main thread because QtWebKit\n // cannot load file:-URLs in a Web Worker. file:-URLs are usually loaded\n // very quickly, so there is no need to set up progress event listeners.\n PDFViewerApplication.setTitleUsingUrl(file);\n const xhr = new XMLHttpRequest();\n xhr.onload = function() {\n PDFViewerApplication.open(new Uint8Array(xhr.response));\n };\n xhr.open(\"GET\", file);\n xhr.responseType = \"arraybuffer\";\n xhr.send();\n return;\n }\n\n if (file) {\n PDFViewerApplication.open(file);\n }\n };\n} else if (PDFJSDev.test(\"MOZCENTRAL || CHROME\")) {\n webViewerOpenFileViaURL = function(file) {\n PDFViewerApplication.setTitleUsingUrl(file);\n PDFViewerApplication.initPassiveLoading();\n };\n} else {\n webViewerOpenFileViaURL = function(file) {\n if (file) {\n throw new Error(\"Not implemented: webViewerOpenFileViaURL\");\n }\n };\n}\n\nfunction webViewerPageRendered(evt) {\n const pageNumber = evt.pageNumber;\n const pageIndex = pageNumber - 1;\n const pageView = PDFViewerApplication.pdfViewer.getPageView(pageIndex);\n\n // If the page is still visible when it has finished rendering,\n // ensure that the page number input loading indicator is hidden.\n if (pageNumber === PDFViewerApplication.page) {\n PDFViewerApplication.toolbar.updateLoadingIndicatorState(false);\n }\n\n // Prevent errors in the edge-case where the PDF document is removed *before*\n // the 'pagerendered' event handler is invoked.\n if (!pageView) {\n return;\n }\n\n // Use the rendered page to set the corresponding thumbnail image.\n if (PDFViewerApplication.pdfSidebar.isThumbnailViewVisible) {\n const thumbnailView = PDFViewerApplication.pdfThumbnailViewer.getThumbnail(\n pageIndex\n );\n thumbnailView.setImage(pageView);\n }\n\n if (typeof Stats !== \"undefined\" && Stats.enabled && pageView.stats) {\n Stats.add(pageNumber, pageView.stats);\n }\n\n if (pageView.error) {\n PDFViewerApplication.l10n\n .get(\n \"rendering_error\",\n null,\n \"An error occurred while rendering the page.\"\n )\n .then(msg => {\n PDFViewerApplication.error(msg, pageView.error);\n });\n }\n\n if (\n typeof PDFJSDev === \"undefined\" ||\n PDFJSDev.test(\"MOZCENTRAL || GENERIC\")\n ) {\n PDFViewerApplication.externalServices.reportTelemetry({\n type: \"pageInfo\",\n timestamp: evt.timestamp,\n });\n // It is a good time to report stream and font types.\n PDFViewerApplication.pdfDocument.getStats().then(function(stats) {\n PDFViewerApplication.externalServices.reportTelemetry({\n type: \"documentStats\",\n stats,\n });\n });\n }\n}\n\nfunction webViewerPageMode({ mode }) {\n // Handle the 'pagemode' hash parameter, see also `PDFLinkService_setHash`.\n let view;\n switch (mode) {\n case \"thumbs\":\n view = SidebarView.THUMBS;\n break;\n case \"bookmarks\":\n case \"outline\":\n view = SidebarView.OUTLINE;\n break;\n case \"attachments\":\n view = SidebarView.ATTACHMENTS;\n break;\n case \"none\":\n view = SidebarView.NONE;\n break;\n default:\n console.error('Invalid \"pagemode\" hash parameter: ' + mode);\n return;\n }\n PDFViewerApplication.pdfSidebar.switchView(view, /* forceOpen = */ true);\n}\n\nfunction webViewerNamedAction(evt) {\n // Processing couple of named actions that might be useful.\n // See also PDFLinkService.executeNamedAction\n const action = evt.action;\n switch (action) {\n case \"GoToPage\":\n PDFViewerApplication.appConfig.toolbar.pageNumber.select();\n break;\n\n case \"Find\":\n if (!PDFViewerApplication.supportsIntegratedFind) {\n PDFViewerApplication.findBar.toggle();\n }\n break;\n }\n}\n\nfunction webViewerPresentationModeChanged({ active, switchInProgress }) {\n let state = PresentationModeState.NORMAL;\n if (switchInProgress) {\n state = PresentationModeState.CHANGING;\n } else if (active) {\n state = PresentationModeState.FULLSCREEN;\n }\n PDFViewerApplication.pdfViewer.presentationModeState = state;\n}\n\nfunction webViewerSidebarViewChanged(evt) {\n PDFViewerApplication.pdfRenderingQueue.isThumbnailViewEnabled =\n PDFViewerApplication.pdfSidebar.isThumbnailViewVisible;\n\n const store = PDFViewerApplication.store;\n if (store && PDFViewerApplication.isInitialViewSet) {\n // Only update the storage when the document has been loaded *and* rendered.\n store.set(\"sidebarView\", evt.view).catch(function() {});\n }\n}\n\nfunction webViewerUpdateViewarea(evt) {\n const location = evt.location,\n store = PDFViewerApplication.store;\n\n if (store && PDFViewerApplication.isInitialViewSet) {\n store\n .setMultiple({\n page: location.pageNumber,\n zoom: location.scale,\n scrollLeft: location.left,\n scrollTop: location.top,\n rotation: location.rotation,\n })\n .catch(function() {\n /* unable to write to storage */\n });\n }\n const href = PDFViewerApplication.pdfLinkService.getAnchorUrl(\n location.pdfOpenParams\n );\n PDFViewerApplication.appConfig.toolbar.viewBookmark.href = href;\n PDFViewerApplication.appConfig.secondaryToolbar.viewBookmarkButton.href = href;\n\n // Show/hide the loading indicator in the page number input element.\n const currentPage = PDFViewerApplication.pdfViewer.getPageView(\n PDFViewerApplication.page - 1\n );\n const loading = currentPage.renderingState !== RenderingStates.FINISHED;\n PDFViewerApplication.toolbar.updateLoadingIndicatorState(loading);\n}\n\nfunction webViewerScrollModeChanged(evt) {\n const store = PDFViewerApplication.store;\n if (store && PDFViewerApplication.isInitialViewSet) {\n // Only update the storage when the document has been loaded *and* rendered.\n store.set(\"scrollMode\", evt.mode).catch(function() {});\n }\n}\n\nfunction webViewerSpreadModeChanged(evt) {\n const store = PDFViewerApplication.store;\n if (store && PDFViewerApplication.isInitialViewSet) {\n // Only update the storage when the document has been loaded *and* rendered.\n store.set(\"spreadMode\", evt.mode).catch(function() {});\n }\n}\n\nfunction webViewerResize() {\n const { pdfDocument, pdfViewer } = PDFViewerApplication;\n if (!pdfDocument) {\n return;\n }\n const currentScaleValue = pdfViewer.currentScaleValue;\n if (\n currentScaleValue === \"auto\" ||\n currentScaleValue === \"page-fit\" ||\n currentScaleValue === \"page-width\"\n ) {\n // Note: the scale is constant for 'page-actual'.\n pdfViewer.currentScaleValue = currentScaleValue;\n }\n pdfViewer.update();\n}\n\nfunction webViewerHashchange(evt) {\n const hash = evt.hash;\n if (!hash) {\n return;\n }\n if (!PDFViewerApplication.isInitialViewSet) {\n PDFViewerApplication.initialBookmark = hash;\n } else if (!PDFViewerApplication.pdfHistory.popStateInProgress) {\n PDFViewerApplication.pdfLinkService.setHash(hash);\n }\n}\n\nlet webViewerFileInputChange, webViewerOpenFile;\nif (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) {\n webViewerFileInputChange = function(evt) {\n if (\n PDFViewerApplication.pdfViewer &&\n PDFViewerApplication.pdfViewer.isInPresentationMode\n ) {\n return; // Opening a new PDF file isn't supported in Presentation Mode.\n }\n const file = evt.fileInput.files[0];\n\n if (URL.createObjectURL && !AppOptions.get(\"disableCreateObjectURL\")) {\n let url = URL.createObjectURL(file);\n if (file.name) {\n url = { url, originalUrl: file.name };\n }\n PDFViewerApplication.open(url);\n } else {\n PDFViewerApplication.setTitleUsingUrl(file.name);\n // Read the local file into a Uint8Array.\n const fileReader = new FileReader();\n fileReader.onload = function webViewerChangeFileReaderOnload(event) {\n const buffer = event.target.result;\n PDFViewerApplication.open(new Uint8Array(buffer));\n };\n fileReader.readAsArrayBuffer(file);\n }\n\n // URL does not reflect proper document location - hiding some icons.\n const appConfig = PDFViewerApplication.appConfig;\n appConfig.toolbar.viewBookmark.setAttribute(\"hidden\", \"true\");\n appConfig.secondaryToolbar.viewBookmarkButton.setAttribute(\n \"hidden\",\n \"true\"\n );\n appConfig.toolbar.download.setAttribute(\"hidden\", \"true\");\n appConfig.secondaryToolbar.downloadButton.setAttribute(\"hidden\", \"true\");\n };\n\n webViewerOpenFile = function(evt) {\n const openFileInputName = PDFViewerApplication.appConfig.openFileInputName;\n document.getElementById(openFileInputName).click();\n };\n}\n\nfunction webViewerPresentationMode() {\n PDFViewerApplication.requestPresentationMode();\n}\nfunction webViewerPrint() {\n window.print();\n}\nfunction webViewerDownload() {\n PDFViewerApplication.download();\n}\nfunction webViewerFirstPage() {\n if (PDFViewerApplication.pdfDocument) {\n PDFViewerApplication.page = 1;\n }\n}\nfunction webViewerLastPage() {\n if (PDFViewerApplication.pdfDocument) {\n PDFViewerApplication.page = PDFViewerApplication.pagesCount;\n }\n}\nfunction webViewerNextPage() {\n PDFViewerApplication.page++;\n}\nfunction webViewerPreviousPage() {\n PDFViewerApplication.page--;\n}\nfunction webViewerZoomIn() {\n PDFViewerApplication.zoomIn();\n}\nfunction webViewerZoomOut() {\n PDFViewerApplication.zoomOut();\n}\nfunction webViewerZoomReset() {\n PDFViewerApplication.zoomReset();\n}\nfunction webViewerPageNumberChanged(evt) {\n const pdfViewer = PDFViewerApplication.pdfViewer;\n // Note that for `<input type=\"number\">` HTML elements, an empty string will\n // be returned for non-number inputs; hence we simply do nothing in that case.\n if (evt.value !== \"\") {\n pdfViewer.currentPageLabel = evt.value;\n }\n\n // Ensure that the page number input displays the correct value, even if the\n // value entered by the user was invalid (e.g. a floating point number).\n if (\n evt.value !== pdfViewer.currentPageNumber.toString() &&\n evt.value !== pdfViewer.currentPageLabel\n ) {\n PDFViewerApplication.toolbar.setPageNumber(\n pdfViewer.currentPageNumber,\n pdfViewer.currentPageLabel\n );\n }\n}\nfunction webViewerScaleChanged(evt) {\n PDFViewerApplication.pdfViewer.currentScaleValue = evt.value;\n}\nfunction webViewerRotateCw() {\n PDFViewerApplication.rotatePages(90);\n}\nfunction webViewerRotateCcw() {\n PDFViewerApplication.rotatePages(-90);\n}\nfunction webViewerSwitchScrollMode(evt) {\n PDFViewerApplication.pdfViewer.scrollMode = evt.mode;\n}\nfunction webViewerSwitchSpreadMode(evt) {\n PDFViewerApplication.pdfViewer.spreadMode = evt.mode;\n}\nfunction webViewerDocumentProperties() {\n PDFViewerApplication.pdfDocumentProperties.open();\n}\n\nfunction webViewerFind(evt) {\n PDFViewerApplication.findController.executeCommand(\"find\" + evt.type, {\n query: evt.query,\n phraseSearch: evt.phraseSearch,\n caseSensitive: evt.caseSensitive,\n entireWord: evt.entireWord,\n highlightAll: evt.highlightAll,\n findPrevious: evt.findPrevious,\n });\n}\n\nfunction webViewerFindFromUrlHash(evt) {\n PDFViewerApplication.findController.executeCommand(\"find\", {\n query: evt.query,\n phraseSearch: evt.phraseSearch,\n caseSensitive: false,\n entireWord: false,\n highlightAll: true,\n findPrevious: false,\n });\n}\n\nfunction webViewerUpdateFindMatchesCount({ matchesCount }) {\n if (PDFViewerApplication.supportsIntegratedFind) {\n PDFViewerApplication.externalServices.updateFindMatchesCount(matchesCount);\n } else {\n PDFViewerApplication.findBar.updateResultsCount(matchesCount);\n }\n}\n\nfunction webViewerUpdateFindControlState({ state, previous, matchesCount }) {\n if (PDFViewerApplication.supportsIntegratedFind) {\n PDFViewerApplication.externalServices.updateFindControlState({\n result: state,\n findPrevious: previous,\n matchesCount,\n });\n } else {\n PDFViewerApplication.findBar.updateUIState(state, previous, matchesCount);\n }\n}\n\nfunction webViewerScaleChanging(evt) {\n PDFViewerApplication.toolbar.setPageScale(evt.presetValue, evt.scale);\n\n PDFViewerApplication.pdfViewer.update();\n}\n\nfunction webViewerRotationChanging(evt) {\n PDFViewerApplication.pdfThumbnailViewer.pagesRotation = evt.pagesRotation;\n\n PDFViewerApplication.forceRendering();\n // Ensure that the active page doesn't change during rotation.\n PDFViewerApplication.pdfViewer.currentPageNumber = evt.pageNumber;\n}\n\nfunction webViewerPageChanging(evt) {\n const page = evt.pageNumber;\n\n PDFViewerApplication.toolbar.setPageNumber(page, evt.pageLabel || null);\n PDFViewerApplication.secondaryToolbar.setPageNumber(page);\n\n if (PDFViewerApplication.pdfSidebar.isThumbnailViewVisible) {\n PDFViewerApplication.pdfThumbnailViewer.scrollThumbnailIntoView(page);\n }\n\n // We need to update stats.\n if (typeof Stats !== \"undefined\" && Stats.enabled) {\n const pageView = PDFViewerApplication.pdfViewer.getPageView(page - 1);\n if (pageView && pageView.stats) {\n Stats.add(page, pageView.stats);\n }\n }\n}\n\nfunction webViewerVisibilityChange(evt) {\n if (document.visibilityState === \"visible\") {\n // Ignore mouse wheel zooming during tab switches (bug 1503412).\n setZoomDisabledTimeout();\n }\n}\n\nlet zoomDisabledTimeout = null;\nfunction setZoomDisabledTimeout() {\n if (zoomDisabledTimeout) {\n clearTimeout(zoomDisabledTimeout);\n }\n zoomDisabledTimeout = setTimeout(function() {\n zoomDisabledTimeout = null;\n }, WHEEL_ZOOM_DISABLED_TIMEOUT);\n}\n\nfunction webViewerWheel(evt) {\n const {\n pdfViewer,\n supportedMouseWheelZoomModifierKeys,\n } = PDFViewerApplication;\n\n if (pdfViewer.isInPresentationMode) {\n return;\n }\n\n if (\n (evt.ctrlKey && supportedMouseWheelZoomModifierKeys.ctrlKey) ||\n (evt.metaKey && supportedMouseWheelZoomModifierKeys.metaKey)\n ) {\n // Only zoom the pages, not the entire viewer.\n evt.preventDefault();\n // NOTE: this check must be placed *after* preventDefault.\n if (zoomDisabledTimeout || document.visibilityState === \"hidden\") {\n return;\n }\n\n const previousScale = pdfViewer.currentScale;\n\n const delta = normalizeWheelEventDelta(evt);\n\n const MOUSE_WHEEL_DELTA_PER_PAGE_SCALE = 3.0;\n const ticks = delta * MOUSE_WHEEL_DELTA_PER_PAGE_SCALE;\n if (ticks < 0) {\n PDFViewerApplication.zoomOut(-ticks);\n } else {\n PDFViewerApplication.zoomIn(ticks);\n }\n\n const currentScale = pdfViewer.currentScale;\n if (previousScale !== currentScale) {\n // After scaling the page via zoomIn/zoomOut, the position of the upper-\n // left corner is restored. When the mouse wheel is used, the position\n // under the cursor should be restored instead.\n const scaleCorrectionFactor = currentScale / previousScale - 1;\n const rect = pdfViewer.container.getBoundingClientRect();\n const dx = evt.clientX - rect.left;\n const dy = evt.clientY - rect.top;\n pdfViewer.container.scrollLeft += dx * scaleCorrectionFactor;\n pdfViewer.container.scrollTop += dy * scaleCorrectionFactor;\n }\n } else {\n setZoomDisabledTimeout();\n }\n}\n\nfunction webViewerClick(evt) {\n if (!PDFViewerApplication.secondaryToolbar.isOpen) {\n return;\n }\n const appConfig = PDFViewerApplication.appConfig;\n if (\n PDFViewerApplication.pdfViewer.containsElement(evt.target) ||\n (appConfig.toolbar.container.contains(evt.target) &&\n evt.target !== appConfig.secondaryToolbar.toggleButton)\n ) {\n PDFViewerApplication.secondaryToolbar.close();\n }\n}\n\nfunction webViewerKeyDown(evt) {\n if (PDFViewerApplication.overlayManager.active) {\n return;\n }\n\n let handled = false,\n ensureViewerFocused = false;\n const cmd =\n (evt.ctrlKey ? 1 : 0) |\n (evt.altKey ? 2 : 0) |\n (evt.shiftKey ? 4 : 0) |\n (evt.metaKey ? 8 : 0);\n\n const pdfViewer = PDFViewerApplication.pdfViewer;\n const isViewerInPresentationMode =\n pdfViewer && pdfViewer.isInPresentationMode;\n\n // First, handle the key bindings that are independent whether an input\n // control is selected or not.\n if (cmd === 1 || cmd === 8 || cmd === 5 || cmd === 12) {\n // either CTRL or META key with optional SHIFT.\n switch (evt.keyCode) {\n case 70: // f\n if (!PDFViewerApplication.supportsIntegratedFind) {\n PDFViewerApplication.findBar.open();\n handled = true;\n }\n break;\n case 71: // g\n if (!PDFViewerApplication.supportsIntegratedFind) {\n const findState = PDFViewerApplication.findController.state;\n if (findState) {\n PDFViewerApplication.findController.executeCommand(\"findagain\", {\n query: findState.query,\n phraseSearch: findState.phraseSearch,\n caseSensitive: findState.caseSensitive,\n entireWord: findState.entireWord,\n highlightAll: findState.highlightAll,\n findPrevious: cmd === 5 || cmd === 12,\n });\n }\n handled = true;\n }\n break;\n case 61: // FF/Mac '='\n case 107: // FF '+' and '='\n case 187: // Chrome '+'\n case 171: // FF with German keyboard\n if (!isViewerInPresentationMode) {\n PDFViewerApplication.zoomIn();\n }\n handled = true;\n break;\n case 173: // FF/Mac '-'\n case 109: // FF '-'\n case 189: // Chrome '-'\n if (!isViewerInPresentationMode) {\n PDFViewerApplication.zoomOut();\n }\n handled = true;\n break;\n case 48: // '0'\n case 96: // '0' on Numpad of Swedish keyboard\n if (!isViewerInPresentationMode) {\n // keeping it unhandled (to restore page zoom to 100%)\n setTimeout(function() {\n // ... and resetting the scale after browser adjusts its scale\n PDFViewerApplication.zoomReset();\n });\n handled = false;\n }\n break;\n\n case 38: // up arrow\n if (isViewerInPresentationMode || PDFViewerApplication.page > 1) {\n PDFViewerApplication.page = 1;\n handled = true;\n ensureViewerFocused = true;\n }\n break;\n case 40: // down arrow\n if (\n isViewerInPresentationMode ||\n PDFViewerApplication.page < PDFViewerApplication.pagesCount\n ) {\n PDFViewerApplication.page = PDFViewerApplication.pagesCount;\n handled = true;\n ensureViewerFocused = true;\n }\n break;\n }\n }\n\n if (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"MOZCENTRAL\")) {\n // CTRL or META without shift\n if (cmd === 1 || cmd === 8) {\n switch (evt.keyCode) {\n case 83: // s\n PDFViewerApplication.download();\n handled = true;\n break;\n }\n }\n }\n\n // CTRL+ALT or Option+Command\n if (cmd === 3 || cmd === 10) {\n switch (evt.keyCode) {\n case 80: // p\n PDFViewerApplication.requestPresentationMode();\n handled = true;\n break;\n case 71: // g\n // focuses input#pageNumber field\n PDFViewerApplication.appConfig.toolbar.pageNumber.select();\n handled = true;\n break;\n }\n }\n\n if (handled) {\n if (ensureViewerFocused && !isViewerInPresentationMode) {\n pdfViewer.focus();\n }\n evt.preventDefault();\n return;\n }\n\n // Some shortcuts should not get handled if a control/input element\n // is selected.\n const curElement = document.activeElement || document.querySelector(\":focus\");\n const curElementTagName = curElement && curElement.tagName.toUpperCase();\n if (\n curElementTagName === \"INPUT\" ||\n curElementTagName === \"TEXTAREA\" ||\n curElementTagName === \"SELECT\" ||\n (curElement && curElement.isContentEditable)\n ) {\n // Make sure that the secondary toolbar is closed when Escape is pressed.\n if (evt.keyCode !== /* Esc = */ 27) {\n return;\n }\n }\n\n // No control key pressed at all.\n if (cmd === 0) {\n let turnPage = 0,\n turnOnlyIfPageFit = false;\n switch (evt.keyCode) {\n case 38: // up arrow\n case 33: // pg up\n // vertical scrolling using arrow/pg keys\n if (pdfViewer.isVerticalScrollbarEnabled) {\n turnOnlyIfPageFit = true;\n }\n turnPage = -1;\n break;\n case 8: // backspace\n if (!isViewerInPresentationMode) {\n turnOnlyIfPageFit = true;\n }\n turnPage = -1;\n break;\n case 37: // left arrow\n // horizontal scrolling using arrow keys\n if (pdfViewer.isHorizontalScrollbarEnabled) {\n turnOnlyIfPageFit = true;\n }\n /* falls through */\n case 75: // 'k'\n case 80: // 'p'\n turnPage = -1;\n break;\n case 27: // esc key\n if (PDFViewerApplication.secondaryToolbar.isOpen) {\n PDFViewerApplication.secondaryToolbar.close();\n handled = true;\n }\n if (\n !PDFViewerApplication.supportsIntegratedFind &&\n PDFViewerApplication.findBar.opened\n ) {\n PDFViewerApplication.findBar.close();\n handled = true;\n }\n break;\n case 40: // down arrow\n case 34: // pg down\n // vertical scrolling using arrow/pg keys\n if (pdfViewer.isVerticalScrollbarEnabled) {\n turnOnlyIfPageFit = true;\n }\n turnPage = 1;\n break;\n case 13: // enter key\n case 32: // spacebar\n if (!isViewerInPresentationMode) {\n turnOnlyIfPageFit = true;\n }\n turnPage = 1;\n break;\n case 39: // right arrow\n // horizontal scrolling using arrow keys\n if (pdfViewer.isHorizontalScrollbarEnabled) {\n turnOnlyIfPageFit = true;\n }\n /* falls through */\n case 74: // 'j'\n case 78: // 'n'\n turnPage = 1;\n break;\n\n case 36: // home\n if (isViewerInPresentationMode || PDFViewerApplication.page > 1) {\n PDFViewerApplication.page = 1;\n handled = true;\n ensureViewerFocused = true;\n }\n break;\n case 35: // end\n if (\n isViewerInPresentationMode ||\n PDFViewerApplication.page < PDFViewerApplication.pagesCount\n ) {\n PDFViewerApplication.page = PDFViewerApplication.pagesCount;\n handled = true;\n ensureViewerFocused = true;\n }\n break;\n\n case 83: // 's'\n PDFViewerApplication.pdfCursorTools.switchTool(CursorTool.SELECT);\n break;\n case 72: // 'h'\n PDFViewerApplication.pdfCursorTools.switchTool(CursorTool.HAND);\n break;\n\n case 82: // 'r'\n PDFViewerApplication.rotatePages(90);\n break;\n\n case 115: // F4\n PDFViewerApplication.pdfSidebar.toggle();\n break;\n }\n\n if (\n turnPage !== 0 &&\n (!turnOnlyIfPageFit || pdfViewer.currentScaleValue === \"page-fit\")\n ) {\n if (turnPage > 0) {\n if (PDFViewerApplication.page < PDFViewerApplication.pagesCount) {\n PDFViewerApplication.page++;\n }\n } else {\n if (PDFViewerApplication.page > 1) {\n PDFViewerApplication.page--;\n }\n }\n handled = true;\n }\n }\n\n // shift-key\n if (cmd === 4) {\n switch (evt.keyCode) {\n case 13: // enter key\n case 32: // spacebar\n if (\n !isViewerInPresentationMode &&\n pdfViewer.currentScaleValue !== \"page-fit\"\n ) {\n break;\n }\n if (PDFViewerApplication.page > 1) {\n PDFViewerApplication.page--;\n }\n handled = true;\n break;\n\n case 82: // 'r'\n PDFViewerApplication.rotatePages(-90);\n break;\n }\n }\n\n if (!handled && !isViewerInPresentationMode) {\n // 33=Page Up 34=Page Down 35=End 36=Home\n // 37=Left 38=Up 39=Right 40=Down\n // 32=Spacebar\n if (\n (evt.keyCode >= 33 && evt.keyCode <= 40) ||\n (evt.keyCode === 32 && curElementTagName !== \"BUTTON\")\n ) {\n ensureViewerFocused = true;\n }\n }\n\n if (ensureViewerFocused && !pdfViewer.containsElement(curElement)) {\n // The page container is not focused, but a page navigation key has been\n // pressed. Change the focus to the viewer container to make sure that\n // navigation by keyboard works as expected.\n pdfViewer.focus();\n }\n\n if (handled) {\n evt.preventDefault();\n }\n}\n\n/**\n * Converts API PageLayout values to the format used by `PDFViewer`.\n * NOTE: This is supported to the extent that the viewer implements the\n * necessary Scroll/Spread modes (since SinglePage, TwoPageLeft,\n * and TwoPageRight all suggests using non-continuous scrolling).\n * @param {string} mode - The API PageLayout value.\n * @returns {number} A value from {SpreadMode}.\n */\nfunction apiPageLayoutToSpreadMode(layout) {\n switch (layout) {\n case \"SinglePage\":\n case \"OneColumn\":\n return SpreadMode.NONE;\n case \"TwoColumnLeft\":\n case \"TwoPageLeft\":\n return SpreadMode.ODD;\n case \"TwoColumnRight\":\n case \"TwoPageRight\":\n return SpreadMode.EVEN;\n }\n return SpreadMode.NONE; // Default value.\n}\n\n/**\n * Converts API PageMode values to the format used by `PDFSidebar`.\n * NOTE: There's also a \"FullScreen\" parameter which is not possible to support,\n * since the Fullscreen API used in browsers requires that entering\n * fullscreen mode only occurs as a result of a user-initiated event.\n * @param {string} mode - The API PageMode value.\n * @returns {number} A value from {SidebarView}.\n */\nfunction apiPageModeToSidebarView(mode) {\n switch (mode) {\n case \"UseNone\":\n return SidebarView.NONE;\n case \"UseThumbs\":\n return SidebarView.THUMBS;\n case \"UseOutlines\":\n return SidebarView.OUTLINE;\n case \"UseAttachments\":\n return SidebarView.ATTACHMENTS;\n case \"UseOC\":\n // Not implemented, since we don't support Optional Content Groups yet.\n }\n return SidebarView.NONE; // Default value.\n}\n\n/* Abstract factory for the print service. */\nconst PDFPrintServiceFactory = {\n instance: {\n supportsPrinting: false,\n createPrintService() {\n throw new Error(\"Not implemented: createPrintService\");\n },\n },\n};\n\nexport {\n PDFViewerApplication,\n DefaultExternalServices,\n PDFPrintServiceFactory,\n};\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst CSS_UNITS = 96.0 / 72.0;\nconst DEFAULT_SCALE_VALUE = \"auto\";\nconst DEFAULT_SCALE = 1.0;\nconst MIN_SCALE = 0.1;\nconst MAX_SCALE = 10.0;\nconst UNKNOWN_SCALE = 0;\nconst MAX_AUTO_SCALE = 1.25;\nconst SCROLLBAR_PADDING = 40;\nconst VERTICAL_PADDING = 5;\n\nconst PresentationModeState = {\n UNKNOWN: 0,\n NORMAL: 1,\n CHANGING: 2,\n FULLSCREEN: 3,\n};\n\nconst RendererType = {\n CANVAS: \"canvas\",\n SVG: \"svg\",\n};\n\nconst TextLayerMode = {\n DISABLE: 0,\n ENABLE: 1,\n ENABLE_ENHANCE: 2,\n};\n\nconst ScrollMode = {\n UNKNOWN: -1,\n VERTICAL: 0, // Default value.\n HORIZONTAL: 1,\n WRAPPED: 2,\n};\n\nconst SpreadMode = {\n UNKNOWN: -1,\n NONE: 0, // Default value.\n ODD: 1,\n EVEN: 2,\n};\n\n// Used by `PDFViewerApplication`, and by the API unit-tests.\nconst AutoPrintRegExp = /\\bprint\\s*\\(/;\n\n// Replaces {{arguments}} with their values.\nfunction formatL10nValue(text, args) {\n if (!args) {\n return text;\n }\n return text.replace(/\\{\\{\\s*(\\w+)\\s*\\}\\}/g, (all, name) => {\n return name in args ? args[name] : \"{{\" + name + \"}}\";\n });\n}\n\n/**\n * No-op implementation of the localization service.\n * @implements {IL10n}\n */\nconst NullL10n = {\n async getLanguage() {\n return \"en-us\";\n },\n\n async getDirection() {\n return \"ltr\";\n },\n\n async get(property, args, fallback) {\n return formatL10nValue(fallback, args);\n },\n\n async translate(element) {},\n};\n\n/**\n * Returns scale factor for the canvas. It makes sense for the HiDPI displays.\n * @returns {Object} The object with horizontal (sx) and vertical (sy)\n * scales. The scaled property is set to false if scaling is\n * not required, true otherwise.\n */\nfunction getOutputScale(ctx) {\n const devicePixelRatio = window.devicePixelRatio || 1;\n const backingStoreRatio =\n ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio ||\n 1;\n const pixelRatio = devicePixelRatio / backingStoreRatio;\n return {\n sx: pixelRatio,\n sy: pixelRatio,\n scaled: pixelRatio !== 1,\n };\n}\n\n/**\n * Scrolls specified element into view of its parent.\n * @param {Object} element - The element to be visible.\n * @param {Object} spot - An object with optional top and left properties,\n * specifying the offset from the top left edge.\n * @param {boolean} skipOverflowHiddenElements - Ignore elements that have\n * the CSS rule `overflow: hidden;` set. The default is false.\n */\nfunction scrollIntoView(element, spot, skipOverflowHiddenElements = false) {\n // Assuming offsetParent is available (it's not available when viewer is in\n // hidden iframe or object). We have to scroll: if the offsetParent is not set\n // producing the error. See also animationStarted.\n let parent = element.offsetParent;\n if (!parent) {\n console.error(\"offsetParent is not set -- cannot scroll\");\n return;\n }\n let offsetY = element.offsetTop + element.clientTop;\n let offsetX = element.offsetLeft + element.clientLeft;\n while (\n (parent.clientHeight === parent.scrollHeight &&\n parent.clientWidth === parent.scrollWidth) ||\n (skipOverflowHiddenElements &&\n getComputedStyle(parent).overflow === \"hidden\")\n ) {\n if (parent.dataset._scaleY) {\n offsetY /= parent.dataset._scaleY;\n offsetX /= parent.dataset._scaleX;\n }\n offsetY += parent.offsetTop;\n offsetX += parent.offsetLeft;\n parent = parent.offsetParent;\n if (!parent) {\n return; // no need to scroll\n }\n }\n if (spot) {\n if (spot.top !== undefined) {\n offsetY += spot.top;\n }\n if (spot.left !== undefined) {\n offsetX += spot.left;\n parent.scrollLeft = offsetX;\n }\n }\n parent.scrollTop = offsetY;\n}\n\n/**\n * Helper function to start monitoring the scroll event and converting them into\n * PDF.js friendly one: with scroll debounce and scroll direction.\n */\nfunction watchScroll(viewAreaElement, callback) {\n const debounceScroll = function(evt) {\n if (rAF) {\n return;\n }\n // schedule an invocation of scroll for next animation frame.\n rAF = window.requestAnimationFrame(function viewAreaElementScrolled() {\n rAF = null;\n\n const currentX = viewAreaElement.scrollLeft;\n const lastX = state.lastX;\n if (currentX !== lastX) {\n state.right = currentX > lastX;\n }\n state.lastX = currentX;\n const currentY = viewAreaElement.scrollTop;\n const lastY = state.lastY;\n if (currentY !== lastY) {\n state.down = currentY > lastY;\n }\n state.lastY = currentY;\n callback(state);\n });\n };\n\n const state = {\n right: true,\n down: true,\n lastX: viewAreaElement.scrollLeft,\n lastY: viewAreaElement.scrollTop,\n _eventHandler: debounceScroll,\n };\n\n let rAF = null;\n viewAreaElement.addEventListener(\"scroll\", debounceScroll, true);\n return state;\n}\n\n/**\n * Helper function to parse query string (e.g. ?param1=value&parm2=...).\n */\nfunction parseQueryString(query) {\n const parts = query.split(\"&\");\n const params = Object.create(null);\n for (let i = 0, ii = parts.length; i < ii; ++i) {\n const param = parts[i].split(\"=\");\n const key = param[0].toLowerCase();\n const value = param.length > 1 ? param[1] : null;\n params[decodeURIComponent(key)] = decodeURIComponent(value);\n }\n return params;\n}\n\n/**\n * Use binary search to find the index of the first item in a given array which\n * passes a given condition. The items are expected to be sorted in the sense\n * that if the condition is true for one item in the array, then it is also true\n * for all following items.\n *\n * @returns {number} Index of the first array element to pass the test,\n * or |items.length| if no such element exists.\n */\nfunction binarySearchFirstItem(items, condition) {\n let minIndex = 0;\n let maxIndex = items.length - 1;\n\n if (items.length === 0 || !condition(items[maxIndex])) {\n return items.length;\n }\n if (condition(items[minIndex])) {\n return minIndex;\n }\n\n while (minIndex < maxIndex) {\n const currentIndex = (minIndex + maxIndex) >> 1;\n const currentItem = items[currentIndex];\n if (condition(currentItem)) {\n maxIndex = currentIndex;\n } else {\n minIndex = currentIndex + 1;\n }\n }\n return minIndex; /* === maxIndex */\n}\n\n/**\n * Approximates float number as a fraction using Farey sequence (max order\n * of 8).\n * @param {number} x - Positive float number.\n * @returns {Array} Estimated fraction: the first array item is a numerator,\n * the second one is a denominator.\n */\nfunction approximateFraction(x) {\n // Fast paths for int numbers or their inversions.\n if (Math.floor(x) === x) {\n return [x, 1];\n }\n const xinv = 1 / x;\n const limit = 8;\n if (xinv > limit) {\n return [1, limit];\n } else if (Math.floor(xinv) === xinv) {\n return [1, xinv];\n }\n\n const x_ = x > 1 ? xinv : x;\n // a/b and c/d are neighbours in Farey sequence.\n let a = 0,\n b = 1,\n c = 1,\n d = 1;\n // Limiting search to order 8.\n while (true) {\n // Generating next term in sequence (order of q).\n const p = a + c,\n q = b + d;\n if (q > limit) {\n break;\n }\n if (x_ <= p / q) {\n c = p;\n d = q;\n } else {\n a = p;\n b = q;\n }\n }\n let result;\n // Select closest of the neighbours to x.\n if (x_ - a / b < c / d - x_) {\n result = x_ === x ? [a, b] : [b, a];\n } else {\n result = x_ === x ? [c, d] : [d, c];\n }\n return result;\n}\n\nfunction roundToDivide(x, div) {\n const r = x % div;\n return r === 0 ? x : Math.round(x - r + div);\n}\n\n/**\n * Gets the size of the specified page, converted from PDF units to inches.\n * @param {Object} An Object containing the properties: {Array} `view`,\n * {number} `userUnit`, and {number} `rotate`.\n * @returns {Object} An Object containing the properties: {number} `width`\n * and {number} `height`, given in inches.\n */\nfunction getPageSizeInches({ view, userUnit, rotate }) {\n const [x1, y1, x2, y2] = view;\n // We need to take the page rotation into account as well.\n const changeOrientation = rotate % 180 !== 0;\n\n const width = ((x2 - x1) / 72) * userUnit;\n const height = ((y2 - y1) / 72) * userUnit;\n\n return {\n width: changeOrientation ? height : width,\n height: changeOrientation ? width : height,\n };\n}\n\n/**\n * Helper function for getVisibleElements.\n *\n * @param {number} index - initial guess at the first visible element\n * @param {Array} views - array of pages, into which `index` is an index\n * @param {number} top - the top of the scroll pane\n * @returns {number} less than or equal to `index` that is definitely at or\n * before the first visible element in `views`, but not by too much. (Usually,\n * this will be the first element in the first partially visible row in\n * `views`, although sometimes it goes back one row further.)\n */\nfunction backtrackBeforeAllVisibleElements(index, views, top) {\n // binarySearchFirstItem's assumption is that the input is ordered, with only\n // one index where the conditions flips from false to true: [false ...,\n // true...]. With vertical scrolling and spreads, it is possible to have\n // [false ..., true, false, true ...]. With wrapped scrolling we can have a\n // similar sequence, with many more mixed true and false in the middle.\n //\n // So there is no guarantee that the binary search yields the index of the\n // first visible element. It could have been any of the other visible elements\n // that were preceded by a hidden element.\n\n // Of course, if either this element or the previous (hidden) element is also\n // the first element, there's nothing to worry about.\n if (index < 2) {\n return index;\n }\n\n // That aside, the possible cases are represented below.\n //\n // **** = fully hidden\n // A*B* = mix of partially visible and/or hidden pages\n // CDEF = fully visible\n //\n // (1) Binary search could have returned A, in which case we can stop.\n // (2) Binary search could also have returned B, in which case we need to\n // check the whole row.\n // (3) Binary search could also have returned C, in which case we need to\n // check the whole previous row.\n //\n // There's one other possibility:\n //\n // **** = fully hidden\n // ABCD = mix of fully and/or partially visible pages\n //\n // (4) Binary search could only have returned A.\n\n // Initially assume that we need to find the beginning of the current row\n // (case 1, 2, or 4), which means finding a page that is above the current\n // page's top. If the found page is partially visible, we're definitely not in\n // case 3, and this assumption is correct.\n let elt = views[index].div;\n let pageTop = elt.offsetTop + elt.clientTop;\n\n if (pageTop >= top) {\n // The found page is fully visible, so we're actually either in case 3 or 4,\n // and unfortunately we can't tell the difference between them without\n // scanning the entire previous row, so we just conservatively assume that\n // we do need to backtrack to that row. In both cases, the previous page is\n // in the previous row, so use its top instead.\n elt = views[index - 1].div;\n pageTop = elt.offsetTop + elt.clientTop;\n }\n\n // Now we backtrack to the first page that still has its bottom below\n // `pageTop`, which is the top of a page in the first visible row (unless\n // we're in case 4, in which case it's the row before that).\n // `index` is found by binary search, so the page at `index - 1` is\n // invisible and we can start looking for potentially visible pages from\n // `index - 2`. (However, if this loop terminates on its first iteration,\n // which is the case when pages are stacked vertically, `index` should remain\n // unchanged, so we use a distinct loop variable.)\n for (let i = index - 2; i >= 0; --i) {\n elt = views[i].div;\n if (elt.offsetTop + elt.clientTop + elt.clientHeight <= pageTop) {\n // We have reached the previous row, so stop now.\n // This loop is expected to terminate relatively quickly because the\n // number of pages per row is expected to be small.\n break;\n }\n index = i;\n }\n return index;\n}\n\n/**\n * Generic helper to find out what elements are visible within a scroll pane.\n *\n * Well, pretty generic. There are some assumptions placed on the elements\n * referenced by `views`:\n * - If `horizontal`, no left of any earlier element is to the right of the\n * left of any later element.\n * - Otherwise, `views` can be split into contiguous rows where, within a row,\n * no top of any element is below the bottom of any other element, and\n * between rows, no bottom of any element in an earlier row is below the\n * top of any element in a later row.\n *\n * (Here, top, left, etc. all refer to the padding edge of the element in\n * question. For pages, that ends up being equivalent to the bounding box of the\n * rendering canvas. Earlier and later refer to index in `views`, not page\n * layout.)\n *\n * @param scrollEl {HTMLElement} - a container that can possibly scroll\n * @param views {Array} - objects with a `div` property that contains an\n * HTMLElement, which should all be descendents of `scrollEl` satisfying the\n * above layout assumptions\n * @param sortByVisibility {boolean} - if true, the returned elements are sorted\n * in descending order of the percent of their padding box that is visible\n * @param horizontal {boolean} - if true, the elements are assumed to be laid\n * out horizontally instead of vertically\n * @returns {Object} `{ first, last, views: [{ id, x, y, view, percent }] }`\n */\nfunction getVisibleElements(\n scrollEl,\n views,\n sortByVisibility = false,\n horizontal = false\n) {\n const top = scrollEl.scrollTop,\n bottom = top + scrollEl.clientHeight;\n const left = scrollEl.scrollLeft,\n right = left + scrollEl.clientWidth;\n\n // Throughout this \"generic\" function, comments will assume we're working with\n // PDF document pages, which is the most important and complex case. In this\n // case, the visible elements we're actually interested is the page canvas,\n // which is contained in a wrapper which adds no padding/border/margin, which\n // is itself contained in `view.div` which adds no padding (but does add a\n // border). So, as specified in this function's doc comment, this function\n // does all of its work on the padding edge of the provided views, starting at\n // offsetLeft/Top (which includes margin) and adding clientLeft/Top (which is\n // the border). Adding clientWidth/Height gets us the bottom-right corner of\n // the padding edge.\n function isElementBottomAfterViewTop(view) {\n const element = view.div;\n const elementBottom =\n element.offsetTop + element.clientTop + element.clientHeight;\n return elementBottom > top;\n }\n function isElementRightAfterViewLeft(view) {\n const element = view.div;\n const elementRight =\n element.offsetLeft + element.clientLeft + element.clientWidth;\n return elementRight > left;\n }\n\n const visible = [],\n numViews = views.length;\n let firstVisibleElementInd =\n numViews === 0\n ? 0\n : binarySearchFirstItem(\n views,\n horizontal ? isElementRightAfterViewLeft : isElementBottomAfterViewTop\n );\n\n // Please note the return value of the `binarySearchFirstItem` function when\n // no valid element is found (hence the `firstVisibleElementInd` check below).\n if (\n firstVisibleElementInd > 0 &&\n firstVisibleElementInd < numViews &&\n !horizontal\n ) {\n // In wrapped scrolling (or vertical scrolling with spreads), with some page\n // sizes, isElementBottomAfterViewTop doesn't satisfy the binary search\n // condition: there can be pages with bottoms above the view top between\n // pages with bottoms below. This function detects and corrects that error;\n // see it for more comments.\n firstVisibleElementInd = backtrackBeforeAllVisibleElements(\n firstVisibleElementInd,\n views,\n top\n );\n }\n\n // lastEdge acts as a cutoff for us to stop looping, because we know all\n // subsequent pages will be hidden.\n //\n // When using wrapped scrolling or vertical scrolling with spreads, we can't\n // simply stop the first time we reach a page below the bottom of the view;\n // the tops of subsequent pages on the same row could still be visible. In\n // horizontal scrolling, we don't have that issue, so we can stop as soon as\n // we pass `right`, without needing the code below that handles the -1 case.\n let lastEdge = horizontal ? right : -1;\n\n for (let i = firstVisibleElementInd; i < numViews; i++) {\n const view = views[i],\n element = view.div;\n const currentWidth = element.offsetLeft + element.clientLeft;\n const currentHeight = element.offsetTop + element.clientTop;\n const viewWidth = element.clientWidth,\n viewHeight = element.clientHeight;\n const viewRight = currentWidth + viewWidth;\n const viewBottom = currentHeight + viewHeight;\n\n if (lastEdge === -1) {\n // As commented above, this is only needed in non-horizontal cases.\n // Setting lastEdge to the bottom of the first page that is partially\n // visible ensures that the next page fully below lastEdge is on the\n // next row, which has to be fully hidden along with all subsequent rows.\n if (viewBottom >= bottom) {\n lastEdge = viewBottom;\n }\n } else if ((horizontal ? currentWidth : currentHeight) > lastEdge) {\n break;\n }\n\n if (\n viewBottom <= top ||\n currentHeight >= bottom ||\n viewRight <= left ||\n currentWidth >= right\n ) {\n continue;\n }\n\n const hiddenHeight =\n Math.max(0, top - currentHeight) + Math.max(0, viewBottom - bottom);\n const hiddenWidth =\n Math.max(0, left - currentWidth) + Math.max(0, viewRight - right);\n const percent =\n (((viewHeight - hiddenHeight) * (viewWidth - hiddenWidth) * 100) /\n viewHeight /\n viewWidth) |\n 0;\n visible.push({\n id: view.id,\n x: currentWidth,\n y: currentHeight,\n view,\n percent,\n });\n }\n\n const first = visible[0],\n last = visible[visible.length - 1];\n\n if (sortByVisibility) {\n visible.sort(function(a, b) {\n const pc = a.percent - b.percent;\n if (Math.abs(pc) > 0.001) {\n return -pc;\n }\n return a.id - b.id; // ensure stability\n });\n }\n return { first, last, views: visible };\n}\n\n/**\n * Event handler to suppress context menu.\n */\nfunction noContextMenuHandler(evt) {\n evt.preventDefault();\n}\n\nfunction isDataSchema(url) {\n let i = 0;\n const ii = url.length;\n while (i < ii && url[i].trim() === \"\") {\n i++;\n }\n return url.substring(i, i + 5).toLowerCase() === \"data:\";\n}\n\n/**\n * Returns the filename or guessed filename from the url (see issue 3455).\n * @param {string} url - The original PDF location.\n * @param {string} defaultFilename - The value returned if the filename is\n * unknown, or the protocol is unsupported.\n * @returns {string} Guessed PDF filename.\n */\nfunction getPDFFileNameFromURL(url, defaultFilename = \"document.pdf\") {\n if (typeof url !== \"string\") {\n return defaultFilename;\n }\n if (isDataSchema(url)) {\n console.warn(\n \"getPDFFileNameFromURL: \" +\n 'ignoring \"data:\" URL for performance reasons.'\n );\n return defaultFilename;\n }\n const reURI = /^(?:(?:[^:]+:)?\\/\\/[^\\/]+)?([^?#]*)(\\?[^#]*)?(#.*)?$/;\n // SCHEME HOST 1.PATH 2.QUERY 3.REF\n // Pattern to get last matching NAME.pdf\n const reFilename = /[^\\/?#=]+\\.pdf\\b(?!.*\\.pdf\\b)/i;\n const splitURI = reURI.exec(url);\n let suggestedFilename =\n reFilename.exec(splitURI[1]) ||\n reFilename.exec(splitURI[2]) ||\n reFilename.exec(splitURI[3]);\n if (suggestedFilename) {\n suggestedFilename = suggestedFilename[0];\n if (suggestedFilename.includes(\"%\")) {\n // URL-encoded %2Fpath%2Fto%2Ffile.pdf should be file.pdf\n try {\n suggestedFilename = reFilename.exec(\n decodeURIComponent(suggestedFilename)\n )[0];\n } catch (ex) {\n // Possible (extremely rare) errors:\n // URIError \"Malformed URI\", e.g. for \"%AA.pdf\"\n // TypeError \"null has no properties\", e.g. for \"%2F.pdf\"\n }\n }\n }\n return suggestedFilename || defaultFilename;\n}\n\nfunction normalizeWheelEventDelta(evt) {\n let delta = Math.sqrt(evt.deltaX * evt.deltaX + evt.deltaY * evt.deltaY);\n const angle = Math.atan2(evt.deltaY, evt.deltaX);\n if (-0.25 * Math.PI < angle && angle < 0.75 * Math.PI) {\n // All that is left-up oriented has to change the sign.\n delta = -delta;\n }\n\n const MOUSE_DOM_DELTA_PIXEL_MODE = 0;\n const MOUSE_DOM_DELTA_LINE_MODE = 1;\n const MOUSE_PIXELS_PER_LINE = 30;\n const MOUSE_LINES_PER_PAGE = 30;\n\n // Converts delta to per-page units\n if (evt.deltaMode === MOUSE_DOM_DELTA_PIXEL_MODE) {\n delta /= MOUSE_PIXELS_PER_LINE * MOUSE_LINES_PER_PAGE;\n } else if (evt.deltaMode === MOUSE_DOM_DELTA_LINE_MODE) {\n delta /= MOUSE_LINES_PER_PAGE;\n }\n return delta;\n}\n\nfunction isValidRotation(angle) {\n return Number.isInteger(angle) && angle % 90 === 0;\n}\n\nfunction isValidScrollMode(mode) {\n return (\n Number.isInteger(mode) &&\n Object.values(ScrollMode).includes(mode) &&\n mode !== ScrollMode.UNKNOWN\n );\n}\n\nfunction isValidSpreadMode(mode) {\n return (\n Number.isInteger(mode) &&\n Object.values(SpreadMode).includes(mode) &&\n mode !== SpreadMode.UNKNOWN\n );\n}\n\nfunction isPortraitOrientation(size) {\n return size.width <= size.height;\n}\n\nconst WaitOnType = {\n EVENT: \"event\",\n TIMEOUT: \"timeout\",\n};\n\n/**\n * @typedef {Object} WaitOnEventOrTimeoutParameters\n * @property {Object} target - The event target, can for example be:\n * `window`, `document`, a DOM element, or an {EventBus} instance.\n * @property {string} name - The name of the event.\n * @property {number} delay - The delay, in milliseconds, after which the\n * timeout occurs (if the event wasn't already dispatched).\n */\n\n/**\n * Allows waiting for an event or a timeout, whichever occurs first.\n * Can be used to ensure that an action always occurs, even when an event\n * arrives late or not at all.\n *\n * @param {WaitOnEventOrTimeoutParameters}\n * @returns {Promise} A promise that is resolved with a {WaitOnType} value.\n */\nfunction waitOnEventOrTimeout({ target, name, delay = 0 }) {\n return new Promise(function(resolve, reject) {\n if (\n typeof target !== \"object\" ||\n !(name && typeof name === \"string\") ||\n !(Number.isInteger(delay) && delay >= 0)\n ) {\n throw new Error(\"waitOnEventOrTimeout - invalid parameters.\");\n }\n\n function handler(type) {\n if (target instanceof EventBus) {\n target._off(name, eventHandler);\n } else {\n target.removeEventListener(name, eventHandler);\n }\n\n if (timeout) {\n clearTimeout(timeout);\n }\n resolve(type);\n }\n\n const eventHandler = handler.bind(null, WaitOnType.EVENT);\n if (target instanceof EventBus) {\n target._on(name, eventHandler);\n } else {\n target.addEventListener(name, eventHandler);\n }\n\n const timeoutHandler = handler.bind(null, WaitOnType.TIMEOUT);\n const timeout = setTimeout(timeoutHandler, delay);\n });\n}\n\n/**\n * Promise that is resolved when DOM window becomes visible.\n */\nconst animationStarted = new Promise(function(resolve) {\n if (\n typeof PDFJSDev !== \"undefined\" &&\n PDFJSDev.test(\"LIB && TESTING\") &&\n typeof window === \"undefined\"\n ) {\n // Prevent \"ReferenceError: window is not defined\" errors when running the\n // unit-tests in Node.js/Travis.\n setTimeout(resolve, 20);\n return;\n }\n window.requestAnimationFrame(resolve);\n});\n\n/**\n * NOTE: Only used to support various PDF viewer tests in `mozilla-central`.\n */\nfunction dispatchDOMEvent(eventName, args = null) {\n const details = Object.create(null);\n if (args && args.length > 0) {\n const obj = args[0];\n for (const key in obj) {\n const value = obj[key];\n if (key === \"source\") {\n if (value === window || value === document) {\n return; // No need to re-dispatch (already) global events.\n }\n continue; // Ignore the `source` property.\n }\n details[key] = value;\n }\n }\n const event = document.createEvent(\"CustomEvent\");\n event.initCustomEvent(eventName, true, true, details);\n document.dispatchEvent(event);\n}\n\n/**\n * Simple event bus for an application. Listeners are attached using the `on`\n * and `off` methods. To raise an event, the `dispatch` method shall be used.\n */\nclass EventBus {\n constructor({ dispatchToDOM = false } = {}) {\n this._listeners = Object.create(null);\n this._dispatchToDOM = dispatchToDOM === true;\n\n if (\n typeof PDFJSDev !== \"undefined\" &&\n !PDFJSDev.test(\"MOZCENTRAL || TESTING\") &&\n dispatchToDOM\n ) {\n console.error(\n \"The `eventBusDispatchToDOM` option/preference is deprecated, \" +\n \"add event listeners to the EventBus instance rather than the DOM.\"\n );\n }\n }\n\n /**\n * @param {string} eventName\n * @param {function} listener\n */\n on(eventName, listener) {\n this._on(eventName, listener, { external: true });\n }\n\n /**\n * @param {string} eventName\n * @param {function} listener\n */\n off(eventName, listener) {\n this._off(eventName, listener, { external: true });\n }\n\n dispatch(eventName) {\n const eventListeners = this._listeners[eventName];\n if (!eventListeners || eventListeners.length === 0) {\n if (this._dispatchToDOM) {\n const args = Array.prototype.slice.call(arguments, 1);\n dispatchDOMEvent(eventName, args);\n }\n return;\n }\n // Passing all arguments after the eventName to the listeners.\n const args = Array.prototype.slice.call(arguments, 1);\n let externalListeners;\n // Making copy of the listeners array in case if it will be modified\n // during dispatch.\n eventListeners.slice(0).forEach(function({ listener, external }) {\n if (external) {\n if (!externalListeners) {\n externalListeners = [];\n }\n externalListeners.push(listener);\n return;\n }\n listener.apply(null, args);\n });\n // Dispatch any \"external\" listeners *after* the internal ones, to give the\n // viewer components time to handle events and update their state first.\n if (externalListeners) {\n externalListeners.forEach(function(listener) {\n listener.apply(null, args);\n });\n externalListeners = null;\n }\n if (this._dispatchToDOM) {\n dispatchDOMEvent(eventName, args);\n }\n }\n\n /**\n * @ignore\n */\n _on(eventName, listener, options = null) {\n let eventListeners = this._listeners[eventName];\n if (!eventListeners) {\n this._listeners[eventName] = eventListeners = [];\n }\n eventListeners.push({\n listener,\n external: (options && options.external) === true,\n });\n }\n\n /**\n * @ignore\n */\n _off(eventName, listener, options = null) {\n const eventListeners = this._listeners[eventName];\n if (!eventListeners) {\n return;\n }\n for (let i = 0, ii = eventListeners.length; i < ii; i++) {\n if (eventListeners[i].listener === listener) {\n eventListeners.splice(i, 1);\n return;\n }\n }\n }\n}\n\nlet globalEventBus = null;\nfunction getGlobalEventBus(dispatchToDOM = false) {\n console.error(\n \"getGlobalEventBus is deprecated, use a manually created EventBus instance instead.\"\n );\n if (!globalEventBus) {\n globalEventBus = new EventBus({ dispatchToDOM });\n }\n return globalEventBus;\n}\n\nfunction clamp(v, min, max) {\n return Math.min(Math.max(v, min), max);\n}\n\nclass ProgressBar {\n constructor(id, { height, width, units } = {}) {\n this.visible = true;\n\n // Fetch the sub-elements for later.\n this.div = document.querySelector(id + \" .progress\");\n // Get the loading bar element, so it can be resized to fit the viewer.\n this.bar = this.div.parentNode;\n\n // Get options, with sensible defaults.\n this.height = height || 100;\n this.width = width || 100;\n this.units = units || \"%\";\n\n // Initialize heights.\n this.div.style.height = this.height + this.units;\n this.percent = 0;\n }\n\n _updateBar() {\n if (this._indeterminate) {\n this.div.classList.add(\"indeterminate\");\n this.div.style.width = this.width + this.units;\n return;\n }\n\n this.div.classList.remove(\"indeterminate\");\n const progressSize = (this.width * this._percent) / 100;\n this.div.style.width = progressSize + this.units;\n }\n\n get percent() {\n return this._percent;\n }\n\n set percent(val) {\n this._indeterminate = isNaN(val);\n this._percent = clamp(val, 0, 100);\n this._updateBar();\n }\n\n setWidth(viewer) {\n if (!viewer) {\n return;\n }\n const container = viewer.parentNode;\n const scrollbarWidth = container.offsetWidth - viewer.offsetWidth;\n if (scrollbarWidth > 0) {\n this.bar.style.width = `calc(100% - ${scrollbarWidth}px)`;\n }\n }\n\n hide() {\n if (!this.visible) {\n return;\n }\n this.visible = false;\n this.bar.classList.add(\"hidden\");\n document.body.classList.remove(\"loadingInProgress\");\n }\n\n show() {\n if (this.visible) {\n return;\n }\n this.visible = true;\n document.body.classList.add(\"loadingInProgress\");\n this.bar.classList.remove(\"hidden\");\n }\n}\n\n/**\n * Moves all elements of an array that satisfy condition to the end of the\n * array, preserving the order of the rest.\n */\nfunction moveToEndOfArray(arr, condition) {\n const moved = [],\n len = arr.length;\n let write = 0;\n for (let read = 0; read < len; ++read) {\n if (condition(arr[read])) {\n moved.push(arr[read]);\n } else {\n arr[write] = arr[read];\n ++write;\n }\n }\n for (let read = 0; write < len; ++read, ++write) {\n arr[write] = moved[read];\n }\n}\n\nexport {\n AutoPrintRegExp,\n CSS_UNITS,\n DEFAULT_SCALE_VALUE,\n DEFAULT_SCALE,\n MIN_SCALE,\n MAX_SCALE,\n UNKNOWN_SCALE,\n MAX_AUTO_SCALE,\n SCROLLBAR_PADDING,\n VERTICAL_PADDING,\n isValidRotation,\n isValidScrollMode,\n isValidSpreadMode,\n isPortraitOrientation,\n PresentationModeState,\n RendererType,\n TextLayerMode,\n ScrollMode,\n SpreadMode,\n NullL10n,\n EventBus,\n getGlobalEventBus,\n clamp,\n ProgressBar,\n getPDFFileNameFromURL,\n noContextMenuHandler,\n parseQueryString,\n backtrackBeforeAllVisibleElements, // only exported for testing\n getVisibleElements,\n roundToDivide,\n getPageSizeInches,\n approximateFraction,\n getOutputScale,\n scrollIntoView,\n watchScroll,\n binarySearchFirstItem,\n normalizeWheelEventDelta,\n animationStarted,\n WaitOnType,\n waitOnEventOrTimeout,\n moveToEndOfArray,\n};\n","/* Copyright 2018 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { apiCompatibilityParams } from \"pdfjs-lib\";\nimport { viewerCompatibilityParams } from \"./viewer_compatibility.js\";\n\nconst OptionKind = {\n VIEWER: 0x02,\n API: 0x04,\n WORKER: 0x08,\n PREFERENCE: 0x80,\n};\n\n/**\n * PLEASE NOTE: To avoid introducing unnecessary dependencies, we specify the\n * values below *explicitly* rather than relying on imported types.\n */\nconst defaultOptions = {\n cursorToolOnLoad: {\n /** @type {number} */\n value: 0,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n defaultUrl: {\n /** @type {string} */\n value: \"compressed.tracemonkey-pldi-09.pdf\",\n kind: OptionKind.VIEWER,\n },\n defaultZoomValue: {\n /** @type {string} */\n value: \"\",\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n disableHistory: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.VIEWER,\n },\n disablePageLabels: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n /**\n * The `disablePreferences` is, conditionally, defined below.\n */\n enablePrintAutoRotate: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n enableWebGL: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n eventBusDispatchToDOM: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n externalLinkRel: {\n /** @type {string} */\n value: \"noopener noreferrer nofollow\",\n kind: OptionKind.VIEWER,\n },\n externalLinkTarget: {\n /** @type {number} */\n value: 0,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n historyUpdateUrl: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n ignoreDestinationZoom: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n imageResourcesPath: {\n /** @type {string} */\n value: \"./images/\",\n kind: OptionKind.VIEWER,\n },\n /**\n * The `locale` is, conditionally, defined below.\n */\n maxCanvasPixels: {\n /** @type {number} */\n value: 16777216,\n compatibility: viewerCompatibilityParams.maxCanvasPixels,\n kind: OptionKind.VIEWER,\n },\n pdfBugEnabled: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n /**\n * The `printResolution` is, conditionally, defined below.\n */\n renderer: {\n /** @type {string} */\n value: \"canvas\",\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n renderInteractiveForms: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n sidebarViewOnLoad: {\n /** @type {number} */\n value: -1,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n scrollModeOnLoad: {\n /** @type {number} */\n value: -1,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n spreadModeOnLoad: {\n /** @type {number} */\n value: -1,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n textLayerMode: {\n /** @type {number} */\n value: 1,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n useOnlyCssZoom: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n viewOnLoad: {\n /** @type {boolean} */\n value: 0,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n\n cMapPacked: {\n /** @type {boolean} */\n value: true,\n kind: OptionKind.API,\n },\n cMapUrl: {\n /** @type {string} */\n value:\n (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"PRODUCTION\")\n ? \"../external/bcmaps/\"\n : \"../web/cmaps/\"),\n kind: OptionKind.API,\n },\n disableAutoFetch: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.API + OptionKind.PREFERENCE,\n },\n disableCreateObjectURL: {\n /** @type {boolean} */\n value: false,\n compatibility: apiCompatibilityParams.disableCreateObjectURL,\n kind: OptionKind.API,\n },\n disableFontFace: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.API + OptionKind.PREFERENCE,\n },\n disableRange: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.API + OptionKind.PREFERENCE,\n },\n disableStream: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.API + OptionKind.PREFERENCE,\n },\n docBaseUrl: {\n /** @type {string} */\n value: \"\",\n kind: OptionKind.API,\n },\n isEvalSupported: {\n /** @type {boolean} */\n value: true,\n kind: OptionKind.API,\n },\n maxImageSize: {\n /** @type {number} */\n value: -1,\n kind: OptionKind.API,\n },\n pdfBug: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.API,\n },\n verbosity: {\n /** @type {number} */\n value: 1,\n kind: OptionKind.API,\n },\n\n workerPort: {\n /** @type {Object} */\n value: null,\n kind: OptionKind.WORKER,\n },\n workerSrc: {\n /** @type {string} */\n value:\n (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"PRODUCTION\")\n ? \"../src/worker_loader.js\"\n : \"../build/pdf.worker.js\"),\n kind: OptionKind.WORKER,\n },\n};\nif (\n typeof PDFJSDev === \"undefined\" ||\n PDFJSDev.test(\"!PRODUCTION || (GENERIC && !LIB)\")\n) {\n defaultOptions.disablePreferences = {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.VIEWER,\n };\n defaultOptions.locale = {\n /** @type {string} */\n value: (typeof navigator !== \"undefined\" ? navigator.language : \"en-US\"),\n kind: OptionKind.VIEWER,\n };\n defaultOptions.printResolution = {\n /** @type {number} */\n value: 150,\n kind: OptionKind.VIEWER,\n };\n}\n\nconst userOptions = Object.create(null);\n\nclass AppOptions {\n constructor() {\n throw new Error(\"Cannot initialize AppOptions.\");\n }\n\n static get(name) {\n const userOption = userOptions[name];\n if (userOption !== undefined) {\n return userOption;\n }\n const defaultOption = defaultOptions[name];\n if (defaultOption !== undefined) {\n return defaultOption.compatibility || defaultOption.value;\n }\n return undefined;\n }\n\n static getAll(kind = null) {\n const options = Object.create(null);\n for (const name in defaultOptions) {\n const defaultOption = defaultOptions[name];\n if (kind) {\n if ((kind & defaultOption.kind) === 0) {\n continue;\n }\n if (kind === OptionKind.PREFERENCE) {\n const value = defaultOption.value,\n valueType = typeof value;\n\n if (\n valueType === \"boolean\" ||\n valueType === \"string\" ||\n (valueType === \"number\" && Number.isInteger(value))\n ) {\n options[name] = value;\n continue;\n }\n throw new Error(`Invalid type for preference: ${name}`);\n }\n }\n const userOption = userOptions[name];\n options[name] =\n userOption !== undefined\n ? userOption\n : defaultOption.compatibility || defaultOption.value;\n }\n return options;\n }\n\n static set(name, value) {\n userOptions[name] = value;\n }\n\n static remove(name) {\n delete userOptions[name];\n }\n}\n\nexport { AppOptions, OptionKind };\n","/* Copyright 2016 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* globals module, __non_webpack_require__ */\n\n\"use strict\";\n\nlet pdfjsLib;\nif (typeof window !== \"undefined\" && window[\"pdfjs-dist/build/pdf\"]) {\n pdfjsLib = window[\"pdfjs-dist/build/pdf\"];\n} else {\n pdfjsLib = __non_webpack_require__(\"../build/pdf.js\");\n}\nmodule.exports = pdfjsLib;\n","/* Copyright 2018 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst compatibilityParams = Object.create(null);\nif (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) {\n const userAgent =\n (typeof navigator !== \"undefined\" && navigator.userAgent) || \"\";\n const platform =\n (typeof navigator !== \"undefined\" && navigator.platform) || \"\";\n const maxTouchPoints =\n (typeof navigator !== \"undefined\" && navigator.maxTouchPoints) || 1;\n\n const isAndroid = /Android/.test(userAgent);\n const isIOS =\n /\\b(iPad|iPhone|iPod)(?=;)/.test(userAgent) ||\n (platform === \"MacIntel\" && maxTouchPoints > 1);\n\n // Limit canvas size to 5 mega-pixels on mobile.\n // Support: Android, iOS\n (function checkCanvasSizeLimitation() {\n if (isIOS || isAndroid) {\n compatibilityParams.maxCanvasPixels = 5242880;\n }\n })();\n}\n\nexports.viewerCompatibilityParams = Object.freeze(compatibilityParams);\n","/* Copyright 2017 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { GrabToPan } from \"./grab_to_pan.js\";\n\nconst CursorTool = {\n SELECT: 0, // The default value.\n HAND: 1,\n ZOOM: 2,\n};\n\n/**\n * @typedef {Object} PDFCursorToolsOptions\n * @property {HTMLDivElement} container - The document container.\n * @property {EventBus} eventBus - The application event bus.\n * @property {number} [cursorToolOnLoad] - The cursor tool that will be enabled\n * on load; the constants from {CursorTool} should be used. The default value\n * is `CursorTool.SELECT`.\n */\n\nclass PDFCursorTools {\n /**\n * @param {PDFCursorToolsOptions} options\n */\n constructor({ container, eventBus, cursorToolOnLoad = CursorTool.SELECT }) {\n this.container = container;\n this.eventBus = eventBus;\n\n this.active = CursorTool.SELECT;\n this.activeBeforePresentationMode = null;\n\n this.handTool = new GrabToPan({\n element: this.container,\n });\n\n this._addEventListeners();\n\n // Defer the initial `switchTool` call, to give other viewer components\n // time to initialize *and* register 'cursortoolchanged' event listeners.\n Promise.resolve().then(() => {\n this.switchTool(cursorToolOnLoad);\n });\n }\n\n /**\n * @type {number} One of the values in {CursorTool}.\n */\n get activeTool() {\n return this.active;\n }\n\n /**\n * NOTE: This method is ignored while Presentation Mode is active.\n * @param {number} tool - The cursor mode that should be switched to,\n * must be one of the values in {CursorTool}.\n */\n switchTool(tool) {\n if (this.activeBeforePresentationMode !== null) {\n return; // Cursor tools cannot be used in Presentation Mode.\n }\n if (tool === this.active) {\n return; // The requested tool is already active.\n }\n\n const disableActiveTool = () => {\n switch (this.active) {\n case CursorTool.SELECT:\n break;\n case CursorTool.HAND:\n this.handTool.deactivate();\n break;\n case CursorTool.ZOOM:\n /* falls through */\n }\n };\n\n // Enable the new cursor tool.\n switch (tool) {\n case CursorTool.SELECT:\n disableActiveTool();\n break;\n case CursorTool.HAND:\n disableActiveTool();\n this.handTool.activate();\n break;\n case CursorTool.ZOOM:\n /* falls through */\n default:\n console.error(`switchTool: \"${tool}\" is an unsupported value.`);\n return;\n }\n // Update the active tool *after* it has been validated above,\n // in order to prevent setting it to an invalid state.\n this.active = tool;\n\n this._dispatchEvent();\n }\n\n /**\n * @private\n */\n _dispatchEvent() {\n this.eventBus.dispatch(\"cursortoolchanged\", {\n source: this,\n tool: this.active,\n });\n }\n\n /**\n * @private\n */\n _addEventListeners() {\n this.eventBus._on(\"switchcursortool\", evt => {\n this.switchTool(evt.tool);\n });\n\n this.eventBus._on(\"presentationmodechanged\", evt => {\n if (evt.switchInProgress) {\n return;\n }\n let previouslyActive;\n\n if (evt.active) {\n previouslyActive = this.active;\n\n this.switchTool(CursorTool.SELECT);\n this.activeBeforePresentationMode = previouslyActive;\n } else {\n previouslyActive = this.activeBeforePresentationMode;\n\n this.activeBeforePresentationMode = null;\n this.switchTool(previouslyActive);\n }\n });\n }\n}\n\nexport { CursorTool, PDFCursorTools };\n","/* Copyright 2013 Rob Wu <rob@robwu.nl>\n * https://github.com/Rob--W/grab-to-pan.js\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Construct a GrabToPan instance for a given HTML element.\n * @param options.element {Element}\n * @param options.ignoreTarget {function} optional. See `ignoreTarget(node)`\n * @param options.onActiveChanged {function(boolean)} optional. Called\n * when grab-to-pan is (de)activated. The first argument is a boolean that\n * shows whether grab-to-pan is activated.\n */\nfunction GrabToPan(options) {\n this.element = options.element;\n this.document = options.element.ownerDocument;\n if (typeof options.ignoreTarget === \"function\") {\n this.ignoreTarget = options.ignoreTarget;\n }\n this.onActiveChanged = options.onActiveChanged;\n\n // Bind the contexts to ensure that `this` always points to\n // the GrabToPan instance.\n this.activate = this.activate.bind(this);\n this.deactivate = this.deactivate.bind(this);\n this.toggle = this.toggle.bind(this);\n this._onmousedown = this._onmousedown.bind(this);\n this._onmousemove = this._onmousemove.bind(this);\n this._endPan = this._endPan.bind(this);\n\n // This overlay will be inserted in the document when the mouse moves during\n // a grab operation, to ensure that the cursor has the desired appearance.\n const overlay = (this.overlay = document.createElement(\"div\"));\n overlay.className = \"grab-to-pan-grabbing\";\n}\nGrabToPan.prototype = {\n /**\n * Class name of element which can be grabbed\n */\n CSS_CLASS_GRAB: \"grab-to-pan-grab\",\n\n /**\n * Bind a mousedown event to the element to enable grab-detection.\n */\n activate: function GrabToPan_activate() {\n if (!this.active) {\n this.active = true;\n this.element.addEventListener(\"mousedown\", this._onmousedown, true);\n this.element.classList.add(this.CSS_CLASS_GRAB);\n if (this.onActiveChanged) {\n this.onActiveChanged(true);\n }\n }\n },\n\n /**\n * Removes all events. Any pending pan session is immediately stopped.\n */\n deactivate: function GrabToPan_deactivate() {\n if (this.active) {\n this.active = false;\n this.element.removeEventListener(\"mousedown\", this._onmousedown, true);\n this._endPan();\n this.element.classList.remove(this.CSS_CLASS_GRAB);\n if (this.onActiveChanged) {\n this.onActiveChanged(false);\n }\n }\n },\n\n toggle: function GrabToPan_toggle() {\n if (this.active) {\n this.deactivate();\n } else {\n this.activate();\n }\n },\n\n /**\n * Whether to not pan if the target element is clicked.\n * Override this method to change the default behaviour.\n *\n * @param node {Element} The target of the event\n * @returns {boolean} Whether to not react to the click event.\n */\n ignoreTarget: function GrabToPan_ignoreTarget(node) {\n // Use matchesSelector to check whether the clicked element\n // is (a child of) an input element / link\n return node[matchesSelector](\n \"a[href], a[href] *, input, textarea, button, button *, select, option\"\n );\n },\n\n /**\n * @private\n */\n _onmousedown: function GrabToPan__onmousedown(event) {\n if (event.button !== 0 || this.ignoreTarget(event.target)) {\n return;\n }\n if (event.originalTarget) {\n try {\n // eslint-disable-next-line no-unused-expressions\n event.originalTarget.tagName;\n } catch (e) {\n // Mozilla-specific: element is a scrollbar (XUL element)\n return;\n }\n }\n\n this.scrollLeftStart = this.element.scrollLeft;\n this.scrollTopStart = this.element.scrollTop;\n this.clientXStart = event.clientX;\n this.clientYStart = event.clientY;\n this.document.addEventListener(\"mousemove\", this._onmousemove, true);\n this.document.addEventListener(\"mouseup\", this._endPan, true);\n // When a scroll event occurs before a mousemove, assume that the user\n // dragged a scrollbar (necessary for Opera Presto, Safari and IE)\n // (not needed for Chrome/Firefox)\n this.element.addEventListener(\"scroll\", this._endPan, true);\n event.preventDefault();\n event.stopPropagation();\n\n const focusedElement = document.activeElement;\n if (focusedElement && !focusedElement.contains(event.target)) {\n focusedElement.blur();\n }\n },\n\n /**\n * @private\n */\n _onmousemove: function GrabToPan__onmousemove(event) {\n this.element.removeEventListener(\"scroll\", this._endPan, true);\n if (isLeftMouseReleased(event)) {\n this._endPan();\n return;\n }\n const xDiff = event.clientX - this.clientXStart;\n const yDiff = event.clientY - this.clientYStart;\n const scrollTop = this.scrollTopStart - yDiff;\n const scrollLeft = this.scrollLeftStart - xDiff;\n if (this.element.scrollTo) {\n this.element.scrollTo({\n top: scrollTop,\n left: scrollLeft,\n behavior: \"instant\",\n });\n } else {\n this.element.scrollTop = scrollTop;\n this.element.scrollLeft = scrollLeft;\n }\n if (!this.overlay.parentNode) {\n document.body.appendChild(this.overlay);\n }\n },\n\n /**\n * @private\n */\n _endPan: function GrabToPan__endPan() {\n this.element.removeEventListener(\"scroll\", this._endPan, true);\n this.document.removeEventListener(\"mousemove\", this._onmousemove, true);\n this.document.removeEventListener(\"mouseup\", this._endPan, true);\n // Note: ChildNode.remove doesn't throw if the parentNode is undefined.\n this.overlay.remove();\n },\n};\n\n// Get the correct (vendor-prefixed) name of the matches method.\nlet matchesSelector;\n[\"webkitM\", \"mozM\", \"msM\", \"oM\", \"m\"].some(function(prefix) {\n let name = prefix + \"atches\";\n if (name in document.documentElement) {\n matchesSelector = name;\n }\n name += \"Selector\";\n if (name in document.documentElement) {\n matchesSelector = name;\n }\n return matchesSelector; // If found, then truthy, and [].some() ends.\n});\n\n// Browser sniffing because it's impossible to feature-detect\n// whether event.which for onmousemove is reliable\nconst isNotIEorIsIE10plus = !document.documentMode || document.documentMode > 9;\nconst chrome = window.chrome;\nconst isChrome15OrOpera15plus = chrome && (chrome.webstore || chrome.app);\n// ^ Chrome 15+ ^ Opera 15+\nconst isSafari6plus =\n /Apple/.test(navigator.vendor) &&\n /Version\\/([6-9]\\d*|[1-5]\\d+)/.test(navigator.userAgent);\n\n/**\n * Whether the left mouse is not pressed.\n * @param event {MouseEvent}\n * @returns {boolean} True if the left mouse button is not pressed,\n * False if unsure or if the left mouse button is pressed.\n */\nfunction isLeftMouseReleased(event) {\n if (\"buttons\" in event && isNotIEorIsIE10plus) {\n // http://www.w3.org/TR/DOM-Level-3-Events/#events-MouseEvent-buttons\n // Firefox 15+\n // Internet Explorer 10+\n return !(event.buttons & 1);\n }\n if (isChrome15OrOpera15plus || isSafari6plus) {\n // Chrome 14+\n // Opera 15+\n // Safari 6.0+\n return event.which === 0;\n }\n return false;\n}\n\nexport { GrabToPan };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst CLEANUP_TIMEOUT = 30000;\n\nconst RenderingStates = {\n INITIAL: 0,\n RUNNING: 1,\n PAUSED: 2,\n FINISHED: 3,\n};\n\n/**\n * Controls rendering of the views for pages and thumbnails.\n */\nclass PDFRenderingQueue {\n constructor() {\n this.pdfViewer = null;\n this.pdfThumbnailViewer = null;\n this.onIdle = null;\n this.highestPriorityPage = null;\n this.idleTimeout = null;\n this.printing = false;\n this.isThumbnailViewEnabled = false;\n }\n\n /**\n * @param {PDFViewer} pdfViewer\n */\n setViewer(pdfViewer) {\n this.pdfViewer = pdfViewer;\n }\n\n /**\n * @param {PDFThumbnailViewer} pdfThumbnailViewer\n */\n setThumbnailViewer(pdfThumbnailViewer) {\n this.pdfThumbnailViewer = pdfThumbnailViewer;\n }\n\n /**\n * @param {IRenderableView} view\n * @returns {boolean}\n */\n isHighestPriority(view) {\n return this.highestPriorityPage === view.renderingId;\n }\n\n /**\n * @param {Object} currentlyVisiblePages\n */\n renderHighestPriority(currentlyVisiblePages) {\n if (this.idleTimeout) {\n clearTimeout(this.idleTimeout);\n this.idleTimeout = null;\n }\n\n // Pages have a higher priority than thumbnails, so check them first.\n if (this.pdfViewer.forceRendering(currentlyVisiblePages)) {\n return;\n }\n // No pages needed rendering, so check thumbnails.\n if (this.pdfThumbnailViewer && this.isThumbnailViewEnabled) {\n if (this.pdfThumbnailViewer.forceRendering()) {\n return;\n }\n }\n\n if (this.printing) {\n // If printing is currently ongoing do not reschedule cleanup.\n return;\n }\n\n if (this.onIdle) {\n this.idleTimeout = setTimeout(this.onIdle.bind(this), CLEANUP_TIMEOUT);\n }\n }\n\n /**\n * @param {Object} visible\n * @param {Array} views\n * @param {boolean} scrolledDown\n */\n getHighestPriority(visible, views, scrolledDown) {\n /**\n * The state has changed. Figure out which page has the highest priority to\n * render next (if any).\n *\n * Priority:\n * 1. visible pages\n * 2. if last scrolled down, the page after the visible pages, or\n * if last scrolled up, the page before the visible pages\n */\n const visibleViews = visible.views;\n\n const numVisible = visibleViews.length;\n if (numVisible === 0) {\n return null;\n }\n for (let i = 0; i < numVisible; ++i) {\n const view = visibleViews[i].view;\n if (!this.isViewFinished(view)) {\n return view;\n }\n }\n\n // All the visible views have rendered; try to render next/previous pages.\n if (scrolledDown) {\n const nextPageIndex = visible.last.id;\n // IDs start at 1, so no need to add 1.\n if (views[nextPageIndex] && !this.isViewFinished(views[nextPageIndex])) {\n return views[nextPageIndex];\n }\n } else {\n const previousPageIndex = visible.first.id - 2;\n if (\n views[previousPageIndex] &&\n !this.isViewFinished(views[previousPageIndex])\n ) {\n return views[previousPageIndex];\n }\n }\n // Everything that needs to be rendered has been.\n return null;\n }\n\n /**\n * @param {IRenderableView} view\n * @returns {boolean}\n */\n isViewFinished(view) {\n return view.renderingState === RenderingStates.FINISHED;\n }\n\n /**\n * Render a page or thumbnail view. This calls the appropriate function\n * based on the views state. If the view is already rendered it will return\n * `false`.\n *\n * @param {IRenderableView} view\n */\n renderView(view) {\n switch (view.renderingState) {\n case RenderingStates.FINISHED:\n return false;\n case RenderingStates.PAUSED:\n this.highestPriorityPage = view.renderingId;\n view.resume();\n break;\n case RenderingStates.RUNNING:\n this.highestPriorityPage = view.renderingId;\n break;\n case RenderingStates.INITIAL:\n this.highestPriorityPage = view.renderingId;\n view\n .draw()\n .finally(() => {\n this.renderHighestPriority();\n })\n .catch(reason => {\n console.error(`renderView: \"${reason}\"`);\n });\n break;\n }\n return true;\n }\n}\n\nexport { RenderingStates, PDFRenderingQueue };\n","/* Copyright 2016 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { NullL10n } from \"./ui_utils.js\";\nimport { RenderingStates } from \"./pdf_rendering_queue.js\";\n\nconst UI_NOTIFICATION_CLASS = \"pdfSidebarNotification\";\n\nconst SidebarView = {\n UNKNOWN: -1,\n NONE: 0,\n THUMBS: 1, // Default value.\n OUTLINE: 2,\n ATTACHMENTS: 3,\n LAYERS: 4,\n};\n\n/**\n * @typedef {Object} PDFSidebarOptions\n * @property {PDFSidebarElements} elements - The DOM elements.\n * @property {PDFViewer} pdfViewer - The document viewer.\n * @property {PDFThumbnailViewer} pdfThumbnailViewer - The thumbnail viewer.\n * @property {EventBus} eventBus - The application event bus.\n * @property {IL10n} l10n - The localization service.\n * @property {boolean} [disableNotification] - Disable the notification for\n * documents containing outline/attachments. The default value is `false`.\n */\n\n/**\n * @typedef {Object} PDFSidebarElements\n * @property {HTMLDivElement} outerContainer - The outer container\n * (encasing both the viewer and sidebar elements).\n * @property {HTMLDivElement} viewerContainer - The viewer container\n * (in which the viewer element is placed).\n * @property {HTMLButtonElement} toggleButton - The button used for\n * opening/closing the sidebar.\n * @property {HTMLButtonElement} thumbnailButton - The button used to show\n * the thumbnail view.\n * @property {HTMLButtonElement} outlineButton - The button used to show\n * the outline view.\n * @property {HTMLButtonElement} attachmentsButton - The button used to show\n * the attachments view.\n * @property {HTMLDivElement} thumbnailView - The container in which\n * the thumbnails are placed.\n * @property {HTMLDivElement} outlineView - The container in which\n * the outline is placed.\n * @property {HTMLDivElement} attachmentsView - The container in which\n * the attachments are placed.\n */\n\nclass PDFSidebar {\n /**\n * @param {PDFSidebarOptions} options\n */\n constructor({\n elements,\n pdfViewer,\n pdfThumbnailViewer,\n eventBus,\n l10n = NullL10n,\n disableNotification = false,\n }) {\n this.isOpen = false;\n this.active = SidebarView.THUMBS;\n this.isInitialViewSet = false;\n\n /**\n * Callback used when the sidebar has been opened/closed, to ensure that\n * the viewers (PDFViewer/PDFThumbnailViewer) are updated correctly.\n */\n this.onToggled = null;\n\n this.pdfViewer = pdfViewer;\n this.pdfThumbnailViewer = pdfThumbnailViewer;\n\n this.outerContainer = elements.outerContainer;\n this.viewerContainer = elements.viewerContainer;\n this.toggleButton = elements.toggleButton;\n\n this.thumbnailButton = elements.thumbnailButton;\n this.outlineButton = elements.outlineButton;\n this.attachmentsButton = elements.attachmentsButton;\n\n this.thumbnailView = elements.thumbnailView;\n this.outlineView = elements.outlineView;\n this.attachmentsView = elements.attachmentsView;\n\n this.eventBus = eventBus;\n this.l10n = l10n;\n this._disableNotification = disableNotification;\n\n this._addEventListeners();\n }\n\n reset() {\n this.isInitialViewSet = false;\n\n this._hideUINotification(null);\n this.switchView(SidebarView.THUMBS);\n\n this.outlineButton.disabled = false;\n this.attachmentsButton.disabled = false;\n }\n\n /**\n * @type {number} One of the values in {SidebarView}.\n */\n get visibleView() {\n return this.isOpen ? this.active : SidebarView.NONE;\n }\n\n get isThumbnailViewVisible() {\n return this.isOpen && this.active === SidebarView.THUMBS;\n }\n\n get isOutlineViewVisible() {\n return this.isOpen && this.active === SidebarView.OUTLINE;\n }\n\n get isAttachmentsViewVisible() {\n return this.isOpen && this.active === SidebarView.ATTACHMENTS;\n }\n\n /**\n * @param {number} view - The sidebar view that should become visible,\n * must be one of the values in {SidebarView}.\n */\n setInitialView(view = SidebarView.NONE) {\n if (this.isInitialViewSet) {\n return;\n }\n this.isInitialViewSet = true;\n\n // If the user has already manually opened the sidebar, immediately closing\n // it would be bad UX; also ignore the \"unknown\" sidebar view value.\n if (view === SidebarView.NONE || view === SidebarView.UNKNOWN) {\n this._dispatchEvent();\n return;\n }\n // Prevent dispatching two back-to-back `sidebarviewchanged` events,\n // since `this._switchView` dispatched the event if the view changed.\n if (!this._switchView(view, /* forceOpen */ true)) {\n this._dispatchEvent();\n }\n }\n\n /**\n * @param {number} view - The sidebar view that should be switched to,\n * must be one of the values in {SidebarView}.\n * @param {boolean} [forceOpen] - Ensure that the sidebar is open.\n * The default value is `false`.\n */\n switchView(view, forceOpen = false) {\n this._switchView(view, forceOpen);\n }\n\n /**\n * @returns {boolean} Indicating if `this._dispatchEvent` was called.\n * @private\n */\n _switchView(view, forceOpen = false) {\n const isViewChanged = view !== this.active;\n let shouldForceRendering = false;\n\n switch (view) {\n case SidebarView.NONE:\n if (this.isOpen) {\n this.close();\n return true; // Closing will trigger rendering and dispatch the event.\n }\n return false;\n case SidebarView.THUMBS:\n if (this.isOpen && isViewChanged) {\n shouldForceRendering = true;\n }\n break;\n case SidebarView.OUTLINE:\n if (this.outlineButton.disabled) {\n return false;\n }\n break;\n case SidebarView.ATTACHMENTS:\n if (this.attachmentsButton.disabled) {\n return false;\n }\n break;\n default:\n console.error(`PDFSidebar._switchView: \"${view}\" is not a valid view.`);\n return false;\n }\n // Update the active view *after* it has been validated above,\n // in order to prevent setting it to an invalid state.\n this.active = view;\n\n // Update the CSS classes, for all buttons...\n this.thumbnailButton.classList.toggle(\n \"toggled\",\n view === SidebarView.THUMBS\n );\n this.outlineButton.classList.toggle(\n \"toggled\",\n view === SidebarView.OUTLINE\n );\n this.attachmentsButton.classList.toggle(\n \"toggled\",\n view === SidebarView.ATTACHMENTS\n );\n // ... and for all views.\n this.thumbnailView.classList.toggle(\"hidden\", view !== SidebarView.THUMBS);\n this.outlineView.classList.toggle(\"hidden\", view !== SidebarView.OUTLINE);\n this.attachmentsView.classList.toggle(\n \"hidden\",\n view !== SidebarView.ATTACHMENTS\n );\n\n if (forceOpen && !this.isOpen) {\n this.open();\n return true; // Opening will trigger rendering and dispatch the event.\n }\n if (shouldForceRendering) {\n this._updateThumbnailViewer();\n this._forceRendering();\n }\n if (isViewChanged) {\n this._dispatchEvent();\n }\n this._hideUINotification(this.active);\n return isViewChanged;\n }\n\n open() {\n if (this.isOpen) {\n return;\n }\n this.isOpen = true;\n this.toggleButton.classList.add(\"toggled\");\n\n this.outerContainer.classList.add(\"sidebarMoving\", \"sidebarOpen\");\n\n if (this.active === SidebarView.THUMBS) {\n this._updateThumbnailViewer();\n }\n this._forceRendering();\n this._dispatchEvent();\n\n this._hideUINotification(this.active);\n }\n\n close() {\n if (!this.isOpen) {\n return;\n }\n this.isOpen = false;\n this.toggleButton.classList.remove(\"toggled\");\n\n this.outerContainer.classList.add(\"sidebarMoving\");\n this.outerContainer.classList.remove(\"sidebarOpen\");\n\n this._forceRendering();\n this._dispatchEvent();\n }\n\n toggle() {\n if (this.isOpen) {\n this.close();\n } else {\n this.open();\n }\n }\n\n /**\n * @private\n */\n _dispatchEvent() {\n this.eventBus.dispatch(\"sidebarviewchanged\", {\n source: this,\n view: this.visibleView,\n });\n }\n\n /**\n * @private\n */\n _forceRendering() {\n if (this.onToggled) {\n this.onToggled();\n } else {\n // Fallback\n this.pdfViewer.forceRendering();\n this.pdfThumbnailViewer.forceRendering();\n }\n }\n\n /**\n * @private\n */\n _updateThumbnailViewer() {\n const { pdfViewer, pdfThumbnailViewer } = this;\n\n // Use the rendered pages to set the corresponding thumbnail images.\n const pagesCount = pdfViewer.pagesCount;\n for (let pageIndex = 0; pageIndex < pagesCount; pageIndex++) {\n const pageView = pdfViewer.getPageView(pageIndex);\n if (pageView && pageView.renderingState === RenderingStates.FINISHED) {\n const thumbnailView = pdfThumbnailViewer.getThumbnail(pageIndex);\n thumbnailView.setImage(pageView);\n }\n }\n pdfThumbnailViewer.scrollThumbnailIntoView(pdfViewer.currentPageNumber);\n }\n\n /**\n * @private\n */\n _showUINotification(view) {\n if (this._disableNotification) {\n return;\n }\n\n this.l10n\n .get(\n \"toggle_sidebar_notification.title\",\n null,\n \"Toggle Sidebar (document contains outline/attachments)\"\n )\n .then(msg => {\n this.toggleButton.title = msg;\n });\n\n if (!this.isOpen) {\n // Only show the notification on the `toggleButton` if the sidebar is\n // currently closed, to avoid unnecessarily bothering the user.\n this.toggleButton.classList.add(UI_NOTIFICATION_CLASS);\n } else if (view === this.active) {\n // If the sidebar is currently open *and* the `view` is visible, do not\n // bother the user with a notification on the corresponding button.\n return;\n }\n\n switch (view) {\n case SidebarView.OUTLINE:\n this.outlineButton.classList.add(UI_NOTIFICATION_CLASS);\n break;\n case SidebarView.ATTACHMENTS:\n this.attachmentsButton.classList.add(UI_NOTIFICATION_CLASS);\n break;\n }\n }\n\n /**\n * @private\n */\n _hideUINotification(view) {\n if (this._disableNotification) {\n return;\n }\n\n const removeNotification = sidebarView => {\n switch (sidebarView) {\n case SidebarView.OUTLINE:\n this.outlineButton.classList.remove(UI_NOTIFICATION_CLASS);\n break;\n case SidebarView.ATTACHMENTS:\n this.attachmentsButton.classList.remove(UI_NOTIFICATION_CLASS);\n break;\n }\n };\n\n if (!this.isOpen && view !== null) {\n // Only hide the notifications when the sidebar is currently open,\n // or when it is being reset (i.e. `view === null`).\n return;\n }\n this.toggleButton.classList.remove(UI_NOTIFICATION_CLASS);\n\n if (view !== null) {\n removeNotification(view);\n return;\n }\n // Remove all sidebar notifications on reset.\n for (view in SidebarView) {\n removeNotification(SidebarView[view]);\n }\n\n this.l10n.get(\"toggle_sidebar.title\", null, \"Toggle Sidebar\").then(msg => {\n this.toggleButton.title = msg;\n });\n }\n\n /**\n * @private\n */\n _addEventListeners() {\n this.viewerContainer.addEventListener(\"transitionend\", evt => {\n if (evt.target === this.viewerContainer) {\n this.outerContainer.classList.remove(\"sidebarMoving\");\n }\n });\n\n this.toggleButton.addEventListener(\"click\", () => {\n this.toggle();\n });\n\n // Buttons for switching views.\n this.thumbnailButton.addEventListener(\"click\", () => {\n this.switchView(SidebarView.THUMBS);\n });\n\n this.outlineButton.addEventListener(\"click\", () => {\n this.switchView(SidebarView.OUTLINE);\n });\n this.outlineButton.addEventListener(\"dblclick\", () => {\n this.eventBus.dispatch(\"toggleoutlinetree\", { source: this });\n });\n\n this.attachmentsButton.addEventListener(\"click\", () => {\n this.switchView(SidebarView.ATTACHMENTS);\n });\n\n // Disable/enable views.\n this.eventBus._on(\"outlineloaded\", evt => {\n const outlineCount = evt.outlineCount;\n\n this.outlineButton.disabled = !outlineCount;\n\n if (outlineCount) {\n this._showUINotification(SidebarView.OUTLINE);\n } else if (this.active === SidebarView.OUTLINE) {\n // If the outline view was opened during document load, switch away\n // from it if it turns out that the document has no outline.\n this.switchView(SidebarView.THUMBS);\n }\n });\n\n this.eventBus._on(\"attachmentsloaded\", evt => {\n if (evt.attachmentsCount) {\n this.attachmentsButton.disabled = false;\n\n this._showUINotification(SidebarView.ATTACHMENTS);\n return;\n }\n\n // Attempt to avoid temporarily disabling, and switching away from, the\n // attachment view for documents that do not contain proper attachments\n // but *only* FileAttachment annotations. Hence we defer those operations\n // slightly to allow time for parsing any FileAttachment annotations that\n // may be present on the *initially* rendered page of the document.\n Promise.resolve().then(() => {\n if (this.attachmentsView.hasChildNodes()) {\n // FileAttachment annotations were appended to the attachment view.\n return;\n }\n this.attachmentsButton.disabled = true;\n\n if (this.active === SidebarView.ATTACHMENTS) {\n // If the attachment view was opened during document load, switch away\n // from it if it turns out that the document has no attachments.\n this.switchView(SidebarView.THUMBS);\n }\n });\n });\n\n // Update the thumbnailViewer, if visible, when exiting presentation mode.\n this.eventBus._on(\"presentationmodechanged\", evt => {\n if (!evt.active && !evt.switchInProgress && this.isThumbnailViewVisible) {\n this._updateThumbnailViewer();\n }\n });\n }\n}\n\nexport { SidebarView, PDFSidebar };\n","/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nclass OverlayManager {\n constructor() {\n this._overlays = {};\n this._active = null;\n this._keyDownBound = this._keyDown.bind(this);\n }\n\n get active() {\n return this._active;\n }\n\n /**\n * @param {string} name - The name of the overlay that is registered.\n * @param {HTMLDivElement} element - The overlay's DOM element.\n * @param {function} [callerCloseMethod] - The method that, if present, calls\n * `OverlayManager.close` from the object registering the\n * overlay. Access to this method is necessary in order to\n * run cleanup code when e.g. the overlay is force closed.\n * The default is `null`.\n * @param {boolean} [canForceClose] - Indicates if opening the overlay closes\n * an active overlay. The default is `false`.\n * @returns {Promise} A promise that is resolved when the overlay has been\n * registered.\n */\n async register(\n name,\n element,\n callerCloseMethod = null,\n canForceClose = false\n ) {\n let container;\n if (!name || !element || !(container = element.parentNode)) {\n throw new Error(\"Not enough parameters.\");\n } else if (this._overlays[name]) {\n throw new Error(\"The overlay is already registered.\");\n }\n this._overlays[name] = {\n element,\n container,\n callerCloseMethod,\n canForceClose,\n };\n }\n\n /**\n * @param {string} name - The name of the overlay that is unregistered.\n * @returns {Promise} A promise that is resolved when the overlay has been\n * unregistered.\n */\n async unregister(name) {\n if (!this._overlays[name]) {\n throw new Error(\"The overlay does not exist.\");\n } else if (this._active === name) {\n throw new Error(\"The overlay cannot be removed while it is active.\");\n }\n delete this._overlays[name];\n }\n\n /**\n * @param {string} name - The name of the overlay that should be opened.\n * @returns {Promise} A promise that is resolved when the overlay has been\n * opened.\n */\n async open(name) {\n if (!this._overlays[name]) {\n throw new Error(\"The overlay does not exist.\");\n } else if (this._active) {\n if (this._overlays[name].canForceClose) {\n this._closeThroughCaller();\n } else if (this._active === name) {\n throw new Error(\"The overlay is already active.\");\n } else {\n throw new Error(\"Another overlay is currently active.\");\n }\n }\n this._active = name;\n this._overlays[this._active].element.classList.remove(\"hidden\");\n this._overlays[this._active].container.classList.remove(\"hidden\");\n\n window.addEventListener(\"keydown\", this._keyDownBound);\n }\n\n /**\n * @param {string} name - The name of the overlay that should be closed.\n * @returns {Promise} A promise that is resolved when the overlay has been\n * closed.\n */\n async close(name) {\n if (!this._overlays[name]) {\n throw new Error(\"The overlay does not exist.\");\n } else if (!this._active) {\n throw new Error(\"The overlay is currently not active.\");\n } else if (this._active !== name) {\n throw new Error(\"Another overlay is currently active.\");\n }\n this._overlays[this._active].container.classList.add(\"hidden\");\n this._overlays[this._active].element.classList.add(\"hidden\");\n this._active = null;\n\n window.removeEventListener(\"keydown\", this._keyDownBound);\n }\n\n /**\n * @private\n */\n _keyDown(evt) {\n if (this._active && evt.keyCode === /* Esc = */ 27) {\n this._closeThroughCaller();\n evt.preventDefault();\n }\n }\n\n /**\n * @private\n */\n _closeThroughCaller() {\n if (this._overlays[this._active].callerCloseMethod) {\n this._overlays[this._active].callerCloseMethod();\n }\n if (this._active) {\n this.close(this._active);\n }\n }\n}\n\nexport { OverlayManager };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { NullL10n } from \"./ui_utils.js\";\nimport { PasswordResponses } from \"pdfjs-lib\";\n\n/**\n * @typedef {Object} PasswordPromptOptions\n * @property {string} overlayName - Name of the overlay for the overlay manager.\n * @property {HTMLDivElement} container - Div container for the overlay.\n * @property {HTMLParagraphElement} label - Label containing instructions for\n * entering the password.\n * @property {HTMLInputElement} input - Input field for entering the password.\n * @property {HTMLButtonElement} submitButton - Button for submitting the\n * password.\n * @property {HTMLButtonElement} cancelButton - Button for cancelling password\n * entry.\n */\n\nclass PasswordPrompt {\n /**\n * @param {PasswordPromptOptions} options\n * @param {OverlayManager} overlayManager - Manager for the viewer overlays.\n * @param {IL10n} l10n - Localization service.\n */\n constructor(options, overlayManager, l10n = NullL10n) {\n this.overlayName = options.overlayName;\n this.container = options.container;\n this.label = options.label;\n this.input = options.input;\n this.submitButton = options.submitButton;\n this.cancelButton = options.cancelButton;\n this.overlayManager = overlayManager;\n this.l10n = l10n;\n\n this.updateCallback = null;\n this.reason = null;\n\n // Attach the event listeners.\n this.submitButton.addEventListener(\"click\", this.verify.bind(this));\n this.cancelButton.addEventListener(\"click\", this.close.bind(this));\n this.input.addEventListener(\"keydown\", e => {\n if (e.keyCode === /* Enter = */ 13) {\n this.verify();\n }\n });\n\n this.overlayManager.register(\n this.overlayName,\n this.container,\n this.close.bind(this),\n true\n );\n }\n\n open() {\n this.overlayManager.open(this.overlayName).then(() => {\n this.input.focus();\n\n let promptString;\n if (this.reason === PasswordResponses.INCORRECT_PASSWORD) {\n promptString = this.l10n.get(\n \"password_invalid\",\n null,\n \"Invalid password. Please try again.\"\n );\n } else {\n promptString = this.l10n.get(\n \"password_label\",\n null,\n \"Enter the password to open this PDF file.\"\n );\n }\n\n promptString.then(msg => {\n this.label.textContent = msg;\n });\n });\n }\n\n close() {\n this.overlayManager.close(this.overlayName).then(() => {\n this.input.value = \"\";\n });\n }\n\n verify() {\n const password = this.input.value;\n if (password && password.length > 0) {\n this.close();\n this.updateCallback(password);\n }\n }\n\n setUpdateCallback(updateCallback, reason) {\n this.updateCallback = updateCallback;\n this.reason = reason;\n }\n}\n\nexport { PasswordPrompt };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createObjectURL,\n createPromiseCapability,\n getFilenameFromUrl,\n removeNullCharacters,\n} from \"pdfjs-lib\";\n\n/**\n * @typedef {Object} PDFAttachmentViewerOptions\n * @property {HTMLDivElement} container - The viewer element.\n * @property {EventBus} eventBus - The application event bus.\n * @property {DownloadManager} downloadManager - The download manager.\n */\n\n/**\n * @typedef {Object} PDFAttachmentViewerRenderParameters\n * @property {Object|null} attachments - A lookup table of attachment objects.\n */\n\nclass PDFAttachmentViewer {\n /**\n * @param {PDFAttachmentViewerOptions} options\n */\n constructor({ container, eventBus, downloadManager }) {\n this.container = container;\n this.eventBus = eventBus;\n this.downloadManager = downloadManager;\n\n this.reset();\n\n this.eventBus._on(\n \"fileattachmentannotation\",\n this._appendAttachment.bind(this)\n );\n }\n\n reset(keepRenderedCapability = false) {\n this.attachments = null;\n\n // Remove the attachments from the DOM.\n this.container.textContent = \"\";\n\n if (!keepRenderedCapability) {\n // NOTE: The *only* situation in which the `_renderedCapability` should\n // not be replaced is when appending file attachment annotations.\n this._renderedCapability = createPromiseCapability();\n }\n }\n\n /**\n * @private\n */\n _dispatchEvent(attachmentsCount) {\n this._renderedCapability.resolve();\n\n this.eventBus.dispatch(\"attachmentsloaded\", {\n source: this,\n attachmentsCount,\n });\n }\n\n /**\n * @private\n */\n _bindPdfLink(button, content, filename) {\n if (this.downloadManager.disableCreateObjectURL) {\n throw new Error(\n 'bindPdfLink: Unsupported \"disableCreateObjectURL\" value.'\n );\n }\n let blobUrl;\n button.onclick = function() {\n if (!blobUrl) {\n blobUrl = createObjectURL(content, \"application/pdf\");\n }\n let viewerUrl;\n if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) {\n // The current URL is the viewer, let's use it and append the file.\n viewerUrl = \"?file=\" + encodeURIComponent(blobUrl + \"#\" + filename);\n } else if (PDFJSDev.test(\"CHROME\")) {\n // In the Chrome extension, the URL is rewritten using the history API\n // in viewer.js, so an absolute URL must be generated.\n viewerUrl =\n // eslint-disable-next-line no-undef\n chrome.runtime.getURL(\"/content/web/viewer.html\") +\n \"?file=\" +\n encodeURIComponent(blobUrl + \"#\" + filename);\n } else if (PDFJSDev.test(\"MOZCENTRAL\")) {\n // Let Firefox's content handler catch the URL and display the PDF.\n viewerUrl = blobUrl + \"?\" + encodeURIComponent(filename);\n }\n window.open(viewerUrl);\n return false;\n };\n }\n\n /**\n * @private\n */\n _bindLink(button, content, filename) {\n button.onclick = () => {\n this.downloadManager.downloadData(content, filename, \"\");\n return false;\n };\n }\n\n /**\n * @param {PDFAttachmentViewerRenderParameters} params\n */\n render({ attachments, keepRenderedCapability = false }) {\n let attachmentsCount = 0;\n\n if (this.attachments) {\n this.reset(keepRenderedCapability === true);\n }\n this.attachments = attachments || null;\n\n if (!attachments) {\n this._dispatchEvent(attachmentsCount);\n return;\n }\n\n const names = Object.keys(attachments).sort(function(a, b) {\n return a.toLowerCase().localeCompare(b.toLowerCase());\n });\n attachmentsCount = names.length;\n\n for (let i = 0; i < attachmentsCount; i++) {\n const item = attachments[names[i]];\n const filename = removeNullCharacters(getFilenameFromUrl(item.filename));\n\n const div = document.createElement(\"div\");\n div.className = \"attachmentsItem\";\n const button = document.createElement(\"button\");\n button.textContent = filename;\n if (\n /\\.pdf$/i.test(filename) &&\n !this.downloadManager.disableCreateObjectURL\n ) {\n this._bindPdfLink(button, item.content, filename);\n } else {\n this._bindLink(button, item.content, filename);\n }\n\n div.appendChild(button);\n this.container.appendChild(div);\n }\n\n this._dispatchEvent(attachmentsCount);\n }\n\n /**\n * Used to append FileAttachment annotations to the sidebar.\n * @private\n */\n _appendAttachment({ id, filename, content }) {\n this._renderedCapability.promise.then(() => {\n let attachments = this.attachments;\n\n if (!attachments) {\n attachments = Object.create(null);\n } else {\n for (const name in attachments) {\n if (id === name) {\n return; // Ignore the new attachment if it already exists.\n }\n }\n }\n attachments[id] = {\n filename,\n content,\n };\n this.render({\n attachments,\n keepRenderedCapability: true,\n });\n });\n }\n}\n\nexport { PDFAttachmentViewer };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createPromiseCapability, PDFDateString } from \"pdfjs-lib\";\nimport {\n getPageSizeInches,\n getPDFFileNameFromURL,\n isPortraitOrientation,\n NullL10n,\n} from \"./ui_utils.js\";\n\nconst DEFAULT_FIELD_CONTENT = \"-\";\n\n// See https://en.wikibooks.org/wiki/Lentis/Conversion_to_the_Metric_Standard_in_the_United_States\nconst NON_METRIC_LOCALES = [\"en-us\", \"en-lr\", \"my\"];\n\n// Should use the format: `width x height`, in portrait orientation.\n// See https://en.wikipedia.org/wiki/Paper_size\nconst US_PAGE_NAMES = {\n \"8.5x11\": \"Letter\",\n \"8.5x14\": \"Legal\",\n};\nconst METRIC_PAGE_NAMES = {\n \"297x420\": \"A3\",\n \"210x297\": \"A4\",\n};\n\nfunction getPageName(size, isPortrait, pageNames) {\n const width = isPortrait ? size.width : size.height;\n const height = isPortrait ? size.height : size.width;\n\n return pageNames[`${width}x${height}`];\n}\n\n/**\n * @typedef {Object} PDFDocumentPropertiesOptions\n * @property {string} overlayName - Name/identifier for the overlay.\n * @property {Object} fields - Names and elements of the overlay's fields.\n * @property {HTMLDivElement} container - Div container for the overlay.\n * @property {HTMLButtonElement} closeButton - Button for closing the overlay.\n */\n\nclass PDFDocumentProperties {\n /**\n * @param {PDFDocumentPropertiesOptions} options\n * @param {OverlayManager} overlayManager - Manager for the viewer overlays.\n * @param {EventBus} eventBus - The application event bus.\n * @param {IL10n} l10n - Localization service.\n */\n constructor(\n { overlayName, fields, container, closeButton },\n overlayManager,\n eventBus,\n l10n = NullL10n\n ) {\n this.overlayName = overlayName;\n this.fields = fields;\n this.container = container;\n this.overlayManager = overlayManager;\n this.l10n = l10n;\n\n this._reset();\n\n if (closeButton) {\n // Bind the event listener for the Close button.\n closeButton.addEventListener(\"click\", this.close.bind(this));\n }\n this.overlayManager.register(\n this.overlayName,\n this.container,\n this.close.bind(this)\n );\n\n if (eventBus) {\n eventBus._on(\"pagechanging\", evt => {\n this._currentPageNumber = evt.pageNumber;\n });\n eventBus._on(\"rotationchanging\", evt => {\n this._pagesRotation = evt.pagesRotation;\n });\n }\n\n this._isNonMetricLocale = true; // The default viewer locale is 'en-us'.\n l10n.getLanguage().then(locale => {\n this._isNonMetricLocale = NON_METRIC_LOCALES.includes(locale);\n });\n }\n\n /**\n * Open the document properties overlay.\n */\n open() {\n const freezeFieldData = data => {\n Object.defineProperty(this, \"fieldData\", {\n value: Object.freeze(data),\n writable: false,\n enumerable: true,\n configurable: true,\n });\n };\n\n Promise.all([\n this.overlayManager.open(this.overlayName),\n this._dataAvailableCapability.promise,\n ]).then(() => {\n const currentPageNumber = this._currentPageNumber;\n const pagesRotation = this._pagesRotation;\n\n // If the document properties were previously fetched (for this PDF file),\n // just update the dialog immediately to avoid redundant lookups.\n if (\n this.fieldData &&\n currentPageNumber === this.fieldData[\"_currentPageNumber\"] &&\n pagesRotation === this.fieldData[\"_pagesRotation\"]\n ) {\n this._updateUI();\n return;\n }\n\n // Get the document properties.\n this.pdfDocument\n .getMetadata()\n .then(({ info, metadata, contentDispositionFilename }) => {\n return Promise.all([\n info,\n metadata,\n contentDispositionFilename || getPDFFileNameFromURL(this.url || \"\"),\n this._parseFileSize(this.maybeFileSize),\n this._parseDate(info.CreationDate),\n this._parseDate(info.ModDate),\n this.pdfDocument.getPage(currentPageNumber).then(pdfPage => {\n return this._parsePageSize(\n getPageSizeInches(pdfPage),\n pagesRotation\n );\n }),\n this._parseLinearization(info.IsLinearized),\n ]);\n })\n .then(\n ([\n info,\n metadata,\n fileName,\n fileSize,\n creationDate,\n modDate,\n pageSize,\n isLinearized,\n ]) => {\n freezeFieldData({\n fileName,\n fileSize,\n title: info.Title,\n author: info.Author,\n subject: info.Subject,\n keywords: info.Keywords,\n creationDate,\n modificationDate: modDate,\n creator: info.Creator,\n producer: info.Producer,\n version: info.PDFFormatVersion,\n pageCount: this.pdfDocument.numPages,\n pageSize,\n linearized: isLinearized,\n _currentPageNumber: currentPageNumber,\n _pagesRotation: pagesRotation,\n });\n this._updateUI();\n\n // Get the correct fileSize, since it may not have been set (if\n // `this.setFileSize` wasn't called) or may be incorrectly set.\n return this.pdfDocument.getDownloadInfo();\n }\n )\n .then(({ length }) => {\n this.maybeFileSize = length;\n return this._parseFileSize(length);\n })\n .then(fileSize => {\n if (fileSize === this.fieldData[\"fileSize\"]) {\n return; // The fileSize has already been correctly set.\n }\n const data = Object.assign(Object.create(null), this.fieldData);\n data[\"fileSize\"] = fileSize;\n\n freezeFieldData(data);\n this._updateUI();\n });\n });\n }\n\n /**\n * Close the document properties overlay.\n */\n close() {\n this.overlayManager.close(this.overlayName);\n }\n\n /**\n * Set a reference to the PDF document and the URL in order\n * to populate the overlay fields with the document properties.\n * Note that the overlay will contain no information if this method\n * is not called.\n *\n * @param {PDFDocumentProxy} pdfDocument - A reference to the PDF document.\n * @param {string} url - The URL of the document.\n */\n setDocument(pdfDocument, url = null) {\n if (this.pdfDocument) {\n this._reset();\n this._updateUI(true);\n }\n if (!pdfDocument) {\n return;\n }\n this.pdfDocument = pdfDocument;\n this.url = url;\n\n this._dataAvailableCapability.resolve();\n }\n\n /**\n * Set the file size of the PDF document. This method is used to\n * update the file size in the document properties overlay once it\n * is known so we do not have to wait until the entire file is loaded.\n *\n * @param {number} fileSize - The file size of the PDF document.\n */\n setFileSize(fileSize) {\n if (Number.isInteger(fileSize) && fileSize > 0) {\n this.maybeFileSize = fileSize;\n }\n }\n\n /**\n * @private\n */\n _reset() {\n this.pdfDocument = null;\n this.url = null;\n\n this.maybeFileSize = 0;\n delete this.fieldData;\n this._dataAvailableCapability = createPromiseCapability();\n this._currentPageNumber = 1;\n this._pagesRotation = 0;\n }\n\n /**\n * Always updates all of the dialog fields, to prevent inconsistent UI state.\n * NOTE: If the contents of a particular field is neither a non-empty string,\n * nor a number, it will fall back to `DEFAULT_FIELD_CONTENT`.\n * @private\n */\n _updateUI(reset = false) {\n if (reset || !this.fieldData) {\n for (const id in this.fields) {\n this.fields[id].textContent = DEFAULT_FIELD_CONTENT;\n }\n return;\n }\n if (this.overlayManager.active !== this.overlayName) {\n // Don't bother updating the dialog if has already been closed,\n // since it will be updated the next time `this.open` is called.\n return;\n }\n for (const id in this.fields) {\n const content = this.fieldData[id];\n this.fields[id].textContent =\n content || content === 0 ? content : DEFAULT_FIELD_CONTENT;\n }\n }\n\n /**\n * @private\n */\n async _parseFileSize(fileSize = 0) {\n const kb = fileSize / 1024;\n if (!kb) {\n return undefined;\n } else if (kb < 1024) {\n return this.l10n.get(\n \"document_properties_kb\",\n {\n size_kb: (+kb.toPrecision(3)).toLocaleString(),\n size_b: fileSize.toLocaleString(),\n },\n \"{{size_kb}} KB ({{size_b}} bytes)\"\n );\n }\n return this.l10n.get(\n \"document_properties_mb\",\n {\n size_mb: (+(kb / 1024).toPrecision(3)).toLocaleString(),\n size_b: fileSize.toLocaleString(),\n },\n \"{{size_mb}} MB ({{size_b}} bytes)\"\n );\n }\n\n /**\n * @private\n */\n async _parsePageSize(pageSizeInches, pagesRotation) {\n if (!pageSizeInches) {\n return undefined;\n }\n // Take the viewer rotation into account as well; compare with Adobe Reader.\n if (pagesRotation % 180 !== 0) {\n pageSizeInches = {\n width: pageSizeInches.height,\n height: pageSizeInches.width,\n };\n }\n const isPortrait = isPortraitOrientation(pageSizeInches);\n\n let sizeInches = {\n width: Math.round(pageSizeInches.width * 100) / 100,\n height: Math.round(pageSizeInches.height * 100) / 100,\n };\n // 1in == 25.4mm; no need to round to 2 decimals for millimeters.\n let sizeMillimeters = {\n width: Math.round(pageSizeInches.width * 25.4 * 10) / 10,\n height: Math.round(pageSizeInches.height * 25.4 * 10) / 10,\n };\n\n let pageName = null;\n let rawName =\n getPageName(sizeInches, isPortrait, US_PAGE_NAMES) ||\n getPageName(sizeMillimeters, isPortrait, METRIC_PAGE_NAMES);\n\n if (\n !rawName &&\n !(\n Number.isInteger(sizeMillimeters.width) &&\n Number.isInteger(sizeMillimeters.height)\n )\n ) {\n // Attempt to improve the page name detection by falling back to fuzzy\n // matching of the metric dimensions, to account for e.g. rounding errors\n // and/or PDF files that define the page sizes in an imprecise manner.\n const exactMillimeters = {\n width: pageSizeInches.width * 25.4,\n height: pageSizeInches.height * 25.4,\n };\n const intMillimeters = {\n width: Math.round(sizeMillimeters.width),\n height: Math.round(sizeMillimeters.height),\n };\n\n // Try to avoid false positives, by only considering \"small\" differences.\n if (\n Math.abs(exactMillimeters.width - intMillimeters.width) < 0.1 &&\n Math.abs(exactMillimeters.height - intMillimeters.height) < 0.1\n ) {\n rawName = getPageName(intMillimeters, isPortrait, METRIC_PAGE_NAMES);\n if (rawName) {\n // Update *both* sizes, computed above, to ensure that the displayed\n // dimensions always correspond to the detected page name.\n sizeInches = {\n width: Math.round((intMillimeters.width / 25.4) * 100) / 100,\n height: Math.round((intMillimeters.height / 25.4) * 100) / 100,\n };\n sizeMillimeters = intMillimeters;\n }\n }\n }\n if (rawName) {\n pageName = this.l10n.get(\n \"document_properties_page_size_name_\" + rawName.toLowerCase(),\n null,\n rawName\n );\n }\n\n return Promise.all([\n this._isNonMetricLocale ? sizeInches : sizeMillimeters,\n this.l10n.get(\n \"document_properties_page_size_unit_\" +\n (this._isNonMetricLocale ? \"inches\" : \"millimeters\"),\n null,\n this._isNonMetricLocale ? \"in\" : \"mm\"\n ),\n pageName,\n this.l10n.get(\n \"document_properties_page_size_orientation_\" +\n (isPortrait ? \"portrait\" : \"landscape\"),\n null,\n isPortrait ? \"portrait\" : \"landscape\"\n ),\n ]).then(([{ width, height }, unit, name, orientation]) => {\n return this.l10n.get(\n \"document_properties_page_size_dimension_\" +\n (name ? \"name_\" : \"\") +\n \"string\",\n {\n width: width.toLocaleString(),\n height: height.toLocaleString(),\n unit,\n name,\n orientation,\n },\n \"{{width}} × {{height}} {{unit}} (\" +\n (name ? \"{{name}}, \" : \"\") +\n \"{{orientation}})\"\n );\n });\n }\n\n /**\n * @private\n */\n async _parseDate(inputDate) {\n const dateObject = PDFDateString.toDateObject(inputDate);\n if (!dateObject) {\n return undefined;\n }\n return this.l10n.get(\n \"document_properties_date_string\",\n {\n date: dateObject.toLocaleDateString(),\n time: dateObject.toLocaleTimeString(),\n },\n \"{{date}}, {{time}}\"\n );\n }\n\n /**\n * @private\n */\n _parseLinearization(isLinearized) {\n return this.l10n.get(\n \"document_properties_linearized_\" + (isLinearized ? \"yes\" : \"no\"),\n null,\n isLinearized ? \"Yes\" : \"No\"\n );\n }\n}\n\nexport { PDFDocumentProperties };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getGlobalEventBus, NullL10n } from \"./ui_utils.js\";\nimport { FindState } from \"./pdf_find_controller.js\";\n\nconst MATCHES_COUNT_LIMIT = 1000;\n\n/**\n * Creates a \"search bar\" given a set of DOM elements that act as controls\n * for searching or for setting search preferences in the UI. This object\n * also sets up the appropriate events for the controls. Actual searching\n * is done by PDFFindController.\n */\nclass PDFFindBar {\n constructor(options, eventBus, l10n = NullL10n) {\n this.opened = false;\n\n this.bar = options.bar || null;\n this.toggleButton = options.toggleButton || null;\n this.findField = options.findField || null;\n this.highlightAll = options.highlightAllCheckbox || null;\n this.caseSensitive = options.caseSensitiveCheckbox || null;\n this.entireWord = options.entireWordCheckbox || null;\n this.findMsg = options.findMsg || null;\n this.findResultsCount = options.findResultsCount || null;\n this.findPreviousButton = options.findPreviousButton || null;\n this.findNextButton = options.findNextButton || null;\n this.eventBus = eventBus || getGlobalEventBus();\n this.l10n = l10n;\n\n // Add event listeners to the DOM elements.\n this.toggleButton.addEventListener(\"click\", () => {\n this.toggle();\n });\n\n this.findField.addEventListener(\"input\", () => {\n this.dispatchEvent(\"\");\n });\n\n this.bar.addEventListener(\"keydown\", e => {\n switch (e.keyCode) {\n case 13: // Enter\n if (e.target === this.findField) {\n this.dispatchEvent(\"again\", e.shiftKey);\n }\n break;\n case 27: // Escape\n this.close();\n break;\n }\n });\n\n this.findPreviousButton.addEventListener(\"click\", () => {\n this.dispatchEvent(\"again\", true);\n });\n\n this.findNextButton.addEventListener(\"click\", () => {\n this.dispatchEvent(\"again\", false);\n });\n\n this.highlightAll.addEventListener(\"click\", () => {\n this.dispatchEvent(\"highlightallchange\");\n });\n\n this.caseSensitive.addEventListener(\"click\", () => {\n this.dispatchEvent(\"casesensitivitychange\");\n });\n\n this.entireWord.addEventListener(\"click\", () => {\n this.dispatchEvent(\"entirewordchange\");\n });\n\n this.eventBus._on(\"resize\", this._adjustWidth.bind(this));\n }\n\n reset() {\n this.updateUIState();\n }\n\n dispatchEvent(type, findPrev) {\n this.eventBus.dispatch(\"find\", {\n source: this,\n type,\n query: this.findField.value,\n phraseSearch: true,\n caseSensitive: this.caseSensitive.checked,\n entireWord: this.entireWord.checked,\n highlightAll: this.highlightAll.checked,\n findPrevious: findPrev,\n });\n }\n\n updateUIState(state, previous, matchesCount) {\n let notFound = false;\n let findMsg = \"\";\n let status = \"\";\n\n switch (state) {\n case FindState.FOUND:\n break;\n\n case FindState.PENDING:\n status = \"pending\";\n break;\n\n case FindState.NOT_FOUND:\n findMsg = this.l10n.get(\"find_not_found\", null, \"Phrase not found\");\n notFound = true;\n break;\n\n case FindState.WRAPPED:\n if (previous) {\n findMsg = this.l10n.get(\n \"find_reached_top\",\n null,\n \"Reached top of document, continued from bottom\"\n );\n } else {\n findMsg = this.l10n.get(\n \"find_reached_bottom\",\n null,\n \"Reached end of document, continued from top\"\n );\n }\n break;\n }\n\n this.findField.classList.toggle(\"notFound\", notFound);\n this.findField.setAttribute(\"data-status\", status);\n\n Promise.resolve(findMsg).then(msg => {\n this.findMsg.textContent = msg;\n this._adjustWidth();\n });\n\n this.updateResultsCount(matchesCount);\n }\n\n updateResultsCount({ current = 0, total = 0 } = {}) {\n if (!this.findResultsCount) {\n return; // No UI control is provided.\n }\n const limit = MATCHES_COUNT_LIMIT;\n let matchesCountMsg = \"\";\n\n if (total > 0) {\n if (total > limit) {\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n // TODO: Remove this hard-coded `[other]` form once plural support has\n // been implemented in the mozilla-central specific `l10n.js` file.\n matchesCountMsg = this.l10n.get(\n \"find_match_count_limit[other]\",\n {\n limit,\n },\n \"More than {{limit}} matches\"\n );\n } else {\n matchesCountMsg = this.l10n.get(\n \"find_match_count_limit\",\n {\n limit,\n },\n \"More than {{limit}} match\" + (limit !== 1 ? \"es\" : \"\")\n );\n }\n } else {\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n // TODO: Remove this hard-coded `[other]` form once plural support has\n // been implemented in the mozilla-central specific `l10n.js` file.\n matchesCountMsg = this.l10n.get(\n \"find_match_count[other]\",\n {\n current,\n total,\n },\n \"{{current}} of {{total}} matches\"\n );\n } else {\n matchesCountMsg = this.l10n.get(\n \"find_match_count\",\n {\n current,\n total,\n },\n \"{{current}} of {{total}} match\" + (total !== 1 ? \"es\" : \"\")\n );\n }\n }\n }\n Promise.resolve(matchesCountMsg).then(msg => {\n this.findResultsCount.textContent = msg;\n this.findResultsCount.classList.toggle(\"hidden\", !total);\n // Since `updateResultsCount` may be called from `PDFFindController`,\n // ensure that the width of the findbar is always updated correctly.\n this._adjustWidth();\n });\n }\n\n open() {\n if (!this.opened) {\n this.opened = true;\n this.toggleButton.classList.add(\"toggled\");\n this.bar.classList.remove(\"hidden\");\n }\n this.findField.select();\n this.findField.focus();\n\n this._adjustWidth();\n }\n\n close() {\n if (!this.opened) {\n return;\n }\n this.opened = false;\n this.toggleButton.classList.remove(\"toggled\");\n this.bar.classList.add(\"hidden\");\n\n this.eventBus.dispatch(\"findbarclose\", { source: this });\n }\n\n toggle() {\n if (this.opened) {\n this.close();\n } else {\n this.open();\n }\n }\n\n /**\n * @private\n */\n _adjustWidth() {\n if (!this.opened) {\n return;\n }\n\n // The find bar has an absolute position and thus the browser extends\n // its width to the maximum possible width once the find bar does not fit\n // entirely within the window anymore (and its elements are automatically\n // wrapped). Here we detect and fix that.\n this.bar.classList.remove(\"wrapContainers\");\n\n const findbarHeight = this.bar.clientHeight;\n const inputContainerHeight = this.bar.firstElementChild.clientHeight;\n\n if (findbarHeight > inputContainerHeight) {\n // The findbar is taller than the input container, which means that\n // the browser wrapped some of the elements. For a consistent look,\n // wrap all of them to adjust the width of the find bar.\n this.bar.classList.add(\"wrapContainers\");\n }\n }\n}\n\nexport { PDFFindBar };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getGlobalEventBus, scrollIntoView } from \"./ui_utils.js\";\nimport { createPromiseCapability } from \"pdfjs-lib\";\nimport { getCharacterType } from \"./pdf_find_utils.js\";\n\nconst FindState = {\n FOUND: 0,\n NOT_FOUND: 1,\n WRAPPED: 2,\n PENDING: 3,\n};\n\nconst FIND_TIMEOUT = 250; // ms\nconst MATCH_SCROLL_OFFSET_TOP = -50; // px\nconst MATCH_SCROLL_OFFSET_LEFT = -400; // px\n\nconst CHARACTERS_TO_NORMALIZE = {\n \"\\u2018\": \"'\", // Left single quotation mark\n \"\\u2019\": \"'\", // Right single quotation mark\n \"\\u201A\": \"'\", // Single low-9 quotation mark\n \"\\u201B\": \"'\", // Single high-reversed-9 quotation mark\n \"\\u201C\": '\"', // Left double quotation mark\n \"\\u201D\": '\"', // Right double quotation mark\n \"\\u201E\": '\"', // Double low-9 quotation mark\n \"\\u201F\": '\"', // Double high-reversed-9 quotation mark\n \"\\u00BC\": \"1/4\", // Vulgar fraction one quarter\n \"\\u00BD\": \"1/2\", // Vulgar fraction one half\n \"\\u00BE\": \"3/4\", // Vulgar fraction three quarters\n};\n\nlet normalizationRegex = null;\nfunction normalize(text) {\n if (!normalizationRegex) {\n // Compile the regular expression for text normalization once.\n const replace = Object.keys(CHARACTERS_TO_NORMALIZE).join(\"\");\n normalizationRegex = new RegExp(`[${replace}]`, \"g\");\n }\n return text.replace(normalizationRegex, function(ch) {\n return CHARACTERS_TO_NORMALIZE[ch];\n });\n}\n\n/**\n * @typedef {Object} PDFFindControllerOptions\n * @property {IPDFLinkService} linkService - The navigation/linking service.\n * @property {EventBus} eventBus - The application event bus.\n */\n\n/**\n * Provides search functionality to find a given string in a PDF document.\n */\nclass PDFFindController {\n /**\n * @param {PDFFindControllerOptions} options\n */\n constructor({ linkService, eventBus }) {\n this._linkService = linkService;\n this._eventBus = eventBus || getGlobalEventBus();\n\n this._reset();\n eventBus._on(\"findbarclose\", this._onFindBarClose.bind(this));\n }\n\n get highlightMatches() {\n return this._highlightMatches;\n }\n\n get pageMatches() {\n return this._pageMatches;\n }\n\n get pageMatchesLength() {\n return this._pageMatchesLength;\n }\n\n get selected() {\n return this._selected;\n }\n\n get state() {\n return this._state;\n }\n\n /**\n * Set a reference to the PDF document in order to search it.\n * Note that searching is not possible if this method is not called.\n *\n * @param {PDFDocumentProxy} pdfDocument - The PDF document to search.\n */\n setDocument(pdfDocument) {\n if (this._pdfDocument) {\n this._reset();\n }\n if (!pdfDocument) {\n return;\n }\n this._pdfDocument = pdfDocument;\n this._firstPageCapability.resolve();\n }\n\n executeCommand(cmd, state) {\n if (!state) {\n return;\n }\n const pdfDocument = this._pdfDocument;\n\n if (this._state === null || this._shouldDirtyMatch(cmd, state)) {\n this._dirtyMatch = true;\n }\n this._state = state;\n if (cmd !== \"findhighlightallchange\") {\n this._updateUIState(FindState.PENDING);\n }\n\n this._firstPageCapability.promise.then(() => {\n // If the document was closed before searching began, or if the search\n // operation was relevant for a previously opened document, do nothing.\n if (\n !this._pdfDocument ||\n (pdfDocument && this._pdfDocument !== pdfDocument)\n ) {\n return;\n }\n this._extractText();\n\n const findbarClosed = !this._highlightMatches;\n const pendingTimeout = !!this._findTimeout;\n\n if (this._findTimeout) {\n clearTimeout(this._findTimeout);\n this._findTimeout = null;\n }\n if (cmd === \"find\") {\n // Trigger the find action with a small delay to avoid starting the\n // search when the user is still typing (saving resources).\n this._findTimeout = setTimeout(() => {\n this._nextMatch();\n this._findTimeout = null;\n }, FIND_TIMEOUT);\n } else if (this._dirtyMatch) {\n // Immediately trigger searching for non-'find' operations, when the\n // current state needs to be reset and matches re-calculated.\n this._nextMatch();\n } else if (cmd === \"findagain\") {\n this._nextMatch();\n\n // When the findbar was previously closed, and `highlightAll` is set,\n // ensure that the matches on all active pages are highlighted again.\n if (findbarClosed && this._state.highlightAll) {\n this._updateAllPages();\n }\n } else if (cmd === \"findhighlightallchange\") {\n // If there was a pending search operation, synchronously trigger a new\n // search *first* to ensure that the correct matches are highlighted.\n if (pendingTimeout) {\n this._nextMatch();\n } else {\n this._highlightMatches = true;\n }\n this._updateAllPages(); // Update the highlighting on all active pages.\n } else {\n this._nextMatch();\n }\n });\n }\n\n scrollMatchIntoView({ element = null, pageIndex = -1, matchIndex = -1 }) {\n if (!this._scrollMatches || !element) {\n return;\n } else if (matchIndex === -1 || matchIndex !== this._selected.matchIdx) {\n return;\n } else if (pageIndex === -1 || pageIndex !== this._selected.pageIdx) {\n return;\n }\n this._scrollMatches = false; // Ensure that scrolling only happens once.\n\n const spot = {\n top: MATCH_SCROLL_OFFSET_TOP,\n left: MATCH_SCROLL_OFFSET_LEFT,\n };\n scrollIntoView(element, spot, /* skipOverflowHiddenElements = */ true);\n }\n\n _reset() {\n this._highlightMatches = false;\n this._scrollMatches = false;\n this._pdfDocument = null;\n this._pageMatches = [];\n this._pageMatchesLength = [];\n this._state = null;\n // Currently selected match.\n this._selected = {\n pageIdx: -1,\n matchIdx: -1,\n };\n // Where the find algorithm currently is in the document.\n this._offset = {\n pageIdx: null,\n matchIdx: null,\n wrapped: false,\n };\n this._extractTextPromises = [];\n this._pageContents = []; // Stores the normalized text for each page.\n this._matchesCountTotal = 0;\n this._pagesToSearch = null;\n this._pendingFindMatches = Object.create(null);\n this._resumePageIdx = null;\n this._dirtyMatch = false;\n clearTimeout(this._findTimeout);\n this._findTimeout = null;\n\n this._firstPageCapability = createPromiseCapability();\n }\n\n /**\n * @type {string} The (current) normalized search query.\n */\n get _query() {\n if (this._state.query !== this._rawQuery) {\n this._rawQuery = this._state.query;\n this._normalizedQuery = normalize(this._state.query);\n }\n return this._normalizedQuery;\n }\n\n _shouldDirtyMatch(cmd, state) {\n // When the search query changes, regardless of the actual search command\n // used, always re-calculate matches to avoid errors (fixes bug 1030622).\n if (state.query !== this._state.query) {\n return true;\n }\n switch (cmd) {\n case \"findagain\":\n const pageNumber = this._selected.pageIdx + 1;\n const linkService = this._linkService;\n // Only treat a 'findagain' event as a new search operation when it's\n // *absolutely* certain that the currently selected match is no longer\n // visible, e.g. as a result of the user scrolling in the document.\n //\n // NOTE: If only a simple `this._linkService.page` check was used here,\n // there's a risk that consecutive 'findagain' operations could \"skip\"\n // over matches at the top/bottom of pages thus making them completely\n // inaccessible when there's multiple pages visible in the viewer.\n if (\n pageNumber >= 1 &&\n pageNumber <= linkService.pagesCount &&\n pageNumber !== linkService.page &&\n !linkService.isPageVisible(pageNumber)\n ) {\n return true;\n }\n return false;\n case \"findhighlightallchange\":\n return false;\n }\n return true;\n }\n\n /**\n * Helper for multi-term search that fills the `matchesWithLength` array\n * and handles cases where one search term includes another search term (for\n * example, \"tamed tame\" or \"this is\"). It looks for intersecting terms in\n * the `matches` and keeps elements with a longer match length.\n */\n _prepareMatches(matchesWithLength, matches, matchesLength) {\n function isSubTerm(currentIndex) {\n const currentElem = matchesWithLength[currentIndex];\n const nextElem = matchesWithLength[currentIndex + 1];\n\n // Check for cases like \"TAMEd TAME\".\n if (\n currentIndex < matchesWithLength.length - 1 &&\n currentElem.match === nextElem.match\n ) {\n currentElem.skipped = true;\n return true;\n }\n\n // Check for cases like \"thIS IS\".\n for (let i = currentIndex - 1; i >= 0; i--) {\n const prevElem = matchesWithLength[i];\n if (prevElem.skipped) {\n continue;\n }\n if (prevElem.match + prevElem.matchLength < currentElem.match) {\n break;\n }\n if (\n prevElem.match + prevElem.matchLength >=\n currentElem.match + currentElem.matchLength\n ) {\n currentElem.skipped = true;\n return true;\n }\n }\n return false;\n }\n\n // Sort the array of `{ match: <match>, matchLength: <matchLength> }`\n // objects on increasing index first and on the length otherwise.\n matchesWithLength.sort(function(a, b) {\n return a.match === b.match\n ? a.matchLength - b.matchLength\n : a.match - b.match;\n });\n for (let i = 0, len = matchesWithLength.length; i < len; i++) {\n if (isSubTerm(i)) {\n continue;\n }\n matches.push(matchesWithLength[i].match);\n matchesLength.push(matchesWithLength[i].matchLength);\n }\n }\n\n /**\n * Determine if the search query constitutes a \"whole word\", by comparing the\n * first/last character type with the preceding/following character type.\n */\n _isEntireWord(content, startIdx, length) {\n if (startIdx > 0) {\n const first = content.charCodeAt(startIdx);\n const limit = content.charCodeAt(startIdx - 1);\n if (getCharacterType(first) === getCharacterType(limit)) {\n return false;\n }\n }\n const endIdx = startIdx + length - 1;\n if (endIdx < content.length - 1) {\n const last = content.charCodeAt(endIdx);\n const limit = content.charCodeAt(endIdx + 1);\n if (getCharacterType(last) === getCharacterType(limit)) {\n return false;\n }\n }\n return true;\n }\n\n _calculatePhraseMatch(query, pageIndex, pageContent, entireWord) {\n const matches = [];\n const queryLen = query.length;\n\n let matchIdx = -queryLen;\n while (true) {\n matchIdx = pageContent.indexOf(query, matchIdx + queryLen);\n if (matchIdx === -1) {\n break;\n }\n if (entireWord && !this._isEntireWord(pageContent, matchIdx, queryLen)) {\n continue;\n }\n matches.push(matchIdx);\n }\n this._pageMatches[pageIndex] = matches;\n }\n\n _calculateWordMatch(query, pageIndex, pageContent, entireWord) {\n const matchesWithLength = [];\n\n // Divide the query into pieces and search for text in each piece.\n const queryArray = query.match(/\\S+/g);\n for (let i = 0, len = queryArray.length; i < len; i++) {\n const subquery = queryArray[i];\n const subqueryLen = subquery.length;\n\n let matchIdx = -subqueryLen;\n while (true) {\n matchIdx = pageContent.indexOf(subquery, matchIdx + subqueryLen);\n if (matchIdx === -1) {\n break;\n }\n if (\n entireWord &&\n !this._isEntireWord(pageContent, matchIdx, subqueryLen)\n ) {\n continue;\n }\n // Other searches do not, so we store the length.\n matchesWithLength.push({\n match: matchIdx,\n matchLength: subqueryLen,\n skipped: false,\n });\n }\n }\n\n // Prepare arrays for storing the matches.\n this._pageMatchesLength[pageIndex] = [];\n this._pageMatches[pageIndex] = [];\n\n // Sort `matchesWithLength`, remove intersecting terms and put the result\n // into the two arrays.\n this._prepareMatches(\n matchesWithLength,\n this._pageMatches[pageIndex],\n this._pageMatchesLength[pageIndex]\n );\n }\n\n _calculateMatch(pageIndex) {\n let pageContent = this._pageContents[pageIndex];\n let query = this._query;\n const { caseSensitive, entireWord, phraseSearch } = this._state;\n\n if (query.length === 0) {\n // Do nothing: the matches should be wiped out already.\n return;\n }\n\n if (!caseSensitive) {\n pageContent = pageContent.toLowerCase();\n query = query.toLowerCase();\n }\n\n if (phraseSearch) {\n this._calculatePhraseMatch(query, pageIndex, pageContent, entireWord);\n } else {\n this._calculateWordMatch(query, pageIndex, pageContent, entireWord);\n }\n\n // When `highlightAll` is set, ensure that the matches on previously\n // rendered (and still active) pages are correctly highlighted.\n if (this._state.highlightAll) {\n this._updatePage(pageIndex);\n }\n if (this._resumePageIdx === pageIndex) {\n this._resumePageIdx = null;\n this._nextPageMatch();\n }\n\n // Update the match count.\n const pageMatchesCount = this._pageMatches[pageIndex].length;\n if (pageMatchesCount > 0) {\n this._matchesCountTotal += pageMatchesCount;\n this._updateUIResultsCount();\n }\n }\n\n _extractText() {\n // Perform text extraction once if this method is called multiple times.\n if (this._extractTextPromises.length > 0) {\n return;\n }\n\n let promise = Promise.resolve();\n for (let i = 0, ii = this._linkService.pagesCount; i < ii; i++) {\n const extractTextCapability = createPromiseCapability();\n this._extractTextPromises[i] = extractTextCapability.promise;\n\n promise = promise.then(() => {\n return this._pdfDocument\n .getPage(i + 1)\n .then(pdfPage => {\n return pdfPage.getTextContent({\n normalizeWhitespace: true,\n });\n })\n .then(\n textContent => {\n const textItems = textContent.items;\n const strBuf = [];\n\n for (let j = 0, jj = textItems.length; j < jj; j++) {\n strBuf.push(textItems[j].str);\n }\n\n // Store the normalized page content (text items) as one string.\n this._pageContents[i] = normalize(strBuf.join(\"\"));\n extractTextCapability.resolve(i);\n },\n reason => {\n console.error(\n `Unable to get text content for page ${i + 1}`,\n reason\n );\n // Page error -- assuming no text content.\n this._pageContents[i] = \"\";\n extractTextCapability.resolve(i);\n }\n );\n });\n }\n }\n\n _updatePage(index) {\n if (this._scrollMatches && this._selected.pageIdx === index) {\n // If the page is selected, scroll the page into view, which triggers\n // rendering the page, which adds the text layer. Once the text layer\n // is built, it will attempt to scroll the selected match into view.\n this._linkService.page = index + 1;\n }\n\n this._eventBus.dispatch(\"updatetextlayermatches\", {\n source: this,\n pageIndex: index,\n });\n }\n\n _updateAllPages() {\n this._eventBus.dispatch(\"updatetextlayermatches\", {\n source: this,\n pageIndex: -1,\n });\n }\n\n _nextMatch() {\n const previous = this._state.findPrevious;\n const currentPageIndex = this._linkService.page - 1;\n const numPages = this._linkService.pagesCount;\n\n this._highlightMatches = true;\n\n if (this._dirtyMatch) {\n // Need to recalculate the matches, reset everything.\n this._dirtyMatch = false;\n this._selected.pageIdx = this._selected.matchIdx = -1;\n this._offset.pageIdx = currentPageIndex;\n this._offset.matchIdx = null;\n this._offset.wrapped = false;\n this._resumePageIdx = null;\n this._pageMatches.length = 0;\n this._pageMatchesLength.length = 0;\n this._matchesCountTotal = 0;\n\n this._updateAllPages(); // Wipe out any previously highlighted matches.\n\n for (let i = 0; i < numPages; i++) {\n // Start finding the matches as soon as the text is extracted.\n if (this._pendingFindMatches[i] === true) {\n continue;\n }\n this._pendingFindMatches[i] = true;\n this._extractTextPromises[i].then(pageIdx => {\n delete this._pendingFindMatches[pageIdx];\n this._calculateMatch(pageIdx);\n });\n }\n }\n\n // If there's no query there's no point in searching.\n if (this._query === \"\") {\n this._updateUIState(FindState.FOUND);\n return;\n }\n // If we're waiting on a page, we return since we can't do anything else.\n if (this._resumePageIdx) {\n return;\n }\n\n const offset = this._offset;\n // Keep track of how many pages we should maximally iterate through.\n this._pagesToSearch = numPages;\n // If there's already a `matchIdx` that means we are iterating through a\n // page's matches.\n if (offset.matchIdx !== null) {\n const numPageMatches = this._pageMatches[offset.pageIdx].length;\n if (\n (!previous && offset.matchIdx + 1 < numPageMatches) ||\n (previous && offset.matchIdx > 0)\n ) {\n // The simple case; we just have advance the matchIdx to select\n // the next match on the page.\n offset.matchIdx = previous ? offset.matchIdx - 1 : offset.matchIdx + 1;\n this._updateMatch(/* found = */ true);\n return;\n }\n // We went beyond the current page's matches, so we advance to\n // the next page.\n this._advanceOffsetPage(previous);\n }\n // Start searching through the page.\n this._nextPageMatch();\n }\n\n _matchesReady(matches) {\n const offset = this._offset;\n const numMatches = matches.length;\n const previous = this._state.findPrevious;\n\n if (numMatches) {\n // There were matches for the page, so initialize `matchIdx`.\n offset.matchIdx = previous ? numMatches - 1 : 0;\n this._updateMatch(/* found = */ true);\n return true;\n }\n // No matches, so attempt to search the next page.\n this._advanceOffsetPage(previous);\n if (offset.wrapped) {\n offset.matchIdx = null;\n if (this._pagesToSearch < 0) {\n // No point in wrapping again, there were no matches.\n this._updateMatch(/* found = */ false);\n // While matches were not found, searching for a page\n // with matches should nevertheless halt.\n return true;\n }\n }\n // Matches were not found (and searching is not done).\n return false;\n }\n\n _nextPageMatch() {\n if (this._resumePageIdx !== null) {\n console.error(\"There can only be one pending page.\");\n }\n\n let matches = null;\n do {\n const pageIdx = this._offset.pageIdx;\n matches = this._pageMatches[pageIdx];\n if (!matches) {\n // The matches don't exist yet for processing by `_matchesReady`,\n // so set a resume point for when they do exist.\n this._resumePageIdx = pageIdx;\n break;\n }\n } while (!this._matchesReady(matches));\n }\n\n _advanceOffsetPage(previous) {\n const offset = this._offset;\n const numPages = this._linkService.pagesCount;\n offset.pageIdx = previous ? offset.pageIdx - 1 : offset.pageIdx + 1;\n offset.matchIdx = null;\n\n this._pagesToSearch--;\n\n if (offset.pageIdx >= numPages || offset.pageIdx < 0) {\n offset.pageIdx = previous ? numPages - 1 : 0;\n offset.wrapped = true;\n }\n }\n\n _updateMatch(found = false) {\n let state = FindState.NOT_FOUND;\n const wrapped = this._offset.wrapped;\n this._offset.wrapped = false;\n\n if (found) {\n const previousPage = this._selected.pageIdx;\n this._selected.pageIdx = this._offset.pageIdx;\n this._selected.matchIdx = this._offset.matchIdx;\n state = wrapped ? FindState.WRAPPED : FindState.FOUND;\n\n // Update the currently selected page to wipe out any selected matches.\n if (previousPage !== -1 && previousPage !== this._selected.pageIdx) {\n this._updatePage(previousPage);\n }\n }\n\n this._updateUIState(state, this._state.findPrevious);\n if (this._selected.pageIdx !== -1) {\n // Ensure that the match will be scrolled into view.\n this._scrollMatches = true;\n\n this._updatePage(this._selected.pageIdx);\n }\n }\n\n _onFindBarClose(evt) {\n const pdfDocument = this._pdfDocument;\n // Since searching is asynchronous, ensure that the removal of highlighted\n // matches (from the UI) is async too such that the 'updatetextlayermatches'\n // events will always be dispatched in the expected order.\n this._firstPageCapability.promise.then(() => {\n // Only update the UI if the document is open, and is the current one.\n if (\n !this._pdfDocument ||\n (pdfDocument && this._pdfDocument !== pdfDocument)\n ) {\n return;\n }\n // Ensure that a pending, not yet started, search operation is aborted.\n if (this._findTimeout) {\n clearTimeout(this._findTimeout);\n this._findTimeout = null;\n }\n // Abort any long running searches, to avoid a match being scrolled into\n // view *after* the findbar has been closed. In this case `this._offset`\n // will most likely differ from `this._selected`, hence we also ensure\n // that any new search operation will always start with a clean slate.\n if (this._resumePageIdx) {\n this._resumePageIdx = null;\n this._dirtyMatch = true;\n }\n // Avoid the UI being in a pending state when the findbar is re-opened.\n this._updateUIState(FindState.FOUND);\n\n this._highlightMatches = false;\n this._updateAllPages(); // Wipe out any previously highlighted matches.\n });\n }\n\n _requestMatchesCount() {\n const { pageIdx, matchIdx } = this._selected;\n let current = 0,\n total = this._matchesCountTotal;\n if (matchIdx !== -1) {\n for (let i = 0; i < pageIdx; i++) {\n current += (this._pageMatches[i] && this._pageMatches[i].length) || 0;\n }\n current += matchIdx + 1;\n }\n // When searching starts, this method may be called before the `pageMatches`\n // have been counted (in `_calculateMatch`). Ensure that the UI won't show\n // temporarily broken state when the active find result doesn't make sense.\n if (current < 1 || current > total) {\n current = total = 0;\n }\n return { current, total };\n }\n\n _updateUIResultsCount() {\n this._eventBus.dispatch(\"updatefindmatchescount\", {\n source: this,\n matchesCount: this._requestMatchesCount(),\n });\n }\n\n _updateUIState(state, previous) {\n this._eventBus.dispatch(\"updatefindcontrolstate\", {\n source: this,\n state,\n previous,\n matchesCount: this._requestMatchesCount(),\n });\n }\n}\n\nexport { FindState, PDFFindController };\n","/* Copyright 2018 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst CharacterType = {\n SPACE: 0,\n ALPHA_LETTER: 1,\n PUNCT: 2,\n HAN_LETTER: 3,\n KATAKANA_LETTER: 4,\n HIRAGANA_LETTER: 5,\n HALFWIDTH_KATAKANA_LETTER: 6,\n THAI_LETTER: 7,\n};\n\nfunction isAlphabeticalScript(charCode) {\n return charCode < 0x2e80;\n}\n\nfunction isAscii(charCode) {\n return (charCode & 0xff80) === 0;\n}\n\nfunction isAsciiAlpha(charCode) {\n return (\n (charCode >= /* a = */ 0x61 && charCode <= /* z = */ 0x7a) ||\n (charCode >= /* A = */ 0x41 && charCode <= /* Z = */ 0x5a)\n );\n}\n\nfunction isAsciiDigit(charCode) {\n return charCode >= /* 0 = */ 0x30 && charCode <= /* 9 = */ 0x39;\n}\n\nfunction isAsciiSpace(charCode) {\n return (\n charCode === /* SPACE = */ 0x20 ||\n charCode === /* TAB = */ 0x09 ||\n charCode === /* CR = */ 0x0d ||\n charCode === /* LF = */ 0x0a\n );\n}\n\nfunction isHan(charCode) {\n return (\n (charCode >= 0x3400 && charCode <= 0x9fff) ||\n (charCode >= 0xf900 && charCode <= 0xfaff)\n );\n}\n\nfunction isKatakana(charCode) {\n return charCode >= 0x30a0 && charCode <= 0x30ff;\n}\n\nfunction isHiragana(charCode) {\n return charCode >= 0x3040 && charCode <= 0x309f;\n}\n\nfunction isHalfwidthKatakana(charCode) {\n return charCode >= 0xff60 && charCode <= 0xff9f;\n}\n\nfunction isThai(charCode) {\n return (charCode & 0xff80) === 0x0e00;\n}\n\n/**\n * This function is based on the word-break detection implemented in:\n * https://hg.mozilla.org/mozilla-central/file/tip/intl/lwbrk/WordBreaker.cpp\n */\nfunction getCharacterType(charCode) {\n if (isAlphabeticalScript(charCode)) {\n if (isAscii(charCode)) {\n if (isAsciiSpace(charCode)) {\n return CharacterType.SPACE;\n } else if (\n isAsciiAlpha(charCode) ||\n isAsciiDigit(charCode) ||\n charCode === /* UNDERSCORE = */ 0x5f\n ) {\n return CharacterType.ALPHA_LETTER;\n }\n return CharacterType.PUNCT;\n } else if (isThai(charCode)) {\n return CharacterType.THAI_LETTER;\n } else if (charCode === /* NBSP = */ 0xa0) {\n return CharacterType.SPACE;\n }\n return CharacterType.ALPHA_LETTER;\n }\n\n if (isHan(charCode)) {\n return CharacterType.HAN_LETTER;\n } else if (isKatakana(charCode)) {\n return CharacterType.KATAKANA_LETTER;\n } else if (isHiragana(charCode)) {\n return CharacterType.HIRAGANA_LETTER;\n } else if (isHalfwidthKatakana(charCode)) {\n return CharacterType.HALFWIDTH_KATAKANA_LETTER;\n }\n return CharacterType.ALPHA_LETTER;\n}\n\nexport { CharacterType, getCharacterType };\n","/* Copyright 2017 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n getGlobalEventBus,\n isValidRotation,\n parseQueryString,\n waitOnEventOrTimeout,\n} from \"./ui_utils.js\";\n\n// Heuristic value used when force-resetting `this._blockHashChange`.\nconst HASH_CHANGE_TIMEOUT = 1000; // milliseconds\n// Heuristic value used when adding the current position to the browser history.\nconst POSITION_UPDATED_THRESHOLD = 50;\n// Heuristic value used when adding a temporary position to the browser history.\nconst UPDATE_VIEWAREA_TIMEOUT = 1000; // milliseconds\n\n/**\n * @typedef {Object} PDFHistoryOptions\n * @property {IPDFLinkService} linkService - The navigation/linking service.\n * @property {EventBus} eventBus - The application event bus.\n */\n\n/**\n * @typedef {Object} InitializeParameters\n * @property {string} fingerprint - The PDF document's unique fingerprint.\n * @property {boolean} [resetHistory] - Reset the browsing history.\n * @property {boolean} [updateUrl] - Attempt to update the document URL, with\n * the current hash, when pushing/replacing browser history entries.\n */\n\n/**\n * @typedef {Object} PushParameters\n * @property {string} [namedDest] - The named destination. If absent, a\n * stringified version of `explicitDest` is used.\n * @property {Array} explicitDest - The explicit destination array.\n * @property {number} pageNumber - The page to which the destination points.\n */\n\nfunction getCurrentHash() {\n return document.location.hash;\n}\n\nclass PDFHistory {\n /**\n * @param {PDFHistoryOptions} options\n */\n constructor({ linkService, eventBus }) {\n this.linkService = linkService;\n this.eventBus = eventBus || getGlobalEventBus();\n\n this._initialized = false;\n this._fingerprint = \"\";\n this.reset();\n\n this._boundEvents = null;\n this._isViewerInPresentationMode = false;\n // Ensure that we don't miss either a 'presentationmodechanged' or a\n // 'pagesinit' event, by registering the listeners immediately.\n this.eventBus._on(\"presentationmodechanged\", evt => {\n this._isViewerInPresentationMode = evt.active || evt.switchInProgress;\n });\n this.eventBus._on(\"pagesinit\", () => {\n this._isPagesLoaded = false;\n\n const onPagesLoaded = evt => {\n this.eventBus._off(\"pagesloaded\", onPagesLoaded);\n this._isPagesLoaded = !!evt.pagesCount;\n };\n this.eventBus._on(\"pagesloaded\", onPagesLoaded);\n });\n }\n\n /**\n * Initialize the history for the PDF document, using either the current\n * browser history entry or the document hash, whichever is present.\n * @param {InitializeParameters} params\n */\n initialize({ fingerprint, resetHistory = false, updateUrl = false }) {\n if (!fingerprint || typeof fingerprint !== \"string\") {\n console.error(\n 'PDFHistory.initialize: The \"fingerprint\" must be a non-empty string.'\n );\n return;\n }\n // Ensure that any old state is always reset upon initialization.\n if (this._initialized) {\n this.reset();\n }\n const reInitialized =\n this._fingerprint !== \"\" && this._fingerprint !== fingerprint;\n this._fingerprint = fingerprint;\n this._updateUrl = updateUrl === true;\n\n this._initialized = true;\n this._bindEvents();\n const state = window.history.state;\n\n this._popStateInProgress = false;\n this._blockHashChange = 0;\n this._currentHash = getCurrentHash();\n this._numPositionUpdates = 0;\n\n this._uid = this._maxUid = 0;\n this._destination = null;\n this._position = null;\n\n if (!this._isValidState(state, /* checkReload = */ true) || resetHistory) {\n const { hash, page, rotation } = this._parseCurrentHash();\n\n if (!hash || reInitialized || resetHistory) {\n // Ensure that the browser history is reset on PDF document load.\n this._pushOrReplaceState(null, /* forceReplace = */ true);\n return;\n }\n // Ensure that the browser history is initialized correctly when\n // the document hash is present on PDF document load.\n this._pushOrReplaceState(\n { hash, page, rotation },\n /* forceReplace = */ true\n );\n return;\n }\n\n // The browser history contains a valid entry, ensure that the history is\n // initialized correctly on PDF document load.\n const destination = state.destination;\n this._updateInternalState(\n destination,\n state.uid,\n /* removeTemporary = */ true\n );\n if (this._uid > this._maxUid) {\n this._maxUid = this._uid;\n }\n\n if (destination.rotation !== undefined) {\n this._initialRotation = destination.rotation;\n }\n if (destination.dest) {\n this._initialBookmark = JSON.stringify(destination.dest);\n\n // If the history is updated, e.g. through the user changing the hash,\n // before the initial destination has become visible, then we do *not*\n // want to potentially add `this._position` to the browser history.\n this._destination.page = null;\n } else if (destination.hash) {\n this._initialBookmark = destination.hash;\n } else if (destination.page) {\n // Fallback case; shouldn't be necessary, but better safe than sorry.\n this._initialBookmark = `page=${destination.page}`;\n }\n }\n\n /**\n * Reset the current `PDFHistory` instance, and consequently prevent any\n * further updates and/or navigation of the browser history.\n */\n reset() {\n if (this._initialized) {\n this._pageHide(); // Simulate a 'pagehide' event when resetting.\n\n this._initialized = false;\n this._unbindEvents();\n }\n if (this._updateViewareaTimeout) {\n clearTimeout(this._updateViewareaTimeout);\n this._updateViewareaTimeout = null;\n }\n this._initialBookmark = null;\n this._initialRotation = null;\n }\n\n /**\n * Push an internal destination to the browser history.\n * @param {PushParameters}\n */\n push({ namedDest = null, explicitDest, pageNumber }) {\n if (!this._initialized) {\n return;\n }\n if (namedDest && typeof namedDest !== \"string\") {\n console.error(\n \"PDFHistory.push: \" +\n `\"${namedDest}\" is not a valid namedDest parameter.`\n );\n return;\n } else if (!Array.isArray(explicitDest)) {\n console.error(\n \"PDFHistory.push: \" +\n `\"${explicitDest}\" is not a valid explicitDest parameter.`\n );\n return;\n } else if (\n !(\n Number.isInteger(pageNumber) &&\n pageNumber > 0 &&\n pageNumber <= this.linkService.pagesCount\n )\n ) {\n // Allow an unset `pageNumber` if and only if the history is still empty;\n // please refer to the `this._destination.page = null;` comment above.\n if (pageNumber !== null || this._destination) {\n console.error(\n \"PDFHistory.push: \" +\n `\"${pageNumber}\" is not a valid pageNumber parameter.`\n );\n return;\n }\n }\n\n const hash = namedDest || JSON.stringify(explicitDest);\n if (!hash) {\n // The hash *should* never be undefined, but if that were to occur,\n // avoid any possible issues by not updating the browser history.\n return;\n }\n\n let forceReplace = false;\n if (\n this._destination &&\n (isDestHashesEqual(this._destination.hash, hash) ||\n isDestArraysEqual(this._destination.dest, explicitDest))\n ) {\n // When the new destination is identical to `this._destination`, and\n // its `page` is undefined, replace the current browser history entry.\n // NOTE: This can only occur if `this._destination` was set either:\n // - through the document hash being specified on load.\n // - through the user changing the hash of the document.\n if (this._destination.page) {\n return;\n }\n forceReplace = true;\n }\n if (this._popStateInProgress && !forceReplace) {\n return;\n }\n\n this._pushOrReplaceState(\n {\n dest: explicitDest,\n hash,\n page: pageNumber,\n rotation: this.linkService.rotation,\n },\n forceReplace\n );\n\n if (!this._popStateInProgress) {\n // Prevent the browser history from updating while the new destination is\n // being scrolled into view, to avoid potentially inconsistent state.\n this._popStateInProgress = true;\n // We defer the resetting of `this._popStateInProgress`, to account for\n // e.g. zooming occuring when the new destination is being navigated to.\n Promise.resolve().then(() => {\n this._popStateInProgress = false;\n });\n }\n }\n\n /**\n * Push the current position to the browser history.\n */\n pushCurrentPosition() {\n if (!this._initialized || this._popStateInProgress) {\n return;\n }\n this._tryPushCurrentPosition();\n }\n\n /**\n * Go back one step in the browser history.\n * NOTE: Avoids navigating away from the document, useful for \"named actions\".\n */\n back() {\n if (!this._initialized || this._popStateInProgress) {\n return;\n }\n const state = window.history.state;\n if (this._isValidState(state) && state.uid > 0) {\n window.history.back();\n }\n }\n\n /**\n * Go forward one step in the browser history.\n * NOTE: Avoids navigating away from the document, useful for \"named actions\".\n */\n forward() {\n if (!this._initialized || this._popStateInProgress) {\n return;\n }\n const state = window.history.state;\n if (this._isValidState(state) && state.uid < this._maxUid) {\n window.history.forward();\n }\n }\n\n /**\n * @type {boolean} Indicating if the user is currently moving through the\n * browser history, useful e.g. for skipping the next 'hashchange' event.\n */\n get popStateInProgress() {\n return (\n this._initialized &&\n (this._popStateInProgress || this._blockHashChange > 0)\n );\n }\n\n get initialBookmark() {\n return this._initialized ? this._initialBookmark : null;\n }\n\n get initialRotation() {\n return this._initialized ? this._initialRotation : null;\n }\n\n /**\n * @private\n */\n _pushOrReplaceState(destination, forceReplace = false) {\n const shouldReplace = forceReplace || !this._destination;\n const newState = {\n fingerprint: this._fingerprint,\n uid: shouldReplace ? this._uid : this._uid + 1,\n destination,\n };\n\n if (\n typeof PDFJSDev !== \"undefined\" &&\n PDFJSDev.test(\"CHROME\") &&\n window.history.state &&\n window.history.state.chromecomState\n ) {\n // history.state.chromecomState is managed by chromecom.js.\n newState.chromecomState = window.history.state.chromecomState;\n }\n this._updateInternalState(destination, newState.uid);\n\n let newUrl;\n if (this._updateUrl && destination && destination.hash) {\n const baseUrl = document.location.href.split(\"#\")[0];\n // Prevent errors in Firefox.\n if (!baseUrl.startsWith(\"file://\")) {\n newUrl = `${baseUrl}#${destination.hash}`;\n }\n }\n if (shouldReplace) {\n window.history.replaceState(newState, \"\", newUrl);\n } else {\n this._maxUid = this._uid;\n window.history.pushState(newState, \"\", newUrl);\n }\n\n if (\n typeof PDFJSDev !== \"undefined\" &&\n PDFJSDev.test(\"CHROME\") &&\n top === window\n ) {\n // eslint-disable-next-line no-undef\n chrome.runtime.sendMessage(\"showPageAction\");\n }\n }\n\n /**\n * @private\n */\n _tryPushCurrentPosition(temporary = false) {\n if (!this._position) {\n return;\n }\n let position = this._position;\n if (temporary) {\n position = Object.assign(Object.create(null), this._position);\n position.temporary = true;\n }\n\n if (!this._destination) {\n this._pushOrReplaceState(position);\n return;\n }\n if (this._destination.temporary) {\n // Always replace a previous *temporary* position.\n this._pushOrReplaceState(position, /* forceReplace = */ true);\n return;\n }\n if (this._destination.hash === position.hash) {\n return; // The current document position has not changed.\n }\n if (\n !this._destination.page &&\n (POSITION_UPDATED_THRESHOLD <= 0 ||\n this._numPositionUpdates <= POSITION_UPDATED_THRESHOLD)\n ) {\n // `this._destination` was set through the user changing the hash of\n // the document. Do not add `this._position` to the browser history,\n // to avoid \"flooding\" it with lots of (nearly) identical entries,\n // since we cannot ensure that the document position has changed.\n return;\n }\n\n let forceReplace = false;\n if (\n this._destination.page >= position.first &&\n this._destination.page <= position.page\n ) {\n // When the `page` of `this._destination` is still visible, do not\n // update the browsing history when `this._destination` either:\n // - contains an internal destination, since in this case we\n // cannot ensure that the document position has actually changed.\n // - was set through the user changing the hash of the document.\n if (this._destination.dest || !this._destination.first) {\n return;\n }\n // To avoid \"flooding\" the browser history, replace the current entry.\n forceReplace = true;\n }\n this._pushOrReplaceState(position, forceReplace);\n }\n\n /**\n * @private\n */\n _isValidState(state, checkReload = false) {\n if (!state) {\n return false;\n }\n if (state.fingerprint !== this._fingerprint) {\n if (checkReload) {\n // Potentially accept the history entry, even if the fingerprints don't\n // match, when the viewer was reloaded (see issue 6847).\n if (\n typeof state.fingerprint !== \"string\" ||\n state.fingerprint.length !== this._fingerprint.length\n ) {\n return false;\n }\n const [perfEntry] = performance.getEntriesByType(\"navigation\");\n if (!perfEntry || perfEntry.type !== \"reload\") {\n return false;\n }\n } else {\n // This should only occur in viewers with support for opening more than\n // one PDF document, e.g. the GENERIC viewer.\n return false;\n }\n }\n if (!Number.isInteger(state.uid) || state.uid < 0) {\n return false;\n }\n if (state.destination === null || typeof state.destination !== \"object\") {\n return false;\n }\n return true;\n }\n\n /**\n * @private\n */\n _updateInternalState(destination, uid, removeTemporary = false) {\n if (this._updateViewareaTimeout) {\n // When updating `this._destination`, make sure that we always wait for\n // the next 'updateviewarea' event before (potentially) attempting to\n // push the current position to the browser history.\n clearTimeout(this._updateViewareaTimeout);\n this._updateViewareaTimeout = null;\n }\n if (removeTemporary && destination && destination.temporary) {\n // When the `destination` comes from the browser history,\n // we no longer treat it as a *temporary* position.\n delete destination.temporary;\n }\n this._destination = destination;\n this._uid = uid;\n // This should always be reset when `this._destination` is updated.\n this._numPositionUpdates = 0;\n }\n\n /**\n * @private\n */\n _parseCurrentHash() {\n const hash = unescape(getCurrentHash()).substring(1);\n let page = parseQueryString(hash).page | 0;\n\n if (\n !(\n Number.isInteger(page) &&\n page > 0 &&\n page <= this.linkService.pagesCount\n )\n ) {\n page = null;\n }\n return { hash, page, rotation: this.linkService.rotation };\n }\n\n /**\n * @private\n */\n _updateViewarea({ location }) {\n if (this._updateViewareaTimeout) {\n clearTimeout(this._updateViewareaTimeout);\n this._updateViewareaTimeout = null;\n }\n\n this._position = {\n hash: this._isViewerInPresentationMode\n ? `page=${location.pageNumber}`\n : location.pdfOpenParams.substring(1),\n page: this.linkService.page,\n first: location.pageNumber,\n rotation: location.rotation,\n };\n\n if (this._popStateInProgress) {\n return;\n }\n\n if (\n POSITION_UPDATED_THRESHOLD > 0 &&\n this._isPagesLoaded &&\n this._destination &&\n !this._destination.page\n ) {\n // If the current destination was set through the user changing the hash\n // of the document, we will usually not try to push the current position\n // to the browser history; see `this._tryPushCurrentPosition()`.\n //\n // To prevent `this._tryPushCurrentPosition()` from effectively being\n // reduced to a no-op in this case, we will assume that the position\n // *did* in fact change if the 'updateviewarea' event was dispatched\n // more than `POSITION_UPDATED_THRESHOLD` times.\n this._numPositionUpdates++;\n }\n\n if (UPDATE_VIEWAREA_TIMEOUT > 0) {\n // When closing the browser, a 'pagehide' event will be dispatched which\n // *should* allow us to push the current position to the browser history.\n // In practice, it seems that the event is arriving too late in order for\n // the session history to be successfully updated.\n // (For additional details, please refer to the discussion in\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1153393.)\n //\n // To workaround this we attempt to *temporarily* add the current position\n // to the browser history only when the viewer is *idle*,\n // i.e. when scrolling and/or zooming does not occur.\n //\n // PLEASE NOTE: It's absolutely imperative that the browser history is\n // *not* updated too often, since that would render the viewer more or\n // less unusable. Hence the use of a timeout to delay the update until\n // the viewer has been idle for `UPDATE_VIEWAREA_TIMEOUT` milliseconds.\n this._updateViewareaTimeout = setTimeout(() => {\n if (!this._popStateInProgress) {\n this._tryPushCurrentPosition(/* temporary = */ true);\n }\n this._updateViewareaTimeout = null;\n }, UPDATE_VIEWAREA_TIMEOUT);\n }\n }\n\n /**\n * @private\n */\n _popState({ state }) {\n const newHash = getCurrentHash(),\n hashChanged = this._currentHash !== newHash;\n this._currentHash = newHash;\n\n if (\n (typeof PDFJSDev !== \"undefined\" &&\n PDFJSDev.test(\"CHROME\") &&\n state &&\n state.chromecomState &&\n !this._isValidState(state)) ||\n !state\n ) {\n // This case corresponds to the user changing the hash of the document.\n this._uid++;\n\n const { hash, page, rotation } = this._parseCurrentHash();\n this._pushOrReplaceState(\n { hash, page, rotation },\n /* forceReplace = */ true\n );\n return;\n }\n if (!this._isValidState(state)) {\n // This should only occur in viewers with support for opening more than\n // one PDF document, e.g. the GENERIC viewer.\n return;\n }\n\n // Prevent the browser history from updating until the new destination,\n // as stored in the browser history, has been scrolled into view.\n this._popStateInProgress = true;\n\n if (hashChanged) {\n // When the hash changed, implying that the 'popstate' event will be\n // followed by a 'hashchange' event, then we do *not* want to update the\n // browser history when handling the 'hashchange' event (in web/app.js)\n // since that would *overwrite* the new destination navigated to below.\n //\n // To avoid accidentally disabling all future user-initiated hash changes,\n // if there's e.g. another 'hashchange' listener that stops the event\n // propagation, we make sure to always force-reset `this._blockHashChange`\n // after `HASH_CHANGE_TIMEOUT` milliseconds have passed.\n this._blockHashChange++;\n waitOnEventOrTimeout({\n target: window,\n name: \"hashchange\",\n delay: HASH_CHANGE_TIMEOUT,\n }).then(() => {\n this._blockHashChange--;\n });\n }\n\n // Navigate to the new destination.\n const destination = state.destination;\n this._updateInternalState(\n destination,\n state.uid,\n /* removeTemporary = */ true\n );\n if (this._uid > this._maxUid) {\n this._maxUid = this._uid;\n }\n\n if (isValidRotation(destination.rotation)) {\n this.linkService.rotation = destination.rotation;\n }\n if (destination.dest) {\n this.linkService.navigateTo(destination.dest);\n } else if (destination.hash) {\n this.linkService.setHash(destination.hash);\n } else if (destination.page) {\n // Fallback case; shouldn't be necessary, but better safe than sorry.\n this.linkService.page = destination.page;\n }\n\n // Since `PDFLinkService.navigateTo` is asynchronous, we thus defer the\n // resetting of `this._popStateInProgress` slightly.\n Promise.resolve().then(() => {\n this._popStateInProgress = false;\n });\n }\n\n /**\n * @private\n */\n _pageHide() {\n // Attempt to push the `this._position` into the browser history when\n // navigating away from the document. This is *only* done if the history\n // is empty/temporary, since otherwise an existing browser history entry\n // will end up being overwritten (given that new entries cannot be pushed\n // into the browser history when the 'unload' event has already fired).\n if (!this._destination || this._destination.temporary) {\n this._tryPushCurrentPosition();\n }\n }\n\n /**\n * @private\n */\n _bindEvents() {\n if (this._boundEvents) {\n return; // The event listeners were already added.\n }\n this._boundEvents = {\n updateViewarea: this._updateViewarea.bind(this),\n popState: this._popState.bind(this),\n pageHide: this._pageHide.bind(this),\n };\n\n this.eventBus._on(\"updateviewarea\", this._boundEvents.updateViewarea);\n window.addEventListener(\"popstate\", this._boundEvents.popState);\n window.addEventListener(\"pagehide\", this._boundEvents.pageHide);\n }\n\n /**\n * @private\n */\n _unbindEvents() {\n if (!this._boundEvents) {\n return; // The event listeners were already removed.\n }\n this.eventBus._off(\"updateviewarea\", this._boundEvents.updateViewarea);\n window.removeEventListener(\"popstate\", this._boundEvents.popState);\n window.removeEventListener(\"pagehide\", this._boundEvents.pageHide);\n\n this._boundEvents = null;\n }\n}\n\nfunction isDestHashesEqual(destHash, pushHash) {\n if (typeof destHash !== \"string\" || typeof pushHash !== \"string\") {\n return false;\n }\n if (destHash === pushHash) {\n return true;\n }\n const { nameddest } = parseQueryString(destHash);\n if (nameddest === pushHash) {\n return true;\n }\n return false;\n}\n\nfunction isDestArraysEqual(firstDest, secondDest) {\n function isEntryEqual(first, second) {\n if (typeof first !== typeof second) {\n return false;\n }\n if (Array.isArray(first) || Array.isArray(second)) {\n return false;\n }\n if (first !== null && typeof first === \"object\" && second !== null) {\n if (Object.keys(first).length !== Object.keys(second).length) {\n return false;\n }\n for (const key in first) {\n if (!isEntryEqual(first[key], second[key])) {\n return false;\n }\n }\n return true;\n }\n return first === second || (Number.isNaN(first) && Number.isNaN(second));\n }\n\n if (!(Array.isArray(firstDest) && Array.isArray(secondDest))) {\n return false;\n }\n if (firstDest.length !== secondDest.length) {\n return false;\n }\n for (let i = 0, ii = firstDest.length; i < ii; i++) {\n if (!isEntryEqual(firstDest[i], secondDest[i])) {\n return false;\n }\n }\n return true;\n}\n\nexport { PDFHistory, isDestHashesEqual, isDestArraysEqual };\n","/* Copyright 2015 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getGlobalEventBus, parseQueryString } from \"./ui_utils.js\";\n\n/**\n * @typedef {Object} PDFLinkServiceOptions\n * @property {EventBus} eventBus - The application event bus.\n * @property {number} [externalLinkTarget] - Specifies the `target` attribute\n * for external links. Must use one of the values from {LinkTarget}.\n * Defaults to using no target.\n * @property {string} [externalLinkRel] - Specifies the `rel` attribute for\n * external links. Defaults to stripping the referrer.\n * @property {boolean} [ignoreDestinationZoom] - Ignores the zoom argument,\n * thus preserving the current zoom level in the viewer, when navigating\n * to internal destinations. The default value is `false`.\n */\n\n/**\n * Performs navigation functions inside PDF, such as opening specified page,\n * or destination.\n * @implements {IPDFLinkService}\n */\nclass PDFLinkService {\n /**\n * @param {PDFLinkServiceOptions} options\n */\n constructor({\n eventBus,\n externalLinkTarget = null,\n externalLinkRel = null,\n externalLinkEnabled = true,\n ignoreDestinationZoom = false,\n } = {}) {\n this.eventBus = eventBus || getGlobalEventBus();\n this.externalLinkTarget = externalLinkTarget;\n this.externalLinkRel = externalLinkRel;\n this.externalLinkEnabled = externalLinkEnabled;\n this._ignoreDestinationZoom = ignoreDestinationZoom;\n\n this.baseUrl = null;\n this.pdfDocument = null;\n this.pdfViewer = null;\n this.pdfHistory = null;\n\n this._pagesRefCache = null;\n }\n\n setDocument(pdfDocument, baseUrl = null) {\n this.baseUrl = baseUrl;\n this.pdfDocument = pdfDocument;\n this._pagesRefCache = Object.create(null);\n }\n\n setViewer(pdfViewer) {\n this.pdfViewer = pdfViewer;\n }\n\n setHistory(pdfHistory) {\n this.pdfHistory = pdfHistory;\n }\n\n /**\n * @type {number}\n */\n get pagesCount() {\n return this.pdfDocument ? this.pdfDocument.numPages : 0;\n }\n\n /**\n * @type {number}\n */\n get page() {\n return this.pdfViewer.currentPageNumber;\n }\n\n /**\n * @param {number} value\n */\n set page(value) {\n this.pdfViewer.currentPageNumber = value;\n }\n\n /**\n * @type {number}\n */\n get rotation() {\n return this.pdfViewer.pagesRotation;\n }\n\n /**\n * @param {number} value\n */\n set rotation(value) {\n this.pdfViewer.pagesRotation = value;\n }\n\n /**\n * @param {string|Array} dest - The named, or explicit, PDF destination.\n */\n navigateTo(dest) {\n const goToDestination = ({ namedDest, explicitDest }) => {\n // Dest array looks like that: <page-ref> </XYZ|/FitXXX> <args..>\n const destRef = explicitDest[0];\n let pageNumber;\n\n if (destRef instanceof Object) {\n pageNumber = this._cachedPageNumber(destRef);\n\n if (pageNumber === null) {\n // Fetch the page reference if it's not yet available. This could\n // only occur during loading, before all pages have been resolved.\n this.pdfDocument\n .getPageIndex(destRef)\n .then(pageIndex => {\n this.cachePageRef(pageIndex + 1, destRef);\n goToDestination({ namedDest, explicitDest });\n })\n .catch(() => {\n console.error(\n `PDFLinkService.navigateTo: \"${destRef}\" is not ` +\n `a valid page reference, for dest=\"${dest}\".`\n );\n });\n return;\n }\n } else if (Number.isInteger(destRef)) {\n pageNumber = destRef + 1;\n } else {\n console.error(\n `PDFLinkService.navigateTo: \"${destRef}\" is not ` +\n `a valid destination reference, for dest=\"${dest}\".`\n );\n return;\n }\n if (!pageNumber || pageNumber < 1 || pageNumber > this.pagesCount) {\n console.error(\n `PDFLinkService.navigateTo: \"${pageNumber}\" is not ` +\n `a valid page number, for dest=\"${dest}\".`\n );\n return;\n }\n\n if (this.pdfHistory) {\n // Update the browser history before scrolling the new destination into\n // view, to be able to accurately capture the current document position.\n this.pdfHistory.pushCurrentPosition();\n this.pdfHistory.push({ namedDest, explicitDest, pageNumber });\n }\n\n this.pdfViewer.scrollPageIntoView({\n pageNumber,\n destArray: explicitDest,\n ignoreDestinationZoom: this._ignoreDestinationZoom,\n });\n };\n\n new Promise((resolve, reject) => {\n if (typeof dest === \"string\") {\n this.pdfDocument.getDestination(dest).then(destArray => {\n resolve({\n namedDest: dest,\n explicitDest: destArray,\n });\n });\n return;\n }\n resolve({\n namedDest: \"\",\n explicitDest: dest,\n });\n }).then(data => {\n if (!Array.isArray(data.explicitDest)) {\n console.error(\n `PDFLinkService.navigateTo: \"${data.explicitDest}\" is` +\n ` not a valid destination array, for dest=\"${dest}\".`\n );\n return;\n }\n goToDestination(data);\n });\n }\n\n /**\n * @param {string|Array} dest - The PDF destination object.\n * @returns {string} The hyperlink to the PDF object.\n */\n getDestinationHash(dest) {\n if (typeof dest === \"string\") {\n return this.getAnchorUrl(\"#\" + escape(dest));\n }\n if (Array.isArray(dest)) {\n const str = JSON.stringify(dest);\n return this.getAnchorUrl(\"#\" + escape(str));\n }\n return this.getAnchorUrl(\"\");\n }\n\n /**\n * Prefix the full url on anchor links to make sure that links are resolved\n * relative to the current URL instead of the one defined in <base href>.\n * @param {string} anchor The anchor hash, including the #.\n * @returns {string} The hyperlink to the PDF object.\n */\n getAnchorUrl(anchor) {\n return (this.baseUrl || \"\") + anchor;\n }\n\n /**\n * @param {string} hash\n */\n setHash(hash) {\n let pageNumber, dest;\n if (hash.includes(\"=\")) {\n const params = parseQueryString(hash);\n if (\"search\" in params) {\n this.eventBus.dispatch(\"findfromurlhash\", {\n source: this,\n query: params[\"search\"].replace(/\"/g, \"\"),\n phraseSearch: params[\"phrase\"] === \"true\",\n });\n }\n // borrowing syntax from \"Parameters for Opening PDF Files\"\n if (\"nameddest\" in params) {\n this.navigateTo(params.nameddest);\n return;\n }\n if (\"page\" in params) {\n pageNumber = params.page | 0 || 1;\n }\n if (\"zoom\" in params) {\n // Build the destination array.\n const zoomArgs = params.zoom.split(\",\"); // scale,left,top\n const zoomArg = zoomArgs[0];\n const zoomArgNumber = parseFloat(zoomArg);\n\n if (!zoomArg.includes(\"Fit\")) {\n // If the zoomArg is a number, it has to get divided by 100. If it's\n // a string, it should stay as it is.\n dest = [\n null,\n { name: \"XYZ\" },\n zoomArgs.length > 1 ? zoomArgs[1] | 0 : null,\n zoomArgs.length > 2 ? zoomArgs[2] | 0 : null,\n zoomArgNumber ? zoomArgNumber / 100 : zoomArg,\n ];\n } else {\n if (zoomArg === \"Fit\" || zoomArg === \"FitB\") {\n dest = [null, { name: zoomArg }];\n } else if (\n zoomArg === \"FitH\" ||\n zoomArg === \"FitBH\" ||\n zoomArg === \"FitV\" ||\n zoomArg === \"FitBV\"\n ) {\n dest = [\n null,\n { name: zoomArg },\n zoomArgs.length > 1 ? zoomArgs[1] | 0 : null,\n ];\n } else if (zoomArg === \"FitR\") {\n if (zoomArgs.length !== 5) {\n console.error(\n 'PDFLinkService.setHash: Not enough parameters for \"FitR\".'\n );\n } else {\n dest = [\n null,\n { name: zoomArg },\n zoomArgs[1] | 0,\n zoomArgs[2] | 0,\n zoomArgs[3] | 0,\n zoomArgs[4] | 0,\n ];\n }\n } else {\n console.error(\n `PDFLinkService.setHash: \"${zoomArg}\" is not ` +\n \"a valid zoom value.\"\n );\n }\n }\n }\n if (dest) {\n this.pdfViewer.scrollPageIntoView({\n pageNumber: pageNumber || this.page,\n destArray: dest,\n allowNegativeOffset: true,\n });\n } else if (pageNumber) {\n this.page = pageNumber; // simple page\n }\n if (\"pagemode\" in params) {\n this.eventBus.dispatch(\"pagemode\", {\n source: this,\n mode: params.pagemode,\n });\n }\n } else {\n // Named (or explicit) destination.\n dest = unescape(hash);\n try {\n dest = JSON.parse(dest);\n\n if (!Array.isArray(dest)) {\n // Avoid incorrectly rejecting a valid named destination, such as\n // e.g. \"4.3\" or \"true\", because `JSON.parse` converted its type.\n dest = dest.toString();\n }\n } catch (ex) {}\n\n if (typeof dest === \"string\" || isValidExplicitDestination(dest)) {\n this.navigateTo(dest);\n return;\n }\n console.error(\n `PDFLinkService.setHash: \"${unescape(hash)}\" is not ` +\n \"a valid destination.\"\n );\n }\n }\n\n /**\n * @param {string} action\n */\n executeNamedAction(action) {\n // See PDF reference, table 8.45 - Named action\n switch (action) {\n case \"GoBack\":\n if (this.pdfHistory) {\n this.pdfHistory.back();\n }\n break;\n\n case \"GoForward\":\n if (this.pdfHistory) {\n this.pdfHistory.forward();\n }\n break;\n\n case \"NextPage\":\n if (this.page < this.pagesCount) {\n this.page++;\n }\n break;\n\n case \"PrevPage\":\n if (this.page > 1) {\n this.page--;\n }\n break;\n\n case \"LastPage\":\n this.page = this.pagesCount;\n break;\n\n case \"FirstPage\":\n this.page = 1;\n break;\n\n default:\n break; // No action according to spec\n }\n\n this.eventBus.dispatch(\"namedaction\", {\n source: this,\n action,\n });\n }\n\n /**\n * @param {number} pageNum - page number.\n * @param {Object} pageRef - reference to the page.\n */\n cachePageRef(pageNum, pageRef) {\n if (!pageRef) {\n return;\n }\n const refStr =\n pageRef.gen === 0 ? `${pageRef.num}R` : `${pageRef.num}R${pageRef.gen}`;\n this._pagesRefCache[refStr] = pageNum;\n }\n\n _cachedPageNumber(pageRef) {\n const refStr =\n pageRef.gen === 0 ? `${pageRef.num}R` : `${pageRef.num}R${pageRef.gen}`;\n return (this._pagesRefCache && this._pagesRefCache[refStr]) || null;\n }\n\n /**\n * @param {number} pageNumber\n */\n isPageVisible(pageNumber) {\n return this.pdfViewer.isPageVisible(pageNumber);\n }\n}\n\nfunction isValidExplicitDestination(dest) {\n if (!Array.isArray(dest)) {\n return false;\n }\n const destLength = dest.length;\n if (destLength < 2) {\n return false;\n }\n const page = dest[0];\n if (\n !(\n typeof page === \"object\" &&\n Number.isInteger(page.num) &&\n Number.isInteger(page.gen)\n ) &&\n !(Number.isInteger(page) && page >= 0)\n ) {\n return false;\n }\n const zoom = dest[1];\n if (!(typeof zoom === \"object\" && typeof zoom.name === \"string\")) {\n return false;\n }\n let allowNull = true;\n switch (zoom.name) {\n case \"XYZ\":\n if (destLength !== 5) {\n return false;\n }\n break;\n case \"Fit\":\n case \"FitB\":\n return destLength === 2;\n case \"FitH\":\n case \"FitBH\":\n case \"FitV\":\n case \"FitBV\":\n if (destLength !== 3) {\n return false;\n }\n break;\n case \"FitR\":\n if (destLength !== 6) {\n return false;\n }\n allowNull = false;\n break;\n default:\n return false;\n }\n for (let i = 2; i < destLength; i++) {\n const param = dest[i];\n if (!(typeof param === \"number\" || (allowNull && param === null))) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * @implements {IPDFLinkService}\n */\nclass SimpleLinkService {\n constructor() {\n this.externalLinkTarget = null;\n this.externalLinkRel = null;\n this.externalLinkEnabled = true;\n this._ignoreDestinationZoom = false;\n }\n\n /**\n * @type {number}\n */\n get pagesCount() {\n return 0;\n }\n\n /**\n * @type {number}\n */\n get page() {\n return 0;\n }\n\n /**\n * @param {number} value\n */\n set page(value) {}\n\n /**\n * @type {number}\n */\n get rotation() {\n return 0;\n }\n\n /**\n * @param {number} value\n */\n set rotation(value) {}\n\n /**\n * @param dest - The PDF destination object.\n */\n navigateTo(dest) {}\n\n /**\n * @param dest - The PDF destination object.\n * @returns {string} The hyperlink to the PDF object.\n */\n getDestinationHash(dest) {\n return \"#\";\n }\n\n /**\n * @param hash - The PDF parameters/hash.\n * @returns {string} The hyperlink to the PDF object.\n */\n getAnchorUrl(hash) {\n return \"#\";\n }\n\n /**\n * @param {string} hash\n */\n setHash(hash) {}\n\n /**\n * @param {string} action\n */\n executeNamedAction(action) {}\n\n /**\n * @param {number} pageNum - page number.\n * @param {Object} pageRef - reference to the page.\n */\n cachePageRef(pageNum, pageRef) {}\n\n /**\n * @param {number} pageNumber\n */\n isPageVisible(pageNumber) {\n return true;\n }\n}\n\nexport { PDFLinkService, SimpleLinkService };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { addLinkAttributes, LinkTarget, removeNullCharacters } from \"pdfjs-lib\";\n\nconst DEFAULT_TITLE = \"\\u2013\";\n\n/**\n * @typedef {Object} PDFOutlineViewerOptions\n * @property {HTMLDivElement} container - The viewer element.\n * @property {IPDFLinkService} linkService - The navigation/linking service.\n * @property {EventBus} eventBus - The application event bus.\n */\n\n/**\n * @typedef {Object} PDFOutlineViewerRenderParameters\n * @property {Array|null} outline - An array of outline objects.\n */\n\nclass PDFOutlineViewer {\n /**\n * @param {PDFOutlineViewerOptions} options\n */\n constructor({ container, linkService, eventBus }) {\n this.container = container;\n this.linkService = linkService;\n this.eventBus = eventBus;\n\n this.reset();\n\n eventBus._on(\"toggleoutlinetree\", this.toggleOutlineTree.bind(this));\n }\n\n reset() {\n this.outline = null;\n this.lastToggleIsShow = true;\n\n // Remove the outline from the DOM.\n this.container.textContent = \"\";\n\n // Ensure that the left (right in RTL locales) margin is always reset,\n // to prevent incorrect outline alignment if a new document is opened.\n this.container.classList.remove(\"outlineWithDeepNesting\");\n }\n\n /**\n * @private\n */\n _dispatchEvent(outlineCount) {\n this.eventBus.dispatch(\"outlineloaded\", {\n source: this,\n outlineCount,\n });\n }\n\n /**\n * @private\n */\n _bindLink(element, { url, newWindow, dest }) {\n const { linkService } = this;\n\n if (url) {\n addLinkAttributes(element, {\n url,\n target: newWindow ? LinkTarget.BLANK : linkService.externalLinkTarget,\n rel: linkService.externalLinkRel,\n enabled: linkService.externalLinkEnabled,\n });\n return;\n }\n\n element.href = linkService.getDestinationHash(dest);\n element.onclick = () => {\n if (dest) {\n linkService.navigateTo(dest);\n }\n return false;\n };\n }\n\n /**\n * @private\n */\n _setStyles(element, { bold, italic }) {\n if (bold) {\n element.style.fontWeight = \"bold\";\n }\n if (italic) {\n element.style.fontStyle = \"italic\";\n }\n }\n\n /**\n * Prepend a button before an outline item which allows the user to toggle\n * the visibility of all outline items at that level.\n *\n * @private\n */\n _addToggleButton(div, { count, items }) {\n const toggler = document.createElement(\"div\");\n toggler.className = \"outlineItemToggler\";\n if (count < 0 && Math.abs(count) === items.length) {\n toggler.classList.add(\"outlineItemsHidden\");\n }\n toggler.onclick = evt => {\n evt.stopPropagation();\n toggler.classList.toggle(\"outlineItemsHidden\");\n\n if (evt.shiftKey) {\n const shouldShowAll = !toggler.classList.contains(\"outlineItemsHidden\");\n this._toggleOutlineItem(div, shouldShowAll);\n }\n };\n div.insertBefore(toggler, div.firstChild);\n }\n\n /**\n * Toggle the visibility of the subtree of an outline item.\n *\n * @param {Element} root - the root of the outline (sub)tree.\n * @param {boolean} show - whether to show the outline (sub)tree. If false,\n * the outline subtree rooted at |root| will be collapsed.\n *\n * @private\n */\n _toggleOutlineItem(root, show = false) {\n this.lastToggleIsShow = show;\n for (const toggler of root.querySelectorAll(\".outlineItemToggler\")) {\n toggler.classList.toggle(\"outlineItemsHidden\", !show);\n }\n }\n\n /**\n * Collapse or expand all subtrees of the outline.\n */\n toggleOutlineTree() {\n if (!this.outline) {\n return;\n }\n this._toggleOutlineItem(this.container, !this.lastToggleIsShow);\n }\n\n /**\n * @param {PDFOutlineViewerRenderParameters} params\n */\n render({ outline }) {\n let outlineCount = 0;\n\n if (this.outline) {\n this.reset();\n }\n this.outline = outline || null;\n\n if (!outline) {\n this._dispatchEvent(outlineCount);\n return;\n }\n\n const fragment = document.createDocumentFragment();\n const queue = [{ parent: fragment, items: this.outline }];\n let hasAnyNesting = false;\n while (queue.length > 0) {\n const levelData = queue.shift();\n for (const item of levelData.items) {\n const div = document.createElement(\"div\");\n div.className = \"outlineItem\";\n\n const element = document.createElement(\"a\");\n this._bindLink(element, item);\n this._setStyles(element, item);\n element.textContent = removeNullCharacters(item.title) || DEFAULT_TITLE;\n\n div.appendChild(element);\n\n if (item.items.length > 0) {\n hasAnyNesting = true;\n this._addToggleButton(div, item);\n\n const itemsDiv = document.createElement(\"div\");\n itemsDiv.className = \"outlineItems\";\n div.appendChild(itemsDiv);\n queue.push({ parent: itemsDiv, items: item.items });\n }\n\n levelData.parent.appendChild(div);\n outlineCount++;\n }\n }\n if (hasAnyNesting) {\n this.container.classList.add(\"outlineWithDeepNesting\");\n\n this.lastToggleIsShow =\n fragment.querySelectorAll(\".outlineItemsHidden\").length === 0;\n }\n\n this.container.appendChild(fragment);\n\n this._dispatchEvent(outlineCount);\n }\n}\n\nexport { PDFOutlineViewer };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { normalizeWheelEventDelta } from \"./ui_utils.js\";\n\nconst DELAY_BEFORE_RESETTING_SWITCH_IN_PROGRESS = 1500; // in ms\nconst DELAY_BEFORE_HIDING_CONTROLS = 3000; // in ms\nconst ACTIVE_SELECTOR = \"pdfPresentationMode\";\nconst CONTROLS_SELECTOR = \"pdfPresentationModeControls\";\nconst MOUSE_SCROLL_COOLDOWN_TIME = 50; // in ms\nconst PAGE_SWITCH_THRESHOLD = 0.1;\n\n// Number of CSS pixels for a movement to count as a swipe.\nconst SWIPE_MIN_DISTANCE_THRESHOLD = 50;\n\n// Swipe angle deviation from the x or y axis before it is not\n// considered a swipe in that direction any more.\nconst SWIPE_ANGLE_THRESHOLD = Math.PI / 6;\n\n/**\n * @typedef {Object} PDFPresentationModeOptions\n * @property {HTMLDivElement} container - The container for the viewer element.\n * @property {PDFViewer} pdfViewer - The document viewer.\n * @property {EventBus} eventBus - The application event bus.\n * @property {Array} [contextMenuItems] - The menu items that are added to the\n * context menu in Presentation Mode.\n */\n\nclass PDFPresentationMode {\n /**\n * @param {PDFPresentationModeOptions} options\n */\n constructor({ container, pdfViewer, eventBus, contextMenuItems = null }) {\n this.container = container;\n this.pdfViewer = pdfViewer;\n this.eventBus = eventBus;\n\n this.active = false;\n this.args = null;\n this.contextMenuOpen = false;\n this.mouseScrollTimeStamp = 0;\n this.mouseScrollDelta = 0;\n this.touchSwipeState = null;\n\n if (contextMenuItems) {\n contextMenuItems.contextFirstPage.addEventListener(\"click\", () => {\n this.contextMenuOpen = false;\n this.eventBus.dispatch(\"firstpage\", { source: this });\n });\n contextMenuItems.contextLastPage.addEventListener(\"click\", () => {\n this.contextMenuOpen = false;\n this.eventBus.dispatch(\"lastpage\", { source: this });\n });\n contextMenuItems.contextPageRotateCw.addEventListener(\"click\", () => {\n this.contextMenuOpen = false;\n this.eventBus.dispatch(\"rotatecw\", { source: this });\n });\n contextMenuItems.contextPageRotateCcw.addEventListener(\"click\", () => {\n this.contextMenuOpen = false;\n this.eventBus.dispatch(\"rotateccw\", { source: this });\n });\n }\n }\n\n /**\n * Request the browser to enter fullscreen mode.\n * @returns {boolean} Indicating if the request was successful.\n */\n request() {\n if (this.switchInProgress || this.active || !this.pdfViewer.pagesCount) {\n return false;\n }\n this._addFullscreenChangeListeners();\n this._setSwitchInProgress();\n this._notifyStateChange();\n\n if (this.container.requestFullscreen) {\n this.container.requestFullscreen();\n } else if (this.container.mozRequestFullScreen) {\n this.container.mozRequestFullScreen();\n } else if (this.container.webkitRequestFullscreen) {\n this.container.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);\n } else if (this.container.msRequestFullscreen) {\n this.container.msRequestFullscreen();\n } else {\n return false;\n }\n\n this.args = {\n page: this.pdfViewer.currentPageNumber,\n previousScale: this.pdfViewer.currentScaleValue,\n };\n\n return true;\n }\n\n /**\n * @private\n */\n _mouseWheel(evt) {\n if (!this.active) {\n return;\n }\n\n evt.preventDefault();\n\n const delta = normalizeWheelEventDelta(evt);\n const currentTime = new Date().getTime();\n const storedTime = this.mouseScrollTimeStamp;\n\n // If we've already switched page, avoid accidentally switching again.\n if (\n currentTime > storedTime &&\n currentTime - storedTime < MOUSE_SCROLL_COOLDOWN_TIME\n ) {\n return;\n }\n // If the scroll direction changed, reset the accumulated scroll delta.\n if (\n (this.mouseScrollDelta > 0 && delta < 0) ||\n (this.mouseScrollDelta < 0 && delta > 0)\n ) {\n this._resetMouseScrollState();\n }\n this.mouseScrollDelta += delta;\n\n if (Math.abs(this.mouseScrollDelta) >= PAGE_SWITCH_THRESHOLD) {\n const totalDelta = this.mouseScrollDelta;\n this._resetMouseScrollState();\n const success =\n totalDelta > 0 ? this._goToPreviousPage() : this._goToNextPage();\n if (success) {\n this.mouseScrollTimeStamp = currentTime;\n }\n }\n }\n\n get isFullscreen() {\n return !!(\n document.fullscreenElement ||\n document.mozFullScreen ||\n document.webkitIsFullScreen ||\n document.msFullscreenElement\n );\n }\n\n /**\n * @private\n */\n _goToPreviousPage() {\n const page = this.pdfViewer.currentPageNumber;\n // If we're at the first page, we don't need to do anything.\n if (page <= 1) {\n return false;\n }\n this.pdfViewer.currentPageNumber = page - 1;\n return true;\n }\n\n /**\n * @private\n */\n _goToNextPage() {\n const page = this.pdfViewer.currentPageNumber;\n // If we're at the last page, we don't need to do anything.\n if (page >= this.pdfViewer.pagesCount) {\n return false;\n }\n this.pdfViewer.currentPageNumber = page + 1;\n return true;\n }\n\n /**\n * @private\n */\n _notifyStateChange() {\n this.eventBus.dispatch(\"presentationmodechanged\", {\n source: this,\n active: this.active,\n switchInProgress: !!this.switchInProgress,\n });\n }\n\n /**\n * Used to initialize a timeout when requesting Presentation Mode,\n * i.e. when the browser is requested to enter fullscreen mode.\n * This timeout is used to prevent the current page from being scrolled\n * partially, or completely, out of view when entering Presentation Mode.\n * NOTE: This issue seems limited to certain zoom levels (e.g. page-width).\n *\n * @private\n */\n _setSwitchInProgress() {\n if (this.switchInProgress) {\n clearTimeout(this.switchInProgress);\n }\n this.switchInProgress = setTimeout(() => {\n this._removeFullscreenChangeListeners();\n delete this.switchInProgress;\n this._notifyStateChange();\n }, DELAY_BEFORE_RESETTING_SWITCH_IN_PROGRESS);\n }\n\n /**\n * @private\n */\n _resetSwitchInProgress() {\n if (this.switchInProgress) {\n clearTimeout(this.switchInProgress);\n delete this.switchInProgress;\n }\n }\n\n /**\n * @private\n */\n _enter() {\n this.active = true;\n this._resetSwitchInProgress();\n this._notifyStateChange();\n this.container.classList.add(ACTIVE_SELECTOR);\n\n // Ensure that the correct page is scrolled into view when entering\n // Presentation Mode, by waiting until fullscreen mode in enabled.\n setTimeout(() => {\n this.pdfViewer.currentPageNumber = this.args.page;\n this.pdfViewer.currentScaleValue = \"page-fit\";\n }, 0);\n\n this._addWindowListeners();\n this._showControls();\n this.contextMenuOpen = false;\n this.container.setAttribute(\"contextmenu\", \"viewerContextMenu\");\n\n // Text selection is disabled in Presentation Mode, thus it's not possible\n // for the user to deselect text that is selected (e.g. with \"Select all\")\n // when entering Presentation Mode, hence we remove any active selection.\n window.getSelection().removeAllRanges();\n }\n\n /**\n * @private\n */\n _exit() {\n const page = this.pdfViewer.currentPageNumber;\n this.container.classList.remove(ACTIVE_SELECTOR);\n\n // Ensure that the correct page is scrolled into view when exiting\n // Presentation Mode, by waiting until fullscreen mode is disabled.\n setTimeout(() => {\n this.active = false;\n this._removeFullscreenChangeListeners();\n this._notifyStateChange();\n\n this.pdfViewer.currentScaleValue = this.args.previousScale;\n this.pdfViewer.currentPageNumber = page;\n this.args = null;\n }, 0);\n\n this._removeWindowListeners();\n this._hideControls();\n this._resetMouseScrollState();\n this.container.removeAttribute(\"contextmenu\");\n this.contextMenuOpen = false;\n }\n\n /**\n * @private\n */\n _mouseDown(evt) {\n if (this.contextMenuOpen) {\n this.contextMenuOpen = false;\n evt.preventDefault();\n return;\n }\n if (evt.button === 0) {\n // Enable clicking of links in presentation mode. Note: only links\n // pointing to destinations in the current PDF document work.\n const isInternalLink =\n evt.target.href && evt.target.classList.contains(\"internalLink\");\n if (!isInternalLink) {\n // Unless an internal link was clicked, advance one page.\n evt.preventDefault();\n\n if (evt.shiftKey) {\n this._goToPreviousPage();\n } else {\n this._goToNextPage();\n }\n }\n }\n }\n\n /**\n * @private\n */\n _contextMenu() {\n this.contextMenuOpen = true;\n }\n\n /**\n * @private\n */\n _showControls() {\n if (this.controlsTimeout) {\n clearTimeout(this.controlsTimeout);\n } else {\n this.container.classList.add(CONTROLS_SELECTOR);\n }\n this.controlsTimeout = setTimeout(() => {\n this.container.classList.remove(CONTROLS_SELECTOR);\n delete this.controlsTimeout;\n }, DELAY_BEFORE_HIDING_CONTROLS);\n }\n\n /**\n * @private\n */\n _hideControls() {\n if (!this.controlsTimeout) {\n return;\n }\n clearTimeout(this.controlsTimeout);\n this.container.classList.remove(CONTROLS_SELECTOR);\n delete this.controlsTimeout;\n }\n\n /**\n * Resets the properties used for tracking mouse scrolling events.\n *\n * @private\n */\n _resetMouseScrollState() {\n this.mouseScrollTimeStamp = 0;\n this.mouseScrollDelta = 0;\n }\n\n /**\n * @private\n */\n _touchSwipe(evt) {\n if (!this.active) {\n return;\n }\n if (evt.touches.length > 1) {\n // Multiple touch points detected; cancel the swipe.\n this.touchSwipeState = null;\n return;\n }\n\n switch (evt.type) {\n case \"touchstart\":\n this.touchSwipeState = {\n startX: evt.touches[0].pageX,\n startY: evt.touches[0].pageY,\n endX: evt.touches[0].pageX,\n endY: evt.touches[0].pageY,\n };\n break;\n case \"touchmove\":\n if (this.touchSwipeState === null) {\n return;\n }\n this.touchSwipeState.endX = evt.touches[0].pageX;\n this.touchSwipeState.endY = evt.touches[0].pageY;\n // Avoid the swipe from triggering browser gestures (Chrome in\n // particular has some sort of swipe gesture in fullscreen mode).\n evt.preventDefault();\n break;\n case \"touchend\":\n if (this.touchSwipeState === null) {\n return;\n }\n let delta = 0;\n const dx = this.touchSwipeState.endX - this.touchSwipeState.startX;\n const dy = this.touchSwipeState.endY - this.touchSwipeState.startY;\n const absAngle = Math.abs(Math.atan2(dy, dx));\n if (\n Math.abs(dx) > SWIPE_MIN_DISTANCE_THRESHOLD &&\n (absAngle <= SWIPE_ANGLE_THRESHOLD ||\n absAngle >= Math.PI - SWIPE_ANGLE_THRESHOLD)\n ) {\n // Horizontal swipe.\n delta = dx;\n } else if (\n Math.abs(dy) > SWIPE_MIN_DISTANCE_THRESHOLD &&\n Math.abs(absAngle - Math.PI / 2) <= SWIPE_ANGLE_THRESHOLD\n ) {\n // Vertical swipe.\n delta = dy;\n }\n if (delta > 0) {\n this._goToPreviousPage();\n } else if (delta < 0) {\n this._goToNextPage();\n }\n break;\n }\n }\n\n /**\n * @private\n */\n _addWindowListeners() {\n this.showControlsBind = this._showControls.bind(this);\n this.mouseDownBind = this._mouseDown.bind(this);\n this.mouseWheelBind = this._mouseWheel.bind(this);\n this.resetMouseScrollStateBind = this._resetMouseScrollState.bind(this);\n this.contextMenuBind = this._contextMenu.bind(this);\n this.touchSwipeBind = this._touchSwipe.bind(this);\n\n window.addEventListener(\"mousemove\", this.showControlsBind);\n window.addEventListener(\"mousedown\", this.mouseDownBind);\n window.addEventListener(\"wheel\", this.mouseWheelBind);\n window.addEventListener(\"keydown\", this.resetMouseScrollStateBind);\n window.addEventListener(\"contextmenu\", this.contextMenuBind);\n window.addEventListener(\"touchstart\", this.touchSwipeBind);\n window.addEventListener(\"touchmove\", this.touchSwipeBind);\n window.addEventListener(\"touchend\", this.touchSwipeBind);\n }\n\n /**\n * @private\n */\n _removeWindowListeners() {\n window.removeEventListener(\"mousemove\", this.showControlsBind);\n window.removeEventListener(\"mousedown\", this.mouseDownBind);\n window.removeEventListener(\"wheel\", this.mouseWheelBind);\n window.removeEventListener(\"keydown\", this.resetMouseScrollStateBind);\n window.removeEventListener(\"contextmenu\", this.contextMenuBind);\n window.removeEventListener(\"touchstart\", this.touchSwipeBind);\n window.removeEventListener(\"touchmove\", this.touchSwipeBind);\n window.removeEventListener(\"touchend\", this.touchSwipeBind);\n\n delete this.showControlsBind;\n delete this.mouseDownBind;\n delete this.mouseWheelBind;\n delete this.resetMouseScrollStateBind;\n delete this.contextMenuBind;\n delete this.touchSwipeBind;\n }\n\n /**\n * @private\n */\n _fullscreenChange() {\n if (this.isFullscreen) {\n this._enter();\n } else {\n this._exit();\n }\n }\n\n /**\n * @private\n */\n _addFullscreenChangeListeners() {\n this.fullscreenChangeBind = this._fullscreenChange.bind(this);\n\n window.addEventListener(\"fullscreenchange\", this.fullscreenChangeBind);\n window.addEventListener(\"mozfullscreenchange\", this.fullscreenChangeBind);\n if (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"MOZCENTRAL\")) {\n window.addEventListener(\n \"webkitfullscreenchange\",\n this.fullscreenChangeBind\n );\n window.addEventListener(\"MSFullscreenChange\", this.fullscreenChangeBind);\n }\n }\n\n /**\n * @private\n */\n _removeFullscreenChangeListeners() {\n window.removeEventListener(\"fullscreenchange\", this.fullscreenChangeBind);\n window.removeEventListener(\n \"mozfullscreenchange\",\n this.fullscreenChangeBind\n );\n if (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"MOZCENTRAL\")) {\n window.removeEventListener(\n \"webkitfullscreenchange\",\n this.fullscreenChangeBind\n );\n window.removeEventListener(\n \"MSFullscreenChange\",\n this.fullscreenChangeBind\n );\n }\n\n delete this.fullscreenChangeBind;\n }\n}\n\nexport { PDFPresentationMode };\n","/* Copyright 2017 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { clamp, NullL10n } from \"./ui_utils.js\";\n\nconst SIDEBAR_WIDTH_VAR = \"--sidebar-width\";\nconst SIDEBAR_MIN_WIDTH = 200; // pixels\nconst SIDEBAR_RESIZING_CLASS = \"sidebarResizing\";\n\n/**\n * @typedef {Object} PDFSidebarResizerOptions\n * @property {HTMLDivElement} outerContainer - The outer container\n * (encasing both the viewer and sidebar elements).\n * @property {HTMLDivElement} resizer - The DOM element that can be dragged in\n * order to adjust the width of the sidebar.\n */\n\nclass PDFSidebarResizer {\n /**\n * @param {PDFSidebarResizerOptions} options\n * @param {EventBus} eventBus - The application event bus.\n * @param {IL10n} l10n - Localization service.\n */\n constructor(options, eventBus, l10n = NullL10n) {\n this.enabled = false;\n this.isRTL = false;\n this.sidebarOpen = false;\n this.doc = document.documentElement;\n this._width = null;\n this._outerContainerWidth = null;\n this._boundEvents = Object.create(null);\n\n this.outerContainer = options.outerContainer;\n this.resizer = options.resizer;\n this.eventBus = eventBus;\n this.l10n = l10n;\n\n if (\n (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"MOZCENTRAL\")) &&\n (typeof CSS === \"undefined\" ||\n typeof CSS.supports !== \"function\" ||\n !CSS.supports(SIDEBAR_WIDTH_VAR, `calc(-1 * ${SIDEBAR_MIN_WIDTH}px)`))\n ) {\n console.warn(\n \"PDFSidebarResizer: \" +\n \"The browser does not support resizing of the sidebar.\"\n );\n return;\n }\n this.enabled = true;\n this.resizer.classList.remove(\"hidden\"); // Show the resizer DOM element.\n\n this.l10n.getDirection().then(dir => {\n this.isRTL = dir === \"rtl\";\n });\n this._addEventListeners();\n }\n\n /**\n * @type {number}\n */\n get outerContainerWidth() {\n if (!this._outerContainerWidth) {\n this._outerContainerWidth = this.outerContainer.clientWidth;\n }\n return this._outerContainerWidth;\n }\n\n /**\n * @private\n * returns {boolean} Indicating if the sidebar width was updated.\n */\n _updateWidth(width = 0) {\n if (!this.enabled) {\n return false;\n }\n // Prevent the sidebar from becoming too narrow, or from occupying more\n // than half of the available viewer width.\n const newWidth = clamp(\n width,\n SIDEBAR_MIN_WIDTH,\n Math.floor(this.outerContainerWidth / 2)\n );\n // Only update the UI when the sidebar width did in fact change.\n if (newWidth === this._width) {\n return false;\n }\n this._width = newWidth;\n this.doc.style.setProperty(SIDEBAR_WIDTH_VAR, `${newWidth}px`);\n return true;\n }\n\n /**\n * @private\n */\n _mouseMove(evt) {\n let width = evt.clientX;\n // For sidebar resizing to work correctly in RTL mode, invert the width.\n if (this.isRTL) {\n width = this.outerContainerWidth - width;\n }\n this._updateWidth(width);\n }\n\n /**\n * @private\n */\n _mouseUp(evt) {\n // Re-enable the `transition-duration` rules when sidebar resizing ends...\n this.outerContainer.classList.remove(SIDEBAR_RESIZING_CLASS);\n // ... and ensure that rendering will always be triggered.\n this.eventBus.dispatch(\"resize\", { source: this });\n\n const _boundEvents = this._boundEvents;\n window.removeEventListener(\"mousemove\", _boundEvents.mouseMove);\n window.removeEventListener(\"mouseup\", _boundEvents.mouseUp);\n }\n\n /**\n * @private\n */\n _addEventListeners() {\n if (!this.enabled) {\n return;\n }\n const _boundEvents = this._boundEvents;\n _boundEvents.mouseMove = this._mouseMove.bind(this);\n _boundEvents.mouseUp = this._mouseUp.bind(this);\n\n this.resizer.addEventListener(\"mousedown\", evt => {\n if (evt.button !== 0) {\n return;\n }\n // Disable the `transition-duration` rules when sidebar resizing begins,\n // in order to improve responsiveness and to avoid visual glitches.\n this.outerContainer.classList.add(SIDEBAR_RESIZING_CLASS);\n\n window.addEventListener(\"mousemove\", _boundEvents.mouseMove);\n window.addEventListener(\"mouseup\", _boundEvents.mouseUp);\n });\n\n this.eventBus._on(\"sidebarviewchanged\", evt => {\n this.sidebarOpen = !!(evt && evt.view);\n });\n\n this.eventBus._on(\"resize\", evt => {\n // When the *entire* viewer is resized, such that it becomes narrower,\n // ensure that the sidebar doesn't end up being too wide.\n if (!evt || evt.source !== window) {\n return;\n }\n // Always reset the cached width when the viewer is resized.\n this._outerContainerWidth = null;\n\n if (!this._width) {\n // The sidebar hasn't been resized, hence no need to adjust its width.\n return;\n }\n // NOTE: If the sidebar is closed, we don't need to worry about\n // visual glitches nor ensure that rendering is triggered.\n if (!this.sidebarOpen) {\n this._updateWidth(this._width);\n return;\n }\n this.outerContainer.classList.add(SIDEBAR_RESIZING_CLASS);\n const updated = this._updateWidth(this._width);\n\n Promise.resolve().then(() => {\n this.outerContainer.classList.remove(SIDEBAR_RESIZING_CLASS);\n // Trigger rendering if the sidebar width changed, to avoid\n // depending on the order in which 'resize' events are handled.\n if (updated) {\n this.eventBus.dispatch(\"resize\", { source: this });\n }\n });\n });\n }\n}\n\nexport { PDFSidebarResizer };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n getVisibleElements,\n isValidRotation,\n NullL10n,\n scrollIntoView,\n watchScroll,\n} from \"./ui_utils.js\";\nimport { PDFThumbnailView } from \"./pdf_thumbnail_view.js\";\n\nconst THUMBNAIL_SCROLL_MARGIN = -19;\nconst THUMBNAIL_SELECTED_CLASS = \"selected\";\n\n/**\n * @typedef {Object} PDFThumbnailViewerOptions\n * @property {HTMLDivElement} container - The container for the thumbnail\n * elements.\n * @property {IPDFLinkService} linkService - The navigation/linking service.\n * @property {PDFRenderingQueue} renderingQueue - The rendering queue object.\n * @property {IL10n} l10n - Localization service.\n */\n\n/**\n * Viewer control to display thumbnails for pages in a PDF document.\n *\n * @implements {IRenderableView}\n */\nclass PDFThumbnailViewer {\n /**\n * @param {PDFThumbnailViewerOptions} options\n */\n constructor({ container, linkService, renderingQueue, l10n = NullL10n }) {\n this.container = container;\n this.linkService = linkService;\n this.renderingQueue = renderingQueue;\n this.l10n = l10n;\n\n this.scroll = watchScroll(this.container, this._scrollUpdated.bind(this));\n this._resetView();\n }\n\n /**\n * @private\n */\n _scrollUpdated() {\n this.renderingQueue.renderHighestPriority();\n }\n\n getThumbnail(index) {\n return this._thumbnails[index];\n }\n\n /**\n * @private\n */\n _getVisibleThumbs() {\n return getVisibleElements(this.container, this._thumbnails);\n }\n\n scrollThumbnailIntoView(pageNumber) {\n if (!this.pdfDocument) {\n return;\n }\n const thumbnailView = this._thumbnails[pageNumber - 1];\n\n if (!thumbnailView) {\n console.error('scrollThumbnailIntoView: Invalid \"pageNumber\" parameter.');\n return;\n }\n\n if (pageNumber !== this._currentPageNumber) {\n const prevThumbnailView = this._thumbnails[this._currentPageNumber - 1];\n // Remove the highlight from the previous thumbnail...\n prevThumbnailView.div.classList.remove(THUMBNAIL_SELECTED_CLASS);\n // ... and add the highlight to the new thumbnail.\n thumbnailView.div.classList.add(THUMBNAIL_SELECTED_CLASS);\n }\n const visibleThumbs = this._getVisibleThumbs();\n const numVisibleThumbs = visibleThumbs.views.length;\n\n // If the thumbnail isn't currently visible, scroll it into view.\n if (numVisibleThumbs > 0) {\n const first = visibleThumbs.first.id;\n // Account for only one thumbnail being visible.\n const last = numVisibleThumbs > 1 ? visibleThumbs.last.id : first;\n\n let shouldScroll = false;\n if (pageNumber <= first || pageNumber >= last) {\n shouldScroll = true;\n } else {\n visibleThumbs.views.some(function(view) {\n if (view.id !== pageNumber) {\n return false;\n }\n shouldScroll = view.percent < 100;\n return true;\n });\n }\n if (shouldScroll) {\n scrollIntoView(thumbnailView.div, { top: THUMBNAIL_SCROLL_MARGIN });\n }\n }\n\n this._currentPageNumber = pageNumber;\n }\n\n get pagesRotation() {\n return this._pagesRotation;\n }\n\n set pagesRotation(rotation) {\n if (!isValidRotation(rotation)) {\n throw new Error(\"Invalid thumbnails rotation angle.\");\n }\n if (!this.pdfDocument) {\n return;\n }\n if (this._pagesRotation === rotation) {\n return; // The rotation didn't change.\n }\n this._pagesRotation = rotation;\n\n for (let i = 0, ii = this._thumbnails.length; i < ii; i++) {\n this._thumbnails[i].update(rotation);\n }\n }\n\n cleanup() {\n PDFThumbnailView.cleanup();\n }\n\n /**\n * @private\n */\n _resetView() {\n this._thumbnails = [];\n this._currentPageNumber = 1;\n this._pageLabels = null;\n this._pagesRotation = 0;\n this._pagesRequests = new WeakMap();\n\n // Remove the thumbnails from the DOM.\n this.container.textContent = \"\";\n }\n\n setDocument(pdfDocument) {\n if (this.pdfDocument) {\n this._cancelRendering();\n this._resetView();\n }\n\n this.pdfDocument = pdfDocument;\n if (!pdfDocument) {\n return;\n }\n\n pdfDocument\n .getPage(1)\n .then(firstPdfPage => {\n const pagesCount = pdfDocument.numPages;\n const viewport = firstPdfPage.getViewport({ scale: 1 });\n for (let pageNum = 1; pageNum <= pagesCount; ++pageNum) {\n const thumbnail = new PDFThumbnailView({\n container: this.container,\n id: pageNum,\n defaultViewport: viewport.clone(),\n linkService: this.linkService,\n renderingQueue: this.renderingQueue,\n disableCanvasToImageConversion: false,\n l10n: this.l10n,\n });\n this._thumbnails.push(thumbnail);\n }\n // Set the first `pdfPage` immediately, since it's already loaded,\n // rather than having to repeat the `PDFDocumentProxy.getPage` call in\n // the `this._ensurePdfPageLoaded` method before rendering can start.\n const firstThumbnailView = this._thumbnails[0];\n if (firstThumbnailView) {\n firstThumbnailView.setPdfPage(firstPdfPage);\n }\n\n // Ensure that the current thumbnail is always highlighted on load.\n const thumbnailView = this._thumbnails[this._currentPageNumber - 1];\n thumbnailView.div.classList.add(THUMBNAIL_SELECTED_CLASS);\n })\n .catch(reason => {\n console.error(\"Unable to initialize thumbnail viewer\", reason);\n });\n }\n\n /**\n * @private\n */\n _cancelRendering() {\n for (let i = 0, ii = this._thumbnails.length; i < ii; i++) {\n if (this._thumbnails[i]) {\n this._thumbnails[i].cancelRendering();\n }\n }\n }\n\n /**\n * @param {Array|null} labels\n */\n setPageLabels(labels) {\n if (!this.pdfDocument) {\n return;\n }\n if (!labels) {\n this._pageLabels = null;\n } else if (\n !(Array.isArray(labels) && this.pdfDocument.numPages === labels.length)\n ) {\n this._pageLabels = null;\n console.error(\"PDFThumbnailViewer_setPageLabels: Invalid page labels.\");\n } else {\n this._pageLabels = labels;\n }\n // Update all the `PDFThumbnailView` instances.\n for (let i = 0, ii = this._thumbnails.length; i < ii; i++) {\n const label = this._pageLabels && this._pageLabels[i];\n this._thumbnails[i].setPageLabel(label);\n }\n }\n\n /**\n * @param {PDFThumbnailView} thumbView\n * @returns {PDFPage}\n * @private\n */\n _ensurePdfPageLoaded(thumbView) {\n if (thumbView.pdfPage) {\n return Promise.resolve(thumbView.pdfPage);\n }\n if (this._pagesRequests.has(thumbView)) {\n return this._pagesRequests.get(thumbView);\n }\n const promise = this.pdfDocument\n .getPage(thumbView.id)\n .then(pdfPage => {\n if (!thumbView.pdfPage) {\n thumbView.setPdfPage(pdfPage);\n }\n this._pagesRequests.delete(thumbView);\n return pdfPage;\n })\n .catch(reason => {\n console.error(\"Unable to get page for thumb view\", reason);\n // Page error -- there is nothing that can be done.\n this._pagesRequests.delete(thumbView);\n });\n this._pagesRequests.set(thumbView, promise);\n return promise;\n }\n\n forceRendering() {\n const visibleThumbs = this._getVisibleThumbs();\n const thumbView = this.renderingQueue.getHighestPriority(\n visibleThumbs,\n this._thumbnails,\n this.scroll.down\n );\n if (thumbView) {\n this._ensurePdfPageLoaded(thumbView).then(() => {\n this.renderingQueue.renderView(thumbView);\n });\n return true;\n }\n return false;\n }\n}\n\nexport { PDFThumbnailViewer };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createPromiseCapability,\n RenderingCancelledException,\n} from \"pdfjs-lib\";\nimport { getOutputScale, NullL10n } from \"./ui_utils.js\";\nimport { RenderingStates } from \"./pdf_rendering_queue.js\";\n\nconst MAX_NUM_SCALING_STEPS = 3;\nconst THUMBNAIL_CANVAS_BORDER_WIDTH = 1; // px\nconst THUMBNAIL_WIDTH = 98; // px\n\n/**\n * @typedef {Object} PDFThumbnailViewOptions\n * @property {HTMLDivElement} container - The viewer element.\n * @property {number} id - The thumbnail's unique ID (normally its number).\n * @property {PageViewport} defaultViewport - The page viewport.\n * @property {IPDFLinkService} linkService - The navigation/linking service.\n * @property {PDFRenderingQueue} renderingQueue - The rendering queue object.\n * @property {boolean} [disableCanvasToImageConversion] - Don't convert the\n * canvas thumbnails to images. This prevents `toDataURL` calls, but\n * increases the overall memory usage. The default value is `false`.\n * @property {IL10n} l10n - Localization service.\n */\n\nconst TempImageFactory = (function TempImageFactoryClosure() {\n let tempCanvasCache = null;\n\n return {\n getCanvas(width, height) {\n let tempCanvas = tempCanvasCache;\n if (!tempCanvas) {\n tempCanvas = document.createElement(\"canvas\");\n tempCanvasCache = tempCanvas;\n }\n tempCanvas.width = width;\n tempCanvas.height = height;\n\n // Since this is a temporary canvas, we need to fill it with a white\n // background ourselves. `_getPageDrawContext` uses CSS rules for this.\n if (\n typeof PDFJSDev === \"undefined\" ||\n PDFJSDev.test(\"MOZCENTRAL || GENERIC\")\n ) {\n tempCanvas.mozOpaque = true;\n }\n\n const ctx = tempCanvas.getContext(\"2d\", { alpha: false });\n ctx.save();\n ctx.fillStyle = \"rgb(255, 255, 255)\";\n ctx.fillRect(0, 0, width, height);\n ctx.restore();\n return tempCanvas;\n },\n\n destroyCanvas() {\n const tempCanvas = tempCanvasCache;\n if (tempCanvas) {\n // Zeroing the width and height causes Firefox to release graphics\n // resources immediately, which can greatly reduce memory consumption.\n tempCanvas.width = 0;\n tempCanvas.height = 0;\n }\n tempCanvasCache = null;\n },\n };\n})();\n\n/**\n * @implements {IRenderableView}\n */\nclass PDFThumbnailView {\n /**\n * @param {PDFThumbnailViewOptions} options\n */\n constructor({\n container,\n id,\n defaultViewport,\n linkService,\n renderingQueue,\n disableCanvasToImageConversion = false,\n l10n = NullL10n,\n }) {\n this.id = id;\n this.renderingId = \"thumbnail\" + id;\n this.pageLabel = null;\n\n this.pdfPage = null;\n this.rotation = 0;\n this.viewport = defaultViewport;\n this.pdfPageRotate = defaultViewport.rotation;\n\n this.linkService = linkService;\n this.renderingQueue = renderingQueue;\n\n this.renderTask = null;\n this.renderingState = RenderingStates.INITIAL;\n this.resume = null;\n this.disableCanvasToImageConversion = disableCanvasToImageConversion;\n\n this.pageWidth = this.viewport.width;\n this.pageHeight = this.viewport.height;\n this.pageRatio = this.pageWidth / this.pageHeight;\n\n this.canvasWidth = THUMBNAIL_WIDTH;\n this.canvasHeight = (this.canvasWidth / this.pageRatio) | 0;\n this.scale = this.canvasWidth / this.pageWidth;\n\n this.l10n = l10n;\n\n const anchor = document.createElement(\"a\");\n anchor.href = linkService.getAnchorUrl(\"#page=\" + id);\n this._thumbPageTitle.then(msg => {\n anchor.title = msg;\n });\n anchor.onclick = function() {\n linkService.page = id;\n return false;\n };\n this.anchor = anchor;\n\n const div = document.createElement(\"div\");\n div.className = \"thumbnail\";\n div.setAttribute(\"data-page-number\", this.id);\n this.div = div;\n\n const ring = document.createElement(\"div\");\n ring.className = \"thumbnailSelectionRing\";\n const borderAdjustment = 2 * THUMBNAIL_CANVAS_BORDER_WIDTH;\n ring.style.width = this.canvasWidth + borderAdjustment + \"px\";\n ring.style.height = this.canvasHeight + borderAdjustment + \"px\";\n this.ring = ring;\n\n div.appendChild(ring);\n anchor.appendChild(div);\n container.appendChild(anchor);\n }\n\n setPdfPage(pdfPage) {\n this.pdfPage = pdfPage;\n this.pdfPageRotate = pdfPage.rotate;\n const totalRotation = (this.rotation + this.pdfPageRotate) % 360;\n this.viewport = pdfPage.getViewport({ scale: 1, rotation: totalRotation });\n this.reset();\n }\n\n reset() {\n this.cancelRendering();\n this.renderingState = RenderingStates.INITIAL;\n\n this.pageWidth = this.viewport.width;\n this.pageHeight = this.viewport.height;\n this.pageRatio = this.pageWidth / this.pageHeight;\n\n this.canvasHeight = (this.canvasWidth / this.pageRatio) | 0;\n this.scale = this.canvasWidth / this.pageWidth;\n\n this.div.removeAttribute(\"data-loaded\");\n const ring = this.ring;\n const childNodes = ring.childNodes;\n for (let i = childNodes.length - 1; i >= 0; i--) {\n ring.removeChild(childNodes[i]);\n }\n const borderAdjustment = 2 * THUMBNAIL_CANVAS_BORDER_WIDTH;\n ring.style.width = this.canvasWidth + borderAdjustment + \"px\";\n ring.style.height = this.canvasHeight + borderAdjustment + \"px\";\n\n if (this.canvas) {\n // Zeroing the width and height causes Firefox to release graphics\n // resources immediately, which can greatly reduce memory consumption.\n this.canvas.width = 0;\n this.canvas.height = 0;\n delete this.canvas;\n }\n if (this.image) {\n this.image.removeAttribute(\"src\");\n delete this.image;\n }\n }\n\n update(rotation) {\n if (typeof rotation !== \"undefined\") {\n this.rotation = rotation;\n }\n const totalRotation = (this.rotation + this.pdfPageRotate) % 360;\n this.viewport = this.viewport.clone({\n scale: 1,\n rotation: totalRotation,\n });\n this.reset();\n }\n\n /**\n * PLEASE NOTE: Most likely you want to use the `this.reset()` method,\n * rather than calling this one directly.\n */\n cancelRendering() {\n if (this.renderTask) {\n this.renderTask.cancel();\n this.renderTask = null;\n }\n this.resume = null;\n }\n\n /**\n * @private\n */\n _getPageDrawContext(noCtxScale = false) {\n const canvas = document.createElement(\"canvas\");\n // Keep the no-thumbnail outline visible, i.e. `data-loaded === false`,\n // until rendering/image conversion is complete, to avoid display issues.\n this.canvas = canvas;\n\n if (\n typeof PDFJSDev === \"undefined\" ||\n PDFJSDev.test(\"MOZCENTRAL || GENERIC\")\n ) {\n canvas.mozOpaque = true;\n }\n const ctx = canvas.getContext(\"2d\", { alpha: false });\n const outputScale = getOutputScale(ctx);\n\n canvas.width = (this.canvasWidth * outputScale.sx) | 0;\n canvas.height = (this.canvasHeight * outputScale.sy) | 0;\n canvas.style.width = this.canvasWidth + \"px\";\n canvas.style.height = this.canvasHeight + \"px\";\n\n if (!noCtxScale && outputScale.scaled) {\n ctx.scale(outputScale.sx, outputScale.sy);\n }\n return ctx;\n }\n\n /**\n * @private\n */\n _convertCanvasToImage() {\n if (!this.canvas) {\n return;\n }\n if (this.renderingState !== RenderingStates.FINISHED) {\n return;\n }\n const className = \"thumbnailImage\";\n\n if (this.disableCanvasToImageConversion) {\n this.canvas.className = className;\n this._thumbPageCanvas.then(msg => {\n this.canvas.setAttribute(\"aria-label\", msg);\n });\n\n this.div.setAttribute(\"data-loaded\", true);\n this.ring.appendChild(this.canvas);\n return;\n }\n const image = document.createElement(\"img\");\n image.className = className;\n this._thumbPageCanvas.then(msg => {\n image.setAttribute(\"aria-label\", msg);\n });\n\n image.style.width = this.canvasWidth + \"px\";\n image.style.height = this.canvasHeight + \"px\";\n\n image.src = this.canvas.toDataURL();\n this.image = image;\n\n this.div.setAttribute(\"data-loaded\", true);\n this.ring.appendChild(image);\n\n // Zeroing the width and height causes Firefox to release graphics\n // resources immediately, which can greatly reduce memory consumption.\n this.canvas.width = 0;\n this.canvas.height = 0;\n delete this.canvas;\n }\n\n draw() {\n if (this.renderingState !== RenderingStates.INITIAL) {\n console.error(\"Must be in new state before drawing\");\n return Promise.resolve(undefined);\n }\n const { pdfPage } = this;\n\n if (!pdfPage) {\n this.renderingState = RenderingStates.FINISHED;\n return Promise.reject(new Error(\"pdfPage is not loaded\"));\n }\n\n this.renderingState = RenderingStates.RUNNING;\n\n const renderCapability = createPromiseCapability();\n const finishRenderTask = error => {\n // The renderTask may have been replaced by a new one, so only remove\n // the reference to the renderTask if it matches the one that is\n // triggering this callback.\n if (renderTask === this.renderTask) {\n this.renderTask = null;\n }\n\n if (error instanceof RenderingCancelledException) {\n renderCapability.resolve(undefined);\n return;\n }\n\n this.renderingState = RenderingStates.FINISHED;\n this._convertCanvasToImage();\n\n if (!error) {\n renderCapability.resolve(undefined);\n } else {\n renderCapability.reject(error);\n }\n };\n\n const ctx = this._getPageDrawContext();\n const drawViewport = this.viewport.clone({ scale: this.scale });\n const renderContinueCallback = cont => {\n if (!this.renderingQueue.isHighestPriority(this)) {\n this.renderingState = RenderingStates.PAUSED;\n this.resume = () => {\n this.renderingState = RenderingStates.RUNNING;\n cont();\n };\n return;\n }\n cont();\n };\n\n const renderContext = {\n canvasContext: ctx,\n viewport: drawViewport,\n };\n const renderTask = (this.renderTask = pdfPage.render(renderContext));\n renderTask.onContinue = renderContinueCallback;\n\n renderTask.promise.then(\n function() {\n finishRenderTask(null);\n },\n function(error) {\n finishRenderTask(error);\n }\n );\n return renderCapability.promise;\n }\n\n setImage(pageView) {\n if (this.renderingState !== RenderingStates.INITIAL) {\n return;\n }\n const img = pageView.canvas;\n if (!img) {\n return;\n }\n if (!this.pdfPage) {\n this.setPdfPage(pageView.pdfPage);\n }\n\n this.renderingState = RenderingStates.FINISHED;\n\n const ctx = this._getPageDrawContext(true);\n const canvas = ctx.canvas;\n if (img.width <= 2 * canvas.width) {\n ctx.drawImage(\n img,\n 0,\n 0,\n img.width,\n img.height,\n 0,\n 0,\n canvas.width,\n canvas.height\n );\n this._convertCanvasToImage();\n return;\n }\n\n // drawImage does an awful job of rescaling the image, doing it gradually.\n let reducedWidth = canvas.width << MAX_NUM_SCALING_STEPS;\n let reducedHeight = canvas.height << MAX_NUM_SCALING_STEPS;\n const reducedImage = TempImageFactory.getCanvas(\n reducedWidth,\n reducedHeight\n );\n const reducedImageCtx = reducedImage.getContext(\"2d\");\n\n while (reducedWidth > img.width || reducedHeight > img.height) {\n reducedWidth >>= 1;\n reducedHeight >>= 1;\n }\n reducedImageCtx.drawImage(\n img,\n 0,\n 0,\n img.width,\n img.height,\n 0,\n 0,\n reducedWidth,\n reducedHeight\n );\n while (reducedWidth > 2 * canvas.width) {\n reducedImageCtx.drawImage(\n reducedImage,\n 0,\n 0,\n reducedWidth,\n reducedHeight,\n 0,\n 0,\n reducedWidth >> 1,\n reducedHeight >> 1\n );\n reducedWidth >>= 1;\n reducedHeight >>= 1;\n }\n ctx.drawImage(\n reducedImage,\n 0,\n 0,\n reducedWidth,\n reducedHeight,\n 0,\n 0,\n canvas.width,\n canvas.height\n );\n this._convertCanvasToImage();\n }\n\n get _thumbPageTitle() {\n return this.l10n.get(\n \"thumb_page_title\",\n { page: this.pageLabel !== null ? this.pageLabel : this.id },\n \"Page {{page}}\"\n );\n }\n\n get _thumbPageCanvas() {\n return this.l10n.get(\n \"thumb_page_canvas\",\n { page: this.pageLabel !== null ? this.pageLabel : this.id },\n \"Thumbnail of Page {{page}}\"\n );\n }\n\n /**\n * @param {string|null} label\n */\n setPageLabel(label) {\n this.pageLabel = typeof label === \"string\" ? label : null;\n\n this._thumbPageTitle.then(msg => {\n this.anchor.title = msg;\n });\n\n if (this.renderingState !== RenderingStates.FINISHED) {\n return;\n }\n\n this._thumbPageCanvas.then(msg => {\n if (this.image) {\n this.image.setAttribute(\"aria-label\", msg);\n } else if (this.disableCanvasToImageConversion && this.canvas) {\n this.canvas.setAttribute(\"aria-label\", msg);\n }\n });\n }\n\n static cleanup() {\n TempImageFactory.destroyCanvas();\n }\n}\n\nexport { PDFThumbnailView };\n","/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { BaseViewer } from \"./base_viewer.js\";\nimport { shadow } from \"pdfjs-lib\";\n\nclass PDFViewer extends BaseViewer {\n get _setDocumentViewerElement() {\n return shadow(this, \"_setDocumentViewerElement\", this.viewer);\n }\n\n _scrollIntoView({ pageDiv, pageSpot = null, pageNumber = null }) {\n if (!pageSpot && !this.isInPresentationMode) {\n const left = pageDiv.offsetLeft + pageDiv.clientLeft;\n const right = left + pageDiv.clientWidth;\n const { scrollLeft, clientWidth } = this.container;\n if (\n this._isScrollModeHorizontal ||\n left < scrollLeft ||\n right > scrollLeft + clientWidth\n ) {\n pageSpot = { left: 0, top: 0 };\n }\n }\n super._scrollIntoView({ pageDiv, pageSpot, pageNumber });\n }\n\n _getVisiblePages() {\n if (this.isInPresentationMode) {\n // The algorithm in `getVisibleElements` doesn't work in all browsers and\n // configurations (e.g. Chrome) when Presentation Mode is active.\n return this._getCurrentVisiblePage();\n }\n return super._getVisiblePages();\n }\n\n _updateHelper(visiblePages) {\n if (this.isInPresentationMode) {\n return;\n }\n let currentId = this._currentPageNumber;\n let stillFullyVisible = false;\n\n for (const page of visiblePages) {\n if (page.percent < 100) {\n break;\n }\n if (page.id === currentId) {\n stillFullyVisible = true;\n break;\n }\n }\n if (!stillFullyVisible) {\n currentId = visiblePages[0].id;\n }\n this._setCurrentPageNumber(currentId);\n }\n}\n\nexport { PDFViewer };\n","/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n CSS_UNITS,\n DEFAULT_SCALE,\n DEFAULT_SCALE_VALUE,\n getGlobalEventBus,\n getVisibleElements,\n isPortraitOrientation,\n isValidRotation,\n isValidScrollMode,\n isValidSpreadMode,\n MAX_AUTO_SCALE,\n moveToEndOfArray,\n NullL10n,\n PresentationModeState,\n RendererType,\n SCROLLBAR_PADDING,\n scrollIntoView,\n ScrollMode,\n SpreadMode,\n TextLayerMode,\n UNKNOWN_SCALE,\n VERTICAL_PADDING,\n watchScroll,\n} from \"./ui_utils.js\";\nimport { PDFRenderingQueue, RenderingStates } from \"./pdf_rendering_queue.js\";\nimport { AnnotationLayerBuilder } from \"./annotation_layer_builder.js\";\nimport { createPromiseCapability } from \"pdfjs-lib\";\nimport { PDFPageView } from \"./pdf_page_view.js\";\nimport { SimpleLinkService } from \"./pdf_link_service.js\";\nimport { TextLayerBuilder } from \"./text_layer_builder.js\";\n\nconst DEFAULT_CACHE_SIZE = 10;\n\n/**\n * @typedef {Object} PDFViewerOptions\n * @property {HTMLDivElement} container - The container for the viewer element.\n * @property {HTMLDivElement} [viewer] - The viewer element.\n * @property {EventBus} eventBus - The application event bus.\n * @property {IPDFLinkService} linkService - The navigation/linking service.\n * @property {DownloadManager} [downloadManager] - The download manager\n * component.\n * @property {PDFFindController} [findController] - The find controller\n * component.\n * @property {PDFRenderingQueue} [renderingQueue] - The rendering queue object.\n * @property {boolean} [removePageBorders] - Removes the border shadow around\n * the pages. The default value is `false`.\n * @property {number} [textLayerMode] - Controls if the text layer used for\n * selection and searching is created, and if the improved text selection\n * behaviour is enabled. The constants from {TextLayerMode} should be used.\n * The default value is `TextLayerMode.ENABLE`.\n * @property {string} [imageResourcesPath] - Path for image resources, mainly\n * mainly for annotation icons. Include trailing slash.\n * @property {boolean} [renderInteractiveForms] - Enables rendering of\n * interactive form elements. The default is `false`.\n * @property {boolean} [enablePrintAutoRotate] - Enables automatic rotation of\n * pages whose orientation differ from the first page upon printing. The\n * default is `false`.\n * @property {string} renderer - 'canvas' or 'svg'. The default is 'canvas'.\n * @property {boolean} [enableWebGL] - Enables WebGL accelerated rendering for\n * some operations. The default value is `false`.\n * @property {boolean} [useOnlyCssZoom] - Enables CSS only zooming. The default\n * value is `false`.\n * @property {number} [maxCanvasPixels] - The maximum supported canvas size in\n * total pixels, i.e. width * height. Use -1 for no limit. The default value\n * is 4096 * 4096 (16 mega-pixels).\n * @property {IL10n} l10n - Localization service.\n */\n\nfunction PDFPageViewBuffer(size) {\n const data = [];\n this.push = function(view) {\n const i = data.indexOf(view);\n if (i >= 0) {\n data.splice(i, 1);\n }\n data.push(view);\n if (data.length > size) {\n data.shift().destroy();\n }\n };\n /**\n * After calling resize, the size of the buffer will be newSize. The optional\n * parameter pagesToKeep is, if present, an array of pages to push to the back\n * of the buffer, delaying their destruction. The size of pagesToKeep has no\n * impact on the final size of the buffer; if pagesToKeep has length larger\n * than newSize, some of those pages will be destroyed anyway.\n */\n this.resize = function(newSize, pagesToKeep) {\n size = newSize;\n if (pagesToKeep) {\n const pageIdsToKeep = new Set();\n for (let i = 0, iMax = pagesToKeep.length; i < iMax; ++i) {\n pageIdsToKeep.add(pagesToKeep[i].id);\n }\n moveToEndOfArray(data, function(page) {\n return pageIdsToKeep.has(page.id);\n });\n }\n while (data.length > size) {\n data.shift().destroy();\n }\n };\n}\n\nfunction isSameScale(oldScale, newScale) {\n if (newScale === oldScale) {\n return true;\n }\n if (Math.abs(newScale - oldScale) < 1e-15) {\n // Prevent unnecessary re-rendering of all pages when the scale\n // changes only because of limited numerical precision.\n return true;\n }\n return false;\n}\n\n/**\n * Simple viewer control to display PDF content/pages.\n * @implements {IRenderableView}\n */\nclass BaseViewer {\n /**\n * @param {PDFViewerOptions} options\n */\n constructor(options) {\n if (this.constructor === BaseViewer) {\n throw new Error(\"Cannot initialize BaseViewer.\");\n }\n this._name = this.constructor.name;\n\n this.container = options.container;\n this.viewer = options.viewer || options.container.firstElementChild;\n this.eventBus = options.eventBus || getGlobalEventBus();\n this.linkService = options.linkService || new SimpleLinkService();\n this.downloadManager = options.downloadManager || null;\n this.findController = options.findController || null;\n this.removePageBorders = options.removePageBorders || false;\n this.textLayerMode = Number.isInteger(options.textLayerMode)\n ? options.textLayerMode\n : TextLayerMode.ENABLE;\n this.imageResourcesPath = options.imageResourcesPath || \"\";\n this.renderInteractiveForms = options.renderInteractiveForms || false;\n this.enablePrintAutoRotate = options.enablePrintAutoRotate || false;\n this.renderer = options.renderer || RendererType.CANVAS;\n this.enableWebGL = options.enableWebGL || false;\n this.useOnlyCssZoom = options.useOnlyCssZoom || false;\n this.maxCanvasPixels = options.maxCanvasPixels;\n this.l10n = options.l10n || NullL10n;\n\n this.defaultRenderingQueue = !options.renderingQueue;\n if (this.defaultRenderingQueue) {\n // Custom rendering queue is not specified, using default one\n this.renderingQueue = new PDFRenderingQueue();\n this.renderingQueue.setViewer(this);\n } else {\n this.renderingQueue = options.renderingQueue;\n }\n\n this.scroll = watchScroll(this.container, this._scrollUpdate.bind(this));\n this.presentationModeState = PresentationModeState.UNKNOWN;\n this._onBeforeDraw = this._onAfterDraw = null;\n this._resetView();\n\n if (this.removePageBorders) {\n this.viewer.classList.add(\"removePageBorders\");\n }\n // Defer the dispatching of this event, to give other viewer components\n // time to initialize *and* register 'baseviewerinit' event listeners.\n Promise.resolve().then(() => {\n this.eventBus.dispatch(\"baseviewerinit\", { source: this });\n });\n }\n\n get pagesCount() {\n return this._pages.length;\n }\n\n getPageView(index) {\n return this._pages[index];\n }\n\n /**\n * @type {boolean} - True if all {PDFPageView} objects are initialized.\n */\n get pageViewsReady() {\n if (!this._pagesCapability.settled) {\n return false;\n }\n // Prevent printing errors when 'disableAutoFetch' is set, by ensuring\n // that *all* pages have in fact been completely loaded.\n return this._pages.every(function(pageView) {\n return pageView && pageView.pdfPage;\n });\n }\n\n /**\n * @type {number}\n */\n get currentPageNumber() {\n return this._currentPageNumber;\n }\n\n /**\n * @param {number} val - The page number.\n */\n set currentPageNumber(val) {\n if (!Number.isInteger(val)) {\n throw new Error(\"Invalid page number.\");\n }\n if (!this.pdfDocument) {\n return;\n }\n // The intent can be to just reset a scroll position and/or scale.\n if (!this._setCurrentPageNumber(val, /* resetCurrentPageView = */ true)) {\n console.error(\n `${this._name}.currentPageNumber: \"${val}\" is not a valid page.`\n );\n }\n }\n\n /**\n * @returns {boolean} Whether the pageNumber is valid (within bounds).\n * @private\n */\n _setCurrentPageNumber(val, resetCurrentPageView = false) {\n if (this._currentPageNumber === val) {\n if (resetCurrentPageView) {\n this._resetCurrentPageView();\n }\n return true;\n }\n\n if (!(0 < val && val <= this.pagesCount)) {\n return false;\n }\n this._currentPageNumber = val;\n\n this.eventBus.dispatch(\"pagechanging\", {\n source: this,\n pageNumber: val,\n pageLabel: this._pageLabels && this._pageLabels[val - 1],\n });\n\n if (resetCurrentPageView) {\n this._resetCurrentPageView();\n }\n return true;\n }\n\n /**\n * @type {string|null} Returns the current page label, or `null` if no page\n * labels exist.\n */\n get currentPageLabel() {\n return this._pageLabels && this._pageLabels[this._currentPageNumber - 1];\n }\n\n /**\n * @param {string} val - The page label.\n */\n set currentPageLabel(val) {\n if (!this.pdfDocument) {\n return;\n }\n let page = val | 0; // Fallback page number.\n if (this._pageLabels) {\n const i = this._pageLabels.indexOf(val);\n if (i >= 0) {\n page = i + 1;\n }\n }\n // The intent can be to just reset a scroll position and/or scale.\n if (!this._setCurrentPageNumber(page, /* resetCurrentPageView = */ true)) {\n console.error(\n `${this._name}.currentPageLabel: \"${val}\" is not a valid page.`\n );\n }\n }\n\n /**\n * @type {number}\n */\n get currentScale() {\n return this._currentScale !== UNKNOWN_SCALE\n ? this._currentScale\n : DEFAULT_SCALE;\n }\n\n /**\n * @param {number} val - Scale of the pages in percents.\n */\n set currentScale(val) {\n if (isNaN(val)) {\n throw new Error(\"Invalid numeric scale.\");\n }\n if (!this.pdfDocument) {\n return;\n }\n this._setScale(val, false);\n }\n\n /**\n * @type {string}\n */\n get currentScaleValue() {\n return this._currentScaleValue;\n }\n\n /**\n * @param val - The scale of the pages (in percent or predefined value).\n */\n set currentScaleValue(val) {\n if (!this.pdfDocument) {\n return;\n }\n this._setScale(val, false);\n }\n\n /**\n * @type {number}\n */\n get pagesRotation() {\n return this._pagesRotation;\n }\n\n /**\n * @param {number} rotation - The rotation of the pages (0, 90, 180, 270).\n */\n set pagesRotation(rotation) {\n if (!isValidRotation(rotation)) {\n throw new Error(\"Invalid pages rotation angle.\");\n }\n if (!this.pdfDocument) {\n return;\n }\n if (this._pagesRotation === rotation) {\n return; // The rotation didn't change.\n }\n this._pagesRotation = rotation;\n\n const pageNumber = this._currentPageNumber;\n\n for (let i = 0, ii = this._pages.length; i < ii; i++) {\n const pageView = this._pages[i];\n pageView.update(pageView.scale, rotation);\n }\n // Prevent errors in case the rotation changes *before* the scale has been\n // set to a non-default value.\n if (this._currentScaleValue) {\n this._setScale(this._currentScaleValue, true);\n }\n\n this.eventBus.dispatch(\"rotationchanging\", {\n source: this,\n pagesRotation: rotation,\n pageNumber,\n });\n\n if (this.defaultRenderingQueue) {\n this.update();\n }\n }\n\n get firstPagePromise() {\n return this.pdfDocument ? this._firstPageCapability.promise : null;\n }\n\n get onePageRendered() {\n return this.pdfDocument ? this._onePageRenderedCapability.promise : null;\n }\n\n get pagesPromise() {\n return this.pdfDocument ? this._pagesCapability.promise : null;\n }\n\n /**\n * @private\n */\n get _setDocumentViewerElement() {\n // In most viewers, e.g. `PDFViewer`, this should return `this.viewer`.\n throw new Error(\"Not implemented: _setDocumentViewerElement\");\n }\n\n /**\n * @param pdfDocument {PDFDocument}\n */\n setDocument(pdfDocument) {\n if (this.pdfDocument) {\n this._cancelRendering();\n this._resetView();\n\n if (this.findController) {\n this.findController.setDocument(null);\n }\n }\n\n this.pdfDocument = pdfDocument;\n if (!pdfDocument) {\n return;\n }\n const pagesCount = pdfDocument.numPages;\n const firstPagePromise = pdfDocument.getPage(1);\n\n this._pagesCapability.promise.then(() => {\n this.eventBus.dispatch(\"pagesloaded\", {\n source: this,\n pagesCount,\n });\n });\n\n this._onBeforeDraw = evt => {\n const pageView = this._pages[evt.pageNumber - 1];\n if (!pageView) {\n return;\n }\n // Add the page to the buffer at the start of drawing. That way it can be\n // evicted from the buffer and destroyed even if we pause its rendering.\n this._buffer.push(pageView);\n };\n this.eventBus._on(\"pagerender\", this._onBeforeDraw);\n\n this._onAfterDraw = evt => {\n if (evt.cssTransform || this._onePageRenderedCapability.settled) {\n return;\n }\n this._onePageRenderedCapability.resolve();\n\n this.eventBus._off(\"pagerendered\", this._onAfterDraw);\n this._onAfterDraw = null;\n };\n this.eventBus._on(\"pagerendered\", this._onAfterDraw);\n\n // Fetch a single page so we can get a viewport that will be the default\n // viewport for all pages\n firstPagePromise\n .then(firstPdfPage => {\n this._firstPageCapability.resolve(firstPdfPage);\n\n const scale = this.currentScale;\n const viewport = firstPdfPage.getViewport({ scale: scale * CSS_UNITS });\n const textLayerFactory =\n this.textLayerMode !== TextLayerMode.DISABLE ? this : null;\n\n for (let pageNum = 1; pageNum <= pagesCount; ++pageNum) {\n const pageView = new PDFPageView({\n container: this._setDocumentViewerElement,\n eventBus: this.eventBus,\n id: pageNum,\n scale,\n defaultViewport: viewport.clone(),\n renderingQueue: this.renderingQueue,\n textLayerFactory,\n textLayerMode: this.textLayerMode,\n annotationLayerFactory: this,\n imageResourcesPath: this.imageResourcesPath,\n renderInteractiveForms: this.renderInteractiveForms,\n renderer: this.renderer,\n enableWebGL: this.enableWebGL,\n useOnlyCssZoom: this.useOnlyCssZoom,\n maxCanvasPixels: this.maxCanvasPixels,\n l10n: this.l10n,\n });\n this._pages.push(pageView);\n }\n // Set the first `pdfPage` immediately, since it's already loaded,\n // rather than having to repeat the `PDFDocumentProxy.getPage` call in\n // the `this._ensurePdfPageLoaded` method before rendering can start.\n const firstPageView = this._pages[0];\n if (firstPageView) {\n firstPageView.setPdfPage(firstPdfPage);\n this.linkService.cachePageRef(1, firstPdfPage.ref);\n }\n if (this._spreadMode !== SpreadMode.NONE) {\n this._updateSpreadMode();\n }\n\n // Fetch all the pages since the viewport is needed before printing\n // starts to create the correct size canvas. Wait until one page is\n // rendered so we don't tie up too many resources early on.\n this._onePageRenderedCapability.promise.then(() => {\n if (this.findController) {\n this.findController.setDocument(pdfDocument); // Enable searching.\n }\n\n // In addition to 'disableAutoFetch' being set, also attempt to reduce\n // resource usage when loading *very* long/large documents.\n if (\n pdfDocument.loadingParams[\"disableAutoFetch\"] ||\n pagesCount > 7500\n ) {\n // XXX: Printing is semi-broken with auto fetch disabled.\n this._pagesCapability.resolve();\n return;\n }\n let getPagesLeft = pagesCount - 1; // The first page was already loaded.\n\n if (getPagesLeft <= 0) {\n this._pagesCapability.resolve();\n return;\n }\n for (let pageNum = 2; pageNum <= pagesCount; ++pageNum) {\n pdfDocument.getPage(pageNum).then(\n pdfPage => {\n const pageView = this._pages[pageNum - 1];\n if (!pageView.pdfPage) {\n pageView.setPdfPage(pdfPage);\n }\n this.linkService.cachePageRef(pageNum, pdfPage.ref);\n if (--getPagesLeft === 0) {\n this._pagesCapability.resolve();\n }\n },\n reason => {\n console.error(\n `Unable to get page ${pageNum} to initialize viewer`,\n reason\n );\n if (--getPagesLeft === 0) {\n this._pagesCapability.resolve();\n }\n }\n );\n }\n });\n\n this.eventBus.dispatch(\"pagesinit\", { source: this });\n\n if (this.defaultRenderingQueue) {\n this.update();\n }\n })\n .catch(reason => {\n console.error(\"Unable to initialize viewer\", reason);\n });\n }\n\n /**\n * @param {Array|null} labels\n */\n setPageLabels(labels) {\n if (!this.pdfDocument) {\n return;\n }\n if (!labels) {\n this._pageLabels = null;\n } else if (\n !(Array.isArray(labels) && this.pdfDocument.numPages === labels.length)\n ) {\n this._pageLabels = null;\n console.error(`${this._name}.setPageLabels: Invalid page labels.`);\n } else {\n this._pageLabels = labels;\n }\n // Update all the `PDFPageView` instances.\n for (let i = 0, ii = this._pages.length; i < ii; i++) {\n const pageView = this._pages[i];\n const label = this._pageLabels && this._pageLabels[i];\n pageView.setPageLabel(label);\n }\n }\n\n _resetView() {\n this._pages = [];\n this._currentPageNumber = 1;\n this._currentScale = UNKNOWN_SCALE;\n this._currentScaleValue = null;\n this._pageLabels = null;\n this._buffer = new PDFPageViewBuffer(DEFAULT_CACHE_SIZE);\n this._location = null;\n this._pagesRotation = 0;\n this._pagesRequests = new WeakMap();\n this._firstPageCapability = createPromiseCapability();\n this._onePageRenderedCapability = createPromiseCapability();\n this._pagesCapability = createPromiseCapability();\n this._scrollMode = ScrollMode.VERTICAL;\n this._spreadMode = SpreadMode.NONE;\n\n if (this._onBeforeDraw) {\n this.eventBus._off(\"pagerender\", this._onBeforeDraw);\n this._onBeforeDraw = null;\n }\n if (this._onAfterDraw) {\n this.eventBus._off(\"pagerendered\", this._onAfterDraw);\n this._onAfterDraw = null;\n }\n // Remove the pages from the DOM...\n this.viewer.textContent = \"\";\n // ... and reset the Scroll mode CSS class(es) afterwards.\n this._updateScrollMode();\n }\n\n _scrollUpdate() {\n if (this.pagesCount === 0) {\n return;\n }\n this.update();\n }\n\n _scrollIntoView({ pageDiv, pageSpot = null, pageNumber = null }) {\n scrollIntoView(pageDiv, pageSpot);\n }\n\n _setScaleUpdatePages(newScale, newValue, noScroll = false, preset = false) {\n this._currentScaleValue = newValue.toString();\n\n if (isSameScale(this._currentScale, newScale)) {\n if (preset) {\n this.eventBus.dispatch(\"scalechanging\", {\n source: this,\n scale: newScale,\n presetValue: newValue,\n });\n }\n return;\n }\n\n for (let i = 0, ii = this._pages.length; i < ii; i++) {\n this._pages[i].update(newScale);\n }\n this._currentScale = newScale;\n\n if (!noScroll) {\n let page = this._currentPageNumber,\n dest;\n if (\n this._location &&\n !(this.isInPresentationMode || this.isChangingPresentationMode)\n ) {\n page = this._location.pageNumber;\n dest = [\n null,\n { name: \"XYZ\" },\n this._location.left,\n this._location.top,\n null,\n ];\n }\n this.scrollPageIntoView({\n pageNumber: page,\n destArray: dest,\n allowNegativeOffset: true,\n });\n }\n\n this.eventBus.dispatch(\"scalechanging\", {\n source: this,\n scale: newScale,\n presetValue: preset ? newValue : undefined,\n });\n\n if (this.defaultRenderingQueue) {\n this.update();\n }\n }\n\n _setScale(value, noScroll = false) {\n let scale = parseFloat(value);\n\n if (scale > 0) {\n this._setScaleUpdatePages(scale, value, noScroll, /* preset = */ false);\n } else {\n const currentPage = this._pages[this._currentPageNumber - 1];\n if (!currentPage) {\n return;\n }\n const noPadding = this.isInPresentationMode || this.removePageBorders;\n let hPadding = noPadding ? 0 : SCROLLBAR_PADDING;\n let vPadding = noPadding ? 0 : VERTICAL_PADDING;\n\n if (!noPadding && this._isScrollModeHorizontal) {\n [hPadding, vPadding] = [vPadding, hPadding]; // Swap the padding values.\n }\n const pageWidthScale =\n ((this.container.clientWidth - hPadding) / currentPage.width) *\n currentPage.scale;\n const pageHeightScale =\n ((this.container.clientHeight - vPadding) / currentPage.height) *\n currentPage.scale;\n switch (value) {\n case \"page-actual\":\n scale = 1;\n break;\n case \"page-width\":\n scale = pageWidthScale;\n break;\n case \"page-height\":\n scale = pageHeightScale;\n break;\n case \"page-fit\":\n scale = Math.min(pageWidthScale, pageHeightScale);\n break;\n case \"auto\":\n // For pages in landscape mode, fit the page height to the viewer\n // *unless* the page would thus become too wide to fit horizontally.\n const horizontalScale = isPortraitOrientation(currentPage)\n ? pageWidthScale\n : Math.min(pageHeightScale, pageWidthScale);\n scale = Math.min(MAX_AUTO_SCALE, horizontalScale);\n break;\n default:\n console.error(\n `${this._name}._setScale: \"${value}\" is an unknown zoom value.`\n );\n return;\n }\n this._setScaleUpdatePages(scale, value, noScroll, /* preset = */ true);\n }\n }\n\n /**\n * Refreshes page view: scrolls to the current page and updates the scale.\n * @private\n */\n _resetCurrentPageView() {\n if (this.isInPresentationMode) {\n // Fixes the case when PDF has different page sizes.\n this._setScale(this._currentScaleValue, true);\n }\n\n const pageView = this._pages[this._currentPageNumber - 1];\n this._scrollIntoView({ pageDiv: pageView.div });\n }\n\n /**\n * @typedef ScrollPageIntoViewParameters\n * @property {number} pageNumber - The page number.\n * @property {Array} [destArray] - The original PDF destination array, in the\n * format: <page-ref> </XYZ|/FitXXX> <args..>\n * @property {boolean} [allowNegativeOffset] - Allow negative page offsets.\n * The default value is `false`.\n * @property {boolean} [ignoreDestinationZoom] - Ignore the zoom argument in\n * the destination array. The default value is `false`.\n */\n\n /**\n * Scrolls page into view.\n * @param {ScrollPageIntoViewParameters} params\n */\n scrollPageIntoView({\n pageNumber,\n destArray = null,\n allowNegativeOffset = false,\n ignoreDestinationZoom = false,\n }) {\n if (!this.pdfDocument) {\n return;\n }\n const pageView =\n Number.isInteger(pageNumber) && this._pages[pageNumber - 1];\n if (!pageView) {\n console.error(\n `${this._name}.scrollPageIntoView: ` +\n `\"${pageNumber}\" is not a valid pageNumber parameter.`\n );\n return;\n }\n\n if (this.isInPresentationMode || !destArray) {\n this._setCurrentPageNumber(pageNumber, /* resetCurrentPageView = */ true);\n return;\n }\n let x = 0,\n y = 0;\n let width = 0,\n height = 0,\n widthScale,\n heightScale;\n const changeOrientation = pageView.rotation % 180 !== 0;\n const pageWidth =\n (changeOrientation ? pageView.height : pageView.width) /\n pageView.scale /\n CSS_UNITS;\n const pageHeight =\n (changeOrientation ? pageView.width : pageView.height) /\n pageView.scale /\n CSS_UNITS;\n let scale = 0;\n switch (destArray[1].name) {\n case \"XYZ\":\n x = destArray[2];\n y = destArray[3];\n scale = destArray[4];\n // If x and/or y coordinates are not supplied, default to\n // _top_ left of the page (not the obvious bottom left,\n // since aligning the bottom of the intended page with the\n // top of the window is rarely helpful).\n x = x !== null ? x : 0;\n y = y !== null ? y : pageHeight;\n break;\n case \"Fit\":\n case \"FitB\":\n scale = \"page-fit\";\n break;\n case \"FitH\":\n case \"FitBH\":\n y = destArray[2];\n scale = \"page-width\";\n // According to the PDF spec, section 12.3.2.2, a `null` value in the\n // parameter should maintain the position relative to the new page.\n if (y === null && this._location) {\n x = this._location.left;\n y = this._location.top;\n }\n break;\n case \"FitV\":\n case \"FitBV\":\n x = destArray[2];\n width = pageWidth;\n height = pageHeight;\n scale = \"page-height\";\n break;\n case \"FitR\":\n x = destArray[2];\n y = destArray[3];\n width = destArray[4] - x;\n height = destArray[5] - y;\n const hPadding = this.removePageBorders ? 0 : SCROLLBAR_PADDING;\n const vPadding = this.removePageBorders ? 0 : VERTICAL_PADDING;\n\n widthScale =\n (this.container.clientWidth - hPadding) / width / CSS_UNITS;\n heightScale =\n (this.container.clientHeight - vPadding) / height / CSS_UNITS;\n scale = Math.min(Math.abs(widthScale), Math.abs(heightScale));\n break;\n default:\n console.error(\n `${this._name}.scrollPageIntoView: ` +\n `\"${destArray[1].name}\" is not a valid destination type.`\n );\n return;\n }\n\n if (!ignoreDestinationZoom) {\n if (scale && scale !== this._currentScale) {\n this.currentScaleValue = scale;\n } else if (this._currentScale === UNKNOWN_SCALE) {\n this.currentScaleValue = DEFAULT_SCALE_VALUE;\n }\n }\n\n if (scale === \"page-fit\" && !destArray[4]) {\n this._scrollIntoView({\n pageDiv: pageView.div,\n pageNumber,\n });\n return;\n }\n\n const boundingRect = [\n pageView.viewport.convertToViewportPoint(x, y),\n pageView.viewport.convertToViewportPoint(x + width, y + height),\n ];\n let left = Math.min(boundingRect[0][0], boundingRect[1][0]);\n let top = Math.min(boundingRect[0][1], boundingRect[1][1]);\n\n if (!allowNegativeOffset) {\n // Some bad PDF generators will create destinations with e.g. top values\n // that exceeds the page height. Ensure that offsets are not negative,\n // to prevent a previous page from becoming visible (fixes bug 874482).\n left = Math.max(left, 0);\n top = Math.max(top, 0);\n }\n this._scrollIntoView({\n pageDiv: pageView.div,\n pageSpot: { left, top },\n pageNumber,\n });\n }\n\n _updateLocation(firstPage) {\n const currentScale = this._currentScale;\n const currentScaleValue = this._currentScaleValue;\n const normalizedScaleValue =\n parseFloat(currentScaleValue) === currentScale\n ? Math.round(currentScale * 10000) / 100\n : currentScaleValue;\n\n const pageNumber = firstPage.id;\n let pdfOpenParams = \"#page=\" + pageNumber;\n pdfOpenParams += \"&zoom=\" + normalizedScaleValue;\n const currentPageView = this._pages[pageNumber - 1];\n const container = this.container;\n const topLeft = currentPageView.getPagePoint(\n container.scrollLeft - firstPage.x,\n container.scrollTop - firstPage.y\n );\n const intLeft = Math.round(topLeft[0]);\n const intTop = Math.round(topLeft[1]);\n pdfOpenParams += \",\" + intLeft + \",\" + intTop;\n\n this._location = {\n pageNumber,\n scale: normalizedScaleValue,\n top: intTop,\n left: intLeft,\n rotation: this._pagesRotation,\n pdfOpenParams,\n };\n }\n\n _updateHelper(visiblePages) {\n throw new Error(\"Not implemented: _updateHelper\");\n }\n\n update() {\n const visible = this._getVisiblePages();\n const visiblePages = visible.views,\n numVisiblePages = visiblePages.length;\n\n if (numVisiblePages === 0) {\n return;\n }\n const newCacheSize = Math.max(DEFAULT_CACHE_SIZE, 2 * numVisiblePages + 1);\n this._buffer.resize(newCacheSize, visiblePages);\n\n this.renderingQueue.renderHighestPriority(visible);\n\n this._updateHelper(visiblePages); // Run any class-specific update code.\n\n this._updateLocation(visible.first);\n this.eventBus.dispatch(\"updateviewarea\", {\n source: this,\n location: this._location,\n });\n }\n\n containsElement(element) {\n return this.container.contains(element);\n }\n\n focus() {\n this.container.focus();\n }\n\n get _isScrollModeHorizontal() {\n // Used to ensure that pre-rendering of the next/previous page works\n // correctly, since Scroll/Spread modes are ignored in Presentation Mode.\n return this.isInPresentationMode\n ? false\n : this._scrollMode === ScrollMode.HORIZONTAL;\n }\n\n get isInPresentationMode() {\n return this.presentationModeState === PresentationModeState.FULLSCREEN;\n }\n\n get isChangingPresentationMode() {\n return this.presentationModeState === PresentationModeState.CHANGING;\n }\n\n get isHorizontalScrollbarEnabled() {\n return this.isInPresentationMode\n ? false\n : this.container.scrollWidth > this.container.clientWidth;\n }\n\n get isVerticalScrollbarEnabled() {\n return this.isInPresentationMode\n ? false\n : this.container.scrollHeight > this.container.clientHeight;\n }\n\n /**\n * Helper method for `this._getVisiblePages`. Should only ever be used when\n * the viewer can only display a single page at a time, for example in:\n * - `PDFSinglePageViewer`.\n * - `PDFViewer` with Presentation Mode active.\n */\n _getCurrentVisiblePage() {\n if (!this.pagesCount) {\n return { views: [] };\n }\n const pageView = this._pages[this._currentPageNumber - 1];\n // NOTE: Compute the `x` and `y` properties of the current view,\n // since `this._updateLocation` depends of them being available.\n const element = pageView.div;\n\n const view = {\n id: pageView.id,\n x: element.offsetLeft + element.clientLeft,\n y: element.offsetTop + element.clientTop,\n view: pageView,\n };\n return { first: view, last: view, views: [view] };\n }\n\n _getVisiblePages() {\n return getVisibleElements(\n this.container,\n this._pages,\n true,\n this._isScrollModeHorizontal\n );\n }\n\n /**\n * @param {number} pageNumber\n */\n isPageVisible(pageNumber) {\n if (!this.pdfDocument) {\n return false;\n }\n if (pageNumber < 1 || pageNumber > this.pagesCount) {\n console.error(\n `${this._name}.isPageVisible: \"${pageNumber}\" is out of bounds.`\n );\n return false;\n }\n return this._getVisiblePages().views.some(function(view) {\n return view.id === pageNumber;\n });\n }\n\n cleanup() {\n for (let i = 0, ii = this._pages.length; i < ii; i++) {\n if (\n this._pages[i] &&\n this._pages[i].renderingState !== RenderingStates.FINISHED\n ) {\n this._pages[i].reset();\n }\n }\n }\n\n /**\n * @private\n */\n _cancelRendering() {\n for (let i = 0, ii = this._pages.length; i < ii; i++) {\n if (this._pages[i]) {\n this._pages[i].cancelRendering();\n }\n }\n }\n\n /**\n * @param {PDFPageView} pageView\n * @returns {Promise} Returns a promise containing a {PDFPageProxy} object.\n * @private\n */\n _ensurePdfPageLoaded(pageView) {\n if (pageView.pdfPage) {\n return Promise.resolve(pageView.pdfPage);\n }\n if (this._pagesRequests.has(pageView)) {\n return this._pagesRequests.get(pageView);\n }\n const promise = this.pdfDocument\n .getPage(pageView.id)\n .then(pdfPage => {\n if (!pageView.pdfPage) {\n pageView.setPdfPage(pdfPage);\n }\n this._pagesRequests.delete(pageView);\n return pdfPage;\n })\n .catch(reason => {\n console.error(\"Unable to get page for page view\", reason);\n // Page error -- there is nothing that can be done.\n this._pagesRequests.delete(pageView);\n });\n this._pagesRequests.set(pageView, promise);\n return promise;\n }\n\n forceRendering(currentlyVisiblePages) {\n const visiblePages = currentlyVisiblePages || this._getVisiblePages();\n const scrollAhead = this._isScrollModeHorizontal\n ? this.scroll.right\n : this.scroll.down;\n const pageView = this.renderingQueue.getHighestPriority(\n visiblePages,\n this._pages,\n scrollAhead\n );\n if (pageView) {\n this._ensurePdfPageLoaded(pageView).then(() => {\n this.renderingQueue.renderView(pageView);\n });\n return true;\n }\n return false;\n }\n\n /**\n * @param {HTMLDivElement} textLayerDiv\n * @param {number} pageIndex\n * @param {PageViewport} viewport\n * @param {boolean} enhanceTextSelection\n * @param {EventBus} eventBus\n * @returns {TextLayerBuilder}\n */\n createTextLayerBuilder(\n textLayerDiv,\n pageIndex,\n viewport,\n enhanceTextSelection = false,\n eventBus\n ) {\n return new TextLayerBuilder({\n textLayerDiv,\n eventBus,\n pageIndex,\n viewport,\n findController: this.isInPresentationMode ? null : this.findController,\n enhanceTextSelection: this.isInPresentationMode\n ? false\n : enhanceTextSelection,\n });\n }\n\n /**\n * @param {HTMLDivElement} pageDiv\n * @param {PDFPage} pdfPage\n * @param {string} [imageResourcesPath] - Path for image resources, mainly\n * for annotation icons. Include trailing slash.\n * @param {boolean} renderInteractiveForms\n * @param {IL10n} l10n\n * @returns {AnnotationLayerBuilder}\n */\n createAnnotationLayerBuilder(\n pageDiv,\n pdfPage,\n imageResourcesPath = \"\",\n renderInteractiveForms = false,\n l10n = NullL10n\n ) {\n return new AnnotationLayerBuilder({\n pageDiv,\n pdfPage,\n imageResourcesPath,\n renderInteractiveForms,\n linkService: this.linkService,\n downloadManager: this.downloadManager,\n l10n,\n });\n }\n\n /**\n * @type {boolean} Whether all pages of the PDF document have identical\n * widths and heights.\n */\n get hasEqualPageSizes() {\n const firstPageView = this._pages[0];\n for (let i = 1, ii = this._pages.length; i < ii; ++i) {\n const pageView = this._pages[i];\n if (\n pageView.width !== firstPageView.width ||\n pageView.height !== firstPageView.height\n ) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Returns sizes of the pages.\n * @returns {Array} Array of objects with width/height/rotation fields.\n */\n getPagesOverview() {\n const pagesOverview = this._pages.map(function(pageView) {\n const viewport = pageView.pdfPage.getViewport({ scale: 1 });\n return {\n width: viewport.width,\n height: viewport.height,\n rotation: viewport.rotation,\n };\n });\n if (!this.enablePrintAutoRotate) {\n return pagesOverview;\n }\n const isFirstPagePortrait = isPortraitOrientation(pagesOverview[0]);\n return pagesOverview.map(function(size) {\n if (isFirstPagePortrait === isPortraitOrientation(size)) {\n return size;\n }\n return {\n width: size.height,\n height: size.width,\n rotation: (size.rotation + 90) % 360,\n };\n });\n }\n\n /**\n * @type {number} One of the values in {ScrollMode}.\n */\n get scrollMode() {\n return this._scrollMode;\n }\n\n /**\n * @param {number} mode - The direction in which the document pages should be\n * laid out within the scrolling container.\n * The constants from {ScrollMode} should be used.\n */\n set scrollMode(mode) {\n if (this._scrollMode === mode) {\n return; // The Scroll mode didn't change.\n }\n if (!isValidScrollMode(mode)) {\n throw new Error(`Invalid scroll mode: ${mode}`);\n }\n this._scrollMode = mode;\n this.eventBus.dispatch(\"scrollmodechanged\", { source: this, mode });\n\n this._updateScrollMode(/* pageNumber = */ this._currentPageNumber);\n }\n\n _updateScrollMode(pageNumber = null) {\n const scrollMode = this._scrollMode,\n viewer = this.viewer;\n\n viewer.classList.toggle(\n \"scrollHorizontal\",\n scrollMode === ScrollMode.HORIZONTAL\n );\n viewer.classList.toggle(\"scrollWrapped\", scrollMode === ScrollMode.WRAPPED);\n\n if (!this.pdfDocument || !pageNumber) {\n return;\n }\n // Non-numeric scale values can be sensitive to the scroll orientation.\n // Call this before re-scrolling to the current page, to ensure that any\n // changes in scale don't move the current page.\n if (this._currentScaleValue && isNaN(this._currentScaleValue)) {\n this._setScale(this._currentScaleValue, true);\n }\n this._setCurrentPageNumber(pageNumber, /* resetCurrentPageView = */ true);\n this.update();\n }\n\n /**\n * @type {number} One of the values in {SpreadMode}.\n */\n get spreadMode() {\n return this._spreadMode;\n }\n\n /**\n * @param {number} mode - Group the pages in spreads, starting with odd- or\n * even-number pages (unless `SpreadMode.NONE` is used).\n * The constants from {SpreadMode} should be used.\n */\n set spreadMode(mode) {\n if (this._spreadMode === mode) {\n return; // The Spread mode didn't change.\n }\n if (!isValidSpreadMode(mode)) {\n throw new Error(`Invalid spread mode: ${mode}`);\n }\n this._spreadMode = mode;\n this.eventBus.dispatch(\"spreadmodechanged\", { source: this, mode });\n\n this._updateSpreadMode(/* pageNumber = */ this._currentPageNumber);\n }\n\n _updateSpreadMode(pageNumber = null) {\n if (!this.pdfDocument) {\n return;\n }\n const viewer = this.viewer,\n pages = this._pages;\n // Temporarily remove all the pages from the DOM.\n viewer.textContent = \"\";\n\n if (this._spreadMode === SpreadMode.NONE) {\n for (let i = 0, iMax = pages.length; i < iMax; ++i) {\n viewer.appendChild(pages[i].div);\n }\n } else {\n const parity = this._spreadMode - 1;\n let spread = null;\n for (let i = 0, iMax = pages.length; i < iMax; ++i) {\n if (spread === null) {\n spread = document.createElement(\"div\");\n spread.className = \"spread\";\n viewer.appendChild(spread);\n } else if (i % 2 === parity) {\n spread = spread.cloneNode(false);\n viewer.appendChild(spread);\n }\n spread.appendChild(pages[i].div);\n }\n }\n\n if (!pageNumber) {\n return;\n }\n this._setCurrentPageNumber(pageNumber, /* resetCurrentPageView = */ true);\n this.update();\n }\n}\n\nexport { BaseViewer };\n","/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AnnotationLayer } from \"pdfjs-lib\";\nimport { NullL10n } from \"./ui_utils.js\";\nimport { SimpleLinkService } from \"./pdf_link_service.js\";\n\n/**\n * @typedef {Object} AnnotationLayerBuilderOptions\n * @property {HTMLDivElement} pageDiv\n * @property {PDFPage} pdfPage\n * @property {string} [imageResourcesPath] - Path for image resources, mainly\n * for annotation icons. Include trailing slash.\n * @property {boolean} renderInteractiveForms\n * @property {IPDFLinkService} linkService\n * @property {DownloadManager} downloadManager\n * @property {IL10n} l10n - Localization service.\n */\n\nclass AnnotationLayerBuilder {\n /**\n * @param {AnnotationLayerBuilderOptions} options\n */\n constructor({\n pageDiv,\n pdfPage,\n linkService,\n downloadManager,\n imageResourcesPath = \"\",\n renderInteractiveForms = false,\n l10n = NullL10n,\n }) {\n this.pageDiv = pageDiv;\n this.pdfPage = pdfPage;\n this.linkService = linkService;\n this.downloadManager = downloadManager;\n this.imageResourcesPath = imageResourcesPath;\n this.renderInteractiveForms = renderInteractiveForms;\n this.l10n = l10n;\n\n this.div = null;\n this._cancelled = false;\n }\n\n /**\n * @param {PageViewport} viewport\n * @param {string} intent (default value is 'display')\n */\n render(viewport, intent = \"display\") {\n this.pdfPage.getAnnotations({ intent }).then(annotations => {\n if (this._cancelled) {\n return;\n }\n\n const parameters = {\n viewport: viewport.clone({ dontFlip: true }),\n div: this.div,\n annotations,\n page: this.pdfPage,\n imageResourcesPath: this.imageResourcesPath,\n renderInteractiveForms: this.renderInteractiveForms,\n linkService: this.linkService,\n downloadManager: this.downloadManager,\n };\n\n if (this.div) {\n // If an annotationLayer already exists, refresh its children's\n // transformation matrices.\n AnnotationLayer.update(parameters);\n } else {\n // Create an annotation layer div and render the annotations\n // if there is at least one annotation.\n if (annotations.length === 0) {\n return;\n }\n this.div = document.createElement(\"div\");\n this.div.className = \"annotationLayer\";\n this.pageDiv.appendChild(this.div);\n parameters.div = this.div;\n\n AnnotationLayer.render(parameters);\n this.l10n.translate(this.div);\n }\n });\n }\n\n cancel() {\n this._cancelled = true;\n }\n\n hide() {\n if (!this.div) {\n return;\n }\n this.div.setAttribute(\"hidden\", \"true\");\n }\n}\n\n/**\n * @implements IPDFAnnotationLayerFactory\n */\nclass DefaultAnnotationLayerFactory {\n /**\n * @param {HTMLDivElement} pageDiv\n * @param {PDFPage} pdfPage\n * @param {string} [imageResourcesPath] - Path for image resources, mainly\n * for annotation icons. Include trailing slash.\n * @param {boolean} renderInteractiveForms\n * @param {IL10n} l10n\n * @returns {AnnotationLayerBuilder}\n */\n createAnnotationLayerBuilder(\n pageDiv,\n pdfPage,\n imageResourcesPath = \"\",\n renderInteractiveForms = false,\n l10n = NullL10n\n ) {\n return new AnnotationLayerBuilder({\n pageDiv,\n pdfPage,\n imageResourcesPath,\n renderInteractiveForms,\n linkService: new SimpleLinkService(),\n l10n,\n });\n }\n}\n\nexport { AnnotationLayerBuilder, DefaultAnnotationLayerFactory };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n approximateFraction,\n CSS_UNITS,\n DEFAULT_SCALE,\n getGlobalEventBus,\n getOutputScale,\n NullL10n,\n RendererType,\n roundToDivide,\n TextLayerMode,\n} from \"./ui_utils.js\";\nimport {\n createPromiseCapability,\n RenderingCancelledException,\n SVGGraphics,\n} from \"pdfjs-lib\";\nimport { RenderingStates } from \"./pdf_rendering_queue.js\";\nimport { viewerCompatibilityParams } from \"./viewer_compatibility.js\";\n\n/**\n * @typedef {Object} PDFPageViewOptions\n * @property {HTMLDivElement} container - The viewer element.\n * @property {EventBus} eventBus - The application event bus.\n * @property {number} id - The page unique ID (normally its number).\n * @property {number} scale - The page scale display.\n * @property {PageViewport} defaultViewport - The page viewport.\n * @property {PDFRenderingQueue} renderingQueue - The rendering queue object.\n * @property {IPDFTextLayerFactory} textLayerFactory\n * @property {number} [textLayerMode] - Controls if the text layer used for\n * selection and searching is created, and if the improved text selection\n * behaviour is enabled. The constants from {TextLayerMode} should be used.\n * The default value is `TextLayerMode.ENABLE`.\n * @property {IPDFAnnotationLayerFactory} annotationLayerFactory\n * @property {string} [imageResourcesPath] - Path for image resources, mainly\n * for annotation icons. Include trailing slash.\n * @property {boolean} renderInteractiveForms - Turns on rendering of\n * interactive form elements. The default is `false`.\n * @property {string} renderer - 'canvas' or 'svg'. The default is 'canvas'.\n * @property {boolean} [enableWebGL] - Enables WebGL accelerated rendering for\n * some operations. The default value is `false`.\n * @property {boolean} [useOnlyCssZoom] - Enables CSS only zooming. The default\n * value is `false`.\n * @property {number} [maxCanvasPixels] - The maximum supported canvas size in\n * total pixels, i.e. width * height. Use -1 for no limit. The default value\n * is 4096 * 4096 (16 mega-pixels).\n * @property {IL10n} l10n - Localization service.\n */\n\nconst MAX_CANVAS_PIXELS = viewerCompatibilityParams.maxCanvasPixels || 16777216;\n\n/**\n * @implements {IRenderableView}\n */\nclass PDFPageView {\n /**\n * @param {PDFPageViewOptions} options\n */\n constructor(options) {\n const container = options.container;\n const defaultViewport = options.defaultViewport;\n\n this.id = options.id;\n this.renderingId = \"page\" + this.id;\n\n this.pdfPage = null;\n this.pageLabel = null;\n this.rotation = 0;\n this.scale = options.scale || DEFAULT_SCALE;\n this.viewport = defaultViewport;\n this.pdfPageRotate = defaultViewport.rotation;\n this.hasRestrictedScaling = false;\n this.textLayerMode = Number.isInteger(options.textLayerMode)\n ? options.textLayerMode\n : TextLayerMode.ENABLE;\n this.imageResourcesPath = options.imageResourcesPath || \"\";\n this.renderInteractiveForms = options.renderInteractiveForms || false;\n this.useOnlyCssZoom = options.useOnlyCssZoom || false;\n this.maxCanvasPixels = options.maxCanvasPixels || MAX_CANVAS_PIXELS;\n\n this.eventBus = options.eventBus || getGlobalEventBus();\n this.renderingQueue = options.renderingQueue;\n this.textLayerFactory = options.textLayerFactory;\n this.annotationLayerFactory = options.annotationLayerFactory;\n this.renderer = options.renderer || RendererType.CANVAS;\n this.enableWebGL = options.enableWebGL || false;\n this.l10n = options.l10n || NullL10n;\n\n this.paintTask = null;\n this.paintedViewportMap = new WeakMap();\n this.renderingState = RenderingStates.INITIAL;\n this.resume = null;\n this.error = null;\n\n this.annotationLayer = null;\n this.textLayer = null;\n this.zoomLayer = null;\n\n const div = document.createElement(\"div\");\n div.className = \"page\";\n div.style.width = Math.floor(this.viewport.width) + \"px\";\n div.style.height = Math.floor(this.viewport.height) + \"px\";\n div.setAttribute(\"data-page-number\", this.id);\n this.div = div;\n\n container.appendChild(div);\n }\n\n setPdfPage(pdfPage) {\n this.pdfPage = pdfPage;\n this.pdfPageRotate = pdfPage.rotate;\n\n const totalRotation = (this.rotation + this.pdfPageRotate) % 360;\n this.viewport = pdfPage.getViewport({\n scale: this.scale * CSS_UNITS,\n rotation: totalRotation,\n });\n this.stats = pdfPage.stats;\n this.reset();\n }\n\n destroy() {\n this.reset();\n if (this.pdfPage) {\n this.pdfPage.cleanup();\n }\n }\n\n /**\n * @private\n */\n _resetZoomLayer(removeFromDOM = false) {\n if (!this.zoomLayer) {\n return;\n }\n const zoomLayerCanvas = this.zoomLayer.firstChild;\n this.paintedViewportMap.delete(zoomLayerCanvas);\n // Zeroing the width and height causes Firefox to release graphics\n // resources immediately, which can greatly reduce memory consumption.\n zoomLayerCanvas.width = 0;\n zoomLayerCanvas.height = 0;\n\n if (removeFromDOM) {\n // Note: `ChildNode.remove` doesn't throw if the parent node is undefined.\n this.zoomLayer.remove();\n }\n this.zoomLayer = null;\n }\n\n reset(keepZoomLayer = false, keepAnnotations = false) {\n this.cancelRendering(keepAnnotations);\n this.renderingState = RenderingStates.INITIAL;\n\n const div = this.div;\n div.style.width = Math.floor(this.viewport.width) + \"px\";\n div.style.height = Math.floor(this.viewport.height) + \"px\";\n\n const childNodes = div.childNodes;\n const currentZoomLayerNode = (keepZoomLayer && this.zoomLayer) || null;\n const currentAnnotationNode =\n (keepAnnotations && this.annotationLayer && this.annotationLayer.div) ||\n null;\n for (let i = childNodes.length - 1; i >= 0; i--) {\n const node = childNodes[i];\n if (currentZoomLayerNode === node || currentAnnotationNode === node) {\n continue;\n }\n div.removeChild(node);\n }\n div.removeAttribute(\"data-loaded\");\n\n if (currentAnnotationNode) {\n // Hide the annotation layer until all elements are resized\n // so they are not displayed on the already resized page.\n this.annotationLayer.hide();\n } else if (this.annotationLayer) {\n this.annotationLayer.cancel();\n this.annotationLayer = null;\n }\n\n if (!currentZoomLayerNode) {\n if (this.canvas) {\n this.paintedViewportMap.delete(this.canvas);\n // Zeroing the width and height causes Firefox to release graphics\n // resources immediately, which can greatly reduce memory consumption.\n this.canvas.width = 0;\n this.canvas.height = 0;\n delete this.canvas;\n }\n this._resetZoomLayer();\n }\n if (this.svg) {\n this.paintedViewportMap.delete(this.svg);\n delete this.svg;\n }\n\n this.loadingIconDiv = document.createElement(\"div\");\n this.loadingIconDiv.className = \"loadingIcon\";\n div.appendChild(this.loadingIconDiv);\n }\n\n update(scale, rotation) {\n this.scale = scale || this.scale;\n // The rotation may be zero.\n if (typeof rotation !== \"undefined\") {\n this.rotation = rotation;\n }\n\n const totalRotation = (this.rotation + this.pdfPageRotate) % 360;\n this.viewport = this.viewport.clone({\n scale: this.scale * CSS_UNITS,\n rotation: totalRotation,\n });\n\n if (this.svg) {\n this.cssTransform(this.svg, true);\n\n this.eventBus.dispatch(\"pagerendered\", {\n source: this,\n pageNumber: this.id,\n cssTransform: true,\n timestamp: performance.now(),\n });\n return;\n }\n\n let isScalingRestricted = false;\n if (this.canvas && this.maxCanvasPixels > 0) {\n const outputScale = this.outputScale;\n if (\n ((Math.floor(this.viewport.width) * outputScale.sx) | 0) *\n ((Math.floor(this.viewport.height) * outputScale.sy) | 0) >\n this.maxCanvasPixels\n ) {\n isScalingRestricted = true;\n }\n }\n\n if (this.canvas) {\n if (\n this.useOnlyCssZoom ||\n (this.hasRestrictedScaling && isScalingRestricted)\n ) {\n this.cssTransform(this.canvas, true);\n\n this.eventBus.dispatch(\"pagerendered\", {\n source: this,\n pageNumber: this.id,\n cssTransform: true,\n timestamp: performance.now(),\n });\n return;\n }\n if (!this.zoomLayer && !this.canvas.hasAttribute(\"hidden\")) {\n this.zoomLayer = this.canvas.parentNode;\n this.zoomLayer.style.position = \"absolute\";\n }\n }\n if (this.zoomLayer) {\n this.cssTransform(this.zoomLayer.firstChild);\n }\n this.reset(/* keepZoomLayer = */ true, /* keepAnnotations = */ true);\n }\n\n /**\n * PLEASE NOTE: Most likely you want to use the `this.reset()` method,\n * rather than calling this one directly.\n */\n cancelRendering(keepAnnotations = false) {\n if (this.paintTask) {\n this.paintTask.cancel();\n this.paintTask = null;\n }\n this.resume = null;\n\n if (this.textLayer) {\n this.textLayer.cancel();\n this.textLayer = null;\n }\n if (!keepAnnotations && this.annotationLayer) {\n this.annotationLayer.cancel();\n this.annotationLayer = null;\n }\n }\n\n cssTransform(target, redrawAnnotations = false) {\n // Scale target (canvas or svg), its wrapper and page container.\n const width = this.viewport.width;\n const height = this.viewport.height;\n const div = this.div;\n target.style.width = target.parentNode.style.width = div.style.width =\n Math.floor(width) + \"px\";\n target.style.height = target.parentNode.style.height = div.style.height =\n Math.floor(height) + \"px\";\n // The canvas may have been originally rotated; rotate relative to that.\n const relativeRotation =\n this.viewport.rotation - this.paintedViewportMap.get(target).rotation;\n const absRotation = Math.abs(relativeRotation);\n let scaleX = 1,\n scaleY = 1;\n if (absRotation === 90 || absRotation === 270) {\n // Scale x and y because of the rotation.\n scaleX = height / width;\n scaleY = width / height;\n }\n const cssTransform =\n \"rotate(\" +\n relativeRotation +\n \"deg) \" +\n \"scale(\" +\n scaleX +\n \",\" +\n scaleY +\n \")\";\n target.style.transform = cssTransform;\n\n if (this.textLayer) {\n // Rotating the text layer is more complicated since the divs inside the\n // the text layer are rotated.\n // TODO: This could probably be simplified by drawing the text layer in\n // one orientation and then rotating overall.\n const textLayerViewport = this.textLayer.viewport;\n const textRelativeRotation =\n this.viewport.rotation - textLayerViewport.rotation;\n const textAbsRotation = Math.abs(textRelativeRotation);\n let scale = width / textLayerViewport.width;\n if (textAbsRotation === 90 || textAbsRotation === 270) {\n scale = width / textLayerViewport.height;\n }\n const textLayerDiv = this.textLayer.textLayerDiv;\n let transX, transY;\n switch (textAbsRotation) {\n case 0:\n transX = transY = 0;\n break;\n case 90:\n transX = 0;\n transY = \"-\" + textLayerDiv.style.height;\n break;\n case 180:\n transX = \"-\" + textLayerDiv.style.width;\n transY = \"-\" + textLayerDiv.style.height;\n break;\n case 270:\n transX = \"-\" + textLayerDiv.style.width;\n transY = 0;\n break;\n default:\n console.error(\"Bad rotation value.\");\n break;\n }\n\n textLayerDiv.style.transform =\n \"rotate(\" +\n textAbsRotation +\n \"deg) \" +\n \"scale(\" +\n scale +\n \", \" +\n scale +\n \") \" +\n \"translate(\" +\n transX +\n \", \" +\n transY +\n \")\";\n textLayerDiv.style.transformOrigin = \"0% 0%\";\n }\n\n if (redrawAnnotations && this.annotationLayer) {\n this.annotationLayer.render(this.viewport, \"display\");\n }\n }\n\n get width() {\n return this.viewport.width;\n }\n\n get height() {\n return this.viewport.height;\n }\n\n getPagePoint(x, y) {\n return this.viewport.convertToPdfPoint(x, y);\n }\n\n draw() {\n if (this.renderingState !== RenderingStates.INITIAL) {\n console.error(\"Must be in new state before drawing\");\n this.reset(); // Ensure that we reset all state to prevent issues.\n }\n const { div, pdfPage } = this;\n\n if (!pdfPage) {\n this.renderingState = RenderingStates.FINISHED;\n\n if (this.loadingIconDiv) {\n div.removeChild(this.loadingIconDiv);\n delete this.loadingIconDiv;\n }\n return Promise.reject(new Error(\"pdfPage is not loaded\"));\n }\n\n this.renderingState = RenderingStates.RUNNING;\n\n // Wrap the canvas so that if it has a CSS transform for high DPI the\n // overflow will be hidden in Firefox.\n const canvasWrapper = document.createElement(\"div\");\n canvasWrapper.style.width = div.style.width;\n canvasWrapper.style.height = div.style.height;\n canvasWrapper.classList.add(\"canvasWrapper\");\n\n if (this.annotationLayer && this.annotationLayer.div) {\n // The annotation layer needs to stay on top.\n div.insertBefore(canvasWrapper, this.annotationLayer.div);\n } else {\n div.appendChild(canvasWrapper);\n }\n\n let textLayer = null;\n if (this.textLayerMode !== TextLayerMode.DISABLE && this.textLayerFactory) {\n const textLayerDiv = document.createElement(\"div\");\n textLayerDiv.className = \"textLayer\";\n textLayerDiv.style.width = canvasWrapper.style.width;\n textLayerDiv.style.height = canvasWrapper.style.height;\n if (this.annotationLayer && this.annotationLayer.div) {\n // The annotation layer needs to stay on top.\n div.insertBefore(textLayerDiv, this.annotationLayer.div);\n } else {\n div.appendChild(textLayerDiv);\n }\n\n textLayer = this.textLayerFactory.createTextLayerBuilder(\n textLayerDiv,\n this.id - 1,\n this.viewport,\n this.textLayerMode === TextLayerMode.ENABLE_ENHANCE,\n this.eventBus\n );\n }\n this.textLayer = textLayer;\n\n let renderContinueCallback = null;\n if (this.renderingQueue) {\n renderContinueCallback = cont => {\n if (!this.renderingQueue.isHighestPriority(this)) {\n this.renderingState = RenderingStates.PAUSED;\n this.resume = () => {\n this.renderingState = RenderingStates.RUNNING;\n cont();\n };\n return;\n }\n cont();\n };\n }\n\n const finishPaintTask = async error => {\n // The paintTask may have been replaced by a new one, so only remove\n // the reference to the paintTask if it matches the one that is\n // triggering this callback.\n if (paintTask === this.paintTask) {\n this.paintTask = null;\n }\n\n if (error instanceof RenderingCancelledException) {\n this.error = null;\n return;\n }\n\n this.renderingState = RenderingStates.FINISHED;\n\n if (this.loadingIconDiv) {\n div.removeChild(this.loadingIconDiv);\n delete this.loadingIconDiv;\n }\n this._resetZoomLayer(/* removeFromDOM = */ true);\n\n this.error = error;\n this.stats = pdfPage.stats;\n\n this.eventBus.dispatch(\"pagerendered\", {\n source: this,\n pageNumber: this.id,\n cssTransform: false,\n timestamp: performance.now(),\n });\n\n if (error) {\n throw error;\n }\n };\n\n const paintTask =\n this.renderer === RendererType.SVG\n ? this.paintOnSvg(canvasWrapper)\n : this.paintOnCanvas(canvasWrapper);\n paintTask.onRenderContinue = renderContinueCallback;\n this.paintTask = paintTask;\n\n const resultPromise = paintTask.promise.then(\n function() {\n return finishPaintTask(null).then(function() {\n if (textLayer) {\n const readableStream = pdfPage.streamTextContent({\n normalizeWhitespace: true,\n });\n textLayer.setTextContentStream(readableStream);\n textLayer.render();\n }\n });\n },\n function(reason) {\n return finishPaintTask(reason);\n }\n );\n\n if (this.annotationLayerFactory) {\n if (!this.annotationLayer) {\n this.annotationLayer = this.annotationLayerFactory.createAnnotationLayerBuilder(\n div,\n pdfPage,\n this.imageResourcesPath,\n this.renderInteractiveForms,\n this.l10n\n );\n }\n this.annotationLayer.render(this.viewport, \"display\");\n }\n div.setAttribute(\"data-loaded\", true);\n\n this.eventBus.dispatch(\"pagerender\", {\n source: this,\n pageNumber: this.id,\n });\n return resultPromise;\n }\n\n paintOnCanvas(canvasWrapper) {\n const renderCapability = createPromiseCapability();\n const result = {\n promise: renderCapability.promise,\n onRenderContinue(cont) {\n cont();\n },\n cancel() {\n renderTask.cancel();\n },\n };\n\n const viewport = this.viewport;\n const canvas = document.createElement(\"canvas\");\n this.l10n\n .get(\"page_canvas\", { page: this.id }, \"Page {{page}}\")\n .then(msg => {\n canvas.setAttribute(\"aria-label\", msg);\n });\n\n // Keep the canvas hidden until the first draw callback, or until drawing\n // is complete when `!this.renderingQueue`, to prevent black flickering.\n canvas.setAttribute(\"hidden\", \"hidden\");\n let isCanvasHidden = true;\n const showCanvas = function() {\n if (isCanvasHidden) {\n canvas.removeAttribute(\"hidden\");\n isCanvasHidden = false;\n }\n };\n\n canvasWrapper.appendChild(canvas);\n this.canvas = canvas;\n\n if (\n typeof PDFJSDev === \"undefined\" ||\n PDFJSDev.test(\"MOZCENTRAL || GENERIC\")\n ) {\n canvas.mozOpaque = true;\n }\n\n const ctx = canvas.getContext(\"2d\", { alpha: false });\n const outputScale = getOutputScale(ctx);\n this.outputScale = outputScale;\n\n if (this.useOnlyCssZoom) {\n const actualSizeViewport = viewport.clone({ scale: CSS_UNITS });\n // Use a scale that makes the canvas have the originally intended size\n // of the page.\n outputScale.sx *= actualSizeViewport.width / viewport.width;\n outputScale.sy *= actualSizeViewport.height / viewport.height;\n outputScale.scaled = true;\n }\n\n if (this.maxCanvasPixels > 0) {\n const pixelsInViewport = viewport.width * viewport.height;\n const maxScale = Math.sqrt(this.maxCanvasPixels / pixelsInViewport);\n if (outputScale.sx > maxScale || outputScale.sy > maxScale) {\n outputScale.sx = maxScale;\n outputScale.sy = maxScale;\n outputScale.scaled = true;\n this.hasRestrictedScaling = true;\n } else {\n this.hasRestrictedScaling = false;\n }\n }\n\n const sfx = approximateFraction(outputScale.sx);\n const sfy = approximateFraction(outputScale.sy);\n canvas.width = roundToDivide(viewport.width * outputScale.sx, sfx[0]);\n canvas.height = roundToDivide(viewport.height * outputScale.sy, sfy[0]);\n canvas.style.width = roundToDivide(viewport.width, sfx[1]) + \"px\";\n canvas.style.height = roundToDivide(viewport.height, sfy[1]) + \"px\";\n // Add the viewport so it's known what it was originally drawn with.\n this.paintedViewportMap.set(canvas, viewport);\n\n // Rendering area\n const transform = !outputScale.scaled\n ? null\n : [outputScale.sx, 0, 0, outputScale.sy, 0, 0];\n const renderContext = {\n canvasContext: ctx,\n transform,\n viewport: this.viewport,\n enableWebGL: this.enableWebGL,\n renderInteractiveForms: this.renderInteractiveForms,\n };\n const renderTask = this.pdfPage.render(renderContext);\n renderTask.onContinue = function(cont) {\n showCanvas();\n if (result.onRenderContinue) {\n result.onRenderContinue(cont);\n } else {\n cont();\n }\n };\n\n renderTask.promise.then(\n function() {\n showCanvas();\n renderCapability.resolve(undefined);\n },\n function(error) {\n showCanvas();\n renderCapability.reject(error);\n }\n );\n return result;\n }\n\n paintOnSvg(wrapper) {\n if (\n typeof PDFJSDev !== \"undefined\" &&\n PDFJSDev.test(\"MOZCENTRAL || CHROME\")\n ) {\n // Return a mock object, to prevent errors such as e.g.\n // \"TypeError: paintTask.promise is undefined\".\n return {\n promise: Promise.reject(new Error(\"SVG rendering is not supported.\")),\n onRenderContinue(cont) {},\n cancel() {},\n };\n }\n\n let cancelled = false;\n const ensureNotCancelled = () => {\n if (cancelled) {\n throw new RenderingCancelledException(\n `Rendering cancelled, page ${this.id}`,\n \"svg\"\n );\n }\n };\n\n const pdfPage = this.pdfPage;\n const actualSizeViewport = this.viewport.clone({ scale: CSS_UNITS });\n const promise = pdfPage.getOperatorList().then(opList => {\n ensureNotCancelled();\n const svgGfx = new SVGGraphics(pdfPage.commonObjs, pdfPage.objs);\n return svgGfx.getSVG(opList, actualSizeViewport).then(svg => {\n ensureNotCancelled();\n this.svg = svg;\n this.paintedViewportMap.set(svg, actualSizeViewport);\n\n svg.style.width = wrapper.style.width;\n svg.style.height = wrapper.style.height;\n this.renderingState = RenderingStates.FINISHED;\n wrapper.appendChild(svg);\n });\n });\n\n return {\n promise,\n onRenderContinue(cont) {\n cont();\n },\n cancel() {\n cancelled = true;\n },\n };\n }\n\n /**\n * @param {string|null} label\n */\n setPageLabel(label) {\n this.pageLabel = typeof label === \"string\" ? label : null;\n\n if (this.pageLabel !== null) {\n this.div.setAttribute(\"data-page-label\", this.pageLabel);\n } else {\n this.div.removeAttribute(\"data-page-label\");\n }\n }\n}\n\nexport { PDFPageView };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getGlobalEventBus } from \"./ui_utils.js\";\nimport { renderTextLayer } from \"pdfjs-lib\";\n\nconst EXPAND_DIVS_TIMEOUT = 300; // ms\n\n/**\n * @typedef {Object} TextLayerBuilderOptions\n * @property {HTMLDivElement} textLayerDiv - The text layer container.\n * @property {EventBus} eventBus - The application event bus.\n * @property {number} pageIndex - The page index.\n * @property {PageViewport} viewport - The viewport of the text layer.\n * @property {PDFFindController} findController\n * @property {boolean} enhanceTextSelection - Option to turn on improved\n * text selection.\n */\n\n/**\n * The text layer builder provides text selection functionality for the PDF.\n * It does this by creating overlay divs over the PDF's text. These divs\n * contain text that matches the PDF text they are overlaying. This object\n * also provides a way to highlight text that is being searched for.\n */\nclass TextLayerBuilder {\n constructor({\n textLayerDiv,\n eventBus,\n pageIndex,\n viewport,\n findController = null,\n enhanceTextSelection = false,\n }) {\n this.textLayerDiv = textLayerDiv;\n this.eventBus = eventBus || getGlobalEventBus();\n this.textContent = null;\n this.textContentItemsStr = [];\n this.textContentStream = null;\n this.renderingDone = false;\n this.pageIdx = pageIndex;\n this.pageNumber = this.pageIdx + 1;\n this.matches = [];\n this.viewport = viewport;\n this.textDivs = [];\n this.findController = findController;\n this.textLayerRenderTask = null;\n this.enhanceTextSelection = enhanceTextSelection;\n\n this._onUpdateTextLayerMatches = null;\n this._bindMouse();\n }\n\n /**\n * @private\n */\n _finishRendering() {\n this.renderingDone = true;\n\n if (!this.enhanceTextSelection) {\n const endOfContent = document.createElement(\"div\");\n endOfContent.className = \"endOfContent\";\n this.textLayerDiv.appendChild(endOfContent);\n }\n\n this.eventBus.dispatch(\"textlayerrendered\", {\n source: this,\n pageNumber: this.pageNumber,\n numTextDivs: this.textDivs.length,\n });\n }\n\n /**\n * Renders the text layer.\n *\n * @param {number} [timeout] - Wait for a specified amount of milliseconds\n * before rendering.\n */\n render(timeout = 0) {\n if (!(this.textContent || this.textContentStream) || this.renderingDone) {\n return;\n }\n this.cancel();\n\n this.textDivs = [];\n const textLayerFrag = document.createDocumentFragment();\n this.textLayerRenderTask = renderTextLayer({\n textContent: this.textContent,\n textContentStream: this.textContentStream,\n container: textLayerFrag,\n viewport: this.viewport,\n textDivs: this.textDivs,\n textContentItemsStr: this.textContentItemsStr,\n timeout,\n enhanceTextSelection: this.enhanceTextSelection,\n });\n this.textLayerRenderTask.promise.then(\n () => {\n this.textLayerDiv.appendChild(textLayerFrag);\n this._finishRendering();\n this._updateMatches();\n },\n function(reason) {\n // Cancelled or failed to render text layer; skipping errors.\n }\n );\n\n if (!this._onUpdateTextLayerMatches) {\n this._onUpdateTextLayerMatches = evt => {\n if (evt.pageIndex === this.pageIdx || evt.pageIndex === -1) {\n this._updateMatches();\n }\n };\n this.eventBus._on(\n \"updatetextlayermatches\",\n this._onUpdateTextLayerMatches\n );\n }\n }\n\n /**\n * Cancel rendering of the text layer.\n */\n cancel() {\n if (this.textLayerRenderTask) {\n this.textLayerRenderTask.cancel();\n this.textLayerRenderTask = null;\n }\n if (this._onUpdateTextLayerMatches) {\n this.eventBus._off(\n \"updatetextlayermatches\",\n this._onUpdateTextLayerMatches\n );\n this._onUpdateTextLayerMatches = null;\n }\n }\n\n setTextContentStream(readableStream) {\n this.cancel();\n this.textContentStream = readableStream;\n }\n\n setTextContent(textContent) {\n this.cancel();\n this.textContent = textContent;\n }\n\n _convertMatches(matches, matchesLength) {\n // Early exit if there is nothing to convert.\n if (!matches) {\n return [];\n }\n const { findController, textContentItemsStr } = this;\n\n let i = 0,\n iIndex = 0;\n const end = textContentItemsStr.length - 1;\n const queryLen = findController.state.query.length;\n const result = [];\n\n for (let m = 0, mm = matches.length; m < mm; m++) {\n // Calculate the start position.\n let matchIdx = matches[m];\n\n // Loop over the divIdxs.\n while (i !== end && matchIdx >= iIndex + textContentItemsStr[i].length) {\n iIndex += textContentItemsStr[i].length;\n i++;\n }\n\n if (i === textContentItemsStr.length) {\n console.error(\"Could not find a matching mapping\");\n }\n\n const match = {\n begin: {\n divIdx: i,\n offset: matchIdx - iIndex,\n },\n };\n\n // Calculate the end position.\n if (matchesLength) {\n // Multiterm search.\n matchIdx += matchesLength[m];\n } else {\n // Phrase search.\n matchIdx += queryLen;\n }\n\n // Somewhat the same array as above, but use > instead of >= to get\n // the end position right.\n while (i !== end && matchIdx > iIndex + textContentItemsStr[i].length) {\n iIndex += textContentItemsStr[i].length;\n i++;\n }\n\n match.end = {\n divIdx: i,\n offset: matchIdx - iIndex,\n };\n result.push(match);\n }\n return result;\n }\n\n _renderMatches(matches) {\n // Early exit if there is nothing to render.\n if (matches.length === 0) {\n return;\n }\n const { findController, pageIdx, textContentItemsStr, textDivs } = this;\n\n const isSelectedPage = pageIdx === findController.selected.pageIdx;\n const selectedMatchIdx = findController.selected.matchIdx;\n const highlightAll = findController.state.highlightAll;\n let prevEnd = null;\n const infinity = {\n divIdx: -1,\n offset: undefined,\n };\n\n function beginText(begin, className) {\n const divIdx = begin.divIdx;\n textDivs[divIdx].textContent = \"\";\n appendTextToDiv(divIdx, 0, begin.offset, className);\n }\n\n function appendTextToDiv(divIdx, fromOffset, toOffset, className) {\n const div = textDivs[divIdx];\n const content = textContentItemsStr[divIdx].substring(\n fromOffset,\n toOffset\n );\n const node = document.createTextNode(content);\n if (className) {\n const span = document.createElement(\"span\");\n span.className = className;\n span.appendChild(node);\n div.appendChild(span);\n return;\n }\n div.appendChild(node);\n }\n\n let i0 = selectedMatchIdx,\n i1 = i0 + 1;\n if (highlightAll) {\n i0 = 0;\n i1 = matches.length;\n } else if (!isSelectedPage) {\n // Not highlighting all and this isn't the selected page, so do nothing.\n return;\n }\n\n for (let i = i0; i < i1; i++) {\n const match = matches[i];\n const begin = match.begin;\n const end = match.end;\n const isSelected = isSelectedPage && i === selectedMatchIdx;\n const highlightSuffix = isSelected ? \" selected\" : \"\";\n\n if (isSelected) {\n // Attempt to scroll the selected match into view.\n findController.scrollMatchIntoView({\n element: textDivs[begin.divIdx],\n pageIndex: pageIdx,\n matchIndex: selectedMatchIdx,\n });\n }\n\n // Match inside new div.\n if (!prevEnd || begin.divIdx !== prevEnd.divIdx) {\n // If there was a previous div, then add the text at the end.\n if (prevEnd !== null) {\n appendTextToDiv(prevEnd.divIdx, prevEnd.offset, infinity.offset);\n }\n // Clear the divs and set the content until the starting point.\n beginText(begin);\n } else {\n appendTextToDiv(prevEnd.divIdx, prevEnd.offset, begin.offset);\n }\n\n if (begin.divIdx === end.divIdx) {\n appendTextToDiv(\n begin.divIdx,\n begin.offset,\n end.offset,\n \"highlight\" + highlightSuffix\n );\n } else {\n appendTextToDiv(\n begin.divIdx,\n begin.offset,\n infinity.offset,\n \"highlight begin\" + highlightSuffix\n );\n for (let n0 = begin.divIdx + 1, n1 = end.divIdx; n0 < n1; n0++) {\n textDivs[n0].className = \"highlight middle\" + highlightSuffix;\n }\n beginText(end, \"highlight end\" + highlightSuffix);\n }\n prevEnd = end;\n }\n\n if (prevEnd) {\n appendTextToDiv(prevEnd.divIdx, prevEnd.offset, infinity.offset);\n }\n }\n\n _updateMatches() {\n // Only show matches when all rendering is done.\n if (!this.renderingDone) {\n return;\n }\n const {\n findController,\n matches,\n pageIdx,\n textContentItemsStr,\n textDivs,\n } = this;\n let clearedUntilDivIdx = -1;\n\n // Clear all current matches.\n for (let i = 0, ii = matches.length; i < ii; i++) {\n const match = matches[i];\n const begin = Math.max(clearedUntilDivIdx, match.begin.divIdx);\n for (let n = begin, end = match.end.divIdx; n <= end; n++) {\n const div = textDivs[n];\n div.textContent = textContentItemsStr[n];\n div.className = \"\";\n }\n clearedUntilDivIdx = match.end.divIdx + 1;\n }\n\n if (!findController || !findController.highlightMatches) {\n return;\n }\n // Convert the matches on the `findController` into the match format\n // used for the textLayer.\n const pageMatches = findController.pageMatches[pageIdx] || null;\n const pageMatchesLength = findController.pageMatchesLength[pageIdx] || null;\n\n this.matches = this._convertMatches(pageMatches, pageMatchesLength);\n this._renderMatches(this.matches);\n }\n\n /**\n * Improves text selection by adding an additional div where the mouse was\n * clicked. This reduces flickering of the content if the mouse is slowly\n * dragged up or down.\n *\n * @private\n */\n _bindMouse() {\n const div = this.textLayerDiv;\n let expandDivsTimer = null;\n\n div.addEventListener(\"mousedown\", evt => {\n if (this.enhanceTextSelection && this.textLayerRenderTask) {\n this.textLayerRenderTask.expandTextDivs(true);\n if (\n (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"MOZCENTRAL\")) &&\n expandDivsTimer\n ) {\n clearTimeout(expandDivsTimer);\n expandDivsTimer = null;\n }\n return;\n }\n\n const end = div.querySelector(\".endOfContent\");\n if (!end) {\n return;\n }\n if (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"MOZCENTRAL\")) {\n // On non-Firefox browsers, the selection will feel better if the height\n // of the `endOfContent` div is adjusted to start at mouse click\n // location. This avoids flickering when the selection moves up.\n // However it does not work when selection is started on empty space.\n let adjustTop = evt.target !== div;\n if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) {\n adjustTop =\n adjustTop &&\n window\n .getComputedStyle(end)\n .getPropertyValue(\"-moz-user-select\") !== \"none\";\n }\n if (adjustTop) {\n const divBounds = div.getBoundingClientRect();\n const r = Math.max(0, (evt.pageY - divBounds.top) / divBounds.height);\n end.style.top = (r * 100).toFixed(2) + \"%\";\n }\n }\n end.classList.add(\"active\");\n });\n\n div.addEventListener(\"mouseup\", () => {\n if (this.enhanceTextSelection && this.textLayerRenderTask) {\n if (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"MOZCENTRAL\")) {\n expandDivsTimer = setTimeout(() => {\n if (this.textLayerRenderTask) {\n this.textLayerRenderTask.expandTextDivs(false);\n }\n expandDivsTimer = null;\n }, EXPAND_DIVS_TIMEOUT);\n } else {\n this.textLayerRenderTask.expandTextDivs(false);\n }\n return;\n }\n\n const end = div.querySelector(\".endOfContent\");\n if (!end) {\n return;\n }\n if (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"MOZCENTRAL\")) {\n end.style.top = \"\";\n }\n end.classList.remove(\"active\");\n });\n }\n}\n\n/**\n * @implements IPDFTextLayerFactory\n */\nclass DefaultTextLayerFactory {\n /**\n * @param {HTMLDivElement} textLayerDiv\n * @param {number} pageIndex\n * @param {PageViewport} viewport\n * @param {boolean} enhanceTextSelection\n * @param {EventBus} eventBus\n * @returns {TextLayerBuilder}\n */\n createTextLayerBuilder(\n textLayerDiv,\n pageIndex,\n viewport,\n enhanceTextSelection = false,\n eventBus\n ) {\n return new TextLayerBuilder({\n textLayerDiv,\n pageIndex,\n viewport,\n enhanceTextSelection,\n eventBus,\n });\n }\n}\n\nexport { TextLayerBuilder, DefaultTextLayerFactory };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SCROLLBAR_PADDING, ScrollMode, SpreadMode } from \"./ui_utils.js\";\nimport { CursorTool } from \"./pdf_cursor_tools.js\";\nimport { PDFSinglePageViewer } from \"./pdf_single_page_viewer.js\";\n\n/**\n * @typedef {Object} SecondaryToolbarOptions\n * @property {HTMLDivElement} toolbar - Container for the secondary toolbar.\n * @property {HTMLButtonElement} toggleButton - Button to toggle the visibility\n * of the secondary toolbar.\n * @property {HTMLDivElement} toolbarButtonContainer - Container where all the\n * toolbar buttons are placed. The maximum height of the toolbar is controlled\n * dynamically by adjusting the 'max-height' CSS property of this DOM element.\n * @property {HTMLButtonElement} presentationModeButton - Button for entering\n * presentation mode.\n * @property {HTMLButtonElement} openFileButton - Button to open a file.\n * @property {HTMLButtonElement} printButton - Button to print the document.\n * @property {HTMLButtonElement} downloadButton - Button to download the\n * document.\n * @property {HTMLLinkElement} viewBookmarkButton - Button to obtain a bookmark\n * link to the current location in the document.\n * @property {HTMLButtonElement} firstPageButton - Button to go to the first\n * page in the document.\n * @property {HTMLButtonElement} lastPageButton - Button to go to the last page\n * in the document.\n * @property {HTMLButtonElement} pageRotateCwButton - Button to rotate the pages\n * clockwise.\n * @property {HTMLButtonElement} pageRotateCcwButton - Button to rotate the\n * pages counterclockwise.\n * @property {HTMLButtonElement} cursorSelectToolButton - Button to enable the\n * select tool.\n * @property {HTMLButtonElement} cursorHandToolButton - Button to enable the\n * hand tool.\n * @property {HTMLButtonElement} documentPropertiesButton - Button for opening\n * the document properties dialog.\n */\n\nclass SecondaryToolbar {\n /**\n * @param {SecondaryToolbarOptions} options\n * @param {HTMLDivElement} mainContainer\n * @param {EventBus} eventBus\n */\n constructor(options, mainContainer, eventBus) {\n this.toolbar = options.toolbar;\n this.toggleButton = options.toggleButton;\n this.toolbarButtonContainer = options.toolbarButtonContainer;\n this.buttons = [\n {\n element: options.presentationModeButton,\n eventName: \"presentationmode\",\n close: true,\n },\n { element: options.openFileButton, eventName: \"openfile\", close: true },\n { element: options.printButton, eventName: \"print\", close: true },\n { element: options.downloadButton, eventName: \"download\", close: true },\n { element: options.viewBookmarkButton, eventName: null, close: true },\n { element: options.firstPageButton, eventName: \"firstpage\", close: true },\n { element: options.lastPageButton, eventName: \"lastpage\", close: true },\n {\n element: options.pageRotateCwButton,\n eventName: \"rotatecw\",\n close: false,\n },\n {\n element: options.pageRotateCcwButton,\n eventName: \"rotateccw\",\n close: false,\n },\n {\n element: options.cursorSelectToolButton,\n eventName: \"switchcursortool\",\n eventDetails: { tool: CursorTool.SELECT },\n close: true,\n },\n {\n element: options.cursorHandToolButton,\n eventName: \"switchcursortool\",\n eventDetails: { tool: CursorTool.HAND },\n close: true,\n },\n {\n element: options.scrollVerticalButton,\n eventName: \"switchscrollmode\",\n eventDetails: { mode: ScrollMode.VERTICAL },\n close: true,\n },\n {\n element: options.scrollHorizontalButton,\n eventName: \"switchscrollmode\",\n eventDetails: { mode: ScrollMode.HORIZONTAL },\n close: true,\n },\n {\n element: options.scrollWrappedButton,\n eventName: \"switchscrollmode\",\n eventDetails: { mode: ScrollMode.WRAPPED },\n close: true,\n },\n {\n element: options.spreadNoneButton,\n eventName: \"switchspreadmode\",\n eventDetails: { mode: SpreadMode.NONE },\n close: true,\n },\n {\n element: options.spreadOddButton,\n eventName: \"switchspreadmode\",\n eventDetails: { mode: SpreadMode.ODD },\n close: true,\n },\n {\n element: options.spreadEvenButton,\n eventName: \"switchspreadmode\",\n eventDetails: { mode: SpreadMode.EVEN },\n close: true,\n },\n {\n element: options.documentPropertiesButton,\n eventName: \"documentproperties\",\n close: true,\n },\n ];\n this.items = {\n firstPage: options.firstPageButton,\n lastPage: options.lastPageButton,\n pageRotateCw: options.pageRotateCwButton,\n pageRotateCcw: options.pageRotateCcwButton,\n };\n\n this.mainContainer = mainContainer;\n this.eventBus = eventBus;\n\n this.opened = false;\n this.containerHeight = null;\n this.previousContainerHeight = null;\n\n this.reset();\n\n // Bind the event listeners for click, cursor tool, and scroll/spread mode\n // actions.\n this._bindClickListeners();\n this._bindCursorToolsListener(options);\n this._bindScrollModeListener(options);\n this._bindSpreadModeListener(options);\n\n // Bind the event listener for adjusting the 'max-height' of the toolbar.\n this.eventBus._on(\"resize\", this._setMaxHeight.bind(this));\n\n // Hide the Scroll/Spread mode buttons, when they're not applicable to the\n // current `BaseViewer` instance (in particular `PDFSinglePageViewer`).\n this.eventBus._on(\"baseviewerinit\", evt => {\n if (evt.source instanceof PDFSinglePageViewer) {\n this.toolbarButtonContainer.classList.add(\n \"hiddenScrollModeButtons\",\n \"hiddenSpreadModeButtons\"\n );\n } else {\n this.toolbarButtonContainer.classList.remove(\n \"hiddenScrollModeButtons\",\n \"hiddenSpreadModeButtons\"\n );\n }\n });\n }\n\n /**\n * @type {boolean}\n */\n get isOpen() {\n return this.opened;\n }\n\n setPageNumber(pageNumber) {\n this.pageNumber = pageNumber;\n this._updateUIState();\n }\n\n setPagesCount(pagesCount) {\n this.pagesCount = pagesCount;\n this._updateUIState();\n }\n\n reset() {\n this.pageNumber = 0;\n this.pagesCount = 0;\n this._updateUIState();\n\n // Reset the Scroll/Spread buttons too, since they're document specific.\n this.eventBus.dispatch(\"secondarytoolbarreset\", { source: this });\n }\n\n _updateUIState() {\n this.items.firstPage.disabled = this.pageNumber <= 1;\n this.items.lastPage.disabled = this.pageNumber >= this.pagesCount;\n this.items.pageRotateCw.disabled = this.pagesCount === 0;\n this.items.pageRotateCcw.disabled = this.pagesCount === 0;\n }\n\n _bindClickListeners() {\n // Button to toggle the visibility of the secondary toolbar.\n this.toggleButton.addEventListener(\"click\", this.toggle.bind(this));\n\n // All items within the secondary toolbar.\n for (const { element, eventName, close, eventDetails } of this.buttons) {\n element.addEventListener(\"click\", evt => {\n if (eventName !== null) {\n const details = { source: this };\n for (const property in eventDetails) {\n details[property] = eventDetails[property];\n }\n this.eventBus.dispatch(eventName, details);\n }\n if (close) {\n this.close();\n }\n });\n }\n }\n\n _bindCursorToolsListener(buttons) {\n this.eventBus._on(\"cursortoolchanged\", function({ tool }) {\n buttons.cursorSelectToolButton.classList.toggle(\n \"toggled\",\n tool === CursorTool.SELECT\n );\n buttons.cursorHandToolButton.classList.toggle(\n \"toggled\",\n tool === CursorTool.HAND\n );\n });\n }\n\n _bindScrollModeListener(buttons) {\n function scrollModeChanged({ mode }) {\n buttons.scrollVerticalButton.classList.toggle(\n \"toggled\",\n mode === ScrollMode.VERTICAL\n );\n buttons.scrollHorizontalButton.classList.toggle(\n \"toggled\",\n mode === ScrollMode.HORIZONTAL\n );\n buttons.scrollWrappedButton.classList.toggle(\n \"toggled\",\n mode === ScrollMode.WRAPPED\n );\n\n // Temporarily *disable* the Spread buttons when horizontal scrolling is\n // enabled, since the non-default Spread modes doesn't affect the layout.\n const isScrollModeHorizontal = mode === ScrollMode.HORIZONTAL;\n buttons.spreadNoneButton.disabled = isScrollModeHorizontal;\n buttons.spreadOddButton.disabled = isScrollModeHorizontal;\n buttons.spreadEvenButton.disabled = isScrollModeHorizontal;\n }\n this.eventBus._on(\"scrollmodechanged\", scrollModeChanged);\n\n this.eventBus._on(\"secondarytoolbarreset\", evt => {\n if (evt.source === this) {\n scrollModeChanged({ mode: ScrollMode.VERTICAL });\n }\n });\n }\n\n _bindSpreadModeListener(buttons) {\n function spreadModeChanged({ mode }) {\n buttons.spreadNoneButton.classList.toggle(\n \"toggled\",\n mode === SpreadMode.NONE\n );\n buttons.spreadOddButton.classList.toggle(\n \"toggled\",\n mode === SpreadMode.ODD\n );\n buttons.spreadEvenButton.classList.toggle(\n \"toggled\",\n mode === SpreadMode.EVEN\n );\n }\n this.eventBus._on(\"spreadmodechanged\", spreadModeChanged);\n\n this.eventBus._on(\"secondarytoolbarreset\", evt => {\n if (evt.source === this) {\n spreadModeChanged({ mode: SpreadMode.NONE });\n }\n });\n }\n\n open() {\n if (this.opened) {\n return;\n }\n this.opened = true;\n this._setMaxHeight();\n\n this.toggleButton.classList.add(\"toggled\");\n this.toolbar.classList.remove(\"hidden\");\n }\n\n close() {\n if (!this.opened) {\n return;\n }\n this.opened = false;\n this.toolbar.classList.add(\"hidden\");\n this.toggleButton.classList.remove(\"toggled\");\n }\n\n toggle() {\n if (this.opened) {\n this.close();\n } else {\n this.open();\n }\n }\n\n /**\n * @private\n */\n _setMaxHeight() {\n if (!this.opened) {\n return; // Only adjust the 'max-height' if the toolbar is visible.\n }\n this.containerHeight = this.mainContainer.clientHeight;\n\n if (this.containerHeight === this.previousContainerHeight) {\n return;\n }\n this.toolbarButtonContainer.style.maxHeight = `${this.containerHeight -\n SCROLLBAR_PADDING}px`;\n\n this.previousContainerHeight = this.containerHeight;\n }\n}\n\nexport { SecondaryToolbar };\n","/* Copyright 2017 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { BaseViewer } from \"./base_viewer.js\";\nimport { shadow } from \"pdfjs-lib\";\n\nclass PDFSinglePageViewer extends BaseViewer {\n constructor(options) {\n super(options);\n\n this.eventBus._on(\"pagesinit\", evt => {\n // Since the pages are placed in a `DocumentFragment`, make sure that\n // the current page becomes visible upon loading of the document.\n this._ensurePageViewVisible();\n });\n }\n\n get _setDocumentViewerElement() {\n // Since we only want to display *one* page at a time when using the\n // `PDFSinglePageViewer`, we cannot append them to the `viewer` DOM element.\n // Instead, they are placed in a `DocumentFragment`, and only the current\n // page is displayed in the viewer (refer to `this._ensurePageViewVisible`).\n return shadow(this, \"_setDocumentViewerElement\", this._shadowViewer);\n }\n\n _resetView() {\n super._resetView();\n this._previousPageNumber = 1;\n this._shadowViewer = document.createDocumentFragment();\n this._updateScrollDown = null;\n }\n\n _ensurePageViewVisible() {\n const pageView = this._pages[this._currentPageNumber - 1];\n const previousPageView = this._pages[this._previousPageNumber - 1];\n\n const viewerNodes = this.viewer.childNodes;\n switch (viewerNodes.length) {\n case 0: // Should *only* occur on initial loading.\n this.viewer.appendChild(pageView.div);\n break;\n case 1: // The normal page-switching case.\n if (viewerNodes[0] !== previousPageView.div) {\n throw new Error(\n \"_ensurePageViewVisible: Unexpected previously visible page.\"\n );\n }\n if (pageView === previousPageView) {\n break; // The correct page is already visible.\n }\n // Switch visible pages, and reset the viewerContainer scroll position.\n this._shadowViewer.appendChild(previousPageView.div);\n this.viewer.appendChild(pageView.div);\n\n this.container.scrollTop = 0;\n break;\n default:\n throw new Error(\n \"_ensurePageViewVisible: Only one page should be visible at a time.\"\n );\n }\n this._previousPageNumber = this._currentPageNumber;\n }\n\n _scrollUpdate() {\n if (this._updateScrollDown) {\n this._updateScrollDown();\n }\n super._scrollUpdate();\n }\n\n _scrollIntoView({ pageDiv, pageSpot = null, pageNumber = null }) {\n if (pageNumber) {\n // Ensure that `this._currentPageNumber` is correct.\n this._setCurrentPageNumber(pageNumber);\n }\n const scrolledDown = this._currentPageNumber >= this._previousPageNumber;\n\n this._ensurePageViewVisible();\n // Ensure that rendering always occurs, to avoid showing a blank page,\n // even if the current position doesn't change when the page is scrolled.\n this.update();\n\n super._scrollIntoView({ pageDiv, pageSpot, pageNumber });\n\n // Since scrolling is tracked using `requestAnimationFrame`, update the\n // scroll direction during the next `this._scrollUpdate` invocation.\n this._updateScrollDown = () => {\n this.scroll.down = scrolledDown;\n this._updateScrollDown = null;\n };\n }\n\n _getVisiblePages() {\n return this._getCurrentVisiblePage();\n }\n\n _updateHelper(visiblePages) {}\n\n get _isScrollModeHorizontal() {\n // The Scroll/Spread modes are never used in `PDFSinglePageViewer`.\n return shadow(this, \"_isScrollModeHorizontal\", false);\n }\n\n _updateScrollMode() {}\n\n _updateSpreadMode() {}\n}\n\nexport { PDFSinglePageViewer };\n","/* Copyright 2016 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n animationStarted,\n DEFAULT_SCALE,\n DEFAULT_SCALE_VALUE,\n MAX_SCALE,\n MIN_SCALE,\n noContextMenuHandler,\n NullL10n,\n} from \"./ui_utils.js\";\n\nconst PAGE_NUMBER_LOADING_INDICATOR = \"visiblePageIsLoading\";\n// Keep the two values below up-to-date with the values in `web/viewer.css`:\nconst SCALE_SELECT_CONTAINER_WIDTH = 140; // px\nconst SCALE_SELECT_WIDTH = 162; // px\n\n/**\n * @typedef {Object} ToolbarOptions\n * @property {HTMLDivElement} container - Container for the secondary toolbar.\n * @property {HTMLSpanElement} numPages - Label that contains number of pages.\n * @property {HTMLInputElement} pageNumber - Control for display and user input\n * of the current page number.\n * @property {HTMLSpanElement} scaleSelectContainer - Container where scale\n * controls are placed. The width is adjusted on UI initialization.\n * @property {HTMLSelectElement} scaleSelect - Scale selection control.\n * @property {HTMLOptionElement} customScaleOption - The item used to display\n * a non-predefined scale.\n * @property {HTMLButtonElement} previous - Button to go to the previous page.\n * @property {HTMLButtonElement} next - Button to go to the next page.\n * @property {HTMLButtonElement} zoomIn - Button to zoom in the pages.\n * @property {HTMLButtonElement} zoomOut - Button to zoom out the pages.\n * @property {HTMLButtonElement} viewFind - Button to open find bar.\n * @property {HTMLButtonElement} openFile - Button to open a new document.\n * @property {HTMLButtonElement} presentationModeButton - Button to switch to\n * presentation mode.\n * @property {HTMLButtonElement} download - Button to download the document.\n * @property {HTMLAElement} viewBookmark - Element to link current url of\n * the page view.\n */\n\nclass Toolbar {\n /**\n * @param {ToolbarOptions} options\n * @param {EventBus} eventBus\n * @param {IL10n} l10n - Localization service.\n */\n constructor(options, eventBus, l10n = NullL10n) {\n this.toolbar = options.container;\n this.eventBus = eventBus;\n this.l10n = l10n;\n this.buttons = [\n { element: options.previous, eventName: \"previouspage\" },\n { element: options.next, eventName: \"nextpage\" },\n { element: options.zoomIn, eventName: \"zoomin\" },\n { element: options.zoomOut, eventName: \"zoomout\" },\n { element: options.openFile, eventName: \"openfile\" },\n { element: options.print, eventName: \"print\" },\n {\n element: options.presentationModeButton,\n eventName: \"presentationmode\",\n },\n { element: options.download, eventName: \"download\" },\n { element: options.viewBookmark, eventName: null },\n ];\n this.items = {\n numPages: options.numPages,\n pageNumber: options.pageNumber,\n scaleSelectContainer: options.scaleSelectContainer,\n scaleSelect: options.scaleSelect,\n customScaleOption: options.customScaleOption,\n previous: options.previous,\n next: options.next,\n zoomIn: options.zoomIn,\n zoomOut: options.zoomOut,\n };\n\n this._wasLocalized = false;\n this.reset();\n\n // Bind the event listeners for click and various other actions.\n this._bindListeners();\n }\n\n setPageNumber(pageNumber, pageLabel) {\n this.pageNumber = pageNumber;\n this.pageLabel = pageLabel;\n this._updateUIState(false);\n }\n\n setPagesCount(pagesCount, hasPageLabels) {\n this.pagesCount = pagesCount;\n this.hasPageLabels = hasPageLabels;\n this._updateUIState(true);\n }\n\n setPageScale(pageScaleValue, pageScale) {\n this.pageScaleValue = (pageScaleValue || pageScale).toString();\n this.pageScale = pageScale;\n this._updateUIState(false);\n }\n\n reset() {\n this.pageNumber = 0;\n this.pageLabel = null;\n this.hasPageLabels = false;\n this.pagesCount = 0;\n this.pageScaleValue = DEFAULT_SCALE_VALUE;\n this.pageScale = DEFAULT_SCALE;\n this._updateUIState(true);\n this.updateLoadingIndicatorState();\n }\n\n _bindListeners() {\n const { pageNumber, scaleSelect } = this.items;\n const self = this;\n\n // The buttons within the toolbar.\n for (const { element, eventName } of this.buttons) {\n element.addEventListener(\"click\", evt => {\n if (eventName !== null) {\n this.eventBus.dispatch(eventName, { source: this });\n }\n });\n }\n // The non-button elements within the toolbar.\n pageNumber.addEventListener(\"click\", function() {\n this.select();\n });\n pageNumber.addEventListener(\"change\", function() {\n self.eventBus.dispatch(\"pagenumberchanged\", {\n source: self,\n value: this.value,\n });\n });\n\n scaleSelect.addEventListener(\"change\", function() {\n if (this.value === \"custom\") {\n return;\n }\n self.eventBus.dispatch(\"scalechanged\", {\n source: self,\n value: this.value,\n });\n });\n // Suppress context menus for some controls.\n scaleSelect.oncontextmenu = noContextMenuHandler;\n\n this.eventBus._on(\"localized\", () => {\n this._wasLocalized = true;\n this._adjustScaleWidth();\n this._updateUIState(true);\n });\n }\n\n _updateUIState(resetNumPages = false) {\n if (!this._wasLocalized) {\n // Don't update the UI state until we localize the toolbar.\n return;\n }\n const { pageNumber, pagesCount, pageScaleValue, pageScale, items } = this;\n\n if (resetNumPages) {\n if (this.hasPageLabels) {\n items.pageNumber.type = \"text\";\n } else {\n items.pageNumber.type = \"number\";\n this.l10n\n .get(\"of_pages\", { pagesCount }, \"of {{pagesCount}}\")\n .then(msg => {\n items.numPages.textContent = msg;\n });\n }\n items.pageNumber.max = pagesCount;\n }\n\n if (this.hasPageLabels) {\n items.pageNumber.value = this.pageLabel;\n this.l10n\n .get(\n \"page_of_pages\",\n { pageNumber, pagesCount },\n \"({{pageNumber}} of {{pagesCount}})\"\n )\n .then(msg => {\n items.numPages.textContent = msg;\n });\n } else {\n items.pageNumber.value = pageNumber;\n }\n\n items.previous.disabled = pageNumber <= 1;\n items.next.disabled = pageNumber >= pagesCount;\n\n items.zoomOut.disabled = pageScale <= MIN_SCALE;\n items.zoomIn.disabled = pageScale >= MAX_SCALE;\n\n const customScale = Math.round(pageScale * 10000) / 100;\n this.l10n\n .get(\"page_scale_percent\", { scale: customScale }, \"{{scale}}%\")\n .then(msg => {\n let predefinedValueFound = false;\n for (const option of items.scaleSelect.options) {\n if (option.value !== pageScaleValue) {\n option.selected = false;\n continue;\n }\n option.selected = true;\n predefinedValueFound = true;\n }\n if (!predefinedValueFound) {\n items.customScaleOption.textContent = msg;\n items.customScaleOption.selected = true;\n }\n });\n }\n\n updateLoadingIndicatorState(loading = false) {\n const pageNumberInput = this.items.pageNumber;\n\n pageNumberInput.classList.toggle(PAGE_NUMBER_LOADING_INDICATOR, loading);\n }\n\n /**\n * Increase the width of the zoom dropdown DOM element if, and only if, it's\n * too narrow to fit the *longest* of the localized strings.\n * @private\n */\n async _adjustScaleWidth() {\n const { items, l10n } = this;\n\n const predefinedValuesPromise = Promise.all([\n l10n.get(\"page_scale_auto\", null, \"Automatic Zoom\"),\n l10n.get(\"page_scale_actual\", null, \"Actual Size\"),\n l10n.get(\"page_scale_fit\", null, \"Page Fit\"),\n l10n.get(\"page_scale_width\", null, \"Page Width\"),\n ]);\n\n // The temporary canvas is used to measure text length in the DOM.\n let canvas = document.createElement(\"canvas\");\n if (\n typeof PDFJSDev === \"undefined\" ||\n PDFJSDev.test(\"MOZCENTRAL || GENERIC\")\n ) {\n canvas.mozOpaque = true;\n }\n let ctx = canvas.getContext(\"2d\", { alpha: false });\n\n await animationStarted;\n const { fontSize, fontFamily } = getComputedStyle(items.scaleSelect);\n ctx.font = `${fontSize} ${fontFamily}`;\n\n let maxWidth = 0;\n for (const predefinedValue of await predefinedValuesPromise) {\n const { width } = ctx.measureText(predefinedValue);\n if (width > maxWidth) {\n maxWidth = width;\n }\n }\n const overflow = SCALE_SELECT_WIDTH - SCALE_SELECT_CONTAINER_WIDTH;\n maxWidth += 1.5 * overflow;\n\n if (maxWidth > SCALE_SELECT_CONTAINER_WIDTH) {\n items.scaleSelect.style.width = `${maxWidth + overflow}px`;\n items.scaleSelectContainer.style.width = `${maxWidth}px`;\n }\n // Zeroing the width and height cause Firefox to release graphics resources\n // immediately, which can greatly reduce memory consumption.\n canvas.width = 0;\n canvas.height = 0;\n canvas = ctx = null;\n }\n}\n\nexport { Toolbar };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst DEFAULT_VIEW_HISTORY_CACHE_SIZE = 20;\n\n/**\n * View History - This is a utility for saving various view parameters for\n * recently opened files.\n *\n * The way that the view parameters are stored depends on how PDF.js is built,\n * for 'gulp <flag>' the following cases exist:\n * - MOZCENTRAL - uses sessionStorage.\n * - GENERIC or CHROME - uses localStorage, if it is available.\n */\nclass ViewHistory {\n constructor(fingerprint, cacheSize = DEFAULT_VIEW_HISTORY_CACHE_SIZE) {\n this.fingerprint = fingerprint;\n this.cacheSize = cacheSize;\n\n this._initializedPromise = this._readFromStorage().then(databaseStr => {\n const database = JSON.parse(databaseStr || \"{}\");\n if (!(\"files\" in database)) {\n database.files = [];\n } else {\n while (database.files.length >= this.cacheSize) {\n database.files.shift();\n }\n }\n let index = -1;\n for (let i = 0, length = database.files.length; i < length; i++) {\n const branch = database.files[i];\n if (branch.fingerprint === this.fingerprint) {\n index = i;\n break;\n }\n }\n if (index === -1) {\n index = database.files.push({ fingerprint: this.fingerprint }) - 1;\n }\n this.file = database.files[index];\n this.database = database;\n });\n }\n\n async _writeToStorage() {\n const databaseStr = JSON.stringify(this.database);\n\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n sessionStorage.setItem(\"pdfjs.history\", databaseStr);\n return;\n }\n localStorage.setItem(\"pdfjs.history\", databaseStr);\n }\n\n async _readFromStorage() {\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n return sessionStorage.getItem(\"pdfjs.history\");\n }\n return localStorage.getItem(\"pdfjs.history\");\n }\n\n async set(name, val) {\n await this._initializedPromise;\n this.file[name] = val;\n return this._writeToStorage();\n }\n\n async setMultiple(properties) {\n await this._initializedPromise;\n for (const name in properties) {\n this.file[name] = properties[name];\n }\n return this._writeToStorage();\n }\n\n async get(name, defaultValue) {\n await this._initializedPromise;\n const val = this.file[name];\n return val !== undefined ? val : defaultValue;\n }\n\n async getMultiple(properties) {\n await this._initializedPromise;\n const values = Object.create(null);\n\n for (const name in properties) {\n const val = this.file[name];\n values[name] = val !== undefined ? val : properties[name];\n }\n return values;\n }\n}\n\nexport { ViewHistory };\n","/* Copyright 2017 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DefaultExternalServices, PDFViewerApplication } from \"./app.js\";\nimport { BasePreferences } from \"./preferences.js\";\nimport { DownloadManager } from \"./download_manager.js\";\nimport { GenericL10n } from \"./genericl10n.js\";\n\nif (typeof PDFJSDev !== \"undefined\" && !PDFJSDev.test(\"GENERIC\")) {\n throw new Error(\n 'Module \"pdfjs-web/genericcom\" shall not be used outside ' +\n \"GENERIC build.\"\n );\n}\n\nconst GenericCom = {};\n\nclass GenericPreferences extends BasePreferences {\n async _writeToStorage(prefObj) {\n localStorage.setItem(\"pdfjs.preferences\", JSON.stringify(prefObj));\n }\n\n async _readFromStorage(prefObj) {\n return JSON.parse(localStorage.getItem(\"pdfjs.preferences\"));\n }\n}\n\nclass GenericExternalServices extends DefaultExternalServices {\n static createDownloadManager(options) {\n return new DownloadManager(options);\n }\n\n static createPreferences() {\n return new GenericPreferences();\n }\n\n static createL10n({ locale = \"en-US\" }) {\n return new GenericL10n(locale);\n }\n}\nPDFViewerApplication.externalServices = GenericExternalServices;\n\nexport { GenericCom };\n","/* Copyright 2013 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet defaultPreferences = null;\nfunction getDefaultPreferences() {\n if (!defaultPreferences) {\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"PRODUCTION\")) {\n defaultPreferences = Promise.resolve(\n PDFJSDev.json(\"$ROOT/build/default_preferences.json\")\n );\n } else {\n defaultPreferences = new Promise(function(resolve, reject) {\n if (typeof SystemJS === \"object\") {\n SystemJS.import(\"./app_options.js\").then(resolve, reject);\n } else {\n reject(new Error(\"SystemJS must be used to load AppOptions.\"));\n }\n }).then(function({ AppOptions, OptionKind }) {\n return AppOptions.getAll(OptionKind.PREFERENCE);\n });\n }\n }\n return defaultPreferences;\n}\n\n/**\n * BasePreferences - Abstract base class for storing persistent settings.\n * Used for settings that should be applied to all opened documents,\n * or every time the viewer is loaded.\n */\nclass BasePreferences {\n constructor() {\n if (this.constructor === BasePreferences) {\n throw new Error(\"Cannot initialize BasePreferences.\");\n }\n this.prefs = null;\n\n this._initializedPromise = getDefaultPreferences()\n .then(defaults => {\n Object.defineProperty(this, \"defaults\", {\n value: Object.freeze(defaults),\n writable: false,\n enumerable: true,\n configurable: false,\n });\n\n this.prefs = Object.assign(Object.create(null), defaults);\n return this._readFromStorage(defaults);\n })\n .then(prefs => {\n if (!prefs) {\n return;\n }\n for (const name in prefs) {\n const defaultValue = this.defaults[name],\n prefValue = prefs[name];\n // Ignore preferences not present in, or whose types don't match,\n // the default values.\n if (\n defaultValue === undefined ||\n typeof prefValue !== typeof defaultValue\n ) {\n continue;\n }\n this.prefs[name] = prefValue;\n }\n });\n }\n\n /**\n * Stub function for writing preferences to storage.\n * @param {Object} prefObj The preferences that should be written to storage.\n * @returns {Promise} A promise that is resolved when the preference values\n * have been written.\n */\n async _writeToStorage(prefObj) {\n throw new Error(\"Not implemented: _writeToStorage\");\n }\n\n /**\n * Stub function for reading preferences from storage.\n * @param {Object} prefObj The preferences that should be read from storage.\n * @returns {Promise} A promise that is resolved with an {Object} containing\n * the preferences that have been read.\n */\n async _readFromStorage(prefObj) {\n throw new Error(\"Not implemented: _readFromStorage\");\n }\n\n /**\n * Reset the preferences to their default values and update storage.\n * @returns {Promise} A promise that is resolved when the preference values\n * have been reset.\n */\n async reset() {\n await this._initializedPromise;\n this.prefs = Object.assign(Object.create(null), this.defaults);\n return this._writeToStorage(this.defaults);\n }\n\n /**\n * Set the value of a preference.\n * @param {string} name The name of the preference that should be changed.\n * @param {boolean|number|string} value The new value of the preference.\n * @returns {Promise} A promise that is resolved when the value has been set,\n * provided that the preference exists and the types match.\n */\n async set(name, value) {\n await this._initializedPromise;\n const defaultValue = this.defaults[name];\n\n if (defaultValue === undefined) {\n throw new Error(`Set preference: \"${name}\" is undefined.`);\n } else if (value === undefined) {\n throw new Error(\"Set preference: no value is specified.\");\n }\n const valueType = typeof value;\n const defaultType = typeof defaultValue;\n\n if (valueType !== defaultType) {\n if (valueType === \"number\" && defaultType === \"string\") {\n value = value.toString();\n } else {\n throw new Error(\n `Set preference: \"${value}\" is a ${valueType}, ` +\n `expected a ${defaultType}.`\n );\n }\n } else {\n if (valueType === \"number\" && !Number.isInteger(value)) {\n throw new Error(`Set preference: \"${value}\" must be an integer.`);\n }\n }\n this.prefs[name] = value;\n return this._writeToStorage(this.prefs);\n }\n\n /**\n * Get the value of a preference.\n * @param {string} name The name of the preference whose value is requested.\n * @returns {Promise} A promise resolved with a {boolean|number|string}\n * containing the value of the preference.\n */\n async get(name) {\n await this._initializedPromise;\n const defaultValue = this.defaults[name];\n\n if (defaultValue === undefined) {\n throw new Error(`Get preference: \"${name}\" is undefined.`);\n } else {\n const prefValue = this.prefs[name];\n\n if (prefValue !== undefined) {\n return prefValue;\n }\n }\n return defaultValue;\n }\n\n /**\n * Get the values of all preferences.\n * @returns {Promise} A promise that is resolved with an {Object} containing\n * the values of all preferences.\n */\n async getAll() {\n await this._initializedPromise;\n return Object.assign(Object.create(null), this.defaults, this.prefs);\n }\n}\n\nexport { BasePreferences };\n","/* Copyright 2013 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n apiCompatibilityParams,\n createObjectURL,\n createValidAbsoluteUrl,\n} from \"pdfjs-lib\";\n\nif (typeof PDFJSDev !== \"undefined\" && !PDFJSDev.test(\"CHROME || GENERIC\")) {\n throw new Error(\n 'Module \"pdfjs-web/download_manager\" shall not be used ' +\n \"outside CHROME and GENERIC builds.\"\n );\n}\n\nconst DISABLE_CREATE_OBJECT_URL =\n apiCompatibilityParams.disableCreateObjectURL || false;\n\nfunction download(blobUrl, filename) {\n const a = document.createElement(\"a\");\n if (!a.click) {\n throw new Error('DownloadManager: \"a.click()\" is not supported.');\n }\n a.href = blobUrl;\n a.target = \"_parent\";\n // Use a.download if available. This increases the likelihood that\n // the file is downloaded instead of opened by another PDF plugin.\n if (\"download\" in a) {\n a.download = filename;\n }\n // <a> must be in the document for IE and recent Firefox versions,\n // otherwise .click() is ignored.\n (document.body || document.documentElement).appendChild(a);\n a.click();\n a.remove();\n}\n\nclass DownloadManager {\n constructor({ disableCreateObjectURL = DISABLE_CREATE_OBJECT_URL }) {\n this.disableCreateObjectURL = disableCreateObjectURL;\n }\n\n downloadUrl(url, filename) {\n if (!createValidAbsoluteUrl(url, \"http://example.com\")) {\n return; // restricted/invalid URL\n }\n download(url + \"#pdfjs.action=download\", filename);\n }\n\n downloadData(data, filename, contentType) {\n if (navigator.msSaveBlob) {\n // IE10 and above\n navigator.msSaveBlob(new Blob([data], { type: contentType }), filename);\n return;\n }\n const blobUrl = createObjectURL(\n data,\n contentType,\n this.disableCreateObjectURL\n );\n download(blobUrl, filename);\n }\n\n download(blob, url, filename) {\n if (navigator.msSaveBlob) {\n // IE10 / IE11\n if (!navigator.msSaveBlob(blob, filename)) {\n this.downloadUrl(url, filename);\n }\n return;\n }\n\n if (this.disableCreateObjectURL) {\n // URL.createObjectURL is not supported\n this.downloadUrl(url, filename);\n return;\n }\n\n const blobUrl = URL.createObjectURL(blob);\n download(blobUrl, filename);\n }\n}\n\nexport { DownloadManager };\n","/* Copyright 2017 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport \"../external/webL10n/l10n.js\";\n\nconst webL10n = document.webL10n;\n\nclass GenericL10n {\n constructor(lang) {\n this._lang = lang;\n this._ready = new Promise((resolve, reject) => {\n webL10n.setLanguage(lang, () => {\n resolve(webL10n);\n });\n });\n }\n\n async getLanguage() {\n const l10n = await this._ready;\n return l10n.getLanguage();\n }\n\n async getDirection() {\n const l10n = await this._ready;\n return l10n.getDirection();\n }\n\n async get(property, args, fallback) {\n const l10n = await this._ready;\n return l10n.get(property, args, fallback);\n }\n\n async translate(element) {\n const l10n = await this._ready;\n return l10n.translate(element);\n }\n}\n\nexport { GenericL10n };\n","/**\n * Copyright (c) 2011-2013 Fabien Cazenave, Mozilla.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n/*\n Additional modifications for PDF.js project:\n - Disables language initialization on page loading.\n - Disables document translation on page loading.\n - Removes consoleWarn and consoleLog and use console.log/warn directly.\n - Removes window._ assignment.\n - Remove compatibility code for OldIE.\n - Replaces `String.prototype.substr()` with `String.prototype.substring()`.\n - Removes `fireL10nReadyEvent` since the \"localized\" event it dispatches\n is unused and may clash with an identically named event in the viewer.\n*/\n\n/*jshint browser: true, devel: true, es5: true, globalstrict: true */\n'use strict';\n\ndocument.webL10n = (function(window, document, undefined) {\n var gL10nData = {};\n var gTextData = '';\n var gTextProp = 'textContent';\n var gLanguage = '';\n var gMacros = {};\n var gReadyState = 'loading';\n\n\n /**\n * Synchronously loading l10n resources significantly minimizes flickering\n * from displaying the app with non-localized strings and then updating the\n * strings. Although this will block all script execution on this page, we\n * expect that the l10n resources are available locally on flash-storage.\n *\n * As synchronous XHR is generally considered as a bad idea, we're still\n * loading l10n resources asynchronously -- but we keep this in a setting,\n * just in case... and applications using this library should hide their\n * content until the `localized' event happens.\n */\n\n var gAsyncResourceLoading = true; // read-only\n\n\n /**\n * DOM helpers for the so-called \"HTML API\".\n *\n * These functions are written for modern browsers. For old versions of IE,\n * they're overridden in the 'startup' section at the end of this file.\n */\n\n function getL10nResourceLinks() {\n return document.querySelectorAll('link[type=\"application/l10n\"]');\n }\n\n function getL10nDictionary() {\n var script = document.querySelector('script[type=\"application/l10n\"]');\n // TODO: support multiple and external JSON dictionaries\n return script ? JSON.parse(script.innerHTML) : null;\n }\n\n function getTranslatableChildren(element) {\n return element ? element.querySelectorAll('*[data-l10n-id]') : [];\n }\n\n function getL10nAttributes(element) {\n if (!element)\n return {};\n\n var l10nId = element.getAttribute('data-l10n-id');\n var l10nArgs = element.getAttribute('data-l10n-args');\n var args = {};\n if (l10nArgs) {\n try {\n args = JSON.parse(l10nArgs);\n } catch (e) {\n console.warn('could not parse arguments for #' + l10nId);\n }\n }\n return { id: l10nId, args: args };\n }\n\n function xhrLoadText(url, onSuccess, onFailure) {\n onSuccess = onSuccess || function _onSuccess(data) {};\n onFailure = onFailure || function _onFailure() {};\n\n var xhr = new XMLHttpRequest();\n xhr.open('GET', url, gAsyncResourceLoading);\n if (xhr.overrideMimeType) {\n xhr.overrideMimeType('text/plain; charset=utf-8');\n }\n xhr.onreadystatechange = function() {\n if (xhr.readyState == 4) {\n if (xhr.status == 200 || xhr.status === 0) {\n onSuccess(xhr.responseText);\n } else {\n onFailure();\n }\n }\n };\n xhr.onerror = onFailure;\n xhr.ontimeout = onFailure;\n\n // in Firefox OS with the app:// protocol, trying to XHR a non-existing\n // URL will raise an exception here -- hence this ugly try...catch.\n try {\n xhr.send(null);\n } catch (e) {\n onFailure();\n }\n }\n\n\n /**\n * l10n resource parser:\n * - reads (async XHR) the l10n resource matching `lang';\n * - imports linked resources (synchronously) when specified;\n * - parses the text data (fills `gL10nData' and `gTextData');\n * - triggers success/failure callbacks when done.\n *\n * @param {string} href\n * URL of the l10n resource to parse.\n *\n * @param {string} lang\n * locale (language) to parse. Must be a lowercase string.\n *\n * @param {Function} successCallback\n * triggered when the l10n resource has been successfully parsed.\n *\n * @param {Function} failureCallback\n * triggered when the an error has occurred.\n *\n * @return {void}\n * uses the following global variables: gL10nData, gTextData, gTextProp.\n */\n\n function parseResource(href, lang, successCallback, failureCallback) {\n var baseURL = href.replace(/[^\\/]*$/, '') || './';\n\n // handle escaped characters (backslashes) in a string\n function evalString(text) {\n if (text.lastIndexOf('\\\\') < 0)\n return text;\n return text.replace(/\\\\\\\\/g, '\\\\')\n .replace(/\\\\n/g, '\\n')\n .replace(/\\\\r/g, '\\r')\n .replace(/\\\\t/g, '\\t')\n .replace(/\\\\b/g, '\\b')\n .replace(/\\\\f/g, '\\f')\n .replace(/\\\\{/g, '{')\n .replace(/\\\\}/g, '}')\n .replace(/\\\\\"/g, '\"')\n .replace(/\\\\'/g, \"'\");\n }\n\n // parse *.properties text data into an l10n dictionary\n // If gAsyncResourceLoading is false, then the callback will be called\n // synchronously. Otherwise it is called asynchronously.\n function parseProperties(text, parsedPropertiesCallback) {\n var dictionary = {};\n\n // token expressions\n var reBlank = /^\\s*|\\s*$/;\n var reComment = /^\\s*#|^\\s*$/;\n var reSection = /^\\s*\\[(.*)\\]\\s*$/;\n var reImport = /^\\s*@import\\s+url\\((.*)\\)\\s*$/i;\n var reSplit = /^([^=\\s]*)\\s*=\\s*(.+)$/; // TODO: escape EOLs with '\\'\n\n // parse the *.properties file into an associative array\n function parseRawLines(rawText, extendedSyntax, parsedRawLinesCallback) {\n var entries = rawText.replace(reBlank, '').split(/[\\r\\n]+/);\n var currentLang = '*';\n var genericLang = lang.split('-', 1)[0];\n var skipLang = false;\n var match = '';\n\n function nextEntry() {\n // Use infinite loop instead of recursion to avoid reaching the\n // maximum recursion limit for content with many lines.\n while (true) {\n if (!entries.length) {\n parsedRawLinesCallback();\n return;\n }\n var line = entries.shift();\n\n // comment or blank line?\n if (reComment.test(line))\n continue;\n\n // the extended syntax supports [lang] sections and @import rules\n if (extendedSyntax) {\n match = reSection.exec(line);\n if (match) { // section start?\n // RFC 4646, section 4.4, \"All comparisons MUST be performed\n // in a case-insensitive manner.\"\n\n currentLang = match[1].toLowerCase();\n skipLang = (currentLang !== '*') &&\n (currentLang !== lang) && (currentLang !== genericLang);\n continue;\n } else if (skipLang) {\n continue;\n }\n match = reImport.exec(line);\n if (match) { // @import rule?\n loadImport(baseURL + match[1], nextEntry);\n return;\n }\n }\n\n // key-value pair\n var tmp = line.match(reSplit);\n if (tmp && tmp.length == 3) {\n dictionary[tmp[1]] = evalString(tmp[2]);\n }\n }\n }\n nextEntry();\n }\n\n // import another *.properties file\n function loadImport(url, callback) {\n xhrLoadText(url, function(content) {\n parseRawLines(content, false, callback); // don't allow recursive imports\n }, function () {\n console.warn(url + ' not found.');\n callback();\n });\n }\n\n // fill the dictionary\n parseRawLines(text, true, function() {\n parsedPropertiesCallback(dictionary);\n });\n }\n\n // load and parse l10n data (warning: global variables are used here)\n xhrLoadText(href, function(response) {\n gTextData += response; // mostly for debug\n\n // parse *.properties text data into an l10n dictionary\n parseProperties(response, function(data) {\n\n // find attribute descriptions, if any\n for (var key in data) {\n var id, prop, index = key.lastIndexOf('.');\n if (index > 0) { // an attribute has been specified\n id = key.substring(0, index);\n prop = key.substring(index + 1);\n } else { // no attribute: assuming text content by default\n id = key;\n prop = gTextProp;\n }\n if (!gL10nData[id]) {\n gL10nData[id] = {};\n }\n gL10nData[id][prop] = data[key];\n }\n\n // trigger callback\n if (successCallback) {\n successCallback();\n }\n });\n }, failureCallback);\n }\n\n // load and parse all resources for the specified locale\n function loadLocale(lang, callback) {\n // RFC 4646, section 2.1 states that language tags have to be treated as\n // case-insensitive. Convert to lowercase for case-insensitive comparisons.\n if (lang) {\n lang = lang.toLowerCase();\n }\n\n callback = callback || function _callback() {};\n\n clear();\n gLanguage = lang;\n\n // check all <link type=\"application/l10n\" href=\"...\" /> nodes\n // and load the resource files\n var langLinks = getL10nResourceLinks();\n var langCount = langLinks.length;\n if (langCount === 0) {\n // we might have a pre-compiled dictionary instead\n var dict = getL10nDictionary();\n if (dict && dict.locales && dict.default_locale) {\n console.log('using the embedded JSON directory, early way out');\n gL10nData = dict.locales[lang];\n if (!gL10nData) {\n var defaultLocale = dict.default_locale.toLowerCase();\n for (var anyCaseLang in dict.locales) {\n anyCaseLang = anyCaseLang.toLowerCase();\n if (anyCaseLang === lang) {\n gL10nData = dict.locales[lang];\n break;\n } else if (anyCaseLang === defaultLocale) {\n gL10nData = dict.locales[defaultLocale];\n }\n }\n }\n callback();\n } else {\n console.log('no resource to load, early way out');\n }\n // early way out\n gReadyState = 'complete';\n return;\n }\n\n // start the callback when all resources are loaded\n var onResourceLoaded = null;\n var gResourceCount = 0;\n onResourceLoaded = function() {\n gResourceCount++;\n if (gResourceCount >= langCount) {\n callback();\n gReadyState = 'complete';\n }\n };\n\n // load all resource files\n function L10nResourceLink(link) {\n var href = link.href;\n // Note: If |gAsyncResourceLoading| is false, then the following callbacks\n // are synchronously called.\n this.load = function(lang, callback) {\n parseResource(href, lang, callback, function() {\n console.warn(href + ' not found.');\n // lang not found, used default resource instead\n console.warn('\"' + lang + '\" resource not found');\n gLanguage = '';\n // Resource not loaded, but we still need to call the callback.\n callback();\n });\n };\n }\n\n for (var i = 0; i < langCount; i++) {\n var resource = new L10nResourceLink(langLinks[i]);\n resource.load(lang, onResourceLoaded);\n }\n }\n\n // clear all l10n data\n function clear() {\n gL10nData = {};\n gTextData = '';\n gLanguage = '';\n // TODO: clear all non predefined macros.\n // There's no such macro /yet/ but we're planning to have some...\n }\n\n\n /**\n * Get rules for plural forms (shared with JetPack), see:\n * http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html\n * https://github.com/mozilla/addon-sdk/blob/master/python-lib/plural-rules-generator.p\n *\n * @param {string} lang\n * locale (language) used.\n *\n * @return {Function}\n * returns a function that gives the plural form name for a given integer:\n * var fun = getPluralRules('en');\n * fun(1) -> 'one'\n * fun(0) -> 'other'\n * fun(1000) -> 'other'.\n */\n\n function getPluralRules(lang) {\n var locales2rules = {\n 'af': 3,\n 'ak': 4,\n 'am': 4,\n 'ar': 1,\n 'asa': 3,\n 'az': 0,\n 'be': 11,\n 'bem': 3,\n 'bez': 3,\n 'bg': 3,\n 'bh': 4,\n 'bm': 0,\n 'bn': 3,\n 'bo': 0,\n 'br': 20,\n 'brx': 3,\n 'bs': 11,\n 'ca': 3,\n 'cgg': 3,\n 'chr': 3,\n 'cs': 12,\n 'cy': 17,\n 'da': 3,\n 'de': 3,\n 'dv': 3,\n 'dz': 0,\n 'ee': 3,\n 'el': 3,\n 'en': 3,\n 'eo': 3,\n 'es': 3,\n 'et': 3,\n 'eu': 3,\n 'fa': 0,\n 'ff': 5,\n 'fi': 3,\n 'fil': 4,\n 'fo': 3,\n 'fr': 5,\n 'fur': 3,\n 'fy': 3,\n 'ga': 8,\n 'gd': 24,\n 'gl': 3,\n 'gsw': 3,\n 'gu': 3,\n 'guw': 4,\n 'gv': 23,\n 'ha': 3,\n 'haw': 3,\n 'he': 2,\n 'hi': 4,\n 'hr': 11,\n 'hu': 0,\n 'id': 0,\n 'ig': 0,\n 'ii': 0,\n 'is': 3,\n 'it': 3,\n 'iu': 7,\n 'ja': 0,\n 'jmc': 3,\n 'jv': 0,\n 'ka': 0,\n 'kab': 5,\n 'kaj': 3,\n 'kcg': 3,\n 'kde': 0,\n 'kea': 0,\n 'kk': 3,\n 'kl': 3,\n 'km': 0,\n 'kn': 0,\n 'ko': 0,\n 'ksb': 3,\n 'ksh': 21,\n 'ku': 3,\n 'kw': 7,\n 'lag': 18,\n 'lb': 3,\n 'lg': 3,\n 'ln': 4,\n 'lo': 0,\n 'lt': 10,\n 'lv': 6,\n 'mas': 3,\n 'mg': 4,\n 'mk': 16,\n 'ml': 3,\n 'mn': 3,\n 'mo': 9,\n 'mr': 3,\n 'ms': 0,\n 'mt': 15,\n 'my': 0,\n 'nah': 3,\n 'naq': 7,\n 'nb': 3,\n 'nd': 3,\n 'ne': 3,\n 'nl': 3,\n 'nn': 3,\n 'no': 3,\n 'nr': 3,\n 'nso': 4,\n 'ny': 3,\n 'nyn': 3,\n 'om': 3,\n 'or': 3,\n 'pa': 3,\n 'pap': 3,\n 'pl': 13,\n 'ps': 3,\n 'pt': 3,\n 'rm': 3,\n 'ro': 9,\n 'rof': 3,\n 'ru': 11,\n 'rwk': 3,\n 'sah': 0,\n 'saq': 3,\n 'se': 7,\n 'seh': 3,\n 'ses': 0,\n 'sg': 0,\n 'sh': 11,\n 'shi': 19,\n 'sk': 12,\n 'sl': 14,\n 'sma': 7,\n 'smi': 7,\n 'smj': 7,\n 'smn': 7,\n 'sms': 7,\n 'sn': 3,\n 'so': 3,\n 'sq': 3,\n 'sr': 11,\n 'ss': 3,\n 'ssy': 3,\n 'st': 3,\n 'sv': 3,\n 'sw': 3,\n 'syr': 3,\n 'ta': 3,\n 'te': 3,\n 'teo': 3,\n 'th': 0,\n 'ti': 4,\n 'tig': 3,\n 'tk': 3,\n 'tl': 4,\n 'tn': 3,\n 'to': 0,\n 'tr': 0,\n 'ts': 3,\n 'tzm': 22,\n 'uk': 11,\n 'ur': 3,\n 've': 3,\n 'vi': 0,\n 'vun': 3,\n 'wa': 4,\n 'wae': 3,\n 'wo': 0,\n 'xh': 3,\n 'xog': 3,\n 'yo': 0,\n 'zh': 0,\n 'zu': 3\n };\n\n // utility functions for plural rules methods\n function isIn(n, list) {\n return list.indexOf(n) !== -1;\n }\n function isBetween(n, start, end) {\n return start <= n && n <= end;\n }\n\n // list of all plural rules methods:\n // map an integer to the plural form name to use\n var pluralRules = {\n '0': function(n) {\n return 'other';\n },\n '1': function(n) {\n if ((isBetween((n % 100), 3, 10)))\n return 'few';\n if (n === 0)\n return 'zero';\n if ((isBetween((n % 100), 11, 99)))\n return 'many';\n if (n == 2)\n return 'two';\n if (n == 1)\n return 'one';\n return 'other';\n },\n '2': function(n) {\n if (n !== 0 && (n % 10) === 0)\n return 'many';\n if (n == 2)\n return 'two';\n if (n == 1)\n return 'one';\n return 'other';\n },\n '3': function(n) {\n if (n == 1)\n return 'one';\n return 'other';\n },\n '4': function(n) {\n if ((isBetween(n, 0, 1)))\n return 'one';\n return 'other';\n },\n '5': function(n) {\n if ((isBetween(n, 0, 2)) && n != 2)\n return 'one';\n return 'other';\n },\n '6': function(n) {\n if (n === 0)\n return 'zero';\n if ((n % 10) == 1 && (n % 100) != 11)\n return 'one';\n return 'other';\n },\n '7': function(n) {\n if (n == 2)\n return 'two';\n if (n == 1)\n return 'one';\n return 'other';\n },\n '8': function(n) {\n if ((isBetween(n, 3, 6)))\n return 'few';\n if ((isBetween(n, 7, 10)))\n return 'many';\n if (n == 2)\n return 'two';\n if (n == 1)\n return 'one';\n return 'other';\n },\n '9': function(n) {\n if (n === 0 || n != 1 && (isBetween((n % 100), 1, 19)))\n return 'few';\n if (n == 1)\n return 'one';\n return 'other';\n },\n '10': function(n) {\n if ((isBetween((n % 10), 2, 9)) && !(isBetween((n % 100), 11, 19)))\n return 'few';\n if ((n % 10) == 1 && !(isBetween((n % 100), 11, 19)))\n return 'one';\n return 'other';\n },\n '11': function(n) {\n if ((isBetween((n % 10), 2, 4)) && !(isBetween((n % 100), 12, 14)))\n return 'few';\n if ((n % 10) === 0 ||\n (isBetween((n % 10), 5, 9)) ||\n (isBetween((n % 100), 11, 14)))\n return 'many';\n if ((n % 10) == 1 && (n % 100) != 11)\n return 'one';\n return 'other';\n },\n '12': function(n) {\n if ((isBetween(n, 2, 4)))\n return 'few';\n if (n == 1)\n return 'one';\n return 'other';\n },\n '13': function(n) {\n if ((isBetween((n % 10), 2, 4)) && !(isBetween((n % 100), 12, 14)))\n return 'few';\n if (n != 1 && (isBetween((n % 10), 0, 1)) ||\n (isBetween((n % 10), 5, 9)) ||\n (isBetween((n % 100), 12, 14)))\n return 'many';\n if (n == 1)\n return 'one';\n return 'other';\n },\n '14': function(n) {\n if ((isBetween((n % 100), 3, 4)))\n return 'few';\n if ((n % 100) == 2)\n return 'two';\n if ((n % 100) == 1)\n return 'one';\n return 'other';\n },\n '15': function(n) {\n if (n === 0 || (isBetween((n % 100), 2, 10)))\n return 'few';\n if ((isBetween((n % 100), 11, 19)))\n return 'many';\n if (n == 1)\n return 'one';\n return 'other';\n },\n '16': function(n) {\n if ((n % 10) == 1 && n != 11)\n return 'one';\n return 'other';\n },\n '17': function(n) {\n if (n == 3)\n return 'few';\n if (n === 0)\n return 'zero';\n if (n == 6)\n return 'many';\n if (n == 2)\n return 'two';\n if (n == 1)\n return 'one';\n return 'other';\n },\n '18': function(n) {\n if (n === 0)\n return 'zero';\n if ((isBetween(n, 0, 2)) && n !== 0 && n != 2)\n return 'one';\n return 'other';\n },\n '19': function(n) {\n if ((isBetween(n, 2, 10)))\n return 'few';\n if ((isBetween(n, 0, 1)))\n return 'one';\n return 'other';\n },\n '20': function(n) {\n if ((isBetween((n % 10), 3, 4) || ((n % 10) == 9)) && !(\n isBetween((n % 100), 10, 19) ||\n isBetween((n % 100), 70, 79) ||\n isBetween((n % 100), 90, 99)\n ))\n return 'few';\n if ((n % 1000000) === 0 && n !== 0)\n return 'many';\n if ((n % 10) == 2 && !isIn((n % 100), [12, 72, 92]))\n return 'two';\n if ((n % 10) == 1 && !isIn((n % 100), [11, 71, 91]))\n return 'one';\n return 'other';\n },\n '21': function(n) {\n if (n === 0)\n return 'zero';\n if (n == 1)\n return 'one';\n return 'other';\n },\n '22': function(n) {\n if ((isBetween(n, 0, 1)) || (isBetween(n, 11, 99)))\n return 'one';\n return 'other';\n },\n '23': function(n) {\n if ((isBetween((n % 10), 1, 2)) || (n % 20) === 0)\n return 'one';\n return 'other';\n },\n '24': function(n) {\n if ((isBetween(n, 3, 10) || isBetween(n, 13, 19)))\n return 'few';\n if (isIn(n, [2, 12]))\n return 'two';\n if (isIn(n, [1, 11]))\n return 'one';\n return 'other';\n }\n };\n\n // return a function that gives the plural form name for a given integer\n var index = locales2rules[lang.replace(/-.*$/, '')];\n if (!(index in pluralRules)) {\n console.warn('plural form unknown for [' + lang + ']');\n return function() { return 'other'; };\n }\n return pluralRules[index];\n }\n\n // pre-defined 'plural' macro\n gMacros.plural = function(str, param, key, prop) {\n var n = parseFloat(param);\n if (isNaN(n))\n return str;\n\n // TODO: support other properties (l20n still doesn't...)\n if (prop != gTextProp)\n return str;\n\n // initialize _pluralRules\n if (!gMacros._pluralRules) {\n gMacros._pluralRules = getPluralRules(gLanguage);\n }\n var index = '[' + gMacros._pluralRules(n) + ']';\n\n // try to find a [zero|one|two] key if it's defined\n if (n === 0 && (key + '[zero]') in gL10nData) {\n str = gL10nData[key + '[zero]'][prop];\n } else if (n == 1 && (key + '[one]') in gL10nData) {\n str = gL10nData[key + '[one]'][prop];\n } else if (n == 2 && (key + '[two]') in gL10nData) {\n str = gL10nData[key + '[two]'][prop];\n } else if ((key + index) in gL10nData) {\n str = gL10nData[key + index][prop];\n } else if ((key + '[other]') in gL10nData) {\n str = gL10nData[key + '[other]'][prop];\n }\n\n return str;\n };\n\n\n /**\n * l10n dictionary functions\n */\n\n // fetch an l10n object, warn if not found, apply `args' if possible\n function getL10nData(key, args, fallback) {\n var data = gL10nData[key];\n if (!data) {\n console.warn('#' + key + ' is undefined.');\n if (!fallback) {\n return null;\n }\n data = fallback;\n }\n\n /** This is where l10n expressions should be processed.\n * The plan is to support C-style expressions from the l20n project;\n * until then, only two kinds of simple expressions are supported:\n * {[ index ]} and {{ arguments }}.\n */\n var rv = {};\n for (var prop in data) {\n var str = data[prop];\n str = substIndexes(str, args, key, prop);\n str = substArguments(str, args, key);\n rv[prop] = str;\n }\n return rv;\n }\n\n // replace {[macros]} with their values\n function substIndexes(str, args, key, prop) {\n var reIndex = /\\{\\[\\s*([a-zA-Z]+)\\(([a-zA-Z]+)\\)\\s*\\]\\}/;\n var reMatch = reIndex.exec(str);\n if (!reMatch || !reMatch.length)\n return str;\n\n // an index/macro has been found\n // Note: at the moment, only one parameter is supported\n var macroName = reMatch[1];\n var paramName = reMatch[2];\n var param;\n if (args && paramName in args) {\n param = args[paramName];\n } else if (paramName in gL10nData) {\n param = gL10nData[paramName];\n }\n\n // there's no macro parser yet: it has to be defined in gMacros\n if (macroName in gMacros) {\n var macro = gMacros[macroName];\n str = macro(str, param, key, prop);\n }\n return str;\n }\n\n // replace {{arguments}} with their values\n function substArguments(str, args, key) {\n var reArgs = /\\{\\{\\s*(.+?)\\s*\\}\\}/g;\n return str.replace(reArgs, function(matched_text, arg) {\n if (args && arg in args) {\n return args[arg];\n }\n if (arg in gL10nData) {\n return gL10nData[arg];\n }\n console.log('argument {{' + arg + '}} for #' + key + ' is undefined.');\n return matched_text;\n });\n }\n\n // translate an HTML element\n function translateElement(element) {\n var l10n = getL10nAttributes(element);\n if (!l10n.id)\n return;\n\n // get the related l10n object\n var data = getL10nData(l10n.id, l10n.args);\n if (!data) {\n console.warn('#' + l10n.id + ' is undefined.');\n return;\n }\n\n // translate element (TODO: security checks?)\n if (data[gTextProp]) { // XXX\n if (getChildElementCount(element) === 0) {\n element[gTextProp] = data[gTextProp];\n } else {\n // this element has element children: replace the content of the first\n // (non-empty) child textNode and clear other child textNodes\n var children = element.childNodes;\n var found = false;\n for (var i = 0, l = children.length; i < l; i++) {\n if (children[i].nodeType === 3 && /\\S/.test(children[i].nodeValue)) {\n if (found) {\n children[i].nodeValue = '';\n } else {\n children[i].nodeValue = data[gTextProp];\n found = true;\n }\n }\n }\n // if no (non-empty) textNode is found, insert a textNode before the\n // first element child.\n if (!found) {\n var textNode = document.createTextNode(data[gTextProp]);\n element.insertBefore(textNode, element.firstChild);\n }\n }\n delete data[gTextProp];\n }\n\n for (var k in data) {\n element[k] = data[k];\n }\n }\n\n // webkit browsers don't currently support 'children' on SVG elements...\n function getChildElementCount(element) {\n if (element.children) {\n return element.children.length;\n }\n if (typeof element.childElementCount !== 'undefined') {\n return element.childElementCount;\n }\n var count = 0;\n for (var i = 0; i < element.childNodes.length; i++) {\n count += element.nodeType === 1 ? 1 : 0;\n }\n return count;\n }\n\n // translate an HTML subtree\n function translateFragment(element) {\n element = element || document.documentElement;\n\n // check all translatable children (= w/ a `data-l10n-id' attribute)\n var children = getTranslatableChildren(element);\n var elementCount = children.length;\n for (var i = 0; i < elementCount; i++) {\n translateElement(children[i]);\n }\n\n // translate element itself if necessary\n translateElement(element);\n }\n\n return {\n // get a localized string\n get: function(key, args, fallbackString) {\n var index = key.lastIndexOf('.');\n var prop = gTextProp;\n if (index > 0) { // An attribute has been specified\n prop = key.substring(index + 1);\n key = key.substring(0, index);\n }\n var fallback;\n if (fallbackString) {\n fallback = {};\n fallback[prop] = fallbackString;\n }\n var data = getL10nData(key, args, fallback);\n if (data && prop in data) {\n return data[prop];\n }\n return '{{' + key + '}}';\n },\n\n // debug\n getData: function() { return gL10nData; },\n getText: function() { return gTextData; },\n\n // get|set the document language\n getLanguage: function() { return gLanguage; },\n setLanguage: function(lang, callback) {\n loadLocale(lang, function() {\n if (callback)\n callback();\n });\n },\n\n // get the direction (ltr|rtl) of the current language\n getDirection: function() {\n // http://www.w3.org/International/questions/qa-scripts\n // Arabic, Hebrew, Farsi, Pashto, Urdu\n var rtlList = ['ar', 'he', 'fa', 'ps', 'ur'];\n var shortCode = gLanguage.split('-', 1)[0];\n return (rtlList.indexOf(shortCode) >= 0) ? 'rtl' : 'ltr';\n },\n\n // translate an element or document fragment\n translate: translateFragment,\n\n // this can be used to prevent race conditions\n getReadyState: function() { return gReadyState; },\n ready: function(callback) {\n if (!callback) {\n return;\n } else if (gReadyState == 'complete' || gReadyState == 'interactive') {\n window.setTimeout(function() {\n callback();\n });\n } else if (document.addEventListener) {\n document.addEventListener('localized', function once() {\n document.removeEventListener('localized', once);\n callback();\n });\n }\n }\n };\n}) (window, document);\n","/* Copyright 2016 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { CSS_UNITS, NullL10n } from \"./ui_utils.js\";\nimport { PDFPrintServiceFactory, PDFViewerApplication } from \"./app.js\";\nimport { AppOptions } from \"./app_options.js\";\n\nlet activeService = null;\nlet overlayManager = null;\n\n// Renders the page to the canvas of the given print service, and returns\n// the suggested dimensions of the output page.\nfunction renderPage(activeServiceOnEntry, pdfDocument, pageNumber, size) {\n const scratchCanvas = activeService.scratchCanvas;\n\n // The size of the canvas in pixels for printing.\n const PRINT_RESOLUTION = AppOptions.get(\"printResolution\") || 150;\n const PRINT_UNITS = PRINT_RESOLUTION / 72.0;\n scratchCanvas.width = Math.floor(size.width * PRINT_UNITS);\n scratchCanvas.height = Math.floor(size.height * PRINT_UNITS);\n\n // The physical size of the img as specified by the PDF document.\n const width = Math.floor(size.width * CSS_UNITS) + \"px\";\n const height = Math.floor(size.height * CSS_UNITS) + \"px\";\n\n const ctx = scratchCanvas.getContext(\"2d\");\n ctx.save();\n ctx.fillStyle = \"rgb(255, 255, 255)\";\n ctx.fillRect(0, 0, scratchCanvas.width, scratchCanvas.height);\n ctx.restore();\n\n return pdfDocument\n .getPage(pageNumber)\n .then(function(pdfPage) {\n const renderContext = {\n canvasContext: ctx,\n transform: [PRINT_UNITS, 0, 0, PRINT_UNITS, 0, 0],\n viewport: pdfPage.getViewport({ scale: 1, rotation: size.rotation }),\n intent: \"print\",\n };\n return pdfPage.render(renderContext).promise;\n })\n .then(function() {\n return {\n width,\n height,\n };\n });\n}\n\nfunction PDFPrintService(pdfDocument, pagesOverview, printContainer, l10n) {\n this.pdfDocument = pdfDocument;\n this.pagesOverview = pagesOverview;\n this.printContainer = printContainer;\n this.l10n = l10n || NullL10n;\n this.disableCreateObjectURL =\n pdfDocument.loadingParams[\"disableCreateObjectURL\"];\n this.currentPage = -1;\n // The temporary canvas where renderPage paints one page at a time.\n this.scratchCanvas = document.createElement(\"canvas\");\n}\n\nPDFPrintService.prototype = {\n layout() {\n this.throwIfInactive();\n\n const body = document.querySelector(\"body\");\n body.setAttribute(\"data-pdfjsprinting\", true);\n\n const hasEqualPageSizes = this.pagesOverview.every(function(size) {\n return (\n size.width === this.pagesOverview[0].width &&\n size.height === this.pagesOverview[0].height\n );\n }, this);\n if (!hasEqualPageSizes) {\n console.warn(\n \"Not all pages have the same size. The printed \" +\n \"result may be incorrect!\"\n );\n }\n\n // Insert a @page + size rule to make sure that the page size is correctly\n // set. Note that we assume that all pages have the same size, because\n // variable-size pages are not supported yet (e.g. in Chrome & Firefox).\n // TODO(robwu): Use named pages when size calculation bugs get resolved\n // (e.g. https://crbug.com/355116) AND when support for named pages is\n // added (http://www.w3.org/TR/css3-page/#using-named-pages).\n // In browsers where @page + size is not supported (such as Firefox,\n // https://bugzil.la/851441), the next stylesheet will be ignored and the\n // user has to select the correct paper size in the UI if wanted.\n this.pageStyleSheet = document.createElement(\"style\");\n const pageSize = this.pagesOverview[0];\n this.pageStyleSheet.textContent =\n // \"size:<width> <height>\" is what we need. But also add \"A4\" because\n // Firefox incorrectly reports support for the other value.\n \"@supports ((size:A4) and (size:1pt 1pt)) {\" +\n \"@page { size: \" +\n pageSize.width +\n \"pt \" +\n pageSize.height +\n \"pt;}\" +\n \"}\";\n body.appendChild(this.pageStyleSheet);\n },\n\n destroy() {\n if (activeService !== this) {\n // |activeService| cannot be replaced without calling destroy() first,\n // so if it differs then an external consumer has a stale reference to\n // us.\n return;\n }\n this.printContainer.textContent = \"\";\n\n const body = document.querySelector(\"body\");\n body.removeAttribute(\"data-pdfjsprinting\");\n\n if (this.pageStyleSheet) {\n this.pageStyleSheet.remove();\n this.pageStyleSheet = null;\n }\n this.scratchCanvas.width = this.scratchCanvas.height = 0;\n this.scratchCanvas = null;\n activeService = null;\n ensureOverlay().then(function() {\n if (overlayManager.active !== \"printServiceOverlay\") {\n return; // overlay was already closed\n }\n overlayManager.close(\"printServiceOverlay\");\n });\n },\n\n renderPages() {\n const pageCount = this.pagesOverview.length;\n const renderNextPage = (resolve, reject) => {\n this.throwIfInactive();\n if (++this.currentPage >= pageCount) {\n renderProgress(pageCount, pageCount, this.l10n);\n resolve();\n return;\n }\n const index = this.currentPage;\n renderProgress(index, pageCount, this.l10n);\n renderPage(this, this.pdfDocument, index + 1, this.pagesOverview[index])\n .then(this.useRenderedPage.bind(this))\n .then(function() {\n renderNextPage(resolve, reject);\n }, reject);\n };\n return new Promise(renderNextPage);\n },\n\n useRenderedPage(printItem) {\n this.throwIfInactive();\n const img = document.createElement(\"img\");\n img.style.width = printItem.width;\n img.style.height = printItem.height;\n\n const scratchCanvas = this.scratchCanvas;\n if (\"toBlob\" in scratchCanvas && !this.disableCreateObjectURL) {\n scratchCanvas.toBlob(function(blob) {\n img.src = URL.createObjectURL(blob);\n });\n } else {\n img.src = scratchCanvas.toDataURL();\n }\n\n const wrapper = document.createElement(\"div\");\n wrapper.appendChild(img);\n this.printContainer.appendChild(wrapper);\n\n return new Promise(function(resolve, reject) {\n img.onload = resolve;\n img.onerror = reject;\n });\n },\n\n performPrint() {\n this.throwIfInactive();\n return new Promise(resolve => {\n // Push window.print in the macrotask queue to avoid being affected by\n // the deprecation of running print() code in a microtask, see\n // https://github.com/mozilla/pdf.js/issues/7547.\n setTimeout(() => {\n if (!this.active) {\n resolve();\n return;\n }\n print.call(window);\n // Delay promise resolution in case print() was not synchronous.\n setTimeout(resolve, 20); // Tidy-up.\n }, 0);\n });\n },\n\n get active() {\n return this === activeService;\n },\n\n throwIfInactive() {\n if (!this.active) {\n throw new Error(\"This print request was cancelled or completed.\");\n }\n },\n};\n\nconst print = window.print;\nwindow.print = function() {\n if (activeService) {\n console.warn(\"Ignored window.print() because of a pending print job.\");\n return;\n }\n ensureOverlay().then(function() {\n if (activeService) {\n overlayManager.open(\"printServiceOverlay\");\n }\n });\n\n try {\n dispatchEvent(\"beforeprint\");\n } finally {\n if (!activeService) {\n console.error(\"Expected print service to be initialized.\");\n ensureOverlay().then(function() {\n if (overlayManager.active === \"printServiceOverlay\") {\n overlayManager.close(\"printServiceOverlay\");\n }\n });\n return; // eslint-disable-line no-unsafe-finally\n }\n const activeServiceOnEntry = activeService;\n activeService\n .renderPages()\n .then(function() {\n return activeServiceOnEntry.performPrint();\n })\n .catch(function() {\n // Ignore any error messages.\n })\n .then(function() {\n // aborts acts on the \"active\" print request, so we need to check\n // whether the print request (activeServiceOnEntry) is still active.\n // Without the check, an unrelated print request (created after aborting\n // this print request while the pages were being generated) would be\n // aborted.\n if (activeServiceOnEntry.active) {\n abort();\n }\n });\n }\n};\n\nfunction dispatchEvent(eventType) {\n const event = document.createEvent(\"CustomEvent\");\n event.initCustomEvent(eventType, false, false, \"custom\");\n window.dispatchEvent(event);\n}\n\nfunction abort() {\n if (activeService) {\n activeService.destroy();\n dispatchEvent(\"afterprint\");\n }\n}\n\nfunction renderProgress(index, total, l10n) {\n const progressContainer = document.getElementById(\"printServiceOverlay\");\n const progress = Math.round((100 * index) / total);\n const progressBar = progressContainer.querySelector(\"progress\");\n const progressPerc = progressContainer.querySelector(\".relative-progress\");\n progressBar.value = progress;\n l10n.get(\"print_progress_percent\", { progress }, progress + \"%\").then(msg => {\n progressPerc.textContent = msg;\n });\n}\n\nwindow.addEventListener(\n \"keydown\",\n function(event) {\n // Intercept Cmd/Ctrl + P in all browsers.\n // Also intercept Cmd/Ctrl + Shift + P in Chrome and Opera\n if (\n event.keyCode === /* P= */ 80 &&\n (event.ctrlKey || event.metaKey) &&\n !event.altKey &&\n (!event.shiftKey || window.chrome || window.opera)\n ) {\n window.print();\n\n // The (browser) print dialog cannot be prevented from being shown in\n // IE11.\n event.preventDefault();\n if (event.stopImmediatePropagation) {\n event.stopImmediatePropagation();\n } else {\n event.stopPropagation();\n }\n }\n },\n true\n);\n\nif (\"onbeforeprint\" in window) {\n // Do not propagate before/afterprint events when they are not triggered\n // from within this polyfill. (FF /IE / Chrome 63+).\n const stopPropagationIfNeeded = function(event) {\n if (event.detail !== \"custom\" && event.stopImmediatePropagation) {\n event.stopImmediatePropagation();\n }\n };\n window.addEventListener(\"beforeprint\", stopPropagationIfNeeded);\n window.addEventListener(\"afterprint\", stopPropagationIfNeeded);\n}\n\nlet overlayPromise;\nfunction ensureOverlay() {\n if (!overlayPromise) {\n overlayManager = PDFViewerApplication.overlayManager;\n if (!overlayManager) {\n throw new Error(\"The overlay manager has not yet been initialized.\");\n }\n\n overlayPromise = overlayManager.register(\n \"printServiceOverlay\",\n document.getElementById(\"printServiceOverlay\"),\n abort,\n true\n );\n document.getElementById(\"printCancel\").onclick = abort;\n }\n return overlayPromise;\n}\n\nPDFPrintServiceFactory.instance = {\n supportsPrinting: true,\n\n createPrintService(pdfDocument, pagesOverview, printContainer, l10n) {\n if (activeService) {\n throw new Error(\"The print service is created and active.\");\n }\n activeService = new PDFPrintService(\n pdfDocument,\n pagesOverview,\n printContainer,\n l10n\n );\n return activeService;\n },\n};\n\nexport { PDFPrintService };\n"],"sourceRoot":""} \ No newline at end of file