main 68da8428e654 cached
387 files
8.8 MB
2.3M tokens
10458 symbols
1 requests
Download .txt
Showing preview only (9,404K chars total). Download the full file or copy to clipboard to get everything.
Repository: Laomai-codefee/pdfjs-annotation-extension
Branch: main
Commit: 68da8428e654
Files: 387
Total size: 8.8 MB

Directory structure:
gitextract_7olj96qh/

├── .babelrc
├── .eslintignore
├── .eslintrc
├── .gitignore
├── .prettierrc
├── LICENSE
├── README.md
├── README_CN.md
├── configuration/
│   ├── environment.js
│   ├── webpack.dev.config.js
│   └── webpack.prod.config.js
├── examples/
│   └── pdfjs-4.3.136-dist/
│       ├── LICENSE
│       ├── build/
│       │   ├── pdf.mjs
│       │   ├── pdf.sandbox.mjs
│       │   └── pdf.worker.mjs
│       ├── pdfjs-annotation-extension-testdata.json
│       └── web/
│           ├── cmaps/
│           │   ├── 78-EUC-H.bcmap
│           │   ├── 78-EUC-V.bcmap
│           │   ├── 78-H.bcmap
│           │   ├── 78-RKSJ-H.bcmap
│           │   ├── 78-RKSJ-V.bcmap
│           │   ├── 78-V.bcmap
│           │   ├── 78ms-RKSJ-H.bcmap
│           │   ├── 78ms-RKSJ-V.bcmap
│           │   ├── 83pv-RKSJ-H.bcmap
│           │   ├── 90ms-RKSJ-H.bcmap
│           │   ├── 90ms-RKSJ-V.bcmap
│           │   ├── 90msp-RKSJ-H.bcmap
│           │   ├── 90msp-RKSJ-V.bcmap
│           │   ├── 90pv-RKSJ-H.bcmap
│           │   ├── 90pv-RKSJ-V.bcmap
│           │   ├── Add-H.bcmap
│           │   ├── Add-RKSJ-H.bcmap
│           │   ├── Add-RKSJ-V.bcmap
│           │   ├── Add-V.bcmap
│           │   ├── Adobe-CNS1-0.bcmap
│           │   ├── Adobe-CNS1-1.bcmap
│           │   ├── Adobe-CNS1-2.bcmap
│           │   ├── Adobe-CNS1-3.bcmap
│           │   ├── Adobe-CNS1-4.bcmap
│           │   ├── Adobe-CNS1-5.bcmap
│           │   ├── Adobe-CNS1-6.bcmap
│           │   ├── Adobe-CNS1-UCS2.bcmap
│           │   ├── Adobe-GB1-0.bcmap
│           │   ├── Adobe-GB1-1.bcmap
│           │   ├── Adobe-GB1-2.bcmap
│           │   ├── Adobe-GB1-3.bcmap
│           │   ├── Adobe-GB1-4.bcmap
│           │   ├── Adobe-GB1-5.bcmap
│           │   ├── Adobe-GB1-UCS2.bcmap
│           │   ├── Adobe-Japan1-0.bcmap
│           │   ├── Adobe-Japan1-1.bcmap
│           │   ├── Adobe-Japan1-2.bcmap
│           │   ├── Adobe-Japan1-3.bcmap
│           │   ├── Adobe-Japan1-4.bcmap
│           │   ├── Adobe-Japan1-5.bcmap
│           │   ├── Adobe-Japan1-6.bcmap
│           │   ├── Adobe-Japan1-UCS2.bcmap
│           │   ├── Adobe-Korea1-0.bcmap
│           │   ├── Adobe-Korea1-1.bcmap
│           │   ├── Adobe-Korea1-2.bcmap
│           │   ├── Adobe-Korea1-UCS2.bcmap
│           │   ├── B5-H.bcmap
│           │   ├── B5-V.bcmap
│           │   ├── B5pc-H.bcmap
│           │   ├── B5pc-V.bcmap
│           │   ├── CNS-EUC-H.bcmap
│           │   ├── CNS-EUC-V.bcmap
│           │   ├── CNS1-H.bcmap
│           │   ├── CNS1-V.bcmap
│           │   ├── CNS2-H.bcmap
│           │   ├── CNS2-V.bcmap
│           │   ├── ETHK-B5-H.bcmap
│           │   ├── ETHK-B5-V.bcmap
│           │   ├── ETen-B5-H.bcmap
│           │   ├── ETen-B5-V.bcmap
│           │   ├── ETenms-B5-H.bcmap
│           │   ├── ETenms-B5-V.bcmap
│           │   ├── EUC-H.bcmap
│           │   ├── EUC-V.bcmap
│           │   ├── Ext-H.bcmap
│           │   ├── Ext-RKSJ-H.bcmap
│           │   ├── Ext-RKSJ-V.bcmap
│           │   ├── Ext-V.bcmap
│           │   ├── GB-EUC-H.bcmap
│           │   ├── GB-EUC-V.bcmap
│           │   ├── GB-H.bcmap
│           │   ├── GB-V.bcmap
│           │   ├── GBK-EUC-H.bcmap
│           │   ├── GBK-EUC-V.bcmap
│           │   ├── GBK2K-H.bcmap
│           │   ├── GBK2K-V.bcmap
│           │   ├── GBKp-EUC-H.bcmap
│           │   ├── GBKp-EUC-V.bcmap
│           │   ├── GBT-EUC-H.bcmap
│           │   ├── GBT-EUC-V.bcmap
│           │   ├── GBT-H.bcmap
│           │   ├── GBT-V.bcmap
│           │   ├── GBTpc-EUC-H.bcmap
│           │   ├── GBTpc-EUC-V.bcmap
│           │   ├── GBpc-EUC-H.bcmap
│           │   ├── GBpc-EUC-V.bcmap
│           │   ├── H.bcmap
│           │   ├── HKdla-B5-H.bcmap
│           │   ├── HKdla-B5-V.bcmap
│           │   ├── HKdlb-B5-H.bcmap
│           │   ├── HKdlb-B5-V.bcmap
│           │   ├── HKgccs-B5-H.bcmap
│           │   ├── HKgccs-B5-V.bcmap
│           │   ├── HKm314-B5-H.bcmap
│           │   ├── HKm314-B5-V.bcmap
│           │   ├── HKm471-B5-H.bcmap
│           │   ├── HKm471-B5-V.bcmap
│           │   ├── HKscs-B5-H.bcmap
│           │   ├── HKscs-B5-V.bcmap
│           │   ├── Hankaku.bcmap
│           │   ├── Hiragana.bcmap
│           │   ├── KSC-EUC-H.bcmap
│           │   ├── KSC-EUC-V.bcmap
│           │   ├── KSC-H.bcmap
│           │   ├── KSC-Johab-H.bcmap
│           │   ├── KSC-Johab-V.bcmap
│           │   ├── KSC-V.bcmap
│           │   ├── KSCms-UHC-H.bcmap
│           │   ├── KSCms-UHC-HW-H.bcmap
│           │   ├── KSCms-UHC-HW-V.bcmap
│           │   ├── KSCms-UHC-V.bcmap
│           │   ├── KSCpc-EUC-H.bcmap
│           │   ├── KSCpc-EUC-V.bcmap
│           │   ├── Katakana.bcmap
│           │   ├── LICENSE
│           │   ├── NWP-H.bcmap
│           │   ├── NWP-V.bcmap
│           │   ├── RKSJ-H.bcmap
│           │   ├── RKSJ-V.bcmap
│           │   ├── Roman.bcmap
│           │   ├── UniCNS-UCS2-H.bcmap
│           │   ├── UniCNS-UCS2-V.bcmap
│           │   ├── UniCNS-UTF16-H.bcmap
│           │   ├── UniCNS-UTF16-V.bcmap
│           │   ├── UniCNS-UTF32-H.bcmap
│           │   ├── UniCNS-UTF32-V.bcmap
│           │   ├── UniCNS-UTF8-H.bcmap
│           │   ├── UniCNS-UTF8-V.bcmap
│           │   ├── UniGB-UCS2-H.bcmap
│           │   ├── UniGB-UCS2-V.bcmap
│           │   ├── UniGB-UTF16-H.bcmap
│           │   ├── UniGB-UTF16-V.bcmap
│           │   ├── UniGB-UTF32-H.bcmap
│           │   ├── UniGB-UTF32-V.bcmap
│           │   ├── UniGB-UTF8-H.bcmap
│           │   ├── UniGB-UTF8-V.bcmap
│           │   ├── UniJIS-UCS2-H.bcmap
│           │   ├── UniJIS-UCS2-HW-H.bcmap
│           │   ├── UniJIS-UCS2-HW-V.bcmap
│           │   ├── UniJIS-UCS2-V.bcmap
│           │   ├── UniJIS-UTF16-H.bcmap
│           │   ├── UniJIS-UTF16-V.bcmap
│           │   ├── UniJIS-UTF32-H.bcmap
│           │   ├── UniJIS-UTF32-V.bcmap
│           │   ├── UniJIS-UTF8-H.bcmap
│           │   ├── UniJIS-UTF8-V.bcmap
│           │   ├── UniJIS2004-UTF16-H.bcmap
│           │   ├── UniJIS2004-UTF16-V.bcmap
│           │   ├── UniJIS2004-UTF32-H.bcmap
│           │   ├── UniJIS2004-UTF32-V.bcmap
│           │   ├── UniJIS2004-UTF8-H.bcmap
│           │   ├── UniJIS2004-UTF8-V.bcmap
│           │   ├── UniJISPro-UCS2-HW-V.bcmap
│           │   ├── UniJISPro-UCS2-V.bcmap
│           │   ├── UniJISPro-UTF8-V.bcmap
│           │   ├── UniJISX0213-UTF32-H.bcmap
│           │   ├── UniJISX0213-UTF32-V.bcmap
│           │   ├── UniJISX02132004-UTF32-H.bcmap
│           │   ├── UniJISX02132004-UTF32-V.bcmap
│           │   ├── UniKS-UCS2-H.bcmap
│           │   ├── UniKS-UCS2-V.bcmap
│           │   ├── UniKS-UTF16-H.bcmap
│           │   ├── UniKS-UTF16-V.bcmap
│           │   ├── UniKS-UTF32-H.bcmap
│           │   ├── UniKS-UTF32-V.bcmap
│           │   ├── UniKS-UTF8-H.bcmap
│           │   ├── UniKS-UTF8-V.bcmap
│           │   ├── V.bcmap
│           │   └── WP-Symbol.bcmap
│           ├── debugger.css
│           ├── debugger.mjs
│           ├── locale/
│           │   ├── ach/
│           │   │   └── viewer.ftl
│           │   ├── af/
│           │   │   └── viewer.ftl
│           │   ├── an/
│           │   │   └── viewer.ftl
│           │   ├── ar/
│           │   │   └── viewer.ftl
│           │   ├── ast/
│           │   │   └── viewer.ftl
│           │   ├── az/
│           │   │   └── viewer.ftl
│           │   ├── be/
│           │   │   └── viewer.ftl
│           │   ├── bg/
│           │   │   └── viewer.ftl
│           │   ├── bn/
│           │   │   └── viewer.ftl
│           │   ├── bo/
│           │   │   └── viewer.ftl
│           │   ├── br/
│           │   │   └── viewer.ftl
│           │   ├── brx/
│           │   │   └── viewer.ftl
│           │   ├── bs/
│           │   │   └── viewer.ftl
│           │   ├── ca/
│           │   │   └── viewer.ftl
│           │   ├── cak/
│           │   │   └── viewer.ftl
│           │   ├── ckb/
│           │   │   └── viewer.ftl
│           │   ├── cs/
│           │   │   └── viewer.ftl
│           │   ├── cy/
│           │   │   └── viewer.ftl
│           │   ├── da/
│           │   │   └── viewer.ftl
│           │   ├── de/
│           │   │   └── viewer.ftl
│           │   ├── dsb/
│           │   │   └── viewer.ftl
│           │   ├── el/
│           │   │   └── viewer.ftl
│           │   ├── en-CA/
│           │   │   └── viewer.ftl
│           │   ├── en-GB/
│           │   │   └── viewer.ftl
│           │   ├── en-US/
│           │   │   └── viewer.ftl
│           │   ├── eo/
│           │   │   └── viewer.ftl
│           │   ├── es-AR/
│           │   │   └── viewer.ftl
│           │   ├── es-CL/
│           │   │   └── viewer.ftl
│           │   ├── es-ES/
│           │   │   └── viewer.ftl
│           │   ├── es-MX/
│           │   │   └── viewer.ftl
│           │   ├── et/
│           │   │   └── viewer.ftl
│           │   ├── eu/
│           │   │   └── viewer.ftl
│           │   ├── fa/
│           │   │   └── viewer.ftl
│           │   ├── ff/
│           │   │   └── viewer.ftl
│           │   ├── fi/
│           │   │   └── viewer.ftl
│           │   ├── fr/
│           │   │   └── viewer.ftl
│           │   ├── fur/
│           │   │   └── viewer.ftl
│           │   ├── fy-NL/
│           │   │   └── viewer.ftl
│           │   ├── ga-IE/
│           │   │   └── viewer.ftl
│           │   ├── gd/
│           │   │   └── viewer.ftl
│           │   ├── gl/
│           │   │   └── viewer.ftl
│           │   ├── gn/
│           │   │   └── viewer.ftl
│           │   ├── gu-IN/
│           │   │   └── viewer.ftl
│           │   ├── he/
│           │   │   └── viewer.ftl
│           │   ├── hi-IN/
│           │   │   └── viewer.ftl
│           │   ├── hr/
│           │   │   └── viewer.ftl
│           │   ├── hsb/
│           │   │   └── viewer.ftl
│           │   ├── hu/
│           │   │   └── viewer.ftl
│           │   ├── hy-AM/
│           │   │   └── viewer.ftl
│           │   ├── hye/
│           │   │   └── viewer.ftl
│           │   ├── ia/
│           │   │   └── viewer.ftl
│           │   ├── id/
│           │   │   └── viewer.ftl
│           │   ├── is/
│           │   │   └── viewer.ftl
│           │   ├── it/
│           │   │   └── viewer.ftl
│           │   ├── ja/
│           │   │   └── viewer.ftl
│           │   ├── ka/
│           │   │   └── viewer.ftl
│           │   ├── kab/
│           │   │   └── viewer.ftl
│           │   ├── kk/
│           │   │   └── viewer.ftl
│           │   ├── km/
│           │   │   └── viewer.ftl
│           │   ├── kn/
│           │   │   └── viewer.ftl
│           │   ├── ko/
│           │   │   └── viewer.ftl
│           │   ├── lij/
│           │   │   └── viewer.ftl
│           │   ├── lo/
│           │   │   └── viewer.ftl
│           │   ├── locale.json
│           │   ├── lt/
│           │   │   └── viewer.ftl
│           │   ├── ltg/
│           │   │   └── viewer.ftl
│           │   ├── lv/
│           │   │   └── viewer.ftl
│           │   ├── meh/
│           │   │   └── viewer.ftl
│           │   ├── mk/
│           │   │   └── viewer.ftl
│           │   ├── mr/
│           │   │   └── viewer.ftl
│           │   ├── ms/
│           │   │   └── viewer.ftl
│           │   ├── my/
│           │   │   └── viewer.ftl
│           │   ├── nb-NO/
│           │   │   └── viewer.ftl
│           │   ├── ne-NP/
│           │   │   └── viewer.ftl
│           │   ├── nl/
│           │   │   └── viewer.ftl
│           │   ├── nn-NO/
│           │   │   └── viewer.ftl
│           │   ├── oc/
│           │   │   └── viewer.ftl
│           │   ├── pa-IN/
│           │   │   └── viewer.ftl
│           │   ├── pl/
│           │   │   └── viewer.ftl
│           │   ├── pt-BR/
│           │   │   └── viewer.ftl
│           │   ├── pt-PT/
│           │   │   └── viewer.ftl
│           │   ├── rm/
│           │   │   └── viewer.ftl
│           │   ├── ro/
│           │   │   └── viewer.ftl
│           │   ├── ru/
│           │   │   └── viewer.ftl
│           │   ├── sat/
│           │   │   └── viewer.ftl
│           │   ├── sc/
│           │   │   └── viewer.ftl
│           │   ├── scn/
│           │   │   └── viewer.ftl
│           │   ├── sco/
│           │   │   └── viewer.ftl
│           │   ├── si/
│           │   │   └── viewer.ftl
│           │   ├── sk/
│           │   │   └── viewer.ftl
│           │   ├── skr/
│           │   │   └── viewer.ftl
│           │   ├── sl/
│           │   │   └── viewer.ftl
│           │   ├── son/
│           │   │   └── viewer.ftl
│           │   ├── sq/
│           │   │   └── viewer.ftl
│           │   ├── sr/
│           │   │   └── viewer.ftl
│           │   ├── sv-SE/
│           │   │   └── viewer.ftl
│           │   ├── szl/
│           │   │   └── viewer.ftl
│           │   ├── ta/
│           │   │   └── viewer.ftl
│           │   ├── te/
│           │   │   └── viewer.ftl
│           │   ├── tg/
│           │   │   └── viewer.ftl
│           │   ├── th/
│           │   │   └── viewer.ftl
│           │   ├── tl/
│           │   │   └── viewer.ftl
│           │   ├── tr/
│           │   │   └── viewer.ftl
│           │   ├── trs/
│           │   │   └── viewer.ftl
│           │   ├── uk/
│           │   │   └── viewer.ftl
│           │   ├── ur/
│           │   │   └── viewer.ftl
│           │   ├── uz/
│           │   │   └── viewer.ftl
│           │   ├── vi/
│           │   │   └── viewer.ftl
│           │   ├── wo/
│           │   │   └── viewer.ftl
│           │   ├── xh/
│           │   │   └── viewer.ftl
│           │   ├── zh-CN/
│           │   │   └── viewer.ftl
│           │   └── zh-TW/
│           │       └── viewer.ftl
│           ├── pdfjs-annotation-extension/
│           │   └── pdfjs-annotation-extension.js
│           ├── standard_fonts/
│           │   ├── FoxitDingbats.pfb
│           │   ├── FoxitFixed.pfb
│           │   ├── FoxitFixedBold.pfb
│           │   ├── FoxitFixedBoldItalic.pfb
│           │   ├── FoxitFixedItalic.pfb
│           │   ├── FoxitSerif.pfb
│           │   ├── FoxitSerifBold.pfb
│           │   ├── FoxitSerifBoldItalic.pfb
│           │   ├── FoxitSerifItalic.pfb
│           │   ├── FoxitSymbol.pfb
│           │   ├── LICENSE_FOXIT
│           │   └── LICENSE_LIBERATION
│           ├── viewer.css
│           ├── viewer.html
│           └── viewer.mjs
├── package.json
├── src/
│   ├── annot/
│   │   ├── index.ts
│   │   ├── parse.ts
│   │   ├── parse_circle.ts
│   │   ├── parse_freetext.ts
│   │   ├── parse_highlight.ts
│   │   ├── parse_ink.ts
│   │   ├── parse_line.ts
│   │   ├── parse_polyline.ts
│   │   ├── parse_square.ts
│   │   ├── parse_stamp.ts
│   │   ├── parse_strikeout.ts
│   │   ├── parse_text.ts
│   │   └── parse_underline.ts
│   ├── components/
│   │   ├── comment/
│   │   │   ├── index.scss
│   │   │   └── index.tsx
│   │   ├── menu/
│   │   │   ├── index.scss
│   │   │   └── index.tsx
│   │   ├── popbar/
│   │   │   ├── index.scss
│   │   │   └── index.tsx
│   │   └── toolbar/
│   │       ├── index.scss
│   │       ├── index.tsx
│   │       ├── signature.tsx
│   │       └── stamp.tsx
│   ├── const/
│   │   ├── default_options.ts
│   │   ├── default_stamp.ts
│   │   ├── definitions.tsx
│   │   ├── icon.tsx
│   │   └── pdfjs.d.ts
│   ├── index.tsx
│   ├── locale/
│   │   ├── de-de.json
│   │   ├── en-us.json
│   │   ├── index.ts
│   │   └── zh-cn.json
│   ├── painter/
│   │   ├── connectorLine.ts
│   │   ├── const.ts
│   │   ├── editor/
│   │   │   ├── editor.ts
│   │   │   ├── editor_arrow.ts
│   │   │   ├── editor_circle.ts
│   │   │   ├── editor_cloud.ts
│   │   │   ├── editor_free_hand.ts
│   │   │   ├── editor_free_highlight.ts
│   │   │   ├── editor_free_text.scss
│   │   │   ├── editor_free_text.tsx
│   │   │   ├── editor_highlight.ts
│   │   │   ├── editor_note.ts
│   │   │   ├── editor_rectangle.ts
│   │   │   ├── editor_signature.ts
│   │   │   ├── editor_stamp.tsx
│   │   │   └── selector.tsx
│   │   ├── index.scss
│   │   ├── index.ts
│   │   ├── store.ts
│   │   ├── transform/
│   │   │   ├── decoder.ts
│   │   │   ├── decoder_circle.ts
│   │   │   ├── decoder_free_text.ts
│   │   │   ├── decoder_highlight.ts
│   │   │   ├── decoder_ink.ts
│   │   │   ├── decoder_line.ts
│   │   │   ├── decoder_polygon.ts
│   │   │   ├── decoder_polyline.ts
│   │   │   ├── decoder_square.ts
│   │   │   ├── decoder_text.ts
│   │   │   └── transform.ts
│   │   └── webSelection.ts
│   ├── scss/
│   │   └── app.scss
│   ├── typings.d.ts
│   └── utils/
│       ├── documentIcon.ts
│       ├── fontLoader.ts
│       └── utils.ts
├── tsconfig.json
└── webpack.config.js

================================================
FILE CONTENTS
================================================

================================================
FILE: .babelrc
================================================
{
  "presets": [
    ["@babel/preset-env"],
    ["@babel/preset-typescript"],
    [
      "@babel/preset-react",
      {
        "runtime": "automatic" // defaults to classic
      }
    ]
  ]
}


================================================
FILE: .eslintignore
================================================
examples
examples/**/*/
node_modules/**/*

================================================
FILE: .eslintrc
================================================
{
    "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:react/recommended", "plugin:react-hooks/recommended"],
    "parser": "@typescript-eslint/parser",
    "plugins": ["@typescript-eslint", "react", "simple-import-sort", "unused-imports", "prettier"],
    "rules": {
        "no-unused-vars": "error",
        "no-var": "error",
        "no-unused-expressions": 0,
        "unused-imports/no-unused-imports": "error",
        "unused-imports/no-unused-vars": "error",
        "no-tabs": "error",
        "indent": "off",
        "space-before-function-paren": "off",
        "@typescript-eslint/indent": ["error", 4],
        "@typescript-eslint/explicit-function-return-type": "off",
        "simple-import-sort/imports": "error",
        "simple-import-sort/exports": "error",
        "import/prefer-default-export": "off",
        "react/react-in-jsx-scope": "off",
        "prettier/prettier": "error"
    },
    "globals": {
        "browser": false,
        "window": true,
        "document": true
    },
    "settings": {
        "react": {
            "version": "18"
        }
    }
}


================================================
FILE: .gitignore
================================================
# See http://help.github.com/ignore-files/ for more about ignoring files.

# Mac OS X
.DS_Store
._.*
._*

# Ignore local editor
.project
.settings
.idea
*.swp
tags
nbproject/*
.vscode

# Windows
Thumbs.db

# Debugging related
npm-debug.log

# Dependency packages files
node_modules/

# Output
dist/
*.log

# stats
stats.json

yarn.lock
package-lock.json

================================================
FILE: .prettierrc
================================================
{
    "singleQuote": true,
    "semi": false,
    "trailingComma": "none",
    "tabWidth": 4,
    "useTabs": false,
    "printWidth": 160,
    "arrowParens": "avoid",
    "endOfLine": "lf"
}


================================================
FILE: LICENSE
================================================
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   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.


================================================
FILE: README.md
================================================
⚠️ **Part of the InkLayer ecosystem**

This repository contains the low-level reference implementation used by InkLayer.

👉 **Main entry point:** https://github.com/Laomai-codefee/inklayer

---
<div>
    <h1 align="center"><code>pdf.js Annotation Extension</code> ⚡️ </h1>
    <p align="center">
        <strong>An annotation extension based on the PDF.js viewer<br/> Supporting the editing of existing PDF file annotations, posting comments, replying, submitting annotation data, and loading for further editing.</strong>
    </p>
    <p align="center">
        <strong>🚀 Now supports exporting annotations to PDF files.
</strong>
    </p>
</div>

---
## 📢 React Version Available

### A React-based implementation of this project is now available:
👉 [pdfjs-annotation-extension-for-react](https://github.com/Laomai-codefee/pdfjs-annotation-extension-for-react/)

1. The new project is built on the same core ideas as this repository.
It provides an extensible annotation system powered by PDF.js and is fully refactored into a modern React component architecture.

2. If you are building applications with React and need an extensible PDF annotation solution, we highly recommend checking out the new React version.

3. This repository will remain as a reference for the original implementation and design concepts, while ongoing development and new features will primarily focus on the React version.


---

English | [简体中文](./README_CN.md)

## 🧭 Online Demo

Site: [https://laomai-codefee.github.io/pdfjs-annotation-extension/](https://laomai-codefee.github.io/pdfjs-annotation-extension/)

--- 

## 📣 Recent Updates  

🔥🔥 **2025.6.27 v2.2.0 Version**, main updates include:

1. **New Annotation Types** – Added arrow and cloud line annotations  
2. **Signature** – Added support for creating signatures via text input or image upload; text input supports font selection  
3. **Stamping** – Added default stamps, custom stamp creation, and image-based stamp uploads; custom stamps support settings for text color, style, font, background, and border; timestamp supports username, date, and custom text  
4. **Annotation Status** – Added annotation status options: Accepted, Rejected, Canceled, Completed, Closed, and None  
5. **Annotation Export** – Added Excel export functionality for annotations  
6. **Connecting Lines** – Added connectors between annotations and shapes  
7. **Annotation Styles** – Added style settings for each annotation type, supporting color, stroke width, and opacity adjustments  
8. **Bug Fixes and Interaction Improvements** – Various bug fixes and optimizations to enhance user experience  

---
* **2025.5.19  Version 2.1.1** – Key features include:  
  1. **Sidebar Collapse Support** – Added `DEFAULT_SIDE_BAR_OPEN` to control whether the sidebar is shown. It is visible by default.
  2. **Annotation Filtering Support** – Added annotation filtering functionality, allowing filters by author and annotation type.
  3. **Improved Annotation Highlighting Logic** – Annotations are now highlighted even when not selected, improving the overall user experience.

* **2025.5.16  Version 2.1.0** – Key features include:  
  1. **Added PDF export functionality**: Export drawn annotations to a new PDF file. Supported annotation types: TEXT, HIGHLIGHT, UNDERLINE, STRIKEOUT, SQUARE, CIRCLE, INK, POLYLINE, FREETEXT, STAMP.  
  2. **Signatures and stamps**: Introduced the `ALLOW_REPLY_ON_STAMP` parameter to control whether comments/replies are allowed on stamps (disabled by default).  
  3. **New Note annotation tool**: Corresponds to the PDF Text annotation type.  

--- 

## 1. Background

[PDF.js](https://mozilla.github.io/pdf.js/) provides a [Viewer](https://mozilla.github.io/pdf.js/web/viewer.html) for online PDF preview and includes some basic annotation functionalities (FREETEXT, HIGHLIGHT, STAMP, INK).

In actual use cases, there is often a need for various annotation tools, leading to the idea of extending the viewer to add more annotation capabilities.

This project is based on `konva`, `react`, `antd`, and `web-highlighter`. It introduces additional annotation types by extending the existing `pdf.js` viewer without modifying its original code. Supports editing existing annotations, submitting annotation data, and loading for further editing, as shown below:

<div align="center">
  <img src="/examples/demo.gif" alt="demo" />
</div>

#### Mobile Version

<div align="center">
  <img src="/examples/mobile.gif" alt="mobile demo" />
</div>

For PDF Viewer users, this is a highly useful feature. If your requirement is simple annotation, the current features in the project should suffice. For more specific needs or requirements, you can further develop based on this extension.

## 2. Annotation Tools (Mobile Supported 📱)

1. Rectangle
2. Circle
3. Free Hand (grouped if drawn within a short time)
4. Free Highlight (with auto-correction)
5. Arrow
6. Cloud
7. FreeText 
8. Signature
9. Stamp (upload custom images)
10. Text Highlight
11. Text Strikeout
12. Text Underline
13. Text
14. Annotation Selection (use double-click to delete the selected object)

## 3. Editing existing annotations in PDF files

<strong style="color:red">🚀 Now supports exporting annotations to PDF files.</strong>

1. Square
2. Circle
3. Ink
4. FreeText
5. Line
6. Polygon
7. PolyLine
8. Text
9. Highlight
10. Underline
11. StrikeOut

## 4. Quick Start

### Installation

```bash
 $ npm install or yarn
```

### Run in Development Mode

```bash
  $ npm run dev or yarn dev
```

### Run PDF.js Viewer

A DEMO example is provided in the repository (located in the examples folder). Navigate to ./examples/pdfjs-4.3.136-dist:

```bash
    $ miniserve or use another static server
```

Open the URL: http://localhost:8080/web/viewer.html to see the result.

## 5. Usage

### URL Parameters

```bash
  ae_username= Name of the annotator, displayed as the annotator's name when adding annotations
```
```bash
  ae_get_url= URL for annotation data, used to load previously saved annotation data. Example: ./examples/pdfjs-4.3.136-dist/pdfjs-annotation-extension-testdata.json
```
```bash
  ae_post_url= URL for submitting annotation data
```

```bash
  ae_default_editor_active = true | false  # Whether to activate the editor by default
```

```bash
  ae_default_sidebar_open = true | false   # Whether to open the sidebar by default
```

Usage: http://localhost:8888/web/viewer.html?#ae_username=laomai&ae_get_url=http://localhost:8888/pdfjs-annotation-extension-testdata.json&ae_post_url=http://localhost:8888/save&ae_default_editor_active=true&ae_default_sidebar_open=true

### Default Configuration
```
 src/const/default_options.ts
 ```
To load PDF file annotations, modify:
 ```
  LOAD_PDF_ANNOTATION: true, // Whether to load existing PDF annotations
 ```
 ***Note:If you need to edit existing PDF annotations, you must set annotationMode in PDF.js to 0, so that PDF.js will not render the annotations***
 ```
  pdfjs-dist/web/viewer.mjs
 ```
 ```
  annotationMode: {
    value: 0,  // Change to 0
    kind: OptionKind.VIEWER + OptionKind.PREFERENCE
  }
 ```

### Modify Output Directory

   The configuration can be found in the /configuration/environment.js file. By default, it points to examples/pdfjs-4.3.136-dist/web/pdfjs-annotation-extension. You can modify it to match your local pdfjs-dist directory to facilitate development:

```bash
    output: path.resolve(__dirname, '../examples/pdfjs-4.3.136-dist/web/pdfjs-annotation-extension'),
```

### Build

```bash
    $ npm run build or yarn build
```

Alternatively, you can directly download the release version.

### Integrating with PDF.js

Modify the pdfjs-dist/web/viewer.html file by adding a single line to include the generated extension file:

```html
    <script src="../build/pdf.mjs" type="module"></script>
    <link rel="stylesheet" href="viewer.css">
    <script src="viewer.mjs" type="module"></script>
    <!-- Insert the generated annotation extension file -->
    <script src="./pdfjs-annotation-extension/pdfjs-annotation-extension.js" type="module"></script>
    <!-- End -->
    </head>
```

## 6. How It Works

By leveraging the pdfjs EventBus, we capture page events and dynamically insert a Konva drawing layer. Shapes are drawn on the Konva layer. 
Although there are more annotation types, they are essentially mapped to the ones supported by pdfjs with some additional custom transformations.

For details about pdfjs annotation types, please refer to the documentation here 👇
 https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-annotations

## 7. Compatibility

 Currently, this extension has been tested only with pdfjs-4.3.136-dist.
 **Note that it does not support drawing on rotated pages.**


================================================
FILE: README_CN.md
================================================
⚠️ **InkLayer 生态项目**

本仓库为 InkLayer 的底层参考实现,包含核心批注模型、坐标体系及导出逻辑。

👉 **主入口仓库:** https://github.com/Laomai-codefee/inklayer

---

<div>
    <h1 align="center"><code>pdf.js Annotation Extension</code> ⚡️ </h1>
    <p align="center">
        <strong>基于pdf.js viewer的批注扩展,支持PDF文件原有批注编辑、发表评论、回复、批注数据的提交及载入编辑</strong>
      </p>
    <p align="center">
        <strong>🚀 现已支持批注导出至PDF文件</strong>
    </p>
</div>

---

## 📢 React 版本已发布

### 本项目已正式推出 React 版本实现:

👉 [pdfjs-annotation-extension-for-react](https://github.com/Laomai-codefee/pdfjs-annotation-extension-for-react/)

1. 新项目在继承本仓库核心设计思想(基于 PDF.js 的可扩展批注体系)的基础上,进行了完整的React组件化重构,更适合在现代前端项目中直接集成使用。
2. 如果你正在使用 React,或希望在 React 应用中构建PDF批注能力,强烈建议关注并使用新的 React 版本项目
3. 本仓库将继续作为 底层思路与早期实现的参考,而新的功能与演进将主要在 React 版本中进行。

---

[English](./README.md) | 简体中文

## 🧭 演示

地址: [https://laomai-codefee.github.io/pdfjs-annotation-extension/](https://laomai-codefee.github.io/pdfjs-annotation-extension/)
打开速度较慢,请耐性等待...

---

## 📣 近期更新

* 🔥🔥**2025.6.27  v2.2.0 版本**,主要包含如下内容

1. **增加新的批注类型** - 增加箭头、云线
2. **签名** - 增加输入、上传图片形成签名,输入文字支持字体选择
3. **盖章** - 增加默认印章,自定义印章及上传图片作为印章,自定义印章支持文字颜色、样式、字体、背景、边框设置,时间戳支持用户名、日期及自定义文字
4. **批注状态** - 增加批注状态设置,接受、拒绝、取消、完成、关闭、无
5. **批注导出** - 增加批注 Excel 导出功能
6. **批注样式** - 各批注样式设置,支持颜色、笔触宽度、透明度
7. **连线** - 增加批注与图形间的连线
8. 一些 BUG 修正及交互优化

---

* **2025.5.19  v2.1.1 版本**,主要包含如下内容

1. **支持侧边栏折叠** - 增加 DEFAULT_SIDE_BAR_OPEN 控制侧边栏是否隐藏,默认显示
2. **支持批注过滤** - 增加批注过滤功能,可通过作者、批注类型进行过滤
3. **优化批注加亮逻辑** - 批注即使不选中也会加亮,改善体验

* **2025.5.16  v2.1.0 版本**,主要包含如下内容

1. **支持导出 PDF 功能** - 将所绘制批注导出到新的 PDF 文件,支持批注类型 TEXT、HIGHLIGHT、UNDERLINE、STRIKEOUT、SQUARE、CIRCLE、INK、POLYLINE、FREETEXT、STAMP
2. **签名、盖章** - 增加 ALLOW_REPLY_ON_STAMP 控制是否允许评论、回复,默认关闭
3. **新增 Note 批注工具** - 对应 PDF Text 类型批注

---

## 1、背景

[PDF.js](https://mozilla.github.io/pdf.js/) 已经提供了 [Viewer](https://mozilla.github.io/pdf.js/web/viewer.html) 用于PDF文件的在线预览,并且提供了一部分的批注功能(FREETEXT、HIGHLIGHT、STAMP、INK)。

在实际使用中,需要各种形式的批注工具,逐产生在viewer上扩展做额外批注的想法。

项目基于konva、react、antd、web-highlighter,使用外部引入的方式,不影响 pdfjs viewer 原有代码,增加并扩展了一部分批注类型,支持pdf文件中原有批注的编辑、新增批注数据的提交及加载,效果见下图:

<div align="center">
  <img src="/examples/demo.gif" alt="demo" />
</div>

#### 移动端

<div align="center">
  <img src="/examples/mobile.gif" alt="demo" />
</div>

对PDF Viewer来说,这是一个很有用的功能,如果需求只是简单的批注,项目中的现有功能已经可以直接满足。
如果有更特殊的需求或功能要求,可以在此基础上进一步开发。

## 2、批注工具,已支持移动端 📱

1. 矩形
2. 圆形
3. 自由绘制,一段时间内的绘制会被归为一组
4. 自由高亮,有自动修正
5. 箭头
6. 云线
7. 文字
8. 签名
9. 盖章
10. 文字高亮
11. 文字删除线
12. 文字下划线
13. 注解
14. 选择

## 3、PDF 文件原有批注编辑,支持类型如下

<strong style="color:red">🚀 现已支持批注导出至PDF文件</strong>

1. 矩形 Square
2. 圆形 Circle
3. 自由绘制 Ink
4. 文字 FreeText
5. 线段 Line
6. 多边形 Polygon
7. 折线 PolyLine
8. 备注 Text
9. 高亮 Highlight
10. 下划线 Underline
11. 删除线 StrikeOut
12. 注解 Note

## 4、快速开始

### 初始化

```bash
$ npm install 或 yarn
```

### 运行开发模式

```bash
$ npm run dev 或 yarn dev
```

### 查看效果pdfjs viewer 效果

仓库自带了一个 DEMO 示例(在examples文件夹中, 进入 ./examples/pdfjs-4.3.136-dist 目录

```bash
$ miniserve 或其他静态服务
```

打开地址:http://localhost:8080/web/viewer.html 即可看到效果

## 5、使用方式

### 地址栏参数

```bash
ae_username= 批注人姓名,添加批注时显示的批注人姓名
```

```bash
ae_get_url= 批注数据地址,通过此地址加载已保存的批注数据 示例 ./examples/pdfjs-4.3.136-dist/pdfjs-annotation-extension-testdata.json
```

```bash
ae_post_url= 批注数据提交地址
```

```bash
ae_default_editor_active= true | false 是否激活编辑器
```

```bash
ae_default_sidebar_open= true | false 是否打开侧边栏
```

使用方式 : http://localhost:8888/web/viewer.html?#ae_username=老麦&ae_get_url=http://localhost:8888/pdfjs-annotation-extension-testdata.json&ae_post_url=http://localhost:8888/save&ae_default_editor_active=true&ae_default_sidebar_open=true

### 默认配置修改

```
src/const/default_options.ts
```

加载PDF文件批注,需修改:

```
LOAD_PDF_ANNOTATION: true, // 是否加载 pdf 原有批注
```

***注意: 如果需要编辑 pdf 原有批注,需将 pdfjs 中的 annotationMode 改为 0,这样 pdfjs 才不会渲染批注***

```
pdfjs-dist/web/viewer.mjs
```

```
annotationMode: {
   value: 0,  //这里改为 0
   kind: OptionKind.VIEWER + OptionKind.PREFERENCE
 },
```

### 修改生成文件地址

配置在文件:/configuration/environment.js 中
默认为 examples/pdfjs-4.3.136-dist/web/pdfjs-annotation-extension
您可将它修改为您pdfjs dist地址,以方便开发

```bash
output: path.resolve(__dirname, '../examples/pdfjs-4.3.136-dist/web/pdfjs-annotation-extension'),
```

### 打包

```bash
$ npm run build 或 yarn build
```

也可以直接下载发布版本

### pdfjs dist 引入扩展

修改文件:pdfjs-dist/web/viewer.html,只需增加一行代码,引入生成的文件即可

```html
<script src="../build/pdf.mjs" type="module"></script>
    <link rel="stylesheet" href="viewer.css">
    <script src="viewer.mjs" type="module"></script>
    <!--这里引入生成的文件-->
    <script src="./pdfjs-annotation-extension/pdfjs-annotation-extension.js" type="module"></script>
    <!--这里引入生成的文件-->
  </head>
```

## 6、工作原理

利用pdfjs EventBus捕获页面事件,动态插入Konva绘图层,在Konva上绘制图形
批注类型虽然看上去多了,但实际支持与pdfjs一致,只是做了一些特殊的转换。
关于 pdfjs 批注类型的说明请看这里 👇
https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-annotations

## 7、兼容性

目前仅测试 pdfjs-4.3.136-dist, 不支持页面旋转后的绘制



================================================
FILE: configuration/environment.js
================================================
const path = require('path');
const { output } = require('../webpack.config');

module.exports = {
  paths: {
    /* Path to source files directory */
    source: path.resolve(__dirname, '../src/'),
    /* Path to built files directory */
    output: path.resolve(__dirname, '../examples/pdfjs-4.3.136-dist/web/pdfjs-annotation-extension'),
  }
};


================================================
FILE: configuration/webpack.dev.config.js
================================================
/* eslint-disable import/no-extraneous-dependencies */
const { merge } = require('webpack-merge');

const webpackConfiguration = require('../webpack.config');
const environment = require('./environment');

module.exports = merge(webpackConfiguration, {
  mode: 'development',

  /* Manage source maps generation process */
  devtool: 'eval-source-map',

  /* File watcher options */
  watchOptions: {
    aggregateTimeout: 100,
    poll: 100,
    ignored: /node_modules/,
  },

  /* Additional plugins configuration */
  plugins: [],
});


================================================
FILE: configuration/webpack.prod.config.js
================================================
/* eslint-disable import/no-extraneous-dependencies */
const { merge } = require('webpack-merge');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const webpack = require('webpack');

const webpackConfiguration = require('../webpack.config');

module.exports = merge(webpackConfiguration, {
  mode: 'production',

  /* Disable source maps for production */
  devtool: false,

  /* Optimization configuration */
  optimization: {
    minimize: true,
    minimizer: [
      new TerserPlugin({
        parallel: true, // Enable multi-process parallel running
        terserOptions: {
          format: {
            comments: false, // Remove all comments from the output
          },
        },
        extractComments: false, // Ensure no separate license files are generated
      }),
      new CssMinimizerPlugin(),
    ],
  },

  /* Performance thresholds configuration */
  performance: {
    hints: false, // Disable performance hints
    maxEntrypointSize: 1024000, // Set a higher limit to avoid warnings (1 MB)
    maxAssetSize: 1024000, // Set a higher limit to avoid warnings (1 MB)
  },

  /* Additional plugins configuration */
  plugins: [
    // Use the BannerPlugin to ensure no license comments are included in the output
    new webpack.BannerPlugin({
      banner: '', // Insert an empty banner
      raw: true, // Insert the banner as a raw string
    }),
  ],
});


================================================
FILE: examples/pdfjs-4.3.136-dist/LICENSE
================================================

                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS


================================================
FILE: examples/pdfjs-4.3.136-dist/build/pdf.mjs
================================================
/**
 * @licstart The following is the entire license notice for the
 * JavaScript code in this page
 *
 * Copyright 2023 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
 */

/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/ 
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ 	// define getter functions for harmony exports
/******/ 	__webpack_require__.d = (exports, definition) => {
/******/ 		for(var key in definition) {
/******/ 			if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 				Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 			}
/******/ 		}
/******/ 	};
/******/ })();
/******/ 
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ 	__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/ 
/************************************************************************/
var __webpack_exports__ = globalThis.pdfjsLib = {};

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  AbortException: () => (/* reexport */ AbortException),
  AnnotationEditorLayer: () => (/* reexport */ AnnotationEditorLayer),
  AnnotationEditorParamsType: () => (/* reexport */ AnnotationEditorParamsType),
  AnnotationEditorType: () => (/* reexport */ AnnotationEditorType),
  AnnotationEditorUIManager: () => (/* reexport */ AnnotationEditorUIManager),
  AnnotationLayer: () => (/* reexport */ AnnotationLayer),
  AnnotationMode: () => (/* reexport */ AnnotationMode),
  CMapCompressionType: () => (/* reexport */ CMapCompressionType),
  ColorPicker: () => (/* reexport */ ColorPicker),
  DOMSVGFactory: () => (/* reexport */ DOMSVGFactory),
  DrawLayer: () => (/* reexport */ DrawLayer),
  FeatureTest: () => (/* reexport */ util_FeatureTest),
  GlobalWorkerOptions: () => (/* reexport */ GlobalWorkerOptions),
  ImageKind: () => (/* reexport */ util_ImageKind),
  InvalidPDFException: () => (/* reexport */ InvalidPDFException),
  MissingPDFException: () => (/* reexport */ MissingPDFException),
  OPS: () => (/* reexport */ OPS),
  Outliner: () => (/* reexport */ Outliner),
  PDFDataRangeTransport: () => (/* reexport */ PDFDataRangeTransport),
  PDFDateString: () => (/* reexport */ PDFDateString),
  PDFWorker: () => (/* reexport */ PDFWorker),
  PasswordResponses: () => (/* reexport */ PasswordResponses),
  PermissionFlag: () => (/* reexport */ PermissionFlag),
  PixelsPerInch: () => (/* reexport */ PixelsPerInch),
  RenderingCancelledException: () => (/* reexport */ RenderingCancelledException),
  TextLayer: () => (/* reexport */ TextLayer),
  UnexpectedResponseException: () => (/* reexport */ UnexpectedResponseException),
  Util: () => (/* reexport */ Util),
  VerbosityLevel: () => (/* reexport */ VerbosityLevel),
  XfaLayer: () => (/* reexport */ XfaLayer),
  build: () => (/* reexport */ build),
  createValidAbsoluteUrl: () => (/* reexport */ createValidAbsoluteUrl),
  fetchData: () => (/* reexport */ fetchData),
  getDocument: () => (/* reexport */ getDocument),
  getFilenameFromUrl: () => (/* reexport */ getFilenameFromUrl),
  getPdfFilenameFromUrl: () => (/* reexport */ getPdfFilenameFromUrl),
  getXfaPageViewport: () => (/* reexport */ getXfaPageViewport),
  isDataScheme: () => (/* reexport */ isDataScheme),
  isPdfFile: () => (/* reexport */ isPdfFile),
  noContextMenu: () => (/* reexport */ noContextMenu),
  normalizeUnicode: () => (/* reexport */ normalizeUnicode),
  renderTextLayer: () => (/* reexport */ renderTextLayer),
  setLayerDimensions: () => (/* reexport */ setLayerDimensions),
  shadow: () => (/* reexport */ shadow),
  updateTextLayer: () => (/* reexport */ updateTextLayer),
  version: () => (/* reexport */ version)
});

;// CONCATENATED MODULE: ./src/shared/util.js
const isNodeJS = typeof process === "object" && process + "" === "[object process]" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== "browser");
const IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0];
const FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];
const MAX_IMAGE_SIZE_TO_CACHE = 10e6;
const LINE_FACTOR = 1.35;
const LINE_DESCENT_FACTOR = 0.35;
const BASELINE_FACTOR = LINE_DESCENT_FACTOR / LINE_FACTOR;
const RenderingIntentFlag = {
  ANY: 0x01,
  DISPLAY: 0x02,
  PRINT: 0x04,
  SAVE: 0x08,
  ANNOTATIONS_FORMS: 0x10,
  ANNOTATIONS_STORAGE: 0x20,
  ANNOTATIONS_DISABLE: 0x40,
  OPLIST: 0x100
};
const AnnotationMode = {
  DISABLE: 0,
  ENABLE: 1,
  ENABLE_FORMS: 2,
  ENABLE_STORAGE: 3
};
const AnnotationEditorPrefix = "pdfjs_internal_editor_";
const AnnotationEditorType = {
  DISABLE: -1,
  NONE: 0,
  FREETEXT: 3,
  HIGHLIGHT: 9,
  STAMP: 13,
  INK: 15
};
const AnnotationEditorParamsType = {
  RESIZE: 1,
  CREATE: 2,
  FREETEXT_SIZE: 11,
  FREETEXT_COLOR: 12,
  FREETEXT_OPACITY: 13,
  INK_COLOR: 21,
  INK_THICKNESS: 22,
  INK_OPACITY: 23,
  HIGHLIGHT_COLOR: 31,
  HIGHLIGHT_DEFAULT_COLOR: 32,
  HIGHLIGHT_THICKNESS: 33,
  HIGHLIGHT_FREE: 34,
  HIGHLIGHT_SHOW_ALL: 35
};
const PermissionFlag = {
  PRINT: 0x04,
  MODIFY_CONTENTS: 0x08,
  COPY: 0x10,
  MODIFY_ANNOTATIONS: 0x20,
  FILL_INTERACTIVE_FORMS: 0x100,
  COPY_FOR_ACCESSIBILITY: 0x200,
  ASSEMBLE: 0x400,
  PRINT_HIGH_QUALITY: 0x800
};
const TextRenderingMode = {
  FILL: 0,
  STROKE: 1,
  FILL_STROKE: 2,
  INVISIBLE: 3,
  FILL_ADD_TO_PATH: 4,
  STROKE_ADD_TO_PATH: 5,
  FILL_STROKE_ADD_TO_PATH: 6,
  ADD_TO_PATH: 7,
  FILL_STROKE_MASK: 3,
  ADD_TO_PATH_FLAG: 4
};
const util_ImageKind = {
  GRAYSCALE_1BPP: 1,
  RGB_24BPP: 2,
  RGBA_32BPP: 3
};
const AnnotationType = {
  TEXT: 1,
  LINK: 2,
  FREETEXT: 3,
  LINE: 4,
  SQUARE: 5,
  CIRCLE: 6,
  POLYGON: 7,
  POLYLINE: 8,
  HIGHLIGHT: 9,
  UNDERLINE: 10,
  SQUIGGLY: 11,
  STRIKEOUT: 12,
  STAMP: 13,
  CARET: 14,
  INK: 15,
  POPUP: 16,
  FILEATTACHMENT: 17,
  SOUND: 18,
  MOVIE: 19,
  WIDGET: 20,
  SCREEN: 21,
  PRINTERMARK: 22,
  TRAPNET: 23,
  WATERMARK: 24,
  THREED: 25,
  REDACT: 26
};
const AnnotationReplyType = {
  GROUP: "Group",
  REPLY: "R"
};
const AnnotationFlag = {
  INVISIBLE: 0x01,
  HIDDEN: 0x02,
  PRINT: 0x04,
  NOZOOM: 0x08,
  NOROTATE: 0x10,
  NOVIEW: 0x20,
  READONLY: 0x40,
  LOCKED: 0x80,
  TOGGLENOVIEW: 0x100,
  LOCKEDCONTENTS: 0x200
};
const AnnotationFieldFlag = {
  READONLY: 0x0000001,
  REQUIRED: 0x0000002,
  NOEXPORT: 0x0000004,
  MULTILINE: 0x0001000,
  PASSWORD: 0x0002000,
  NOTOGGLETOOFF: 0x0004000,
  RADIO: 0x0008000,
  PUSHBUTTON: 0x0010000,
  COMBO: 0x0020000,
  EDIT: 0x0040000,
  SORT: 0x0080000,
  FILESELECT: 0x0100000,
  MULTISELECT: 0x0200000,
  DONOTSPELLCHECK: 0x0400000,
  DONOTSCROLL: 0x0800000,
  COMB: 0x1000000,
  RICHTEXT: 0x2000000,
  RADIOSINUNISON: 0x2000000,
  COMMITONSELCHANGE: 0x4000000
};
const AnnotationBorderStyleType = {
  SOLID: 1,
  DASHED: 2,
  BEVELED: 3,
  INSET: 4,
  UNDERLINE: 5
};
const AnnotationActionEventType = {
  E: "Mouse Enter",
  X: "Mouse Exit",
  D: "Mouse Down",
  U: "Mouse Up",
  Fo: "Focus",
  Bl: "Blur",
  PO: "PageOpen",
  PC: "PageClose",
  PV: "PageVisible",
  PI: "PageInvisible",
  K: "Keystroke",
  F: "Format",
  V: "Validate",
  C: "Calculate"
};
const DocumentActionEventType = {
  WC: "WillClose",
  WS: "WillSave",
  DS: "DidSave",
  WP: "WillPrint",
  DP: "DidPrint"
};
const PageActionEventType = {
  O: "PageOpen",
  C: "PageClose"
};
const VerbosityLevel = {
  ERRORS: 0,
  WARNINGS: 1,
  INFOS: 5
};
const CMapCompressionType = {
  NONE: 0,
  BINARY: 1
};
const OPS = {
  dependency: 1,
  setLineWidth: 2,
  setLineCap: 3,
  setLineJoin: 4,
  setMiterLimit: 5,
  setDash: 6,
  setRenderingIntent: 7,
  setFlatness: 8,
  setGState: 9,
  save: 10,
  restore: 11,
  transform: 12,
  moveTo: 13,
  lineTo: 14,
  curveTo: 15,
  curveTo2: 16,
  curveTo3: 17,
  closePath: 18,
  rectangle: 19,
  stroke: 20,
  closeStroke: 21,
  fill: 22,
  eoFill: 23,
  fillStroke: 24,
  eoFillStroke: 25,
  closeFillStroke: 26,
  closeEOFillStroke: 27,
  endPath: 28,
  clip: 29,
  eoClip: 30,
  beginText: 31,
  endText: 32,
  setCharSpacing: 33,
  setWordSpacing: 34,
  setHScale: 35,
  setLeading: 36,
  setFont: 37,
  setTextRenderingMode: 38,
  setTextRise: 39,
  moveText: 40,
  setLeadingMoveText: 41,
  setTextMatrix: 42,
  nextLine: 43,
  showText: 44,
  showSpacedText: 45,
  nextLineShowText: 46,
  nextLineSetSpacingShowText: 47,
  setCharWidth: 48,
  setCharWidthAndBounds: 49,
  setStrokeColorSpace: 50,
  setFillColorSpace: 51,
  setStrokeColor: 52,
  setStrokeColorN: 53,
  setFillColor: 54,
  setFillColorN: 55,
  setStrokeGray: 56,
  setFillGray: 57,
  setStrokeRGBColor: 58,
  setFillRGBColor: 59,
  setStrokeCMYKColor: 60,
  setFillCMYKColor: 61,
  shadingFill: 62,
  beginInlineImage: 63,
  beginImageData: 64,
  endInlineImage: 65,
  paintXObject: 66,
  markPoint: 67,
  markPointProps: 68,
  beginMarkedContent: 69,
  beginMarkedContentProps: 70,
  endMarkedContent: 71,
  beginCompat: 72,
  endCompat: 73,
  paintFormXObjectBegin: 74,
  paintFormXObjectEnd: 75,
  beginGroup: 76,
  endGroup: 77,
  beginAnnotation: 80,
  endAnnotation: 81,
  paintImageMaskXObject: 83,
  paintImageMaskXObjectGroup: 84,
  paintImageXObject: 85,
  paintInlineImageXObject: 86,
  paintInlineImageXObjectGroup: 87,
  paintImageXObjectRepeat: 88,
  paintImageMaskXObjectRepeat: 89,
  paintSolidColorImageMask: 90,
  constructPath: 91
};
const PasswordResponses = {
  NEED_PASSWORD: 1,
  INCORRECT_PASSWORD: 2
};
let verbosity = VerbosityLevel.WARNINGS;
function setVerbosityLevel(level) {
  if (Number.isInteger(level)) {
    verbosity = level;
  }
}
function getVerbosityLevel() {
  return verbosity;
}
function info(msg) {
  if (verbosity >= VerbosityLevel.INFOS) {
    console.log(`Info: ${msg}`);
  }
}
function warn(msg) {
  if (verbosity >= VerbosityLevel.WARNINGS) {
    console.log(`Warning: ${msg}`);
  }
}
function unreachable(msg) {
  throw new Error(msg);
}
function assert(cond, msg) {
  if (!cond) {
    unreachable(msg);
  }
}
function _isValidProtocol(url) {
  switch (url?.protocol) {
    case "http:":
    case "https:":
    case "ftp:":
    case "mailto:":
    case "tel:":
      return true;
    default:
      return false;
  }
}
function createValidAbsoluteUrl(url, baseUrl = null, options = null) {
  if (!url) {
    return null;
  }
  try {
    if (options && typeof url === "string") {
      if (options.addDefaultProtocol && url.startsWith("www.")) {
        const dots = url.match(/\./g);
        if (dots?.length >= 2) {
          url = `http://${url}`;
        }
      }
      if (options.tryConvertEncoding) {
        try {
          url = stringToUTF8String(url);
        } catch {}
      }
    }
    const absoluteUrl = baseUrl ? new URL(url, baseUrl) : new URL(url);
    if (_isValidProtocol(absoluteUrl)) {
      return absoluteUrl;
    }
  } catch {}
  return null;
}
function shadow(obj, prop, value, nonSerializable = false) {
  Object.defineProperty(obj, prop, {
    value,
    enumerable: !nonSerializable,
    configurable: true,
    writable: false
  });
  return value;
}
const BaseException = function BaseExceptionClosure() {
  function BaseException(message, name) {
    if (this.constructor === BaseException) {
      unreachable("Cannot initialize BaseException.");
    }
    this.message = message;
    this.name = name;
  }
  BaseException.prototype = new Error();
  BaseException.constructor = BaseException;
  return BaseException;
}();
class PasswordException extends BaseException {
  constructor(msg, code) {
    super(msg, "PasswordException");
    this.code = code;
  }
}
class UnknownErrorException extends BaseException {
  constructor(msg, details) {
    super(msg, "UnknownErrorException");
    this.details = details;
  }
}
class InvalidPDFException extends BaseException {
  constructor(msg) {
    super(msg, "InvalidPDFException");
  }
}
class MissingPDFException extends BaseException {
  constructor(msg) {
    super(msg, "MissingPDFException");
  }
}
class UnexpectedResponseException extends BaseException {
  constructor(msg, status) {
    super(msg, "UnexpectedResponseException");
    this.status = status;
  }
}
class FormatError extends BaseException {
  constructor(msg) {
    super(msg, "FormatError");
  }
}
class AbortException extends BaseException {
  constructor(msg) {
    super(msg, "AbortException");
  }
}
function bytesToString(bytes) {
  if (typeof bytes !== "object" || bytes?.length === undefined) {
    unreachable("Invalid argument for bytesToString");
  }
  const length = bytes.length;
  const MAX_ARGUMENT_COUNT = 8192;
  if (length < MAX_ARGUMENT_COUNT) {
    return String.fromCharCode.apply(null, bytes);
  }
  const strBuf = [];
  for (let i = 0; i < length; i += MAX_ARGUMENT_COUNT) {
    const chunkEnd = Math.min(i + MAX_ARGUMENT_COUNT, length);
    const chunk = bytes.subarray(i, chunkEnd);
    strBuf.push(String.fromCharCode.apply(null, chunk));
  }
  return strBuf.join("");
}
function stringToBytes(str) {
  if (typeof str !== "string") {
    unreachable("Invalid argument for stringToBytes");
  }
  const length = str.length;
  const bytes = new Uint8Array(length);
  for (let i = 0; i < length; ++i) {
    bytes[i] = str.charCodeAt(i) & 0xff;
  }
  return bytes;
}
function string32(value) {
  return String.fromCharCode(value >> 24 & 0xff, value >> 16 & 0xff, value >> 8 & 0xff, value & 0xff);
}
function objectSize(obj) {
  return Object.keys(obj).length;
}
function objectFromMap(map) {
  const obj = Object.create(null);
  for (const [key, value] of map) {
    obj[key] = value;
  }
  return obj;
}
function isLittleEndian() {
  const buffer8 = new Uint8Array(4);
  buffer8[0] = 1;
  const view32 = new Uint32Array(buffer8.buffer, 0, 1);
  return view32[0] === 1;
}
function isEvalSupported() {
  try {
    new Function("");
    return true;
  } catch {
    return false;
  }
}
class util_FeatureTest {
  static get isLittleEndian() {
    return shadow(this, "isLittleEndian", isLittleEndian());
  }
  static get isEvalSupported() {
    return shadow(this, "isEvalSupported", isEvalSupported());
  }
  static get isOffscreenCanvasSupported() {
    return shadow(this, "isOffscreenCanvasSupported", typeof OffscreenCanvas !== "undefined");
  }
  static get platform() {
    if (typeof navigator !== "undefined" && typeof navigator?.platform === "string") {
      return shadow(this, "platform", {
        isMac: navigator.platform.includes("Mac")
      });
    }
    return shadow(this, "platform", {
      isMac: false
    });
  }
  static get isCSSRoundSupported() {
    return shadow(this, "isCSSRoundSupported", globalThis.CSS?.supports?.("width: round(1.5px, 1px)"));
  }
}
const hexNumbers = Array.from(Array(256).keys(), n => n.toString(16).padStart(2, "0"));
class Util {
  static makeHexColor(r, g, b) {
    return `#${hexNumbers[r]}${hexNumbers[g]}${hexNumbers[b]}`;
  }
  static scaleMinMax(transform, minMax) {
    let temp;
    if (transform[0]) {
      if (transform[0] < 0) {
        temp = minMax[0];
        minMax[0] = minMax[2];
        minMax[2] = temp;
      }
      minMax[0] *= transform[0];
      minMax[2] *= transform[0];
      if (transform[3] < 0) {
        temp = minMax[1];
        minMax[1] = minMax[3];
        minMax[3] = temp;
      }
      minMax[1] *= transform[3];
      minMax[3] *= transform[3];
    } else {
      temp = minMax[0];
      minMax[0] = minMax[1];
      minMax[1] = temp;
      temp = minMax[2];
      minMax[2] = minMax[3];
      minMax[3] = temp;
      if (transform[1] < 0) {
        temp = minMax[1];
        minMax[1] = minMax[3];
        minMax[3] = temp;
      }
      minMax[1] *= transform[1];
      minMax[3] *= transform[1];
      if (transform[2] < 0) {
        temp = minMax[0];
        minMax[0] = minMax[2];
        minMax[2] = temp;
      }
      minMax[0] *= transform[2];
      minMax[2] *= transform[2];
    }
    minMax[0] += transform[4];
    minMax[1] += transform[5];
    minMax[2] += transform[4];
    minMax[3] += transform[5];
  }
  static transform(m1, m2) {
    return [m1[0] * m2[0] + m1[2] * m2[1], m1[1] * m2[0] + m1[3] * m2[1], m1[0] * m2[2] + m1[2] * m2[3], m1[1] * m2[2] + m1[3] * m2[3], m1[0] * m2[4] + m1[2] * m2[5] + m1[4], m1[1] * m2[4] + m1[3] * m2[5] + m1[5]];
  }
  static applyTransform(p, m) {
    const xt = p[0] * m[0] + p[1] * m[2] + m[4];
    const yt = p[0] * m[1] + p[1] * m[3] + m[5];
    return [xt, yt];
  }
  static applyInverseTransform(p, m) {
    const d = m[0] * m[3] - m[1] * m[2];
    const xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d;
    const yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d;
    return [xt, yt];
  }
  static getAxialAlignedBoundingBox(r, m) {
    const p1 = this.applyTransform(r, m);
    const p2 = this.applyTransform(r.slice(2, 4), m);
    const p3 = this.applyTransform([r[0], r[3]], m);
    const p4 = this.applyTransform([r[2], r[1]], m);
    return [Math.min(p1[0], p2[0], p3[0], p4[0]), Math.min(p1[1], p2[1], p3[1], p4[1]), Math.max(p1[0], p2[0], p3[0], p4[0]), Math.max(p1[1], p2[1], p3[1], p4[1])];
  }
  static inverseTransform(m) {
    const d = m[0] * m[3] - m[1] * m[2];
    return [m[3] / d, -m[1] / d, -m[2] / d, m[0] / d, (m[2] * m[5] - m[4] * m[3]) / d, (m[4] * m[1] - m[5] * m[0]) / d];
  }
  static singularValueDecompose2dScale(m) {
    const transpose = [m[0], m[2], m[1], m[3]];
    const a = m[0] * transpose[0] + m[1] * transpose[2];
    const b = m[0] * transpose[1] + m[1] * transpose[3];
    const c = m[2] * transpose[0] + m[3] * transpose[2];
    const d = m[2] * transpose[1] + m[3] * transpose[3];
    const first = (a + d) / 2;
    const second = Math.sqrt((a + d) ** 2 - 4 * (a * d - c * b)) / 2;
    const sx = first + second || 1;
    const sy = first - second || 1;
    return [Math.sqrt(sx), Math.sqrt(sy)];
  }
  static normalizeRect(rect) {
    const r = rect.slice(0);
    if (rect[0] > rect[2]) {
      r[0] = rect[2];
      r[2] = rect[0];
    }
    if (rect[1] > rect[3]) {
      r[1] = rect[3];
      r[3] = rect[1];
    }
    return r;
  }
  static intersect(rect1, rect2) {
    const xLow = Math.max(Math.min(rect1[0], rect1[2]), Math.min(rect2[0], rect2[2]));
    const xHigh = Math.min(Math.max(rect1[0], rect1[2]), Math.max(rect2[0], rect2[2]));
    if (xLow > xHigh) {
      return null;
    }
    const yLow = Math.max(Math.min(rect1[1], rect1[3]), Math.min(rect2[1], rect2[3]));
    const yHigh = Math.min(Math.max(rect1[1], rect1[3]), Math.max(rect2[1], rect2[3]));
    if (yLow > yHigh) {
      return null;
    }
    return [xLow, yLow, xHigh, yHigh];
  }
  static #getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, t, minMax) {
    if (t <= 0 || t >= 1) {
      return;
    }
    const mt = 1 - t;
    const tt = t * t;
    const ttt = tt * t;
    const x = mt * (mt * (mt * x0 + 3 * t * x1) + 3 * tt * x2) + ttt * x3;
    const y = mt * (mt * (mt * y0 + 3 * t * y1) + 3 * tt * y2) + ttt * y3;
    minMax[0] = Math.min(minMax[0], x);
    minMax[1] = Math.min(minMax[1], y);
    minMax[2] = Math.max(minMax[2], x);
    minMax[3] = Math.max(minMax[3], y);
  }
  static #getExtremum(x0, x1, x2, x3, y0, y1, y2, y3, a, b, c, minMax) {
    if (Math.abs(a) < 1e-12) {
      if (Math.abs(b) >= 1e-12) {
        this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, -c / b, minMax);
      }
      return;
    }
    const delta = b ** 2 - 4 * c * a;
    if (delta < 0) {
      return;
    }
    const sqrtDelta = Math.sqrt(delta);
    const a2 = 2 * a;
    this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, (-b + sqrtDelta) / a2, minMax);
    this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, (-b - sqrtDelta) / a2, minMax);
  }
  static bezierBoundingBox(x0, y0, x1, y1, x2, y2, x3, y3, minMax) {
    if (minMax) {
      minMax[0] = Math.min(minMax[0], x0, x3);
      minMax[1] = Math.min(minMax[1], y0, y3);
      minMax[2] = Math.max(minMax[2], x0, x3);
      minMax[3] = Math.max(minMax[3], y0, y3);
    } else {
      minMax = [Math.min(x0, x3), Math.min(y0, y3), Math.max(x0, x3), Math.max(y0, y3)];
    }
    this.#getExtremum(x0, x1, x2, x3, y0, y1, y2, y3, 3 * (-x0 + 3 * (x1 - x2) + x3), 6 * (x0 - 2 * x1 + x2), 3 * (x1 - x0), minMax);
    this.#getExtremum(x0, x1, x2, x3, y0, y1, y2, y3, 3 * (-y0 + 3 * (y1 - y2) + y3), 6 * (y0 - 2 * y1 + y2), 3 * (y1 - y0), minMax);
    return minMax;
  }
}
const PDFStringTranslateTable = (/* unused pure expression or super */ null && ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2d8, 0x2c7, 0x2c6, 0x2d9, 0x2dd, 0x2db, 0x2da, 0x2dc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014, 0x2013, 0x192, 0x2044, 0x2039, 0x203a, 0x2212, 0x2030, 0x201e, 0x201c, 0x201d, 0x2018, 0x2019, 0x201a, 0x2122, 0xfb01, 0xfb02, 0x141, 0x152, 0x160, 0x178, 0x17d, 0x131, 0x142, 0x153, 0x161, 0x17e, 0, 0x20ac]));
function stringToPDFString(str) {
  if (str[0] >= "\xEF") {
    let encoding;
    if (str[0] === "\xFE" && str[1] === "\xFF") {
      encoding = "utf-16be";
      if (str.length % 2 === 1) {
        str = str.slice(0, -1);
      }
    } else if (str[0] === "\xFF" && str[1] === "\xFE") {
      encoding = "utf-16le";
      if (str.length % 2 === 1) {
        str = str.slice(0, -1);
      }
    } else if (str[0] === "\xEF" && str[1] === "\xBB" && str[2] === "\xBF") {
      encoding = "utf-8";
    }
    if (encoding) {
      try {
        const decoder = new TextDecoder(encoding, {
          fatal: true
        });
        const buffer = stringToBytes(str);
        const decoded = decoder.decode(buffer);
        if (!decoded.includes("\x1b")) {
          return decoded;
        }
        return decoded.replaceAll(/\x1b[^\x1b]*(?:\x1b|$)/g, "");
      } catch (ex) {
        warn(`stringToPDFString: "${ex}".`);
      }
    }
  }
  const strBuf = [];
  for (let i = 0, ii = str.length; i < ii; i++) {
    const charCode = str.charCodeAt(i);
    if (charCode === 0x1b) {
      while (++i < ii && str.charCodeAt(i) !== 0x1b) {}
      continue;
    }
    const code = PDFStringTranslateTable[charCode];
    strBuf.push(code ? String.fromCharCode(code) : str.charAt(i));
  }
  return strBuf.join("");
}
function stringToUTF8String(str) {
  return decodeURIComponent(escape(str));
}
function utf8StringToString(str) {
  return unescape(encodeURIComponent(str));
}
function isArrayEqual(arr1, arr2) {
  if (arr1.length !== arr2.length) {
    return false;
  }
  for (let i = 0, ii = arr1.length; i < ii; i++) {
    if (arr1[i] !== arr2[i]) {
      return false;
    }
  }
  return true;
}
function getModificationDate(date = new Date()) {
  const buffer = [date.getUTCFullYear().toString(), (date.getUTCMonth() + 1).toString().padStart(2, "0"), date.getUTCDate().toString().padStart(2, "0"), date.getUTCHours().toString().padStart(2, "0"), date.getUTCMinutes().toString().padStart(2, "0"), date.getUTCSeconds().toString().padStart(2, "0")];
  return buffer.join("");
}
let NormalizeRegex = null;
let NormalizationMap = null;
function normalizeUnicode(str) {
  if (!NormalizeRegex) {
    NormalizeRegex = /([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu;
    NormalizationMap = new Map([["ſt", "ſt"]]);
  }
  return str.replaceAll(NormalizeRegex, (_, p1, p2) => p1 ? p1.normalize("NFKC") : NormalizationMap.get(p2));
}
function getUuid() {
  if (typeof crypto !== "undefined" && typeof crypto?.randomUUID === "function") {
    return crypto.randomUUID();
  }
  const buf = new Uint8Array(32);
  if (typeof crypto !== "undefined" && typeof crypto?.getRandomValues === "function") {
    crypto.getRandomValues(buf);
  } else {
    for (let i = 0; i < 32; i++) {
      buf[i] = Math.floor(Math.random() * 255);
    }
  }
  return bytesToString(buf);
}
const AnnotationPrefix = "pdfjs_internal_id_";
const FontRenderOps = {
  BEZIER_CURVE_TO: 0,
  MOVE_TO: 1,
  LINE_TO: 2,
  QUADRATIC_CURVE_TO: 3,
  RESTORE: 4,
  SAVE: 5,
  SCALE: 6,
  TRANSFORM: 7,
  TRANSLATE: 8
};

;// CONCATENATED MODULE: ./src/display/base_factory.js

class BaseFilterFactory {
  constructor() {
    if (this.constructor === BaseFilterFactory) {
      unreachable("Cannot initialize BaseFilterFactory.");
    }
  }
  addFilter(maps) {
    return "none";
  }
  addHCMFilter(fgColor, bgColor) {
    return "none";
  }
  addAlphaFilter(map) {
    return "none";
  }
  addLuminosityFilter(map) {
    return "none";
  }
  addHighlightHCMFilter(filterName, fgColor, bgColor, newFgColor, newBgColor) {
    return "none";
  }
  destroy(keepHCM = false) {}
}
class BaseCanvasFactory {
  constructor() {
    if (this.constructor === BaseCanvasFactory) {
      unreachable("Cannot initialize BaseCanvasFactory.");
    }
  }
  create(width, height) {
    if (width <= 0 || height <= 0) {
      throw new Error("Invalid canvas size");
    }
    const canvas = this._createCanvas(width, height);
    return {
      canvas,
      context: canvas.getContext("2d")
    };
  }
  reset(canvasAndContext, width, height) {
    if (!canvasAndContext.canvas) {
      throw new Error("Canvas is not specified");
    }
    if (width <= 0 || height <= 0) {
      throw new Error("Invalid canvas size");
    }
    canvasAndContext.canvas.width = width;
    canvasAndContext.canvas.height = height;
  }
  destroy(canvasAndContext) {
    if (!canvasAndContext.canvas) {
      throw new Error("Canvas is not specified");
    }
    canvasAndContext.canvas.width = 0;
    canvasAndContext.canvas.height = 0;
    canvasAndContext.canvas = null;
    canvasAndContext.context = null;
  }
  _createCanvas(width, height) {
    unreachable("Abstract method `_createCanvas` called.");
  }
}
class BaseCMapReaderFactory {
  constructor({
    baseUrl = null,
    isCompressed = true
  }) {
    if (this.constructor === BaseCMapReaderFactory) {
      unreachable("Cannot initialize BaseCMapReaderFactory.");
    }
    this.baseUrl = baseUrl;
    this.isCompressed = isCompressed;
  }
  async fetch({
    name
  }) {
    if (!this.baseUrl) {
      throw new Error('The CMap "baseUrl" parameter must be specified, ensure that ' + 'the "cMapUrl" and "cMapPacked" API parameters are provided.');
    }
    if (!name) {
      throw new Error("CMap name must be specified.");
    }
    const url = this.baseUrl + name + (this.isCompressed ? ".bcmap" : "");
    const compressionType = this.isCompressed ? CMapCompressionType.BINARY : CMapCompressionType.NONE;
    return this._fetchData(url, compressionType).catch(reason => {
      throw new Error(`Unable to load ${this.isCompressed ? "binary " : ""}CMap at: ${url}`);
    });
  }
  _fetchData(url, compressionType) {
    unreachable("Abstract method `_fetchData` called.");
  }
}
class BaseStandardFontDataFactory {
  constructor({
    baseUrl = null
  }) {
    if (this.constructor === BaseStandardFontDataFactory) {
      unreachable("Cannot initialize BaseStandardFontDataFactory.");
    }
    this.baseUrl = baseUrl;
  }
  async fetch({
    filename
  }) {
    if (!this.baseUrl) {
      throw new Error('The standard font "baseUrl" parameter must be specified, ensure that ' + 'the "standardFontDataUrl" API parameter is provided.');
    }
    if (!filename) {
      throw new Error("Font filename must be specified.");
    }
    const url = `${this.baseUrl}${filename}`;
    return this._fetchData(url).catch(reason => {
      throw new Error(`Unable to load font data at: ${url}`);
    });
  }
  _fetchData(url) {
    unreachable("Abstract method `_fetchData` called.");
  }
}
class BaseSVGFactory {
  constructor() {
    if (this.constructor === BaseSVGFactory) {
      unreachable("Cannot initialize BaseSVGFactory.");
    }
  }
  create(width, height, skipDimensions = false) {
    if (width <= 0 || height <= 0) {
      throw new Error("Invalid SVG dimensions");
    }
    const svg = this._createSVG("svg:svg");
    svg.setAttribute("version", "1.1");
    if (!skipDimensions) {
      svg.setAttribute("width", `${width}px`);
      svg.setAttribute("height", `${height}px`);
    }
    svg.setAttribute("preserveAspectRatio", "none");
    svg.setAttribute("viewBox", `0 0 ${width} ${height}`);
    return svg;
  }
  createElement(type) {
    if (typeof type !== "string") {
      throw new Error("Invalid SVG element type");
    }
    return this._createSVG(type);
  }
  _createSVG(type) {
    unreachable("Abstract method `_createSVG` called.");
  }
}

;// CONCATENATED MODULE: ./src/display/display_utils.js


const SVG_NS = "http://www.w3.org/2000/svg";
class PixelsPerInch {
  static CSS = 96.0;
  static PDF = 72.0;
  static PDF_TO_CSS_UNITS = this.CSS / this.PDF;
}
class DOMFilterFactory extends BaseFilterFactory {
  #_cache;
  #_defs;
  #docId;
  #document;
  #_hcmCache;
  #id = 0;
  constructor({
    docId,
    ownerDocument = globalThis.document
  } = {}) {
    super();
    this.#docId = docId;
    this.#document = ownerDocument;
  }
  get #cache() {
    return this.#_cache ||= new Map();
  }
  get #hcmCache() {
    return this.#_hcmCache ||= new Map();
  }
  get #defs() {
    if (!this.#_defs) {
      const div = this.#document.createElement("div");
      const {
        style
      } = div;
      style.visibility = "hidden";
      style.contain = "strict";
      style.width = style.height = 0;
      style.position = "absolute";
      style.top = style.left = 0;
      style.zIndex = -1;
      const svg = this.#document.createElementNS(SVG_NS, "svg");
      svg.setAttribute("width", 0);
      svg.setAttribute("height", 0);
      this.#_defs = this.#document.createElementNS(SVG_NS, "defs");
      div.append(svg);
      svg.append(this.#_defs);
      this.#document.body.append(div);
    }
    return this.#_defs;
  }
  #createTables(maps) {
    if (maps.length === 1) {
      const mapR = maps[0];
      const buffer = new Array(256);
      for (let i = 0; i < 256; i++) {
        buffer[i] = mapR[i] / 255;
      }
      const table = buffer.join(",");
      return [table, table, table];
    }
    const [mapR, mapG, mapB] = maps;
    const bufferR = new Array(256);
    const bufferG = new Array(256);
    const bufferB = new Array(256);
    for (let i = 0; i < 256; i++) {
      bufferR[i] = mapR[i] / 255;
      bufferG[i] = mapG[i] / 255;
      bufferB[i] = mapB[i] / 255;
    }
    return [bufferR.join(","), bufferG.join(","), bufferB.join(",")];
  }
  addFilter(maps) {
    if (!maps) {
      return "none";
    }
    let value = this.#cache.get(maps);
    if (value) {
      return value;
    }
    const [tableR, tableG, tableB] = this.#createTables(maps);
    const key = maps.length === 1 ? tableR : `${tableR}${tableG}${tableB}`;
    value = this.#cache.get(key);
    if (value) {
      this.#cache.set(maps, value);
      return value;
    }
    const id = `g_${this.#docId}_transfer_map_${this.#id++}`;
    const url = `url(#${id})`;
    this.#cache.set(maps, url);
    this.#cache.set(key, url);
    const filter = this.#createFilter(id);
    this.#addTransferMapConversion(tableR, tableG, tableB, filter);
    return url;
  }
  addHCMFilter(fgColor, bgColor) {
    const key = `${fgColor}-${bgColor}`;
    const filterName = "base";
    let info = this.#hcmCache.get(filterName);
    if (info?.key === key) {
      return info.url;
    }
    if (info) {
      info.filter?.remove();
      info.key = key;
      info.url = "none";
      info.filter = null;
    } else {
      info = {
        key,
        url: "none",
        filter: null
      };
      this.#hcmCache.set(filterName, info);
    }
    if (!fgColor || !bgColor) {
      return info.url;
    }
    const fgRGB = this.#getRGB(fgColor);
    fgColor = Util.makeHexColor(...fgRGB);
    const bgRGB = this.#getRGB(bgColor);
    bgColor = Util.makeHexColor(...bgRGB);
    this.#defs.style.color = "";
    if (fgColor === "#000000" && bgColor === "#ffffff" || fgColor === bgColor) {
      return info.url;
    }
    const map = new Array(256);
    for (let i = 0; i <= 255; i++) {
      const x = i / 255;
      map[i] = x <= 0.03928 ? x / 12.92 : ((x + 0.055) / 1.055) ** 2.4;
    }
    const table = map.join(",");
    const id = `g_${this.#docId}_hcm_filter`;
    const filter = info.filter = this.#createFilter(id);
    this.#addTransferMapConversion(table, table, table, filter);
    this.#addGrayConversion(filter);
    const getSteps = (c, n) => {
      const start = fgRGB[c] / 255;
      const end = bgRGB[c] / 255;
      const arr = new Array(n + 1);
      for (let i = 0; i <= n; i++) {
        arr[i] = start + i / n * (end - start);
      }
      return arr.join(",");
    };
    this.#addTransferMapConversion(getSteps(0, 5), getSteps(1, 5), getSteps(2, 5), filter);
    info.url = `url(#${id})`;
    return info.url;
  }
  addAlphaFilter(map) {
    let value = this.#cache.get(map);
    if (value) {
      return value;
    }
    const [tableA] = this.#createTables([map]);
    const key = `alpha_${tableA}`;
    value = this.#cache.get(key);
    if (value) {
      this.#cache.set(map, value);
      return value;
    }
    const id = `g_${this.#docId}_alpha_map_${this.#id++}`;
    const url = `url(#${id})`;
    this.#cache.set(map, url);
    this.#cache.set(key, url);
    const filter = this.#createFilter(id);
    this.#addTransferMapAlphaConversion(tableA, filter);
    return url;
  }
  addLuminosityFilter(map) {
    let value = this.#cache.get(map || "luminosity");
    if (value) {
      return value;
    }
    let tableA, key;
    if (map) {
      [tableA] = this.#createTables([map]);
      key = `luminosity_${tableA}`;
    } else {
      key = "luminosity";
    }
    value = this.#cache.get(key);
    if (value) {
      this.#cache.set(map, value);
      return value;
    }
    const id = `g_${this.#docId}_luminosity_map_${this.#id++}`;
    const url = `url(#${id})`;
    this.#cache.set(map, url);
    this.#cache.set(key, url);
    const filter = this.#createFilter(id);
    this.#addLuminosityConversion(filter);
    if (map) {
      this.#addTransferMapAlphaConversion(tableA, filter);
    }
    return url;
  }
  addHighlightHCMFilter(filterName, fgColor, bgColor, newFgColor, newBgColor) {
    const key = `${fgColor}-${bgColor}-${newFgColor}-${newBgColor}`;
    let info = this.#hcmCache.get(filterName);
    if (info?.key === key) {
      return info.url;
    }
    if (info) {
      info.filter?.remove();
      info.key = key;
      info.url = "none";
      info.filter = null;
    } else {
      info = {
        key,
        url: "none",
        filter: null
      };
      this.#hcmCache.set(filterName, info);
    }
    if (!fgColor || !bgColor) {
      return info.url;
    }
    const [fgRGB, bgRGB] = [fgColor, bgColor].map(this.#getRGB.bind(this));
    let fgGray = Math.round(0.2126 * fgRGB[0] + 0.7152 * fgRGB[1] + 0.0722 * fgRGB[2]);
    let bgGray = Math.round(0.2126 * bgRGB[0] + 0.7152 * bgRGB[1] + 0.0722 * bgRGB[2]);
    let [newFgRGB, newBgRGB] = [newFgColor, newBgColor].map(this.#getRGB.bind(this));
    if (bgGray < fgGray) {
      [fgGray, bgGray, newFgRGB, newBgRGB] = [bgGray, fgGray, newBgRGB, newFgRGB];
    }
    this.#defs.style.color = "";
    const getSteps = (fg, bg, n) => {
      const arr = new Array(256);
      const step = (bgGray - fgGray) / n;
      const newStart = fg / 255;
      const newStep = (bg - fg) / (255 * n);
      let prev = 0;
      for (let i = 0; i <= n; i++) {
        const k = Math.round(fgGray + i * step);
        const value = newStart + i * newStep;
        for (let j = prev; j <= k; j++) {
          arr[j] = value;
        }
        prev = k + 1;
      }
      for (let i = prev; i < 256; i++) {
        arr[i] = arr[prev - 1];
      }
      return arr.join(",");
    };
    const id = `g_${this.#docId}_hcm_${filterName}_filter`;
    const filter = info.filter = this.#createFilter(id);
    this.#addGrayConversion(filter);
    this.#addTransferMapConversion(getSteps(newFgRGB[0], newBgRGB[0], 5), getSteps(newFgRGB[1], newBgRGB[1], 5), getSteps(newFgRGB[2], newBgRGB[2], 5), filter);
    info.url = `url(#${id})`;
    return info.url;
  }
  destroy(keepHCM = false) {
    if (keepHCM && this.#hcmCache.size !== 0) {
      return;
    }
    if (this.#_defs) {
      this.#_defs.parentNode.parentNode.remove();
      this.#_defs = null;
    }
    if (this.#_cache) {
      this.#_cache.clear();
      this.#_cache = null;
    }
    this.#id = 0;
  }
  #addLuminosityConversion(filter) {
    const feColorMatrix = this.#document.createElementNS(SVG_NS, "feColorMatrix");
    feColorMatrix.setAttribute("type", "matrix");
    feColorMatrix.setAttribute("values", "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0");
    filter.append(feColorMatrix);
  }
  #addGrayConversion(filter) {
    const feColorMatrix = this.#document.createElementNS(SVG_NS, "feColorMatrix");
    feColorMatrix.setAttribute("type", "matrix");
    feColorMatrix.setAttribute("values", "0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0");
    filter.append(feColorMatrix);
  }
  #createFilter(id) {
    const filter = this.#document.createElementNS(SVG_NS, "filter");
    filter.setAttribute("color-interpolation-filters", "sRGB");
    filter.setAttribute("id", id);
    this.#defs.append(filter);
    return filter;
  }
  #appendFeFunc(feComponentTransfer, func, table) {
    const feFunc = this.#document.createElementNS(SVG_NS, func);
    feFunc.setAttribute("type", "discrete");
    feFunc.setAttribute("tableValues", table);
    feComponentTransfer.append(feFunc);
  }
  #addTransferMapConversion(rTable, gTable, bTable, filter) {
    const feComponentTransfer = this.#document.createElementNS(SVG_NS, "feComponentTransfer");
    filter.append(feComponentTransfer);
    this.#appendFeFunc(feComponentTransfer, "feFuncR", rTable);
    this.#appendFeFunc(feComponentTransfer, "feFuncG", gTable);
    this.#appendFeFunc(feComponentTransfer, "feFuncB", bTable);
  }
  #addTransferMapAlphaConversion(aTable, filter) {
    const feComponentTransfer = this.#document.createElementNS(SVG_NS, "feComponentTransfer");
    filter.append(feComponentTransfer);
    this.#appendFeFunc(feComponentTransfer, "feFuncA", aTable);
  }
  #getRGB(color) {
    this.#defs.style.color = color;
    return getRGB(getComputedStyle(this.#defs).getPropertyValue("color"));
  }
}
class DOMCanvasFactory extends BaseCanvasFactory {
  constructor({
    ownerDocument = globalThis.document
  } = {}) {
    super();
    this._document = ownerDocument;
  }
  _createCanvas(width, height) {
    const canvas = this._document.createElement("canvas");
    canvas.width = width;
    canvas.height = height;
    return canvas;
  }
}
async function fetchData(url, type = "text") {
  if (isValidFetchUrl(url, document.baseURI)) {
    const response = await fetch(url);
    if (!response.ok) {
      throw new Error(response.statusText);
    }
    switch (type) {
      case "arraybuffer":
        return response.arrayBuffer();
      case "blob":
        return response.blob();
      case "json":
        return response.json();
    }
    return response.text();
  }
  return new Promise((resolve, reject) => {
    const request = new XMLHttpRequest();
    request.open("GET", url, true);
    request.responseType = type;
    request.onreadystatechange = () => {
      if (request.readyState !== XMLHttpRequest.DONE) {
        return;
      }
      if (request.status === 200 || request.status === 0) {
        switch (type) {
          case "arraybuffer":
          case "blob":
          case "json":
            resolve(request.response);
            return;
        }
        resolve(request.responseText);
        return;
      }
      reject(new Error(request.statusText));
    };
    request.send(null);
  });
}
class DOMCMapReaderFactory extends BaseCMapReaderFactory {
  _fetchData(url, compressionType) {
    return fetchData(url, this.isCompressed ? "arraybuffer" : "text").then(data => ({
      cMapData: data instanceof ArrayBuffer ? new Uint8Array(data) : stringToBytes(data),
      compressionType
    }));
  }
}
class DOMStandardFontDataFactory extends BaseStandardFontDataFactory {
  _fetchData(url) {
    return fetchData(url, "arraybuffer").then(data => new Uint8Array(data));
  }
}
class DOMSVGFactory extends BaseSVGFactory {
  _createSVG(type) {
    return document.createElementNS(SVG_NS, type);
  }
}
class PageViewport {
  constructor({
    viewBox,
    scale,
    rotation,
    offsetX = 0,
    offsetY = 0,
    dontFlip = false
  }) {
    this.viewBox = viewBox;
    this.scale = scale;
    this.rotation = rotation;
    this.offsetX = offsetX;
    this.offsetY = offsetY;
    const centerX = (viewBox[2] + viewBox[0]) / 2;
    const centerY = (viewBox[3] + viewBox[1]) / 2;
    let rotateA, rotateB, rotateC, rotateD;
    rotation %= 360;
    if (rotation < 0) {
      rotation += 360;
    }
    switch (rotation) {
      case 180:
        rotateA = -1;
        rotateB = 0;
        rotateC = 0;
        rotateD = 1;
        break;
      case 90:
        rotateA = 0;
        rotateB = 1;
        rotateC = 1;
        rotateD = 0;
        break;
      case 270:
        rotateA = 0;
        rotateB = -1;
        rotateC = -1;
        rotateD = 0;
        break;
      case 0:
        rotateA = 1;
        rotateB = 0;
        rotateC = 0;
        rotateD = -1;
        break;
      default:
        throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.");
    }
    if (dontFlip) {
      rotateC = -rotateC;
      rotateD = -rotateD;
    }
    let offsetCanvasX, offsetCanvasY;
    let width, height;
    if (rotateA === 0) {
      offsetCanvasX = Math.abs(centerY - viewBox[1]) * scale + offsetX;
      offsetCanvasY = Math.abs(centerX - viewBox[0]) * scale + offsetY;
      width = (viewBox[3] - viewBox[1]) * scale;
      height = (viewBox[2] - viewBox[0]) * scale;
    } else {
      offsetCanvasX = Math.abs(centerX - viewBox[0]) * scale + offsetX;
      offsetCanvasY = Math.abs(centerY - viewBox[1]) * scale + offsetY;
      width = (viewBox[2] - viewBox[0]) * scale;
      height = (viewBox[3] - viewBox[1]) * scale;
    }
    this.transform = [rotateA * scale, rotateB * scale, rotateC * scale, rotateD * scale, offsetCanvasX - rotateA * scale * centerX - rotateC * scale * centerY, offsetCanvasY - rotateB * scale * centerX - rotateD * scale * centerY];
    this.width = width;
    this.height = height;
  }
  get rawDims() {
    const {
      viewBox
    } = this;
    return shadow(this, "rawDims", {
      pageWidth: viewBox[2] - viewBox[0],
      pageHeight: viewBox[3] - viewBox[1],
      pageX: viewBox[0],
      pageY: viewBox[1]
    });
  }
  clone({
    scale = this.scale,
    rotation = this.rotation,
    offsetX = this.offsetX,
    offsetY = this.offsetY,
    dontFlip = false
  } = {}) {
    return new PageViewport({
      viewBox: this.viewBox.slice(),
      scale,
      rotation,
      offsetX,
      offsetY,
      dontFlip
    });
  }
  convertToViewportPoint(x, y) {
    return Util.applyTransform([x, y], this.transform);
  }
  convertToViewportRectangle(rect) {
    const topLeft = Util.applyTransform([rect[0], rect[1]], this.transform);
    const bottomRight = Util.applyTransform([rect[2], rect[3]], this.transform);
    return [topLeft[0], topLeft[1], bottomRight[0], bottomRight[1]];
  }
  convertToPdfPoint(x, y) {
    return Util.applyInverseTransform([x, y], this.transform);
  }
}
class RenderingCancelledException extends BaseException {
  constructor(msg, extraDelay = 0) {
    super(msg, "RenderingCancelledException");
    this.extraDelay = extraDelay;
  }
}
function isDataScheme(url) {
  const ii = url.length;
  let i = 0;
  while (i < ii && url[i].trim() === "") {
    i++;
  }
  return url.substring(i, i + 5).toLowerCase() === "data:";
}
function isPdfFile(filename) {
  return typeof filename === "string" && /\.pdf$/i.test(filename);
}
function getFilenameFromUrl(url) {
  [url] = url.split(/[#?]/, 1);
  return url.substring(url.lastIndexOf("/") + 1);
}
function getPdfFilenameFromUrl(url, defaultFilename = "document.pdf") {
  if (typeof url !== "string") {
    return defaultFilename;
  }
  if (isDataScheme(url)) {
    warn('getPdfFilenameFromUrl: ignore "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 {}
    }
  }
  return suggestedFilename || defaultFilename;
}
class StatTimer {
  started = Object.create(null);
  times = [];
  time(name) {
    if (name in this.started) {
      warn(`Timer is already running for ${name}`);
    }
    this.started[name] = Date.now();
  }
  timeEnd(name) {
    if (!(name in this.started)) {
      warn(`Timer has not been started for ${name}`);
    }
    this.times.push({
      name,
      start: this.started[name],
      end: Date.now()
    });
    delete this.started[name];
  }
  toString() {
    const outBuf = [];
    let longest = 0;
    for (const {
      name
    } of this.times) {
      longest = Math.max(name.length, longest);
    }
    for (const {
      name,
      start,
      end
    } of this.times) {
      outBuf.push(`${name.padEnd(longest)} ${end - start}ms\n`);
    }
    return outBuf.join("");
  }
}
function isValidFetchUrl(url, baseUrl) {
  try {
    const {
      protocol
    } = baseUrl ? new URL(url, baseUrl) : new URL(url);
    return protocol === "http:" || protocol === "https:";
  } catch {
    return false;
  }
}
function noContextMenu(e) {
  e.preventDefault();
}
function deprecated(details) {
  console.log("Deprecated API usage: " + details);
}
let pdfDateStringRegex;
class PDFDateString {
  static toDateObject(input) {
    if (!input || typeof input !== "string") {
      return null;
    }
    pdfDateStringRegex ||= new RegExp("^D:" + "(\\d{4})" + "(\\d{2})?" + "(\\d{2})?" + "(\\d{2})?" + "(\\d{2})?" + "(\\d{2})?" + "([Z|+|-])?" + "(\\d{2})?" + "'?" + "(\\d{2})?" + "'?");
    const matches = pdfDateStringRegex.exec(input);
    if (!matches) {
      return null;
    }
    const year = parseInt(matches[1], 10);
    let month = parseInt(matches[2], 10);
    month = month >= 1 && month <= 12 ? month - 1 : 0;
    let day = parseInt(matches[3], 10);
    day = day >= 1 && day <= 31 ? day : 1;
    let hour = parseInt(matches[4], 10);
    hour = hour >= 0 && hour <= 23 ? hour : 0;
    let minute = parseInt(matches[5], 10);
    minute = minute >= 0 && minute <= 59 ? minute : 0;
    let second = parseInt(matches[6], 10);
    second = second >= 0 && second <= 59 ? second : 0;
    const universalTimeRelation = matches[7] || "Z";
    let offsetHour = parseInt(matches[8], 10);
    offsetHour = offsetHour >= 0 && offsetHour <= 23 ? offsetHour : 0;
    let offsetMinute = parseInt(matches[9], 10) || 0;
    offsetMinute = offsetMinute >= 0 && offsetMinute <= 59 ? offsetMinute : 0;
    if (universalTimeRelation === "-") {
      hour += offsetHour;
      minute += offsetMinute;
    } else if (universalTimeRelation === "+") {
      hour -= offsetHour;
      minute -= offsetMinute;
    }
    return new Date(Date.UTC(year, month, day, hour, minute, second));
  }
}
function getXfaPageViewport(xfaPage, {
  scale = 1,
  rotation = 0
}) {
  const {
    width,
    height
  } = xfaPage.attributes.style;
  const viewBox = [0, 0, parseInt(width), parseInt(height)];
  return new PageViewport({
    viewBox,
    scale,
    rotation
  });
}
function getRGB(color) {
  if (color.startsWith("#")) {
    const colorRGB = parseInt(color.slice(1), 16);
    return [(colorRGB & 0xff0000) >> 16, (colorRGB & 0x00ff00) >> 8, colorRGB & 0x0000ff];
  }
  if (color.startsWith("rgb(")) {
    return color.slice(4, -1).split(",").map(x => parseInt(x));
  }
  if (color.startsWith("rgba(")) {
    return color.slice(5, -1).split(",").map(x => parseInt(x)).slice(0, 3);
  }
  warn(`Not a valid color format: "${color}"`);
  return [0, 0, 0];
}
function getColorValues(colors) {
  const span = document.createElement("span");
  span.style.visibility = "hidden";
  document.body.append(span);
  for (const name of colors.keys()) {
    span.style.color = name;
    const computedColor = window.getComputedStyle(span).color;
    colors.set(name, getRGB(computedColor));
  }
  span.remove();
}
function getCurrentTransform(ctx) {
  const {
    a,
    b,
    c,
    d,
    e,
    f
  } = ctx.getTransform();
  return [a, b, c, d, e, f];
}
function getCurrentTransformInverse(ctx) {
  const {
    a,
    b,
    c,
    d,
    e,
    f
  } = ctx.getTransform().invertSelf();
  return [a, b, c, d, e, f];
}
function setLayerDimensions(div, viewport, mustFlip = false, mustRotate = true) {
  if (viewport instanceof PageViewport) {
    const {
      pageWidth,
      pageHeight
    } = viewport.rawDims;
    const {
      style
    } = div;
    const useRound = util_FeatureTest.isCSSRoundSupported;
    const w = `var(--scale-factor) * ${pageWidth}px`,
      h = `var(--scale-factor) * ${pageHeight}px`;
    const widthStr = useRound ? `round(${w}, 1px)` : `calc(${w})`,
      heightStr = useRound ? `round(${h}, 1px)` : `calc(${h})`;
    if (!mustFlip || viewport.rotation % 180 === 0) {
      style.width = widthStr;
      style.height = heightStr;
    } else {
      style.width = heightStr;
      style.height = widthStr;
    }
  }
  if (mustRotate) {
    div.setAttribute("data-main-rotation", viewport.rotation);
  }
}

;// CONCATENATED MODULE: ./src/display/editor/toolbar.js

class EditorToolbar {
  #toolbar = null;
  #colorPicker = null;
  #editor;
  #buttons = null;
  constructor(editor) {
    this.#editor = editor;
  }
  render() {
    const editToolbar = this.#toolbar = document.createElement("div");
    editToolbar.className = "editToolbar";
    editToolbar.setAttribute("role", "toolbar");
    editToolbar.addEventListener("contextmenu", noContextMenu);
    editToolbar.addEventListener("pointerdown", EditorToolbar.#pointerDown);
    const buttons = this.#buttons = document.createElement("div");
    buttons.className = "buttons";
    editToolbar.append(buttons);
    const position = this.#editor.toolbarPosition;
    if (position) {
      const {
        style
      } = editToolbar;
      const x = this.#editor._uiManager.direction === "ltr" ? 1 - position[0] : position[0];
      style.insetInlineEnd = `${100 * x}%`;
      style.top = `calc(${100 * position[1]}% + var(--editor-toolbar-vert-offset))`;
    }
    this.#addDeleteButton();
    return editToolbar;
  }
  static #pointerDown(e) {
    e.stopPropagation();
  }
  #focusIn(e) {
    this.#editor._focusEventsAllowed = false;
    e.preventDefault();
    e.stopPropagation();
  }
  #focusOut(e) {
    this.#editor._focusEventsAllowed = true;
    e.preventDefault();
    e.stopPropagation();
  }
  #addListenersToElement(element) {
    element.addEventListener("focusin", this.#focusIn.bind(this), {
      capture: true
    });
    element.addEventListener("focusout", this.#focusOut.bind(this), {
      capture: true
    });
    element.addEventListener("contextmenu", noContextMenu);
  }
  hide() {
    this.#toolbar.classList.add("hidden");
    this.#colorPicker?.hideDropdown();
  }
  show() {
    this.#toolbar.classList.remove("hidden");
  }
  #addDeleteButton() {
    const button = document.createElement("button");
    button.className = "delete";
    button.tabIndex = 0;
    button.setAttribute("data-l10n-id", `pdfjs-editor-remove-${this.#editor.editorType}-button`);
    this.#addListenersToElement(button);
    button.addEventListener("click", e => {
      this.#editor._uiManager.delete();
    });
    this.#buttons.append(button);
  }
  get #divider() {
    const divider = document.createElement("div");
    divider.className = "divider";
    return divider;
  }
  addAltTextButton(button) {
    this.#addListenersToElement(button);
    this.#buttons.prepend(button, this.#divider);
  }
  addColorPicker(colorPicker) {
    this.#colorPicker = colorPicker;
    const button = colorPicker.renderButton();
    this.#addListenersToElement(button);
    this.#buttons.prepend(button, this.#divider);
  }
  remove() {
    this.#toolbar.remove();
    this.#colorPicker?.destroy();
    this.#colorPicker = null;
  }
}
class HighlightToolbar {
  #buttons = null;
  #toolbar = null;
  #uiManager;
  constructor(uiManager) {
    this.#uiManager = uiManager;
  }
  #render() {
    const editToolbar = this.#toolbar = document.createElement("div");
    editToolbar.className = "editToolbar";
    editToolbar.setAttribute("role", "toolbar");
    editToolbar.addEventListener("contextmenu", noContextMenu);
    const buttons = this.#buttons = document.createElement("div");
    buttons.className = "buttons";
    editToolbar.append(buttons);
    this.#addHighlightButton();
    return editToolbar;
  }
  #getLastPoint(boxes, isLTR) {
    let lastY = 0;
    let lastX = 0;
    for (const box of boxes) {
      const y = box.y + box.height;
      if (y < lastY) {
        continue;
      }
      const x = box.x + (isLTR ? box.width : 0);
      if (y > lastY) {
        lastX = x;
        lastY = y;
        continue;
      }
      if (isLTR) {
        if (x > lastX) {
          lastX = x;
        }
      } else if (x < lastX) {
        lastX = x;
      }
    }
    return [isLTR ? 1 - lastX : lastX, lastY];
  }
  show(parent, boxes, isLTR) {
    const [x, y] = this.#getLastPoint(boxes, isLTR);
    const {
      style
    } = this.#toolbar ||= this.#render();
    parent.append(this.#toolbar);
    style.insetInlineEnd = `${100 * x}%`;
    style.top = `calc(${100 * y}% + var(--editor-toolbar-vert-offset))`;
  }
  hide() {
    this.#toolbar.remove();
  }
  #addHighlightButton() {
    const button = document.createElement("button");
    button.className = "highlightButton";
    button.tabIndex = 0;
    button.setAttribute("data-l10n-id", `pdfjs-highlight-floating-button1`);
    const span = document.createElement("span");
    button.append(span);
    span.className = "visuallyHidden";
    span.setAttribute("data-l10n-id", "pdfjs-highlight-floating-button-label");
    button.addEventListener("contextmenu", noContextMenu);
    button.addEventListener("click", () => {
      this.#uiManager.highlightSelection("floating_button");
    });
    this.#buttons.append(button);
  }
}

;// CONCATENATED MODULE: ./src/display/editor/tools.js



function bindEvents(obj, element, names) {
  for (const name of names) {
    element.addEventListener(name, obj[name].bind(obj));
  }
}
function opacityToHex(opacity) {
  return Math.round(Math.min(255, Math.max(1, 255 * opacity))).toString(16).padStart(2, "0");
}
class IdManager {
  #id = 0;
  get id() {
    return `${AnnotationEditorPrefix}${this.#id++}`;
  }
}
class ImageManager {
  #baseId = getUuid();
  #id = 0;
  #cache = null;
  static get _isSVGFittingCanvas() {
    const svg = `data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>`;
    const canvas = new OffscreenCanvas(1, 3);
    const ctx = canvas.getContext("2d");
    const image = new Image();
    image.src = svg;
    const promise = image.decode().then(() => {
      ctx.drawImage(image, 0, 0, 1, 1, 0, 0, 1, 3);
      return new Uint32Array(ctx.getImageData(0, 0, 1, 1).data.buffer)[0] === 0;
    });
    return shadow(this, "_isSVGFittingCanvas", promise);
  }
  async #get(key, rawData) {
    this.#cache ||= new Map();
    let data = this.#cache.get(key);
    if (data === null) {
      return null;
    }
    if (data?.bitmap) {
      data.refCounter += 1;
      return data;
    }
    try {
      data ||= {
        bitmap: null,
        id: `image_${this.#baseId}_${this.#id++}`,
        refCounter: 0,
        isSvg: false
      };
      let image;
      if (typeof rawData === "string") {
        data.url = rawData;
        image = await fetchData(rawData, "blob");
      } else {
        image = data.file = rawData;
      }
      if (image.type === "image/svg+xml") {
        const mustRemoveAspectRatioPromise = ImageManager._isSVGFittingCanvas;
        const fileReader = new FileReader();
        const imageElement = new Image();
        const imagePromise = new Promise((resolve, reject) => {
          imageElement.onload = () => {
            data.bitmap = imageElement;
            data.isSvg = true;
            resolve();
          };
          fileReader.onload = async () => {
            const url = data.svgUrl = fileReader.result;
            imageElement.src = (await mustRemoveAspectRatioPromise) ? `${url}#svgView(preserveAspectRatio(none))` : url;
          };
          imageElement.onerror = fileReader.onerror = reject;
        });
        fileReader.readAsDataURL(image);
        await imagePromise;
      } else {
        data.bitmap = await createImageBitmap(image);
      }
      data.refCounter = 1;
    } catch (e) {
      console.error(e);
      data = null;
    }
    this.#cache.set(key, data);
    if (data) {
      this.#cache.set(data.id, data);
    }
    return data;
  }
  async getFromFile(file) {
    const {
      lastModified,
      name,
      size,
      type
    } = file;
    return this.#get(`${lastModified}_${name}_${size}_${type}`, file);
  }
  async getFromUrl(url) {
    return this.#get(url, url);
  }
  async getFromId(id) {
    this.#cache ||= new Map();
    const data = this.#cache.get(id);
    if (!data) {
      return null;
    }
    if (data.bitmap) {
      data.refCounter += 1;
      return data;
    }
    if (data.file) {
      return this.getFromFile(data.file);
    }
    return this.getFromUrl(data.url);
  }
  getSvgUrl(id) {
    const data = this.#cache.get(id);
    if (!data?.isSvg) {
      return null;
    }
    return data.svgUrl;
  }
  deleteId(id) {
    this.#cache ||= new Map();
    const data = this.#cache.get(id);
    if (!data) {
      return;
    }
    data.refCounter -= 1;
    if (data.refCounter !== 0) {
      return;
    }
    data.bitmap = null;
  }
  isValidId(id) {
    return id.startsWith(`image_${this.#baseId}_`);
  }
}
class CommandManager {
  #commands = [];
  #locked = false;
  #maxSize;
  #position = -1;
  constructor(maxSize = 128) {
    this.#maxSize = maxSize;
  }
  add({
    cmd,
    undo,
    post,
    mustExec,
    type = NaN,
    overwriteIfSameType = false,
    keepUndo = false
  }) {
    if (mustExec) {
      cmd();
    }
    if (this.#locked) {
      return;
    }
    const save = {
      cmd,
      undo,
      post,
      type
    };
    if (this.#position === -1) {
      if (this.#commands.length > 0) {
        this.#commands.length = 0;
      }
      this.#position = 0;
      this.#commands.push(save);
      return;
    }
    if (overwriteIfSameType && this.#commands[this.#position].type === type) {
      if (keepUndo) {
        save.undo = this.#commands[this.#position].undo;
      }
      this.#commands[this.#position] = save;
      return;
    }
    const next = this.#position + 1;
    if (next === this.#maxSize) {
      this.#commands.splice(0, 1);
    } else {
      this.#position = next;
      if (next < this.#commands.length) {
        this.#commands.splice(next);
      }
    }
    this.#commands.push(save);
  }
  undo() {
    if (this.#position === -1) {
      return;
    }
    this.#locked = true;
    const {
      undo,
      post
    } = this.#commands[this.#position];
    undo();
    post?.();
    this.#locked = false;
    this.#position -= 1;
  }
  redo() {
    if (this.#position < this.#commands.length - 1) {
      this.#position += 1;
      this.#locked = true;
      const {
        cmd,
        post
      } = this.#commands[this.#position];
      cmd();
      post?.();
      this.#locked = false;
    }
  }
  hasSomethingToUndo() {
    return this.#position !== -1;
  }
  hasSomethingToRedo() {
    return this.#position < this.#commands.length - 1;
  }
  destroy() {
    this.#commands = null;
  }
}
class KeyboardManager {
  constructor(callbacks) {
    this.buffer = [];
    this.callbacks = new Map();
    this.allKeys = new Set();
    const {
      isMac
    } = util_FeatureTest.platform;
    for (const [keys, callback, options = {}] of callbacks) {
      for (const key of keys) {
        const isMacKey = key.startsWith("mac+");
        if (isMac && isMacKey) {
          this.callbacks.set(key.slice(4), {
            callback,
            options
          });
          this.allKeys.add(key.split("+").at(-1));
        } else if (!isMac && !isMacKey) {
          this.callbacks.set(key, {
            callback,
            options
          });
          this.allKeys.add(key.split("+").at(-1));
        }
      }
    }
  }
  #serialize(event) {
    if (event.altKey) {
      this.buffer.push("alt");
    }
    if (event.ctrlKey) {
      this.buffer.push("ctrl");
    }
    if (event.metaKey) {
      this.buffer.push("meta");
    }
    if (event.shiftKey) {
      this.buffer.push("shift");
    }
    this.buffer.push(event.key);
    const str = this.buffer.join("+");
    this.buffer.length = 0;
    return str;
  }
  exec(self, event) {
    if (!this.allKeys.has(event.key)) {
      return;
    }
    const info = this.callbacks.get(this.#serialize(event));
    if (!info) {
      return;
    }
    const {
      callback,
      options: {
        bubbles = false,
        args = [],
        checker = null
      }
    } = info;
    if (checker && !checker(self, event)) {
      return;
    }
    callback.bind(self, ...args, event)();
    if (!bubbles) {
      event.stopPropagation();
      event.preventDefault();
    }
  }
}
class ColorManager {
  static _colorsMapping = new Map([["CanvasText", [0, 0, 0]], ["Canvas", [255, 255, 255]]]);
  get _colors() {
    const colors = new Map([["CanvasText", null], ["Canvas", null]]);
    getColorValues(colors);
    return shadow(this, "_colors", colors);
  }
  convert(color) {
    const rgb = getRGB(color);
    if (!window.matchMedia("(forced-colors: active)").matches) {
      return rgb;
    }
    for (const [name, RGB] of this._colors) {
      if (RGB.every((x, i) => x === rgb[i])) {
        return ColorManager._colorsMapping.get(name);
      }
    }
    return rgb;
  }
  getHexCode(name) {
    const rgb = this._colors.get(name);
    if (!rgb) {
      return name;
    }
    return Util.makeHexColor(...rgb);
  }
}
class AnnotationEditorUIManager {
  #activeEditor = null;
  #allEditors = new Map();
  #allLayers = new Map();
  #altTextManager = null;
  #annotationStorage = null;
  #changedExistingAnnotations = null;
  #commandManager = new CommandManager();
  #currentPageIndex = 0;
  #deletedAnnotationsElementIds = new Set();
  #draggingEditors = null;
  #editorTypes = null;
  #editorsToRescale = new Set();
  #enableHighlightFloatingButton = false;
  #filterFactory = null;
  #focusMainContainerTimeoutId = null;
  #highlightColors = null;
  #highlightWhenShiftUp = false;
  #highlightToolbar = null;
  #idManager = new IdManager();
  #isEnabled = false;
  #isWaiting = false;
  #lastActiveElement = null;
  #mainHighlightColorPicker = null;
  #mlManager = null;
  #mode = AnnotationEditorType.NONE;
  #selectedEditors = new Set();
  #selectedTextNode = null;
  #pageColors = null;
  #showAllStates = null;
  #boundBlur = this.blur.bind(this);
  #boundFocus = this.focus.bind(this);
  #boundCopy = this.copy.bind(this);
  #boundCut = this.cut.bind(this);
  #boundPaste = this.paste.bind(this);
  #boundKeydown = this.keydown.bind(this);
  #boundKeyup = this.keyup.bind(this);
  #boundOnEditingAction = this.onEditingAction.bind(this);
  #boundOnPageChanging = this.onPageChanging.bind(this);
  #boundOnScaleChanging = this.onScaleChanging.bind(this);
  #boundSelectionChange = this.#selectionChange.bind(this);
  #boundOnRotationChanging = this.onRotationChanging.bind(this);
  #previousStates = {
    isEditing: false,
    isEmpty: true,
    hasSomethingToUndo: false,
    hasSomethingToRedo: false,
    hasSelectedEditor: false,
    hasSelectedText: false
  };
  #translation = [0, 0];
  #translationTimeoutId = null;
  #container = null;
  #viewer = null;
  static TRANSLATE_SMALL = 1;
  static TRANSLATE_BIG = 10;
  static get _keyboardManager() {
    const proto = AnnotationEditorUIManager.prototype;
    const arrowChecker = self => self.#container.contains(document.activeElement) && document.activeElement.tagName !== "BUTTON" && self.hasSomethingToControl();
    const textInputChecker = (_self, {
      target: el
    }) => {
      if (el instanceof HTMLInputElement) {
        const {
          type
        } = el;
        return type !== "text" && type !== "number";
      }
      return true;
    };
    const small = this.TRANSLATE_SMALL;
    const big = this.TRANSLATE_BIG;
    return shadow(this, "_keyboardManager", new KeyboardManager([[["ctrl+a", "mac+meta+a"], proto.selectAll, {
      checker: textInputChecker
    }], [["ctrl+z", "mac+meta+z"], proto.undo, {
      checker: textInputChecker
    }], [["ctrl+y", "ctrl+shift+z", "mac+meta+shift+z", "ctrl+shift+Z", "mac+meta+shift+Z"], proto.redo, {
      checker: textInputChecker
    }], [["Backspace", "alt+Backspace", "ctrl+Backspace", "shift+Backspace", "mac+Backspace", "mac+alt+Backspace", "mac+ctrl+Backspace", "Delete", "ctrl+Delete", "shift+Delete", "mac+Delete"], proto.delete, {
      checker: textInputChecker
    }], [["Enter", "mac+Enter"], proto.addNewEditorFromKeyboard, {
      checker: (self, {
        target: el
      }) => !(el instanceof HTMLButtonElement) && self.#container.contains(el) && !self.isEnterHandled
    }], [[" ", "mac+ "], proto.addNewEditorFromKeyboard, {
      checker: (self, {
        target: el
      }) => !(el instanceof HTMLButtonElement) && self.#container.contains(document.activeElement)
    }], [["Escape", "mac+Escape"], proto.unselectAll], [["ArrowLeft", "mac+ArrowLeft"], proto.translateSelectedEditors, {
      args: [-small, 0],
      checker: arrowChecker
    }], [["ctrl+ArrowLeft", "mac+shift+ArrowLeft"], proto.translateSelectedEditors, {
      args: [-big, 0],
      checker: arrowChecker
    }], [["ArrowRight", "mac+ArrowRight"], proto.translateSelectedEditors, {
      args: [small, 0],
      checker: arrowChecker
    }], [["ctrl+ArrowRight", "mac+shift+ArrowRight"], proto.translateSelectedEditors, {
      args: [big, 0],
      checker: arrowChecker
    }], [["ArrowUp", "mac+ArrowUp"], proto.translateSelectedEditors, {
      args: [0, -small],
      checker: arrowChecker
    }], [["ctrl+ArrowUp", "mac+shift+ArrowUp"], proto.translateSelectedEditors, {
      args: [0, -big],
      checker: arrowChecker
    }], [["ArrowDown", "mac+ArrowDown"], proto.translateSelectedEditors, {
      args: [0, small],
      checker: arrowChecker
    }], [["ctrl+ArrowDown", "mac+shift+ArrowDown"], proto.translateSelectedEditors, {
      args: [0, big],
      checker: arrowChecker
    }]]));
  }
  constructor(container, viewer, altTextManager, eventBus, pdfDocument, pageColors, highlightColors, enableHighlightFloatingButton, mlManager) {
    this.#container = container;
    this.#viewer = viewer;
    this.#altTextManager = altTextManager;
    this._eventBus = eventBus;
    this._eventBus._on("editingaction", this.#boundOnEditingAction);
    this._eventBus._on("pagechanging", this.#boundOnPageChanging);
    this._eventBus._on("scalechanging", this.#boundOnScaleChanging);
    this._eventBus._on("rotationchanging", this.#boundOnRotationChanging);
    this.#addSelectionListener();
    this.#addKeyboardManager();
    this.#annotationStorage = pdfDocument.annotationStorage;
    this.#filterFactory = pdfDocument.filterFactory;
    this.#pageColors = pageColors;
    this.#highlightColors = highlightColors || null;
    this.#enableHighlightFloatingButton = enableHighlightFloatingButton;
    this.#mlManager = mlManager || null;
    this.viewParameters = {
      realScale: PixelsPerInch.PDF_TO_CSS_UNITS,
      rotation: 0
    };
    this.isShiftKeyDown = false;
  }
  destroy() {
    this.#removeKeyboardManager();
    this.#removeFocusManager();
    this._eventBus._off("editingaction", this.#boundOnEditingAction);
    this._eventBus._off("pagechanging", this.#boundOnPageChanging);
    this._eventBus._off("scalechanging", this.#boundOnScaleChanging);
    this._eventBus._off("rotationchanging", this.#boundOnRotationChanging);
    for (const layer of this.#allLayers.values()) {
      layer.destroy();
    }
    this.#allLayers.clear();
    this.#allEditors.clear();
    this.#editorsToRescale.clear();
    this.#activeEditor = null;
    this.#selectedEditors.clear();
    this.#commandManager.destroy();
    this.#altTextManager?.destroy();
    this.#highlightToolbar?.hide();
    this.#highlightToolbar = null;
    if (this.#focusMainContainerTimeoutId) {
      clearTimeout(this.#focusMainContainerTimeoutId);
      this.#focusMainContainerTimeoutId = null;
    }
    if (this.#translationTimeoutId) {
      clearTimeout(this.#translationTimeoutId);
      this.#translationTimeoutId = null;
    }
    this.#removeSelectionListener();
  }
  async mlGuess(data) {
    return this.#mlManager?.guess(data) || null;
  }
  get hasMLManager() {
    return !!this.#mlManager;
  }
  get hcmFilter() {
    return shadow(this, "hcmFilter", this.#pageColors ? this.#filterFactory.addHCMFilter(this.#pageColors.foreground, this.#pageColors.background) : "none");
  }
  get direction() {
    return shadow(this, "direction", getComputedStyle(this.#container).direction);
  }
  get highlightColors() {
    return shadow(this, "highlightColors", this.#highlightColors ? new Map(this.#highlightColors.split(",").map(pair => pair.split("=").map(x => x.trim()))) : null);
  }
  get highlightColorNames() {
    return shadow(this, "highlightColorNames", this.highlightColors ? new Map(Array.from(this.highlightColors, e => e.reverse())) : null);
  }
  setMainHighlightColorPicker(colorPicker) {
    this.#mainHighlightColorPicker = colorPicker;
  }
  editAltText(editor) {
    this.#altTextManager?.editAltText(this, editor);
  }
  onPageChanging({
    pageNumber
  }) {
    this.#currentPageIndex = pageNumber - 1;
  }
  focusMainContainer() {
    this.#container.focus();
  }
  findParent(x, y) {
    for (const layer of this.#allLayers.values()) {
      const {
        x: layerX,
        y: layerY,
        width,
        height
      } = layer.div.getBoundingClientRect();
      if (x >= layerX && x <= layerX + width && y >= layerY && y <= layerY + height) {
        return layer;
      }
    }
    return null;
  }
  disableUserSelect(value = false) {
    this.#viewer.classList.toggle("noUserSelect", value);
  }
  addShouldRescale(editor) {
    this.#editorsToRescale.add(editor);
  }
  removeShouldRescale(editor) {
    this.#editorsToRescale.delete(editor);
  }
  onScaleChanging({
    scale
  }) {
    this.commitOrRemove();
    this.viewParameters.realScale = scale * PixelsPerInch.PDF_TO_CSS_UNITS;
    for (const editor of this.#editorsToRescale) {
      editor.onScaleChanging();
    }
  }
  onRotationChanging({
    pagesRotation
  }) {
    this.commitOrRemove();
    this.viewParameters.rotation = pagesRotation;
  }
  #getAnchorElementForSelection({
    anchorNode
  }) {
    return anchorNode.nodeType === Node.TEXT_NODE ? anchorNode.parentElement : anchorNode;
  }
  highlightSelection(methodOfCreation = "") {
    const selection = document.getSelection();
    if (!selection || selection.isCollapsed) {
      return;
    }
    const {
      anchorNode,
      anchorOffset,
      focusNode,
      focusOffset
    } = selection;
    const text = selection.toString();
    const anchorElement = this.#getAnchorElementForSelection(selection);
    const textLayer = anchorElement.closest(".textLayer");
    const boxes = this.getSelectionBoxes(textLayer);
    if (!boxes) {
      return;
    }
    selection.empty();
    if (this.#mode === AnnotationEditorType.NONE) {
      this._eventBus.dispatch("showannotationeditorui", {
        source: this,
        mode: AnnotationEditorType.HIGHLIGHT
      });
      this.showAllEditors("highlight", true, true);
    }
    for (const layer of this.#allLayers.values()) {
      if (layer.hasTextLayer(textLayer)) {
        layer.createAndAddNewEditor({
          x: 0,
          y: 0
        }, false, {
          methodOfCreation,
          boxes,
          anchorNode,
          anchorOffset,
          focusNode,
          focusOffset,
          text
        });
        break;
      }
    }
  }
  #displayHighlightToolbar() {
    const selection = document.getSelection();
    if (!selection || selection.isCollapsed) {
      return;
    }
    const anchorElement = this.#getAnchorElementForSelection(selection);
    const textLayer = anchorElement.closest(".textLayer");
    const boxes = this.getSelectionBoxes(textLayer);
    if (!boxes) {
      return;
    }
    this.#highlightToolbar ||= new HighlightToolbar(this);
    this.#highlightToolbar.show(textLayer, boxes, this.direction === "ltr");
  }
  addToAnnotationStorage(editor) {
    if (!editor.isEmpty() && this.#annotationStorage && !this.#annotationStorage.has(editor.id)) {
      this.#annotationStorage.setValue(editor.id, editor);
    }
  }
  #selectionChange() {
    const selection = document.getSelection();
    if (!selection || selection.isCollapsed) {
      if (this.#selectedTextNode) {
        this.#highlightToolbar?.hide();
        this.#selectedTextNode = null;
        this.#dispatchUpdateStates({
          hasSelectedText: false
        });
      }
      return;
    }
    const {
      anchorNode
    } = selection;
    if (anchorNode === this.#selectedTextNode) {
      return;
    }
    const anchorElement = this.#getAnchorElementForSelection(selection);
    const textLayer = anchorElement.closest(".textLayer");
    if (!textLayer) {
      if (this.#selectedTextNode) {
        this.#highlightToolbar?.hide();
        this.#selectedTextNode = null;
        this.#dispatchUpdateStates({
          hasSelectedText: false
        });
      }
      return;
    }
    this.#highlightToolbar?.hide();
    this.#selectedTextNode = anchorNode;
    this.#dispatchUpdateStates({
      hasSelectedText: true
    });
    if (this.#mode !== AnnotationEditorType.HIGHLIGHT && this.#mode !== AnnotationEditorType.NONE) {
      return;
    }
    if (this.#mode === AnnotationEditorType.HIGHLIGHT) {
      this.showAllEditors("highlight", true, true);
    }
    this.#highlightWhenShiftUp = this.isShiftKeyDown;
    if (!this.isShiftKeyDown) {
      const pointerup = e => {
        if (e.type === "pointerup" && e.button !== 0) {
          return;
        }
        window.removeEventListener("pointerup", pointerup);
        window.removeEventListener("blur", pointerup);
        if (e.type === "pointerup") {
          this.#onSelectEnd("main_toolbar");
        }
      };
      window.addEventListener("pointerup", pointerup);
      window.addEventListener("blur", pointerup);
    }
  }
  #onSelectEnd(methodOfCreation = "") {
    if (this.#mode === AnnotationEditorType.HIGHLIGHT) {
      this.highlightSelection(methodOfCreation);
    } else if (this.#enableHighlightFloatingButton) {
      this.#displayHighlightToolbar();
    }
  }
  #addSelectionListener() {
    document.addEventListener("selectionchange", this.#boundSelectionChange);
  }
  #removeSelectionListener() {
    document.removeEventListener("selectionchange", this.#boundSelectionChange);
  }
  #addFocusManager() {
    window.addEventListener("focus", this.#boundFocus);
    window.addEventListener("blur", this.#boundBlur);
  }
  #removeFocusManager() {
    window.removeEventListener("focus", this.#boundFocus);
    window.removeEventListener("blur", this.#boundBlur);
  }
  blur() {
    this.isShiftKeyDown = false;
    if (this.#highlightWhenShiftUp) {
      this.#highlightWhenShiftUp = false;
      this.#onSelectEnd("main_toolbar");
    }
    if (!this.hasSelection) {
      return;
    }
    const {
      activeElement
    } = document;
    for (const editor of this.#selectedEditors) {
      if (editor.div.contains(activeElement)) {
        this.#lastActiveElement = [editor, activeElement];
        editor._focusEventsAllowed = false;
        break;
      }
    }
  }
  focus() {
    if (!this.#lastActiveElement) {
      return;
    }
    const [lastEditor, lastActiveElement] = this.#lastActiveElement;
    this.#lastActiveElement = null;
    lastActiveElement.addEventListener("focusin", () => {
      lastEditor._focusEventsAllowed = true;
    }, {
      once: true
    });
    lastActiveElement.focus();
  }
  #addKeyboardManager() {
    window.addEventListener("keydown", this.#boundKeydown);
    window.addEventListener("keyup", this.#boundKeyup);
  }
  #removeKeyboardManager() {
    window.removeEventListener("keydown", this.#boundKeydown);
    window.removeEventListener("keyup", this.#boundKeyup);
  }
  #addCopyPasteListeners() {
    document.addEventListener("copy", this.#boundCopy);
    document.addEventListener("cut", this.#boundCut);
    document.addEventListener("paste", this.#boundPaste);
  }
  #removeCopyPasteListeners() {
    document.removeEventListener("copy", this.#boundCopy);
    document.removeEventListener("cut", this.#boundCut);
    document.removeEventListener("paste", this.#boundPaste);
  }
  addEditListeners() {
    this.#addKeyboardManager();
    this.#addCopyPasteListeners();
  }
  removeEditListeners() {
    this.#removeKeyboardManager();
    this.#removeCopyPasteListeners();
  }
  copy(event) {
    event.preventDefault();
    this.#activeEditor?.commitOrRemove();
    if (!this.hasSelection) {
      return;
    }
    const editors = [];
    for (const editor of this.#selectedEditors) {
      const serialized = editor.serialize(true);
      if (serialized) {
        editors.push(serialized);
      }
    }
    if (editors.length === 0) {
      return;
    }
    event.clipboardData.setData("application/pdfjs", JSON.stringify(editors));
  }
  cut(event) {
    this.copy(event);
    this.delete();
  }
  paste(event) {
    event.preventDefault();
    const {
      clipboardData
    } = event;
    for (const item of clipboardData.items) {
      for (const editorType of this.#editorTypes) {
        if (editorType.isHandlingMimeForPasting(item.type)) {
          editorType.paste(item, this.currentLayer);
          return;
        }
      }
    }
    let data = clipboardData.getData("application/pdfjs");
    if (!data) {
      return;
    }
    try {
      data = JSON.parse(data);
    } catch (ex) {
      warn(`paste: "${ex.message}".`);
      return;
    }
    if (!Array.isArray(data)) {
      return;
    }
    this.unselectAll();
    const layer = this.currentLayer;
    try {
      const newEditors = [];
      for (const editor of data) {
        const deserializedEditor = layer.deserialize(editor);
        if (!deserializedEditor) {
          return;
        }
        newEditors.push(deserializedEditor);
      }
      const cmd = () => {
        for (const editor of newEditors) {
          this.#addEditorToLayer(editor);
        }
        this.#selectEditors(newEditors);
      };
      const undo = () => {
        for (const editor of newEditors) {
          editor.remove();
        }
      };
      this.addCommands({
        cmd,
        undo,
        mustExec: true
      });
    } catch (ex) {
      warn(`paste: "${ex.message}".`);
    }
  }
  keydown(event) {
    if (!this.isShiftKeyDown && event.key === "Shift") {
      this.isShiftKeyDown = true;
    }
    if (this.#mode !== AnnotationEditorType.NONE && !this.isEditorHandlingKeyboard) {
      AnnotationEditorUIManager._keyboardManager.exec(this, event);
    }
  }
  keyup(event) {
    if (this.isShiftKeyDown && event.key === "Shift") {
      this.isShiftKeyDown = false;
      if (this.#highlightWhenShiftUp) {
        this.#highlightWhenShiftUp = false;
        this.#onSelectEnd("main_toolbar");
      }
    }
  }
  onEditingAction({
    name
  }) {
    switch (name) {
      case "undo":
      case "redo":
      case "delete":
      case "selectAll":
        this[name]();
        break;
      case "highlightSelection":
        this.highlightSelection("context_menu");
        break;
    }
  }
  #dispatchUpdateStates(details) {
    const hasChanged = Object.entries(details).some(([key, value]) => this.#previousStates[key] !== value);
    if (hasChanged) {
      this._eventBus.dispatch("annotationeditorstateschanged", {
        source: this,
        details: Object.assign(this.#previousStates, details)
      });
      if (this.#mode === AnnotationEditorType.HIGHLIGHT && details.hasSelectedEditor === false) {
        this.#dispatchUpdateUI([[AnnotationEditorParamsType.HIGHLIGHT_FREE, true]]);
      }
    }
  }
  #dispatchUpdateUI(details) {
    this._eventBus.dispatch("annotationeditorparamschanged", {
      source: this,
      details
    });
  }
  setEditingState(isEditing) {
    if (isEditing) {
      this.#addFocusManager();
      this.#addCopyPasteListeners();
      this.#dispatchUpdateStates({
        isEditing: this.#mode !== AnnotationEditorType.NONE,
        isEmpty: this.#isEmpty(),
        hasSomethingToUndo: this.#commandManager.hasSomethingToUndo(),
        hasSomethingToRedo: this.#commandManager.hasSomethingToRedo(),
        hasSelectedEditor: false
      });
    } else {
      this.#removeFocusManager();
      this.#removeCopyPasteListeners();
      this.#dispatchUpdateStates({
        isEditing: false
      });
      this.disableUserSelect(false);
    }
  }
  registerEditorTypes(types) {
    if (this.#editorTypes) {
      return;
    }
    this.#editorTypes = types;
    for (const editorType of this.#editorTypes) {
      this.#dispatchUpdateUI(editorType.defaultPropertiesToUpdate);
    }
  }
  getId() {
    return this.#idManager.id;
  }
  get currentLayer() {
    return this.#allLayers.get(this.#currentPageIndex);
  }
  getLayer(pageIndex) {
    return this.#allLayers.get(pageIndex);
  }
  get currentPageIndex() {
    return this.#currentPageIndex;
  }
  addLayer(layer) {
    this.#allLayers.set(layer.pageIndex, layer);
    if (this.#isEnabled) {
      layer.enable();
    } else {
      layer.disable();
    }
  }
  removeLayer(layer) {
    this.#allLayers.delete(layer.pageIndex);
  }
  updateMode(mode, editId = null, isFromKeyboard = false) {
    if (this.#mode === mode) {
      return;
    }
    this.#mode = mode;
    if (mode === AnnotationEditorType.NONE) {
      this.setEditingState(false);
      this.#disableAll();
      return;
    }
    this.setEditingState(true);
    this.#enableAll();
    this.unselectAll();
    for (const layer of this.#allLayers.values()) {
      layer.updateMode(mode);
    }
    if (!editId && isFromKeyboard) {
      this.addNewEditorFromKeyboard();
      return;
    }
    if (!editId) {
      return;
    }
    for (const editor of this.#allEditors.values()) {
      if (editor.annotationElementId === editId) {
        this.setSelected(editor);
        editor.enterInEditMode();
        break;
      }
    }
  }
  addNewEditorFromKeyboard() {
    if (this.currentLayer.canCreateNewEmptyEditor()) {
      this.currentLayer.addNewEditor();
    }
  }
  updateToolbar(mode) {
    if (mode === this.#mode) {
      return;
    }
    this._eventBus.dispatch("switchannotationeditormode", {
      source: this,
      mode
    });
  }
  updateParams(type, value) {
    if (!this.#editorTypes) {
      return;
    }
    switch (type) {
      case AnnotationEditorParamsType.CREATE:
        this.currentLayer.addNewEditor();
        return;
      case AnnotationEditorParamsType.HIGHLIGHT_DEFAULT_COLOR:
        this.#mainHighlightColorPicker?.updateColor(value);
        break;
      case AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL:
        this._eventBus.dispatch("reporttelemetry", {
          source: this,
          details: {
            type: "editing",
            data: {
              type: "highlight",
              action: "toggle_visibility"
            }
          }
        });
        (this.#showAllStates ||= new Map()).set(type, value);
        this.showAllEditors("highlight", value);
        break;
    }
    for (const editor of this.#selectedEditors) {
      editor.updateParams(type, value);
    }
    for (const editorType of this.#editorTypes) {
      editorType.updateDefaultParams(type, value);
    }
  }
  showAllEditors(type, visible, updateButton = false) {
    for (const editor of this.#allEditors.values()) {
      if (editor.editorType === type) {
        editor.show(visible);
      }
    }
    const state = this.#showAllStates?.get(AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL) ?? true;
    if (state !== visible) {
      this.#dispatchUpdateUI([[AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL, visible]]);
    }
  }
  enableWaiting(mustWait = false) {
    if (this.#isWaiting === mustWait) {
      return;
    }
    this.#isWaiting = mustWait;
    for (const layer of this.#allLayers.values()) {
      if (mustWait) {
        layer.disableClick();
      } else {
        layer.enableClick();
      }
      layer.div.classList.toggle("waiting", mustWait);
    }
  }
  #enableAll() {
    if (!this.#isEnabled) {
      this.#isEnabled = true;
      for (const layer of this.#allLayers.values()) {
        layer.enable();
      }
      for (const editor of this.#allEditors.values()) {
        editor.enable();
      }
    }
  }
  #disableAll() {
    this.unselectAll();
    if (this.#isEnabled) {
      this.#isEnabled = false;
      for (const layer of this.#allLayers.values()) {
        layer.disable();
      }
      for (const editor of this.#allEditors.values()) {
        editor.disable();
      }
    }
  }
  getEditors(pageIndex) {
    const editors = [];
    for (const editor of this.#allEditors.values()) {
      if (editor.pageIndex === pageIndex) {
        editors.push(editor);
      }
    }
    return editors;
  }
  getEditor(id) {
    return this.#allEditors.get(id);
  }
  addEditor(editor) {
    this.#allEditors.set(editor.id, editor);
  }
  removeEditor(editor) {
    if (editor.div.contains(document.activeElement)) {
      if (this.#focusMainContainerTimeoutId) {
        clearTimeout(this.#focusMainContainerTimeoutId);
      }
      this.#focusMainContainerTimeoutId = setTimeout(() => {
        this.focusMainContainer();
        this.#focusMainContainerTimeoutId = null;
      }, 0);
    }
    this.#allEditors.delete(editor.id);
    this.unselect(editor);
    if (!editor.annotationElementId || !this.#deletedAnnotationsElementIds.has(editor.annotationElementId)) {
      this.#annotationStorage?.remove(editor.id);
    }
  }
  addDeletedAnnotationElement(editor) {
    this.#deletedAnnotationsElementIds.add(editor.annotationElementId);
    this.addChangedExistingAnnotation(editor);
    editor.deleted = true;
  }
  isDeletedAnnotationElement(annotationElementId) {
    return this.#deletedAnnotationsElementIds.has(annotationElementId);
  }
  removeDeletedAnnotationElement(editor) {
    this.#deletedAnnotationsElementIds.delete(editor.annotationElementId);
    this.removeChangedExistingAnnotation(editor);
    editor.deleted = false;
  }
  #addEditorToLayer(editor) {
    const layer = this.#allLayers.get(editor.pageIndex);
    if (layer) {
      layer.addOrRebuild(editor);
    } else {
      this.addEditor(editor);
      this.addToAnnotationStorage(editor);
    }
  }
  setActiveEditor(editor) {
    if (this.#activeEditor === editor) {
      return;
    }
    this.#activeEditor = editor;
    if (editor) {
      this.#dispatchUpdateUI(editor.propertiesToUpdate);
    }
  }
  get #lastSelectedEditor() {
    let ed = null;
    for (ed of this.#selectedEditors) {}
    return ed;
  }
  updateUI(editor) {
    if (this.#lastSelectedEditor === editor) {
      this.#dispatchUpdateUI(editor.propertiesToUpdate);
    }
  }
  toggleSelected(editor) {
    if (this.#selectedEditors.has(editor)) {
      this.#selectedEditors.delete(editor);
      editor.unselect();
      this.#dispatchUpdateStates({
        hasSelectedEditor: this.hasSelection
      });
      return;
    }
    this.#selectedEditors.add(editor);
    editor.select();
    this.#dispatchUpdateUI(editor.propertiesToUpdate);
    this.#dispatchUpdateStates({
      hasSelectedEditor: true
    });
  }
  setSelected(editor) {
    for (const ed of this.#selectedEditors) {
      if (ed !== editor) {
        ed.unselect();
      }
    }
    this.#selectedEditors.clear();
    this.#selectedEditors.add(editor);
    editor.select();
    this.#dispatchUpdateUI(editor.propertiesToUpdate);
    this.#dispatchUpdateStates({
      hasSelectedEditor: true
    });
  }
  isSelected(editor) {
    return this.#selectedEditors.has(editor);
  }
  get firstSelectedEditor() {
    return this.#selectedEditors.values().next().value;
  }
  unselect(editor) {
    editor.unselect();
    this.#selectedEditors.delete(editor);
    this.#dispatchUpdateStates({
      hasSelectedEditor: this.hasSelection
    });
  }
  get hasSelection() {
    return this.#selectedEditors.size !== 0;
  }
  get isEnterHandled() {
    return this.#selectedEditors.size === 1 && this.firstSelectedEditor.isEnterHandled;
  }
  undo() {
    this.#commandManager.undo();
    this.#dispatchUpdateStates({
      hasSomethingToUndo: this.#commandManager.hasSomethingToUndo(),
      hasSomethingToRedo: true,
      isEmpty: this.#isEmpty()
    });
  }
  redo() {
    this.#commandManager.redo();
    this.#dispatchUpdateStates({
      hasSomethingToUndo: true,
      hasSomethingToRedo: this.#commandManager.hasSomethingToRedo(),
      isEmpty: this.#isEmpty()
    });
  }
  addCommands(params) {
    this.#commandManager.add(params);
    this.#dispatchUpdateStates({
      hasSomethingToUndo: true,
      hasSomethingToRedo: false,
      isEmpty: this.#isEmpty()
    });
  }
  #isEmpty() {
    if (this.#allEditors.size === 0) {
      return true;
    }
    if (this.#allEditors.size === 1) {
      for (const editor of this.#allEditors.values()) {
        return editor.isEmpty();
      }
    }
    return false;
  }
  delete() {
    this.commitOrRemove();
    if (!this.hasSelection) {
      return;
    }
    const editors = [...this.#selectedEditors];
    const cmd = () => {
      for (const editor of editors) {
        editor.remove();
      }
    };
    const undo = () => {
      for (const editor of editors) {
        this.#addEditorToLayer(editor);
      }
    };
    this.addCommands({
      cmd,
      undo,
      mustExec: true
    });
  }
  commitOrRemove() {
    this.#activeEditor?.commitOrRemove();
  }
  hasSomethingToControl() {
    return this.#activeEditor || this.hasSelection;
  }
  #selectEditors(editors) {
    for (const editor of this.#selectedEditors) {
      editor.unselect();
    }
    this.#selectedEditors.clear();
    for (const editor of editors) {
      if (editor.isEmpty()) {
        continue;
      }
      this.#selectedEditors.add(editor);
      editor.select();
    }
    this.#dispatchUpdateStates({
      hasSelectedEditor: this.hasSelection
    });
  }
  selectAll() {
    for (const editor of this.#selectedEditors) {
      editor.commit();
    }
    this.#selectEditors(this.#allEditors.values());
  }
  unselectAll() {
    if (this.#activeEditor) {
      this.#activeEditor.commitOrRemove();
      if (this.#mode !== AnnotationEditorType.NONE) {
        return;
      }
    }
    if (!this.hasSelection) {
      return;
    }
    for (const editor of this.#selectedEditors) {
      editor.unselect();
    }
    this.#selectedEditors.clear();
    this.#dispatchUpdateStates({
      hasSelectedEditor: false
    });
  }
  translateSelectedEditors(x, y, noCommit = false) {
    if (!noCommit) {
      this.commitOrRemove();
    }
    if (!this.hasSelection) {
      return;
    }
    this.#translation[0] += x;
    this.#translation[1] += y;
    const [totalX, totalY] = this.#translation;
    const editors = [...this.#selectedEditors];
    const TIME_TO_WAIT = 1000;
    if (this.#translationTimeoutId) {
      clearTimeout(this.#translationTimeoutId);
    }
    this.#translationTimeoutId = setTimeout(() => {
      this.#translationTimeoutId = null;
      this.#translation[0] = this.#translation[1] = 0;
      this.addCommands({
        cmd: () => {
          for (const editor of editors) {
            if (this.#allEditors.has(editor.id)) {
              editor.translateInPage(totalX, totalY);
            }
          }
        },
        undo: () => {
          for (const editor of editors) {
            if (this.#allEditors.has(editor.id)) {
              editor.translateInPage(-totalX, -totalY);
            }
          }
        },
        mustExec: false
      });
    }, TIME_TO_WAIT);
    for (const editor of editors) {
      editor.translateInPage(x, y);
    }
  }
  setUpDragSession() {
    if (!this.hasSelection) {
      return;
    }
    this.disableUserSelect(true);
    this.#draggingEditors = new Map();
    for (const editor of this.#selectedEditors) {
      this.#draggingEditors.set(editor, {
        savedX: editor.x,
        savedY: editor.y,
        savedPageIndex: editor.pageIndex,
        newX: 0,
        newY: 0,
        newPageIndex: -1
      });
    }
  }
  endDragSession() {
    if (!this.#draggingEditors) {
      return false;
    }
    this.disableUserSelect(false);
    const map = this.#draggingEditors;
    this.#draggingEditors = null;
    let mustBeAddedInUndoStack = false;
    for (const [{
      x,
      y,
      pageIndex
    }, value] of map) {
      value.newX = x;
      value.newY = y;
      value.newPageIndex = pageIndex;
      mustBeAddedInUndoStack ||= x !== value.savedX || y !== value.savedY || pageIndex !== value.savedPageIndex;
    }
    if (!mustBeAddedInUndoStack) {
      return false;
    }
    const move = (editor, x, y, pageIndex) => {
      if (this.#allEditors.has(editor.id)) {
        const parent = this.#allLayers.get(pageIndex);
        if (parent) {
          editor._setParentAndPosition(parent, x, y);
        } else {
          editor.pageIndex = pageIndex;
          editor.x = x;
          editor.y = y;
        }
      }
    };
    this.addCommands({
      cmd: () => {
        for (const [editor, {
          newX,
          newY,
          newPageIndex
        }] of map) {
          move(editor, newX, newY, newPageIndex);
        }
      },
      undo: () => {
        for (const [editor, {
          savedX,
          savedY,
          savedPageIndex
        }] of map) {
          move(editor, savedX, savedY, savedPageIndex);
        }
      },
      mustExec: true
    });
    return true;
  }
  dragSelectedEditors(tx, ty) {
    if (!this.#draggingEditors) {
      return;
    }
    for (const editor of this.#draggingEditors.keys()) {
      editor.drag(tx, ty);
    }
  }
  rebuild(editor) {
    if (editor.parent === null) {
      const parent = this.getLayer(editor.pageIndex);
      if (parent) {
        parent.changeParent(editor);
        parent.addOrRebuild(editor);
      } else {
        this.addEditor(editor);
        this.addToAnnotationStorage(editor);
        editor.rebuild();
      }
    } else {
      editor.parent.addOrRebuild(editor);
    }
  }
  get isEditorHandlingKeyboard() {
    return this.getActive()?.shouldGetKeyboardEvents() || this.#selectedEditors.size === 1 && this.firstSelectedEditor.shouldGetKeyboardEvents();
  }
  isActive(editor) {
    return this.#activeEditor === editor;
  }
  getActive() {
    return this.#activeEditor;
  }
  getMode() {
    return this.#mode;
  }
  get imageManager() {
    return shadow(this, "imageManager", new ImageManager());
  }
  getSelectionBoxes(textLayer) {
    if (!textLayer) {
      return null;
    }
    const selection = document.getSelection();
    for (let i = 0, ii = selection.rangeCount; i < ii; i++) {
      if (!textLayer.contains(selection.getRangeAt(i).commonAncestorContainer)) {
        return null;
      }
    }
    const {
      x: layerX,
      y: layerY,
      width: parentWidth,
      height: parentHeight
    } = textLayer.getBoundingClientRect();
    let rotator;
    switch (textLayer.getAttribute("data-main-rotation")) {
      case "90":
        rotator = (x, y, w, h) => ({
          x: (y - layerY) / parentHeight,
          y: 1 - (x + w - layerX) / parentWidth,
          width: h / parentHeight,
          height: w / parentWidth
        });
        break;
      case "180":
        rotator = (x, y, w, h) => ({
          x: 1 - (x + w - layerX) / parentWidth,
          y: 1 - (y + h - layerY) / parentHeight,
          width: w / parentWidth,
          height: h / parentHeight
        });
        break;
      case "270":
        rotator = (x, y, w, h) => ({
          x: 1 - (y + h - layerY) / parentHeight,
          y: (x - layerX) / parentWidth,
          width: h / parentHeight,
          height: w / parentWidth
        });
        break;
      default:
        rotator = (x, y, w, h) => ({
          x: (x - layerX) / parentWidth,
          y: (y - layerY) / parentHeight,
          width: w / parentWidth,
          height: h / parentHeight
        });
        break;
    }
    const boxes = [];
    for (let i = 0, ii = selection.rangeCount; i < ii; i++) {
      const range = selection.getRangeAt(i);
      if (range.collapsed) {
        continue;
      }
      for (const {
        x,
        y,
        width,
        height
      } of range.getClientRects()) {
        if (width === 0 || height === 0) {
          continue;
        }
        boxes.push(rotator(x, y, width, height));
      }
    }
    return boxes.length === 0 ? null : boxes;
  }
  addChangedExistingAnnotation({
    annotationElementId,
    id
  }) {
    (this.#changedExistingAnnotations ||= new Map()).set(annotationElementId, id);
  }
  removeChangedExistingAnnotation({
    annotationElementId
  }) {
    this.#changedExistingAnnotations?.delete(annotationElementId);
  }
  renderAnnotationElement(annotation) {
    const editorId = this.#changedExistingAnnotations?.get(annotation.data.id);
    if (!editorId) {
      return;
    }
    const editor = this.#annotationStorage.getRawValue(editorId);
    if (!editor) {
      return;
    }
    if (this.#mode === AnnotationEditorType.NONE && !editor.hasBeenModified) {
      return;
    }
    editor.renderAnnotationElement(annotation);
  }
}

;// CONCATENATED MODULE: ./src/display/editor/alt_text.js

class AltText {
  #altText = "";
  #altTextDecorative = false;
  #altTextButton = null;
  #altTextTooltip = null;
  #altTextTooltipTimeout = null;
  #altTextWasFromKeyBoard = false;
  #editor = null;
  static _l10nPromise = null;
  constructor(editor) {
    this.#editor = editor;
  }
  static initialize(l10nPromise) {
    AltText._l10nPromise ||= l10nPromise;
  }
  async render() {
    const altText = this.#altTextButton = document.createElement("button");
    altText.className = "altText";
    const msg = await AltText._l10nPromise.get("pdfjs-editor-alt-text-button-label");
    altText.textContent = msg;
    altText.setAttribute("aria-label", msg);
    altText.tabIndex = "0";
    altText.addEventListener("contextmenu", noContextMenu);
    altText.addEventListener("pointerdown", event => event.stopPropagation());
    const onClick = event => {
      event.preventDefault();
      this.#editor._uiManager.editAltText(this.#editor);
    };
    altText.addEventListener("click", onClick, {
      capture: true
    });
    altText.addEventListener("keydown", event => {
      if (event.target === altText && event.key === "Enter") {
        this.#altTextWasFromKeyBoard = true;
        onClick(event);
      }
    });
    await this.#setState();
    return altText;
  }
  finish() {
    if (!this.#altTextButton) {
      return;
    }
    this.#altTextButton.focus({
      focusVisible: this.#altTextWasFromKeyBoard
    });
    this.#altTextWasFromKeyBoard = false;
  }
  isEmpty() {
    return !this.#altText && !this.#altTextDecorative;
  }
  get data() {
    return {
      altText: this.#altText,
      decorative: this.#altTextDecorative
    };
  }
  set data({
    altText,
    decorative
  }) {
    if (this.#altText === altText && this.#altTextDecorative === decorative) {
      return;
    }
    this.#altText = altText;
    this.#altTextDecorative = decorative;
    this.#setState();
  }
  toggle(enabled = false) {
    if (!this.#altTextButton) {
      return;
    }
    if (!enabled && this.#altTextTooltipTimeout) {
      clearTimeout(this.#altTextTooltipTimeout);
      this.#altTextTooltipTimeout = null;
    }
    this.#altTextButton.disabled = !enabled;
  }
  destroy() {
    this.#altTextButton?.remove();
    this.#altTextButton = null;
    this.#altTextTooltip = null;
  }
  async #setState() {
    const button = this.#altTextButton;
    if (!button) {
      return;
    }
    if (!this.#altText && !this.#altTextDecorative) {
      button.classList.remove("done");
      this.#altTextTooltip?.remove();
      return;
    }
    button.classList.add("done");
    AltText._l10nPromise.get("pdfjs-editor-alt-text-edit-button-label").then(msg => {
      button.setAttribute("aria-label", msg);
    });
    let tooltip = this.#altTextTooltip;
    if (!tooltip) {
      this.#altTextTooltip = tooltip = document.createElement("span");
      tooltip.className = "tooltip";
      tooltip.setAttribute("role", "tooltip");
      const id = tooltip.id = `alt-text-tooltip-${this.#editor.id}`;
      button.setAttribute("aria-describedby", id);
      const DELAY_TO_SHOW_TOOLTIP = 100;
      button.addEventListener("mouseenter", () => {
        this.#altTextTooltipTimeout = setTimeout(() => {
          this.#altTextTooltipTimeout = null;
          this.#altTextTooltip.classList.add("show");
          this.#editor._reportTelemetry({
            action: "alt_text_tooltip"
          });
        }, DELAY_TO_SHOW_TOOLTIP);
      });
      button.addEventListener("mouseleave", () => {
        if (this.#altTextTooltipTimeout) {
          clearTimeout(this.#altTextTooltipTimeout);
          this.#altTextTooltipTimeout = null;
        }
        this.#altTextTooltip?.classList.remove("show");
      });
    }
    tooltip.innerText = this.#altTextDecorative ? await AltText._l10nPromise.get("pdfjs-editor-alt-text-decorative-tooltip") : this.#altText;
    if (!tooltip.parentNode) {
      button.append(tooltip);
    }
    const element = this.#editor.getImageForAltText();
    element?.setAttribute("aria-describedby", tooltip.id);
  }
}

;// CONCATENATED MODULE: ./src/display/editor/editor.js





class AnnotationEditor {
  #allResizerDivs = null;
  #altText = null;
  #disabled = false;
  #keepAspectRatio = false;
  #resizersDiv = null;
  #savedDimensions = null;
  #boundFocusin = this.focusin.bind(this);
  #boundFocusout = this.focusout.bind(this);
  #editToolbar = null;
  #focusedResizerName = "";
  #hasBeenClicked = false;
  #initialPosition = null;
  #isEditing = false;
  #isInEditMode = false;
  #isResizerEnabledForKeyboard = false;
  #moveInDOMTimeout = null;
  #prevDragX = 0;
  #prevDragY = 0;
  #telemetryTimeouts = null;
  _initialOptions = Object.create(null);
  _isVisible = true;
  _uiManager = null;
  _focusEventsAllowed = true;
  _l10nPromise = null;
  #isDraggable = false;
  #zIndex = AnnotationEditor._zIndex++;
  static _borderLineWidth = -1;
  static _colorManager = new ColorManager();
  static _zIndex = 1;
  static _telemetryTimeout = 1000;
  static get _resizerKeyboardManager() {
    const resize = AnnotationEditor.prototype._resizeWithKeyboard;
    const small = AnnotationEditorUIManager.TRANSLATE_SMALL;
    const big = AnnotationEditorUIManager.TRANSLATE_BIG;
    return shadow(this, "_resizerKeyboardManager", new KeyboardManager([[["ArrowLeft", "mac+ArrowLeft"], resize, {
      args: [-small, 0]
    }], [["ctrl+ArrowLeft", "mac+shift+ArrowLeft"], resize, {
      args: [-big, 0]
    }], [["ArrowRight", "mac+ArrowRight"], resize, {
      args: [small, 0]
    }], [["ctrl+ArrowRight", "mac+shift+ArrowRight"], resize, {
      args: [big, 0]
    }], [["ArrowUp", "mac+ArrowUp"], resize, {
      args: [0, -small]
    }], [["ctrl+ArrowUp", "mac+shift+ArrowUp"], resize, {
      args: [0, -big]
    }], [["ArrowDown", "mac+ArrowDown"], resize, {
      args: [0, small]
    }], [["ctrl+ArrowDown", "mac+shift+ArrowDown"], resize, {
      args: [0, big]
    }], [["Escape", "mac+Escape"], AnnotationEditor.prototype._stopResizingWithKeyboard]]));
  }
  constructor(parameters) {
    if (this.constructor === AnnotationEditor) {
      unreachable("Cannot initialize AnnotationEditor.");
    }
    this.parent = parameters.parent;
    this.id = parameters.id;
    this.width = this.height = null;
    this.pageIndex = parameters.parent.pageIndex;
    this.name = parameters.name;
    this.div = null;
    this._uiManager = parameters.uiManager;
    this.annotationElementId = null;
    this._willKeepAspectRatio = false;
    this._initialOptions.isCentered = parameters.isCentered;
    this._structTreeParentId = null;
    const {
      rotation,
      rawDims: {
        pageWidth,
        pageHeight,
        pageX,
        pageY
      }
    } = this.parent.viewport;
    this.rotation = rotation;
    this.pageRotation = (360 + rotation - this._uiManager.viewParameters.rotation) % 360;
    this.pageDimensions = [pageWidth, pageHeight];
    this.pageTranslation = [pageX, pageY];
    const [width, height] = this.parentDimensions;
    this.x = parameters.x / width;
    this.y = parameters.y / height;
    this.isAttachedToDOM = false;
    this.deleted = false;
  }
  get editorType() {
    return Object.getPrototypeOf(this).constructor._type;
  }
  static get _defaultLineColor() {
    return shadow(this, "_defaultLineColor", this._colorManager.getHexCode("CanvasText"));
  }
  static deleteAnnotationElement(editor) {
    const fakeEditor = new FakeEditor({
      id: editor.parent.getNextId(),
      parent: editor.parent,
      uiManager: editor._uiManager
    });
    fakeEditor.annotationElementId = editor.annotationElementId;
    fakeEditor.deleted = true;
    fakeEditor._uiManager.addToAnnotationStorage(fakeEditor);
  }
  static initialize(l10n, _uiManager, options) {
    AnnotationEditor._l10nPromise ||= new Map(["pdfjs-editor-alt-text-button-label", "pdfjs-editor-alt-text-edit-button-label", "pdfjs-editor-alt-text-decorative-tooltip", "pdfjs-editor-resizer-label-topLeft", "pdfjs-editor-resizer-label-topMiddle", "pdfjs-editor-resizer-label-topRight", "pdfjs-editor-resizer-label-middleRight", "pdfjs-editor-resizer-label-bottomRight", "pdfjs-editor-resizer-label-bottomMiddle", "pdfjs-editor-resizer-label-bottomLeft", "pdfjs-editor-resizer-label-middleLeft"].map(str => [str, l10n.get(str.replaceAll(/([A-Z])/g, c => `-${c.toLowerCase()}`))]));
    if (options?.strings) {
      for (const str of options.strings) {
        AnnotationEditor._l10nPromise.set(str, l10n.get(str));
      }
    }
    if (AnnotationEditor._borderLineWidth !== -1) {
      return;
    }
    const style = getComputedStyle(document.documentElement);
    AnnotationEditor._borderLineWidth = parseFloat(style.getPropertyValue("--outline-width")) || 0;
  }
  static updateDefaultParams(_type, _value) {}
  static get defaultPropertiesToUpdate() {
    return [];
  }
  static isHandlingMimeForPasting(mime) {
    return false;
  }
  static paste(item, parent) {
    unreachable("Not implemented");
  }
  get propertiesToUpdate() {
    return [];
  }
  get _isDraggable() {
    return this.#isDraggable;
  }
  set _isDraggable(value) {
    this.#isDraggable = value;
    this.div?.classList.toggle("draggable", value);
  }
  get isEnterHandled() {
    return true;
  }
  center() {
    const [pageWidth, pageHeight] = this.pageDimensions;
    switch (this.parentRotation) {
      case 90:
        this.x -= this.height * pageHeight / (pageWidth * 2);
        this.y += this.width * pageWidth / (pageHeight * 2);
        break;
      case 180:
        this.x += this.width / 2;
        this.y += this.height / 2;
        break;
      case 270:
        this.x += this.height * pageHeight / (pageWidth * 2);
        this.y -= this.width * pageWidth / (pageHeight * 2);
        break;
      default:
        this.x -= this.width / 2;
        this.y -= this.height / 2;
        break;
    }
    this.fixAndSetPosition();
  }
  addCommands(params) {
    this._uiManager.addCommands(params);
  }
  get currentLayer() {
    return this._uiManager.currentLayer;
  }
  setInBackground() {
    this.div.style.zIndex = 0;
  }
  setInForeground() {
    this.div.style.zIndex = this.#zIndex;
  }
  setParent(parent) {
    if (parent !== null) {
      this.pageIndex = parent.pageIndex;
      this.pageDimensions = parent.pageDimensions;
    } else {
      this.#stopResizing();
    }
    this.parent = parent;
  }
  focusin(event) {
    if (!this._focusEventsAllowed) {
      return;
    }
    if (!this.#hasBeenClicked) {
      this.parent.setSelected(this);
    } else {
      this.#hasBeenClicked = false;
    }
  }
  focusout(event) {
    if (!this._focusEventsAllowed) {
      return;
    }
    if (!this.isAttachedToDOM) {
      return;
    }
    const target = event.relatedTarget;
    if (target?.closest(`#${this.id}`)) {
      return;
    }
    event.preventDefault();
    if (!this.parent?.isMultipleSelection) {
      this.commitOrRemove();
    }
  }
  commitOrRemove() {
    if (this.isEmpty()) {
      this.remove();
    } else {
      this.commit();
    }
  }
  commit() {
    this.addToAnnotationStorage();
  }
  addToAnnotationStorage() {
    this._uiManager.addToAnnotationStorage(this);
  }
  setAt(x, y, tx, ty) {
    const [width, height] = this.parentDimensions;
    [tx, ty] = this.screenToPageTranslation(tx, ty);
    this.x = (x + tx) / width;
    this.y = (y + ty) / height;
    this.fixAndSetPosition();
  }
  #translate([width, height], x, y) {
    [x, y] = this.screenToPageTranslation(x, y);
    this.x += x / width;
    this.y += y / height;
    this.fixAndSetPosition();
  }
  translate(x, y) {
    this.#translate(this.parentDimensions, x, y);
  }
  translateInPage(x, y) {
    this.#initialPosition ||= [this.x, this.y];
    this.#translate(this.pageDimensions, x, y);
    this.div.scrollIntoView({
      block: "nearest"
    });
  }
  drag(tx, ty) {
    this.#initialPosition ||= [this.x, this.y];
    const [parentWidth, parentHeight] = this.parentDimensions;
    this.x += tx / parentWidth;
    this.y += ty / parentHeight;
    if (this.parent && (this.x < 0 || this.x > 1 || this.y < 0 || this.y > 1)) {
      const {
        x,
        y
      } = this.div.getBoundingClientRect();
      if (this.parent.findNewParent(this, x, y)) {
        this.x -= Math.floor(this.x);
        this.y -= Math.floor(this.y);
      }
    }
    let {
      x,
      y
    } = this;
    const [bx, by] = this.getBaseTranslation();
    x += bx;
    y += by;
    this.div.style.left = `${(100 * x).toFixed(2)}%`;
    this.div.style.top = `${(100 * y).toFixed(2)}%`;
    this.div.scrollIntoView({
      block: "nearest"
    });
  }
  get _hasBeenMoved() {
    return !!this.#initialPosition && (this.#initialPosition[0] !== this.x || this.#initialPosition[1] !== this.y);
  }
  getBaseTranslation() {
    const [parentWidth, parentHeight] = this.parentDimensions;
    const {
      _borderLineWidth
    } = AnnotationEditor;
    const x = _borderLineWidth / parentWidth;
    const y = _borderLineWidth / parentHeight;
    switch (this.rotation) {
      case 90:
        return [-x, y];
      case 180:
        return [x, y];
      case 270:
        return [x, -y];
      default:
        return [-x, -y];
    }
  }
  get _mustFixPosition() {
    return true;
  }
  fixAndSetPosition(rotation = this.rotation) {
    const [pageWidth, pageHeight] = this.pageDimensions;
    let {
      x,
      y,
      width,
      height
    } = this;
    width *= pageWidth;
    height *= pageHeight;
    x *= pageWidth;
    y *= pageHeight;
    if (this._mustFixPosition) {
      switch (rotation) {
        case 0:
          x = Math.max(0, Math.min(pageWidth - width, x));
          y = Math.max(0, Math.min(pageHeight - height, y));
          break;
        case 90:
          x = Math.max(0, Math.min(pageWidth - height, x));
          y = Math.min(pageHeight, Math.max(width, y));
          break;
        case 180:
          x = Math.min(pageWidth, Math.max(width, x));
          y = Math.min(pageHeight, Math.max(height, y));
          break;
        case 270:
          x = Math.min(pageWidth, Math.max(height, x));
          y = Math.max(0, Math.min(pageHeight - width, y));
          break;
      }
    }
    this.x = x /= pageWidth;
    this.y = y /= pageHeight;
    const [bx, by] = this.getBaseTranslation();
    x += bx;
    y += by;
    const {
      style
    } = this.div;
    style.left = `${(100 * x).toFixed(2)}%`;
    style.top = `${(100 * y).toFixed(2)}%`;
    this.moveInDOM();
  }
  static #rotatePoint(x, y, angle) {
    switch (angle) {
      case 90:
        return [y, -x];
      case 180:
        return [-x, -y];
      case 270:
        return [-y, x];
      default:
        return [x, y];
    }
  }
  screenToPageTranslation(x, y) {
    return AnnotationEditor.#rotatePoint(x, y, this.parentRotation);
  }
  pageTranslationToScreen(x, y) {
    return AnnotationEditor.#rotatePoint(x, y, 360 - this.parentRotation);
  }
  #getRotationMatrix(rotation) {
    switch (rotation) {
      case 90:
        {
          const [pageWidth, pageHeight] = this.pageDimensions;
          return [0, -pageWidth / pageHeight, pageHeight / pageWidth, 0];
        }
      case 180:
        return [-1, 0, 0, -1];
      case 270:
        {
          const [pageWidth, pageHeight] = this.pageDimensions;
          return [0, pageWidth / pageHeight, -pageHeight / pageWidth, 0];
        }
      default:
        return [1, 0, 0, 1];
    }
  }
  get parentScale() {
    return this._uiManager.viewParameters.realScale;
  }
  get parentRotation() {
    return (this._uiManager.viewParameters.rotation + this.pageRotation) % 360;
  }
  get parentDimensions() {
    const {
      parentScale,
      pageDimensions: [pageWidth, pageHeight]
    } = this;
    const scaledWidth = pageWidth * parentScale;
    const scaledHeight = pageHeight * parentScale;
    return util_FeatureTest.isCSSRoundSupported ? [Math.round(scaledWidth), Math.round(scaledHeight)] : [scaledWidth, scaledHeight];
  }
  setDims(width, height) {
    const [parentWidth, parentHeight] = this.parentDimensions;
    this.div.style.width = `${(100 * width / parentWidth).toFixed(2)}%`;
    if (!this.#keepAspectRatio) {
      this.div.style.height = `${(100 * height / parentHeight).toFixed(2)}%`;
    }
  }
  fixDims() {
    const {
      style
    } = this.div;
    const {
      height,
      width
    } = style;
    const widthPercent = width.endsWith("%");
    const heightPercent = !this.#keepAspectRatio && height.endsWith("%");
    if (widthPercent && heightPercent) {
      return;
    }
    const [parentWidth, parentHeight] = this.parentDimensions;
    if (!widthPercent) {
      style.width = `${(100 * parseFloat(width) / parentWidth).toFixed(2)}%`;
    }
    if (!this.#keepAspectRatio && !heightPercent) {
      style.height = `${(100 * parseFloat(height) / parentHeight).toFixed(2)}%`;
    }
  }
  getInitialTranslation() {
    return [0, 0];
  }
  #createResizers() {
    if (this.#resizersDiv) {
      return;
    }
    this.#resizersDiv = document.createElement("div");
    this.#resizersDiv.classList.add("resizers");
    const classes = this._willKeepAspectRatio ? ["topLeft", "topRight", "bottomRight", "bottomLeft"] : ["topLeft", "topMiddle", "topRight", "middleRight", "bottomRight", "bottomMiddle", "bottomLeft", "middleLeft"];
    for (const name of classes) {
      const div = document.createElement("div");
      this.#resizersDiv.append(div);
      div.classList.add("resizer", name);
      div.setAttribute("data-resizer-name", name);
      div.addEventListener("pointerdown", this.#resizerPointerdown.bind(this, name));
      div.addEventListener("contextmenu", noContextMenu);
      div.tabIndex = -1;
    }
    this.div.prepend(this.#resizersDiv);
  }
  #resizerPointerdown(name, event) {
    event.preventDefault();
    const {
      isMac
    } = util_FeatureTest.platform;
    if (event.button !== 0 || event.ctrlKey && isMac) {
      return;
    }
    this.#altText?.toggle(false);
    const boundResizerPointermove = this.#resizerPointermove.bind(this, name);
    const savedDraggable = this._isDraggable;
    this._isDraggable = false;
    const pointerMoveOptions = {
      passive: true,
      capture: true
    };
    this.parent.togglePointerEvents(false);
    window.addEventListener("pointermove", boundResizerPointermove, pointerMoveOptions);
    window.addEventListener("contextmenu", noContextMenu);
    const savedX = this.x;
    const savedY = this.y;
    const savedWidth = this.width;
    const savedHeight = this.height;
    const savedParentCursor = this.parent.div.style.cursor;
    const savedCursor = this.div.style.cursor;
    this.div.style.cursor = this.parent.div.style.cursor = window.getComputedStyle(event.target).cursor;
    const pointerUpCallback = () => {
      this.parent.togglePointerEvents(true);
      this.#altText?.toggle(true);
      this._isDraggable = savedDraggable;
      window.removeEventListener("pointerup", pointerUpCallback);
      window.removeEventListener("blur", pointerUpCallback);
      window.removeEventListener("pointermove", boundResizerPointermove, pointerMoveOptions);
      window.removeEventListener("contextmenu", noContextMenu);
      this.parent.div.style.cursor = savedParentCursor;
      this.div.style.cursor = savedCursor;
      this.#addResizeToUndoStack(savedX, savedY, savedWidth, savedHeight);
    };
    window.addEventListener("pointerup", pointerUpCallback);
    window.addEventListener("blur", pointerUpCallback);
  }
  #addResizeToUndoStack(savedX, savedY, savedWidth, savedHeight) {
    const newX = this.x;
    const newY = this.y;
    const newWidth = this.width;
    const newHeight = this.height;
    if (newX === savedX && newY === savedY && newWidth === savedWidth && newHeight === savedHeight) {
      return;
    }
    this.addCommands({
      cmd: () => {
        this.width = newWidth;
        this.height = newHeight;
        this.x = newX;
        this.y = newY;
        const [parentWidth, parentHeight] = this.parentDimensions;
        this.setDims(parentWidth * newWidth, parentHeight * newHeight);
        this.fixAndSetPosition();
      },
      undo: () => {
        this.width = savedWidth;
        this.height = savedHeight;
        this.x = savedX;
        this.y = savedY;
        const [parentWidth, parentHeight] = this.parentDimensions;
        this.setDims(parentWidth * savedWidth, parentHeight * savedHeight);
        this.fixAndSetPosition();
      },
      mustExec: true
    });
  }
  #resizerPointermove(name, event) {
    const [parentWidth, parentHeight] = this.parentDimensions;
    const savedX = this.x;
    const savedY = this.y;
    const savedWidth = this.width;
    const savedHeight = this.height;
    const minWidth = AnnotationEditor.MIN_SIZE / parentWidth;
    const minHeight = AnnotationEditor.MIN_SIZE / parentHeight;
    const round = x => Math.round(x * 10000) / 10000;
    const rotationMatrix = this.#getRotationMatrix(this.rotation);
    const transf = (x, y) => [rotationMatrix[0] * x + rotationMatrix[2] * y, rotationMatrix[1] * x + rotationMatrix[3] * y];
    const invRotationMatrix = this.#getRotationMatrix(360 - this.rotation);
    const invTransf = (x, y) => [invRotationMatrix[0] * x + invRotationMatrix[2] * y, invRotationMatrix[1] * x + invRotationMatrix[3] * y];
    let getPoint;
    let getOpposite;
    let isDiagonal = false;
    let isHorizontal = false;
    switch (name) {
      case "topLeft":
        isDiagonal = true;
        getPoint = (w, h) => [0, 0];
        getOpposite = (w, h) => [w, h];
        break;
      case "topMiddle":
        getPoint = (w, h) => [w / 2, 0];
        getOpposite = (w, h) => [w / 2, h];
        break;
      case "topRight":
        isDiagonal = true;
        getPoint = (w, h) => [w, 0];
        getOpposite = (w, h) => [0, h];
        break;
      case "middleRight":
        isHorizontal = true;
        getPoint = (w, h) => [w, h / 2];
        getOpposite = (w, h) => [0, h / 2];
        break;
      case "bottomRight":
        isDiagonal = true;
        getPoint = (w, h) => [w, h];
        getOpposite = (w, h) => [0, 0];
        break;
      case "bottomMiddle":
        getPoint = (w, h) => [w / 2, h];
        getOpposite = (w, h) => [w / 2, 0];
        break;
      case "bottomLeft":
        isDiagonal = true;
        getPoint = (w, h) => [0, h];
        getOpposite = (w, h) => [w, 0];
        break;
      case "middleLeft":
        isHorizontal = true;
        getPoint = (w, h) => [0, h / 2];
        getOpposite = (w, h) => [w, h / 2];
        break;
    }
    const point = getPoint(savedWidth, savedHeight);
    const oppositePoint = getOpposite(savedWidth, savedHeight);
    let transfOppositePoint = transf(...oppositePoint);
    const oppositeX = round(savedX + transfOppositePoint[0]);
    const oppositeY = round(savedY + transfOppositePoint[1]);
    let ratioX = 1;
    let ratioY = 1;
    let [deltaX, deltaY] = this.screenToPageTranslation(event.movementX, event.movementY);
    [deltaX, deltaY] = invTransf(deltaX / parentWidth, deltaY / parentHeight);
    if (isDiagonal) {
      const oldDiag = Math.hypot(savedWidth, savedHeight);
      ratioX = ratioY = Math.max(Math.min(Math.hypot(oppositePoint[0] - point[0] - deltaX, oppositePoint[1] - point[1] - deltaY) / oldDiag, 1 / savedWidth, 1 / savedHeight), minWidth / savedWidth, minHeight / savedHeight);
    } else if (isHorizontal) {
      ratioX = Math.max(minWidth, Math.min(1, Math.abs(oppositePoint[0] - point[0] - deltaX))) / savedWidth;
    } else {
      ratioY = Math.max(minHeight, Math.min(1, Math.abs(oppositePoint[1] - point[1] - deltaY))) / savedHeight;
    }
    const newWidth = round(savedWidth * ratioX);
    const newHeight = round(savedHeight * ratioY);
    transfOppositePoint = transf(...getOpposite(newWidth, newHeight));
    const newX = oppositeX - transfOppositePoint[0];
    const newY = oppositeY - transfOppositePoint[1];
    this.width = newWidth;
    this.height = newHeight;
    this.x = newX;
    this.y = newY;
    this.setDims(parentWidth * newWidth, parentHeight * newHeight);
    this.fixAndSetPosition();
  }
  altTextFinish() {
    this.#altText?.finish();
  }
  async addEditToolbar() {
    if (this.#editToolbar || this.#isInEditMode) {
      return this.#editToolbar;
    }
    this.#editToolbar = new EditorToolbar(this);
    this.div.append(this.#editToolbar.render());
    if (this.#altText) {
      this.#editToolbar.addAltTextButton(await this.#altText.render());
    }
    return this.#editToolbar;
  }
  removeEditToolbar() {
    if (!this.#editToolbar) {
      return;
    }
    this.#editToolbar.remove();
    this.#editToolbar = null;
    this.#altText?.destroy();
  }
  getClientDimensions() {
    return this.div.getBoundingClientRect();
  }
  async addAltTextButton() {
    if (this.#altText) {
      return;
    }
    AltText.initialize(AnnotationEditor._l10nPromise);
    this.#altText = new AltText(this);
    await this.addEditToolbar();
  }
  get altTextData() {
    return this.#altText?.data;
  }
  set altTextData(data) {
    if (!this.#altText) {
      return;
    }
    this.#altText.data = data;
  }
  hasAltText() {
    return !this.#altText?.isEmpty();
  }
  render() {
    this.div = document.createElement("div");
    this.div.setAttribute("data-editor-rotation", (360 - this.rotation) % 360);
    this.div.className = this.name;
    this.div.setAttribute("id", this.id);
    this.div.tabIndex = this.#disabled ? -1 : 0;
    if (!this._isVisible) {
      this.div.classList.add("hidden");
    }
    this.setInForeground();
    this.div.addEventListener("focusin", this.#boundFocusin);
    this.div.addEventListener("focusout", this.#boundFocusout);
    const [parentWidth, parentHeight] = this.parentDimensions;
    if (this.parentRotation % 180 !== 0) {
      this.div.style.maxWidth = `${(100 * parentHeight / parentWidth).toFixed(2)}%`;
      this.div.style.maxHeight = `${(100 * parentWidth / parentHeight).toFixed(2)}%`;
    }
    const [tx, ty] = this.getInitialTranslation();
    this.translate(tx, ty);
    bindEvents(this, this.div, ["pointerdown"]);
    return this.div;
  }
  pointerdown(event) {
    const {
      isMac
    } = util_FeatureTest.platform;
    if (event.button !== 0 || event.ctrlKey && isMac) {
      event.preventDefault();
      return;
    }
    this.#hasBeenClicked = true;
    if (this._isDraggable) {
      this.#setUpDragSession(event);
      return;
    }
    this.#selectOnPointerEvent(event);
  }
  #selectOnPointerEvent(event) {
    const {
      isMac
    } = util_FeatureTest.platform;
    if (event.ctrlKey && !isMac || event.shiftKey || event.metaKey && isMac) {
      this.parent.toggleSelected(this);
    } else {
      this.parent.setSelected(this);
    }
  }
  #setUpDragSession(event) {
    const isSelected = this._uiManager.isSelected(this);
    this._uiManager.setUpDragSession();
    let pointerMoveOptions, pointerMoveCallback;
    if (isSelected) {
      this.div.classList.add("moving");
      pointerMoveOptions = {
        passive: true,
        capture: true
      };
      this.#prevDragX = event.clientX;
      this.#prevDragY = event.clientY;
      pointerMoveCallback = e => {
        const {
          clientX: x,
          clientY: y
        } = e;
        const [tx, ty] = this.screenToPageTranslation(x - this.#prevDragX, y - this.#prevDragY);
        this.#prevDragX = x;
        this.#prevDragY = y;
        this._uiManager.dragSelectedEditors(tx, ty);
      };
      window.addEventListener("pointermove", pointerMoveCallback, pointerMoveOptions);
    }
    const pointerUpCallback = () => {
      window.removeEventListener("pointerup", pointerUpCallback);
      window.removeEventListener("blur", pointerUpCallback);
      if (isSelected) {
        this.div.classList.remove("moving");
        window.removeEventListener("pointermove", pointerMoveCallback, pointerMoveOptions);
      }
      this.#hasBeenClicked = false;
      if (!this._uiManager.endDragSession()) {
        this.#selectOnPointerEvent(event);
      }
    };
    window.addEventListener("pointerup", pointerUpCallback);
    window.addEventListener("blur", pointerUpCallback);
  }
  moveInDOM() {
    if (this.#moveInDOMTimeout) {
      clearTimeout(this.#moveInDOMTimeout);
    }
    this.#moveInDOMTimeout = setTimeout(() => {
      this.#moveInDOMTimeout = null;
      this.parent?.moveEditorInDOM(this);
    }, 0);
  }
  _setParentAndPosition(parent, x, y) {
    parent.changeParent(this);
    this.x = x;
    this.y = y;
    this.fixAndSetPosition();
  }
  getRect(tx, ty, rotation = this.rotation) {
    const scale = this.parentScale;
    const [pageWidth, pageHeight] = this.pageDimensions;
    const [pageX, pageY] = this.pageTranslation;
    const shiftX = tx / scale;
    const shiftY = ty / scale;
    const x = this.x * pageWidth;
    const y = this.y * pageHeight;
    const width = this.width * pageWidth;
    const height = this.height * pageHeight;
    switch (rotation) {
      case 0:
        return [x + shiftX + pageX, pageHeight - y - shiftY - height + pageY, x + shiftX + width + pageX, pageHeight - y - shiftY + pageY];
      case 90:
        return [x + shiftY + pageX, pageHeight - y + shiftX + pageY, x + shiftY + height + pageX, pageHeight - y + shiftX + width + pageY];
      case 180:
        return [x - shiftX - width + pageX, pageHeight - y + shiftY + pageY, x - shiftX + pageX, pageHeight - y + shiftY + height + pageY];
      case 270:
        return [x - shiftY - height + pageX, pageHeight - y - shiftX - width + pageY, x - shiftY + pageX, pageHeight - y - shiftX + pageY];
      default:
        throw new Error("Invalid rotation");
    }
  }
  getRectInCurrentCoords(rect, pageHeight) {
    const [x1, y1, x2, y2] = rect;
    const width = x2 - x1;
    const height = y2 - y1;
    switch (this.rotation) {
      case 0:
        return [x1, pageHeight - y2, width, height];
      case 90:
        return [x1, pageHeight - y1, height, width];
      case 180:
        return [x2, pageHeight - y1, width, height];
      case 270:
        return [x2, pageHeight - y2, height, width];
      default:
        throw new Error("Invalid rotation");
    }
  }
  onceAdded() {}
  isEmpty() {
    return false;
  }
  enableEditMode() {
    this.#isInEditMode = true;
  }
  disableEditMode() {
    this.#isInEditMode = false;
  }
  isInEditMode() {
    return this.#isInEditMode;
  }
  shouldGetKeyboardEvents() {
    return this.#isResizerEnabledForKeyboard;
  }
  needsToBeRebuilt() {
    return this.div && !this.isAttachedToDOM;
  }
  rebuild() {
    this.div?.addEventListener("focusin", this.#boundFocusin);
    this.div?.addEventListener("focusout", this.#boundFocusout);
  }
  rotate(_angle) {}
  serialize(isForCopying = false, context = null) {
    unreachable("An editor must be serializable");
  }
  static deserialize(data, parent, uiManager) {
    const editor = new this.prototype.constructor({
      parent,
      id: parent.getNextId(),
      uiManager
    });
    editor.rotation = data.rotation;
    const [pageWidth, pageHeight] = editor.pageDimensions;
    const [x, y, width, height] = editor.getRectInCurrentCoords(data.rect, pageHeight);
    editor.x = x / pageWidth;
    editor.y = y / pageHeight;
    editor.width = width / pageWidth;
    editor.height = height / pageHeight;
    return editor;
  }
  get hasBeenModified() {
    return !!this.annotationElementId && (this.deleted || this.serialize() !== null);
  }
  remove() {
    this.div.removeEventListener("focusin", this.#boundFocusin);
    this.div.removeEventListener("focusout", this.#boundFocusout);
    if (!this.isEmpty()) {
      this.commit();
    }
    if (this.parent) {
      this.parent.remove(this);
    } else {
      this._uiManager.removeEditor(this);
    }
    if (this.#moveInDOMTimeout) {
      clearTimeout(this.#moveInDOMTimeout);
      this.#moveInDOMTimeout = null;
    }
    this.#stopResizing();
    this.removeEditToolbar();
    if (this.#telemetryTimeouts) {
      for (const timeout of this.#telemetryTimeouts.values()) {
        clearTimeout(timeout);
      }
      this.#telemetryTimeouts = null;
    }
    this.parent = null;
  }
  get isResizable() {
    return false;
  }
  makeResizable() {
    if (this.isResizable) {
      this.#createResizers();
      this.#resizersDiv.classList.remove("hidden");
      bindEvents(this, this.div, ["keydown"]);
    }
  }
  get toolbarPosition() {
    return null;
  }
  keydown(event) {
    if (!this.isResizable || event.target !== this.div || event.key !== "Enter") {
      return;
    }
    this._uiManager.setSelected(this);
    this.#savedDimensions = {
      savedX: this.x,
      savedY: this.y,
      savedWidth: this.width,
      savedHeight: this.height
    };
    const children = this.#resizersDiv.children;
    if (!this.#allResizerDivs) {
      this.#allResizerDivs = Array.from(children);
      const boundResizerKeydown = this.#resizerKeydown.bind(this);
      const boundResizerBlur = this.#resizerBlur.bind(this);
      for (const div of this.#allResizerDivs) {
        const name = div.getAttribute("data-resizer-name");
        div.setAttribute("role", "spinbutton");
        div.addEventListener("keydown", boundResizerKeydown);
        div.addEventListener("blur", boundResizerBlur);
        div.addEventListener("focus", this.#resizerFocus.bind(this, name));
        AnnotationEditor._l10nPromise.get(`pdfjs-editor-resizer-label-${name}`).then(msg => div.setAttribute("aria-label", msg));
      }
    }
    const first = this.#allResizerDivs[0];
    let firstPosition = 0;
    for (const div of children) {
      if (div === first) {
        break;
      }
      firstPosition++;
    }
    const nextFirstPosition = (360 - this.rotation + this.parentRotation) % 360 / 90 * (this.#allResizerDivs.length / 4);
    if (nextFirstPosition !== firstPosition) {
      if (nextFirstPosition < firstPosition) {
        for (let i = 0; i < firstPosition - nextFirstPosition; i++) {
          this.#resizersDiv.append(this.#resizersDiv.firstChild);
        }
      } else if (nextFirstPosition > firstPosition) {
        for (let i = 0; i < nextFirstPosition - firstPosition; i++) {
          this.#resizersDiv.firstChild.before(this.#resizersDiv.lastChild);
        }
      }
      let i = 0;
      for (const child of children) {
        const div = this.#allResizerDivs[i++];
        const name = div.getAttribute("data-resizer-name");
        AnnotationEditor._l10nPromise.get(`pdfjs-editor-resizer-label-${name}`).then(msg => child.setAttribute("aria-label", msg));
      }
    }
    this.#setResizerTabIndex(0);
    this.#isResizerEnabledForKeyboard = true;
    this.#resizersDiv.firstChild.focus({
      focusVisible: true
    });
    event.preventDefault();
    event.stopImmediatePropagation();
  }
  #resizerKeydown(event) {
    AnnotationEditor._resizerKeyboardManager.exec(this, event);
  }
  #resizerBlur(event) {
    if (this.#isResizerEnabledForKeyboard && event.relatedTarget?.parentNode !== this.#resizersDiv) {
      this.#stopResizing();
    }
  }
  #resizerFocus(name) {
    this.#focusedResizerName = this.#isResizerEnabledForKeyboard ? name : "";
  }
  #setResizerTabIndex(value) {
    if (!this.#allResizerDivs) {
      return;
    }
    for (const div of this.#allResizerDivs) {
      div.tabIndex = value;
    }
  }
  _resizeWithKeyboard(x, y) {
    if (!this.#isResizerEnabledForKeyboard) {
      return;
    }
    this.#resizerPointermove(this.#focusedResizerName, {
      movementX: x,
      movementY: y
    });
  }
  #stopResizing() {
    this.#isResizerEnabledForKeyboard = false;
    this.#setResizerTabIndex(-1);
    if (this.#savedDimensions) {
      const {
        savedX,
        savedY,
        savedWidth,
        savedHeight
      } = this.#savedDimensions;
      this.#addResizeToUndoStack(savedX, savedY, savedWidth, savedHeight);
      this.#savedDimensions = null;
    }
  }
  _stopResizingWithKeyboard() {
    this.#stopResizing();
    this.div.focus();
  }
  select() {
    this.makeResizable();
    this.div?.classList.add("selectedEditor");
    if (!this.#editToolbar) {
      this.addEditToolbar().then(() => {
        if (this.div?.classList.contains("selectedEditor")) {
          this.#editToolbar?.show();
        }
      });
      return;
    }
    this.#editToolbar?.show();
  }
  unselect() {
    this.#resizersDiv?.classList.add("hidden");
    this.div?.classList.remove("selectedEditor");
    if (this.div?.contains(document.activeElement)) {
      this._uiManager.currentLayer.div.focus({
        preventScroll: true
      });
    }
    this.#editToolbar?.hide();
  }
  updateParams(type, value) {}
  disableEditing() {}
  enableEditing() {}
  enterInEditMode() {}
  getImageForAltText() {
    return null;
  }
  get contentDiv() {
    return this.div;
  }
  get isEditing() {
    return this.#isEditing;
  }
  set isEditing(value) {
    this.#isEditing = value;
    if (!this.parent) {
      return;
    }
    if (value) {
      this.parent.setSelected(this);
      this.parent.setActiveEditor(this);
    } else {
      this.parent.setActiveEditor(null);
    }
  }
  setAspectRatio(width, height) {
    this.#keepAspectRatio = true;
    const aspectRatio = width / height;
    const {
      style
    } = this.div;
    style.aspectRatio = aspectRatio;
    style.height = "auto";
  }
  static get MIN_SIZE() {
    return 16;
  }
  static canCreateNewEmptyEditor() {
    return true;
  }
  get telemetryInitialData() {
    return {
      action: "added"
    };
  }
  get telemetryFinalData() {
    return null;
  }
  _reportTelemetry(data, mustWait = false) {
    if (mustWait) {
      this.#telemetryTimeouts ||= new Map();
      const {
        action
      } = data;
      let timeout = this.#telemetryTimeouts.get(action);
      if (timeout) {
        clearTimeout(timeout);
      }
      timeout = setTimeout(() => {
        this._reportTelemetry(data);
        this.#telemetryTimeouts.delete(action);
        if (this.#telemetryTimeouts.size === 0) {
          this.#telemetryTimeouts = null;
        }
      }, AnnotationEditor._telemetryTimeout);
      this.#telemetryTimeouts.set(action, timeout);
      return;
    }
    data.type ||= this.editorType;
    this._uiManager._eventBus.dispatch("reporttelemetry", {
      source: this,
      details: {
        type: "editing",
        data
      }
    });
  }
  show(visible = this._isVisible) {
    this.div.classList.toggle("hidden", !visible);
    this._isVisible = visible;
  }
  enable() {
    if (this.div) {
      this.div.tabIndex = 0;
    }
    this.#disabled = false;
  }
  disable() {
    if (this.div) {
      this.div.tabIndex = -1;
    }
    this.#disabled = true;
  }
  renderAnnotationElement(annotation) {
    let content = annotation.container.querySelector(".annotationContent");
    if (!content) {
      content = document.createElement("div");
      content.classList.add("annotationContent", this.editorType);
      annotation.container.prepend(content);
    } else if (content.nodeName === "CANVAS") {
      const canvas = content;
      content = document.createElement("div");
      content.classList.add("annotationContent", this.editorType);
      canvas.before(content);
    }
    return content;
  }
  resetAnnotationElement(annotation) {
    const {
      firstChild
    } = annotation.container;
    if (firstChild.nodeName === "DIV" && firstChild.classList.contains("annotationContent")) {
      firstChild.remove();
    }
  }
}
class FakeEditor extends AnnotationEditor {
  constructor(params) {
    super(params);
    this.annotationElementId = params.annotationElementId;
    this.deleted = true;
  }
  serialize() {
    return {
      id: this.annotationElementId,
      deleted: true,
      pageIndex: this.pageIndex
    };
  }
}

;// CONCATENATED MODULE: ./src/shared/murmurhash3.js
const SEED = 0xc3d2e1f0;
const MASK_HIGH = 0xffff0000;
const MASK_LOW = 0xffff;
class MurmurHash3_64 {
  constructor(seed) {
    this.h1 = seed ? seed & 0xffffffff : SEED;
    this.h2 = seed ? seed & 0xffffffff : SEED;
  }
  update(input) {
    let data, length;
    if (typeof input === "string") {
      data = new Uint8Array(input.length * 2);
      length = 0;
      for (let i = 0, ii = input.length; i < ii; i++) {
        const code = input.charCodeAt(i);
        if (code <= 0xff) {
          data[length++] = code;
        } else {
          data[length++] = code >>> 8;
          data[length++] = code & 0xff;
        }
      }
    } else if (ArrayBuffer.isView(input)) {
      data = input.slice();
      length = data.byteLength;
    } else {
      throw new Error("Invalid data format, must be a string or TypedArray.");
    }
    const blockCounts = length >> 2;
    const tailLength = length - blockCounts * 4;
    const dataUint32 = new Uint32Array(data.buffer, 0, blockCounts);
    let k1 = 0,
      k2 = 0;
    let h1 = this.h1,
      h2 = this.h2;
    const C1 = 0xcc9e2d51,
      C2 = 0x1b873593;
    const C1_LOW = C1 & MASK_LOW,
      C2_LOW = C2 & MASK_LOW;
    for (let i = 0; i < blockCounts; i++) {
      if (i & 1) {
        k1 = dataUint32[i];
        k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW;
        k1 = k1 << 15 | k1 >>> 17;
        k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW;
        h1 ^= k1;
        h1 = h1 << 13 | h1 >>> 19;
        h1 = h1 * 5 + 0xe6546b64;
      } else {
        k2 = dataUint32[i];
        k2 = k2 * C1 & MASK_HIGH | k2 * C1_LOW & MASK_LOW;
        k2 = k2 << 15 | k2 >>> 17;
        k2 = k2 * C2 & MASK_HIGH | k2 * C2_LOW & MASK_LOW;
        h2 ^= k2;
        h2 = h2 << 13 | h2 >>> 19;
        h2 = h2 * 5 + 0xe6546b64;
      }
    }
    k1 = 0;
    switch (tailLength) {
      case 3:
        k1 ^= data[blockCounts * 4 + 2] << 16;
      case 2:
        k1 ^= data[blockCounts * 4 + 1] << 8;
      case 1:
        k1 ^= data[blockCounts * 4];
        k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW;
        k1 = k1 << 15 | k1 >>> 17;
        k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW;
        if (blockCounts & 1) {
          h1 ^= k1;
        } else {
          h2 ^= k1;
        }
    }
    this.h1 = h1;
    this.h2 = h2;
  }
  hexdigest() {
    let h1 = this.h1,
      h2 = this.h2;
    h1 ^= h2 >>> 1;
    h1 = h1 * 0xed558ccd & MASK_HIGH | h1 * 0x8ccd & MASK_LOW;
    h2 = h2 * 0xff51afd7 & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xafd7ed55 & MASK_HIGH) >>> 16;
    h1 ^= h2 >>> 1;
    h1 = h1 * 0x1a85ec53 & MASK_HIGH | h1 * 0xec53 & MASK_LOW;
    h2 = h2 * 0xc4ceb9fe & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xb9fe1a85 & MASK_HIGH) >>> 16;
    h1 ^= h2 >>> 1;
    return (h1 >>> 0).toString(16).padStart(8, "0") + (h2 >>> 0).toString(16).padStart(8, "0");
  }
}

;// CONCATENATED MODULE: ./src/display/annotation_storage.js



const SerializableEmpty = Object.freeze({
  map: null,
  hash: "",
  transfer: undefined
});
class AnnotationStorage {
  #modified = false;
  #storage = new Map();
  constructor() {
    this.onSetModified = null;
    this.onResetModified = null;
    this.onAnnotationEditor = null;
  }
  getValue(key, defaultValue) {
    const value = this.#storage.get(key);
    if (value === undefined) {
      return defaultValue;
    }
    return Object.assign(defaultValue, value);
  }
  getRawValue(key) {
    return this.#storage.get(key);
  }
  remove(key) {
    this.#storage.delete(key);
    if (this.#storage.size === 0) {
      this.resetModified();
    }
    if (typeof this.onAnnotationEditor === "function") {
      for (const value of this.#storage.values()) {
        if (value instanceof AnnotationEditor) {
          return;
        }
      }
      this.onAnnotationEditor(null);
    }
  }
  setValue(key, value) {
    const obj = this.#storage.get(key);
    let modified = false;
    if (obj !== undefined) {
      for (const [entry, val] of Object.entries(value)) {
        if (obj[entry] !== val) {
          modified = true;
          obj[entry] = val;
        }
      }
    } else {
      modified = true;
      this.#storage.set(key, value);
    }
    if (modified) {
      this.#setModified();
    }
    if (value instanceof AnnotationEditor && typeof this.onAnnotationEditor === "function") {
      this.onAnnotationEditor(value.constructor._type);
    }
  }
  has(key) {
    return this.#storage.has(key);
  }
  getAll() {
    return this.#storage.size > 0 ? objectFromMap(this.#storage) : null;
  }
  setAll(obj) {
    for (const [key, val] of Object.entries(obj)) {
      this.setValue(key, val);
    }
  }
  get size() {
    return this.#storage.size;
  }
  #setModified() {
    if (!this.#modified) {
      this.#modified = true;
      if (typeof this.onSetModified === "function") {
        this.onSetModified();
      }
    }
  }
  resetModified() {
    if (this.#modified) {
      this.#modified = false;
      if (typeof this.onResetModified === "function") {
        this.onResetModified();
      }
    }
  }
  get print() {
    return new PrintAnnotationStorage(this);
  }
  get serializable() {
    if (this.#storage.size === 0) {
      return SerializableEmpty;
    }
    const map = new Map(),
      hash = new MurmurHash3_64(),
      transfer = [];
    const context = Object.create(null);
    let hasBitmap = false;
    for (const [key, val] of this.#storage) {
      const serialized = val instanceof AnnotationEditor ? val.serialize(false, context) : val;
      if (serialized) {
        map.set(key, serialized);
        hash.update(`${key}:${JSON.stringify(serialized)}`);
        hasBitmap ||= !!serialized.bitmap;
      }
    }
    if (hasBitmap) {
      for (const value of map.values()) {
        if (value.bitmap) {
          transfer.push(value.bitmap);
        }
      }
    }
    return map.size > 0 ? {
      map,
      hash: hash.hexdigest(),
      transfer
    } : SerializableEmpty;
  }
  get editorStats() {
    let stats = null;
    const typeToEditor = new Map();
    for (const value of this.#storage.values()) {
      if (!(value instanceof AnnotationEditor)) {
        continue;
      }
      const editorStats = value.telemetryFinalData;
      if (!editorStats) {
        continue;
      }
      const {
        type
      } = editorStats;
      if (!typeToEditor.has(type)) {
        typeToEditor.set(type, Object.getPrototypeOf(value).constructor);
      }
      stats ||= Object.create(null);
      const map = stats[type] ||= new Map();
      for (const [key, val] of Object.entries(editorStats)) {
        if (key === "type") {
          continue;
        }
        let counters = map.get(key);
        if (!counters) {
          counters = new Map();
          map.set(key, counters);
        }
        const count = counters.get(val) ?? 0;
        counters.set(val, count + 1);
      }
    }
    for (const [type, editor] of typeToEditor) {
      stats[type] = editor.computeTelemetryFinalData(stats[type]);
    }
    return stats;
  }
}
class PrintAnnotationStorage extends AnnotationStorage {
  #serializable;
  constructor(parent) {
    super();
    const {
      map,
      hash,
      transfer
    } = parent.serializable;
    const clone = structuredClone(map, transfer ? {
      transfer
    } : null);
    this.#serializable = {
      map: clone,
      hash,
      transfer
    };
  }
  get print() {
    unreachable("Should not call PrintAnnotationStorage.print");
  }
  get serializable() {
    return this.#serializable;
  }
}

;// CONCATENATED MODULE: ./src/display/font_loader.js

class FontLoader {
  #systemFonts = new Set();
  constructor({
    ownerDocument = globalThis.document,
    styleElement = null
  }) {
    this._document = ownerDocument;
    this.nativeFontFaces = new Set();
    this.styleElement = null;
    this.loadingRequests = [];
    this.loadTestFontId = 0;
  }
  addNativeFontFace(nativeFontFace) {
    this.nativeFontFaces.add(nativeFontFace);
    this._document.fonts.add(nativeFontFace);
  }
  removeNativeFontFace(nativeFontFace) {
    this.nativeFontFaces.delete(nativeFontFace);
    this._document.fonts.delete(nativeFontFace);
  }
  insertRule(rule) {
    if (!this.styleElement) {
      this.styleElement = this._document.createElement("style");
      this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement);
    }
    const styleSheet = this.styleElement.sheet;
    styleSheet.insertRule(rule, styleSheet.cssRules.length);
  }
  clear() {
    for (const nativeFontFace of this.nativeFontFaces) {
      this._document.fonts.delete(nativeFontFace);
    }
    this.nativeFontFaces.clear();
    this.#systemFonts.clear();
    if (this.styleElement) {
      this.styleElement.remove();
      this.styleElement = null;
    }
  }
  async loadSystemFont({
    systemFontInfo: info,
    _inspectFont
  }) {
    if (!info || this.#systemFonts.has(info.loadedName)) {
      return;
    }
    assert(!this.disableFontFace, "loadSystemFont shouldn't be called when `disableFontFace` is set.");
    if (this.isFontLoadingAPISupported) {
      const {
        loadedName,
        src,
        style
      } = info;
      const fontFace = new FontFace(loadedName, src, style);
      this.addNativeFontFace(fontFace);
      try {
        await fontFace.load();
        this.#systemFonts.add(loadedName);
        _inspectFont?.(info);
      } catch {
        warn(`Cannot load system font: ${info.baseFontName}, installing it could help to improve PDF rendering.`);
        this.removeNativeFontFace(fontFace);
      }
      return;
    }
    unreachable("Not implemented: loadSystemFont without the Font Loading API.");
  }
  async bind(font) {
    if (font.attached || font.missingFile && !font.systemFontInfo) {
      return;
    }
    font.attached = true;
    if (font.systemFontInfo) {
      await this.loadSystemFont(font);
      return;
    }
    if (this.isFontLoadingAPISupported) {
      const nativeFontFace = font.createNativeFontFace();
      if (nativeFontFace) {
        this.addNativeFontFace(nativeFontFace);
        try {
          await nativeFontFace.loaded;
        } catch (ex) {
          warn(`Failed to load font '${nativeFontFace.family}': '${ex}'.`);
          font.disableFontFace = true;
          throw ex;
        }
      }
      return;
    }
    const rule = font.createFontFaceRule();
    if (rule) {
      this.insertRule(rule);
      if (this.isSyncFontLoadingSupported) {
        return;
      }
      await new Promise(resolve => {
        const request = this._queueLoadingCallback(resolve);
        this._prepareFontLoadEvent(font, request);
      });
    }
  }
  get isFontLoadingAPISupported() {
    const hasFonts = !!this._document?.fonts;
    return shadow(this, "isFontLoadingAPISupported", hasFonts);
  }
  get isSyncFontLoadingSupported() {
    let supported = false;
    if (isNodeJS) {
      supported = true;
    } else if (typeof navigator !== "undefined" && typeof navigator?.userAgent === "string" && /Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent)) {
      supported = true;
    }
    return shadow(this, "isSyncFontLoadingSupported", supported);
  }
  _queueLoadingCallback(callback) {
    function completeRequest() {
      assert(!request.done, "completeRequest() cannot be called twice.");
      request.done = true;
      while (loadingRequests.length > 0 && loadingRequests[0].done) {
        const otherRequest = loadingRequests.shift();
        setTimeout(otherRequest.callback, 0);
      }
    }
    const {
      loadingRequests
    } = this;
    const request = {
      done: false,
      complete: completeRequest,
      callback
    };
    loadingRequests.push(request);
    return request;
  }
  get _loadTestFont() {
    const testFont = atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQA" + "FQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAA" + "ALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgA" + "AAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1" + "AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD" + "6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACM" + "AooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4D" + "IP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAA" + "AAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUA" + "AQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgAB" + "AAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABY" + "AAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAA" + "AC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAA" + "AAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQAC" + "AQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3" + "Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTj" + "FQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");
    return shadow(this, "_loadTestFont", testFont);
  }
  _prepareFontLoadEvent(font, request) {
    function int32(data, offset) {
      return data.charCodeAt(offset) << 24 | data.charCodeAt(offset + 1) << 16 | data.charCodeAt(offset + 2) << 8 | data.charCodeAt(offset + 3) & 0xff;
    }
    function spliceString(s, offset, remove, insert) {
      const chunk1 = s.substring(0, offset);
      const chunk2 = s.substring(offset + remove);
      return chunk1 + insert + chunk2;
    }
    let i, ii;
    const canvas = this._document.createElement("canvas");
    canvas.width = 1;
    canvas.height = 1;
    const ctx = canvas.getContext("2d");
    let called = 0;
    function isFontReady(name, callback) {
      if (++called > 30) {
        warn("Load test font never loaded.");
        callback();
        return;
      }
      ctx.font = "30px " + name;
      ctx.fillText(".", 0, 20);
      const imageData = ctx.getImageData(0, 0, 1, 1);
      if (imageData.data[3] > 0) {
        callback();
        return;
      }
      setTimeout(isFontReady.bind(null, name, callback));
    }
    const loadTestFontId = `lt${Date.now()}${this.loadTestFontId++}`;
    let data = this._loadTestFont;
    const COMMENT_OFFSET = 976;
    data = spliceString(data, COMMENT_OFFSET, loadTestFontId.length, loadTestFontId);
    const CFF_CHECKSUM_OFFSET = 16;
    const XXXX_VALUE = 0x58585858;
    let checksum = int32(data, CFF_CHECKSUM_OFFSET);
    for (i = 0, ii = loadTestFontId.length - 3; i < ii; i += 4) {
      checksum = checksum - XXXX_VALUE + int32(loadTestFontId, i) | 0;
    }
    if (i < loadTestFontId.length) {
      checksum = checksum - XXXX_VALUE + int32(loadTestFontId + "XXX", i) | 0;
    }
    data = spliceString(data, CFF_CHECKSUM_OFFSET, 4, string32(checksum));
    const url = `url(data:font/opentype;base64,${btoa(data)});`;
    const rule = `@font-face {font-family:"${loadTestFontId}";src:${url}}`;
    this.insertRule(rule);
    const div = this._document.createElement("div");
    div.style.visibility = "hidden";
    div.style.width = div.style.height = "10px";
    div.style.position = "absolute";
    div.style.top = div.style.left = "0px";
    for (const name of [font.loadedName, loadTestFontId]) {
      const span = this._document.createElement("span");
      span.textContent = "Hi";
      span.style.fontFamily = name;
      div.append(span);
    }
    this._document.body.append(div);
    isFontReady(loadTestFontId, () => {
      div.remove();
      request.complete();
    });
  }
}
class FontFaceObject {
  constructor(translatedData, {
    disableFontFace = false,
    inspectFont = null
  }) {
    this.compiledGlyphs = Object.create(null);
    for (const i in translatedData) {
      this[i] = translatedData[i];
    }
    this.disableFontFace = disableFontFace === true;
    this._inspectFont = inspectFont;
  }
  createNativeFontFace() {
    if (!this.data || this.disableFontFace) {
      return null;
    }
    let nativeFontFace;
    if (!this.cssFontInfo) {
      nativeFontFace = new FontFace(this.loadedName, this.data, {});
    } else {
      const css = {
        weight: this.cssFontInfo.fontWeight
      };
      if (this.cssFontInfo.italicAngle) {
        css.style = `oblique ${this.cssFontInfo.italicAngle}deg`;
      }
      nativeFontFace = new FontFace(this.cssFontInfo.fontFamily, this.data, css);
    }
    this._inspectFont?.(this);
    return nativeFontFace;
  }
  createFontFaceRule() {
    if (!this.data || this.disableFontFace) {
      return null;
    }
    const data = bytesToString(this.data);
    const url = `url(data:${this.mimetype};base64,${btoa(data)});`;
    let rule;
    if (!this.cssFontInfo) {
      rule = `@font-face {font-family:"${this.loadedName}";src:${url}}`;
    } else {
      let css = `font-weight: ${this.cssFontInfo.fontWeight};`;
      if (this.cssFontInfo.italicAngle) {
        css += `font-style: oblique ${this.cssFontInfo.italicAngle}deg;`;
      }
      rule = `@font-face {font-family:"${this.cssFontInfo.fontFamily}";${css}src:${url}}`;
    }
    this._inspectFont?.(this, url);
    return rule;
  }
  getPathGenerator(objs, character) {
    if (this.compiledGlyphs[character] !== undefined) {
      return this.compiledGlyphs[character];
    }
    let cmds;
    try {
      cmds = objs.get(this.loadedName + "_path_" + character);
    } catch (ex) {
      warn(`getPathGenerator - ignoring character: "${ex}".`);
    }
    if (!Array.isArray(cmds) || cmds.length === 0) {
      return this.compiledGlyphs[character] = function (c, size) {};
    }
    const commands = [];
    for (let i = 0, ii = cmds.length; i < ii;) {
      switch (cmds[i++]) {
        case FontRenderOps.BEZIER_CURVE_TO:
          {
            const [a, b, c, d, e, f] = cmds.slice(i, i + 6);
            commands.push(ctx => ctx.bezierCurveTo(a, b, c, d, e, f));
            i += 6;
          }
          break;
        case FontRenderOps.MOVE_TO:
          {
            const [a, b] = cmds.slice(i, i + 2);
            commands.push(ctx => ctx.moveTo(a, b));
            i += 2;
          }
          break;
        case FontRenderOps.LINE_TO:
          {
            const [a, b] = cmds.slice(i, i + 2);
            commands.push(ctx => ctx.lineTo(a, b));
            i += 2;
          }
          break;
        case FontRenderOps.QUADRATIC_CURVE_TO:
          {
            const [a, b, c, d] = cmds.slice(i, i + 4);
            commands.push(ctx => ctx.quadraticCurveTo(a, b, c, d));
            i += 4;
          }
          break;
        case FontRenderOps.RESTORE:
          commands.push(ctx => ctx.restore());
          break;
        case FontRenderOps.SAVE:
          commands.push(ctx => ctx.save());
          break;
        case FontRenderOps.SCALE:
          assert(commands.length === 2, "Scale command is only valid at the third position.");
          break;
        case FontRenderOps.TRANSFORM:
          {
            const [a, b, c, d, e, f] = cmds.slice(i, i + 6);
            commands.push(ctx => ctx.transform(a, b, c, d, e, f));
            i += 6;
          }
          break;
        case FontRenderOps.TRANSLATE:
          {
            const [a, b] = cmds.slice(i, i + 2);
            commands.push(ctx => ctx.translate(a, b));
            i += 2;
          }
          break;
      }
    }
    return this.compiledGlyphs[character] = function glyphDrawer(ctx, size) {
      commands[0](ctx);
      commands[1](ctx);
      ctx.scale(size, -s
Download .txt
gitextract_7olj96qh/

├── .babelrc
├── .eslintignore
├── .eslintrc
├── .gitignore
├── .prettierrc
├── LICENSE
├── README.md
├── README_CN.md
├── configuration/
│   ├── environment.js
│   ├── webpack.dev.config.js
│   └── webpack.prod.config.js
├── examples/
│   └── pdfjs-4.3.136-dist/
│       ├── LICENSE
│       ├── build/
│       │   ├── pdf.mjs
│       │   ├── pdf.sandbox.mjs
│       │   └── pdf.worker.mjs
│       ├── pdfjs-annotation-extension-testdata.json
│       └── web/
│           ├── cmaps/
│           │   ├── 78-EUC-H.bcmap
│           │   ├── 78-EUC-V.bcmap
│           │   ├── 78-H.bcmap
│           │   ├── 78-RKSJ-H.bcmap
│           │   ├── 78-RKSJ-V.bcmap
│           │   ├── 78-V.bcmap
│           │   ├── 78ms-RKSJ-H.bcmap
│           │   ├── 78ms-RKSJ-V.bcmap
│           │   ├── 83pv-RKSJ-H.bcmap
│           │   ├── 90ms-RKSJ-H.bcmap
│           │   ├── 90ms-RKSJ-V.bcmap
│           │   ├── 90msp-RKSJ-H.bcmap
│           │   ├── 90msp-RKSJ-V.bcmap
│           │   ├── 90pv-RKSJ-H.bcmap
│           │   ├── 90pv-RKSJ-V.bcmap
│           │   ├── Add-H.bcmap
│           │   ├── Add-RKSJ-H.bcmap
│           │   ├── Add-RKSJ-V.bcmap
│           │   ├── Add-V.bcmap
│           │   ├── Adobe-CNS1-0.bcmap
│           │   ├── Adobe-CNS1-1.bcmap
│           │   ├── Adobe-CNS1-2.bcmap
│           │   ├── Adobe-CNS1-3.bcmap
│           │   ├── Adobe-CNS1-4.bcmap
│           │   ├── Adobe-CNS1-5.bcmap
│           │   ├── Adobe-CNS1-6.bcmap
│           │   ├── Adobe-CNS1-UCS2.bcmap
│           │   ├── Adobe-GB1-0.bcmap
│           │   ├── Adobe-GB1-1.bcmap
│           │   ├── Adobe-GB1-2.bcmap
│           │   ├── Adobe-GB1-3.bcmap
│           │   ├── Adobe-GB1-4.bcmap
│           │   ├── Adobe-GB1-5.bcmap
│           │   ├── Adobe-GB1-UCS2.bcmap
│           │   ├── Adobe-Japan1-0.bcmap
│           │   ├── Adobe-Japan1-1.bcmap
│           │   ├── Adobe-Japan1-2.bcmap
│           │   ├── Adobe-Japan1-3.bcmap
│           │   ├── Adobe-Japan1-4.bcmap
│           │   ├── Adobe-Japan1-5.bcmap
│           │   ├── Adobe-Japan1-6.bcmap
│           │   ├── Adobe-Japan1-UCS2.bcmap
│           │   ├── Adobe-Korea1-0.bcmap
│           │   ├── Adobe-Korea1-1.bcmap
│           │   ├── Adobe-Korea1-2.bcmap
│           │   ├── Adobe-Korea1-UCS2.bcmap
│           │   ├── B5-H.bcmap
│           │   ├── B5-V.bcmap
│           │   ├── B5pc-H.bcmap
│           │   ├── B5pc-V.bcmap
│           │   ├── CNS-EUC-H.bcmap
│           │   ├── CNS-EUC-V.bcmap
│           │   ├── CNS1-H.bcmap
│           │   ├── CNS1-V.bcmap
│           │   ├── CNS2-H.bcmap
│           │   ├── CNS2-V.bcmap
│           │   ├── ETHK-B5-H.bcmap
│           │   ├── ETHK-B5-V.bcmap
│           │   ├── ETen-B5-H.bcmap
│           │   ├── ETen-B5-V.bcmap
│           │   ├── ETenms-B5-H.bcmap
│           │   ├── ETenms-B5-V.bcmap
│           │   ├── EUC-H.bcmap
│           │   ├── EUC-V.bcmap
│           │   ├── Ext-H.bcmap
│           │   ├── Ext-RKSJ-H.bcmap
│           │   ├── Ext-RKSJ-V.bcmap
│           │   ├── Ext-V.bcmap
│           │   ├── GB-EUC-H.bcmap
│           │   ├── GB-EUC-V.bcmap
│           │   ├── GB-H.bcmap
│           │   ├── GB-V.bcmap
│           │   ├── GBK-EUC-H.bcmap
│           │   ├── GBK-EUC-V.bcmap
│           │   ├── GBK2K-H.bcmap
│           │   ├── GBK2K-V.bcmap
│           │   ├── GBKp-EUC-H.bcmap
│           │   ├── GBKp-EUC-V.bcmap
│           │   ├── GBT-EUC-H.bcmap
│           │   ├── GBT-EUC-V.bcmap
│           │   ├── GBT-H.bcmap
│           │   ├── GBT-V.bcmap
│           │   ├── GBTpc-EUC-H.bcmap
│           │   ├── GBTpc-EUC-V.bcmap
│           │   ├── GBpc-EUC-H.bcmap
│           │   ├── GBpc-EUC-V.bcmap
│           │   ├── H.bcmap
│           │   ├── HKdla-B5-H.bcmap
│           │   ├── HKdla-B5-V.bcmap
│           │   ├── HKdlb-B5-H.bcmap
│           │   ├── HKdlb-B5-V.bcmap
│           │   ├── HKgccs-B5-H.bcmap
│           │   ├── HKgccs-B5-V.bcmap
│           │   ├── HKm314-B5-H.bcmap
│           │   ├── HKm314-B5-V.bcmap
│           │   ├── HKm471-B5-H.bcmap
│           │   ├── HKm471-B5-V.bcmap
│           │   ├── HKscs-B5-H.bcmap
│           │   ├── HKscs-B5-V.bcmap
│           │   ├── Hankaku.bcmap
│           │   ├── Hiragana.bcmap
│           │   ├── KSC-EUC-H.bcmap
│           │   ├── KSC-EUC-V.bcmap
│           │   ├── KSC-H.bcmap
│           │   ├── KSC-Johab-H.bcmap
│           │   ├── KSC-Johab-V.bcmap
│           │   ├── KSC-V.bcmap
│           │   ├── KSCms-UHC-H.bcmap
│           │   ├── KSCms-UHC-HW-H.bcmap
│           │   ├── KSCms-UHC-HW-V.bcmap
│           │   ├── KSCms-UHC-V.bcmap
│           │   ├── KSCpc-EUC-H.bcmap
│           │   ├── KSCpc-EUC-V.bcmap
│           │   ├── Katakana.bcmap
│           │   ├── LICENSE
│           │   ├── NWP-H.bcmap
│           │   ├── NWP-V.bcmap
│           │   ├── RKSJ-H.bcmap
│           │   ├── RKSJ-V.bcmap
│           │   ├── Roman.bcmap
│           │   ├── UniCNS-UCS2-H.bcmap
│           │   ├── UniCNS-UCS2-V.bcmap
│           │   ├── UniCNS-UTF16-H.bcmap
│           │   ├── UniCNS-UTF16-V.bcmap
│           │   ├── UniCNS-UTF32-H.bcmap
│           │   ├── UniCNS-UTF32-V.bcmap
│           │   ├── UniCNS-UTF8-H.bcmap
│           │   ├── UniCNS-UTF8-V.bcmap
│           │   ├── UniGB-UCS2-H.bcmap
│           │   ├── UniGB-UCS2-V.bcmap
│           │   ├── UniGB-UTF16-H.bcmap
│           │   ├── UniGB-UTF16-V.bcmap
│           │   ├── UniGB-UTF32-H.bcmap
│           │   ├── UniGB-UTF32-V.bcmap
│           │   ├── UniGB-UTF8-H.bcmap
│           │   ├── UniGB-UTF8-V.bcmap
│           │   ├── UniJIS-UCS2-H.bcmap
│           │   ├── UniJIS-UCS2-HW-H.bcmap
│           │   ├── UniJIS-UCS2-HW-V.bcmap
│           │   ├── UniJIS-UCS2-V.bcmap
│           │   ├── UniJIS-UTF16-H.bcmap
│           │   ├── UniJIS-UTF16-V.bcmap
│           │   ├── UniJIS-UTF32-H.bcmap
│           │   ├── UniJIS-UTF32-V.bcmap
│           │   ├── UniJIS-UTF8-H.bcmap
│           │   ├── UniJIS-UTF8-V.bcmap
│           │   ├── UniJIS2004-UTF16-H.bcmap
│           │   ├── UniJIS2004-UTF16-V.bcmap
│           │   ├── UniJIS2004-UTF32-H.bcmap
│           │   ├── UniJIS2004-UTF32-V.bcmap
│           │   ├── UniJIS2004-UTF8-H.bcmap
│           │   ├── UniJIS2004-UTF8-V.bcmap
│           │   ├── UniJISPro-UCS2-HW-V.bcmap
│           │   ├── UniJISPro-UCS2-V.bcmap
│           │   ├── UniJISPro-UTF8-V.bcmap
│           │   ├── UniJISX0213-UTF32-H.bcmap
│           │   ├── UniJISX0213-UTF32-V.bcmap
│           │   ├── UniJISX02132004-UTF32-H.bcmap
│           │   ├── UniJISX02132004-UTF32-V.bcmap
│           │   ├── UniKS-UCS2-H.bcmap
│           │   ├── UniKS-UCS2-V.bcmap
│           │   ├── UniKS-UTF16-H.bcmap
│           │   ├── UniKS-UTF16-V.bcmap
│           │   ├── UniKS-UTF32-H.bcmap
│           │   ├── UniKS-UTF32-V.bcmap
│           │   ├── UniKS-UTF8-H.bcmap
│           │   ├── UniKS-UTF8-V.bcmap
│           │   ├── V.bcmap
│           │   └── WP-Symbol.bcmap
│           ├── debugger.css
│           ├── debugger.mjs
│           ├── locale/
│           │   ├── ach/
│           │   │   └── viewer.ftl
│           │   ├── af/
│           │   │   └── viewer.ftl
│           │   ├── an/
│           │   │   └── viewer.ftl
│           │   ├── ar/
│           │   │   └── viewer.ftl
│           │   ├── ast/
│           │   │   └── viewer.ftl
│           │   ├── az/
│           │   │   └── viewer.ftl
│           │   ├── be/
│           │   │   └── viewer.ftl
│           │   ├── bg/
│           │   │   └── viewer.ftl
│           │   ├── bn/
│           │   │   └── viewer.ftl
│           │   ├── bo/
│           │   │   └── viewer.ftl
│           │   ├── br/
│           │   │   └── viewer.ftl
│           │   ├── brx/
│           │   │   └── viewer.ftl
│           │   ├── bs/
│           │   │   └── viewer.ftl
│           │   ├── ca/
│           │   │   └── viewer.ftl
│           │   ├── cak/
│           │   │   └── viewer.ftl
│           │   ├── ckb/
│           │   │   └── viewer.ftl
│           │   ├── cs/
│           │   │   └── viewer.ftl
│           │   ├── cy/
│           │   │   └── viewer.ftl
│           │   ├── da/
│           │   │   └── viewer.ftl
│           │   ├── de/
│           │   │   └── viewer.ftl
│           │   ├── dsb/
│           │   │   └── viewer.ftl
│           │   ├── el/
│           │   │   └── viewer.ftl
│           │   ├── en-CA/
│           │   │   └── viewer.ftl
│           │   ├── en-GB/
│           │   │   └── viewer.ftl
│           │   ├── en-US/
│           │   │   └── viewer.ftl
│           │   ├── eo/
│           │   │   └── viewer.ftl
│           │   ├── es-AR/
│           │   │   └── viewer.ftl
│           │   ├── es-CL/
│           │   │   └── viewer.ftl
│           │   ├── es-ES/
│           │   │   └── viewer.ftl
│           │   ├── es-MX/
│           │   │   └── viewer.ftl
│           │   ├── et/
│           │   │   └── viewer.ftl
│           │   ├── eu/
│           │   │   └── viewer.ftl
│           │   ├── fa/
│           │   │   └── viewer.ftl
│           │   ├── ff/
│           │   │   └── viewer.ftl
│           │   ├── fi/
│           │   │   └── viewer.ftl
│           │   ├── fr/
│           │   │   └── viewer.ftl
│           │   ├── fur/
│           │   │   └── viewer.ftl
│           │   ├── fy-NL/
│           │   │   └── viewer.ftl
│           │   ├── ga-IE/
│           │   │   └── viewer.ftl
│           │   ├── gd/
│           │   │   └── viewer.ftl
│           │   ├── gl/
│           │   │   └── viewer.ftl
│           │   ├── gn/
│           │   │   └── viewer.ftl
│           │   ├── gu-IN/
│           │   │   └── viewer.ftl
│           │   ├── he/
│           │   │   └── viewer.ftl
│           │   ├── hi-IN/
│           │   │   └── viewer.ftl
│           │   ├── hr/
│           │   │   └── viewer.ftl
│           │   ├── hsb/
│           │   │   └── viewer.ftl
│           │   ├── hu/
│           │   │   └── viewer.ftl
│           │   ├── hy-AM/
│           │   │   └── viewer.ftl
│           │   ├── hye/
│           │   │   └── viewer.ftl
│           │   ├── ia/
│           │   │   └── viewer.ftl
│           │   ├── id/
│           │   │   └── viewer.ftl
│           │   ├── is/
│           │   │   └── viewer.ftl
│           │   ├── it/
│           │   │   └── viewer.ftl
│           │   ├── ja/
│           │   │   └── viewer.ftl
│           │   ├── ka/
│           │   │   └── viewer.ftl
│           │   ├── kab/
│           │   │   └── viewer.ftl
│           │   ├── kk/
│           │   │   └── viewer.ftl
│           │   ├── km/
│           │   │   └── viewer.ftl
│           │   ├── kn/
│           │   │   └── viewer.ftl
│           │   ├── ko/
│           │   │   └── viewer.ftl
│           │   ├── lij/
│           │   │   └── viewer.ftl
│           │   ├── lo/
│           │   │   └── viewer.ftl
│           │   ├── locale.json
│           │   ├── lt/
│           │   │   └── viewer.ftl
│           │   ├── ltg/
│           │   │   └── viewer.ftl
│           │   ├── lv/
│           │   │   └── viewer.ftl
│           │   ├── meh/
│           │   │   └── viewer.ftl
│           │   ├── mk/
│           │   │   └── viewer.ftl
│           │   ├── mr/
│           │   │   └── viewer.ftl
│           │   ├── ms/
│           │   │   └── viewer.ftl
│           │   ├── my/
│           │   │   └── viewer.ftl
│           │   ├── nb-NO/
│           │   │   └── viewer.ftl
│           │   ├── ne-NP/
│           │   │   └── viewer.ftl
│           │   ├── nl/
│           │   │   └── viewer.ftl
│           │   ├── nn-NO/
│           │   │   └── viewer.ftl
│           │   ├── oc/
│           │   │   └── viewer.ftl
│           │   ├── pa-IN/
│           │   │   └── viewer.ftl
│           │   ├── pl/
│           │   │   └── viewer.ftl
│           │   ├── pt-BR/
│           │   │   └── viewer.ftl
│           │   ├── pt-PT/
│           │   │   └── viewer.ftl
│           │   ├── rm/
│           │   │   └── viewer.ftl
│           │   ├── ro/
│           │   │   └── viewer.ftl
│           │   ├── ru/
│           │   │   └── viewer.ftl
│           │   ├── sat/
│           │   │   └── viewer.ftl
│           │   ├── sc/
│           │   │   └── viewer.ftl
│           │   ├── scn/
│           │   │   └── viewer.ftl
│           │   ├── sco/
│           │   │   └── viewer.ftl
│           │   ├── si/
│           │   │   └── viewer.ftl
│           │   ├── sk/
│           │   │   └── viewer.ftl
│           │   ├── skr/
│           │   │   └── viewer.ftl
│           │   ├── sl/
│           │   │   └── viewer.ftl
│           │   ├── son/
│           │   │   └── viewer.ftl
│           │   ├── sq/
│           │   │   └── viewer.ftl
│           │   ├── sr/
│           │   │   └── viewer.ftl
│           │   ├── sv-SE/
│           │   │   └── viewer.ftl
│           │   ├── szl/
│           │   │   └── viewer.ftl
│           │   ├── ta/
│           │   │   └── viewer.ftl
│           │   ├── te/
│           │   │   └── viewer.ftl
│           │   ├── tg/
│           │   │   └── viewer.ftl
│           │   ├── th/
│           │   │   └── viewer.ftl
│           │   ├── tl/
│           │   │   └── viewer.ftl
│           │   ├── tr/
│           │   │   └── viewer.ftl
│           │   ├── trs/
│           │   │   └── viewer.ftl
│           │   ├── uk/
│           │   │   └── viewer.ftl
│           │   ├── ur/
│           │   │   └── viewer.ftl
│           │   ├── uz/
│           │   │   └── viewer.ftl
│           │   ├── vi/
│           │   │   └── viewer.ftl
│           │   ├── wo/
│           │   │   └── viewer.ftl
│           │   ├── xh/
│           │   │   └── viewer.ftl
│           │   ├── zh-CN/
│           │   │   └── viewer.ftl
│           │   └── zh-TW/
│           │       └── viewer.ftl
│           ├── pdfjs-annotation-extension/
│           │   └── pdfjs-annotation-extension.js
│           ├── standard_fonts/
│           │   ├── FoxitDingbats.pfb
│           │   ├── FoxitFixed.pfb
│           │   ├── FoxitFixedBold.pfb
│           │   ├── FoxitFixedBoldItalic.pfb
│           │   ├── FoxitFixedItalic.pfb
│           │   ├── FoxitSerif.pfb
│           │   ├── FoxitSerifBold.pfb
│           │   ├── FoxitSerifBoldItalic.pfb
│           │   ├── FoxitSerifItalic.pfb
│           │   ├── FoxitSymbol.pfb
│           │   ├── LICENSE_FOXIT
│           │   └── LICENSE_LIBERATION
│           ├── viewer.css
│           ├── viewer.html
│           └── viewer.mjs
├── package.json
├── src/
│   ├── annot/
│   │   ├── index.ts
│   │   ├── parse.ts
│   │   ├── parse_circle.ts
│   │   ├── parse_freetext.ts
│   │   ├── parse_highlight.ts
│   │   ├── parse_ink.ts
│   │   ├── parse_line.ts
│   │   ├── parse_polyline.ts
│   │   ├── parse_square.ts
│   │   ├── parse_stamp.ts
│   │   ├── parse_strikeout.ts
│   │   ├── parse_text.ts
│   │   └── parse_underline.ts
│   ├── components/
│   │   ├── comment/
│   │   │   ├── index.scss
│   │   │   └── index.tsx
│   │   ├── menu/
│   │   │   ├── index.scss
│   │   │   └── index.tsx
│   │   ├── popbar/
│   │   │   ├── index.scss
│   │   │   └── index.tsx
│   │   └── toolbar/
│   │       ├── index.scss
│   │       ├── index.tsx
│   │       ├── signature.tsx
│   │       └── stamp.tsx
│   ├── const/
│   │   ├── default_options.ts
│   │   ├── default_stamp.ts
│   │   ├── definitions.tsx
│   │   ├── icon.tsx
│   │   └── pdfjs.d.ts
│   ├── index.tsx
│   ├── locale/
│   │   ├── de-de.json
│   │   ├── en-us.json
│   │   ├── index.ts
│   │   └── zh-cn.json
│   ├── painter/
│   │   ├── connectorLine.ts
│   │   ├── const.ts
│   │   ├── editor/
│   │   │   ├── editor.ts
│   │   │   ├── editor_arrow.ts
│   │   │   ├── editor_circle.ts
│   │   │   ├── editor_cloud.ts
│   │   │   ├── editor_free_hand.ts
│   │   │   ├── editor_free_highlight.ts
│   │   │   ├── editor_free_text.scss
│   │   │   ├── editor_free_text.tsx
│   │   │   ├── editor_highlight.ts
│   │   │   ├── editor_note.ts
│   │   │   ├── editor_rectangle.ts
│   │   │   ├── editor_signature.ts
│   │   │   ├── editor_stamp.tsx
│   │   │   └── selector.tsx
│   │   ├── index.scss
│   │   ├── index.ts
│   │   ├── store.ts
│   │   ├── transform/
│   │   │   ├── decoder.ts
│   │   │   ├── decoder_circle.ts
│   │   │   ├── decoder_free_text.ts
│   │   │   ├── decoder_highlight.ts
│   │   │   ├── decoder_ink.ts
│   │   │   ├── decoder_line.ts
│   │   │   ├── decoder_polygon.ts
│   │   │   ├── decoder_polyline.ts
│   │   │   ├── decoder_square.ts
│   │   │   ├── decoder_text.ts
│   │   │   └── transform.ts
│   │   └── webSelection.ts
│   ├── scss/
│   │   └── app.scss
│   ├── typings.d.ts
│   └── utils/
│       ├── documentIcon.ts
│       ├── fontLoader.ts
│       └── utils.ts
├── tsconfig.json
└── webpack.config.js
Download .txt
Showing preview only (4,763K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (10458 symbols across 61 files)

FILE: examples/pdfjs-4.3.136-dist/build/pdf.mjs
  constant IDENTITY_MATRIX (line 99) | const IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0];
  constant FONT_IDENTITY_MATRIX (line 100) | const FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];
  constant MAX_IMAGE_SIZE_TO_CACHE (line 101) | const MAX_IMAGE_SIZE_TO_CACHE = 10e6;
  constant LINE_FACTOR (line 102) | const LINE_FACTOR = 1.35;
  constant LINE_DESCENT_FACTOR (line 103) | const LINE_DESCENT_FACTOR = 0.35;
  constant BASELINE_FACTOR (line 104) | const BASELINE_FACTOR = LINE_DESCENT_FACTOR / LINE_FACTOR;
  constant OPS (line 280) | const OPS = {
  function setVerbosityLevel (line 375) | function setVerbosityLevel(level) {
  function getVerbosityLevel (line 380) | function getVerbosityLevel() {
  function info (line 383) | function info(msg) {
  function warn (line 388) | function warn(msg) {
  function unreachable (line 393) | function unreachable(msg) {
  function assert (line 396) | function assert(cond, msg) {
  function _isValidProtocol (line 401) | function _isValidProtocol(url) {
  function createValidAbsoluteUrl (line 413) | function createValidAbsoluteUrl(url, baseUrl = null, options = null) {
  function shadow (line 438) | function shadow(obj, prop, value, nonSerializable = false) {
  function BaseException (line 448) | function BaseException(message, name) {
  class PasswordException (line 459) | class PasswordException extends BaseException {
    method constructor (line 460) | constructor(msg, code) {
  class UnknownErrorException (line 465) | class UnknownErrorException extends BaseException {
    method constructor (line 466) | constructor(msg, details) {
  class InvalidPDFException (line 471) | class InvalidPDFException extends BaseException {
    method constructor (line 472) | constructor(msg) {
  class MissingPDFException (line 476) | class MissingPDFException extends BaseException {
    method constructor (line 477) | constructor(msg) {
  class UnexpectedResponseException (line 481) | class UnexpectedResponseException extends BaseException {
    method constructor (line 482) | constructor(msg, status) {
  class FormatError (line 487) | class FormatError extends BaseException {
    method constructor (line 488) | constructor(msg) {
  class AbortException (line 492) | class AbortException extends BaseException {
    method constructor (line 493) | constructor(msg) {
  function bytesToString (line 497) | function bytesToString(bytes) {
  function stringToBytes (line 514) | function stringToBytes(str) {
  function string32 (line 525) | function string32(value) {
  function objectSize (line 528) | function objectSize(obj) {
  function objectFromMap (line 531) | function objectFromMap(map) {
  function isLittleEndian (line 538) | function isLittleEndian() {
  function isEvalSupported (line 544) | function isEvalSupported() {
  class util_FeatureTest (line 552) | class util_FeatureTest {
    method isLittleEndian (line 553) | static get isLittleEndian() {
    method isEvalSupported (line 556) | static get isEvalSupported() {
    method isOffscreenCanvasSupported (line 559) | static get isOffscreenCanvasSupported() {
    method platform (line 562) | static get platform() {
    method isCSSRoundSupported (line 572) | static get isCSSRoundSupported() {
  class Util (line 577) | class Util {
    method makeHexColor (line 578) | static makeHexColor(r, g, b) {
    method scaleMinMax (line 581) | static scaleMinMax(transform, minMax) {
    method transform (line 625) | static transform(m1, m2) {
    method applyTransform (line 628) | static applyTransform(p, m) {
    method applyInverseTransform (line 633) | static applyInverseTransform(p, m) {
    method getAxialAlignedBoundingBox (line 639) | static getAxialAlignedBoundingBox(r, m) {
    method inverseTransform (line 646) | static inverseTransform(m) {
    method singularValueDecompose2dScale (line 650) | static singularValueDecompose2dScale(m) {
    method normalizeRect (line 662) | static normalizeRect(rect) {
    method intersect (line 674) | static intersect(rect1, rect2) {
    method #getExtremumOnCurve (line 687) | static #getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, t, minMax) {
    method #getExtremum (line 701) | static #getExtremum(x0, x1, x2, x3, y0, y1, y2, y3, a, b, c, minMax) {
    method bezierBoundingBox (line 717) | static bezierBoundingBox(x0, y0, x1, y1, x2, y2, x3, y3, minMax) {
  function stringToPDFString (line 732) | function stringToPDFString(str) {
  function stringToUTF8String (line 776) | function stringToUTF8String(str) {
  function utf8StringToString (line 779) | function utf8StringToString(str) {
  function isArrayEqual (line 782) | function isArrayEqual(arr1, arr2) {
  function getModificationDate (line 793) | function getModificationDate(date = new Date()) {
  function normalizeUnicode (line 799) | function normalizeUnicode(str) {
  function getUuid (line 806) | function getUuid() {
  class BaseFilterFactory (line 835) | class BaseFilterFactory {
    method constructor (line 836) | constructor() {
    method addFilter (line 841) | addFilter(maps) {
    method addHCMFilter (line 844) | addHCMFilter(fgColor, bgColor) {
    method addAlphaFilter (line 847) | addAlphaFilter(map) {
    method addLuminosityFilter (line 850) | addLuminosityFilter(map) {
    method addHighlightHCMFilter (line 853) | addHighlightHCMFilter(filterName, fgColor, bgColor, newFgColor, newBgC...
    method destroy (line 856) | destroy(keepHCM = false) {}
  class BaseCanvasFactory (line 858) | class BaseCanvasFactory {
    method constructor (line 859) | constructor() {
    method create (line 864) | create(width, height) {
    method reset (line 874) | reset(canvasAndContext, width, height) {
    method destroy (line 884) | destroy(canvasAndContext) {
    method _createCanvas (line 893) | _createCanvas(width, height) {
  class BaseCMapReaderFactory (line 897) | class BaseCMapReaderFactory {
    method constructor (line 898) | constructor({
    method fetch (line 908) | async fetch({
    method _fetchData (line 923) | _fetchData(url, compressionType) {
  class BaseStandardFontDataFactory (line 927) | class BaseStandardFontDataFactory {
    method constructor (line 928) | constructor({
    method fetch (line 936) | async fetch({
    method _fetchData (line 950) | _fetchData(url) {
  class BaseSVGFactory (line 954) | class BaseSVGFactory {
    method constructor (line 955) | constructor() {
    method create (line 960) | create(width, height, skipDimensions = false) {
    method createElement (line 974) | createElement(type) {
    method _createSVG (line 980) | _createSVG(type) {
  constant SVG_NS (line 988) | const SVG_NS = "http://www.w3.org/2000/svg";
  class PixelsPerInch (line 989) | class PixelsPerInch {
  class DOMFilterFactory (line 994) | class DOMFilterFactory extends BaseFilterFactory {
    method constructor (line 1001) | constructor({
    method #cache (line 1009) | get #cache() {
    method #hcmCache (line 1012) | get #hcmCache() {
    method #defs (line 1015) | get #defs() {
    method #createTables (line 1037) | #createTables(maps) {
    method addFilter (line 1058) | addFilter(maps) {
    method addHCMFilter (line 1081) | addHCMFilter(fgColor, bgColor) {
    method addAlphaFilter (line 1135) | addAlphaFilter(map) {
    method addLuminosityFilter (line 1155) | addLuminosityFilter(map) {
    method addHighlightHCMFilter (line 1183) | addHighlightHCMFilter(filterName, fgColor, bgColor, newFgColor, newBgC...
    method destroy (line 1239) | destroy(keepHCM = false) {
    method #addLuminosityConversion (line 1253) | #addLuminosityConversion(filter) {
    method #addGrayConversion (line 1259) | #addGrayConversion(filter) {
    method #createFilter (line 1265) | #createFilter(id) {
    method #appendFeFunc (line 1272) | #appendFeFunc(feComponentTransfer, func, table) {
    method #addTransferMapConversion (line 1278) | #addTransferMapConversion(rTable, gTable, bTable, filter) {
    method #addTransferMapAlphaConversion (line 1285) | #addTransferMapAlphaConversion(aTable, filter) {
    method #getRGB (line 1290) | #getRGB(color) {
  class DOMCanvasFactory (line 1295) | class DOMCanvasFactory extends BaseCanvasFactory {
    method constructor (line 1296) | constructor({
    method _createCanvas (line 1302) | _createCanvas(width, height) {
  function fetchData (line 1309) | async function fetchData(url, type = "text") {
  class DOMCMapReaderFactory (line 1349) | class DOMCMapReaderFactory extends BaseCMapReaderFactory {
    method _fetchData (line 1350) | _fetchData(url, compressionType) {
  class DOMStandardFontDataFactory (line 1357) | class DOMStandardFontDataFactory extends BaseStandardFontDataFactory {
    method _fetchData (line 1358) | _fetchData(url) {
  class DOMSVGFactory (line 1362) | class DOMSVGFactory extends BaseSVGFactory {
    method _createSVG (line 1363) | _createSVG(type) {
  class PageViewport (line 1367) | class PageViewport {
    method constructor (line 1368) | constructor({
    method rawDims (line 1437) | get rawDims() {
    method clone (line 1448) | clone({
    method convertToViewportPoint (line 1464) | convertToViewportPoint(x, y) {
    method convertToViewportRectangle (line 1467) | convertToViewportRectangle(rect) {
    method convertToPdfPoint (line 1472) | convertToPdfPoint(x, y) {
  class RenderingCancelledException (line 1476) | class RenderingCancelledException extends BaseException {
    method constructor (line 1477) | constructor(msg, extraDelay = 0) {
  function isDataScheme (line 1482) | function isDataScheme(url) {
  function isPdfFile (line 1490) | function isPdfFile(filename) {
  function getFilenameFromUrl (line 1493) | function getFilenameFromUrl(url) {
  function getPdfFilenameFromUrl (line 1497) | function getPdfFilenameFromUrl(url, defaultFilename = "document.pdf") {
  class StatTimer (line 1519) | class StatTimer {
    method time (line 1522) | time(name) {
    method timeEnd (line 1528) | timeEnd(name) {
    method toString (line 1539) | toString() {
  function isValidFetchUrl (line 1557) | function isValidFetchUrl(url, baseUrl) {
  function noContextMenu (line 1567) | function noContextMenu(e) {
  function deprecated (line 1570) | function deprecated(details) {
  class PDFDateString (line 1574) | class PDFDateString {
    method toDateObject (line 1575) | static toDateObject(input) {
  function getXfaPageViewport (line 1610) | function getXfaPageViewport(xfaPage, {
  function getRGB (line 1625) | function getRGB(color) {
  function getColorValues (line 1639) | function getColorValues(colors) {
  function getCurrentTransform (line 1650) | function getCurrentTransform(ctx) {
  function getCurrentTransformInverse (line 1661) | function getCurrentTransformInverse(ctx) {
  function setLayerDimensions (line 1672) | function setLayerDimensions(div, viewport, mustFlip = false, mustRotate ...
  class EditorToolbar (line 1701) | class EditorToolbar {
    method constructor (line 1706) | constructor(editor) {
    method render (line 1709) | render() {
    method #pointerDown (line 1730) | static #pointerDown(e) {
    method #focusIn (line 1733) | #focusIn(e) {
    method #focusOut (line 1738) | #focusOut(e) {
    method #addListenersToElement (line 1743) | #addListenersToElement(element) {
    method hide (line 1752) | hide() {
    method show (line 1756) | show() {
    method #addDeleteButton (line 1759) | #addDeleteButton() {
    method #divider (line 1770) | get #divider() {
    method addAltTextButton (line 1775) | addAltTextButton(button) {
    method addColorPicker (line 1779) | addColorPicker(colorPicker) {
    method remove (line 1785) | remove() {
  class HighlightToolbar (line 1791) | class HighlightToolbar {
    method constructor (line 1795) | constructor(uiManager) {
    method #render (line 1798) | #render() {
    method #getLastPoint (line 1809) | #getLastPoint(boxes, isLTR) {
    method show (line 1833) | show(parent, boxes, isLTR) {
    method hide (line 1842) | hide() {
    method #addHighlightButton (line 1845) | #addHighlightButton() {
  function bindEvents (line 1866) | function bindEvents(obj, element, names) {
  function opacityToHex (line 1871) | function opacityToHex(opacity) {
  class IdManager (line 1874) | class IdManager {
    method id (line 1876) | get id() {
  class ImageManager (line 1880) | class ImageManager {
    method _isSVGFittingCanvas (line 1884) | static get _isSVGFittingCanvas() {
    method #get (line 1896) | async #get(key, rawData) {
    method getFromFile (line 1952) | async getFromFile(file) {
    method getFromUrl (line 1961) | async getFromUrl(url) {
    method getFromId (line 1964) | async getFromId(id) {
    method getSvgUrl (line 1979) | getSvgUrl(id) {
    method deleteId (line 1986) | deleteId(id) {
    method isValidId (line 1998) | isValidId(id) {
  class CommandManager (line 2002) | class CommandManager {
    method constructor (line 2007) | constructor(maxSize = 128) {
    method add (line 2010) | add({
    method undo (line 2057) | undo() {
    method redo (line 2071) | redo() {
    method hasSomethingToUndo (line 2084) | hasSomethingToUndo() {
    method hasSomethingToRedo (line 2087) | hasSomethingToRedo() {
    method destroy (line 2090) | destroy() {
  class KeyboardManager (line 2094) | class KeyboardManager {
    method constructor (line 2095) | constructor(callbacks) {
    method #serialize (line 2121) | #serialize(event) {
    method exec (line 2139) | exec(self, event) {
  class ColorManager (line 2165) | class ColorManager {
    method _colors (line 2167) | get _colors() {
    method convert (line 2172) | convert(color) {
    method getHexCode (line 2184) | getHexCode(name) {
  class AnnotationEditorUIManager (line 2192) | class AnnotationEditorUIManager {
    method _keyboardManager (line 2248) | static get _keyboardManager() {
    method constructor (line 2306) | constructor(container, viewer, altTextManager, eventBus, pdfDocument, ...
    method destroy (line 2329) | destroy() {
    method mlGuess (line 2358) | async mlGuess(data) {
    method hasMLManager (line 2361) | get hasMLManager() {
    method hcmFilter (line 2364) | get hcmFilter() {
    method direction (line 2367) | get direction() {
    method highlightColors (line 2370) | get highlightColors() {
    method highlightColorNames (line 2373) | get highlightColorNames() {
    method setMainHighlightColorPicker (line 2376) | setMainHighlightColorPicker(colorPicker) {
    method editAltText (line 2379) | editAltText(editor) {
    method onPageChanging (line 2382) | onPageChanging({
    method focusMainContainer (line 2387) | focusMainContainer() {
    method findParent (line 2390) | findParent(x, y) {
    method disableUserSelect (line 2404) | disableUserSelect(value = false) {
    method addShouldRescale (line 2407) | addShouldRescale(editor) {
    method removeShouldRescale (line 2410) | removeShouldRescale(editor) {
    method onScaleChanging (line 2413) | onScaleChanging({
    method onRotationChanging (line 2422) | onRotationChanging({
    method #getAnchorElementForSelection (line 2428) | #getAnchorElementForSelection({
    method highlightSelection (line 2433) | highlightSelection(methodOfCreation = "") {
    method #displayHighlightToolbar (line 2477) | #displayHighlightToolbar() {
    method addToAnnotationStorage (line 2491) | addToAnnotationStorage(editor) {
    method #selectionChange (line 2496) | #selectionChange() {
    method #onSelectEnd (line 2553) | #onSelectEnd(methodOfCreation = "") {
    method #addSelectionListener (line 2560) | #addSelectionListener() {
    method #removeSelectionListener (line 2563) | #removeSelectionListener() {
    method #addFocusManager (line 2566) | #addFocusManager() {
    method #removeFocusManager (line 2570) | #removeFocusManager() {
    method blur (line 2574) | blur() {
    method focus (line 2594) | focus() {
    method #addKeyboardManager (line 2607) | #addKeyboardManager() {
    method #removeKeyboardManager (line 2611) | #removeKeyboardManager() {
    method #addCopyPasteListeners (line 2615) | #addCopyPasteListeners() {
    method #removeCopyPasteListeners (line 2620) | #removeCopyPasteListeners() {
    method addEditListeners (line 2625) | addEditListeners() {
    method removeEditListeners (line 2629) | removeEditListeners() {
    method copy (line 2633) | copy(event) {
    method cut (line 2651) | cut(event) {
    method paste (line 2655) | paste(event) {
    method keydown (line 2712) | keydown(event) {
    method keyup (line 2720) | keyup(event) {
    method onEditingAction (line 2729) | onEditingAction({
    method #dispatchUpdateStates (line 2744) | #dispatchUpdateStates(details) {
    method #dispatchUpdateUI (line 2756) | #dispatchUpdateUI(details) {
    method setEditingState (line 2762) | setEditingState(isEditing) {
    method registerEditorTypes (line 2782) | registerEditorTypes(types) {
    method getId (line 2791) | getId() {
    method currentLayer (line 2794) | get currentLayer() {
    method getLayer (line 2797) | getLayer(pageIndex) {
    method currentPageIndex (line 2800) | get currentPageIndex() {
    method addLayer (line 2803) | addLayer(layer) {
    method removeLayer (line 2811) | removeLayer(layer) {
    method updateMode (line 2814) | updateMode(mode, editId = null, isFromKeyboard = false) {
    method addNewEditorFromKeyboard (line 2845) | addNewEditorFromKeyboard() {
    method updateToolbar (line 2850) | updateToolbar(mode) {
    method updateParams (line 2859) | updateParams(type, value) {
    method showAllEditors (line 2892) | showAllEditors(type, visible, updateButton = false) {
    method enableWaiting (line 2903) | enableWaiting(mustWait = false) {
    method #enableAll (line 2917) | #enableAll() {
    method #disableAll (line 2928) | #disableAll() {
    method getEditors (line 2940) | getEditors(pageIndex) {
    method getEditor (line 2949) | getEditor(id) {
    method addEditor (line 2952) | addEditor(editor) {
    method removeEditor (line 2955) | removeEditor(editor) {
    method addDeletedAnnotationElement (line 2971) | addDeletedAnnotationElement(editor) {
    method isDeletedAnnotationElement (line 2976) | isDeletedAnnotationElement(annotationElementId) {
    method removeDeletedAnnotationElement (line 2979) | removeDeletedAnnotationElement(editor) {
    method #addEditorToLayer (line 2984) | #addEditorToLayer(editor) {
    method setActiveEditor (line 2993) | setActiveEditor(editor) {
    method #lastSelectedEditor (line 3002) | get #lastSelectedEditor() {
    method updateUI (line 3007) | updateUI(editor) {
    method toggleSelected (line 3012) | toggleSelected(editor) {
    method setSelected (line 3028) | setSelected(editor) {
    method isSelected (line 3042) | isSelected(editor) {
    method firstSelectedEditor (line 3045) | get firstSelectedEditor() {
    method unselect (line 3048) | unselect(editor) {
    method hasSelection (line 3055) | get hasSelection() {
    method isEnterHandled (line 3058) | get isEnterHandled() {
    method undo (line 3061) | undo() {
    method redo (line 3069) | redo() {
    method addCommands (line 3077) | addCommands(params) {
    method #isEmpty (line 3085) | #isEmpty() {
    method delete (line 3096) | delete() {
    method commitOrRemove (line 3118) | commitOrRemove() {
    method hasSomethingToControl (line 3121) | hasSomethingToControl() {
    method #selectEditors (line 3124) | #selectEditors(editors) {
    method selectAll (line 3140) | selectAll() {
    method unselectAll (line 3146) | unselectAll() {
    method translateSelectedEditors (line 3164) | translateSelectedEditors(x, y, noCommit = false) {
    method setUpDragSession (line 3204) | setUpDragSession() {
    method endDragSession (line 3221) | endDragSession() {
    method dragSelectedEditors (line 3277) | dragSelectedEditors(tx, ty) {
    method rebuild (line 3285) | rebuild(editor) {
    method isEditorHandlingKeyboard (line 3300) | get isEditorHandlingKeyboard() {
    method isActive (line 3303) | isActive(editor) {
    method getActive (line 3306) | getActive() {
    method getMode (line 3309) | getMode() {
    method imageManager (line 3312) | get imageManager() {
    method getSelectionBoxes (line 3315) | getSelectionBoxes(textLayer) {
    method addChangedExistingAnnotation (line 3386) | addChangedExistingAnnotation({
    method removeChangedExistingAnnotation (line 3392) | removeChangedExistingAnnotation({
    method renderAnnotationElement (line 3397) | renderAnnotationElement(annotation) {
  class AltText (line 3415) | class AltText {
    method constructor (line 3424) | constructor(editor) {
    method initialize (line 3427) | static initialize(l10nPromise) {
    method render (line 3430) | async render() {
    method finish (line 3455) | finish() {
    method isEmpty (line 3464) | isEmpty() {
    method data (line 3467) | get data() {
    method data (line 3473) | set data({
    method toggle (line 3484) | toggle(enabled = false) {
    method destroy (line 3494) | destroy() {
    method #setState (line 3499) | async #setState() {
  class AnnotationEditor (line 3553) | class AnnotationEditor {
    method _resizerKeyboardManager (line 3584) | static get _resizerKeyboardManager() {
    method constructor (line 3606) | constructor(parameters) {
    method editorType (line 3640) | get editorType() {
    method _defaultLineColor (line 3643) | static get _defaultLineColor() {
    method deleteAnnotationElement (line 3646) | static deleteAnnotationElement(editor) {
    method initialize (line 3656) | static initialize(l10n, _uiManager, options) {
    method updateDefaultParams (line 3669) | static updateDefaultParams(_type, _value) {}
    method defaultPropertiesToUpdate (line 3670) | static get defaultPropertiesToUpdate() {
    method isHandlingMimeForPasting (line 3673) | static isHandlingMimeForPasting(mime) {
    method paste (line 3676) | static paste(item, parent) {
    method propertiesToUpdate (line 3679) | get propertiesToUpdate() {
    method _isDraggable (line 3682) | get _isDraggable() {
    method _isDraggable (line 3685) | set _isDraggable(value) {
    method isEnterHandled (line 3689) | get isEnterHandled() {
    method center (line 3692) | center() {
    method addCommands (line 3714) | addCommands(params) {
    method currentLayer (line 3717) | get currentLayer() {
    method setInBackground (line 3720) | setInBackground() {
    method setInForeground (line 3723) | setInForeground() {
    method setParent (line 3726) | setParent(parent) {
    method focusin (line 3735) | focusin(event) {
    method focusout (line 3745) | focusout(event) {
    method commitOrRemove (line 3761) | commitOrRemove() {
    method commit (line 3768) | commit() {
    method addToAnnotationStorage (line 3771) | addToAnnotationStorage() {
    method setAt (line 3774) | setAt(x, y, tx, ty) {
    method #translate (line 3781) | #translate([width, height], x, y) {
    method translate (line 3787) | translate(x, y) {
    method translateInPage (line 3790) | translateInPage(x, y) {
    method drag (line 3797) | drag(tx, ty) {
    method _hasBeenMoved (line 3825) | get _hasBeenMoved() {
    method getBaseTranslation (line 3828) | getBaseTranslation() {
    method _mustFixPosition (line 3846) | get _mustFixPosition() {
    method fixAndSetPosition (line 3849) | fixAndSetPosition(rotation = this.rotation) {
    method #rotatePoint (line 3893) | static #rotatePoint(x, y, angle) {
    method screenToPageTranslation (line 3905) | screenToPageTranslation(x, y) {
    method pageTranslationToScreen (line 3908) | pageTranslationToScreen(x, y) {
    method #getRotationMatrix (line 3911) | #getRotationMatrix(rotation) {
    method parentScale (line 3929) | get parentScale() {
    method parentRotation (line 3932) | get parentRotation() {
    method parentDimensions (line 3935) | get parentDimensions() {
    method setDims (line 3944) | setDims(width, height) {
    method fixDims (line 3951) | fixDims() {
    method getInitialTranslation (line 3972) | getInitialTranslation() {
    method #createResizers (line 3975) | #createResizers() {
    method #resizerPointerdown (line 3993) | #resizerPointerdown(name, event) {
    method #addResizeToUndoStack (line 4034) | #addResizeToUndoStack(savedX, savedY, savedWidth, savedHeight) {
    method #resizerPointermove (line 4064) | #resizerPointermove(name, event) {
    method altTextFinish (line 4150) | altTextFinish() {
    method addEditToolbar (line 4153) | async addEditToolbar() {
    method removeEditToolbar (line 4164) | removeEditToolbar() {
    method getClientDimensions (line 4172) | getClientDimensions() {
    method addAltTextButton (line 4175) | async addAltTextButton() {
    method altTextData (line 4183) | get altTextData() {
    method altTextData (line 4186) | set altTextData(data) {
    method hasAltText (line 4192) | hasAltText() {
    method render (line 4195) | render() {
    method pointerdown (line 4217) | pointerdown(event) {
    method #selectOnPointerEvent (line 4232) | #selectOnPointerEvent(event) {
    method #setUpDragSession (line 4242) | #setUpDragSession(event) {
    method moveInDOM (line 4281) | moveInDOM() {
    method _setParentAndPosition (line 4290) | _setParentAndPosition(parent, x, y) {
    method getRect (line 4296) | getRect(tx, ty, rotation = this.rotation) {
    method getRectInCurrentCoords (line 4319) | getRectInCurrentCoords(rect, pageHeight) {
    method onceAdded (line 4336) | onceAdded() {}
    method isEmpty (line 4337) | isEmpty() {
    method enableEditMode (line 4340) | enableEditMode() {
    method disableEditMode (line 4343) | disableEditMode() {
    method isInEditMode (line 4346) | isInEditMode() {
    method shouldGetKeyboardEvents (line 4349) | shouldGetKeyboardEvents() {
    method needsToBeRebuilt (line 4352) | needsToBeRebuilt() {
    method rebuild (line 4355) | rebuild() {
    method rotate (line 4359) | rotate(_angle) {}
    method serialize (line 4360) | serialize(isForCopying = false, context = null) {
    method deserialize (line 4363) | static deserialize(data, parent, uiManager) {
    method hasBeenModified (line 4378) | get hasBeenModified() {
    method remove (line 4381) | remove() {
    method isResizable (line 4406) | get isResizable() {
    method makeResizable (line 4409) | makeResizable() {
    method toolbarPosition (line 4416) | get toolbarPosition() {
    method keydown (line 4419) | keydown(event) {
    method #resizerKeydown (line 4478) | #resizerKeydown(event) {
    method #resizerBlur (line 4481) | #resizerBlur(event) {
    method #resizerFocus (line 4486) | #resizerFocus(name) {
    method #setResizerTabIndex (line 4489) | #setResizerTabIndex(value) {
    method _resizeWithKeyboard (line 4497) | _resizeWithKeyboard(x, y) {
    method #stopResizing (line 4506) | #stopResizing() {
    method _stopResizingWithKeyboard (line 4520) | _stopResizingWithKeyboard() {
    method select (line 4524) | select() {
    method unselect (line 4537) | unselect() {
    method updateParams (line 4547) | updateParams(type, value) {}
    method disableEditing (line 4548) | disableEditing() {}
    method enableEditing (line 4549) | enableEditing() {}
    method enterInEditMode (line 4550) | enterInEditMode() {}
    method getImageForAltText (line 4551) | getImageForAltText() {
    method contentDiv (line 4554) | get contentDiv() {
    method isEditing (line 4557) | get isEditing() {
    method isEditing (line 4560) | set isEditing(value) {
    method setAspectRatio (line 4572) | setAspectRatio(width, height) {
    method MIN_SIZE (line 4581) | static get MIN_SIZE() {
    method canCreateNewEmptyEditor (line 4584) | static canCreateNewEmptyEditor() {
    method telemetryInitialData (line 4587) | get telemetryInitialData() {
    method telemetryFinalData (line 4592) | get telemetryFinalData() {
    method _reportTelemetry (line 4595) | _reportTelemetry(data, mustWait = false) {
    method show (line 4624) | show(visible = this._isVisible) {
    method enable (line 4628) | enable() {
    method disable (line 4634) | disable() {
    method renderAnnotationElement (line 4640) | renderAnnotationElement(annotation) {
    method resetAnnotationElement (line 4654) | resetAnnotationElement(annotation) {
  class FakeEditor (line 4663) | class FakeEditor extends AnnotationEditor {
    method constructor (line 4664) | constructor(params) {
    method serialize (line 4669) | serialize() {
  constant SEED (line 4679) | const SEED = 0xc3d2e1f0;
  constant MASK_HIGH (line 4680) | const MASK_HIGH = 0xffff0000;
  constant MASK_LOW (line 4681) | const MASK_LOW = 0xffff;
  class MurmurHash3_64 (line 4682) | class MurmurHash3_64 {
    method constructor (line 4683) | constructor(seed) {
    method update (line 4687) | update(input) {
    method hexdigest (line 4757) | hexdigest() {
  class AnnotationStorage (line 4780) | class AnnotationStorage {
    method constructor (line 4783) | constructor() {
    method getValue (line 4788) | getValue(key, defaultValue) {
    method getRawValue (line 4795) | getRawValue(key) {
    method remove (line 4798) | remove(key) {
    method setValue (line 4812) | setValue(key, value) {
    method has (line 4833) | has(key) {
    method getAll (line 4836) | getAll() {
    method setAll (line 4839) | setAll(obj) {
    method size (line 4844) | get size() {
    method #setModified (line 4847) | #setModified() {
    method resetModified (line 4855) | resetModified() {
    method print (line 4863) | get print() {
    method serializable (line 4866) | get serializable() {
    method editorStats (line 4896) | get editorStats() {
  class PrintAnnotationStorage (line 4934) | class PrintAnnotationStorage extends AnnotationStorage {
    method constructor (line 4936) | constructor(parent) {
    method print (line 4952) | get print() {
    method serializable (line 4955) | get serializable() {
  class FontLoader (line 4962) | class FontLoader {
    method constructor (line 4964) | constructor({
    method addNativeFontFace (line 4974) | addNativeFontFace(nativeFontFace) {
    method removeNativeFontFace (line 4978) | removeNativeFontFace(nativeFontFace) {
    method insertRule (line 4982) | insertRule(rule) {
    method clear (line 4990) | clear() {
    method loadSystemFont (line 5001) | async loadSystemFont({
    method bind (line 5029) | async bind(font) {
    method isFontLoadingAPISupported (line 5064) | get isFontLoadingAPISupported() {
    method isSyncFontLoadingSupported (line 5068) | get isSyncFontLoadingSupported() {
    method _queueLoadingCallback (line 5077) | _queueLoadingCallback(callback) {
    method _loadTestFont (line 5097) | get _loadTestFont() {
    method _prepareFontLoadEvent (line 5101) | _prepareFontLoadEvent(font, request) {
  class FontFaceObject (line 5166) | class FontFaceObject {
    method constructor (line 5167) | constructor(translatedData, {
    method createNativeFontFace (line 5178) | createNativeFontFace() {
    method createFontFaceRule (line 5197) | createFontFaceRule() {
    method getPathGenerator (line 5216) | getPathGenerator(objs, character) {
  class NodePackages (line 5326) | class NodePackages {
    method promise (line 5327) | static get promise() {
    method get (line 5330) | static get(name) {
  class NodeFilterFactory (line 5338) | class NodeFilterFactory extends BaseFilterFactory {}
  class NodeCanvasFactory (line 5339) | class NodeCanvasFactory extends BaseCanvasFactory {
    method _createCanvas (line 5340) | _createCanvas(width, height) {
  class NodeCMapReaderFactory (line 5345) | class NodeCMapReaderFactory extends BaseCMapReaderFactory {
    method _fetchData (line 5346) | _fetchData(url, compressionType) {
  class NodeStandardFontDataFactory (line 5353) | class NodeStandardFontDataFactory extends BaseStandardFontDataFactory {
    method _fetchData (line 5354) | _fetchData(url) {
  function applyBoundingBox (line 5367) | function applyBoundingBox(ctx, bbox) {
  class BaseShadingPattern (line 5377) | class BaseShadingPattern {
    method constructor (line 5378) | constructor() {
    method getPattern (line 5383) | getPattern() {
  class RadialAxialShadingPattern (line 5387) | class RadialAxialShadingPattern extends BaseShadingPattern {
    method constructor (line 5388) | constructor(IR) {
    method _createGradient (line 5399) | _createGradient(ctx) {
    method getPattern (line 5411) | getPattern(ctx, owner, inverse, pathType) {
  function drawTriangle (line 5441) | function drawTriangle(data, context, p1, p2, p3, c1, c2, c3) {
  function drawFigure (line 5543) | function drawFigure(data, figure, context) {
  class MeshShadingPattern (line 5569) | class MeshShadingPattern extends BaseShadingPattern {
    method constructor (line 5570) | constructor(IR) {
    method _createMeshCanvas (line 5580) | _createMeshCanvas(combinedScale, backgroundColor, cachedCanvases) {
    method getPattern (line 5627) | getPattern(ctx, owner, inverse, pathType) {
  class DummyShadingPattern (line 5651) | class DummyShadingPattern extends BaseShadingPattern {
    method getPattern (line 5652) | getPattern() {
  function getShadingPattern (line 5656) | function getShadingPattern(IR) {
  class TilingPattern (line 5671) | class TilingPattern {
    method constructor (line 5673) | constructor(IR, color, ctx, canvasGraphicsFactory, baseTransform) {
    method createPatternCanvas (line 5686) | createPatternCanvas(owner) {
    method getSizeAndScale (line 5737) | getSizeAndScale(step, realOutputSize, scale) {
    method clipBbox (line 5751) | clipBbox(graphics, x0, y0, x1, y1) {
    method setFillAndStrokeStyleToContext (line 5759) | setFillAndStrokeStyleToContext(graphics, paintType, color) {
    method getPattern (line 5781) | getPattern(ctx, owner, inverse, pathType) {
  function convertToRGBA (line 5801) | function convertToRGBA(params) {
  function convertBlackAndWhiteToRGBA (line 5810) | function convertBlackAndWhiteToRGBA({
  function convertRGBToRGBA (line 5851) | function convertRGBToRGBA({
  function grayToRGBA (line 5894) | function grayToRGBA(src, dest) {
  constant MIN_FONT_SIZE (line 5911) | const MIN_FONT_SIZE = 16;
  constant MAX_FONT_SIZE (line 5912) | const MAX_FONT_SIZE = 100;
  constant EXECUTION_TIME (line 5913) | const EXECUTION_TIME = 15;
  constant EXECUTION_STEPS (line 5914) | const EXECUTION_STEPS = 10;
  constant MAX_SIZE_TO_COMPILE (line 5915) | const MAX_SIZE_TO_COMPILE = 1000;
  constant FULL_CHUNK_HEIGHT (line 5916) | const FULL_CHUNK_HEIGHT = 16;
  function mirrorContextOperations (line 5917) | function mirrorContextOperations(ctx, destCtx) {
  class CachedCanvases (line 6015) | class CachedCanvases {
    method constructor (line 6016) | constructor(canvasFactory) {
    method getCanvas (line 6020) | getCanvas(id, width, height) {
    method delete (line 6031) | delete(id) {
    method clear (line 6034) | clear() {
  function drawImageAtIntegerCoords (line 6042) | function drawImageAtIntegerCoords(ctx, srcImg, srcX, srcY, srcW, srcH, d...
  function compileType3Glyph (line 6077) | function compileType3Glyph(imgData) {
  class CanvasExtraState (line 6207) | class CanvasExtraState {
    method constructor (line 6208) | constructor(width, height) {
    method clone (line 6235) | clone() {
    method setCurrentPoint (line 6240) | setCurrentPoint(x, y) {
    method updatePathMinMax (line 6244) | updatePathMinMax(transform, x, y) {
    method updateRectMinMax (line 6251) | updateRectMinMax(transform, rect) {
    method updateScalingPathMinMax (line 6261) | updateScalingPathMinMax(transform, minMax) {
    method updateCurvePathMinMax (line 6268) | updateCurvePathMinMax(transform, x0, y0, x1, y1, x2, y2, x3, y3, minMa...
    method getPathBoundingBox (line 6275) | getPathBoundingBox(pathType = PathType.FILL, transform = null) {
    method updateClipFromPath (line 6291) | updateClipFromPath() {
    method isEmptyClip (line 6295) | isEmptyClip() {
    method startNewPathAndClipBox (line 6298) | startNewPathAndClipBox(box) {
    method getClippedPathBoundingBox (line 6305) | getClippedPathBoundingBox(pathType = PathType.FILL, transform = null) {
  function putBinaryImageData (line 6309) | function putBinaryImageData(ctx, imgData) {
  function putBinaryImageMask (line 6402) | function putBinaryImageMask(ctx, imgData) {
  function copyCtxState (line 6431) | function copyCtxState(sourceCtx, destCtx) {
  function resetCtxToDefault (line 6443) | function resetCtxToDefault(ctx) {
  function getImageSmoothingEnabled (line 6466) | function getImageSmoothingEnabled(transform, interpolate) {
  constant LINE_CAP_STYLES (line 6476) | const LINE_CAP_STYLES = ["butt", "round", "square"];
  constant LINE_JOIN_STYLES (line 6477) | const LINE_JOIN_STYLES = ["miter", "round", "bevel"];
  constant NORMAL_CLIP (line 6478) | const NORMAL_CLIP = {};
  constant EO_CLIP (line 6479) | const EO_CLIP = {};
  class CanvasGraphics (line 6480) | class CanvasGraphics {
    method constructor (line 6481) | constructor(canvasCtx, commonObjs, objs, canvasFactory, filterFactory, {
    method getObject (line 6519) | getObject(data, fallback = null) {
    method beginDrawing (line 6525) | beginDrawing({
    method executeOperatorList (line 6556) | executeOperatorList(operatorList, executionStartIdx, continueCallback,...
    method #restoreInitialState (line 6600) | #restoreInitialState() {
    method endDrawing (line 6614) | endDrawing() {
    method #drawFilter (line 6629) | #drawFilter() {
    method _scaleImage (line 6640) | _scaleImage(img, inverseTransform) {
    method _createMaskCanvas (line 6675) | _createMaskCanvas(img) {
    method setLineWidth (line 6743) | setLineWidth(width) {
    method setLineCap (line 6750) | setLineCap(style) {
    method setLineJoin (line 6753) | setLineJoin(style) {
    method setMiterLimit (line 6756) | setMiterLimit(limit) {
    method setDash (line 6759) | setDash(dashArray, dashPhase) {
    method setRenderingIntent (line 6766) | setRenderingIntent(intent) {}
    method setFlatness (line 6767) | setFlatness(flatness) {}
    method setGState (line 6768) | setGState(states) {
    method inSMaskMode (line 6816) | get inSMaskMode() {
    method checkSMaskState (line 6819) | checkSMaskState() {
    method beginSMaskMode (line 6827) | beginSMaskMode() {
    method endSMaskMode (line 6843) | endSMaskMode() {
    method compose (line 6852) | compose(dirtyBox) {
    method composeSMask (line 6872) | composeSMask(ctx, smask, layerCtx, layerBox) {
    method genericComposeSMask (line 6888) | genericComposeSMask(maskCtx, layerCtx, width, height, subtype, backdro...
    method save (line 6933) | save() {
    method restore (line 6944) | restore() {
    method transform (line 6962) | transform(a, b, c, d, e, f) {
    method constructPath (line 6967) | constructPath(ops, args, minMax) {
    method closePath (line 7051) | closePath() {
    method stroke (line 7054) | stroke(consumePath = true) {
    method closeStroke (line 7073) | closeStroke() {
    method fill (line 7077) | fill(consumePath = true) {
    method eoFill (line 7103) | eoFill() {
    method fillStroke (line 7107) | fillStroke() {
    method eoFillStroke (line 7112) | eoFillStroke() {
    method closeFillStroke (line 7116) | closeFillStroke() {
    method closeEOFillStroke (line 7120) | closeEOFillStroke() {
    method endPath (line 7125) | endPath() {
    method clip (line 7128) | clip() {
    method eoClip (line 7131) | eoClip() {
    method beginText (line 7134) | beginText() {
    method endText (line 7140) | endText() {
    method setCharSpacing (line 7159) | setCharSpacing(spacing) {
    method setWordSpacing (line 7162) | setWordSpacing(spacing) {
    method setHScale (line 7165) | setHScale(scale) {
    method setLeading (line 7168) | setLeading(leading) {
    method setFont (line 7171) | setFont(fontRefName, size) {
    method setTextRenderingMode (line 7210) | setTextRenderingMode(mode) {
    method setTextRise (line 7213) | setTextRise(rise) {
    method moveText (line 7216) | moveText(x, y) {
    method setLeadingMoveText (line 7220) | setLeadingMoveText(x, y) {
    method setTextMatrix (line 7224) | setTextMatrix(a, b, c, d, e, f) {
    method nextLine (line 7230) | nextLine() {
    method paintChar (line 7233) | paintChar(character, x, y, patternTransform) {
    method isFontSubpixelAAEnabled (line 7280) | get isFontSubpixelAAEnabled() {
    method showText (line 7296) | showText(glyphs) {
    method showType3Text (line 7426) | showType3Text(glyphs) {
    method setCharWidth (line 7479) | setCharWidth(xWidth, yWidth) {}
    method setCharWidthAndBounds (line 7480) | setCharWidthAndBounds(xWidth, yWidth, llx, lly, urx, ury) {
    method getColorN_Pattern (line 7485) | getColorN_Pattern(IR) {
    method setStrokeColorN (line 7502) | setStrokeColorN() {
    method setFillColorN (line 7505) | setFillColorN() {
    method setStrokeRGBColor (line 7509) | setStrokeRGBColor(r, g, b) {
    method setFillRGBColor (line 7514) | setFillRGBColor(r, g, b) {
    method _getPattern (line 7520) | _getPattern(objId, matrix = null) {
    method shadingFill (line 7533) | shadingFill(objId) {
    method beginInlineImage (line 7555) | beginInlineImage() {
    method beginImageData (line 7558) | beginImageData() {
    method paintFormXObjectBegin (line 7561) | paintFormXObjectBegin(matrix, bbox) {
    method paintFormXObjectEnd (line 7580) | paintFormXObjectEnd() {
    method beginGroup (line 7587) | beginGroup(group) {
    method endGroup (line 7648) | endGroup(group) {
    method beginAnnotation (line 7672) | beginAnnotation(id, rect, transform, matrix, hasOwnCanvas) {
    method endAnnotation (line 7719) | endAnnotation() {
    method paintImageMaskXObject (line 7728) | paintImageMaskXObject(img) {
    method paintImageMaskXObjectRepeat (line 7754) | paintImageMaskXObjectRepeat(img, scaleX, skewX = 0, skewY = 0, scaleY,...
    method paintImageMaskXObjectGroup (line 7773) | paintImageMaskXObjectGroup(images) {
    method paintImageXObject (line 7804) | paintImageXObject(objId) {
    method paintImageXObjectRepeat (line 7815) | paintImageXObjectRepeat(objId, scaleX, scaleY, positions) {
    method applyTransferMapsToCanvas (line 7838) | applyTransferMapsToCanvas(ctx) {
    method applyTransferMapsToBitmap (line 7846) | applyTransferMapsToBitmap(imgData) {
    method paintInlineImageXObject (line 7862) | paintInlineImageXObject(imgData) {
    method paintInlineImageXObjectGroup (line 7896) | paintInlineImageXObjectGroup(imgData, map) {
    method paintSolidColorImageMask (line 7921) | paintSolidColorImageMask() {
    method markPoint (line 7928) | markPoint(tag) {}
    method markPointProps (line 7929) | markPointProps(tag, properties) {}
    method beginMarkedContent (line 7930) | beginMarkedContent(tag) {
    method beginMarkedContentProps (line 7935) | beginMarkedContentProps(tag, properties) {
    method endMarkedContent (line 7947) | endMarkedContent() {
    method beginCompat (line 7951) | beginCompat() {}
    method endCompat (line 7952) | endCompat() {}
    method consumePath (line 7953) | consumePath(clipBox) {
    method getSinglePixelWidth (line 7975) | getSinglePixelWidth() {
    method getScaleForStroking (line 7989) | getScaleForStroking() {
    method rescaleAndStroke (line 8038) | rescaleAndStroke(saveRestore) {
    method isContentVisible (line 8066) | isContentVisible() {
  class GlobalWorkerOptions (line 8082) | class GlobalWorkerOptions {
    method workerPort (line 8085) | static get workerPort() {
    method workerPort (line 8088) | static set workerPort(val) {
    method workerSrc (line 8094) | static get workerSrc() {
    method workerSrc (line 8097) | static set workerSrc(val) {
  function wrapReason (line 8123) | function wrapReason(reason) {
  class MessageHandler (line 8142) | class MessageHandler {
    method constructor (line 8143) | constructor(sourceName, targetName, comObj) {
    method on (line 8214) | on(actionName, handler) {
    method send (line 8221) | send(actionName, data, transfers) {
    method sendWithPromise (line 8229) | sendWithPromise(actionName, data, transfers) {
    method sendWithStream (line 8246) | sendWithStream(actionName, data, queueingStrategy, transfers) {
    method #createStreamSink (line 8299) | #createStreamSink(data) {
    method #processStreamMessage (line 8382) | #processStreamMessage(data) {
    method #deleteStreamController (line 8499) | async #deleteStreamController(streamController, streamId) {
    method destroy (line 8503) | destroy() {
  class Metadata (line 8510) | class Metadata {
    method constructor (line 8513) | constructor({
    method getRaw (line 8520) | getRaw() {
    method get (line 8523) | get(name) {
    method getAll (line 8526) | getAll() {
    method has (line 8529) | has(name) {
  constant INTERNAL (line 8537) | const INTERNAL = Symbol("INTERNAL");
  class OptionalContentGroup (line 8538) | class OptionalContentGroup {
    method constructor (line 8543) | constructor(renderingIntent, {
    method visible (line 8554) | get visible() {
    method _setVisible (line 8572) | _setVisible(internal, visible, userSet = false) {
  class OptionalContentConfig (line 8580) | class OptionalContentConfig {
    method constructor (line 8585) | constructor(data, renderingIntent = RenderingIntentFlag.DISPLAY) {
    method #evaluateVisibilityExpression (line 8611) | #evaluateVisibilityExpression(array) {
    method isVisible (line 8647) | isVisible(group) {
    method setVisibility (line 8716) | setVisibility(id, visible = true) {
    method setOCGState (line 8725) | setOCGState({
    method hasInitialVisibility (line 8756) | get hasInitialVisibility() {
    method getOrder (line 8759) | getOrder() {
    method getGroups (line 8768) | getGroups() {
    method getGroup (line 8771) | getGroup(id) {
    method getHash (line 8774) | getHash() {
  class PDFDataTransportStream (line 8789) | class PDFDataTransportStream {
    method constructor (line 8790) | constructor(pdfDataRangeTransport, {
    method _onReceiveData (line 8836) | _onReceiveData({
    method _progressiveDataLength (line 8858) | get _progressiveDataLength() {
    method _onProgress (line 8861) | _onProgress(evt) {
    method _onProgressiveDone (line 8873) | _onProgressiveDone() {
    method _removeRangeReader (line 8877) | _removeRangeReader(reader) {
    method getFullReader (line 8883) | getFullReader() {
    method getRangeReader (line 8889) | getRangeReader(begin, end) {
    method cancelAllRequests (line 8898) | cancelAllRequests(reason) {
  class PDFDataTransportStreamReader (line 8906) | class PDFDataTransportStreamReader {
    method constructor (line 8907) | constructor(stream, queuedChunks, progressiveDone = false, contentDisp...
    method _enqueue (line 8921) | _enqueue(chunk) {
    method headersReady (line 8936) | get headersReady() {
    method filename (line 8939) | get filename() {
    method isRangeSupported (line 8942) | get isRangeSupported() {
    method isStreamingSupported (line 8945) | get isStreamingSupported() {
    method contentLength (line 8948) | get contentLength() {
    method read (line 8951) | async read() {
    method cancel (line 8969) | cancel(reason) {
    method progressiveDone (line 8979) | progressiveDone() {
  class PDFDataTransportStreamRangeReader (line 8986) | class PDFDataTransportStreamRangeReader {
    method constructor (line 8987) | constructor(stream, begin, end) {
    method _enqueue (line 8996) | _enqueue(chunk) {
    method isStreamingSupported (line 9019) | get isStreamingSupported() {
    method read (line 9022) | async read() {
    method cancel (line 9041) | cancel(reason) {
  function getFilenameFromContentDispositionHeader (line 9056) | function getFilenameFromContentDispositionHeader(contentDisposition) {
  function validateRangeRequestCapabilities (line 9189) | function validateRangeRequestCapabilities({
  function extractFilenameFromHeader (line 9220) | function extractFilenameFromHeader(getResponseHeader) {
  function createResponseStatusError (line 9235) | function createResponseStatusError(status, url) {
  function validateResponseStatus (line 9241) | function validateResponseStatus(status) {
  function createFetchOptions (line 9248) | function createFetchOptions(headers, withCredentials, abortController) {
  function createHeaders (line 9258) | function createHeaders(httpHeaders) {
  function getArrayBuffer (line 9269) | function getArrayBuffer(val) {
  class PDFFetchStream (line 9279) | class PDFFetchStream {
    method constructor (line 9280) | constructor(source) {
    method _progressiveDataLength (line 9287) | get _progressiveDataLength() {
    method getFullReader (line 9290) | getFullReader() {
    method getRangeReader (line 9295) | getRangeReader(begin, end) {
    method cancelAllRequests (line 9303) | cancelAllRequests(reason) {
  class PDFFetchStreamReader (line 9310) | class PDFFetchStreamReader {
    method constructor (line 9311) | constructor(stream) {
    method headersReady (line 9355) | get headersReady() {
    method filename (line 9358) | get filename() {
    method contentLength (line 9361) | get contentLength() {
    method isRangeSupported (line 9364) | get isRangeSupported() {
    method isStreamingSupported (line 9367) | get isStreamingSupported() {
    method read (line 9370) | async read() {
    method cancel (line 9392) | cancel(reason) {
  class PDFFetchStreamRangeReader (line 9397) | class PDFFetchStreamRangeReader {
    method constructor (line 9398) | constructor(stream, begin, end) {
    method isStreamingSupported (line 9419) | get isStreamingSupported() {
    method read (line 9422) | async read() {
    method cancel (line 9443) | cancel(reason) {
  constant OK_RESPONSE (line 9452) | const OK_RESPONSE = 200;
  constant PARTIAL_CONTENT_RESPONSE (line 9453) | const PARTIAL_CONTENT_RESPONSE = 206;
  function network_getArrayBuffer (line 9454) | function network_getArrayBuffer(xhr) {
  class NetworkManager (line 9461) | class NetworkManager {
    method constructor (line 9462) | constructor(url, args = {}) {
    method requestRange (line 9470) | requestRange(begin, end, listeners) {
    method requestFull (line 9480) | requestFull(listeners) {
    method request (line 9483) | request(args) {
    method onProgress (line 9519) | onProgress(xhrId, evt) {
    method onStateChange (line 9526) | onStateChange(xhrId, evt) {
    method getRequestXhr (line 9570) | getRequestXhr(xhrId) {
    method isPendingRequest (line 9573) | isPendingRequest(xhrId) {
    method abortRequest (line 9576) | abortRequest(xhrId) {
  class PDFNetworkStream (line 9582) | class PDFNetworkStream {
    method constructor (line 9583) | constructor(source) {
    method _onRangeRequestReaderClosed (line 9593) | _onRangeRequestReaderClosed(reader) {
    method getFullReader (line 9599) | getFullReader() {
    method getRangeReader (line 9604) | getRangeReader(begin, end) {
    method cancelAllRequests (line 9610) | cancelAllRequests(reason) {
  class PDFNetworkStreamFullRequestReader (line 9617) | class PDFNetworkStreamFullRequestReader {
    method constructor (line 9618) | constructor(manager, source) {
    method _onHeadersReceived (line 9644) | _onHeadersReceived() {
    method _onDone (line 9667) | _onDone(data) {
    method _onError (line 9691) | _onError(status) {
    method _onProgress (line 9700) | _onProgress(evt) {
    method filename (line 9706) | get filename() {
    method isRangeSupported (line 9709) | get isRangeSupported() {
    method isStreamingSupported (line 9712) | get isStreamingSupported() {
    method contentLength (line 9715) | get contentLength() {
    method headersReady (line 9718) | get headersReady() {
    method read (line 9721) | async read() {
    method cancel (line 9742) | cancel(reason) {
  class PDFNetworkStreamRangeRequestReader (line 9758) | class PDFNetworkStreamRangeRequestReader {
    method constructor (line 9759) | constructor(manager, begin, end) {
    method _close (line 9775) | _close() {
    method _onDone (line 9778) | _onDone(data) {
    method _onError (line 9799) | _onError(status) {
    method _onProgress (line 9807) | _onProgress(evt) {
    method isStreamingSupported (line 9814) | get isStreamingSupported() {
    method read (line 9817) | async read() {
    method cancel (line 9839) | cancel(reason) {
  function parseUrl (line 9860) | function parseUrl(sourceUrl) {
  class PDFNodeStream (line 9874) | class PDFNodeStream {
    method constructor (line 9875) | constructor(source) {
    method _progressiveDataLength (line 9884) | get _progressiveDataLength() {
    method getFullReader (line 9887) | getFullReader() {
    method getRangeReader (line 9892) | getRangeReader(start, end) {
    method cancelAllRequests (line 9900) | cancelAllRequests(reason) {
  class BaseFullReader (line 9907) | class BaseFullReader {
    method constructor (line 9908) | constructor(stream) {
    method headersReady (line 9928) | get headersReady() {
    method filename (line 9931) | get filename() {
    method contentLength (line 9934) | get contentLength() {
    method isRangeSupported (line 9937) | get isRangeSupported() {
    method isStreamingSupported (line 9940) | get isStreamingSupported() {
    method read (line 9943) | async read() {
    method cancel (line 9970) | cancel(reason) {
    method _error (line 9977) | _error(reason) {
    method _setReadableStream (line 9981) | _setReadableStream(readableStream) {
  class BaseRangeReader (line 10002) | class BaseRangeReader {
    method constructor (line 10003) | constructor(stream) {
    method isStreamingSupported (line 10014) | get isStreamingSupported() {
    method read (line 10017) | async read() {
    method cancel (line 10043) | cancel(reason) {
    method _error (line 10050) | _error(reason) {
    method _setReadableStream (line 10054) | _setReadableStream(readableStream) {
  function createRequestOptions (line 10072) | function createRequestOptions(parsedUrl, headers) {
  class PDFNodeStreamFullReader (line 10083) | class PDFNodeStreamFullReader extends BaseFullReader {
    method constructor (line 10084) | constructor(stream) {
  class PDFNodeStreamRangeReader (line 10124) | class PDFNodeStreamRangeReader extends BaseRangeReader {
    method constructor (line 10125) | constructor(stream, start, end) {
  class PDFNodeStreamFsFullReader (line 10158) | class PDFNodeStreamFsFullReader extends BaseFullReader {
    method constructor (line 10159) | constructor(stream) {
  class PDFNodeStreamFsRangeReader (line 10179) | class PDFNodeStreamFsRangeReader extends BaseRangeReader {
    method constructor (line 10180) | constructor(stream, start, end) {
  constant MAX_TEXT_DIVS_TO_RENDER (line 10197) | const MAX_TEXT_DIVS_TO_RENDER = 100000;
  constant DEFAULT_FONT_SIZE (line 10198) | const DEFAULT_FONT_SIZE = 30;
  constant DEFAULT_FONT_ASCENT (line 10199) | const DEFAULT_FONT_ASCENT = 0.8;
  class TextLayer (line 10200) | class TextLayer {
    method constructor (line 10222) | constructor({
    method render (line 10265) | render() {
    method update (line 10286) | update({
    method cancel (line 10316) | cancel() {
    method textDivs (line 10322) | get textDivs() {
    method textContentItemsStr (line 10325) | get textContentItemsStr() {
    method #processItems (line 10328) | #processItems(items) {
    method #appendText (line 10359) | #appendText(geom) {
    method #layout (line 10433) | #layout(params) {
    method cleanup (line 10472) | static cleanup() {
    method #getCtx (line 10484) | static #getCtx(lang = null) {
    method #getAscent (line 10498) | static #getAscent(fontFamily, lang) {
  function renderTextLayer (line 10545) | function renderTextLayer() {
  function updateTextLayer (line 10573) | function updateTextLayer() {
  class XfaText (line 10578) | class XfaText {
    method textContent (line 10579) | static textContent(xfa) {
    method shouldBuildText (line 10615) | static shouldBuildText(name) {
  constant DEFAULT_RANGE_CHUNK_SIZE (line 10637) | const DEFAULT_RANGE_CHUNK_SIZE = 65536;
  constant RENDERING_CANCELLED_TIMEOUT (line 10638) | const RENDERING_CANCELLED_TIMEOUT = 100;
  constant DELAYED_CLEANUP_TIMEOUT (line 10639) | const DELAYED_CLEANUP_TIMEOUT = 5000;
  function getDocument (line 10644) | function getDocument(src) {
  function getUrlProp (line 10808) | function getUrlProp(val) {
  function getDataProp (line 10821) | function getDataProp(val) {
  function isRefProxy (line 10836) | function isRefProxy(ref) {
  class PDFDocumentLoadingTask (line 10839) | class PDFDocumentLoadingTask {
    method constructor (line 10841) | constructor() {
    method promise (line 10850) | get promise() {
    method destroy (line 10853) | async destroy() {
  class PDFDataRangeTransport (line 10873) | class PDFDataRangeTransport {
    method constructor (line 10874) | constructor(length, initialData, progressiveDone = false, contentDispo...
    method addRangeListener (line 10885) | addRangeListener(listener) {
    method addProgressListener (line 10888) | addProgressListener(listener) {
    method addProgressiveReadListener (line 10891) | addProgressiveReadListener(listener) {
    method addProgressiveDoneListener (line 10894) | addProgressiveDoneListener(listener) {
    method onDataRange (line 10897) | onDataRange(begin, chunk) {
    method onDataProgress (line 10902) | onDataProgress(loaded, total) {
    method onDataProgressiveRead (line 10909) | onDataProgressiveRead(chunk) {
    method onDataProgressiveDone (line 10916) | onDataProgressiveDone() {
    method transportReady (line 10923) | transportReady() {
    method requestDataRange (line 10926) | requestDataRange(begin, end) {
    method abort (line 10929) | abort() {}
  class PDFDocumentProxy (line 10931) | class PDFDocumentProxy {
    method constructor (line 10932) | constructor(pdfInfo, transport) {
    method annotationStorage (line 10936) | get annotationStorage() {
    method filterFactory (line 10939) | get filterFactory() {
    method numPages (line 10942) | get numPages() {
    method fingerprints (line 10945) | get fingerprints() {
    method isPureXfa (line 10948) | get isPureXfa() {
    method allXfaHtml (line 10951) | get allXfaHtml() {
    method getPage (line 10954) | getPage(pageNumber) {
    method getPageIndex (line 10957) | getPageIndex(ref) {
    method getDestinations (line 10960) | getDestinations() {
    method getDestination (line 10963) | getDestination(id) {
    method getPageLabels (line 10966) | getPageLabels() {
    method getPageLayout (line 10969) | getPageLayout() {
    method getPageMode (line 10972) | getPageMode() {
    method getViewerPreferences (line 10975) | getViewerPreferences() {
    method getOpenAction (line 10978) | getOpenAction() {
    method getAttachments (line 10981) | getAttachments() {
    method getJSActions (line 10984) | getJSActions() {
    method getOutline (line 10987) | getOutline() {
    method getOptionalContentConfig (line 10990) | getOptionalContentConfig({
    method getPermissions (line 10998) | getPermissions() {
    method getMetadata (line 11001) | getMetadata() {
    method getMarkInfo (line 11004) | getMarkInfo() {
    method getData (line 11007) | getData() {
    method saveDocument (line 11010) | saveDocument() {
    method getDownloadInfo (line 11013) | getDownloadInfo() {
    method cleanup (line 11016) | cleanup(keepLoadedFonts = false) {
    method destroy (line 11019) | destroy() {
    method cachedPageNumber (line 11022) | cachedPageNumber(ref) {
    method loadingParams (line 11025) | get loadingParams() {
    method loadingTask (line 11028) | get loadingTask() {
    method getFieldObjects (line 11031) | getFieldObjects() {
    method hasJSActions (line 11034) | hasJSActions() {
    method getCalculationOrderIds (line 11037) | getCalculationOrderIds() {
  class PDFPageProxy (line 11041) | class PDFPageProxy {
    method constructor (line 11044) | constructor(pageIndex, pageInfo, transport, pdfBug = false) {
    method pageNumber (line 11056) | get pageNumber() {
    method rotate (line 11059) | get rotate() {
    method ref (line 11062) | get ref() {
    method userUnit (line 11065) | get userUnit() {
    method view (line 11068) | get view() {
    method getViewport (line 11071) | getViewport({
    method getAnnotations (line 11087) | getAnnotations({
    method getJSActions (line 11095) | getJSActions() {
    method filterFactory (line 11098) | get filterFactory() {
    method isPureXfa (line 11101) | get isPureXfa() {
    method getXfa (line 11104) | async getXfa() {
    method render (line 11107) | render({
    method getOperatorList (line 11210) | getOperatorList({
    method streamTextContent (line 11244) | streamTextContent({
    method getTextContent (line 11260) | getTextContent(params = {}) {
    method getStructTree (line 11290) | getStructTree() {
    method _destroy (line 11293) | _destroy() {
    method cleanup (line 11315) | cleanup(resetStats = false) {
    method #tryCleanup (line 11323) | #tryCleanup(delayed = false) {
    method #abortDelayedCleanup (line 11348) | #abortDelayedCleanup() {
    method _startRenderPage (line 11354) | _startRenderPage(transparency, cacheKey) {
    method _renderPageChunk (line 11362) | _renderPageChunk(operatorListChunk, intentState) {
    method _pumpOperatorList (line 11376) | _pumpOperatorList({
    method _abortOperatorList (line 11431) | _abortOperatorList({
    method stats (line 11476) | get stats() {
  class LoopbackPort (line 11480) | class LoopbackPort {
    method postMessage (line 11483) | postMessage(obj, transfer) {
    method addEventListener (line 11495) | addEventListener(name, listener) {
    method removeEventListener (line 11498) | removeEventListener(name, listener) {
    method terminate (line 11501) | terminate() {
  class PDFWorker (line 11534) | class PDFWorker {
    method constructor (line 11536) | constructor({
    method promise (line 11558) | get promise() {
    method port (line 11564) | get port() {
    method messageHandler (line 11567) | get messageHandler() {
    method _initializeFromPort (line 11570) | _initializeFromPort(port) {
    method _initialize (line 11579) | _initialize() {
    method _setupFakeWorker (line 11652) | _setupFakeWorker() {
    method destroy (line 11677) | destroy() {
    method fromPort (line 11690) | static fromPort(params) {
    method workerSrc (line 11703) | static get workerSrc() {
    method #mainThreadWorkerMessageHandler (line 11709) | static get #mainThreadWorkerMessageHandler() {
    method _setupFakeWorkerGlobal (line 11716) | static get _setupFakeWorkerGlobal() {
  class WorkerTransport (line 11727) | class WorkerTransport {
    method constructor (line 11733) | constructor(messageHandler, loadingTask, networkStream, params, factor...
    method #cacheSimpleMethod (line 11755) | #cacheSimpleMethod(name, data = null) {
    method annotationStorage (line 11764) | get annotationStorage() {
    method getRenderingIntent (line 11767) | getRenderingIntent(intent, annotationMode = AnnotationMode.ENABLE, pri...
    method destroy (line 11808) | destroy() {
    method setupMessageHandler (line 11842) | setupMessageHandler() {
    method getData (line 12119) | getData() {
    method saveDocument (line 12122) | saveDocument() {
    method getPage (line 12139) | getPage(pageNumber) {
    method getPageIndex (line 12164) | getPageIndex(ref) {
    method getAnnotations (line 12173) | getAnnotations(pageIndex, intent) {
    method getFieldObjects (line 12179) | getFieldObjects() {
    method hasJSActions (line 12182) | hasJSActions() {
    method getCalculationOrderIds (line 12185) | getCalculationOrderIds() {
    method getDestinations (line 12188) | getDestinations() {
    method getDestination (line 12191) | getDestination(id) {
    method getPageLabels (line 12199) | getPageLabels() {
    method getPageLayout (line 12202) | getPageLayout() {
    method getPageMode (line 12205) | getPageMode() {
    method getViewerPreferences (line 12208) | getViewerPreferences() {
    method getOpenAction (line 12211) | getOpenAction() {
    method getAttachments (line 12214) | getAttachments() {
    method getDocJSActions (line 12217) | getDocJSActions() {
    method getPageJSActions (line 12220) | getPageJSActions(pageIndex) {
    method getStructTree (line 12225) | getStructTree(pageIndex) {
    method getOutline (line 12230) | getOutline() {
    method getOptionalContentConfig (line 12233) | getOptionalContentConfig(renderingIntent) {
    method getPermissions (line 12236) | getPermissions() {
    method getMetadata (line 12239) | getMetadata() {
    method getMarkInfo (line 12254) | getMarkInfo() {
    method startCleanup (line 12257) | async startCleanup(keepLoadedFonts = false) {
    method cachedPageNumber (line 12276) | cachedPageNumber(ref) {
  constant INITIAL_DATA (line 12284) | const INITIAL_DATA = Symbol("INITIAL_DATA");
  class PDFObjects (line 12285) | class PDFObjects {
    method #ensureObj (line 12287) | #ensureObj(objId) {
    method get (line 12293) | get(objId, callback = null) {
    method has (line 12305) | has(objId) {
    method resolve (line 12309) | resolve(objId, data = null) {
    method clear (line 12314) | clear() {
  method [Symbol.iterator] (line 12323) | *[Symbol.iterator]() {
  class RenderTask (line 12335) | class RenderTask {
    method constructor (line 12337) | constructor(internalRenderTask) {
    method promise (line 12341) | get promise() {
    method cancel (line 12344) | cancel(extraDelay = 0) {
    method separateAnnots (line 12347) | get separateAnnots() {
  class InternalRenderTask (line 12360) | class InternalRenderTask {
    method constructor (line 12362) | constructor({
    method completed (line 12401) | get completed() {
    method initializeGraphics (line 12404) | initializeGraphics({
    method cancel (line 12441) | cancel(error = null, extraDelay = 0) {
    method operatorListChanged (line 12448) | operatorListChanged() {
    method _continue (line 12459) | _continue() {
    method _scheduleNext (line 12470) | _scheduleNext() {
    method _next (line 12479) | async _next() {
  function makeColorComp (line 12498) | function makeColorComp(n) {
  function scaleAndClamp (line 12501) | function scaleAndClamp(x) {
  class ColorConverters (line 12504) | class ColorConverters {
    method CMYK_G (line 12505) | static CMYK_G([c, y, m, k]) {
    method G_CMYK (line 12508) | static G_CMYK([g]) {
    method G_RGB (line 12511) | static G_RGB([g]) {
    method G_rgb (line 12514) | static G_rgb([g]) {
    method G_HTML (line 12518) | static G_HTML([g]) {
    method RGB_G (line 12522) | static RGB_G([r, g, b]) {
    method RGB_rgb (line 12525) | static RGB_rgb(color) {
    method RGB_HTML (line 12528) | static RGB_HTML(color) {
    method T_HTML (line 12531) | static T_HTML() {
    method T_rgb (line 12534) | static T_rgb() {
    method CMYK_RGB (line 12537) | static CMYK_RGB([c, y, m, k]) {
    method CMYK_rgb (line 12540) | static CMYK_rgb([c, y, m, k]) {
    method CMYK_HTML (line 12543) | static CMYK_HTML(components) {
    method RGB_CMYK (line 12547) | static RGB_CMYK([r, g, b]) {
  class XfaLayer (line 12558) | class XfaLayer {
    method setupStorage (line 12559) | static setupStorage(html, id, element, storage, intent) {
    method setAttributes (line 12627) | static setAttributes({
    method render (line 12675) | static render(parameters) {
    method update (line 12760) | static update(parameters) {
  constant DEFAULT_TAB_INDEX (line 12773) | const DEFAULT_TAB_INDEX = 1000;
  function getRectDims (line 12776) | function getRectDims(rect) {
  class AnnotationElementFactory (line 12782) | class AnnotationElementFactory {
    method create (line 12783) | static create(parameters) {
  class AnnotationElement (line 12843) | class AnnotationElement {
    method constructor (line 12847) | constructor(parameters, {
    method _hasPopupData (line 12872) | static _hasPopupData({
    method hasPopupData (line 12879) | get hasPopupData() {
    method updateEdited (line 12882) | updateEdited(params) {
    method resetEdited (line 12897) | resetEdited() {
    method #setRectEdited (line 12905) | #setRectEdited(rect) {
    method _createContainer (line 12939) | _createContainer(ignoreBorder) {
    method setRotation (line 13036) | setRotation(angle, container = this.container) {
    method _commonActions (line 13060) | get _commonActions() {
    method _dispatchEventFromSandbox (line 13138) | _dispatchEventFromSandbox(actions, jsEvent) {
    method _setDefaultPropertiesFromJS (line 13145) | _setDefaultPropertiesFromJS(element) {
    method _createQuadrilaterals (line 13168) | _createQuadrilaterals() {
    method _createPopup (line 13246) | _createPopup() {
    method render (line 13269) | render() {
    method _getElementsByName (line 13272) | _getElementsByName(name, skipId = null) {
    method show (line 13322) | show() {
    method hide (line 13328) | hide() {
    method getElementsToTriggerPopup (line 13334) | getElementsToTriggerPopup() {
    method addHighlightArea (line 13337) | addHighlightArea() {
    method _isEditable (line 13347) | get _isEditable() {
    method _editOnDoubleClick (line 13350) | _editOnDoubleClick() {
  class LinkAnnotationElement (line 13369) | class LinkAnnotationElement extends AnnotationElement {
    method constructor (line 13370) | constructor(parameters, options = null) {
    method render (line 13378) | render() {
    method #setInternalLink (line 13420) | #setInternalLink() {
    method _bindLink (line 13423) | _bindLink(link, destination) {
    method _bindNamedAction (line 13435) | _bindNamedAction(link, action) {
    method #bindAttachment (line 13443) | #bindAttachment(link, attachment, dest = null) {
    method #bindSetOCGState (line 13454) | #bindSetOCGState(link, action) {
    method _bindJSAction (line 13462) | _bindJSAction(link, data) {
    method _bindResetFormAction (line 13486) | _bindResetFormAction(link, resetForm) {
  class TextAnnotationElement (line 13589) | class TextAnnotationElement extends AnnotationElement {
    method constructor (line 13590) | constructor(parameters) {
    method render (line 13595) | render() {
  class WidgetAnnotationElement (line 13610) | class WidgetAnnotationElement extends AnnotationElement {
    method render (line 13611) | render() {
    method showElementAndHideCanvas (line 13614) | showElementAndHideCanvas(element) {
    method _getKeyModifier (line 13622) | _getKeyModifier(event) {
    method _setEventListener (line 13625) | _setEventListener(element, elementData, baseName, eventName, valueGett...
    method _setEventListeners (line 13666) | _setEventListeners(element, elementData, names, getter) {
    method _setBackgroundColor (line 13683) | _setBackgroundColor(element) {
    method _setTextStyle (line 13687) | _setTextStyle(element) {
    method _setRequired (line 13712) | _setRequired(element, isRequired) {
  class TextWidgetAnnotationElement (line 13721) | class TextWidgetAnnotationElement extends WidgetAnnotationElement {
    method constructor (line 13722) | constructor(parameters) {
    method setPropertyOnSiblings (line 13728) | setPropertyOnSiblings(base, key, value, keyInStorage) {
    method render (line 13739) | render() {
  class SignatureWidgetAnnotationElement (line 14039) | class SignatureWidgetAnnotationElement extends WidgetAnnotationElement {
    method constructor (line 14040) | constructor(parameters) {
  class CheckboxWidgetAnnotationElement (line 14046) | class CheckboxWidgetAnnotationElement extends WidgetAnnotationElement {
    method constructor (line 14047) | constructor(parameters) {
    method render (line 14052) | render() {
  class RadioButtonWidgetAnnotationElement (line 14120) | class RadioButtonWidgetAnnotationElement extends WidgetAnnotationElement {
    method constructor (line 14121) | constructor(parameters) {
    method render (line 14126) | render() {
  class PushButtonWidgetAnnotationElement (line 14203) | class PushButtonWidgetAnnotationElement extends LinkAnnotationElement {
    method constructor (line 14204) | constructor(parameters) {
    method render (line 14209) | render() {
  class ChoiceWidgetAnnotationElement (line 14222) | class ChoiceWidgetAnnotationElement extends WidgetAnnotationElement {
    method constructor (line 14223) | constructor(parameters) {
    method render (line 14228) | render() {
  class PopupAnnotationElement (line 14444) | class PopupAnnotationElement extends AnnotationElement {
    method constructor (line 14445) | constructor(parameters) {
    method render (line 14456) | render() {
  class PopupElement (line 14481) | class PopupElement {
    method constructor (line 14501) | constructor({
    method render (line 14539) | render() {
    method #html (line 14587) | get #html() {
    method #fontSize (line 14595) | get #fontSize() {
    method #fontColor (line 14598) | get #fontColor() {
    method #makePopupContent (line 14601) | #makePopupContent(text) {
    method _formatContents (line 14631) | _formatContents({
    method #keyDown (line 14648) | #keyDown(event) {
    method updateEdited (line 14656) | updateEdited({
    method resetEdited (line 14674) | resetEdited() {
    method #setPosition (line 14687) | #setPosition() {
    method #toggle (line 14725) | #toggle() {
    method #show (line 14737) | #show() {
    method #hide (line 14749) | #hide() {
    method forceHide (line 14757) | forceHide() {
    method maybeShow (line 14764) | maybeShow() {
    method isVisible (line 14774) | get isVisible() {
  class FreeTextAnnotationElement (line 14778) | class FreeTextAnnotationElement extends AnnotationElement {
    method constructor (line 14779) | constructor(parameters) {
    method render (line 14788) | render() {
    method _isEditable (line 14807) | get _isEditable() {
  class LineAnnotationElement (line 14811) | class LineAnnotationElement extends AnnotationElement {
    method constructor (line 14813) | constructor(parameters) {
    method render (line 14819) | render() {
    method getElementsToTriggerPopup (line 14842) | getElementsToTriggerPopup() {
    method addHighlightArea (line 14845) | addHighlightArea() {
  class SquareAnnotationElement (line 14849) | class SquareAnnotationElement extends AnnotationElement {
    method constructor (line 14851) | constructor(parameters) {
    method render (line 14857) | render() {
    method getElementsToTriggerPopup (line 14881) | getElementsToTriggerPopup() {
    method addHighlightArea (line 14884) | addHighlightArea() {
  class CircleAnnotationElement (line 14888) | class CircleAnnotationElement extends AnnotationElement {
    method constructor (line 14890) | constructor(parameters) {
    method render (line 14896) | render() {
    method getElementsToTriggerPopup (line 14920) | getElementsToTriggerPopup() {
    method addHighlightArea (line 14923) | addHighlightArea() {
  class PolylineAnnotationElement (line 14927) | class PolylineAnnotationElement extends AnnotationElement {
    method constructor (line 14929) | constructor(parameters) {
    method render (line 14937) | render() {
    method getElementsToTriggerPopup (line 14964) | getElementsToTriggerPopup() {
    method addHighlightArea (line 14967) | addHighlightArea() {
  class PolygonAnnotationElement (line 14971) | class PolygonAnnotationElement extends PolylineAnnotationElement {
    method constructor (line 14972) | constructor(parameters) {
  class CaretAnnotationElement (line 14978) | class CaretAnnotationElement extends AnnotationElement {
    method constructor (line 14979) | constructor(parameters) {
    method render (line 14985) | render() {
  class InkAnnotationElement (line 14993) | class InkAnnotationElement extends AnnotationElement {
    method constructor (line 14995) | constructor(parameters) {
    method render (line 15004) | render() {
    method getElementsToTriggerPopup (line 15034) | getElementsToTriggerPopup() {
    method addHighlightArea (line 15037) | addHighlightArea() {
  class HighlightAnnotationElement (line 15041) | class HighlightAnnotationElement extends AnnotationElement {
    method constructor (line 15042) | constructor(parameters) {
    method render (line 15049) | render() {
  class UnderlineAnnotationElement (line 15057) | class UnderlineAnnotationElement extends AnnotationElement {
    method constructor (line 15058) | constructor(parameters) {
    method render (line 15065) | render() {
  class SquigglyAnnotationElement (line 15073) | class SquigglyAnnotationElement extends AnnotationElement {
    method constructor (line 15074) | constructor(parameters) {
    method render (line 15081) | render() {
  class StrikeOutAnnotationElement (line 15089) | class StrikeOutAnnotationElement extends AnnotationElement {
    method constructor (line 15090) | constructor(parameters) {
    method render (line 15097) | render() {
  class StampAnnotationElement (line 15105) | class StampAnnotationElement extends AnnotationElement {
    method constructor (line 15106) | constructor(parameters) {
    method render (line 15112) | render() {
  class FileAttachmentAnnotationElement (line 15120) | class FileAttachmentAnnotationElement extends AnnotationElement {
    method constructor (line 15122) | constructor(parameters) {
    method render (line 15136) | render() {
    method getElementsToTriggerPopup (line 15170) | getElementsToTriggerPopup() {
    method addHighlightArea (line 15173) | addHighlightArea() {
    method #download (line 15176) | #download() {
  class AnnotationLayer (line 15180) | class AnnotationLayer {
    method constructor (line 15184) | constructor({
    method #appendElement (line 15200) | #appendElement(element, id) {
    method render (line 15206) | async render(params) {
    method update (line 15273) | update({
    method #setAnnotationCanvasMap (line 15284) | #setAnnotationCanvasMap() {
    method getEditableAnnotations (line 15310) | getEditableAnnotations() {
    method getEditableAnnotation (line 15313) | getEditableAnnotation(id) {
  constant EOL_PATTERN (line 15323) | const EOL_PATTERN = /\r\n?|\n/g;
  class FreeTextEditor (line 15324) | class FreeTextEditor extends AnnotationEditor {
    method _keyboardManager (line 15339) | static get _keyboardManager() {
    method constructor (line 15374) | constructor(params) {
    method initialize (line 15382) | static initialize(l10n, uiManager) {
    method updateDefaultParams (line 15389) | static updateDefaultParams(type, value) {
    method updateParams (line 15399) | updateParams(type, value) {
    method defaultPropertiesToUpdate (line 15409) | static get defaultPropertiesToUpdate() {
    method propertiesToUpdate (line 15412) | get propertiesToUpdate() {
    method #updateFontSize (line 15415) | #updateFontSize(fontSize) {
    method #updateColor (line 15433) | #updateColor(color) {
    method _translateEmpty (line 15448) | _translateEmpty(x, y) {
    method getInitialTranslation (line 15451) | getInitialTranslation() {
    method rebuild (line 15455) | rebuild() {
    method enableEditMode (line 15467) | enableEditMode() {
    method disableEditMode (line 15484) | disableEditMode() {
    method focusin (line 15505) | focusin(event) {
    method onceAdded (line 15514) | onceAdded() {
    method isEmpty (line 15525) | isEmpty() {
    method remove (line 15528) | remove() {
    method #extractText (line 15536) | #extractText() {
    method #setEditorDimensions (line 15544) | #setEditorDimensions() {
    method commit (line 15573) | commit() {
    method shouldGetKeyboardEvents (line 15605) | shouldGetKeyboardEvents() {
    method enterInEditMode (line 15608) | enterInEditMode() {
    method dblclick (line 15612) | dblclick(event) {
    method keydown (line 15615) | keydown(event) {
    method editorDivKeydown (line 15621) | editorDivKeydown(event) {
    method editorDivFocus (line 15624) | editorDivFocus(event) {
    method editorDivBlur (line 15627) | editorDivBlur(event) {
    method editorDivInput (line 15630) | editorDivInput(event) {
    method disableEditing (line 15633) | disableEditing() {
    method enableEditing (line 15637) | enableEditing() {
    method render (line 15641) | render() {
    method #getNodeContent (line 15713) | static #getNodeContent(node) {
    method editorDivPaste (line 15716) | editorDivPaste(event) {
    method #setContent (line 15792) | #setContent() {
    method #serializeContent (line 15803) | #serializeContent() {
    method #deserializeContent (line 15806) | static #deserializeContent(content) {
    method contentDiv (line 15809) | get contentDiv() {
    method deserialize (line 15812) | static deserialize(data, parent, uiManager) {
    method serialize (line 15857) | serialize(isForCopying = false) {
    method #hasElementChanged (line 15890) | #hasElementChanged(serialized) {
    method renderAnnotationElement (line 15899) | renderAnnotationElement(annotation) {
    method resetAnnotationElement (line 15922) | resetAnnotationElement(annotation) {
  class Outliner (line 15930) | class Outliner {
    method constructor (line 15934) | constructor(boxes, borderWidth = 0, innerMargin = 0, isLTR = true) {
    method getOutlines (line 15979) | getOutlines() {
    method #getOutlines (line 15993) | #getOutlines(outlineVerticalEdges) {
    method #binarySearch (line 16040) | #binarySearch(y) {
    method #insert (line 16058) | #insert([, y1, y2]) {
    method #remove (line 16062) | #remove([, y1, y2]) {
    method #breakEdge (line 16085) | #breakEdge(edge) {
  class Outline (line 16118) | class Outline {
    method toSVGPath (line 16119) | toSVGPath() {
    method box (line 16122) | get box() {
    method serialize (line 16125) | serialize(_bbox, _rotation) {
    method free (line 16128) | get free() {
  class HighlightOutline (line 16132) | class HighlightOutline extends Outline {
    method constructor (line 16135) | constructor(outlines, box) {
    method toSVGPath (line 16140) | toSVGPath() {
    method serialize (line 16160) | serialize([blX, blY, trX, trY], _rotation) {
    method box (line 16174) | get box() {
  class FreeOutliner (line 16178) | class FreeOutliner {
    method constructor (line 16195) | constructor({
    method free (line 16209) | get free() {
    method isEmpty (line 16212) | isEmpty() {
    method #getLastCoords (line 16215) | #getLastCoords() {
    method add (line 16221) | add({
    method toSVGPath (line 16279) | toSVGPath() {
    method getOutlines (line 16312) | getOutlines() {
  class FreeHighlightOutline (line 16360) | class FreeHighlightOutline extends Outline {
    method constructor (line 16368) | constructor(outline, points, box, scaleFactor, innerMargin, isLTR) {
    method toSVGPath (line 16392) | toSVGPath() {
    method serialize (line 16404) | serialize([blX, blY, trX, trY], rotation) {
    method #rescale (line 16432) | #rescale(src, tx, ty, sx, sy) {
    method #rescaleAndSwap (line 16440) | #rescaleAndSwap(src, tx, ty, sx, sy) {
    method #computeMinMax (line 16448) | #computeMinMax(isLTR) {
    method box (line 16499) | get box() {
    method getNewOutline (line 16502) | getNewOutline(thickness, innerMargin) {
  class ColorPicker (line 16532) | class ColorPicker {
    method _keyboardManager (line 16545) | static get _keyboardManager() {
    method constructor (line 16548) | constructor({
    method renderButton (line 16564) | renderButton() {
    method renderMainDropdown (line 16579) | renderMainDropdown() {
    method #getDropdownRoot (line 16585) | #getDropdownRoot() {
    method #colorSelect (line 16611) | #colorSelect(color, event) {
    method _colorSelectFromKeyboard (line 16619) | _colorSelectFromKeyboard(event) {
    method _moveToNext (line 16630) | _moveToNext(event) {
    method _moveToPrevious (line 16641) | _moveToPrevious(event) {
    method _moveToBeginning (line 16653) | _moveToBeginning(event) {
    method _moveToEnd (line 16660) | _moveToEnd(event) {
    method #keyDown (line 16667) | #keyDown(event) {
    method #openDropdown (line 16670) | #openDropdown(event) {
    method #pointerDown (line 16684) | #pointerDown(event) {
    method hideDropdown (line 16690) | hideDropdown() {
    method #isDropdownVisible (line 16694) | get #isDropdownVisible() {
    method _hideDropdownFromKeyboard (line 16697) | _hideDropdownFromKeyboard() {
    method updateColor (line 16711) | updateColor(color) {
    method destroy (line 16723) | destroy() {
  class HighlightEditor (line 16739) | class HighlightEditor extends AnnotationEditor {
    method _keyboardManager (line 16768) | static get _keyboardManager() {
    method constructor (line 16780) | constructor(params) {
    method telemetryInitialData (line 16806) | get telemetryInitialData() {
    method telemetryFinalData (line 16815) | get telemetryFinalData() {
    method computeTelemetryFinalData (line 16821) | static computeTelemetryFinalData(data) {
    method #createOutlines (line 16826) | #createOutlines() {
    method #createFreeOutlines (line 16842) | #createFreeOutlines({
    method initialize (line 16905) | static initialize(l10n, uiManager) {
    method updateDefaultParams (line 16909) | static updateDefaultParams(type, value) {
    method translateInPage (line 16919) | translateInPage(x, y) {}
    method toolbarPosition (line 16920) | get toolbarPosition() {
    method updateParams (line 16923) | updateParams(type, value) {
    method defaultPropertiesToUpdate (line 16933) | static get defaultPropertiesToUpdate() {
    method propertiesToUpdate (line 16936) | get propertiesToUpdate() {
    method #updateColor (line 16939) | #updateColor(color) {
    method #updateThickness (line 16960) | #updateThickness(thickness) {
    method addEditToolbar (line 16980) | async addEditToolbar() {
    method disableEditing (line 16993) | disableEditing() {
    method enableEditing (line 16997) | enableEditing() {
    method fixAndSetPosition (line 17001) | fixAndSetPosition() {
    method getBaseTranslation (line 17004) | getBaseTranslation() {
    method getRect (line 17007) | getRect(tx, ty) {
    method onceAdded (line 17010) | onceAdded() {
    method remove (line 17014) | remove() {
    method rebuild (line 17021) | rebuild() {
    method setParent (line 17034) | setParent(parent) {
    method #changeThickness (line 17048) | #changeThickness(thickness) {
    method #cleanDrawLayer (line 17059) | #cleanDrawLayer() {
    method #addToDrawLayer (line 17068) | #addToDrawLayer(parent = this.parent) {
    method #rotateBbox (line 17081) | static #rotateBbox({
    method rotate (line 17117) | rotate(angle) {
    method render (line 17133) | render() {
    method pointerover (line 17158) | pointerover() {
    method pointerleave (line 17161) | pointerleave() {
    method #keydown (line 17164) | #keydown(event) {
    method _moveCaret (line 17167) | _moveCaret(direction) {
    method #setCaret (line 17180) | #setCaret(start) {
    method select (line 17191) | select() {
    method unselect (line 17199) | unselect() {
    method _mustFixPosition (line 17209) | get _mustFixPosition() {
    method show (line 17212) | show(visible = this._isVisible) {
    method #getRotation (line 17219) | #getRotation() {
    method #serializeBoxes (line 17222) | #serializeBoxes() {
    method #serializeOutlines (line 17246) | #serializeOutlines(rect) {
    method startHighlighting (line 17249) | static startHighlighting(parent, isLTR, {
    method #highlightMove (line 17293) | static #highlightMove(parent, event) {
    method #endHighlight (line 17298) | static #endHighlight(parent, event) {
    method deserialize (line 17313) | static deserialize(data, parent, uiManager) {
    method serialize (line 17337) | serialize(isForCopying = false) {
    method canCreateNewEmptyEditor (line 17356) | static canCreateNewEmptyEditor() {
  class InkEditor (line 17367) | class InkEditor extends AnnotationEditor {
    method constructor (line 17388) | constructor(params) {
    method initialize (line 17406) | static initialize(l10n, uiManager) {
    method updateDefaultParams (line 17409) | static updateDefaultParams(type, value) {
    method updateParams (line 17422) | updateParams(type, value) {
    method defaultPropertiesToUpdate (line 17435) | static get defaultPropertiesToUpdate() {
    method propertiesToUpdate (line 17438) | get propertiesToUpdate() {
    method #updateThickness (line 17441) | #updateThickness(thickness) {
    method #updateColor (line 17457) | #updateColor(color) {
    method #updateOpacity (line 17473) | #updateOpacity(opacity) {
    method rebuild (line 17490) | rebuild() {
    method remove (line 17508) | remove() {
    method setParent (line 17526) | setParent(parent) {
    method onScaleChanging (line 17534) | onScaleChanging() {
    method enableEditMode (line 17540) | enableEditMode() {
    method disableEditMode (line 17548) | disableEditMode() {
    method onceAdded (line 17557) | onceAdded() {
    method isEmpty (line 17560) | isEmpty() {
    method #getInitialBBox (line 17563) | #getInitialBBox() {
    method #setStroke (line 17579) | #setStroke() {
    method #startDrawing (line 17594) | #startDrawing(x, y) {
    method #draw (line 17619) | #draw(x, y) {
    method #endPath (line 17639) | #endPath() {
    method #stopDrawing (line 17646) | #stopDrawing(x, y) {
    method #drawPoints (line 17689) | #drawPoints() {
    method #makeBezierCurve (line 17713) | #makeBezierCurve(path2D, x0, y0, x1, y1, x2, y2) {
    method #generateBezierPoints (line 17720) | #generateBezierPoints() {
    method #redraw (line 17745) | #redraw() {
    method commit (line 17762) | commit() {
    method focusin (line 17780) | focusin(event) {
    method canvasPointerdown (line 17787) | canvasPointerdown(event) {
    method canvasPointermove (line 17800) | canvasPointermove(event) {
    method canvasPointerup (line 17804) | canvasPointerup(event) {
    method canvasPointerleave (line 17808) | canvasPointerleave(event) {
    method #endDrawing (line 17811) | #endDrawing(event) {
    method #createCanvas (line 17827) | #createCanvas() {
    method #createObserver (line 17835) | #createObserver() {
    method isResizable (line 17844) | get isResizable() {
    method render (line 17847) | render() {
    method #setCanvasDims (line 17878) | #setCanvasDims() {
    method setDimensions (line 17887) | setDimensions(width, height) {
    method #setScaleFactor (line 17908) | #setScaleFactor(width, height) {
    method #updateTransform (line 17914) | #updateTransform() {
    method #buildPath2D (line 17918) | static #buildPath2D(bezier) {
    method #toPDFCoordinates (line 17929) | static #toPDFCoordinates(points, rect, rotation) {
    method #fromPDFCoordinates (line 17963) | static #fromPDFCoordinates(points, rect, rotation) {
    method #serializePaths (line 17997) | #serializePaths(s, tx, ty, rect) {
    method #getBbox (line 18039) | #getBbox() {
    method #getPadding (line 18055) | #getPadding() {
    method #fitToContent (line 18058) | #fitToContent(firstTime = false) {
    method deserialize (line 18088) | static deserialize(data, parent, uiManager) {
    method serialize (line 18137) | serialize() {
  class StampEditor (line 18162) | class StampEditor extends AnnotationEditor {
    method constructor (line 18176) | constructor(params) {
    method initialize (line 18184) | static initialize(l10n, uiManager) {
    method supportedTypes (line 18187) | static get supportedTypes() {
    method supportedTypesStr (line 18191) | static get supportedTypesStr() {
    method isHandlingMimeForPasting (line 18194) | static isHandlingMimeForPasting(mime) {
    method paste (line 18197) | static paste(item, parent) {
    method #getBitmapFetched (line 18202) | #getBitmapFetched(data, fromId = false) {
    method #getBitmapDone (line 18217) | #getBitmapDone() {
    method #getBitmap (line 18224) | #getBitmap() {
    method remove (line 18265) | remove() {
    method rebuild (line 18280) | rebuild() {
    method onceAdded (line 18298) | onceAdded() {
    method isEmpty (line 18302) | isEmpty() {
    method isResizable (line 18305) | get isResizable() {
    method render (line 18308) | render() {
    method #createCanvas (line 18331) | #createCanvas() {
    method #setDimensions (line 18368) | #setDimensions(width, height) {
    method #scaleBitmap (line 18388) | #scaleBitmap(width, height) {
    method #drawBitmap (line 18412) | #drawBitmap(width, height) {
    method getImageForAltText (line 18448) | getImageForAltText() {
    method #serializeBitmap (line 18451) | #serializeBitmap(toUrl) {
    method #createObserver (line 18479) | #createObserver() {
    method deserialize (line 18488) | static deserialize(data, parent, uiManager) {
    method serialize (line 18514) | serialize(isForCopying = false, context = null) {
  class AnnotationEditorLayer (line 18573) | class AnnotationEditorLayer {
    method constructor (line 18589) | constructor({
    method isEmpty (line 18618) | get isEmpty() {
    method isInvisible (line 18621) | get isInvisible() {
    method updateToolbar (line 18624) | updateToolbar(mode) {
    method updateMode (line 18627) | updateMode(mode = this.#uiManager.getMode()) {
    method hasTextLayer (line 18661) | hasTextLayer(textLayer) {
    method addInkEditorIfNeeded (line 18664) | addInkEditorIfNeeded(isCommitting) {
    method setEditingState (line 18682) | setEditingState(isEditing) {
    method addCommands (line 18685) | addCommands(params) {
    method togglePointerEvents (line 18688) | togglePointerEvents(enabled = false) {
    method toggleAnnotationLayerPointerEvents (line 18691) | toggleAnnotationLayerPointerEvents(enabled = false) {
    method enable (line 18694) | enable() {
    method disable (line 18726) | disable() {
    method getEditableAnnotation (line 18785) | getEditableAnnotation(id) {
    method setActiveEditor (line 18788) | setActiveEditor(editor) {
    method enableTextSelection (line 18795) | enableTextSelection() {
    method disableTextSelection (line 18803) | disableTextSelection() {
    method #textLayerPointerDown (line 18811) | #textLayerPointerDown(event) {
    method enableClick (line 18831) | enableClick() {
    method disableClick (line 18840) | disableClick() {
    method attach (line 18849) | attach(editor) {
    method detach (line 18858) | detach(editor) {
    method remove (line 18865) | remove(editor) {
    method changeParent (line 18874) | changeParent(editor) {
    method add (line 18891) | add(editor) {
    method moveEditorInDOM (line 18908) | moveEditorInDOM(editor) {
    method addOrRebuild (line 18933) | addOrRebuild(editor) {
    method addUndoableEditor (line 18942) | addUndoableEditor(editor) {
    method getNextId (line 18953) | getNextId() {
    method #currentEditorType (line 18956) | get #currentEditorType() {
    method #createNewEditor (line 18959) | #createNewEditor(params) {
    method canCreateNewEmptyEditor (line 18963) | canCreateNewEmptyEditor() {
    method pasteEditor (line 18966) | pasteEditor(mode, params) {
    method deserialize (line 18987) | deserialize(data) {
    method createAndAddNewEditor (line 18990) | createAndAddNewEditor(event, isCentered, data = {}) {
    method #getCenterPoint (line 19006) | #getCenterPoint() {
    method addNewEditor (line 19025) | addNewEditor() {
    method setSelected (line 19028) | setSelected(editor) {
    method toggleSelected (line 19031) | toggleSelected(editor) {
    method isSelected (line 19034) | isSelected(editor) {
    method unselect (line 19037) | unselect(editor) {
    method pointerup (line 19040) | pointerup(event) {
    method pointerdown (line 19064) | pointerdown(event) {
    method findNewParent (line 19085) | findNewParent(editor, x, y) {
    method destroy (line 19093) | destroy() {
    method #cleanup (line 19112) | #cleanup() {
    method render (line 19121) | render({
    method update (line 19132) | update({
    method pageDimensions (line 19150) | get pageDimensions() {
    method scale (line 19157) | get scale() {
  class DrawLayer (line 19165) | class DrawLayer {
    method constructor (line 19170) | constructor({
    method setParent (line 19175) | setParent(parent) {
    method _svgFactory (line 19190) | static get _svgFactory() {
    method #setBox (line 19193) | static #setBox(element, {
    method #createSVG (line 19207) | #createSVG(box) {
    method #createClipPath (line 19214) | #createClipPath(defs, pathId) {
    method highlight (line 19226) | highlight(outlines, color, opacity, isPathUpdatable = false) {
    method highlightOutline (line 19255) | highlightOutline(outlines) {
    method finalizeLine (line 19301) | finalizeLine(id, line) {
    method updateLine (line 19307) | updateLine(id, line) {
    method removeFreeHighlight (line 19313) | removeFreeHighlight(id) {
    method updatePath (line 19317) | updatePath(id, line) {
    method updateBox (line 19320) | updateBox(id, box) {
    method show (line 19323) | show(id, visible) {
    method rotate (line 19326) | rotate(id, angle) {
    method changeColor (line 19329) | changeColor(id, color) {
    method changeOpacity (line 19332) | changeOpacity(id, opacity) {
    method addClass (line 19335) | addClass(id, className) {
    method removeClass (line 19338) | removeClass(id, className) {
    method remove (line 19341) | remove(id) {
    method destroy (line 19348) | destroy() {

FILE: examples/pdfjs-4.3.136-dist/build/pdf.sandbox.mjs
  function D (line 53) | function D(){var a=x.buffer;d.HEAP8=z=new Int8Array(a);d.HEAP16=new Int1...
  function ba (line 53) | function ba(){var a=d.preRun.shift();E.unshift(a);}
  function w (line 53) | function w(a){d.onAbort?.(a);a="Aborted("+a+")";u(a);y=!0;a=new WebAssem...
  function ca (line 53) | function ca(){var a=L;return Promise.resolve().then(()=>{if(a==L&&v)var ...
  function da (line 53) | function da(a,b){return ca().then(c=>WebAssembly.instantiate(c,a)).then(...
  function ea (line 53) | function ea(a,b){return da(a,b);}
  function U (line 53) | function U(){}
  function e (line 53) | function e(t){return(t=t.toTimeString().match(/\(([A-Za-z ]+)\)$/))?t[1]...
  function a (line 53) | function a(c){X=c.exports;x=X.m;D();F.unshift(X.n);H--;d.monitorRunDepen...
  function na (line 53) | function na(){function a(){if(!Z&&(Z=!0,d.calledRun=!0,!y)){N(F);k(d);if...
  class SandboxSupportBase (line 55) | class SandboxSupportBase {
    method constructor (line 56) | constructor(win) {
    method destroy (line 61) | destroy() {
    method exportValueToSandbox (line 68) | exportValueToSandbox(val) {
    method importValueFromSandbox (line 71) | importValueFromSandbox(val) {
    method createErrorForSandbox (line 74) | createErrorForSandbox(errorMessage) {
    method callSandboxFunction (line 77) | callSandboxFunction(name, args) {
    method createSandboxExternals (line 85) | createSandboxExternals() {
  class SandboxSupport (line 172) | class SandboxSupport extends SandboxSupportBase {
    method exportValueToSandbox (line 173) | exportValueToSandbox(val) {
    method importValueFromSandbox (line 176) | importValueFromSandbox(val) {
    method createErrorForSandbox (line 179) | createErrorForSandbox(errorMessage) {
  class Sandbox (line 183) | class Sandbox {
    method constructor (line 184) | constructor(win, module) {
    method create (line 190) | create(data) {
    method dispatchEvent (line 214) | dispatchEvent(event) {
    method dumpMemoryUse (line 217) | dumpMemoryUse() {
    method nukeSandbox (line 220) | nukeSandbox() {
    method evalForTesting (line 228) | evalForTesting(code, key) {
  function QuickJSSandbox (line 232) | function QuickJSSandbox() {

FILE: examples/pdfjs-4.3.136-dist/build/pdf.worker.mjs
  constant IDENTITY_MATRIX (line 54) | const IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0];
  constant FONT_IDENTITY_MATRIX (line 55) | const FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];
  constant MAX_IMAGE_SIZE_TO_CACHE (line 56) | const MAX_IMAGE_SIZE_TO_CACHE = 10e6;
  constant LINE_FACTOR (line 57) | const LINE_FACTOR = 1.35;
  constant LINE_DESCENT_FACTOR (line 58) | const LINE_DESCENT_FACTOR = 0.35;
  constant BASELINE_FACTOR (line 59) | const BASELINE_FACTOR = LINE_DESCENT_FACTOR / LINE_FACTOR;
  constant OPS (line 235) | const OPS = {
  function setVerbosityLevel (line 330) | function setVerbosityLevel(level) {
  function getVerbosityLevel (line 335) | function getVerbosityLevel() {
  function info (line 338) | function info(msg) {
  function warn (line 343) | function warn(msg) {
  function unreachable (line 348) | function unreachable(msg) {
  function assert (line 351) | function assert(cond, msg) {
  function _isValidProtocol (line 356) | function _isValidProtocol(url) {
  function createValidAbsoluteUrl (line 368) | function createValidAbsoluteUrl(url, baseUrl = null, options = null) {
  function shadow (line 393) | function shadow(obj, prop, value, nonSerializable = false) {
  function BaseException (line 403) | function BaseException(message, name) {
  class PasswordException (line 414) | class PasswordException extends BaseException {
    method constructor (line 415) | constructor(msg, code) {
  class UnknownErrorException (line 420) | class UnknownErrorException extends BaseException {
    method constructor (line 421) | constructor(msg, details) {
  class InvalidPDFException (line 426) | class InvalidPDFException extends BaseException {
    method constructor (line 427) | constructor(msg) {
  class MissingPDFException (line 431) | class MissingPDFException extends BaseException {
    method constructor (line 432) | constructor(msg) {
  class UnexpectedResponseException (line 436) | class UnexpectedResponseException extends BaseException {
    method constructor (line 437) | constructor(msg, status) {
  class FormatError (line 442) | class FormatError extends BaseException {
    method constructor (line 443) | constructor(msg) {
  class AbortException (line 447) | class AbortException extends BaseException {
    method constructor (line 448) | constructor(msg) {
  function bytesToString (line 452) | function bytesToString(bytes) {
  function stringToBytes (line 469) | function stringToBytes(str) {
  function string32 (line 480) | function string32(value) {
  function objectSize (line 483) | function objectSize(obj) {
  function objectFromMap (line 486) | function objectFromMap(map) {
  function isLittleEndian (line 493) | function isLittleEndian() {
  function isEvalSupported (line 499) | function isEvalSupported() {
  class FeatureTest (line 507) | class FeatureTest {
    method isLittleEndian (line 508) | static get isLittleEndian() {
    method isEvalSupported (line 511) | static get isEvalSupported() {
    method isOffscreenCanvasSupported (line 514) | static get isOffscreenCanvasSupported() {
    method platform (line 517) | static get platform() {
    method isCSSRoundSupported (line 527) | static get isCSSRoundSupported() {
  class Util (line 532) | class Util {
    method makeHexColor (line 533) | static makeHexColor(r, g, b) {
    method scaleMinMax (line 536) | static scaleMinMax(transform, minMax) {
    method transform (line 580) | static transform(m1, m2) {
    method applyTransform (line 583) | static applyTransform(p, m) {
    method applyInverseTransform (line 588) | static applyInverseTransform(p, m) {
    method getAxialAlignedBoundingBox (line 594) | static getAxialAlignedBoundingBox(r, m) {
    method inverseTransform (line 601) | static inverseTransform(m) {
    method singularValueDecompose2dScale (line 605) | static singularValueDecompose2dScale(m) {
    method normalizeRect (line 617) | static normalizeRect(rect) {
    method intersect (line 629) | static intersect(rect1, rect2) {
    method #getExtremumOnCurve (line 642) | static #getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, t, minMax) {
    method #getExtremum (line 656) | static #getExtremum(x0, x1, x2, x3, y0, y1, y2, y3, a, b, c, minMax) {
    method bezierBoundingBox (line 672) | static bezierBoundingBox(x0, y0, x1, y1, x2, y2, x3, y3, minMax) {
  function stringToPDFString (line 687) | function stringToPDFString(str) {
  function stringToUTF8String (line 731) | function stringToUTF8String(str) {
  function utf8StringToString (line 734) | function utf8StringToString(str) {
  function isArrayEqual (line 737) | function isArrayEqual(arr1, arr2) {
  function getModificationDate (line 748) | function getModificationDate(date = new Date()) {
  function normalizeUnicode (line 754) | function normalizeUnicode(str) {
  function getUuid (line 761) | function getUuid() {
  constant CIRCULAR_REF (line 790) | const CIRCULAR_REF = Symbol("CIRCULAR_REF");
  constant EOF (line 791) | const EOF = Symbol("EOF");
  function clearPrimitiveCaches (line 795) | function clearPrimitiveCaches() {
  class Name (line 800) | class Name {
    method constructor (line 801) | constructor(name) {
    method get (line 804) | static get(name) {
  class Cmd (line 808) | class Cmd {
    method constructor (line 809) | constructor(cmd) {
    method get (line 812) | static get(cmd) {
  class Dict (line 819) | class Dict {
    method constructor (line 820) | constructor(xref = null) {
    method assignXref (line 827) | assignXref(newXref) {
    method size (line 830) | get size() {
    method get (line 833) | get(key1, key2, key3) {
    method getAsync (line 846) | async getAsync(key1, key2, key3) {
    method getArray (line 859) | getArray(key1, key2, key3) {
    method getRaw (line 880) | getRaw(key) {
    method getKeys (line 883) | getKeys() {
    method getRawValues (line 886) | getRawValues() {
    method set (line 889) | set(key, value) {
    method has (line 892) | has(key) {
    method forEach (line 895) | forEach(callback) {
    method empty (line 900) | static get empty() {
    method merge (line 907) | static merge({
    method clone (line 949) | clone() {
  class Ref (line 957) | class Ref {
    method constructor (line 958) | constructor(num, gen) {
    method toString (line 962) | toString() {
    method fromString (line 968) | static fromString(str) {
    method get (line 979) | static get(num, gen) {
  class RefSet (line 984) | class RefSet {
    method constructor (line 985) | constructor(parent = null) {
    method has (line 988) | has(ref) {
    method put (line 991) | put(ref) {
    method remove (line 994) | remove(ref) {
    method clear (line 1000) | clear() {
  method [Symbol.iterator] (line 997) | [Symbol.iterator]() {
  class RefSetCache (line 1004) | class RefSetCache {
    method constructor (line 1005) | constructor() {
    method size (line 1008) | get size() {
    method get (line 1011) | get(ref) {
    method has (line 1014) | has(ref) {
    method put (line 1017) | put(ref, obj) {
    method putAlias (line 1020) | putAlias(ref, aliasRef) {
    method clear (line 1026) | clear() {
    method items (line 1029) | *items() {
  method [Symbol.iterator] (line 1023) | [Symbol.iterator]() {
  function isName (line 1035) | function isName(v, name) {
  function isCmd (line 1038) | function isCmd(v, cmd) {
  function isDict (line 1041) | function isDict(v, type) {
  function isRefsEqual (line 1044) | function isRefsEqual(v1, v2) {
  class BaseStream (line 1050) | class BaseStream {
    method constructor (line 1051) | constructor() {
    method length (line 1056) | get length() {
    method isEmpty (line 1059) | get isEmpty() {
    method isDataLoaded (line 1062) | get isDataLoaded() {
    method getByte (line 1065) | getByte() {
    method getBytes (line 1068) | getBytes(length) {
    method peekByte (line 1071) | peekByte() {
    method peekBytes (line 1078) | peekBytes(length) {
    method getUint16 (line 1083) | getUint16() {
    method getInt32 (line 1091) | getInt32() {
    method getByteRange (line 1098) | getByteRange(begin, end) {
    method getString (line 1101) | getString(length) {
    method skip (line 1104) | skip(n) {
    method reset (line 1107) | reset() {
    method moveStart (line 1110) | moveStart() {
    method makeSubStream (line 1113) | makeSubStream(start, length, dict = null) {
    method getBaseStreams (line 1116) | getBaseStreams() {
  constant PDF_VERSION_REGEXP (line 1125) | const PDF_VERSION_REGEXP = /^[1-9]\.\d$/;
  function getLookupTableFactory (line 1126) | function getLookupTableFactory(initializer) {
  class MissingDataException (line 1137) | class MissingDataException extends BaseException {
    method constructor (line 1138) | constructor(begin, end) {
  class ParserEOFException (line 1144) | class ParserEOFException extends BaseException {
    method constructor (line 1145) | constructor(msg) {
  class XRefEntryException (line 1149) | class XRefEntryException extends BaseException {
    method constructor (line 1150) | constructor(msg) {
  class XRefParseException (line 1154) | class XRefParseException extends BaseException {
    method constructor (line 1155) | constructor(msg) {
  function arrayBuffersToBytes (line 1159) | function arrayBuffersToBytes(arr) {
  function getInheritableProperty (line 1180) | function getInheritableProperty({
  constant ROMAN_NUMBER_MAP (line 1203) | const ROMAN_NUMBER_MAP = ["", "C", "CC", "CCC", "CD", "D", "DC", "DCC", ...
  function toRomanNumerals (line 1204) | function toRomanNumerals(number, lowerCase = false) {
  function log2 (line 1222) | function log2(x) {
  function readInt8 (line 1228) | function readInt8(data, offset) {
  function readUint16 (line 1231) | function readUint16(data, offset) {
  function readUint32 (line 1234) | function readUint32(data, offset) {
  function isWhiteSpace (line 1237) | function isWhiteSpace(ch) {
  function isBooleanArray (line 1240) | function isBooleanArray(arr, len) {
  function isNumberArray (line 1243) | function isNumberArray(arr, len) {
  function lookupMatrix (line 1246) | function lookupMatrix(arr, fallback) {
  function lookupRect (line 1249) | function lookupRect(arr, fallback) {
  function lookupNormalRect (line 1252) | function lookupNormalRect(arr, fallback) {
  function parseXFAPath (line 1255) | function parseXFAPath(path) {
  function escapePDFName (line 1271) | function escapePDFName(str) {
  function escapeString (line 1292) | function escapeString(str) {
  function _collectJS (line 1302) | function _collectJS(entry, xref, list, parents) {
  function collectActions (line 1339) | function collectActions(xref, dict, eventType) {
  function encodeToXmlString (line 1394) | function encodeToXmlString(str) {
  function validateFontName (line 1427) | function validateFontName(fontFamily, mustWarn = false) {
  function validateCSSFont (line 1449) | function validateCSSFont(cssFontInfo) {
  function recoverJsURL (line 1467) | function recoverJsURL(str) {
  function numberToString (line 1484) | function numberToString(value) {
  function getNewAnnotationsMap (line 1497) | function getNewAnnotationsMap(annotationStorage) {
  function isAscii (line 1515) | function isAscii(str) {
  function stringToUTF16HexString (line 1518) | function stringToUTF16HexString(str) {
  function stringToUTF16String (line 1526) | function stringToUTF16String(str, bigEndian = false) {
  function getRotationMatrix (line 1537) | function getRotationMatrix(rotation, width, height) {
  function getSizeInBytes (line 1549) | function getSizeInBytes(x) {
  class Stream (line 1556) | class Stream extends BaseStream {
    method constructor (line 1557) | constructor(arrayBuffer, start, length, dict) {
    method length (line 1565) | get length() {
    method isEmpty (line 1568) | get isEmpty() {
    method getByte (line 1571) | getByte() {
    method getBytes (line 1577) | getBytes(length) {
    method getByteRange (line 1591) | getByteRange(begin, end) {
    method reset (line 1600) | reset() {
    method moveStart (line 1603) | moveStart() {
    method makeSubStream (line 1606) | makeSubStream(start, length, dict = null) {
  class StringStream (line 1610) | class StringStream extends Stream {
    method constructor (line 1611) | constructor(str) {
  class NullStream (line 1615) | class NullStream extends Stream {
    method constructor (line 1616) | constructor() {
  class ChunkedStream (line 1625) | class ChunkedStream extends Stream {
    method constructor (line 1626) | constructor(length, chunkSize, manager) {
    method getMissingChunks (line 1635) | getMissingChunks() {
    method numChunksLoaded (line 1644) | get numChunksLoaded() {
    method isDataLoaded (line 1647) | get isDataLoaded() {
    method onReceiveData (line 1650) | onReceiveData(begin, chunk) {
    method onReceiveProgressiveData (line 1666) | onReceiveProgressiveData(data) {
    method ensureByte (line 1677) | ensureByte(pos) {
    method ensureRange (line 1693) | ensureRange(begin, end) {
    method nextEmptyChunk (line 1711) | nextEmptyChunk(beginChunk) {
    method hasChunk (line 1721) | hasChunk(chunk) {
    method getByte (line 1724) | getByte() {
    method getBytes (line 1734) | getBytes(length) {
    method getByteRange (line 1754) | getByteRange(begin, end) {
    method makeSubStream (line 1766) | makeSubStream(start, length, dict = null) {
    method getBaseStreams (line 1803) | getBaseStreams() {
  class ChunkedStreamManager (line 1807) | class ChunkedStreamManager {
    method constructor (line 1808) | constructor(pdfNetworkStream, args) {
    method sendRequest (line 1823) | sendRequest(begin, end) {
    method requestAllChunks (line 1865) | requestAllChunks(noFetch = false) {
    method _requestChunks (line 1872) | _requestChunks(chunks) {
    method getStream (line 1911) | getStream() {
    method requestRange (line 1914) | requestRange(begin, end) {
    method requestRanges (line 1924) | requestRanges(ranges = []) {
    method groupChunks (line 1940) | groupChunks(chunks) {
    method onProgress (line 1966) | onProgress(args) {
    method onReceiveData (line 1972) | onReceiveData(args) {
    method onError (line 2030) | onError(err) {
    method getBeginChunk (line 2033) | getBeginChunk(begin) {
    method getEndChunk (line 2036) | getEndChunk(end) {
    method abort (line 2039) | abort(reason) {
  function resizeRgbImage (line 2053) | function resizeRgbImage(src, dest, w1, h1, w2, h2, alpha01) {
  class ColorSpace (line 2076) | class ColorSpace {
    method constructor (line 2077) | constructor(name, numComps) {
    method getRgb (line 2084) | getRgb(src, srcOffset) {
    method getRgbItem (line 2089) | getRgbItem(src, srcOffset, dest, destOffset) {
    method getRgbBuffer (line 2092) | getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) {
    method getOutputLength (line 2095) | getOutputLength(inputLength, alpha01) {
    method isPassthrough (line 2098) | isPassthrough(bits) {
    method isDefaultDecode (line 2101) | isDefaultDecode(decodeMap, bpc) {
    method fillRgb (line 2104) | fillRgb(dest, originalWidth, originalHeight, width, height, actualHeig...
    method usesZeroToOneRange (line 2158) | get usesZeroToOneRange() {
    method _cache (line 2161) | static _cache(cacheKey, xref, localColorSpaceCache, parsedColorSpace) {
    method getCached (line 2180) | static getCached(cacheKey, xref, localColorSpaceCache) {
    method parseAsync (line 2205) | static async parseAsync({
    method parse (line 2216) | static parse({
    method _parse (line 2231) | static _parse(cs, xref, resources = null, pdfFunctionFactory) {
    method isDefaultDecode (line 2340) | static isDefaultDecode(decode, numComps) {
    method singletons (line 2355) | static get singletons() {
  class AlternateCS (line 2369) | class AlternateCS extends ColorSpace {
    method constructor (line 2370) | constructor(numComps, base, tintFn) {
    method getRgbItem (line 2376) | getRgbItem(src, srcOffset, dest, destOffset) {
    method getRgbBuffer (line 2381) | getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) {
    method getOutputLength (line 2412) | getOutputLength(inputLength, alpha01) {
  class PatternCS (line 2416) | class PatternCS extends ColorSpace {
    method constructor (line 2417) | constructor(baseCS) {
    method isDefaultDecode (line 2421) | isDefaultDecode(decodeMap, bpc) {
  class IndexedCS (line 2425) | class IndexedCS extends ColorSpace {
    method constructor (line 2426) | constructor(base, highVal, lookup) {
    method getRgbItem (line 2443) | getRgbItem(src, srcOffset, dest, destOffset) {
    method getRgbBuffer (line 2448) | getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) {
    method getOutputLength (line 2459) | getOutputLength(inputLength, alpha01) {
    method isDefaultDecode (line 2462) | isDefaultDecode(decodeMap, bpc) {
  class DeviceGrayCS (line 2477) | class DeviceGrayCS extends ColorSpace {
    method constructor (line 2478) | constructor() {
    method getRgbItem (line 2481) | getRgbItem(src, srcOffset, dest, destOffset) {
    method getRgbBuffer (line 2485) | getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) {
    method getOutputLength (line 2497) | getOutputLength(inputLength, alpha01) {
  class DeviceRgbCS (line 2501) | class DeviceRgbCS extends ColorSpace {
    method constructor (line 2502) | constructor() {
    method getRgbItem (line 2505) | getRgbItem(src, srcOffset, dest, destOffset) {
    method getRgbBuffer (line 2510) | getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) {
    method getOutputLength (line 2525) | getOutputLength(inputLength, alpha01) {
    method isPassthrough (line 2528) | isPassthrough(bits) {
  class DeviceCmykCS (line 2532) | class DeviceCmykCS extends ColorSpace {
    method constructor (line 2533) | constructor() {
    method #toRgb (line 2536) | #toRgb(src, srcOffset, srcScale, dest, destOffset) {
    method getRgbItem (line 2545) | getRgbItem(src, srcOffset, dest, destOffset) {
    method getRgbBuffer (line 2548) | getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) {
    method getOutputLength (line 2556) | getOutputLength(inputLength, alpha01) {
  class CalGrayCS (line 2560) | class CalGrayCS extends ColorSpace {
    method constructor (line 2561) | constructor(whitePoint, blackPoint, gamma) {
    method #toRgb (line 2584) | #toRgb(src, srcOffset, dest, destOffset, scale) {
    method getRgbItem (line 2593) | getRgbItem(src, srcOffset, dest, destOffset) {
    method getRgbBuffer (line 2596) | getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) {
    method getOutputLength (line 2604) | getOutputLength(inputLength, alpha01) {
  class CalRGBCS (line 2608) | class CalRGBCS extends ColorSpace {
    method constructor (line 2617) | constructor(whitePoint, blackPoint, gamma, matrix) {
    method #matrixProduct (line 2638) | #matrixProduct(a, b, result) {
    method #toFlat (line 2643) | #toFlat(sourceWhitePoint, LMS, result) {
    method #toD65 (line 2648) | #toD65(sourceWhitePoint, LMS, result) {
    method #sRGBTransferFunction (line 2656) | #sRGBTransferFunction(color) {
    method #adjustToRange (line 2665) | #adjustToRange(min, max, value) {
    method #decodeL (line 2668) | #decodeL(L) {
    method #compensateBlackPoint (line 2677) | #compensateBlackPoint(sourceBlackPoint, XYZ_Flat, result) {
    method #normalizeWhitePointToFlat (line 2701) | #normalizeWhitePointToFlat(sourceWhitePoint, XYZ_In, result) {
    method #normalizeWhitePointToD65 (line 2714) | #normalizeWhitePointToD65(sourceWhitePoint, XYZ_In, result) {
    method #toRgb (line 2721) | #toRgb(src, srcOffset, dest, destOffset, scale) {
    method getRgbItem (line 2747) | getRgbItem(src, srcOffset, dest, destOffset) {
    method getRgbBuffer (line 2750) | getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) {
    method getOutputLength (line 2758) | getOutputLength(inputLength, alpha01) {
  class LabCS (line 2762) | class LabCS extends ColorSpace {
    method constructor (line 2763) | constructor(whitePoint, blackPoint, range) {
    method #fn_g (line 2786) | #fn_g(x) {
    method #decode (line 2789) | #decode(value, high1, low2, high2) {
    method #toRgb (line 2792) | #toRgb(src, srcOffset, maxVal, dest, destOffset) {
    method getRgbItem (line 2831) | getRgbItem(src, srcOffset, dest, destOffset) {
    method getRgbBuffer (line 2834) | getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) {
    method getOutputLength (line 2842) | getOutputLength(inputLength, alpha01) {
    method isDefaultDecode (line 2845) | isDefaultDecode(decodeMap, bpc) {
    method usesZeroToOneRange (line 2848) | get usesZeroToOneRange() {
  function hexToInt (line 2855) | function hexToInt(a, size) {
  function hexToStr (line 2862) | function hexToStr(a, size) {
  function addHex (line 2871) | function addHex(a, b, size) {
  function incHex (line 2879) | function incHex(a, size) {
  constant MAX_NUM_SIZE (line 2887) | const MAX_NUM_SIZE = 16;
  constant MAX_ENCODED_NUM_SIZE (line 2888) | const MAX_ENCODED_NUM_SIZE = 19;
  class BinaryCMapStream (line 2889) | class BinaryCMapStream {
    method constructor (line 2890) | constructor(data) {
    method readByte (line 2896) | readByte() {
    method readNumber (line 2902) | readNumber() {
    method readSigned (line 2915) | readSigned() {
    method readHex (line 2919) | readHex(num, size) {
    method readHexNumber (line 2923) | readHexNumber(num, size) {
    method readHexSigned (line 2949) | readHexSigned(num, size) {
    method readString (line 2958) | readString() {
  class BinaryCMapReader (line 2967) | class BinaryCMapReader {
    method process (line 2968) | async process(data, cMap, extend) {
  class DecodeStream (line 3114) | class DecodeStream extends BaseStream {
    method constructor (line 3115) | constructor(maybeMinBufferLength) {
    method isEmpty (line 3129) | get isEmpty() {
    method ensureBuffer (line 3135) | ensureBuffer(requested) {
    method getByte (line 3148) | getByte() {
    method getBytes (line 3158) | getBytes(length, ignoreColorSpace = false) {
    method reset (line 3180) | reset() {
    method makeSubStream (line 3183) | makeSubStream(start, length, dict = null) {
    method getBaseStreams (line 3196) | getBaseStreams() {
  class StreamsSequenceStream (line 3200) | class StreamsSequenceStream extends DecodeStream {
    method constructor (line 3201) | constructor(streams, onError = null) {
    method readBlock (line 3210) | readBlock() {
    method getBaseStreams (line 3233) | getBaseStreams() {
  class Ascii85Stream (line 3248) | class Ascii85Stream extends DecodeStream {
    method constructor (line 3249) | constructor(str, maybeLength) {
    method readBlock (line 3258) | readBlock() {
  class AsciiHexStream (line 3314) | class AsciiHexStream extends DecodeStream {
    method constructor (line 3315) | constructor(str, maybeLength) {
    method readBlock (line 3324) | readBlock() {
  class CCITTFaxDecoder (line 3382) | class CCITTFaxDecoder {
    method constructor (line 3383) | constructor(source, options = {}) {
    method readNextChar (line 3418) | readNextChar() {
    method _addPixels (line 3708) | _addPixels(a1, blackPixels) {
    method _addPixelsNeg (line 3724) | _addPixelsNeg(a1, blackPixels) {
    method _findTableCode (line 3750) | _findTableCode(start, end, table, limit) {
    method _getTwoDimCode (line 3770) | _getTwoDimCode() {
    method _getWhiteCode (line 3789) | _getWhiteCode() {
    method _getBlackCode (line 3816) | _getBlackCode() {
    method _lookBits (line 3852) | _lookBits(n) {
    method _eatBits (line 3866) | _eatBits(n) {
  class CCITTFaxStream (line 3877) | class CCITTFaxStream extends DecodeStream {
    method constructor (line 3878) | constructor(str, maybeLength, params) {
    method readBlock (line 3900) | readBlock() {
  class FlateStream (line 3921) | class FlateStream extends DecodeStream {
    method constructor (line 3922) | constructor(str, maybeLength) {
    method getBits (line 3943) | getBits(bits) {
    method getCode (line 3960) | getCode(table) {
    method generateHuffmanTable (line 3984) | generateHuffmanTable(lengths) {
    method #endsStreamOnError (line 4013) | #endsStreamOnError(err) {
    method readBlock (line 4017) | readBlock() {
  class ArithmeticDecoder (line 4396) | class ArithmeticDecoder {
    method constructor (line 4397) | constructor(data, start, end) {
    method byteIn (line 4409) | byteIn() {
    method readBit (line 4433) | readBit(contexts, pos) {
  class Jbig2Error (line 4490) | class Jbig2Error extends BaseException {
    method constructor (line 4491) | constructor(msg) {
  class ContextCache (line 4495) | class ContextCache {
    method getContexts (line 4496) | getContexts(id) {
  class DecodingContext (line 4503) | class DecodingContext {
    method constructor (line 4504) | constructor(data, start, end) {
    method decoder (line 4509) | get decoder() {
    method contextCache (line 4513) | get contextCache() {
  constant MAX_INT_32 (line 4518) | const MAX_INT_32 = 2 ** 31 - 1;
  constant MIN_INT_32 (line 4519) | const MIN_INT_32 = -(2 ** 31);
  function decodeInteger (line 4520) | function decodeInteger(contextCache, procedure, decoder) {
  function decodeIAID (line 4545) | function decodeIAID(contextCache, decoder, codeLength) {
  function decodeBitmapTemplate0 (line 4757) | function decodeBitmapTemplate0(width, height, decodingContext) {
  function decodeBitmap (line 4775) | function decodeBitmap(mmr, width, height, templateIndex, prediction, ski...
  function decodeRefinement (line 4883) | function decodeRefinement(width, height, templateIndex, referenceBitmap,...
  function decodeSymbolDictionary (line 4951) | function decodeSymbolDictionary(huffman, refinement, symbols, numberOfNe...
  function decodeTextRegion (line 5061) | function decodeTextRegion(huffman, refinement, width, height, defaultPix...
  function decodePatternDictionary (line 5178) | function decodePatternDictionary(mmr, patternWidth, patternHeight, maxPa...
  function decodeHalftoneRegion (line 5212) | function decodeHalftoneRegion(mmr, patterns, template, regionWidth, regi...
  function readSegmentHeader (line 5309) | function readSegmentHeader(data, start) {
  function readSegments (line 5401) | function readSegments(header, data, start, end) {
  function readRegionSegmentInformation (line 5430) | function readRegionSegmentInformation(data, start) {
  function processSegment (line 5440) | function processSegment(segment, visitor) {
  function processSegments (line 5632) | function processSegments(segments, visitor) {
  function parseJbig2Chunks (line 5637) | function parseJbig2Chunks(chunks) {
  function parseJbig2 (line 5646) | function parseJbig2(data) {
  class SimpleSegmentVisitor (line 5649) | class SimpleSegmentVisitor {
    method onPageInformation (line 5650) | onPageInformation(info) {
    method drawBitmap (line 5659) | drawBitmap(regionInfo, bitmap) {
    method onImmediateGenericRegion (line 5708) | onImmediateGenericRegion(region, data, start, end) {
    method onImmediateLosslessGenericRegion (line 5714) | onImmediateLosslessGenericRegion() {
    method onSymbolDictionary (line 5717) | onSymbolDictionary(dictionary, currentSegment, referredSegments, data,...
    method onImmediateTextRegion (line 5737) | onImmediateTextRegion(region, referredSegments, data, start, end) {
    method onImmediateLosslessTextRegion (line 5757) | onImmediateLosslessTextRegion() {
    method onPatternDictionary (line 5760) | onPatternDictionary(dictionary, currentSegment, data, start, end) {
    method onImmediateHalftoneRegion (line 5768) | onImmediateHalftoneRegion(region, referredSegments, data, start, end) {
    method onImmediateLosslessHalftoneRegion (line 5775) | onImmediateLosslessHalftoneRegion() {
    method onTables (line 5778) | onTables(currentSegment, data, start, end) {
  class HuffmanLine (line 5786) | class HuffmanLine {
    method constructor (line 5787) | constructor(lineData) {
  class HuffmanTreeNode (line 5805) | class HuffmanTreeNode {
    method constructor (line 5806) | constructor(line) {
    method buildTree (line 5818) | buildTree(line, shift) {
    method decodeNode (line 5830) | decodeNode(reader) {
  class HuffmanTable (line 5845) | class HuffmanTable {
    method constructor (line 5846) | constructor(lines, prefixCodesDone) {
    method decode (line 5858) | decode(reader) {
    method assignPrefixCodes (line 5861) | assignPrefixCodes(lines) {
  function decodeTablesSegment (line 5893) | function decodeTablesSegment(data, start, end) {
  function getStandardTable (line 5921) | function getStandardTable(number) {
  class Reader (line 5983) | class Reader {
    method constructor (line 5984) | constructor(data, start, end) {
    method readBit (line 5992) | readBit() {
    method readBits (line 6004) | readBits(numBits) {
    method byteAlign (line 6012) | byteAlign() {
    method next (line 6015) | next() {
  function getCustomHuffmanTable (line 6022) | function getCustomHuffmanTable(index, referredTo, customTables) {
  function getTextRegionHuffmanTables (line 6035) | function getTextRegionHuffmanTables(textRegion, referredTo, customTables...
  function getSymbolDictionaryHuffmanTables (line 6129) | function getSymbolDictionaryHuffmanTables(dictionary, referredTo, custom...
  function readUncompressedBitmap (line 6176) | function readUncompressedBitmap(reader, width, height) {
  function decodeMMRBitmap (line 6188) | function decodeMMRBitmap(input, width, height, endOfBlock) {
  class Jbig2Image (line 6227) | class Jbig2Image {
    method parseChunks (line 6228) | parseChunks(chunks) {
    method parse (line 6231) | parse(data) {
  class Jbig2Stream (line 6242) | class Jbig2Stream extends DecodeStream {
    method constructor (line 6243) | constructor(stream, maybeLength, params) {
    method bytes (line 6250) | get bytes() {
    method ensureBuffer (line 6253) | ensureBuffer(requested) {}
    method readBlock (line 6254) | readBlock() {
  function convertToRGBA (line 6289) | function convertToRGBA(params) {
  function convertBlackAndWhiteToRGBA (line 6298) | function convertBlackAndWhiteToRGBA({
  function convertRGBToRGBA (line 6339) | function convertRGBToRGBA({
  function grayToRGBA (line 6382) | function grayToRGBA(src, dest) {
  class JpegError (line 6398) | class JpegError extends BaseException {
    method constructor (line 6399) | constructor(msg) {
  class DNLMarkerError (line 6403) | class DNLMarkerError extends BaseException {
    method constructor (line 6404) | constructor(message, scanLines) {
  class EOIMarkerError (line 6409) | class EOIMarkerError extends BaseException {
    method constructor (line 6410) | constructor(msg) {
  function buildHuffmanTable (line 6423) | function buildHuffmanTable(codeLengths, values) {
  function getBlockBufferOffset (line 6467) | function getBlockBufferOffset(component, row, col) {
  function decodeScan (line 6470) | function decodeScan(data, offset, frame, components, resetInterval, spec...
  function quantizeAndInverse (line 6738) | function quantizeAndInverse(component, blockBufferOffset, p) {
  function buildComponentData (line 6941) | function buildComponentData(frame, component) {
  function findNextFileMarker (line 6953) | function findNextFileMarker(data, currentPos, startPos = currentPos) {
  class JpegImage (line 6980) | class JpegImage {
    method constructor (line 6981) | constructor({
    method parse (line 6988) | parse(data, {
    method _getLinearizedBlockData (line 7259) | _getLinearizedBlockData(width, height, isSourcePDF = false) {
    method _isColorConversionNeeded (line 7309) | get _isColorConversionNeeded() {
    method _convertYccToRgb (line 7326) | _convertYccToRgb(data) {
    method _convertYccToRgba (line 7338) | _convertYccToRgba(data, out) {
    method _convertYcckToRgb (line 7350) | _convertYcckToRgb(data) {
    method _convertYcckToRgba (line 7364) | _convertYcckToRgba(data) {
    method _convertYcckToCmyk (line 7377) | _convertYcckToCmyk(data) {
    method _convertCmykToRgb (line 7389) | _convertCmykToRgb(data) {
    method _convertCmykToRgba (line 7403) | _convertCmykToRgba(data) {
    method getData (line 7416) | getData({
  class JpegStream (line 7471) | class JpegStream extends DecodeStream {
    method constructor (line 7472) | constructor(stream, maybeLength, params) {
    method bytes (line 7486) | get bytes() {
    method ensureBuffer (line 7489) | ensureBuffer(requested) {}
    method readBlock (line 7490) | readBlock() {
  function intArrayFromBase64 (line 7633) | function intArrayFromBase64(s) {
  function tryParseAsDataURI (line 7641) | function tryParseAsDataURI(filename) {
  function updateMemoryViews (line 7650) | function updateMemoryViews() {
  function preRun (line 7665) | function preRun() {
  function initRuntime (line 7674) | function initRuntime() {
  function postRun (line 7678) | function postRun() {
  function addOnPreRun (line 7687) | function addOnPreRun(cb) {
  function addOnInit (line 7690) | function addOnInit(cb) {
  function addOnPostRun (line 7693) | function addOnPostRun(cb) {
  function addRunDependency (line 7699) | function addRunDependency(id) {
  function removeRunDependency (line 7703) | function removeRunDependency(id) {
  function findWasmBinary (line 7720) | function findWasmBinary() {
  function getBinarySync (line 7725) | function getBinarySync(file) {
  function instantiateSync (line 7738) | function instantiateSync(file, info) {
  function getWasmImports (line 7745) | function getWasmImports() {
  function createWasm (line 7750) | function createWasm() {
  function _jsPrintWarning (line 7918) | function _jsPrintWarning(message_ptr) {
  function _setImageData (line 7922) | function _setImageData(array_ptr, array_size) {
  function _storeErrorMessage (line 7925) | function _storeErrorMessage(message_ptr) {
  function run (line 7956) | function run() {
  class JpxError (line 8002) | class JpxError extends BaseException {
    method constructor (line 8003) | constructor(msg) {
  class JpxImage (line 8007) | class JpxImage {
    method decode (line 8009) | static decode(data, ignoreColorSpace = false) {
    method cleanup (line 8019) | static cleanup() {
    method parseImageProperties (line 8022) | static parseImageProperties(stream) {
  class JpxStream (line 8052) | class JpxStream extends DecodeStream {
    method constructor (line 8053) | constructor(stream, maybeLength, params) {
    method bytes (line 8060) | get bytes() {
    method ensureBuffer (line 8063) | ensureBuffer(requested) {}
    method readBlock (line 8064) | readBlock(ignoreColorSpace) {
  class LZWStream (line 8076) | class LZWStream extends DecodeStream {
    method constructor (line 8077) | constructor(str, maybeLength, earlyChange) {
    method readBits (line 8100) | readBits(n) {
    method readBlock (line 8117) | readBlock() {
  class PredictorStream (line 8195) | class PredictorStream extends DecodeStream {
    method constructor (line 8196) | constructor(str, maybeLength, params) {
    method readBlockTiff (line 8218) | readBlockTiff() {
    method readBlockPng (line 8290) | readBlockPng() {
  class RunLengthStream (line 8380) | class RunLengthStream extends DecodeStream {
    method constructor (line 8381) | constructor(str, maybeLength) {
    method readBlock (line 8386) | readBlock() {
  constant MAX_LENGTH_TO_CACHE (line 8430) | const MAX_LENGTH_TO_CACHE = 1000;
  function getInlineImageCacheKey (line 8431) | function getInlineImageCacheKey(bytes) {
  class Parser (line 8443) | class Parser {
    method constructor (line 8444) | constructor({
    method refill (line 8458) | refill() {
    method shift (line 8462) | shift() {
    method tryShift (line 8471) | tryShift() {
    method getObj (line 8482) | getObj(cipherTransform = null) {
    method findDefaultInlineStreamEnd (line 8549) | findDefaultInlineStreamEnd(stream) {
    method findDCTDecodeInlineStreamEnd (line 8640) | findDCTDecodeInlineStreamEnd(stream) {
    method findASCII85DecodeInlineStreamEnd (line 8717) | findASCII85DecodeInlineStreamEnd(stream) {
    method findASCIIHexDecodeInlineStreamEnd (line 8751) | findASCIIHexDecodeInlineStreamEnd(stream) {
    method inlineStreamSkipEI (line 8769) | inlineStreamSkipEI(stream) {
    method makeInlineImage (line 8784) | makeInlineImage(cipherTransform) {
    method #findStreamLength (line 8863) | #findStreamLength(startPos) {
    method makeStream (line 8918) | makeStream(dict, cipherTransform) {
    method filter (line 8950) | filter(stream, dict, length) {
    method makeFilter (line 8978) | makeFilter(stream, name, maybeLength, params) {
  function toHexDigit (line 9034) | function toHexDigit(ch) {
  class Lexer (line 9043) | class Lexer {
    method constructor (line 9044) | constructor(stream, knownCommands = null) {
    method nextChar (line 9052) | nextChar() {
    method peekChar (line 9055) | peekChar() {
    method getNumber (line 9058) | getNumber() {
    method getString (line 9132) | getString() {
    method getName (line 9230) | getName() {
    method _hexStringWarn (line 9269) | _hexStringWarn(ch) {
    method getHexString (line 9280) | getHexString() {
    method getObj (line 9320) | getObj() {
    method skipToNextLine (line 9422) | skipToNextLine() {
  class Linearization (line 9439) | class Linearization {
    method create (line 9440) | static create(stream) {
  constant BUILT_IN_CMAPS (line 9496) | const BUILT_IN_CMAPS = ["Adobe-GB1-UCS2", "Adobe-CNS1-UCS2", "Adobe-Japa...
  constant MAX_MAP_RANGE (line 9497) | const MAX_MAP_RANGE = 2 ** 24 - 1;
  class CMap (line 9498) | class CMap {
    method constructor (line 9499) | constructor(builtInCMap = false) {
    method addCodespaceRange (line 9508) | addCodespaceRange(n, low, high) {
    method mapCidRange (line 9512) | mapCidRange(low, high, dstLow) {
    method mapBfRange (line 9520) | mapBfRange(low, high, dstLow) {
    method mapBfRangeToArray (line 9535) | mapBfRangeToArray(low, high, array) {
    method mapOne (line 9546) | mapOne(src, dst) {
    method lookup (line 9549) | lookup(code) {
    method contains (line 9552) | contains(code) {
    method forEach (line 9555) | forEach(callback) {
    method charCodeOf (line 9570) | charCodeOf(value) {
    method getMap (line 9582) | getMap() {
    method readCharCode (line 9585) | readCharCode(str, offset, out) {
    method getCharCodeLength (line 9604) | getCharCodeLength(charCode) {
    method length (line 9618) | get length() {
    method isIdentityCMap (line 9621) | get isIdentityCMap() {
  class IdentityCMap (line 9636) | class IdentityCMap extends CMap {
    method constructor (line 9637) | constructor(vertical, n) {
    method mapCidRange (line 9642) | mapCidRange(low, high, dstLow) {
    method mapBfRange (line 9645) | mapBfRange(low, high, dstLow) {
    method mapBfRangeToArray (line 9648) | mapBfRangeToArray(low, high, array) {
    method mapOne (line 9651) | mapOne(src, dst) {
    method lookup (line 9654) | lookup(code) {
    method contains (line 9657) | contains(code) {
    method forEach (line 9660) | forEach(callback) {
    method charCodeOf (line 9665) | charCodeOf(value) {
    method getMap (line 9668) | getMap() {
    method length (line 9675) | get length() {
    method isIdentityCMap (line 9678) | get isIdentityCMap() {
  function strToInt (line 9682) | function strToInt(str) {
  function expectString (line 9689) | function expectString(obj) {
  function expectInt (line 9694) | function expectInt(obj) {
  function parseBfChar (line 9699) | function parseBfChar(cMap, lexer) {
  function parseBfRange (line 9716) | function parseBfRange(cMap, lexer) {
  function parseCidChar (line 9748) | function parseCidChar(cMap, lexer) {
  function parseCidRange (line 9765) | function parseCidRange(cMap, lexer) {
  function parseCodespaceRange (line 9785) | function parseCodespaceRange(cMap, lexer) {
  function parseWMode (line 9807) | function parseWMode(cMap, lexer) {
  function parseCMapName (line 9813) | function parseCMapName(cMap, lexer) {
  function parseCMap (line 9819) | async function parseCMap(cMap, lexer, fetchBuiltInCMap, useCMap) {
  function extendCMap (line 9875) | async function extendCMap(cMap, fetchBuiltInCMap, useCMap) {
  function createBuiltInCMap (line 9891) | async function createBuiltInCMap(name, fetchBuiltInCMap) {
  class CMapFactory (line 9917) | class CMapFactory {
    method create (line 9918) | static async create({
  function getEncoding (line 9949) | function getEncoding(encodingName) {
  constant MAX_SUBR_NESTING (line 9974) | const MAX_SUBR_NESTING = 10;
  constant NUM_STANDARD_CFF_STRINGS (line 9976) | const NUM_STANDARD_CFF_STRINGS = 391;
  method stackFn (line 10094) | stackFn(stack, index) {
  method stackFn (line 10101) | stackFn(stack, index) {
  method stackFn (line 10108) | stackFn(stack, index) {
  method stackFn (line 10115) | stackFn(stack, index) {
  method stackFn (line 10146) | stackFn(stack, index) {
  class CFFParser (line 10186) | class CFFParser {
    method constructor (line 10187) | constructor(file, properties, seacAnalysisEnabled) {
    method parse (line 10192) | parse() {
    method parseHeader (line 10253) | parseHeader() {
    method parseDict (line 10278) | parseDict(dict) {
    method parseIndex (line 10343) | parseIndex(pos) {
    method parseNameIndex (line 10373) | parseNameIndex(index) {
    method parseStringIndex (line 10381) | parseStringIndex(index) {
    method createDict (line 10389) | createDict(Type, dict, strings) {
    method parseCharString (line 10396) | parseCharString(state, data, localSubrIndex, globalSubrIndex) {
    method parseCharStrings (line 10547) | parseCharStrings({
    method emptyPrivateDictionary (line 10614) | emptyPrivateDictionary(parentDict) {
    method parsePrivateDict (line 10619) | parsePrivateDict(parentDict) {
    method parseCharsets (line 10655) | parseCharsets(pos, length, strings, cid) {
    method parseEncoding (line 10701) | parseEncoding(pos, properties, strings, charset) {
    method parseFDSelect (line 10759) | parseFDSelect(pos, length) {
  class CFF (line 10796) | class CFF {
    method constructor (line 10797) | constructor() {
    method duplicateFirstGlyph (line 10810) | duplicateFirstGlyph() {
    method hasGlyphId (line 10821) | hasGlyphId(id) {
  class CFFHeader (line 10829) | class CFFHeader {
    method constructor (line 10830) | constructor(major, minor, hdrSize, offSize) {
  class CFFStrings (line 10837) | class CFFStrings {
    method constructor (line 10838) | constructor() {
    method get (line 10841) | get(index) {
    method getSID (line 10850) | getSID(str) {
    method add (line 10861) | add(value) {
    method count (line 10864) | get count() {
  class CFFIndex (line 10868) | class CFFIndex {
    method constructor (line 10869) | constructor() {
    method add (line 10873) | add(data) {
    method set (line 10877) | set(index, data) {
    method get (line 10881) | get(index) {
    method count (line 10884) | get count() {
  class CFFDict (line 10888) | class CFFDict {
    method constructor (line 10889) | constructor(tables, strings) {
    method setByKey (line 10899) | setByKey(key, value) {
    method setByName (line 10919) | setByName(name, value) {
    method hasName (line 10925) | hasName(name) {
    method getByName (line 10928) | getByName(name) {
    method removeByName (line 10938) | removeByName(name) {
    method createTables (line 10941) | static createTables(layout) {
  class CFFTopDict (line 10963) | class CFFTopDict extends CFFDict {
    method tables (line 10964) | static get tables() {
    method constructor (line 10967) | constructor(strings) {
  class CFFPrivateDict (line 10973) | class CFFPrivateDict extends CFFDict {
    method tables (line 10974) | static get tables() {
    method constructor (line 10977) | constructor(strings) {
  class CFFCharset (line 10987) | class CFFCharset {
    method constructor (line 10988) | constructor(predefined, format, charset, raw) {
  class CFFEncoding (line 10995) | class CFFEncoding {
    method constructor (line 10996) | constructor(predefined, format, encoding, raw) {
  class CFFFDSelect (line 11003) | class CFFFDSelect {
    method constructor (line 11004) | constructor(format, fdSelect) {
    method getFDIndex (line 11008) | getFDIndex(glyphIndex) {
  class CFFOffsetTracker (line 11015) | class CFFOffsetTracker {
    method constructor (line 11016) | constructor() {
    method isTracking (line 11019) | isTracking(key) {
    method track (line 11022) | track(key, location) {
    method offset (line 11028) | offset(value) {
    method setEntryLocation (line 11033) | setEntryLocation(key, values, output) {
  class CFFCompiler (line 11058) | class CFFCompiler {
    method constructor (line 11059) | constructor(cff) {
    method compile (line 11062) | compile() {
    method encodeNumber (line 11134) | encodeNumber(value) {
    method EncodeFloatRegExp (line 11140) | static get EncodeFloatRegExp() {
    method encodeFloat (line 11143) | encodeFloat(num) {
    method encodeInteger (line 11171) | encodeInteger(value) {
    method compileHeader (line 11188) | compileHeader(header) {
    method compileNameIndex (line 11191) | compileNameIndex(names) {
    method compileTopDicts (line 11211) | compileTopDicts(dicts, length, removeCidKeys) {
    method compilePrivateDicts (line 11234) | compilePrivateDicts(dicts, trackers, output) {
    method compileDict (line 11257) | compileDict(dict, offsetTracker) {
    method compileStringIndex (line 11304) | compileStringIndex(strings) {
    method compileCharStrings (line 11311) | compileCharStrings(charStrings) {
    method compileCharset (line 11323) | compileCharset(charset, numGlyphs, strings, isCIDFont) {
    method compileEncoding (line 11354) | compileEncoding(encoding) {
    method compileFDSelect (line 11357) | compileFDSelect(fdSelect) {
    method compileTypedArray (line 11388) | compileTypedArray(data) {
    method compileIndex (line 11391) | compileIndex(index, trackers = []) {
  function mapSpecialUnicodeValues (line 16005) | function mapSpecialUnicodeValues(code) {
  function getUnicodeForGlyph (line 16015) | function getUnicodeForGlyph(name, glyphsUnicodeMap) {
  function getUnicodeRangeFor (line 16043) | function getUnicodeRangeFor(value, lastPosition = -1) {
  function getCharUnicodeCategory (line 16064) | function getCharUnicodeCategory(char) {
  function clearUnicodeCaches (line 16078) | function clearUnicodeCaches() {
  constant SEAC_ANALYSIS_ENABLED (line 16087) | const SEAC_ANALYSIS_ENABLED = true;
  function recoverGlyphName (line 16100) | function recoverGlyphName(name, glyphsUnicodeMap) {
  function type1FontGlyphMapping (line 16115) | function type1FontGlyphMapping(properties, builtInEncoding, glyphNames) {
  function normalizeFontName (line 16162) | function normalizeFontName(name) {
  function getStandardFontName (line 17007) | function getStandardFontName(name) {
  function isKnownFontName (line 17012) | function isKnownFontName(name) {
  class ToUnicodeMap (line 17019) | class ToUnicodeMap {
    method constructor (line 17020) | constructor(cmap = []) {
    method length (line 17023) | get length() {
    method forEach (line 17026) | forEach(callback) {
    method has (line 17031) | has(i) {
    method get (line 17034) | get(i) {
    method charCodeOf (line 17037) | charCodeOf(value) {
    method amend (line 17049) | amend(map) {
  class IdentityToUnicodeMap (line 17055) | class IdentityToUnicodeMap {
    method constructor (line 17056) | constructor(firstChar, lastChar) {
    method length (line 17060) | get length() {
    method forEach (line 17063) | forEach(callback) {
    method has (line 17068) | has(i) {
    method get (line 17071) | get(i) {
    method charCodeOf (line 17077) | charCodeOf(v) {
    method amend (line 17080) | amend(map) {
  class CFFFont (line 17089) | class CFFFont {
    method constructor (line 17090) | constructor(file, properties) {
    method numGlyphs (line 17105) | get numGlyphs() {
    method getCharset (line 17108) | getCharset() {
    method getGlyphMapping (line 17111) | getGlyphMapping() {
    method hasGlyphId (line 17158) | hasGlyphId(id) {
    method _createBuiltInEncoding (line 17161) | _createBuiltInEncoding() {
  function getUint32 (line 17194) | function getUint32(data, offset) {
  function getUint16 (line 17197) | function getUint16(data, offset) {
  function getInt16 (line 17200) | function getInt16(data, offset) {
  function getInt8 (line 17203) | function getInt8(data, offset) {
  function getFloat214 (line 17206) | function getFloat214(data, offset) {
  function getSubroutineBias (line 17209) | function getSubroutineBias(subrs) {
  function parseCmap (line 17219) | function parseCmap(data, start, end) {
  function parseCff (line 17269) | function parseCff(data, start, end, seacAnalysisEnabled) {
  function parseGlyfTable (line 17282) | function parseGlyfTable(glyf, loca, isGlyphLocationsLong) {
  function lookupCmap (line 17300) | function lookupCmap(ranges, unicode) {
  function compileGlyf (line 17321) | function compileGlyf(code, cmds, font) {
  function compileCharString (line 17478) | function compileCharString(charStringCode, cmds, font, glyphId) {
  constant NOOP (line 17826) | const NOOP = [];
  class Commands (line 17827) | class Commands {
    method add (line 17829) | add(cmd, args) {
  class CompiledFont (line 17843) | class CompiledFont {
    method constructor (line 17844) | constructor(fontMatrix) {
    method getPathJs (line 17852) | getPathJs(unicode) {
    method compileGlyph (line 17874) | compileGlyph(code, glyphId) {
    method compileGlyphImpl (line 17896) | compileGlyphImpl() {
    method hasBuiltPath (line 17899) | hasBuiltPath(unicode) {
  class TrueTypeCompiled (line 17907) | class TrueTypeCompiled extends CompiledFont {
    method constructor (line 17908) | constructor(glyphs, cmap, fontMatrix) {
    method compileGlyphImpl (line 17913) | compileGlyphImpl(code, cmds) {
  class Type2Compiled (line 17917) | class Type2Compiled extends CompiledFont {
    method constructor (line 17918) | constructor(cffInfo, cmap, fontMatrix, glyphNameMap) {
    method compileGlyphImpl (line 17931) | compileGlyphImpl(code, cmds, glyphId) {
  class FontRendererFactory (line 17935) | class FontRendererFactory {
    method create (line 17936) | static create(font, seacAnalysisEnabled) {
  constant ON_CURVE_POINT (line 20999) | const ON_CURVE_POINT = 1 << 0;
  constant X_SHORT_VECTOR (line 21000) | const X_SHORT_VECTOR = 1 << 1;
  constant Y_SHORT_VECTOR (line 21001) | const Y_SHORT_VECTOR = 1 << 2;
  constant REPEAT_FLAG (line 21002) | const REPEAT_FLAG = 1 << 3;
  constant X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR (line 21003) | const X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR = 1 << 4;
  constant Y_IS_SAME_OR_POSITIVE_Y_SHORT_VECTOR (line 21004) | const Y_IS_SAME_OR_POSITIVE_Y_SHORT_VECTOR = 1 << 5;
  constant OVERLAP_SIMPLE (line 21005) | const OVERLAP_SIMPLE = 1 << 6;
  constant ARG_1_AND_2_ARE_WORDS (line 21006) | const ARG_1_AND_2_ARE_WORDS = 1 << 0;
  constant ARGS_ARE_XY_VALUES (line 21007) | const ARGS_ARE_XY_VALUES = 1 << 1;
  constant WE_HAVE_A_SCALE (line 21008) | const WE_HAVE_A_SCALE = 1 << 3;
  constant MORE_COMPONENTS (line 21009) | const MORE_COMPONENTS = 1 << 5;
  constant WE_HAVE_AN_X_AND_Y_SCALE (line 21010) | const WE_HAVE_AN_X_AND_Y_SCALE = 1 << 6;
  constant WE_HAVE_A_TWO_BY_TWO (line 21011) | const WE_HAVE_A_TWO_BY_TWO = 1 << 7;
  constant WE_HAVE_INSTRUCTIONS (line 21012) | const WE_HAVE_INSTRUCTIONS = 1 << 8;
  class GlyfTable (line 21013) | class GlyfTable {
    method constructor (line 21014) | constructor({
    method getSize (line 21038) | getSize() {
    method write (line 21044) | write() {
    method scale (line 21073) | scale(factors) {
  class Glyph (line 21079) | class Glyph {
    method constructor (line 21080) | constructor({
    method parse (line 21089) | static parse(pos, glyf) {
    method getSize (line 21113) | getSize() {
    method write (line 21120) | write(pos, buf) {
    method scale (line 21135) | scale(factor) {
  class GlyphHeader (line 21150) | class GlyphHeader {
    method constructor (line 21151) | constructor({
    method parse (line 21164) | static parse(pos, glyf) {
    method getSize (line 21173) | getSize() {
    method write (line 21176) | write(pos, buf) {
    method scale (line 21184) | scale(x, factor) {
  class Contour (line 21189) | class Contour {
    method constructor (line 21190) | constructor({
  class SimpleGlyph (line 21200) | class SimpleGlyph {
    method constructor (line 21201) | constructor({
    method parse (line 21208) | static parse(pos, glyf, numberOfContours) {
    method getSize (line 21292) | getSize() {
    method write (line 21319) | write(pos, buf) {
    method scale (line 21395) | scale(x, factor) {
  class CompositeGlyph (line 21406) | class CompositeGlyph {
    method constructor (line 21407) | constructor({
    method parse (line 21422) | static parse(pos, glyf) {
    method getSize (line 21475) | getSize() {
    method write (line 21490) | write(pos, buf) {
    method scale (line 21526) | scale(x, factor) {}
  function writeInt16 (line 21532) | function writeInt16(dest, offset, num) {
  function writeInt32 (line 21536) | function writeInt32(dest, offset, num) {
  function writeData (line 21542) | function writeData(dest, offset, data) {
  constant OTF_HEADER_SIZE (line 21555) | const OTF_HEADER_SIZE = 12;
  constant OTF_TABLE_ENTRY_SIZE (line 21556) | const OTF_TABLE_ENTRY_SIZE = 16;
  class OpenTypeFileBuilder (line 21557) | class OpenTypeFileBuilder {
    method constructor (line 21558) | constructor(sfnt) {
    method getSearchParams (line 21562) | static getSearchParams(entriesCount, entrySize) {
    method toArray (line 21576) | toArray() {
    method addTable (line 21627) | addTable(tag, data) {
  constant HINTING_ENABLED (line 21640) | const HINTING_ENABLED = false;
  constant COMMAND_MAP (line 21641) | const COMMAND_MAP = {
  class Type1CharString (line 21658) | class Type1CharString {
    method constructor (line 21659) | constructor() {
    method convert (line 21666) | convert(encoded, subrs, seacAnalysisEnabled) {
    method executeCommand (line 21859) | executeCommand(howManyArgs, command, keepStack) {
  constant EEXEC_ENCRYPT_KEY (line 21883) | const EEXEC_ENCRYPT_KEY = 55665;
  constant CHAR_STRS_ENCRYPT_KEY (line 21884) | const CHAR_STRS_ENCRYPT_KEY = 4330;
  function isHexDigit (line 21885) | function isHexDigit(code) {
  function decrypt (line 21888) | function decrypt(data, key, discardNumber) {
  function decryptAscii (line 21909) | function decryptAscii(data, key, discardNumber) {
  function isSpecial (line 21935) | function isSpecial(c) {
  class Type1Parser (line 21938) | class Type1Parser {
    method constructor (line 21939) | constructor(stream, encrypted, seacAnalysisEnabled) {
    method readNumberArray (line 21949) | readNumberArray() {
    method readNumber (line 21961) | readNumber() {
    method readInt (line 21965) | readInt() {
    method readBoolean (line 21969) | readBoolean() {
    method nextChar (line 21973) | nextChar() {
    method prevChar (line 21976) | prevChar() {
    method getToken (line 21980) | getToken() {
    method readCharStrings (line 22009) | readCharStrings(bytes, lenIV) {
    method extractFontProgram (line 22015) | extractFontProgram(properties) {
    method extractFontHeader (line 22148) | extractFontHeader(properties) {
  function findBlock (line 22207) | function findBlock(streamBytes, signature, startIndex) {
  function getHeaderBlock (line 22233) | function getHeaderBlock(stream, suggestedLength) {
  function getEexecBlock (line 22279) | function getEexecBlock(stream, suggestedLength) {
  class Type1Font (line 22289) | class Type1Font {
    method constructor (line 22290) | constructor(name, file, properties) {
    method numGlyphs (line 22320) | get numGlyphs() {
    method getCharset (line 22323) | getCharset() {
    method getGlyphMapping (line 22332) | getGlyphMapping(properties) {
    method hasGlyphId (line 22359) | hasGlyphId(id) {
    method getSeacs (line 22369) | getSeacs(charstrings) {
    method getType2Charstrings (line 22379) | getType2Charstrings(type1Charstrings) {
    method getType2Subrs (line 22386) | getType2Subrs(type1Subrs) {
    method wrap (line 22406) | wrap(name, glyphs, charstrings, subrs, properties) {
  constant PRIVATE_USE_AREAS (line 22494) | const PRIVATE_USE_AREAS = [[0xe000, 0xf8ff], [0x100000, 0x10fffd]];
  constant PDF_GLYPH_SPACE_UNITS (line 22495) | const PDF_GLYPH_SPACE_UNITS = 1000;
  constant EXPORT_DATA_PROPERTIES (line 22496) | const EXPORT_DATA_PROPERTIES = ["ascent", "bbox", "black", "bold", "char...
  constant EXPORT_DATA_EXTRA_PROPERTIES (line 22497) | const EXPORT_DATA_EXTRA_PROPERTIES = ["cMap", "defaultEncoding", "differ...
  function adjustWidths (line 22498) | function adjustWidths(properties) {
  function adjustTrueTypeToUnicode (line 22512) | function adjustTrueTypeToUnicode(properties, isSymbolicFont, nameRecords) {
  function adjustType1ToUnicode (line 22557) | function adjustType1ToUnicode(properties, builtInEncoding) {
  function amendFallbackToUnicode (line 22588) | function amendFallbackToUnicode(properties) {
  class fonts_Glyph (line 22606) | class fonts_Glyph {
    method constructor (line 22607) | constructor(originalCharCode, fontChar, unicode, accent, width, vmetri...
    method category (line 22618) | get category() {
  function int16 (line 22622) | function int16(b0, b1) {
  function writeSignedInt16 (line 22625) | function writeSignedInt16(bytes, index, value) {
  function signedInt16 (line 22629) | function signedInt16(b0, b1) {
  function writeUint32 (line 22633) | function writeUint32(bytes, index, value) {
  function int32 (line 22639) | function int32(b0, b1, b2, b3) {
  function string16 (line 22642) | function string16(value) {
  function safeString16 (line 22645) | function safeString16(value) {
  function isTrueTypeFile (line 22653) | function isTrueTypeFile(file) {
  function isTrueTypeCollectionFile (line 22657) | function isTrueTypeCollectionFile(file) {
  function isOpenTypeFile (line 22661) | function isOpenTypeFile(file) {
  function isType1File (line 22665) | function isType1File(file) {
  function isCFFFile (line 22675) | function isCFFFile(file) {
  function getFontFileType (line 22682) | function getFontFileType(file, {
  function applyStandardFontGlyphMap (line 22713) | function applyStandardFontGlyphMap(map, glyphMap) {
  function buildToFontChar (line 22718) | function buildToFontChar(encoding, glyphsUnicodeMap, differences) {
  function isMacNameRecord (line 22735) | function isMacNameRecord(r) {
  function isWinNameRecord (line 22738) | function isWinNameRecord(r) {
  function convertCidString (line 22741) | function convertCidString(charCode, cid, shouldThrow = false) {
  function adjustMapping (line 22755) | function adjustMapping(charCodeToGlyphId, hasGlyph, newGlyphZeroId, toUn...
  function getRanges (line 22801) | function getRanges(glyphs, toUnicodeExtraMap, numGlyphs) {
  function createCmapTable (line 22851) | function createCmapTable(glyphs, toUnicodeExtraMap, numGlyphs) {
  function validateOS2Table (line 22934) | function validateOS2Table(os2, file) {
  function createOS2Table (line 22955) | function createOS2Table(properties, charstrings, override) {
  function createPostTable (line 23011) | function createPostTable(properties) {
  function createPostscriptName (line 23015) | function createPostscriptName(name) {
  function createNameTable (line 23018) | function createNameTable(name, proto) {
  class Font (line 23052) | class Font {
    method constructor (line 23053) | constructor(name, file, properties) {
    method renderer (line 23177) | get renderer() {
    method exportData (line 23181) | exportData(extraProperties = false) {
    method fallbackToSystemFont (line 23193) | fallbackToSystemFont(properties) {
    method checkAndRepair (line 23290) | checkAndRepair(name, font, properties) {
    method convert (line 24620) | convert(fontName, font, properties) {
    method _charToGlyph (line 24722) | _charToGlyph(charcode, isSpace = false) {
    method charsToGlyphs (line 24777) | charsToGlyphs(chars) {
    method getCharPositions (line 24806) | getCharPositions(chars) {
    method glyphCacheValues (line 24824) | get glyphCacheValues() {
    method encodeString (line 24827) | encodeString(str) {
  class ErrorFont (line 24861) | class ErrorFont {
    method constructor (line 24862) | constructor(error) {
    method charsToGlyphs (line 24867) | charsToGlyphs() {
    method encodeString (line 24870) | encodeString(chars) {
    method exportData (line 24873) | exportData(extraProperties = false) {
  class Pattern (line 24894) | class Pattern {
    method constructor (line 24895) | constructor() {
    method parseShading (line 24898) | static parseShading(shading, xref, res, pdfFunctionFactory, localColor...
  class BaseShading (line 24923) | class BaseShading {
    method constructor (line 24925) | constructor() {
    method getIR (line 24930) | getIR() {
  class RadialAxialShading (line 24934) | class RadialAxialShading extends BaseShading {
    method constructor (line 24935) | constructor(dict, xref, resources, pdfFunctionFactory, localColorSpace...
    method getIR (line 25049) | getIR() {
  class MeshStreamReader (line 25073) | class MeshStreamReader {
    method constructor (line 25074) | constructor(stream, context) {
    method hasData (line 25084) | get hasData() {
    method readBits (line 25099) | readBits(n) {
    method align (line 25123) | align() {
    method readFlag (line 25127) | readFlag() {
    method readCoordinate (line 25130) | readCoordinate() {
    method readComponents (line 25138) | readComponents() {
  function buildB (line 25156) | function buildB(count) {
  function getB (line 25165) | function getB(count) {
  function clearPatternCaches (line 25168) | function clearPatternCaches() {
  class MeshShading (line 25171) | class MeshShading extends BaseShading {
    method constructor (line 25175) | constructor(stream, xref, resources, pdfFunctionFactory, localColorSpa...
    method _decodeType4Shading (line 25239) | _decodeType4Shading(reader) {
    method _decodeType5Shading (line 25280) | _decodeType5Shading(reader, verticesPerRow) {
    method _decodeType6Shading (line 25298) | _decodeType6Shading(reader) {
    method _decodeType7Shading (line 25415) | _decodeType7Shading(reader) {
    method _buildFigureFromPatch (line 25540) | _buildFigureFromPatch(index) {
    method _updateBounds (line 25613) | _updateBounds() {
    method _packData (line 25628) | _packData() {
    method getIR (line 25658) | getIR() {
  class DummyShading (line 25668) | class DummyShading extends BaseShading {
    method getIR (line 25669) | getIR() {
  function getTilingPatternIR (line 25673) | function getTilingPatternIR(operatorList, dict, color) {
  function getXfaFontName (line 25939) | function getXfaFontName(name) {
  function getXfaFontWidths (line 25944) | function getXfaFontWidths(name) {
  function getXfaFontDict (line 25973) | function getXfaFontDict(name) {
  class PostScriptParser (line 25998) | class PostScriptParser {
    method constructor (line 25999) | constructor(lexer) {
    method nextToken (line 26005) | nextToken() {
    method accept (line 26009) | accept(type) {
    method expect (line 26016) | expect(type) {
    method parse (line 26022) | parse() {
    method parseBlock (line 26029) | parseBlock() {
    method parseCondition (line 26042) | parseCondition() {
  class PostScriptToken (line 26074) | class PostScriptToken {
    method opCache (line 26075) | static get opCache() {
    method constructor (line 26078) | constructor(type, value) {
    method getOperator (line 26082) | static getOperator(op) {
    method LBRACE (line 26085) | static get LBRACE() {
    method RBRACE (line 26088) | static get RBRACE() {
    method IF (line 26091) | static get IF() {
    method IFELSE (line 26094) | static get IFELSE() {
  class PostScriptLexer (line 26098) | class PostScriptLexer {
    method constructor (line 26099) | constructor(stream) {
    method nextChar (line 26104) | nextChar() {
    method getToken (line 26107) | getToken() {
    method getNumber (line 26163) | getNumber() {
  class BaseLocalCache (line 26186) | class BaseLocalCache {
    method constructor (line 26187) | constructor(options) {
    method getByName (line 26198) | getByName(name) {
    method getByRef (line 26208) | getByRef(ref) {
    method set (line 26211) | set(name, ref, data) {
  class LocalImageCache (line 26215) | class LocalImageCache extends BaseLocalCache {
    method set (line 26216) | set(name, ref = null, data) {
  class LocalColorSpaceCache (line 26234) | class LocalColorSpaceCache extends BaseLocalCache {
    method set (line 26235) | set(name = null, ref = null, data) {
  class LocalFunctionCache (line 26255) | class LocalFunctionCache extends BaseLocalCache {
    method constructor (line 26256) | constructor(options) {
    method set (line 26261) | set(name = null, ref, data) {
  class LocalGStateCache (line 26271) | class LocalGStateCache extends BaseLocalCache {
    method set (line 26272) | set(name, ref = null, data) {
  class LocalTilingPatternCache (line 26290) | class LocalTilingPatternCache extends BaseLocalCache {
    method constructor (line 26291) | constructor(options) {
    method set (line 26296) | set(name = null, ref, data) {
  class RegionalImageCache (line 26306) | class RegionalImageCache extends BaseLocalCache {
    method constructor (line 26307) | constructor(options) {
    method set (line 26312) | set(name = null, ref, data) {
  class GlobalImageCache (line 26322) | class GlobalImageCache {
    method constructor (line 26327) | constructor() {
    method #byteSize (line 26331) | get #byteSize() {
    method #cacheLimitReached (line 26338) | get #cacheLimitReached() {
    method shouldCache (line 26347) | shouldCache(ref, pageIndex) {
    method addDecodeFailed (line 26362) | addDecodeFailed(ref) {
    method hasDecodeFailed (line 26365) | hasDecodeFailed(ref) {
    method addByteSize (line 26368) | addByteSize(ref, byteSize) {
    method getData (line 26378) | getData(ref, pageIndex) {
    method setData (line 26393) | setData(ref, data) {
    method clear (line 26406) | clear(onlyData = false) {
  class PDFFunctionFactory (line 26422) | class PDFFunctionFactory {
    method constructor (line 26423) | constructor({
    method create (line 26430) | create(fn) {
    method createFromArray (line 26443) | createFromArray(fnObj) {
    method getCached (line 26456) | getCached(cacheKey) {
    method _cache (line 26473) | _cache(cacheKey, parsedFunction) {
    method _localFunctionCache (line 26489) | get _localFunctionCache() {
  function toNumberArray (line 26493) | function toNumberArray(arr) {
  class PDFFunction (line 26502) | class PDFFunction {
    method getSampleArray (line 26503) | static getSampleArray(size, outputSize, bps, stream) {
    method parse (line 26528) | static parse({
    method parseArray (line 26567) | static parseArray({
    method constructSampled (line 26593) | static constructSampled({
    method constructInterpolated (line 26682) | static constructInterpolated({
    method constructStiched (line 26702) | static constructStiched({
    method constructPostScript (line 26757) | static constructPostScript({
  function isPDFFunction (line 26826) | function isPDFFunction(v) {
  class PostScriptStack (line 26837) | class PostScriptStack {
    method constructor (line 26839) | constructor(initialStack) {
    method push (line 26842) | push(value) {
    method pop (line 26848) | pop() {
    method copy (line 26854) | copy(n) {
    method index (line 26863) | index(n) {
    method roll (line 26866) | roll(n, p) {
  class PostScriptEvaluator (line 26888) | class PostScriptEvaluator {
    method constructor (line 26889) | constructor(operators) {
    method execute (line 26892) | execute(initialStack) {
  class AstNode (line 27120) | class AstNode {
    method constructor (line 27121) | constructor(type) {
    method visit (line 27124) | visit(visitor) {
  class AstArgument (line 27128) | class AstArgument extends AstNode {
    method constructor (line 27129) | constructor(index, min, max) {
    method visit (line 27135) | visit(visitor) {
  class AstLiteral (line 27139) | class AstLiteral extends AstNode {
    method constructor (line 27140) | constructor(number) {
    method visit (line 27146) | visit(visitor) {
  class AstBinaryOperation (line 27150) | class AstBinaryOperation extends AstNode {
    method constructor (line 27151) | constructor(op, arg1, arg2, min, max) {
    method visit (line 27159) | visit(visitor) {
  class AstMin (line 27163) | class AstMin extends AstNode {
    method constructor (line 27164) | constructor(arg, max) {
    method visit (line 27170) | visit(visitor) {
  class AstVariable (line 27174) | class AstVariable extends AstNode {
    method constructor (line 27175) | constructor(index, min, max) {
    method visit (line 27181) | visit(visitor) {
  class AstVariableDefinition (line 27185) | class AstVariableDefinition extends AstNode {
    method constructor (line 27186) | constructor(variable, arg) {
    method visit (line 27191) | visit(visitor) {
  class ExpressionBuilderVisitor (line 27195) | class ExpressionBuilderVisitor {
    method constructor (line 27196) | constructor() {
    method visitArgument (line 27199) | visitArgument(arg) {
    method visitVariable (line 27202) | visitVariable(variable) {
    method visitLiteral (line 27205) | visitLiteral(literal) {
    method visitBinaryOperation (line 27208) | visitBinaryOperation(operation) {
    method visitVariableDefinition (line 27215) | visitVariableDefinition(definition) {
    method visitMin (line 27222) | visitMin(max) {
    method toString (line 27227) | toString() {
  function buildAddOperation (line 27231) | function buildAddOperation(num1, num2) {
  function buildMulOperation (line 27243) | function buildMulOperation(num1, num2) {
  function buildSubOperation (line 27264) | function buildSubOperation(num1, num2) {
  function buildMinOperation (line 27277) | function buildMinOperation(num1, max) {
  class PostScriptCompiler (line 27285) | class PostScriptCompiler {
    method compile (line 27286) | compile(code, domain, range) {
  function isOdd (line 27449) | function isOdd(i) {
  function isEven (line 27452) | function isEven(i) {
  function findUnequal (line 27455) | function findUnequal(arr, start, value) {
  function setValues (line 27464) | function setValues(arr, start, end, value) {
  function reverseValues (line 27469) | function reverseValues(arr, start, end) {
  function createBidiText (line 27476) | function createBidiText(str, isLTR, vertical = false) {
  function bidi (line 27490) | function bidi(str, startLevel = -1, vertical = false) {
  constant NORMAL (line 27685) | const NORMAL = {
  constant BOLD (line 27689) | const BOLD = {
  constant ITALIC (line 27693) | const ITALIC = {
  constant BOLDITALIC (line 27697) | const BOLDITALIC = {
  function getStyleToAppend (line 27812) | function getStyleToAppend(style) {
  function getFamilyName (line 27830) | function getFamilyName(str) {
  function generateFont (line 27834) | function generateFont({
  function getFontSubstitution (line 27875) | function getFontSubstitution(systemFontCache, idFactory, localFontPath, ...
  constant MIN_IMAGE_DIM (line 27948) | const MIN_IMAGE_DIM = 2048;
  constant MAX_IMAGE_DIM (line 27949) | const MAX_IMAGE_DIM = 65537;
  constant MAX_ERROR (line 27950) | const MAX_ERROR = 128;
  class ImageResizer (line 27951) | class ImageResizer {
    method constructor (line 27952) | constructor(imgData, isMask) {
    method needsToBeResized (line 27956) | static needsToBeResized(width, height) {
    method MAX_DIM (line 27981) | static get MAX_DIM() {
    method MAX_AREA (line 27984) | static get MAX_AREA() {
    method MAX_AREA (line 27988) | static set MAX_AREA(area) {
    method setMaxArea (line 27994) | static setMaxArea(area) {
    method _areGoodDims (line 27999) | static _areGoodDims(width, height) {
    method _guessMax (line 28011) | static _guessMax(start, end, tolerance, defaultHeight) {
    method createImage (line 28023) | static async createImage(imgData, isMask = false) {
    method _createImage (line 28026) | async _createImage() {
    method _encodeBMP (line 28069) | _encodeBMP() {
  constant SEED (line 28191) | const SEED = 0xc3d2e1f0;
  constant MASK_HIGH (line 28192) | const MASK_HIGH = 0xffff0000;
  constant MASK_LOW (line 28193) | const MASK_LOW = 0xffff;
  class MurmurHash3_64 (line 28194) | class MurmurHash3_64 {
    method constructor (line 28195) | constructor(seed) {
    method update (line 28199) | update(input) {
    method hexdigest (line 28269) | hexdigest() {
  function addState (line 28285) | function addState(parentState, pattern, checkFn, iterateFn, processFn) {
  class NullOptimizer (line 28603) | class NullOptimizer {
    method constructor (line 28604) | constructor(queue) {
    method _optimize (line 28607) | _optimize() {}
    method push (line 28608) | push(fn, args) {
    method flush (line 28613) | flush() {}
    method reset (line 28614) | reset() {}
  class QueueOptimizer (line 28616) | class QueueOptimizer extends NullOptimizer {
    method constructor (line 28617) | constructor(queue) {
    method isOffscreenCanvasSupported (line 28629) | set isOffscreenCanvasSupported(value) {
    method _optimize (line 28632) | _optimize() {
    method flush (line 28676) | flush() {
    method reset (line 28685) | reset() {
  class OperatorList (line 28691) | class OperatorList {
    method constructor (line 28694) | constructor(intent = 0, streamSink) {
    method isOffscreenCanvasSupported (line 28704) | set isOffscreenCanvasSupported(value) {
    method length (line 28707) | get length() {
    method ready (line 28710) | get ready() {
    method totalLength (line 28713) | get totalLength() {
    method addOp (line 28716) | addOp(fn, args) {
    method addImageOps (line 28727) | addImageOps(fn, args, optionalContent) {
    method addDependency (line 28736) | addDependency(dependency) {
    method addDependencies (line 28743) | addDependencies(dependencies) {
    method addOpList (line 28748) | addOpList(opList) {
    method getIR (line 28760) | getIR() {
    method _transfers (line 28767) | get _transfers() {
    method flush (line 28788) | flush(lastChunk = false, separateAnnots = null) {
  function decodeAndClamp (line 28817) | function decodeAndClamp(value, addend, coefficient, max) {
  function resizeImageMask (line 28826) | function resizeImageMask(src, bpc, w1, h1, w2, h2) {
  class PDFImage (line 28857) | class PDFImage {
    method constructor (line 28858) | constructor({
    method buildImage (line 28999) | static async buildImage({
    method createRawMask (line 29036) | static createRawMask({
    method createMask (line 29069) | static async createMask({
    method drawWidth (line 29133) | get drawWidth() {
    method drawHeight (line 29136) | get drawHeight() {
    method decodeBuffer (line 29139) | decodeBuffer(buffer) {
    method getComponents (line 29160) | getComponents(buffer) {
    method fillOpacity (line 29235) | fillOpacity(rgbaBuf, width, height, actualHeight, image) {
    method undoPreblend (line 29290) | undoPreblend(buffer, width, height) {
    method createImageData (line 29314) | async createImageData(forceRGBA = false, isOffscreenCanvasSupported = ...
    method fillGrayBuffer (line 29464) | fillGrayBuffer(buffer) {
    method createBitmap (line 29500) | createBitmap(kind, width, height, src) {
    method getImageBytes (line 29527) | getImageBytes(length, {
  constant TEXT_CHUNK_BATCH_SIZE (line 29592) | const TEXT_CHUNK_BATCH_SIZE = 10;
  function normalizeBlendMode (line 29594) | function normalizeBlendMode(value, parsingArray = false) {
  function incrementCachedImageMaskCount (line 29652) | function incrementCachedImageMaskCount(data) {
  class TimeSlotManager (line 29657) | class TimeSlotManager {
    method constructor (line 29660) | constructor() {
    method check (line 29663) | check() {
    method reset (line 29670) | reset() {
  class PartialEvaluator (line 29675) | class PartialEvaluator {
    method constructor (line 29676) | constructor({
    method _pdfFunctionFactory (line 29703) | get _pdfFunctionFactory() {
    method parsingType3Font (line 29710) | get parsingType3Font() {
    method clone (line 29713) | clone(newOptions = null) {
    method hasBlendModes (line 29718) | hasBlendModes(resources, nonBlendModesSet) {
    method fetchBuiltInCMap (line 29811) | async fetchBuiltInCMap(name) {
    method fetchStandardFontData (line 29837) | async fetchStandardFontData(name) {
    method buildFormXObject (line 29871) | async buildFormXObject(resources, xobj, smask, operatorList, task, ini...
    method _sendImgData (line 29933) | _sendImgData(objId, imgData, cacheGlobally = false) {
    method buildPaintImageXObject (line 29940) | async buildPaintImageXObject({
    method handleSMask (line 30160) | handleSMask(smask, resources, operatorList, task, stateManager, localC...
    method handleTransferFunction (line 30180) | handleTransferFunction(tr) {
    method handleTilingType (line 30220) | handleTilingType(fn, color, resources, pattern, patternDict, operatorL...
    method handleSetFont (line 30253) | async handleSetFont(resources, fontArgs, fontRef, operatorList, task, ...
    method handleText (line 30273) | handleText(chars, state) {
    method ensureStateFont (line 30284) | ensureStateFont(state) {
    method setGState (line 30295) | async setGState({
    method loadFont (line 30380) | loadFont(fontName, font, resources, fallbackFontDict = null, cssFontIn...
    method buildPath (line 30488) | buildPath(operatorList, fn, args, parsingText = false) {
    method parseColorSpace (line 30541) | parseColorSpace({
    method parseShading (line 30563) | parseShading({
    method handleColorN (line 30600) | handleColorN(operatorList, fn, args, cs, patterns, resources, task, lo...
    method _parseVisibilityExpression (line 30639) | _parseVisibilityExpression(array, nestingCounter, currentResult) {
    method parseMarkedContentProps (line 30673) | async parseMarkedContentProps(contentProperties, resources) {
    method getOperatorList (line 30726) | getOperatorList({
    method getTextContent (line 31167) | getTextContent({
    method extractDataStructures (line 31983) | async extractDataStructures(dict, properties) {
    method _simpleFontToUnicode (line 32083) | _simpleFontToUnicode(properties, forceGlyphs = false) {
    method buildToUnicode (line 32162) | async buildToUnicode(properties) {
    method readToUnicode (line 32203) | async readToUnicode(cmapObj) {
    method readCidToGidMap (line 32261) | readCidToGidMap(glyphsData, toUnicode) {
    method extractWidths (line 32273) | extractWidths(dict, descriptor, properties) {
    method isSerifFont (line 32393) | isSerifFont(baseFontName) {
    method getBaseFontMetrics (line 32397) | getBaseFontMetrics(name) {
    method buildCharCodeToWidth (line 32420) | buildCharCodeToWidth(widthsByGlyphName, properties) {
    method preEvaluateFont (line 32436) | preEvaluateFont(dict) {
    method translateFont (line 32557) | async translateFont({
    method buildFontPaths (line 32764) | static buildFontPaths(font, glyphs, handler, evaluatorOptions) {
    method fallbackFontDict (line 32788) | static get fallbackFontDict() {
  class TranslatedFont (line 32797) | class TranslatedFont {
    method constructor (line 32798) | constructor({
    method send (line 32812) | send(handler) {
    method fallback (line 32819) | fallback(handler) {
    method loadType3Data (line 32826) | loadType3Data(evaluator, resources, task) {
    method _removeType3ColorOperators (line 32884) | _removeType3ColorOperators(operatorList, fontBBoxSize = NaN) {
  class StateManager (line 32951) | class StateManager {
    method constructor (line 32952) | constructor(initialState = new EvalState()) {
    method save (line 32956) | save() {
    method restore (line 32961) | restore() {
    method transform (line 32967) | transform(args) {
  class TextState (line 32971) | class TextState {
    method constructor (line 32972) | constructor() {
    method setTextMatrix (line 32987) | setTextMatrix(a, b, c, d, e, f) {
    method setTextLineMatrix (line 32996) | setTextLineMatrix(a, b, c, d, e, f) {
    method translateTextMatrix (line 33005) | translateTextMatrix(x, y) {
    method translateTextLineMatrix (line 33010) | translateTextLineMatrix(x, y) {
    method carriageReturn (line 33015) | carriageReturn() {
    method clone (line 33019) | clone() {
  class EvalState (line 33027) | class EvalState {
    method constructor (line 33028) | constructor() {
    method clone (line 33035) | clone() {
  class EvaluatorPreprocessor (line 33039) | class EvaluatorPreprocessor {
    method opMap (line 33040) | static get opMap() {
    method constructor (line 33420) | constructor(stream, xref, stateManager = new StateManager()) {
    method savedStatesDepth (line 33430) | get savedStatesDepth() {
    method read (line 33433) | read(operation) {
    method preprocessCommand (line 33499) | preprocessCommand(fn, args) {
  class DefaultAppearanceEvaluator (line 33523) | class DefaultAppearanceEvaluator extends EvaluatorPreprocessor {
    method constructor (line 33524) | constructor(str) {
    method parse (line 33527) | parse() {
  function parseDefaultAppearance (line 33577) | function parseDefaultAppearance(str) {
  class AppearanceStreamEvaluator (line 33580) | class AppearanceStreamEvaluator extends EvaluatorPreprocessor {
    method constructor (line 33581) | constructor(stream, evaluatorOptions, xref) {
    method parse (line 33588) | parse() {
    method _localColorSpaceCache (line 33675) | get _localColorSpaceCache() {
    method _pdfFunctionFactory (line 33678) | get _pdfFunctionFactory() {
  function parseAppearanceStream (line 33686) | function parseAppearanceStream(stream, evaluatorOptions, xref) {
  function getPdfColor (line 33689) | function getPdfColor(color, isFill) {
  function createDefaultAppearance (line 33696) | function createDefaultAppearance({
  class FakeUnicodeFont (line 33703) | class FakeUnicodeFont {
    method constructor (line 33704) | constructor(xref, fontFamily) {
    method fontDescriptorRef (line 33717) | get fontDescriptorRef() {
    method descendantFontRef (line 33731) | get descendantFontRef() {
    method baseFontRef (line 33770) | get baseFontRef() {
    method resources (line 33780) | get resources() {
    method _createContext (line 33787) | _createContext() {
    method createFontResources (line 33792) | createFontResources(text) {
    method getFirstPositionInfo (line 33809) | static getFirstPositionInfo(rect, rotation, fontSize) {
    method createAppearance (line 33824) | createAppearance(text, rect, rotation, fontSize, bgColor, strokeAlpha) {
  class NameOrNumberTree (line 33904) | class NameOrNumberTree {
    method constructor (line 33905) | constructor(root, xref, type) {
    method getAll (line 33913) | getAll() {
    method get (line 33951) | get(key) {
  class NameTree (line 34007) | class NameTree extends NameOrNumberTree {
    method constructor (line 34008) | constructor(root, xref) {
  class NumberTree (line 34012) | class NumberTree extends NameOrNumberTree {
    method constructor (line 34013) | constructor(root, xref) {
  function clearGlobalCaches (line 34023) | function clearGlobalCaches() {
  function pickPlatformItem (line 34034) | function pickPlatformItem(dict) {
  function stripPath (line 34051) | function stripPath(str) {
  class FileSpec (line 34054) | class FileSpec {
    method constructor (line 34056) | constructor(root, xref, skipContent = false) {
    method filename (line 34076) | get filename() {
    method content (line 34084) | get content() {
    method description (line 34102) | get description() {
    method serializable (line 34110) | get serializable() {
  function isWhitespace (line 34135) | function isWhitespace(s, index) {
  function isWhitespaceString (line 34139) | function isWhitespaceString(s) {
  class XMLParserBase (line 34147) | class XMLParserBase {
    method _resolveEntities (line 34148) | _resolveEntities(s) {
    method _parseContent (line 34170) | _parseContent(s, start) {
    method _parseProcessingInstruction (line 34219) | _parseProcessingInstruction(s, start) {
    method parseXml (line 34242) | parseXml(s) {
    method onResolveEntity (line 34340) | onResolveEntity(name) {
    method onPi (line 34343) | onPi(name, value) {}
    method onComment (line 34344) | onComment(text) {}
    method onCdata (line 34345) | onCdata(text) {}
    method onDoctype (line 34346) | onDoctype(doctypeContent) {}
    method onText (line 34347) | onText(text) {}
    method onBeginElement (line 34348) | onBeginElement(name, attributes, isEmpty) {}
    method onEndElement (line 34349) | onEndElement(name) {}
    method onError (line 34350) | onError(code) {}
  class SimpleDOMNode (line 34352) | class SimpleDOMNode {
    method constructor (line 34353) | constructor(nodeName, nodeValue) {
    method firstChild (line 34361) | get firstChild() {
    method nextSibling (line 34364) | get nextSibling() {
    method textContent (line 34375) | get textContent() {
    method children (line 34383) | get children() {
    method hasChildNodes (line 34386) | hasChildNodes() {
    method searchNode (line 34389) | searchNode(paths, pos) {
    method dump (line 34443) | dump(buffer) {
  class SimpleXMLParser (line 34467) | class SimpleXMLParser extends XMLParserBase {
    method constructor (line 34468) | constructor({
    method parseFromString (line 34479) | parseFromString(data) {
    method onText (line 34495) | onText(text) {
    method onCdata (line 34502) | onCdata(text) {
    method onBeginElement (line 34506) | onBeginElement(name, attributes, isEmpty) {
    method onEndElement (line 34522) | onEndElement(name) {
    method onError (line 34533) | onError(code) {
  class MetadataParser (line 34540) | class MetadataParser {
    method constructor (line 34541) | constructor(data) {
    method _repair (line 34553) | _repair(data) {
    method _getSequence (line 34584) | _getSequence(entry) {
    method _parseArray (line 34591) | _parseArray(entry) {
    method _parse (line 34599) | _parse(xmlDocument) {
    method serializable (line 34628) | get serializable() {
  class DecryptStream (line 34639) | class DecryptStream extends DecodeStream {
    method constructor (line 34640) | constructor(str, maybeLength, decrypt) {
    method readBlock (line 34648) | readBlock() {
  class ARCFourCipher (line 34676) | class ARCFourCipher {
    method constructor (line 34677) | constructor(key) {
    method encryptBlock (line 34693) | encryptBlock(data) {
    method decryptBlock (line 34712) | decryptBlock(data) {
    method encrypt (line 34715) | encrypt(data) {
  function hash (line 34722) | function hash(data, offset, length) {
  class Word64 (line 34788) | class Word64 {
    method constructor (line 34789) | constructor(highInteger, lowInteger) {
    method and (line 34793) | and(word) {
    method xor (line 34797) | xor(word) {
    method or (line 34801) | or(word) {
    method shiftRight (line 34805) | shiftRight(places) {
    method shiftLeft (line 34814) | shiftLeft(places) {
    method rotateRight (line 34823) | rotateRight(places) {
    method not (line 34836) | not() {
    method add (line 34840) | add(word) {
    method copyTo (line 34849) | copyTo(bytes, offset) {
    method assign (line 34859) | assign(word) {
  function rotr (line 34865) | function rotr(x, n) {
  function ch (line 34868) | function ch(x, y, z) {
  function maj (line 34871) | function maj(x, y, z) {
  function sigma (line 34874) | function sigma(x) {
  function sigmaPrime (line 34877) | function sigmaPrime(x) {
  function littleSigma (line 34880) | function littleSigma(x) {
  function littleSigmaPrime (line 34883) | function littleSigmaPrime(x) {
  function hash (line 34887) | function hash(data, offset, length) {
  function ch (line 34960) | function ch(result, x, y, z, tmp) {
  function maj (line 34968) | function maj(result, x, y, z, tmp) {
  function sigma (line 34978) | function sigma(result, x, tmp) {
  function sigmaPrime (line 34988) | function sigmaPrime(result, x, tmp) {
  function littleSigma (line 34998) | function littleSigma(result, x, tmp) {
  function littleSigmaPrime (line 35008) | function littleSigmaPrime(result, x, tmp) {
  function hash (line 35019) | function hash(data, offset, length, mode384 = false) {
  function calculateSHA384 (line 35163) | function calculateSHA384(data, offset, length) {
  class NullCipher (line 35166) | class NullCipher {
    method decryptBlock (line 35167) | decryptBlock(data) {
    method encrypt (line 35170) | encrypt(data) {
  class AESBaseCipher (line 35174) | class AESBaseCipher {
    method constructor (line 35175) | constructor() {
    method _expandKey (line 35189) | _expandKey(cipherKey) {
    method _decrypt (line 35192) | _decrypt(input, key) {
    method _encrypt (line 35260) | _encrypt(input, key) {
    method _decryptBlock2 (line 35331) | _decryptBlock2(data, finalize) {
    method decryptBlock (line 35379) | decryptBlock(data, finalize, iv = null) {
    method encrypt (line 35401) | encrypt(data, iv) {
  class AES128Cipher (line 35438) | class AES128Cipher extends AESBaseCipher {
    method constructor (line 35439) | constructor(key) {
    method _expandKey (line 35446) | _expandKey(cipherKey) {
  class AES256Cipher (line 35476) | class AES256Cipher extends AESBaseCipher {
    method constructor (line 35477) | constructor(key) {
    method _expandKey (line 35483) | _expandKey(cipherKey) {
  class PDF17 (line 35524) | class PDF17 {
    method checkOwnerPassword (line 35525) | checkOwnerPassword(password, ownerValidationSalt, userBytes, ownerPass...
    method checkUserPassword (line 35533) | checkUserPassword(password, userValidationSalt, userPassword) {
    method getOwnerKey (line 35540) | getOwnerKey(password, ownerKeySalt, userBytes, ownerEncryption) {
    method getUserKey (line 35549) | getUserKey(password, userKeySalt, userEncryption) {
  class PDF20 (line 35558) | class PDF20 {
    method _hash (line 35559) | _hash(password, input, userBytes) {
    method checkOwnerPassword (line 35590) | checkOwnerPassword(password, ownerValidationSalt, userBytes, ownerPass...
    method checkUserPassword (line 35598) | checkUserPassword(password, userValidationSalt, userPassword) {
    method getOwnerKey (line 35605) | getOwnerKey(password, ownerKeySalt, userBytes, ownerEncryption) {
    method getUserKey (line 35614) | getUserKey(password, userKeySalt, userEncryption) {
  class CipherTransform (line 35623) | class CipherTransform {
    method constructor (line 35624) | constructor(stringCipherConstructor, streamCipherConstructor) {
    method createStream (line 35628) | createStream(stream, length) {
    method decryptString (line 35634) | decryptString(s) {
    method encryptString (line 35640) | encryptString(s) {
  class CipherTransformFactory (line 35666) | class CipherTransformFactory {
    method #createEncryptionKey20 (line 35668) | #createEncryptionKey20(revision, password, ownerPassword, ownerValidat...
    method #prepareKeyData (line 35683) | #prepareKeyData(fileId, password, ownerPassword, userPassword, flags, ...
    method #decodeUserPassword (line 35758) | #decodeUserPassword(password, ownerPassword, revision, keyLength) {
    method #buildObjectKey (line 35793) | #buildObjectKey(num, gen, encryptionKey, isAes = false) {
    method #buildCipherConstructor (line 35814) | #buildCipherConstructor(cf, name, num, gen, key) {
    method constructor (line 35843) | constructor(dict, fileId, password) {
    method createCipherTransform (line 35930) | createCipherTransform(num, gen) {
  function writeObject (line 35950) | async function writeObject(ref, obj, buffer, {
  function writeDict (line 35964) | async function writeDict(dict, buffer, transform) {
  function writeStream (line 35972) | async function writeStream(stream, buffer, transform) {
  function writeArray (line 36016) | async function writeArray(array, buffer, transform) {
  function writeValue (line 36029) | async function writeValue(value, buffer, transform) {
  function writeInt (line 36055) | function writeInt(number, size, offset, buffer) {
  function writeString (line 36062) | function writeString(string, offset, buffer) {
  function computeMD5 (line 36067) | function computeMD5(filesize, xrefInfo) {
  function writeXFADataForAcroform (line 36084) | function writeXFADataForAcroform(str, newRefs) {
  function updateAcroform (line 36116) | async function updateAcroform({
  function updateXFA (line 36149) | function updateXFA({
  function getXRefTable (line 36170) | async function getXRefTable(xrefInfo, baseOffset, newRefs, newXref, buff...
  function getIndexes (line 36194) | function getIndexes(newRefs) {
  function getXRefStreamTable (line 36207) | async function getXRefStreamTable(xrefInfo, baseOffset, newRefs, newXref...
  function computeIDs (line 36246) | function computeIDs(baseOffset, xrefInfo, newXref) {
  function getTrailerDict (line 36252) | function getTrailerDict(xrefInfo, newRefs, useXrefStream) {
  function incrementalUpdate (line 36277) | async function incrementalUpdate({
  constant MAX_DEPTH (line 36342) | const MAX_DEPTH = 40;
  class StructTreeRoot (line 36350) | class StructTreeRoot {
    method constructor (line 36351) | constructor(rootDict, rootRef) {
    method init (line 36357) | init() {
    method #addIdToPage (line 36360) | #addIdToPage(pageRef, id, type) {
    method addAnnotationIdToPage (line 36372) | addAnnotationIdToPage(pageRef, id) {
    method readRoleMap (line 36375) | readRoleMap() {
    method canCreateStructureTree (line 36387) | static async canCreateStructureTree({
    method createStructureTree (line 36424) | static async createStructureTree({
    method canUpdateStructTree (line 36467) | async canUpdateStructTree({
    method updateStructureTree (line 36534) | async updateStructureTree({
    method #writeKids (line 36588) | static async #writeKids({
    method #collectParents (line 36662) | static #collectParents({
    method #updateParentTag (line 36734) | static async #updateParentTag({
  class StructElementNode (line 36777) | class StructElementNode {
    method constructor (line 36778) | constructor(tree, dict) {
    method role (line 36784) | get role() {
    method parseKids (line 36795) | parseKids() {
    method parseKid (line 36816) | parseKid(pageObjId, kid) {
  class StructElement (line 36870) | class StructElement {
    method constructor (line 36871) | constructor({
  class StructTreePage (line 36886) | class StructTreePage {
    method constructor (line 36887) | constructor(structTreeRoot, pageDict) {
    method parse (line 36893) | parse(pageRef) {
    method addNode (line 36931) | addNode(dict, map, level = 0) {
    method addTopLevelNode (line 36964) | addTopLevelNode(dict, element) {
    method serializable (line 36989) | get serializable() {
  function isValidExplicitDest (line 37055) | function isValidExplicitDest(dest) {
  function fetchDest (line 37100) | function fetchDest(dest) {
  function fetchRemoteDest (line 37106) | function fetchRemoteDest(action) {
  class Catalog (line 37120) | class Catalog {
    method constructor (line 37121) | constructor(pdfManager, xref) {
    method cloneDict (line 37139) | cloneDict() {
    method version (line 37142) | get version() {
    method lang (line 37152) | get lang() {
    method needsRendering (line 37156) | get needsRendering() {
    method collection (line 37160) | get collection() {
    method acroForm (line 37175) | get acroForm() {
    method acroFormRef (line 37190) | get acroFormRef() {
    method metadata (line 37194) | get metadata() {
    method markInfo (line 37220) | get markInfo() {
    method _readMarkInfo (line 37232) | _readMarkInfo() {
    method structTreeRoot (line 37250) | get structTreeRoot() {
    method _readStructTreeRoot (line 37262) | _readStructTreeRoot() {
    method toplevelPagesDict (line 37272) | get toplevelPagesDict() {
    method documentOutline (line 37279) | get documentOutline() {
    method _readDocumentOutline (line 37291) | _readDocumentOutline() {
    method permissions (line 37374) | get permissions() {
    method _readPermissions (line 37386) | _readPermissions() {
    method optionalContentConfig (line 37405) | get optionalContentConfig() {
    method #readOptionalContentGroup (line 37439) | #readOptionalContentGroup(groupRef) {
    method #readOptionalContentConfig (line 37494) | #readOptionalContentConfig(config, contentGroupRefs) {
    method setActualNumPages (line 37578) | setActualNumPages(num = null) {
    method hasActualNumPages (line 37581) | get hasActualNumPages() {
    method _pagesCount (line 37584) | get _pagesCount() {
    method numPages (line 37591) | get numPages() {
    method destinations (line 37594) | get destinations() {
    method getDestination (line 37614) | getDestination(id) {
    method _readDests (line 37634) | _readDests() {
    method pageLabels (line 37643) | get pageLabels() {
    method _readPageLabels (line 37655) | _readPageLabels() {
    method pageLayout (line 37733) | get pageLayout() {
    method pageMode (line 37749) | get pageMode() {
    method viewerPreferences (line 37765) | get viewerPreferences() {
    method openAction (line 37883) | get openAction() {
    method attachments (line 37908) | get attachments() {
    method xfaImages (line 37923) | get xfaImages() {
    method _collectJavaScript (line 37937) | _collectJavaScript() {
    method jsActions (line 37970) | get jsActions() {
    method fontFallback (line 37985) | async fontFallback(id, handler) {
    method cleanup (line 37994) | async cleanup(manuallyTriggered = false) {
    method getPageDict (line 38011) | async getPageDict(pageIndex) {
    method getAllPageDicts (line 38100) | async getAllPageDicts(recoveryMode = false) {
    method getPageIndex (line 38198) | getPageIndex(pageRef) {
    method baseUrl (line 38272) | get baseUrl() {
    method parseDestDictionary (line 38287) | static parseDestDictionary({
  function mayHaveChildren (line 38476) | function mayHaveChildren(value) {
  function addChildren (line 38479) | function addChildren(node, nodesToVisit) {
  class ObjectLoader (line 38493) | class ObjectLoader {
    method constructor (line 38494) | constructor(dict, keys, xref) {
    method load (line 38500) | async load() {
    method _walk (line 38518) | async _walk(nodesToVisit) {
  function stripQuotes (line 38726) | function stripQuotes(str) {
  function getInteger (line 38732) | function getInteger({
  function getFloat (line 38747) | function getFloat({
  function getKeyword (line 38762) | function getKeyword({
  function getStringOption (line 38776) | function getStringOption(data, options) {
  function getMeasurement (line 38783) | function getMeasurement(str, def = "0") {
  function getRatio (line 38806) | function getRatio(data) {
  function getRelevant (line 38829) | function getRelevant(data) {
  function getColor (line 38838) | function getColor(data, def = [0, 0, 0]) {
  function getBBox (line 38862) | function getBBox(data) {
  class HTMLResult (line 38889) | class HTMLResult {
    method FAILURE (line 38890) | static get FAILURE() {
    method EMPTY (line 38893) | static get EMPTY() {
    method constructor (line 38896) | constructor(success, html, bbox, breakNode) {
    method isBreak (line 38902) | isBreak() {
    method breakNode (line 38905) | static breakNode(node) {
    method success (line 38908) | static success(html, bbox = null) {
  class FontFinder (line 38917) | class FontFinder {
    method constructor (line 38918) | constructor(pdfFonts) {
    method add (line 38925) | add(pdfFonts, reallyMissingFonts = null) {
    method addPdfFont (line 38942) | addPdfFont(pdfFont) {
    method getDefault (line 38973) | getDefault() {
    method find (line 38976) | find(fontName, mustWarn = true) {
  function selectFont (line 39031) | function selectFont(xfaFont, typeface) {
  function fonts_getMetrics (line 39042) | function fonts_getMetrics(x
Condensed preview — 387 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (9,617K chars).
[
  {
    "path": ".babelrc",
    "chars": 195,
    "preview": "{\n  \"presets\": [\n    [\"@babel/preset-env\"],\n    [\"@babel/preset-typescript\"],\n    [\n      \"@babel/preset-react\",\n      {"
  },
  {
    "path": ".eslintignore",
    "chars": 41,
    "preview": "examples\nexamples/**/*/\nnode_modules/**/*"
  },
  {
    "path": ".eslintrc",
    "chars": 1130,
    "preview": "{\n    \"extends\": [\"eslint:recommended\", \"plugin:@typescript-eslint/recommended\", \"plugin:react/recommended\", \"plugin:rea"
  },
  {
    "path": ".gitignore",
    "chars": 353,
    "preview": "# See http://help.github.com/ignore-files/ for more about ignoring files.\n\n# Mac OS X\n.DS_Store\n._.*\n._*\n\n# Ignore local"
  },
  {
    "path": ".prettierrc",
    "chars": 191,
    "preview": "{\n    \"singleQuote\": true,\n    \"semi\": false,\n    \"trailingComma\": \"none\",\n    \"tabWidth\": 4,\n    \"useTabs\": false,\n    "
  },
  {
    "path": "LICENSE",
    "chars": 11357,
    "preview": "                                 Apache License\n                           Version 2.0, January 2004\n                   "
  },
  {
    "path": "README.md",
    "chars": 8741,
    "preview": "⚠️ **Part of the InkLayer ecosystem**\n\nThis repository contains the low-level reference implementation used by InkLayer."
  },
  {
    "path": "README_CN.md",
    "chars": 4871,
    "preview": "⚠️ **InkLayer 生态项目**\n\n本仓库为 InkLayer 的底层参考实现,包含核心批注模型、坐标体系及导出逻辑。\n\n👉 **主入口仓库:** https://github.com/Laomai-codefee/inklayer"
  },
  {
    "path": "configuration/environment.js",
    "chars": 348,
    "preview": "const path = require('path');\nconst { output } = require('../webpack.config');\n\nmodule.exports = {\n  paths: {\n    /* Pat"
  },
  {
    "path": "configuration/webpack.dev.config.js",
    "chars": 538,
    "preview": "/* eslint-disable import/no-extraneous-dependencies */\nconst { merge } = require('webpack-merge');\n\nconst webpackConfigu"
  },
  {
    "path": "configuration/webpack.prod.config.js",
    "chars": 1458,
    "preview": "/* eslint-disable import/no-extraneous-dependencies */\nconst { merge } = require('webpack-merge');\nconst CssMinimizerPlu"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/LICENSE",
    "chars": 10174,
    "preview": "\n                                 Apache License\n                           Version 2.0, January 2004\n                  "
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/build/pdf.mjs",
    "chars": 602302,
    "preview": "/**\n * @licstart The following is the entire license notice for the\n * JavaScript code in this page\n *\n * Copyright 2023"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/build/pdf.sandbox.mjs",
    "chars": 725436,
    "preview": "/**\n * @licstart The following is the entire license notice for the\n * JavaScript code in this page\n *\n * Copyright 2023"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/build/pdf.worker.mjs",
    "chars": 2163372,
    "preview": "/**\n * @licstart The following is the entire license notice for the\n * JavaScript code in this page\n *\n * Copyright 2023"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/pdfjs-annotation-extension-testdata.json",
    "chars": 58837,
    "preview": "[\n    {\n        \"id\": \"iPDnx-jvqNFookcstk8i7\",\n        \"pageNumber\": 1,\n        \"konvaString\": \"{\\\"attrs\\\":{\\\"name\\\":\\\"P"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/cmaps/CNS2-V.bcmap",
    "chars": 91,
    "preview": "\u0003RCopyright 1990-2009 Adobe Systems Incorporated.\nAll rights reserved.\nSee ./LICENSE\u0006CNS2-H"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/cmaps/ETenms-B5-H.bcmap",
    "chars": 99,
    "preview": "\u0002RCopyright 1990-2009 Adobe Systems Incorporated.\nAll rights reserved.\nSee ./LICENSE\tETen-B5-H`\u0001 ^\u0001"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/cmaps/GB-H.bcmap",
    "chars": 356,
    "preview": "\u0002RCopyright 1990-2009 Adobe Systems Incorporated.\nAll rights reserved.\nSee ./LICENSE\u0001\u0001!!]aX!!]`21>\u0002\tp\u0002\u000bz$]\u0006\"Rd-U7*\u0017\r\b4%+"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/cmaps/LICENSE",
    "chars": 2080,
    "preview": "%%Copyright: -----------------------------------------------------------\n%%Copyright: Copyright 1990-2009 Adobe Systems "
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/debugger.css",
    "chars": 2421,
    "preview": "/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may no"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/debugger.mjs",
    "chars": 18003,
    "preview": "/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may no"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/ach/viewer.ftl",
    "chars": 7971,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/af/viewer.ftl",
    "chars": 7347,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/an/viewer.ftl",
    "chars": 10084,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/ar/viewer.ftl",
    "chars": 15149,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/ast/viewer.ftl",
    "chars": 7209,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/az/viewer.ftl",
    "chars": 9685,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/be/viewer.ftl",
    "chars": 16022,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/bg/viewer.ftl",
    "chars": 15524,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/bn/viewer.ftl",
    "chars": 9188,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/bo/viewer.ftl",
    "chars": 9018,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/br/viewer.ftl",
    "chars": 12020,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/brx/viewer.ftl",
    "chars": 7883,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/bs/viewer.ftl",
    "chars": 8227,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/ca/viewer.ftl",
    "chars": 11617,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/cak/viewer.ftl",
    "chars": 11396,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/ckb/viewer.ftl",
    "chars": 8964,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/cs/viewer.ftl",
    "chars": 15803,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/cy/viewer.ftl",
    "chars": 16023,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/da/viewer.ftl",
    "chars": 15558,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/de/viewer.ftl",
    "chars": 16118,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/dsb/viewer.ftl",
    "chars": 16027,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/el/viewer.ftl",
    "chars": 16272,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/en-CA/viewer.ftl",
    "chars": 15194,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/en-GB/viewer.ftl",
    "chars": 15190,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/en-US/viewer.ftl",
    "chars": 14899,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/eo/viewer.ftl",
    "chars": 15439,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/es-AR/viewer.ftl",
    "chars": 15986,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/es-CL/viewer.ftl",
    "chars": 16148,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/es-ES/viewer.ftl",
    "chars": 16140,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/es-MX/viewer.ftl",
    "chars": 11559,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/et/viewer.ftl",
    "chars": 10163,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/eu/viewer.ftl",
    "chars": 15991,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/fa/viewer.ftl",
    "chars": 8746,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/ff/viewer.ftl",
    "chars": 9108,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/fi/viewer.ftl",
    "chars": 15668,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/fr/viewer.ftl",
    "chars": 16268,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/fur/viewer.ftl",
    "chars": 16051,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/fy-NL/viewer.ftl",
    "chars": 15692,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/ga-IE/viewer.ftl",
    "chars": 7691,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/gd/viewer.ftl",
    "chars": 11949,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/gl/viewer.ftl",
    "chars": 14652,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/gn/viewer.ftl",
    "chars": 15900,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/gu-IN/viewer.ftl",
    "chars": 9131,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/he/viewer.ftl",
    "chars": 14823,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/hi-IN/viewer.ftl",
    "chars": 9422,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/hr/viewer.ftl",
    "chars": 10739,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/hsb/viewer.ftl",
    "chars": 16061,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/hu/viewer.ftl",
    "chars": 15662,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/hy-AM/viewer.ftl",
    "chars": 10087,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/hye/viewer.ftl",
    "chars": 10343,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/ia/viewer.ftl",
    "chars": 15769,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/id/viewer.ftl",
    "chars": 11041,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/is/viewer.ftl",
    "chars": 15395,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/it/viewer.ftl",
    "chars": 15968,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/ja/viewer.ftl",
    "chars": 13566,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/ka/viewer.ftl",
    "chars": 15084,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/kab/viewer.ftl",
    "chars": 12852,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/kk/viewer.ftl",
    "chars": 15860,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/km/viewer.ftl",
    "chars": 8112,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/kn/viewer.ftl",
    "chars": 7565,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/ko/viewer.ftl",
    "chars": 13516,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/lij/viewer.ftl",
    "chars": 9401,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/lo/viewer.ftl",
    "chars": 10931,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/locale.json",
    "chars": 2498,
    "preview": "{\"ach\":\"ach/viewer.ftl\",\"af\":\"af/viewer.ftl\",\"an\":\"an/viewer.ftl\",\"ar\":\"ar/viewer.ftl\",\"ast\":\"ast/viewer.ftl\",\"az\":\"az/v"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/lt/viewer.ftl",
    "chars": 10454,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/ltg/viewer.ftl",
    "chars": 9165,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/lv/viewer.ftl",
    "chars": 9192,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/meh/viewer.ftl",
    "chars": 2251,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/mk/viewer.ftl",
    "chars": 8033,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/mr/viewer.ftl",
    "chars": 8784,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/ms/viewer.ftl",
    "chars": 9182,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/my/viewer.ftl",
    "chars": 7224,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/nb-NO/viewer.ftl",
    "chars": 15211,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/ne-NP/viewer.ftl",
    "chars": 8550,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/nl/viewer.ftl",
    "chars": 15986,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/nn-NO/viewer.ftl",
    "chars": 13589,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/oc/viewer.ftl",
    "chars": 13740,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/pa-IN/viewer.ftl",
    "chars": 14819,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/pl/viewer.ftl",
    "chars": 16048,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/pt-BR/viewer.ftl",
    "chars": 15613,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/pt-PT/viewer.ftl",
    "chars": 16028,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/rm/viewer.ftl",
    "chars": 16069,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/ro/viewer.ftl",
    "chars": 9693,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/ru/viewer.ftl",
    "chars": 16132,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/sat/viewer.ftl",
    "chars": 11919,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/sc/viewer.ftl",
    "chars": 11467,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/scn/viewer.ftl",
    "chars": 1587,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/sco/viewer.ftl",
    "chars": 9764,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/si/viewer.ftl",
    "chars": 9064,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/sk/viewer.ftl",
    "chars": 16025,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/skr/viewer.ftl",
    "chars": 15101,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/sl/viewer.ftl",
    "chars": 15416,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/son/viewer.ftl",
    "chars": 6987,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/sq/viewer.ftl",
    "chars": 15283,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/sr/viewer.ftl",
    "chars": 11419,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/sv-SE/viewer.ftl",
    "chars": 15416,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/szl/viewer.ftl",
    "chars": 9753,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/ta/viewer.ftl",
    "chars": 8318,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/te/viewer.ftl",
    "chars": 8767,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/tg/viewer.ftl",
    "chars": 15989,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/th/viewer.ftl",
    "chars": 14876,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/tl/viewer.ftl",
    "chars": 9999,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/tr/viewer.ftl",
    "chars": 15272,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/trs/viewer.ftl",
    "chars": 7056,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/uk/viewer.ftl",
    "chars": 15733,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/ur/viewer.ftl",
    "chars": 8971,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/uz/viewer.ftl",
    "chars": 6520,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/vi/viewer.ftl",
    "chars": 15371,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/wo/viewer.ftl",
    "chars": 3474,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/xh/viewer.ftl",
    "chars": 7766,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/zh-CN/viewer.ftl",
    "chars": 12689,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/locale/zh-TW/viewer.ftl",
    "chars": 12997,
    "preview": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not di"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/pdfjs-annotation-extension/pdfjs-annotation-extension.js",
    "chars": 3110011,
    "preview": "/*! For license information please see pdfjs-annotation-extension.js.LICENSE.txt */\n!function(e,t){\"object\"==typeof expo"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/standard_fonts/LICENSE_FOXIT",
    "chars": 1553,
    "preview": "// Copyright 2014 PDFium Authors. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/standard_fonts/LICENSE_LIBERATION",
    "chars": 4414,
    "preview": "Digitized data copyright (c) 2010 Google Corporation\n\twith Reserved Font Arimo, Tinos and Cousine.\nCopyright (c) 2012 Re"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/viewer.css",
    "chars": 120721,
    "preview": "/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may no"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/viewer.html",
    "chars": 31962,
    "preview": "<!DOCTYPE html>\n<!--\nCopyright 2012 Mozilla Foundation\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\n"
  },
  {
    "path": "examples/pdfjs-4.3.136-dist/web/viewer.mjs",
    "chars": 447014,
    "preview": "/**\n * @licstart The following is the entire license notice for the\n * JavaScript code in this page\n *\n * Copyright 2023"
  },
  {
    "path": "package.json",
    "chars": 2329,
    "preview": "{\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.17.9\",\n    \"@babel/preset-env\": \"^7.16.0\",\n    \"@babel/preset-react\": \"^"
  },
  {
    "path": "src/annot/index.ts",
    "chars": 9991,
    "preview": "import { PDFDocument, PDFName, PDFPage } from 'pdf-lib'\nimport { PDFViewerApplication } from 'pdfjs'\nimport { annotation"
  },
  {
    "path": "src/annot/parse.ts",
    "chars": 830,
    "preview": "import { PDFArray, PDFDocument, PDFName, PDFPage, PDFRef } from \"pdf-lib\"\nimport { IAnnotationStore } from \"../const/def"
  },
  {
    "path": "src/annot/parse_circle.ts",
    "chars": 1978,
    "preview": "import { AnnotationParser } from './parse'\nimport { PDFHexString, PDFName, PDFString } from 'pdf-lib'\nimport { convertKo"
  },
  {
    "path": "src/annot/parse_freetext.ts",
    "chars": 2418,
    "preview": "import { PDFHexString, PDFName, PDFString, PDFNumber } from 'pdf-lib'\nimport { AnnotationParser } from './parse'\nimport "
  },
  {
    "path": "src/annot/parse_highlight.ts",
    "chars": 2627,
    "preview": "import { AnnotationParser } from './parse'\nimport { PDFHexString, PDFName, PDFString } from 'pdf-lib'\nimport { convertKo"
  },
  {
    "path": "src/annot/parse_ink.ts",
    "chars": 3435,
    "preview": "import { AnnotationParser } from './parse'\nimport { PDFHexString, PDFName, PDFString, PDFNumber } from 'pdf-lib'\nimport "
  },
  {
    "path": "src/annot/parse_line.ts",
    "chars": 3489,
    "preview": "import { AnnotationParser } from './parse'\nimport { PDFHexString, PDFName, PDFString, PDFNumber } from 'pdf-lib'\nimport "
  },
  {
    "path": "src/annot/parse_polyline.ts",
    "chars": 4458,
    "preview": "import { AnnotationParser } from './parse'\nimport { PDFHexString, PDFName, PDFString, PDFNumber } from 'pdf-lib'\nimport "
  },
  {
    "path": "src/annot/parse_square.ts",
    "chars": 2013,
    "preview": "import { AnnotationParser } from './parse'\nimport { PDFHexString, PDFName, PDFString } from 'pdf-lib'\nimport { convertKo"
  },
  {
    "path": "src/annot/parse_stamp.ts",
    "chars": 4006,
    "preview": "import { PDFHexString, PDFName, PDFString, PDFNumber, PDFRawStream } from 'pdf-lib'\nimport { AnnotationParser } from './"
  },
  {
    "path": "src/annot/parse_strikeout.ts",
    "chars": 2480,
    "preview": "import { AnnotationParser } from './parse'\nimport { PDFHexString, PDFName, PDFString } from 'pdf-lib'\nimport { convertKo"
  },
  {
    "path": "src/annot/parse_text.ts",
    "chars": 1890,
    "preview": "import { PDFHexString, PDFName, PDFString } from 'pdf-lib'\nimport { AnnotationParser } from './parse'\nimport { convertKo"
  },
  {
    "path": "src/annot/parse_underline.ts",
    "chars": 2482,
    "preview": "import { AnnotationParser } from './parse'\nimport { PDFHexString, PDFName, PDFString } from 'pdf-lib'\nimport { convertKo"
  },
  {
    "path": "src/components/comment/index.scss",
    "chars": 3712,
    "preview": ".PdfjsAnnotationExtension_Comment_hidden {\n    .CustomComment {\n        display: none;\n    }\n}\n.CustomComment_filterCont"
  },
  {
    "path": "src/components/comment/index.tsx",
    "chars": 26787,
    "preview": "import './index.scss'\nimport React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState"
  },
  {
    "path": "src/components/menu/index.scss",
    "chars": 3015,
    "preview": ".CustomAnnotationMenu {\n    position: absolute;\n    top: 0;\n    left: 0;\n    z-index: 999;\n    display: none;\n    width:"
  },
  {
    "path": "src/components/menu/index.tsx",
    "chars": 9529,
    "preview": "import './index.scss'\n\nimport { computePosition, flip } from '@floating-ui/dom'\nimport React, { forwardRef, useImperativ"
  },
  {
    "path": "src/components/popbar/index.scss",
    "chars": 1337,
    "preview": ".CustomPopbar {\n    position: absolute;\n    top: 0;\n    left: 0;\n    z-index: 999;\n    display: none;\n    width: max-con"
  },
  {
    "path": "src/components/popbar/index.tsx",
    "chars": 3162,
    "preview": "import './index.scss'\n\nimport { computePosition, flip } from '@floating-ui/dom'\nimport React, { forwardRef, useImperativ"
  },
  {
    "path": "src/components/toolbar/index.scss",
    "chars": 8371,
    "preview": ".PdfjsAnnotationExtension_Comment_hidden {\n    .CustomToolbar::after {\n        display: none;\n    }\n}\n.CustomToolbar {\n "
  },
  {
    "path": "src/components/toolbar/index.tsx",
    "chars": 10018,
    "preview": "import './index.scss'\nimport { Button, ColorPicker, message, Popover, Space } from 'antd'\nimport React, { forwardRef, us"
  },
  {
    "path": "src/components/toolbar/signature.tsx",
    "chars": 17391,
    "preview": "import './index.scss'\nimport { Button, Modal, Popover, Radio, Select } from 'antd'\nimport type { UploadChangeParam } fro"
  },
  {
    "path": "src/components/toolbar/stamp.tsx",
    "chars": 24983,
    "preview": "import './index.scss'\nimport { Button, Checkbox, Col, ColorPicker, Divider, Form, Input, Modal, Popover, Radio, Row, Sel"
  },
  {
    "path": "src/const/default_options.ts",
    "chars": 3782,
    "preview": "import { default_stamp } from './default_stamp'\nimport PingFangChangAnTiFont from './fonts/PingFangChangAnTi-2.ttf'\nimpo"
  },
  {
    "path": "src/const/default_stamp.ts",
    "chars": 91129,
    "preview": "const default_stamp = [\n            // 默认的一些章\n            'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASUAAAEACAYAAAD"
  },
  {
    "path": "src/const/definitions.tsx",
    "chars": 12049,
    "preview": "import {\n    CircleIcon,\n    FreehandIcon,\n    FreeHighlightIcon,\n    FreetextIcon,\n    HighlightIcon,\n    RectangleIcon"
  },
  {
    "path": "src/const/icon.tsx",
    "chars": 20136,
    "preview": "import Icon from '@ant-design/icons'\nimport type { GetProps } from 'antd'\nimport React from 'react'\n\ntype CustomIconComp"
  },
  {
    "path": "src/const/pdfjs.d.ts",
    "chars": 6280,
    "preview": "declare module 'pdfjs' {\n    interface PDFViewerApplication {\n        appConfig: AppConfig\n        page: number\n        "
  },
  {
    "path": "src/index.tsx",
    "chars": 20244,
    "preview": "import './scss/app.scss'\n\nimport { EventBus, PDFPageView, PDFViewerApplication } from 'pdfjs'\nimport { createRef } from "
  },
  {
    "path": "src/locale/de-de.json",
    "chars": 4106,
    "preview": "{\n    \"anno\": \"Kommentare\",\n    \"annotations\": {\n        \"select\": \"Auswählen\",\n        \"highlight\": \"Hervorheben\",\n    "
  },
  {
    "path": "src/locale/en-us.json",
    "chars": 3949,
    "preview": "{\n    \"anno\": \"Comment\",\n    \"annotations\": {\n        \"select\": \"Select\",\n        \"highlight\": \"Highlight\",\n        \"str"
  },
  {
    "path": "src/locale/index.ts",
    "chars": 958,
    "preview": "import i18n from 'i18next'\nimport { initReactI18next } from 'react-i18next'\n\nimport zh from './zh-cn.json'\nimport en fro"
  },
  {
    "path": "src/locale/zh-cn.json",
    "chars": 3363,
    "preview": "{\n    \"anno\": \"批注\",\n    \"annotations\": {\n        \"select\": \"选择\",\n        \"highlight\": \"高亮\",\n        \"strikeout\": \"删除线\",\n"
  },
  {
    "path": "src/painter/connectorLine.ts",
    "chars": 7054,
    "preview": "import { IRect } from 'konva/lib/types'\nimport { IAnnotationStore } from '../const/definitions'\nimport { PAINTER_WRAPPER"
  },
  {
    "path": "src/painter/const.ts",
    "chars": 684,
    "preview": "/**\n * 常量:PdfjsAnnotationExtension 的样式前缀\n */\nconst STYLE_PREFIX = 'PdfjsAnnotationExtension'\n\n/**\n * 常量:Painter 组件的包裹器样式"
  },
  {
    "path": "src/painter/editor/editor.ts",
    "chars": 13473,
    "preview": "import Konva from 'konva'\nimport { KonvaEventObject } from 'konva/lib/Node'\nimport { PDFViewerApplication } from 'pdfjs'"
  },
  {
    "path": "src/painter/editor/editor_arrow.ts",
    "chars": 4889,
    "preview": "import Konva from 'konva'\nimport { KonvaEventObject } from 'konva/lib/Node'\n\nimport { AnnotationType, IAnnotationStore, "
  },
  {
    "path": "src/painter/editor/editor_circle.ts",
    "chars": 5370,
    "preview": "import Konva from 'konva'\nimport { KonvaEventObject } from 'konva/lib/Node'\n\nimport { AnnotationType, IAnnotationStore, "
  },
  {
    "path": "src/painter/editor/editor_cloud.ts",
    "chars": 8948,
    "preview": "import Konva from 'konva'\nimport { KonvaEventObject } from 'konva/lib/Node'\nimport { AnnotationType, IAnnotationStore, I"
  },
  {
    "path": "src/painter/editor/editor_free_hand.ts",
    "chars": 5400,
    "preview": "import Konva from 'konva'\nimport { KonvaEventObject } from 'konva/lib/Node'\n\nimport { AnnotationType, IAnnotationStore, "
  },
  {
    "path": "src/painter/editor/editor_free_highlight.ts",
    "chars": 6196,
    "preview": "import Konva from 'konva'\nimport { KonvaEventObject } from 'konva/lib/Node'\n\nimport { AnnotationType, IAnnotationStore, "
  },
  {
    "path": "src/painter/editor/editor_free_text.scss",
    "chars": 881,
    "preview": ".EditorFreeText-Modal {\n    margin: 0 auto;\n    &-Toolbar {\n        border-top: 0;\n        display: flex;\n        justif"
  },
  {
    "path": "src/painter/editor/editor_free_text.tsx",
    "chars": 8981,
    "preview": "import Konva from 'konva'\nimport { KonvaEventObject } from 'konva/lib/Node'\n\nimport { AnnotationType, IAnnotationStore, "
  },
  {
    "path": "src/painter/editor/editor_highlight.ts",
    "chars": 7467,
    "preview": "import Konva from 'konva'\n\nimport { AnnotationType, IAnnotationStore, IAnnotationStyle } from '../../const/definitions'\n"
  },
  {
    "path": "src/painter/editor/editor_note.ts",
    "chars": 1286,
    "preview": "import { KonvaEventObject } from 'konva/lib/Node'\nimport { AnnotationType, IAnnotationStore, IAnnotationStyle } from '.."
  },
  {
    "path": "src/painter/editor/editor_rectangle.ts",
    "chars": 5114,
    "preview": "import Konva from 'konva'\nimport { KonvaEventObject } from 'konva/lib/Node'\n\nimport { AnnotationType, IAnnotationStore, "
  },
  {
    "path": "src/painter/editor/editor_signature.ts",
    "chars": 5847,
    "preview": "import Konva from 'konva'\nimport { KonvaEventObject } from 'konva/lib/Node'\n\nimport { AnnotationType, IAnnotationType } "
  },
  {
    "path": "src/painter/editor/editor_stamp.tsx",
    "chars": 5969,
    "preview": "import Konva from 'konva'\nimport { KonvaEventObject } from 'konva/lib/Node'\n\nimport { AnnotationType, IAnnotationType } "
  },
  {
    "path": "src/painter/editor/selector.tsx",
    "chars": 16504,
    "preview": "import Konva from 'konva'\n\nimport { IAnnotationStore } from '../../const/definitions'\nimport { SELECTOR_HOVER_STYLE, SHA"
  },
  {
    "path": "src/painter/index.scss",
    "chars": 1635,
    "preview": ".PdfjsAnnotationExtension_painter_wrapper {\n    position: absolute;\n    text-align: initial;\n    top: 0;\n    inset: 0;\n "
  },
  {
    "path": "src/painter/index.ts",
    "chars": 29413,
    "preview": "import './index.scss' // 导入画笔样式文件\n\nimport Konva from 'konva'\nimport { EventBus, PageViewport, PDFPageView, PDFViewerAppl"
  },
  {
    "path": "src/painter/store.ts",
    "chars": 2477,
    "preview": "import { PDFViewerApplication } from 'pdfjs'\n\nimport { IAnnotationStore } from '../const/definitions'\nimport { formatTim"
  },
  {
    "path": "src/painter/transform/decoder.ts",
    "chars": 3039,
    "preview": "import { Annotation, PDFViewerApplication, QuadPoint } from 'pdfjs'\nimport { IAnnotationComment, IAnnotationStore, Pdfjs"
  },
  {
    "path": "src/painter/transform/decoder_circle.ts",
    "chars": 2283,
    "preview": "import { Annotation, CircleAnnotation } from 'pdfjs'\nimport { Decoder } from './decoder'\nimport Konva from 'konva'\nimpor"
  },
  {
    "path": "src/painter/transform/decoder_free_text.ts",
    "chars": 2129,
    "preview": "import { Annotation, FreeTextAnnotation } from 'pdfjs'\nimport { Decoder } from './decoder'\nimport Konva from 'konva'\nimp"
  },
  {
    "path": "src/painter/transform/decoder_highlight.ts",
    "chars": 4493,
    "preview": "import { Annotation, HighlightAnnotation, QuadPoint, StrikeOutAnnotation, UnderlineAnnotation } from 'pdfjs'\nimport { De"
  },
  {
    "path": "src/painter/transform/decoder_ink.ts",
    "chars": 2504,
    "preview": "import { Annotation, InkAnnotation } from 'pdfjs'\nimport { Decoder } from './decoder'\nimport Konva from 'konva'\nimport {"
  },
  {
    "path": "src/painter/transform/decoder_line.ts",
    "chars": 2441,
    "preview": "import { Annotation, LineAnnotation } from 'pdfjs'\nimport { Decoder } from './decoder'\nimport Konva from 'konva'\nimport "
  },
  {
    "path": "src/painter/transform/decoder_polygon.ts",
    "chars": 2513,
    "preview": "import { Annotation, PolygonAnnotation, Vertices } from 'pdfjs'\nimport { Decoder } from './decoder'\nimport Konva from 'k"
  }
]

// ... and 187 more files (download for full content)

About this extraction

This page contains the full source code of the Laomai-codefee/pdfjs-annotation-extension GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 387 files (8.8 MB), approximately 2.3M tokens, and a symbol index with 10458 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!