canvasMaxAreaInBytes in DocumentInitParameters has type Boolean, preventing TypeScript users from passing the correct (numeric) value.
StatTimer,
} from "./display_utils.js";
import { FontFaceObject, FontLoader } from "./font_loader.js";
import { CanvasGraphics } from "./canvas.js";
import { GlobalWorkerOptions } from "./worker_options.js";
import { isNodeJS } from "../shared/is_node.js";
import { MessageHandler } from "../shared/message_handler.js";
import { Metadata } from "./metadata.js";
import { OptionalContentConfig } from "./optional_content_config.js";
import { PDFDataTransportStream } from "./transport_stream.js";
import { XfaText } from "./xfa_text.js";
const DEFAULT_RANGE_CHUNK_SIZE = 65536; 
const RENDERING_CANCELLED_TIMEOUT = 100; 
const DELAYED_CLEANUP_TIMEOUT = 5000; 
let DefaultCanvasFactory = DOMCanvasFactory;
let DefaultCMapReaderFactory = DOMCMapReaderFactory;
let DefaultFilterFactory = DOMFilterFactory;
let DefaultStandardFontDataFactory = DOMStandardFontDataFactory;
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("GENERIC") && isNodeJS) {
  const {
    NodeCanvasFactory,
    NodeCMapReaderFactory,
    NodeFilterFactory,
    NodeStandardFontDataFactory,
  } = require("./node_utils.js");
  DefaultCanvasFactory = NodeCanvasFactory;
  DefaultCMapReaderFactory = NodeCMapReaderFactory;
  DefaultFilterFactory = NodeFilterFactory;
  DefaultStandardFontDataFactory = NodeStandardFontDataFactory;
}