{"ast":null,"code":"'use client';\n\nvar __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\nimport React, { useEffect, useMemo, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport makeCancellable from 'make-cancellable-promise';\nimport makeEventProps from 'make-event-props';\nimport clsx from 'clsx';\nimport mergeRefs from 'merge-refs';\nimport invariant from 'tiny-invariant';\nimport warning from 'warning';\nimport PageContext from './PageContext.js';\nimport Message from './Message.js';\nimport PageCanvas from './Page/PageCanvas.js';\nimport PageSVG from './Page/PageSVG.js';\nimport TextLayer from './Page/TextLayer.js';\nimport AnnotationLayer from './Page/AnnotationLayer.js';\nimport { cancelRunningTask, isProvided, makePageCallback } from './shared/utils.js';\nimport useDocumentContext from './shared/hooks/useDocumentContext.js';\nimport useResolver from './shared/hooks/useResolver.js';\nimport { eventProps, isClassName, isPageIndex, isPageNumber, isPdf, isRef, isRenderMode, isRotate } from './shared/propTypes.js';\nconst defaultScale = 1;\n/**\n * Displays a page.\n *\n * Should be placed inside `<Document />`. Alternatively, it can have `pdf` prop passed, which can be obtained from `<Document />`'s `onLoadSuccess` callback function, however some advanced functions like linking between pages inside a document may not be working correctly.\n */\nconst Page = function Page(props) {\n  const documentContext = useDocumentContext();\n  const mergedProps = Object.assign(Object.assign({}, documentContext), props);\n  const {\n      _className = 'react-pdf__Page',\n      _enableRegisterUnregisterPage = true,\n      canvasBackground,\n      canvasRef,\n      children,\n      className,\n      customRenderer: CustomRenderer,\n      customTextRenderer,\n      devicePixelRatio,\n      error = 'Failed to load the page.',\n      height,\n      inputRef,\n      loading = 'Loading page…',\n      noData = 'No page specified.',\n      onGetAnnotationsError: onGetAnnotationsErrorProps,\n      onGetAnnotationsSuccess: onGetAnnotationsSuccessProps,\n      onGetStructTreeError: onGetStructTreeErrorProps,\n      onGetStructTreeSuccess: onGetStructTreeSuccessProps,\n      onGetTextError: onGetTextErrorProps,\n      onGetTextSuccess: onGetTextSuccessProps,\n      onLoadError: onLoadErrorProps,\n      onLoadSuccess: onLoadSuccessProps,\n      onRenderAnnotationLayerError: onRenderAnnotationLayerErrorProps,\n      onRenderAnnotationLayerSuccess: onRenderAnnotationLayerSuccessProps,\n      onRenderError: onRenderErrorProps,\n      onRenderSuccess: onRenderSuccessProps,\n      onRenderTextLayerError: onRenderTextLayerErrorProps,\n      onRenderTextLayerSuccess: onRenderTextLayerSuccessProps,\n      pageIndex: pageIndexProps,\n      pageNumber: pageNumberProps,\n      pdf,\n      registerPage,\n      renderAnnotationLayer: renderAnnotationLayerProps = true,\n      renderForms = false,\n      renderMode = 'canvas',\n      renderTextLayer: renderTextLayerProps = true,\n      rotate: rotateProps,\n      scale: scaleProps = defaultScale,\n      unregisterPage,\n      width\n    } = mergedProps,\n    otherProps = __rest(mergedProps, [\"_className\", \"_enableRegisterUnregisterPage\", \"canvasBackground\", \"canvasRef\", \"children\", \"className\", \"customRenderer\", \"customTextRenderer\", \"devicePixelRatio\", \"error\", \"height\", \"inputRef\", \"loading\", \"noData\", \"onGetAnnotationsError\", \"onGetAnnotationsSuccess\", \"onGetStructTreeError\", \"onGetStructTreeSuccess\", \"onGetTextError\", \"onGetTextSuccess\", \"onLoadError\", \"onLoadSuccess\", \"onRenderAnnotationLayerError\", \"onRenderAnnotationLayerSuccess\", \"onRenderError\", \"onRenderSuccess\", \"onRenderTextLayerError\", \"onRenderTextLayerSuccess\", \"pageIndex\", \"pageNumber\", \"pdf\", \"registerPage\", \"renderAnnotationLayer\", \"renderForms\", \"renderMode\", \"renderTextLayer\", \"rotate\", \"scale\", \"unregisterPage\", \"width\"]);\n  const [pageState, pageDispatch] = useResolver();\n  const {\n    value: page,\n    error: pageError\n  } = pageState;\n  const pageElement = useRef(null);\n  invariant(pdf, 'Attempted to load a page, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop.');\n  const pageIndex = isProvided(pageNumberProps) ? pageNumberProps - 1 : pageIndexProps !== null && pageIndexProps !== void 0 ? pageIndexProps : null;\n  const pageNumber = pageNumberProps !== null && pageNumberProps !== void 0 ? pageNumberProps : isProvided(pageIndexProps) ? pageIndexProps + 1 : null;\n  const rotate = rotateProps !== null && rotateProps !== void 0 ? rotateProps : page ? page.rotate : null;\n  const scale = useMemo(() => {\n    if (!page) {\n      return null;\n    }\n    // Be default, we'll render page at 100% * scale width.\n    let pageScale = 1;\n    // Passing scale explicitly null would cause the page not to render\n    const scaleWithDefault = scaleProps !== null && scaleProps !== void 0 ? scaleProps : defaultScale;\n    // If width/height is defined, calculate the scale of the page so it could be of desired width.\n    if (width || height) {\n      const viewport = page.getViewport({\n        scale: 1,\n        rotation: rotate\n      });\n      if (width) {\n        pageScale = width / viewport.width;\n      } else if (height) {\n        pageScale = height / viewport.height;\n      }\n    }\n    return scaleWithDefault * pageScale;\n  }, [height, page, rotate, scaleProps, width]);\n  function hook() {\n    return () => {\n      if (!isProvided(pageIndex)) {\n        // Impossible, but TypeScript doesn't know that\n        return;\n      }\n      if (_enableRegisterUnregisterPage && unregisterPage) {\n        unregisterPage(pageIndex);\n      }\n    };\n  }\n  useEffect(hook, [_enableRegisterUnregisterPage, pdf, pageIndex, unregisterPage]);\n  /**\n   * Called when a page is loaded successfully\n   */\n  function onLoadSuccess() {\n    if (onLoadSuccessProps) {\n      if (!page || !scale) {\n        // Impossible, but TypeScript doesn't know that\n        return;\n      }\n      onLoadSuccessProps(makePageCallback(page, scale));\n    }\n    if (_enableRegisterUnregisterPage && registerPage) {\n      if (!isProvided(pageIndex) || !pageElement.current) {\n        // Impossible, but TypeScript doesn't know that\n        return;\n      }\n      registerPage(pageIndex, pageElement.current);\n    }\n  }\n  /**\n   * Called when a page failed to load\n   */\n  function onLoadError() {\n    if (!pageError) {\n      // Impossible, but TypeScript doesn't know that\n      return;\n    }\n    warning(false, pageError.toString());\n    if (onLoadErrorProps) {\n      onLoadErrorProps(pageError);\n    }\n  }\n  function resetPage() {\n    pageDispatch({\n      type: 'RESET'\n    });\n  }\n  useEffect(resetPage, [pageDispatch, pdf, pageIndex]);\n  function loadPage() {\n    if (!pdf || !pageNumber) {\n      return;\n    }\n    const cancellable = makeCancellable(pdf.getPage(pageNumber));\n    const runningTask = cancellable;\n    cancellable.promise.then(nextPage => {\n      pageDispatch({\n        type: 'RESOLVE',\n        value: nextPage\n      });\n    }).catch(error => {\n      pageDispatch({\n        type: 'REJECT',\n        error\n      });\n    });\n    return () => cancelRunningTask(runningTask);\n  }\n  useEffect(loadPage, [pageDispatch, pdf, pageIndex, pageNumber, registerPage]);\n  useEffect(() => {\n    if (page === undefined) {\n      return;\n    }\n    if (page === false) {\n      onLoadError();\n      return;\n    }\n    onLoadSuccess();\n  },\n  // Ommitted callbacks so they are not called every time they change\n  // eslint-disable-next-line react-hooks/exhaustive-deps\n  [page, scale]);\n  const childContext = useMemo(() =>\n  // Technically there cannot be page without pageIndex, pageNumber, rotate and scale, but TypeScript doesn't know that\n  page && isProvided(pageIndex) && pageNumber && isProvided(rotate) && isProvided(scale) ? {\n    _className,\n    canvasBackground,\n    customTextRenderer,\n    devicePixelRatio,\n    onGetAnnotationsError: onGetAnnotationsErrorProps,\n    onGetAnnotationsSuccess: onGetAnnotationsSuccessProps,\n    onGetStructTreeError: onGetStructTreeErrorProps,\n    onGetStructTreeSuccess: onGetStructTreeSuccessProps,\n    onGetTextError: onGetTextErrorProps,\n    onGetTextSuccess: onGetTextSuccessProps,\n    onRenderAnnotationLayerError: onRenderAnnotationLayerErrorProps,\n    onRenderAnnotationLayerSuccess: onRenderAnnotationLayerSuccessProps,\n    onRenderError: onRenderErrorProps,\n    onRenderSuccess: onRenderSuccessProps,\n    onRenderTextLayerError: onRenderTextLayerErrorProps,\n    onRenderTextLayerSuccess: onRenderTextLayerSuccessProps,\n    page,\n    pageIndex,\n    pageNumber,\n    renderForms,\n    renderTextLayer: renderTextLayerProps,\n    rotate,\n    scale\n  } : null, [_className, canvasBackground, customTextRenderer, devicePixelRatio, onGetAnnotationsErrorProps, onGetAnnotationsSuccessProps, onGetStructTreeErrorProps, onGetStructTreeSuccessProps, onGetTextErrorProps, onGetTextSuccessProps, onRenderAnnotationLayerErrorProps, onRenderAnnotationLayerSuccessProps, onRenderErrorProps, onRenderSuccessProps, onRenderTextLayerErrorProps, onRenderTextLayerSuccessProps, page, pageIndex, pageNumber, renderForms, renderTextLayerProps, rotate, scale]);\n  const eventProps = useMemo(() => makeEventProps(otherProps, () => page ? scale ? makePageCallback(page, scale) : undefined : page), [otherProps, page, scale]);\n  const pageKey = `${pageIndex}@${scale}/${rotate}`;\n  const pageKeyNoScale = `${pageIndex}/${rotate}`;\n  function renderMainLayer() {\n    switch (renderMode) {\n      case 'custom':\n        {\n          invariant(CustomRenderer, `renderMode was set to \"custom\", but no customRenderer was passed.`);\n          return React.createElement(CustomRenderer, {\n            key: `${pageKey}_custom`\n          });\n        }\n      case 'none':\n        return null;\n      case 'svg':\n        return React.createElement(PageSVG, {\n          key: `${pageKeyNoScale}_svg`\n        });\n      case 'canvas':\n      default:\n        return React.createElement(PageCanvas, {\n          key: `${pageKey}_canvas`,\n          canvasRef: canvasRef\n        });\n    }\n  }\n  function renderTextLayer() {\n    if (!renderTextLayerProps) {\n      return null;\n    }\n    return React.createElement(TextLayer, {\n      key: `${pageKey}_text`\n    });\n  }\n  function renderAnnotationLayer() {\n    if (!renderAnnotationLayerProps) {\n      return null;\n    }\n    /**\n     * As of now, PDF.js 2.0.943 returns warnings on unimplemented annotations in SVG mode.\n     * Therefore, as a fallback, we render \"traditional\" AnnotationLayer component.\n     */\n    return React.createElement(AnnotationLayer, {\n      key: `${pageKey}_annotations`\n    });\n  }\n  function renderChildren() {\n    return React.createElement(PageContext.Provider, {\n      value: childContext\n    }, renderMainLayer(), renderTextLayer(), renderAnnotationLayer(), children);\n  }\n  function renderContent() {\n    if (!pageNumber) {\n      return React.createElement(Message, {\n        type: \"no-data\"\n      }, typeof noData === 'function' ? noData() : noData);\n    }\n    if (pdf === null || page === undefined || page === null) {\n      return React.createElement(Message, {\n        type: \"loading\"\n      }, typeof loading === 'function' ? loading() : loading);\n    }\n    if (pdf === false || page === false) {\n      return React.createElement(Message, {\n        type: \"error\"\n      }, typeof error === 'function' ? error() : error);\n    }\n    return renderChildren();\n  }\n  return React.createElement(\"div\", Object.assign({\n    className: clsx(_className, className),\n    \"data-page-number\": pageNumber,\n    ref: mergeRefs(inputRef, pageElement),\n    style: {\n      ['--scale-factor']: `${scale}`,\n      backgroundColor: canvasBackground || 'white',\n      position: 'relative',\n      minWidth: 'min-content',\n      minHeight: 'min-content'\n    }\n  }, eventProps), renderContent());\n};\nconst isFunctionOrNode = PropTypes.oneOfType([PropTypes.func, PropTypes.node]);\nPage.propTypes = Object.assign(Object.assign({}, eventProps), {\n  canvasBackground: PropTypes.string,\n  canvasRef: isRef,\n  children: PropTypes.node,\n  className: isClassName,\n  customRenderer: PropTypes.func,\n  customTextRenderer: PropTypes.func,\n  devicePixelRatio: PropTypes.number,\n  error: isFunctionOrNode,\n  height: PropTypes.number,\n  imageResourcesPath: PropTypes.string,\n  inputRef: isRef,\n  loading: isFunctionOrNode,\n  noData: isFunctionOrNode,\n  onGetTextError: PropTypes.func,\n  onGetTextSuccess: PropTypes.func,\n  onLoadError: PropTypes.func,\n  onLoadSuccess: PropTypes.func,\n  onRenderError: PropTypes.func,\n  onRenderSuccess: PropTypes.func,\n  onRenderTextLayerError: PropTypes.func,\n  onRenderTextLayerSuccess: PropTypes.func,\n  pageIndex: isPageIndex,\n  pageNumber: isPageNumber,\n  pdf: isPdf,\n  renderAnnotationLayer: PropTypes.bool,\n  renderForms: PropTypes.bool,\n  renderMode: isRenderMode,\n  renderTextLayer: PropTypes.bool,\n  rotate: isRotate,\n  scale: PropTypes.number,\n  width: PropTypes.number\n});\nexport default Page;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","useEffect","useMemo","useRef","PropTypes","makeCancellable","makeEventProps","clsx","mergeRefs","invariant","warning","PageContext","Message","PageCanvas","PageSVG","TextLayer","AnnotationLayer","cancelRunningTask","isProvided","makePageCallback","useDocumentContext","useResolver","eventProps","isClassName","isPageIndex","isPageNumber","isPdf","isRef","isRenderMode","isRotate","defaultScale","Page","props","documentContext","mergedProps","assign","_className","_enableRegisterUnregisterPage","canvasBackground","canvasRef","children","className","customRenderer","CustomRenderer","customTextRenderer","devicePixelRatio","error","height","inputRef","loading","noData","onGetAnnotationsError","onGetAnnotationsErrorProps","onGetAnnotationsSuccess","onGetAnnotationsSuccessProps","onGetStructTreeError","onGetStructTreeErrorProps","onGetStructTreeSuccess","onGetStructTreeSuccessProps","onGetTextError","onGetTextErrorProps","onGetTextSuccess","onGetTextSuccessProps","onLoadError","onLoadErrorProps","onLoadSuccess","onLoadSuccessProps","onRenderAnnotationLayerError","onRenderAnnotationLayerErrorProps","onRenderAnnotationLayerSuccess","onRenderAnnotationLayerSuccessProps","onRenderError","onRenderErrorProps","onRenderSuccess","onRenderSuccessProps","onRenderTextLayerError","onRenderTextLayerErrorProps","onRenderTextLayerSuccess","onRenderTextLayerSuccessProps","pageIndex","pageIndexProps","pageNumber","pageNumberProps","pdf","registerPage","renderAnnotationLayer","renderAnnotationLayerProps","renderForms","renderMode","renderTextLayer","renderTextLayerProps","rotate","rotateProps","scale","scaleProps","unregisterPage","width","otherProps","pageState","pageDispatch","value","page","pageError","pageElement","pageScale","scaleWithDefault","viewport","getViewport","rotation","hook","current","toString","resetPage","type","loadPage","cancellable","getPage","runningTask","promise","then","nextPage","catch","undefined","childContext","pageKey","pageKeyNoScale","renderMainLayer","createElement","key","renderChildren","Provider","renderContent","ref","style","backgroundColor","position","minWidth","minHeight","isFunctionOrNode","oneOfType","func","node","propTypes","string","number","imageResourcesPath","bool"],"sources":["/Users/chrishaack/UC_Trains_Voice/react-demo/node_modules/react-pdf/dist/esm/Page.js"],"sourcesContent":["'use client';\nvar __rest = (this && this.__rest) || function (s, e) {\n    var t = {};\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n        t[p] = s[p];\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n                t[p[i]] = s[p[i]];\n        }\n    return t;\n};\nimport React, { useEffect, useMemo, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport makeCancellable from 'make-cancellable-promise';\nimport makeEventProps from 'make-event-props';\nimport clsx from 'clsx';\nimport mergeRefs from 'merge-refs';\nimport invariant from 'tiny-invariant';\nimport warning from 'warning';\nimport PageContext from './PageContext.js';\nimport Message from './Message.js';\nimport PageCanvas from './Page/PageCanvas.js';\nimport PageSVG from './Page/PageSVG.js';\nimport TextLayer from './Page/TextLayer.js';\nimport AnnotationLayer from './Page/AnnotationLayer.js';\nimport { cancelRunningTask, isProvided, makePageCallback } from './shared/utils.js';\nimport useDocumentContext from './shared/hooks/useDocumentContext.js';\nimport useResolver from './shared/hooks/useResolver.js';\nimport { eventProps, isClassName, isPageIndex, isPageNumber, isPdf, isRef, isRenderMode, isRotate, } from './shared/propTypes.js';\nconst defaultScale = 1;\n/**\n * Displays a page.\n *\n * Should be placed inside `<Document />`. Alternatively, it can have `pdf` prop passed, which can be obtained from `<Document />`'s `onLoadSuccess` callback function, however some advanced functions like linking between pages inside a document may not be working correctly.\n */\nconst Page = function Page(props) {\n    const documentContext = useDocumentContext();\n    const mergedProps = Object.assign(Object.assign({}, documentContext), props);\n    const { _className = 'react-pdf__Page', _enableRegisterUnregisterPage = true, canvasBackground, canvasRef, children, className, customRenderer: CustomRenderer, customTextRenderer, devicePixelRatio, error = 'Failed to load the page.', height, inputRef, loading = 'Loading page…', noData = 'No page specified.', onGetAnnotationsError: onGetAnnotationsErrorProps, onGetAnnotationsSuccess: onGetAnnotationsSuccessProps, onGetStructTreeError: onGetStructTreeErrorProps, onGetStructTreeSuccess: onGetStructTreeSuccessProps, onGetTextError: onGetTextErrorProps, onGetTextSuccess: onGetTextSuccessProps, onLoadError: onLoadErrorProps, onLoadSuccess: onLoadSuccessProps, onRenderAnnotationLayerError: onRenderAnnotationLayerErrorProps, onRenderAnnotationLayerSuccess: onRenderAnnotationLayerSuccessProps, onRenderError: onRenderErrorProps, onRenderSuccess: onRenderSuccessProps, onRenderTextLayerError: onRenderTextLayerErrorProps, onRenderTextLayerSuccess: onRenderTextLayerSuccessProps, pageIndex: pageIndexProps, pageNumber: pageNumberProps, pdf, registerPage, renderAnnotationLayer: renderAnnotationLayerProps = true, renderForms = false, renderMode = 'canvas', renderTextLayer: renderTextLayerProps = true, rotate: rotateProps, scale: scaleProps = defaultScale, unregisterPage, width } = mergedProps, otherProps = __rest(mergedProps, [\"_className\", \"_enableRegisterUnregisterPage\", \"canvasBackground\", \"canvasRef\", \"children\", \"className\", \"customRenderer\", \"customTextRenderer\", \"devicePixelRatio\", \"error\", \"height\", \"inputRef\", \"loading\", \"noData\", \"onGetAnnotationsError\", \"onGetAnnotationsSuccess\", \"onGetStructTreeError\", \"onGetStructTreeSuccess\", \"onGetTextError\", \"onGetTextSuccess\", \"onLoadError\", \"onLoadSuccess\", \"onRenderAnnotationLayerError\", \"onRenderAnnotationLayerSuccess\", \"onRenderError\", \"onRenderSuccess\", \"onRenderTextLayerError\", \"onRenderTextLayerSuccess\", \"pageIndex\", \"pageNumber\", \"pdf\", \"registerPage\", \"renderAnnotationLayer\", \"renderForms\", \"renderMode\", \"renderTextLayer\", \"rotate\", \"scale\", \"unregisterPage\", \"width\"]);\n    const [pageState, pageDispatch] = useResolver();\n    const { value: page, error: pageError } = pageState;\n    const pageElement = useRef(null);\n    invariant(pdf, 'Attempted to load a page, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop.');\n    const pageIndex = isProvided(pageNumberProps) ? pageNumberProps - 1 : pageIndexProps !== null && pageIndexProps !== void 0 ? pageIndexProps : null;\n    const pageNumber = pageNumberProps !== null && pageNumberProps !== void 0 ? pageNumberProps : (isProvided(pageIndexProps) ? pageIndexProps + 1 : null);\n    const rotate = rotateProps !== null && rotateProps !== void 0 ? rotateProps : (page ? page.rotate : null);\n    const scale = useMemo(() => {\n        if (!page) {\n            return null;\n        }\n        // Be default, we'll render page at 100% * scale width.\n        let pageScale = 1;\n        // Passing scale explicitly null would cause the page not to render\n        const scaleWithDefault = scaleProps !== null && scaleProps !== void 0 ? scaleProps : defaultScale;\n        // If width/height is defined, calculate the scale of the page so it could be of desired width.\n        if (width || height) {\n            const viewport = page.getViewport({ scale: 1, rotation: rotate });\n            if (width) {\n                pageScale = width / viewport.width;\n            }\n            else if (height) {\n                pageScale = height / viewport.height;\n            }\n        }\n        return scaleWithDefault * pageScale;\n    }, [height, page, rotate, scaleProps, width]);\n    function hook() {\n        return () => {\n            if (!isProvided(pageIndex)) {\n                // Impossible, but TypeScript doesn't know that\n                return;\n            }\n            if (_enableRegisterUnregisterPage && unregisterPage) {\n                unregisterPage(pageIndex);\n            }\n        };\n    }\n    useEffect(hook, [_enableRegisterUnregisterPage, pdf, pageIndex, unregisterPage]);\n    /**\n     * Called when a page is loaded successfully\n     */\n    function onLoadSuccess() {\n        if (onLoadSuccessProps) {\n            if (!page || !scale) {\n                // Impossible, but TypeScript doesn't know that\n                return;\n            }\n            onLoadSuccessProps(makePageCallback(page, scale));\n        }\n        if (_enableRegisterUnregisterPage && registerPage) {\n            if (!isProvided(pageIndex) || !pageElement.current) {\n                // Impossible, but TypeScript doesn't know that\n                return;\n            }\n            registerPage(pageIndex, pageElement.current);\n        }\n    }\n    /**\n     * Called when a page failed to load\n     */\n    function onLoadError() {\n        if (!pageError) {\n            // Impossible, but TypeScript doesn't know that\n            return;\n        }\n        warning(false, pageError.toString());\n        if (onLoadErrorProps) {\n            onLoadErrorProps(pageError);\n        }\n    }\n    function resetPage() {\n        pageDispatch({ type: 'RESET' });\n    }\n    useEffect(resetPage, [pageDispatch, pdf, pageIndex]);\n    function loadPage() {\n        if (!pdf || !pageNumber) {\n            return;\n        }\n        const cancellable = makeCancellable(pdf.getPage(pageNumber));\n        const runningTask = cancellable;\n        cancellable.promise\n            .then((nextPage) => {\n            pageDispatch({ type: 'RESOLVE', value: nextPage });\n        })\n            .catch((error) => {\n            pageDispatch({ type: 'REJECT', error });\n        });\n        return () => cancelRunningTask(runningTask);\n    }\n    useEffect(loadPage, [pageDispatch, pdf, pageIndex, pageNumber, registerPage]);\n    useEffect(() => {\n        if (page === undefined) {\n            return;\n        }\n        if (page === false) {\n            onLoadError();\n            return;\n        }\n        onLoadSuccess();\n    }, \n    // Ommitted callbacks so they are not called every time they change\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n    [page, scale]);\n    const childContext = useMemo(() => \n    // Technically there cannot be page without pageIndex, pageNumber, rotate and scale, but TypeScript doesn't know that\n    page && isProvided(pageIndex) && pageNumber && isProvided(rotate) && isProvided(scale)\n        ? {\n            _className,\n            canvasBackground,\n            customTextRenderer,\n            devicePixelRatio,\n            onGetAnnotationsError: onGetAnnotationsErrorProps,\n            onGetAnnotationsSuccess: onGetAnnotationsSuccessProps,\n            onGetStructTreeError: onGetStructTreeErrorProps,\n            onGetStructTreeSuccess: onGetStructTreeSuccessProps,\n            onGetTextError: onGetTextErrorProps,\n            onGetTextSuccess: onGetTextSuccessProps,\n            onRenderAnnotationLayerError: onRenderAnnotationLayerErrorProps,\n            onRenderAnnotationLayerSuccess: onRenderAnnotationLayerSuccessProps,\n            onRenderError: onRenderErrorProps,\n            onRenderSuccess: onRenderSuccessProps,\n            onRenderTextLayerError: onRenderTextLayerErrorProps,\n            onRenderTextLayerSuccess: onRenderTextLayerSuccessProps,\n            page,\n            pageIndex,\n            pageNumber,\n            renderForms,\n            renderTextLayer: renderTextLayerProps,\n            rotate,\n            scale,\n        }\n        : null, [\n        _className,\n        canvasBackground,\n        customTextRenderer,\n        devicePixelRatio,\n        onGetAnnotationsErrorProps,\n        onGetAnnotationsSuccessProps,\n        onGetStructTreeErrorProps,\n        onGetStructTreeSuccessProps,\n        onGetTextErrorProps,\n        onGetTextSuccessProps,\n        onRenderAnnotationLayerErrorProps,\n        onRenderAnnotationLayerSuccessProps,\n        onRenderErrorProps,\n        onRenderSuccessProps,\n        onRenderTextLayerErrorProps,\n        onRenderTextLayerSuccessProps,\n        page,\n        pageIndex,\n        pageNumber,\n        renderForms,\n        renderTextLayerProps,\n        rotate,\n        scale,\n    ]);\n    const eventProps = useMemo(() => makeEventProps(otherProps, () => page ? (scale ? makePageCallback(page, scale) : undefined) : page), [otherProps, page, scale]);\n    const pageKey = `${pageIndex}@${scale}/${rotate}`;\n    const pageKeyNoScale = `${pageIndex}/${rotate}`;\n    function renderMainLayer() {\n        switch (renderMode) {\n            case 'custom': {\n                invariant(CustomRenderer, `renderMode was set to \"custom\", but no customRenderer was passed.`);\n                return React.createElement(CustomRenderer, { key: `${pageKey}_custom` });\n            }\n            case 'none':\n                return null;\n            case 'svg':\n                return React.createElement(PageSVG, { key: `${pageKeyNoScale}_svg` });\n            case 'canvas':\n            default:\n                return React.createElement(PageCanvas, { key: `${pageKey}_canvas`, canvasRef: canvasRef });\n        }\n    }\n    function renderTextLayer() {\n        if (!renderTextLayerProps) {\n            return null;\n        }\n        return React.createElement(TextLayer, { key: `${pageKey}_text` });\n    }\n    function renderAnnotationLayer() {\n        if (!renderAnnotationLayerProps) {\n            return null;\n        }\n        /**\n         * As of now, PDF.js 2.0.943 returns warnings on unimplemented annotations in SVG mode.\n         * Therefore, as a fallback, we render \"traditional\" AnnotationLayer component.\n         */\n        return React.createElement(AnnotationLayer, { key: `${pageKey}_annotations` });\n    }\n    function renderChildren() {\n        return (React.createElement(PageContext.Provider, { value: childContext },\n            renderMainLayer(),\n            renderTextLayer(),\n            renderAnnotationLayer(),\n            children));\n    }\n    function renderContent() {\n        if (!pageNumber) {\n            return React.createElement(Message, { type: \"no-data\" }, typeof noData === 'function' ? noData() : noData);\n        }\n        if (pdf === null || page === undefined || page === null) {\n            return (React.createElement(Message, { type: \"loading\" }, typeof loading === 'function' ? loading() : loading));\n        }\n        if (pdf === false || page === false) {\n            return React.createElement(Message, { type: \"error\" }, typeof error === 'function' ? error() : error);\n        }\n        return renderChildren();\n    }\n    return (React.createElement(\"div\", Object.assign({ className: clsx(_className, className), \"data-page-number\": pageNumber, ref: mergeRefs(inputRef, pageElement), style: {\n            ['--scale-factor']: `${scale}`,\n            backgroundColor: canvasBackground || 'white',\n            position: 'relative',\n            minWidth: 'min-content',\n            minHeight: 'min-content',\n        } }, eventProps), renderContent()));\n};\nconst isFunctionOrNode = PropTypes.oneOfType([PropTypes.func, PropTypes.node]);\nPage.propTypes = Object.assign(Object.assign({}, eventProps), { canvasBackground: PropTypes.string, canvasRef: isRef, children: PropTypes.node, className: isClassName, customRenderer: PropTypes.func, customTextRenderer: PropTypes.func, devicePixelRatio: PropTypes.number, error: isFunctionOrNode, height: PropTypes.number, imageResourcesPath: PropTypes.string, inputRef: isRef, loading: isFunctionOrNode, noData: isFunctionOrNode, onGetTextError: PropTypes.func, onGetTextSuccess: PropTypes.func, onLoadError: PropTypes.func, onLoadSuccess: PropTypes.func, onRenderError: PropTypes.func, onRenderSuccess: PropTypes.func, onRenderTextLayerError: PropTypes.func, onRenderTextLayerSuccess: PropTypes.func, pageIndex: isPageIndex, pageNumber: isPageNumber, pdf: isPdf, renderAnnotationLayer: PropTypes.bool, renderForms: PropTypes.bool, renderMode: isRenderMode, renderTextLayer: PropTypes.bool, rotate: isRotate, scale: PropTypes.number, width: PropTypes.number });\nexport default Page;\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,MAAM,GAAI,IAAI,IAAI,IA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