ofd-view 0.1.18 → 0.1.19
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of ofd-view might be problematic. Click here for more details.
- package/README.md +9 -0
- package/lib/ofd-view.common.js +21699 -9
- package/lib/ofd-view.common.js.map +1 -1
- package/lib/ofd-view.umd.js +21699 -9
- package/lib/ofd-view.umd.js.map +1 -1
- package/lib/ofd-view.umd.min.js +66 -1
- package/lib/ofd-view.umd.min.js.map +1 -1
- package/package.json +49 -48
- package/img.png +0 -0
- package/lib/images/annotation-check.svg +0 -11
- package/lib/images/annotation-comment.svg +0 -16
- package/lib/images/annotation-help.svg +0 -26
- package/lib/images/annotation-insert.svg +0 -10
- package/lib/images/annotation-key.svg +0 -11
- package/lib/images/annotation-newparagraph.svg +0 -11
- package/lib/images/annotation-noicon.svg +0 -7
- package/lib/images/annotation-note.svg +0 -42
- package/lib/images/annotation-paragraph.svg +0 -16
- package/lib/images/eSignature.svg +0 -1
- package/lib/images/findbarButton-next.svg +0 -4
- package/lib/images/findbarButton-previous.svg +0 -4
- package/lib/images/loading-dark.svg +0 -24
- package/lib/images/loading-icon.gif +0 -0
- package/lib/images/loading.svg +0 -1
- package/lib/images/secondaryToolbarButton-documentProperties.svg +0 -15
- package/lib/images/secondaryToolbarButton-firstPage.svg +0 -1
- package/lib/images/secondaryToolbarButton-handTool.svg +0 -1
- package/lib/images/secondaryToolbarButton-lastPage.svg +0 -1
- package/lib/images/secondaryToolbarButton-rotateCcw.svg +0 -1
- package/lib/images/secondaryToolbarButton-rotateCw.svg +0 -4
- package/lib/images/secondaryToolbarButton-scrollHorizontal.svg +0 -1
- package/lib/images/secondaryToolbarButton-scrollPage.svg +0 -1
- package/lib/images/secondaryToolbarButton-scrollVertical.svg +0 -1
- package/lib/images/secondaryToolbarButton-scrollWrapped.svg +0 -1
- package/lib/images/secondaryToolbarButton-selectTool.svg +0 -4
- package/lib/images/secondaryToolbarButton-spreadEven.svg +0 -1
- package/lib/images/secondaryToolbarButton-spreadNone.svg +0 -1
- package/lib/images/secondaryToolbarButton-spreadOdd.svg +0 -1
- package/lib/images/shadow.png +0 -0
- package/lib/images/toolbarButton-bookmark.svg +0 -1
- package/lib/images/toolbarButton-currentOutlineItem.svg +0 -1
- package/lib/images/toolbarButton-download.svg +0 -4
- package/lib/images/toolbarButton-menuArrow.svg +0 -1
- package/lib/images/toolbarButton-openFile.svg +0 -4
- package/lib/images/toolbarButton-pageDown.svg +0 -7
- package/lib/images/toolbarButton-pageUp.svg +0 -12
- package/lib/images/toolbarButton-presentationMode.svg +0 -1
- package/lib/images/toolbarButton-print.svg +0 -4
- package/lib/images/toolbarButton-search.svg +0 -4
- package/lib/images/toolbarButton-secondaryToolbarToggle.svg +0 -4
- package/lib/images/toolbarButton-sidebarToggle.svg +0 -4
- package/lib/images/toolbarButton-viewAttachments.svg +0 -1
- package/lib/images/toolbarButton-viewLayers.svg +0 -1
- package/lib/images/toolbarButton-viewOutline.svg +0 -1
- package/lib/images/toolbarButton-viewSignatures.svg +0 -1
- package/lib/images/toolbarButton-viewThumbnail.svg +0 -4
- package/lib/images/toolbarButton-zoomIn.svg +0 -4
- package/lib/images/toolbarButton-zoomOut.svg +0 -4
- package/lib/images/treeitem-collapsed.svg +0 -1
- package/lib/images/treeitem-expanded.svg +0 -1
- package/lib/viewer.css +0 -3208
package/lib/ofd-view.umd.min.js
CHANGED
@@ -1,2 +1,67 @@
|
|
1
|
-
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["ofd-view"]=t():e["ofd-view"]=t()})("undefined"!==typeof self?self:this,(function(){return function(){"use strict";var e={};!function(){e.d=function(t,a){for(var i in a)e.o(a,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:a[i]})}}(),function(){e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){e.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){e.p=""}();var t={};if(e.r(t),e.d(t,{default:function(){return v}}),"undefined"!==typeof window){var a=window.document.currentScript,i=a&&a.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(e.p=i[1])}var l=function(){var e=this;e._self._c;return e._m(0)},o=[function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"outerContainer"}},[t("div",{attrs:{id:"mainContainer"}},[t("div",{staticClass:"secondaryToolbar hidden doorHangerRight",attrs:{id:"secondaryToolbar"}},[t("div",{attrs:{id:"secondaryToolbarButtonContainer"}},[t("button",{staticClass:"secondaryToolbarButton openFile visibleLargeView",attrs:{id:"secondaryOpenFile",title:"打开文件",tabindex:"52","data-l10n-id":"open_file"}},[t("span",{attrs:{"data-l10n-id":"open_file_label"}},[e._v("打开")])]),t("button",{staticClass:"secondaryToolbarButton print visibleMediumView",attrs:{id:"secondaryPrint",title:"打印",tabindex:"53","data-l10n-id":"print"}},[t("span",{attrs:{"data-l10n-id":"print_label"}},[e._v("打印")])]),t("button",{staticClass:"secondaryToolbarButton documentProperties",attrs:{id:"documentProperties",title:"文档属性…",tabindex:"69","data-l10n-id":"document_properties","aria-controls":"documentPropertiesDialog"}},[t("span",{attrs:{"data-l10n-id":"document_properties_label"}},[e._v("文档属性…")])])])]),e._v(" "),t("div",{staticClass:"toolbar"},[t("div",{attrs:{id:"toolbarContainer"}},[t("div",{attrs:{id:"toolbarViewer"}},[t("div",{attrs:{id:"toolbarViewerLeft"}},[t("div",{staticClass:"splitToolbarButton hiddenSmallView"},[t("button",{staticClass:"toolbarButton pageUp",attrs:{title:"上一页",id:"previous",tabindex:"13","data-l10n-id":"previous"}},[t("span",{attrs:{"data-l10n-id":"previous_label"}},[e._v("上一页")])]),t("div",{staticClass:"splitToolbarButtonSeparator"}),t("button",{staticClass:"toolbarButton pageDown",attrs:{title:"下一页",id:"next",tabindex:"14","data-l10n-id":"next"}},[t("span",{attrs:{"data-l10n-id":"next_label"}},[e._v("下一页")])])]),t("input",{staticClass:"toolbarField pageNumber",attrs:{type:"number",id:"pageNumber",title:"页面",value:"1",size:"4",min:"1",tabindex:"15","data-l10n-id":"page",autocomplete:"off"}}),t("span",{staticClass:"toolbarLabel",attrs:{id:"numPages"}})]),t("div",{attrs:{id:"toolbarViewerRight"}},[t("button",{staticClass:"toolbarButton openFile hiddenLargeView",attrs:{id:"openFile",title:"打开文件",tabindex:"32","data-l10n-id":"open_file"}},[t("span",{attrs:{"data-l10n-id":"open_file_label"}},[e._v("打开")])]),t("button",{staticClass:"toolbarButton print hiddenMediumView",attrs:{id:"print",title:"打印",tabindex:"33","data-l10n-id":"print"}},[t("span",{attrs:{"data-l10n-id":"print_label"}},[e._v("打印")])]),t("div",{staticClass:"verticalToolbarSeparator hiddenSmallView"}),t("button",{staticClass:"toolbarButton",attrs:{id:"secondaryToolbarToggle",title:"工具",tabindex:"36","data-l10n-id":"tools","aria-expanded":"false","aria-controls":"secondaryToolbar"}},[t("span",{attrs:{"data-l10n-id":"tools_label"}},[e._v("工具")])])]),t("div",{attrs:{id:"toolbarViewerMiddle"}},[t("div",{staticClass:"splitToolbarButton"},[t("button",{staticClass:"toolbarButton zoomOut",attrs:{id:"zoomOut",title:"缩小",tabindex:"21","data-l10n-id":"zoom_out"}},[t("span",{attrs:{"data-l10n-id":"zoom_out_label"}},[e._v("缩小")])]),t("div",{staticClass:"splitToolbarButtonSeparator"}),t("button",{staticClass:"toolbarButton zoomIn",attrs:{id:"zoomIn",title:"放大",tabindex:"22","data-l10n-id":"zoom_in"}},[t("span",{attrs:{"data-l10n-id":"zoom_in_label"}},[e._v("放大")])])]),t("span",{staticClass:"dropdownToolbarButton",attrs:{id:"scaleSelectContainer"}},[t("select",{attrs:{id:"scaleSelect",title:"缩放",tabindex:"23","data-l10n-id":"zoom"}},[t("option",{attrs:{id:"pageAutoOption",title:"",value:"auto",selected:"selected","data-l10n-id":"page_scale_auto"}},[e._v("自动缩放")]),t("option",{attrs:{id:"pageActualOption",title:"",value:"page-actual","data-l10n-id":"page_scale_actual"}},[e._v("实际大小")]),t("option",{attrs:{id:"pageFitOption",title:"",value:"page-fit","data-l10n-id":"page_scale_fit"}},[e._v("适合页面")]),t("option",{attrs:{id:"pageWidthOption",title:"",value:"page-width","data-l10n-id":"page_scale_width"}},[e._v("适合页宽")]),t("option",{attrs:{id:"customScaleOption",title:"",value:"custom",disabled:"disabled",hidden:"true"}}),t("option",{attrs:{title:"",value:"0.5","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 50 }'}},[e._v("50%")]),t("option",{attrs:{title:"",value:"0.75","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 75 }'}},[e._v("75%")]),t("option",{attrs:{title:"",value:"1","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 100 }'}},[e._v("100%")]),t("option",{attrs:{title:"",value:"1.25","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 125 }'}},[e._v("125%")]),t("option",{attrs:{title:"",value:"1.5","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 150 }'}},[e._v("150%")]),t("option",{attrs:{title:"",value:"2","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 200 }'}},[e._v("200%")]),t("option",{attrs:{title:"",value:"3","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 300 }'}},[e._v("300%")]),t("option",{attrs:{title:"",value:"4","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 400 }'}},[e._v("400%")])])])])])])]),t("div",{attrs:{id:"viewerContainer",tabindex:"0"}},[t("div",{staticClass:"pdfViewer",attrs:{id:"viewer"}})]),t("div",{attrs:{id:"errorWrapper",hidden:"true"}},[t("div",{attrs:{id:"errorMessageLeft"}},[t("span",{attrs:{id:"errorMessage"}}),t("button",{attrs:{id:"errorShowMore","data-l10n-id":"error_more_info"}},[e._v(" More Information ")]),t("button",{attrs:{id:"errorShowLess","data-l10n-id":"error_less_info",hidden:"true"}},[e._v(" Less Information ")])]),t("div",{attrs:{id:"errorMessageRight"}},[t("button",{attrs:{id:"errorClose","data-l10n-id":"error_close"}},[e._v(" Close ")])]),t("div",{staticClass:"clearBoth"}),t("textarea",{attrs:{id:"errorMoreInfo",hidden:"true",readonly:"readonly"}})])]),e._v(" "),t("div",{attrs:{id:"dialogContainer"}},[t("dialog",{attrs:{id:"documentPropertiesDialog"}},[t("div",{staticClass:"row"},[t("span",{attrs:{id:"fileNameLabel","data-l10n-id":"document_properties_file_name"}},[e._v("文件名:")]),t("p",{attrs:{id:"fileNameField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"fileSizeLabel","data-l10n-id":"document_properties_file_size"}},[e._v("文件大小:")]),t("p",{attrs:{id:"fileSizeField","aria-labelledby":"fileSizeLabel"}},[e._v("-")])]),t("div",{staticClass:"separator"}),t("div",{staticClass:"row"},[t("span",{attrs:{id:"titleLabel","data-l10n-id":"document_properties_title"}},[e._v("标题:")]),t("p",{attrs:{id:"titleField","aria-labelledby":"titleLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"authorLabel","data-l10n-id":"document_properties_author"}},[e._v("作者:")]),t("p",{attrs:{id:"authorField","aria-labelledby":"authorLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"subjectLabel","data-l10n-id":"document_properties_subject"}},[e._v("主题:")]),t("p",{attrs:{id:"subjectField","aria-labelledby":"subjectLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"keywordsLabel","data-l10n-id":"document_properties_keywords"}},[e._v("关键词:")]),t("p",{attrs:{id:"keywordsField","aria-labelledby":"keywordsLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"creationDateLabel","data-l10n-id":"document_properties_creation_date"}},[e._v("创建日期:")]),t("p",{attrs:{id:"creationDateField","aria-labelledby":"creationDateLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"modificationDateLabel","data-l10n-id":"document_properties_modification_date"}},[e._v("修改日期:")]),t("p",{attrs:{id:"modificationDateField","aria-labelledby":"modificationDateLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"creatorLabel","data-l10n-id":"document_properties_creator"}},[e._v("创建者:")]),t("p",{attrs:{id:"creatorField","aria-labelledby":"creatorLabel"}},[e._v("-")])]),t("div",{staticClass:"separator"}),t("div",{staticClass:"row"},[t("span",{attrs:{id:"producerLabel","data-l10n-id":"document_properties_producer"}},[e._v("OFD 生成器:")]),t("p",{attrs:{id:"producerField","aria-labelledby":"producerLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"versionLabel","data-l10n-id":"document_properties_version"}},[e._v("OFD 版本:")]),t("p",{attrs:{id:"versionField","aria-labelledby":"versionLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"pageCountLabel","data-l10n-id":"document_properties_page_count"}},[e._v("页数:")]),t("p",{attrs:{id:"pageCountField","aria-labelledby":"pageCountLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"pageSizeLabel","data-l10n-id":"document_properties_page_size"}},[e._v("页面大小:")]),t("p",{attrs:{id:"pageSizeField","aria-labelledby":"pageSizeLabel"}},[e._v("-")])]),t("div",{staticClass:"separator"}),t("div",{staticClass:"row",attrs:{hidden:"hidden"}},[t("span",{attrs:{id:"linearizedLabel","data-l10n-id":"document_properties_linearized"}},[e._v("快速 Web 视图:")]),t("p",{attrs:{id:"linearizedField","aria-labelledby":"linearizedLabel"}},[e._v("-")])]),t("div",{staticClass:"buttonRow"},[t("button",{staticClass:"dialogButton",attrs:{id:"documentPropertiesClose"}},[t("span",{attrs:{"data-l10n-id":"document_properties_close"}},[e._v("关闭")])])])]),t("dialog",{staticStyle:{"min-width":"200px"},attrs:{id:"printServiceDialog"}},[t("div",{staticClass:"row"},[t("span",{attrs:{"data-l10n-id":"print_progress_message"}},[e._v("正在准备打印文档…")])]),t("div",{staticClass:"row"},[t("progress",{attrs:{id:"printProgress",value:"0",max:"100"}}),t("span",{staticClass:"relative-progress",attrs:{"data-l10n-id":"print_progress_percent","data-l10n-args":'{ "progress": 0 }'}},[e._v("0%")])]),t("div",{staticClass:"buttonRow"},[t("button",{staticClass:"dialogButton",attrs:{id:"printCancel"}},[t("span",{attrs:{"data-l10n-id":"print_progress_close"}},[e._v("取消")])])])]),t("dialog",{attrs:{id:"signaturePropertiesDialog"}},[t("div",{staticClass:"row"},[t("span",{attrs:{id:"signerLabel"}},[e._v("签章人:")]),t("p",{attrs:{id:"signerField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"providerLabel"}},[e._v("签章提供者:")]),t("p",{attrs:{id:"providerField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"hashedValueLabel"}},[e._v("原文摘要值:")]),t("p",{attrs:{id:"hashedValueField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"signedValueLabel"}},[e._v("签名值:")]),t("p",{attrs:{id:"signedValueField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"signMethodLabel"}},[e._v("签名算法:")]),t("p",{attrs:{id:"signMethodField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"signVersionLabel"}},[e._v("版本号:")]),t("p",{attrs:{id:"signVersionField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"verifyLabel"}},[e._v("验签结果:")]),t("p",{attrs:{id:"verifyField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"separator"}),t("div",{staticClass:"row"},[t("span",{attrs:{id:"sealIDLabel"}},[e._v("印章标识:")]),t("p",{attrs:{id:"sealIDField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"sealNameLabel"}},[e._v("印章名称:")]),t("p",{attrs:{id:"sealNameField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"sealTypeLabel"}},[e._v("印章类型:")]),t("p",{attrs:{id:"sealTypeField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"sealAuthTimeLabel"}},[e._v("有效时间:")]),t("p",{attrs:{id:"sealAuthTimeField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"sealMakeTimeLabel"}},[e._v("制章日期:")]),t("p",{attrs:{id:"sealMakeTimeField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"sealVersionLabel"}},[e._v("印章版本:")]),t("p",{attrs:{id:"sealVersionField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"buttonRow"},[t("button",{staticClass:"dialogButton",attrs:{id:"signaturePropertiesClose"}},[t("span",{attrs:{"data-l10n-id":"document_properties_close"}},[e._v("关闭")])])])])])])}],r={name:"OfdView",props:{},watch:{},data(){return{config:null}},mounted(){if(!this.config){this.config=this.getViewerConfiguration();let e=new Image;e.style.position="absolute",e.style.left=0,e.style.right=0,e.style.margin="auto",e.style.top=0,e.style.bottom=0,e.src="data:image/gif;base64,R0lGODlhNgA3APMAAP///zAyOJKTlkdJTzw+RN/g4XV2euPj5M/Q0WtscaChpDAyODAyODAyODAyODAyOCH5BAkKAAAAIf4aQ3JlYXRlZCB3aXRoIGFqYXhsb2FkLmluZm8AIf8LTkVUU0NBUEUyLjADAQAAACwAAAAANgA3AAAEzBDISau9OOvNu/9gKI5kaZ4lkhBEgqCnws6EApMITb93uOqsRC8EpA1Bxdnx8wMKl51ckXcsGFiGAkamsy0LA9pAe1EFqRbBYCAYXXUGk4DWJhZN4dlAlMSLRW80cSVzM3UgB3ksAwcnamwkB28GjVCWl5iZmpucnZ4cj4eWoRqFLKJHpgSoFIoEe5ausBeyl7UYqqw9uaVrukOkn8LDxMXGx8ibwY6+JLxydCO3JdMg1dJ/Is+E0SPLcs3Jnt/F28XXw+jC5uXh4u89EQAh+QQJCgAAACwAAAAANgA3AAAEzhDISau9OOvNu/9gKI5kaZ5oqhYGQRiFWhaD6w6xLLa2a+iiXg8YEtqIIF7vh/QcarbB4YJIuBKIpuTAM0wtCqNiJBgMBCaE0ZUFCXpoknWdCEFvpfURdCcM8noEIW82cSNzRnWDZoYjamttWhphQmOSHFVXkZecnZ6foKFujJdlZxqELo1AqQSrFH1/TbEZtLM9shetrzK7qKSSpryixMXGx8jJyifCKc1kcMzRIrYl1Xy4J9cfvibdIs/MwMue4cffxtvE6qLoxubk8ScRACH5BAkKAAAALAAAAAA2ADcAAATOEMhJq7046827/2AojmRpnmiqrqwwDAJbCkRNxLI42MSQ6zzfD0Sz4YYfFwyZKxhqhgJJeSQVdraBNFSsVUVPHsEAzJrEtnJNSELXRN2bKcwjw19f0QG7PjA7B2EGfn+FhoeIiYoSCAk1CQiLFQpoChlUQwhuBJEWcXkpjm4JF3w9P5tvFqZsLKkEF58/omiksXiZm52SlGKWkhONj7vAxcbHyMkTmCjMcDygRNAjrCfVaqcm11zTJrIjzt64yojhxd/G28XqwOjG5uTxJhEAIfkECQoAAAAsAAAAADYANwAABM0QyEmrvTjrzbv/YCiOZGmeaKqurDAMAlsKRE3EsjjYxJDrPN8PRLPhhh8XDMk0KY/OF5TIm4qKNWtnZxOWuDUvCNw7kcXJ6gl7Iz1T76Z8Tq/b7/i8qmCoGQoacT8FZ4AXbFopfTwEBhhnQ4w2j0GRkgQYiEOLPI6ZUkgHZwd6EweLBqSlq6ytricICTUJCKwKkgojgiMIlwS1VEYlspcJIZAkvjXHlcnKIZokxJLG0KAlvZfAebeMuUi7FbGz2z/Rq8jozavn7Nev8CsRACH5BAkKAAAALAAAAAA2ADcAAATLEMhJq7046827/2AojmRpnmiqrqwwDAJbCkRNxLI42MSQ6zzfD0Sz4YYfFwzJNCmPzheUyJuKijVrZ2cTlrg1LwjcO5HFyeoJeyM9U++mfE6v2+/4PD6O5F/YWiqAGWdIhRiHP4kWg0ONGH4/kXqUlZaXmJlMBQY1BgVuUicFZ6AhjyOdPAQGQF0mqzauYbCxBFdqJao8rVeiGQgJNQkIFwdnB0MKsQrGqgbJPwi2BMV5wrYJetQ129x62LHaedO21nnLq82VwcPnIhEAIfkECQoAAAAsAAAAADYANwAABMwQyEmrvTjrzbv/YCiOZGmeaKqurDAMAlsKRE3EsjjYxJDrPN8PRLPhhh8XDMk0KY/OF5TIm4qKNWtnZxOWuDUvCNw7kcXJ6gl7Iz1T76Z8Tq/b7/g8Po7kX9haKoAZZ0iFGIc/iRaDQ40Yfj+RepSVlpeYAAgJNQkIlgo8NQqUCKI2nzNSIpynBAkzaiCuNl9BIbQ1tl0hraewbrIfpq6pbqsioaKkFwUGNQYFSJudxhUFZ9KUz6IGlbTfrpXcPN6UB2cHlgfcBuqZKBEAIfkECQoAAAAsAAAAADYANwAABMwQyEmrvTjrzbv/YCiOZGmeaKqurDAMAlsKRE3EsjjYxJDrPN8PRLPhhh8XDMk0KY/OF5TIm4qKNWtnZxOWuDUvCNw7kcXJ6gl7Iz1T76Z8Tq/b7yJEopZA4CsKPDUKfxIIgjZ+P3EWe4gECYtqFo82P2cXlTWXQReOiJE5bFqHj4qiUhmBgoSFho59rrKztLVMBQY1BgWzBWe8UUsiuYIGTpMglSaYIcpfnSHEPMYzyB8HZwdrqSMHxAbath2MsqO0zLLorua05OLvJxEAIfkECQoAAAAsAAAAADYANwAABMwQyEmrvTjrzbv/YCiOZGmeaKqurDAMAlsKRE3EsjjYxJDrPN8PRLPhfohELYHQuGBDgIJXU0Q5CKqtOXsdP0otITHjfTtiW2lnE37StXUwFNaSScXaGZvm4r0jU1RWV1hhTIWJiouMjVcFBjUGBY4WBWw1A5RDT3sTkVQGnGYYaUOYPaVip3MXoDyiP3k3GAeoAwdRnRoHoAa5lcHCw8TFxscduyjKIrOeRKRAbSe3I9Um1yHOJ9sjzCbfyInhwt3E2cPo5dHF5OLvJREAOw==",e.draggable=!1,this.config.loadingContainer=e}this.$emit("configCallback",this.config)},methods:{getViewerConfiguration(){let e=null;return e={container:document.getElementById("errorWrapper"),errorMessage:document.getElementById("errorMessage"),closeButton:document.getElementById("errorClose"),errorMoreInfo:document.getElementById("errorMoreInfo"),moreInfoButton:document.getElementById("errorShowMore"),lessInfoButton:document.getElementById("errorShowLess")},{appContainer:document.body,mainContainer:document.getElementById("viewerContainer"),viewerContainer:document.getElementById("viewer"),toolbar:{container:document.getElementById("toolbarViewer"),numPages:document.getElementById("numPages"),pageNumber:document.getElementById("pageNumber"),scaleSelect:document.getElementById("scaleSelect"),customScaleOption:document.getElementById("customScaleOption"),previous:document.getElementById("previous"),next:document.getElementById("next"),zoomIn:document.getElementById("zoomIn"),zoomOut:document.getElementById("zoomOut"),openFile:document.getElementById("openFile"),print:document.getElementById("print")},secondaryToolbar:{toolbar:document.getElementById("secondaryToolbar"),toggleButton:document.getElementById("secondaryToolbarToggle"),toolbarButtonContainer:document.getElementById("secondaryToolbarButtonContainer"),openFileButton:document.getElementById("secondaryOpenFile"),printButton:document.getElementById("secondaryPrint"),documentPropertiesButton:document.getElementById("documentProperties")},sidebar:{outerContainer:document.getElementById("outerContainer"),viewerContainer:document.getElementById("viewerContainer")},sidebarResizer:{outerContainer:document.getElementById("outerContainer")},documentProperties:{dialog:document.getElementById("documentPropertiesDialog"),closeButton:document.getElementById("documentPropertiesClose"),fields:{fileName:document.getElementById("fileNameField"),fileSize:document.getElementById("fileSizeField"),title:document.getElementById("titleField"),author:document.getElementById("authorField"),subject:document.getElementById("subjectField"),keywords:document.getElementById("keywordsField"),creationDate:document.getElementById("creationDateField"),modificationDate:document.getElementById("modificationDateField"),creator:document.getElementById("creatorField"),producer:document.getElementById("producerField"),version:document.getElementById("versionField"),pageCount:document.getElementById("pageCountField"),pageSize:document.getElementById("pageSizeField"),linearized:document.getElementById("linearizedField")}},signatureProperties:{dialog:document.getElementById("signaturePropertiesDialog"),closeButton:document.getElementById("signaturePropertiesClose"),fields:{signer:document.getElementById("signerField"),provider:document.getElementById("providerField"),hashedValue:document.getElementById("hashedValueField"),signedValue:document.getElementById("signedValueField"),signMethod:document.getElementById("signMethodField"),signVersion:document.getElementById("signVersionField"),verify:document.getElementById("verifyField"),sealID:document.getElementById("sealIDField"),sealName:document.getElementById("sealNameField"),sealType:document.getElementById("sealTypeField"),sealAuthTime:document.getElementById("sealAuthTimeField"),sealMakeTime:document.getElementById("sealMakeTimeField"),sealVersion:document.getElementById("sealVersionField")}},errorWrapper:e,printContainer:document.getElementById("printContainer"),openFileInputName:"fileInput"}}}},n=r;function d(e,t,a,i,l,o,r,n){var d,s="function"===typeof e?e.options:e;if(t&&(s.render=t,s.staticRenderFns=a,s._compiled=!0),i&&(s.functional=!0),o&&(s._scopeId="data-v-"+o),r?(d=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),l&&l.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(r)},s._ssrRegister=d):l&&(d=n?function(){l.call(this,(s.functional?this.parent:this).$root.$options.shadowRoot)}:l),d)if(s.functional){s._injectStyles=d;var c=s.render;s.render=function(e,t){return d.call(t),c(e,t)}}else{var p=s.beforeCreate;s.beforeCreate=p?[].concat(p,d):[d]}return{exports:e,options:s}}var s=d(n,l,o,!1,null,"52ea580a",null),c=s.exports;c.install=e=>e.component(c.name,c);var p=c;const u=[p],m=function(e){m.installed||u.map((t=>e.component(t.name,t)))};"undefined"!==typeof window&&window.Vue&&m(window.Vue);var b={install:m,OfdView:p},v=b;return t}()}));
|
1
|
+
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["ofd-view"]=t():e["ofd-view"]=t()})("undefined"!==typeof self?self:this,(function(){return function(){var __webpack_modules__={934:function(e,t,r){"use strict";r.r(t);var i=r(81),n=r.n(i),s=r(645),a=r.n(s),o=a()(n());o.push([e.id,"#pageContainer[data-v-fa94153c]{margin:auto;width:80%}div.page[data-v-fa94153c]{display:inline-block}",""]),t["default"]=o},645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",i="undefined"!==typeof t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),i&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),i&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,i,n,s){"string"===typeof e&&(e=[[null,e,void 0]]);var a={};if(i)for(var o=0;o<this.length;o++){var l=this[o][0];null!=l&&(a[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);i&&a[d[0]]||("undefined"!==typeof s&&("undefined"===typeof d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=s),r&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=r):d[2]=r),n&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=n):d[4]="".concat(n)),t.push(d))}},t}},81:function(e){"use strict";e.exports=function(e){return e[1]}},299:function(module,__unused_webpack_exports,__webpack_require__){
|
2
|
+
/**
|
3
|
+
* @licstart The following is the entire license notice for the
|
4
|
+
* Javascript code in this page
|
5
|
+
*
|
6
|
+
* Copyright 2020 Mozilla Foundation
|
7
|
+
*
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
* you may not use this file except in compliance with the License.
|
10
|
+
* You may obtain a copy of the License at
|
11
|
+
*
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
*
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
* See the License for the specific language governing permissions and
|
18
|
+
* limitations under the License.
|
19
|
+
*
|
20
|
+
* @licend The above is the entire license notice for the
|
21
|
+
* Javascript code in this page
|
22
|
+
*/
|
23
|
+
(function(e,t){module.exports=t()})(0,(function(){return function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLinkAttributes",{enumerable:!0,get:function(){return i.addLinkAttributes}}),Object.defineProperty(t,"getFilenameFromUrl",{enumerable:!0,get:function(){return i.getFilenameFromUrl}}),Object.defineProperty(t,"LinkTarget",{enumerable:!0,get:function(){return i.LinkTarget}}),Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return i.loadScript}}),Object.defineProperty(t,"PDFDateString",{enumerable:!0,get:function(){return i.PDFDateString}}),Object.defineProperty(t,"RenderingCancelledException",{enumerable:!0,get:function(){return i.RenderingCancelledException}}),Object.defineProperty(t,"build",{enumerable:!0,get:function(){return n.build}}),Object.defineProperty(t,"getDocument",{enumerable:!0,get:function(){return n.getDocument}}),Object.defineProperty(t,"LoopbackPort",{enumerable:!0,get:function(){return n.LoopbackPort}}),Object.defineProperty(t,"PDFDataRangeTransport",{enumerable:!0,get:function(){return n.PDFDataRangeTransport}}),Object.defineProperty(t,"PDFWorker",{enumerable:!0,get:function(){return n.PDFWorker}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return n.version}}),Object.defineProperty(t,"CMapCompressionType",{enumerable:!0,get:function(){return s.CMapCompressionType}}),Object.defineProperty(t,"createObjectURL",{enumerable:!0,get:function(){return s.createObjectURL}}),Object.defineProperty(t,"createPromiseCapability",{enumerable:!0,get:function(){return s.createPromiseCapability}}),Object.defineProperty(t,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return s.createValidAbsoluteUrl}}),Object.defineProperty(t,"InvalidPDFException",{enumerable:!0,get:function(){return s.InvalidPDFException}}),Object.defineProperty(t,"MissingPDFException",{enumerable:!0,get:function(){return s.MissingPDFException}}),Object.defineProperty(t,"OPS",{enumerable:!0,get:function(){return s.OPS}}),Object.defineProperty(t,"PasswordResponses",{enumerable:!0,get:function(){return s.PasswordResponses}}),Object.defineProperty(t,"PermissionFlag",{enumerable:!0,get:function(){return s.PermissionFlag}}),Object.defineProperty(t,"removeNullCharacters",{enumerable:!0,get:function(){return s.removeNullCharacters}}),Object.defineProperty(t,"shadow",{enumerable:!0,get:function(){return s.shadow}}),Object.defineProperty(t,"UnexpectedResponseException",{enumerable:!0,get:function(){return s.UnexpectedResponseException}}),Object.defineProperty(t,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return s.UNSUPPORTED_FEATURES}}),Object.defineProperty(t,"Util",{enumerable:!0,get:function(){return s.Util}}),Object.defineProperty(t,"VerbosityLevel",{enumerable:!0,get:function(){return s.VerbosityLevel}}),Object.defineProperty(t,"AnnotationLayer",{enumerable:!0,get:function(){return a.AnnotationLayer}}),Object.defineProperty(t,"apiCompatibilityParams",{enumerable:!0,get:function(){return o.apiCompatibilityParams}}),Object.defineProperty(t,"GlobalWorkerOptions",{enumerable:!0,get:function(){return l.GlobalWorkerOptions}}),Object.defineProperty(t,"renderTextLayer",{enumerable:!0,get:function(){return c.renderTextLayer}}),Object.defineProperty(t,"SVGGraphics",{enumerable:!0,get:function(){return d.SVGGraphics}});var i=r(1),n=r(5),s=r(2),a=r(16),o=r(7),l=r(10),c=r(17),d=r(18);{const{isNodeJS:e}=r(4);if(e){const e=r(19).PDFNodeStream;(0,n.setPDFNetworkStreamFactory)((t=>new e(t)))}else{const e=r(22).PDFNetworkStream;let t;(0,i.isFetchSupported)()&&(t=r(23).PDFFetchStream),(0,n.setPDFNetworkStreamFactory)((r=>t&&(0,i.isValidFetchUrl)(r.url)?new t(r):new e(r)))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addLinkAttributes=u,t.getFilenameFromUrl=p,t.isFetchSupported=f,t.isValidFetchUrl=m,t.loadScript=_,t.deprecated=b,t.PDFDateString=t.StatTimer=t.DOMSVGFactory=t.DOMCMapReaderFactory=t.DOMCanvasFactory=t.DEFAULT_LINK_REL=t.LinkTarget=t.RenderingCancelledException=t.PageViewport=void 0;var i=r(2);const n="noopener noreferrer nofollow";t.DEFAULT_LINK_REL=n;const s="http://www.w3.org/2000/svg";class a{create(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");const r=document.createElement("canvas"),i=r.getContext("2d");return r.width=e,r.height=t,{canvas:r,context:i}}reset(e,t,r){if(!e.canvas)throw new Error("Canvas is not specified");if(t<=0||r<=0)throw new Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=r}destroy(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}}t.DOMCanvasFactory=a;class o{constructor({baseUrl:e=null,isCompressed:t=!1}){this.baseUrl=e,this.isCompressed=t}async fetch({name:e}){if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!e)throw new Error("CMap name must be specified.");const t=this.baseUrl+e+(this.isCompressed?".bcmap":""),r=this.isCompressed?i.CMapCompressionType.BINARY:i.CMapCompressionType.NONE;return f()&&m(t,document.baseURI)?fetch(t).then((async e=>{if(!e.ok)throw new Error(e.statusText);let t;return t=this.isCompressed?new Uint8Array(await e.arrayBuffer()):(0,i.stringToBytes)(await e.text()),{cMapData:t,compressionType:r}})).catch((e=>{throw new Error("Unable to load "+(this.isCompressed?"binary ":"")+`CMap at: ${t}`)})):new Promise(((e,n)=>{const s=new XMLHttpRequest;s.open("GET",t,!0),this.isCompressed&&(s.responseType="arraybuffer"),s.onreadystatechange=()=>{if(s.readyState===XMLHttpRequest.DONE){if(200===s.status||0===s.status){let t;if(this.isCompressed&&s.response?t=new Uint8Array(s.response):!this.isCompressed&&s.responseText&&(t=(0,i.stringToBytes)(s.responseText)),t)return void e({cMapData:t,compressionType:r})}n(new Error(s.statusText))}},s.send(null)})).catch((e=>{throw new Error("Unable to load "+(this.isCompressed?"binary ":"")+`CMap at: ${t}`)}))}}t.DOMCMapReaderFactory=o;class l{create(e,t){(0,i.assert)(e>0&&t>0,"Invalid SVG dimensions");const r=document.createElementNS(s,"svg:svg");return r.setAttribute("version","1.1"),r.setAttribute("width",e+"px"),r.setAttribute("height",t+"px"),r.setAttribute("preserveAspectRatio","none"),r.setAttribute("viewBox","0 0 "+e+" "+t),r}createElement(e){return(0,i.assert)("string"===typeof e,"Invalid SVG element type"),document.createElementNS(s,e)}}t.DOMSVGFactory=l;class c{constructor({viewBox:e,scale:t,rotation:r,offsetX:i=0,offsetY:n=0,dontFlip:s=!1}){this.viewBox=e,this.scale=t,this.rotation=r,this.offsetX=i,this.offsetY=n;const a=(e[2]+e[0])/2,o=(e[3]+e[1])/2;let l,c,d,h,u,p,g,f;switch(r%=360,r=r<0?r+360:r,r){case 180:l=-1,c=0,d=0,h=1;break;case 90:l=0,c=1,d=1,h=0;break;case 270:l=0,c=-1,d=-1,h=0;break;case 0:l=1,c=0,d=0,h=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}s&&(d=-d,h=-h),0===l?(u=Math.abs(o-e[1])*t+i,p=Math.abs(a-e[0])*t+n,g=Math.abs(e[3]-e[1])*t,f=Math.abs(e[2]-e[0])*t):(u=Math.abs(a-e[0])*t+i,p=Math.abs(o-e[1])*t+n,g=Math.abs(e[2]-e[0])*t,f=Math.abs(e[3]-e[1])*t),this.transform=[l*t,c*t,d*t,h*t,u-l*t*a-d*t*o,p-c*t*a-h*t*o],this.width=g,this.height=f}clone({scale:e=this.scale,rotation:t=this.rotation,offsetX:r=this.offsetX,offsetY:i=this.offsetY,dontFlip:n=!1}={}){return new c({viewBox:this.viewBox.slice(),scale:e,rotation:t,offsetX:r,offsetY:i,dontFlip:n})}convertToViewportPoint(e,t){return i.Util.applyTransform([e,t],this.transform)}convertToViewportRectangle(e){const t=i.Util.applyTransform([e[0],e[1]],this.transform),r=i.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],r[0],r[1]]}convertToPdfPoint(e,t){return i.Util.applyInverseTransform([e,t],this.transform)}}t.PageViewport=c;class d extends i.BaseException{constructor(e,t){super(e),this.type=t}}t.RenderingCancelledException=d;const h={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};function u(e,{url:t,target:r,rel:s,enabled:a=!0}={}){(0,i.assert)(t&&"string"===typeof t,'addLinkAttributes: A valid "url" parameter must provided.');const o=(0,i.removeNullCharacters)(t);a?e.href=e.title=o:(e.href="",e.title=`Disabled: ${o}`,e.onclick=()=>!1);let l="";switch(r){case h.NONE:break;case h.SELF:l="_self";break;case h.BLANK:l="_blank";break;case h.PARENT:l="_parent";break;case h.TOP:l="_top";break}e.target=l,e.rel="string"===typeof s?s:n}function p(e){const t=e.indexOf("#"),r=e.indexOf("?"),i=Math.min(t>0?t:e.length,r>0?r:e.length);return e.substring(e.lastIndexOf("/",i)+1,i)}t.LinkTarget=h;class g{constructor(){this.started=Object.create(null),this.times=[]}time(e){e in this.started&&(0,i.warn)(`Timer is already running for ${e}`),this.started[e]=Date.now()}timeEnd(e){e in this.started||(0,i.warn)(`Timer has not been started for ${e}`),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}toString(){const e=[];let t=0;for(const r of this.times){const e=r.name;e.length>t&&(t=e.length)}for(const r of this.times){const i=r.end-r.start;e.push(`${r.name.padEnd(t)} ${i}ms\n`)}return e.join("")}}function f(){return"undefined"!==typeof fetch&&"undefined"!==typeof Response&&"body"in Response.prototype&&"undefined"!==typeof ReadableStream}function m(e,t){try{const{protocol:r}=t?new URL(e,t):new URL(e);return"http:"===r||"https:"===r}catch(r){return!1}}function _(e){return new Promise(((t,r)=>{const i=document.createElement("script");i.src=e,i.onload=t,i.onerror=function(){r(new Error(`Cannot load script at: ${i.src}`))},(document.head||document.documentElement).appendChild(i)}))}function b(e){console.log("Deprecated API usage: "+e)}let v;t.StatTimer=g;class y{static toDateObject(e){if(!e||!(0,i.isString)(e))return null;v||(v=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const t=v.exec(e);if(!t)return null;const r=parseInt(t[1],10);let n=parseInt(t[2],10);n=n>=1&&n<=12?n-1:0;let s=parseInt(t[3],10);s=s>=1&&s<=31?s:1;let a=parseInt(t[4],10);a=a>=0&&a<=23?a:0;let o=parseInt(t[5],10);o=o>=0&&o<=59?o:0;let l=parseInt(t[6],10);l=l>=0&&l<=59?l:0;const c=t[7]||"Z";let d=parseInt(t[8],10);d=d>=0&&d<=23?d:0;let h=parseInt(t[9],10)||0;return h=h>=0&&h<=59?h:0,"-"===c?(a+=d,o+=h):"+"===c&&(a-=d,o-=h),new Date(Date.UTC(r,n,s,a,o,l))}}t.PDFDateString=y},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayByteLength=G,t.arraysToBytes=X,t.assert=L,t.bytesToString=z,t.createPromiseCapability=he,t.getVerbosityLevel=x,t.info=P,t.isArrayBuffer=ce,t.isArrayEqual=de,t.isBool=ae,t.isEmptyObj=se,t.isNum=oe,t.isString=le,t.isSameOrigin=k,t.createValidAbsoluteUrl=I,t.removeNullCharacters=W,t.setVerbosityLevel=C,t.shadow=F,t.string32=Y,t.stringToBytes=H,t.stringToPDFString=re,t.stringToUTF8String=ie,t.utf8StringToString=ne,t.warn=T,t.unreachable=E,t.IsEvalSupportedCached=t.IsLittleEndianCached=t.createObjectURL=t.FormatError=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.StreamType=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.MissingPDFException=t.InvalidPDFException=t.AbortException=t.CMapCompressionType=t.ImageKind=t.FontType=t.AnnotationType=t.AnnotationStateModelType=t.AnnotationReviewState=t.AnnotationReplyType=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.UNSUPPORTED_FEATURES=t.VerbosityLevel=t.OPS=t.IDENTITY_MATRIX=t.FONT_IDENTITY_MATRIX=t.BaseException=void 0,r(3);const i=[1,0,0,1,0,0];t.IDENTITY_MATRIX=i;const n=[.001,0,0,.001,0,0];t.FONT_IDENTITY_MATRIX=n;const s={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};t.PermissionFlag=s;const a={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};t.TextRenderingMode=a;const o={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};t.ImageKind=o;const l={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};t.AnnotationType=l;const c={MARKED:"Marked",REVIEW:"Review"};t.AnnotationStateModelType=c;const d={MARKED:"Marked",UNMARKED:"Unmarked"};t.AnnotationMarkedState=d;const h={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"};t.AnnotationReviewState=h;const u={GROUP:"Group",REPLY:"R"};t.AnnotationReplyType=u;const p={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};t.AnnotationFlag=p;const g={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864};t.AnnotationFieldFlag=g;const f={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};t.AnnotationBorderStyleType=f;const m={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"};t.StreamType=m;const _={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};t.FontType=_;const b={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=b;const v={NONE:0,BINARY:1,STREAM:2};t.CMapCompressionType=v;const y={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,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};t.OPS=y;const A={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font",errorTilingPattern:"errorTilingPattern",errorExtGState:"errorExtGState",errorXObject:"errorXObject",errorFontLoadType3:"errorFontLoadType3",errorFontState:"errorFontState",errorFontMissing:"errorFontMissing",errorFontTranslate:"errorFontTranslate",errorColorSpace:"errorColorSpace",errorOperatorList:"errorOperatorList",errorFontToUnicode:"errorFontToUnicode",errorFontLoadNative:"errorFontLoadNative",errorFontGetPath:"errorFontGetPath"};t.UNSUPPORTED_FEATURES=A;const w={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};t.PasswordResponses=w;let S=b.WARNINGS;function C(e){Number.isInteger(e)&&(S=e)}function x(){return S}function P(e){S>=b.INFOS&&console.log(`Info: ${e}`)}function T(e){S>=b.WARNINGS&&console.log(`Warning: ${e}`)}function E(e){throw new Error(e)}function L(e,t){e||E(t)}function k(e,t){let r;try{if(r=new URL(e),!r.origin||"null"===r.origin)return!1}catch(n){return!1}const i=new URL(t,r);return r.origin===i.origin}function R(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function I(e,t){if(!e)return null;try{const r=t?new URL(e,t):new URL(e);if(R(r))return r}catch(r){}return null}function F(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}const M=function(){function e(t){this.constructor===e&&E("Cannot initialize BaseException."),this.message=t,this.name=this.constructor.name}return e.prototype=new Error,e.constructor=e,e}();t.BaseException=M;class N extends M{constructor(e,t){super(e),this.code=t}}t.PasswordException=N;class D extends M{constructor(e,t){super(e),this.details=t}}t.UnknownErrorException=D;class O extends M{}t.InvalidPDFException=O;class B extends M{}t.MissingPDFException=B;class U extends M{constructor(e,t){super(e),this.status=t}}t.UnexpectedResponseException=U;class j extends M{}t.FormatError=j;class V extends M{}t.AbortException=V;const q=/\x00/g;function W(e){return"string"!==typeof e?(T("The argument for removeNullCharacters must be a string."),e):e.replace(q,"")}function z(e){L(null!==e&&"object"===typeof e&&void 0!==e.length,"Invalid argument for bytesToString");const t=e.length,r=8192;if(t<r)return String.fromCharCode.apply(null,e);const i=[];for(let n=0;n<t;n+=r){const s=Math.min(n+r,t),a=e.subarray(n,s);i.push(String.fromCharCode.apply(null,a))}return i.join("")}function H(e){L("string"===typeof e,"Invalid argument for stringToBytes");const t=e.length,r=new Uint8Array(t);for(let i=0;i<t;++i)r[i]=255&e.charCodeAt(i);return r}function G(e){return void 0!==e.length?e.length:(L(void 0!==e.byteLength,"arrayByteLength - invalid argument."),e.byteLength)}function X(e){const t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];let r=0;for(let s=0;s<t;s++)r+=G(e[s]);let i=0;const n=new Uint8Array(r);for(let s=0;s<t;s++){let t=e[s];t instanceof Uint8Array||(t="string"===typeof t?H(t):new Uint8Array(t));const r=t.byteLength;n.set(t,i),i+=r}return n}function Y(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function $(){const e=new Uint8Array(4);e[0]=1;const t=new Uint32Array(e.buffer,0,1);return 1===t[0]}const K={get value(){return F(this,"value",$())}};function Q(){try{return new Function(""),!0}catch(e){return!1}}t.IsLittleEndianCached=K;const J={get value(){return F(this,"value",Q())}};t.IsEvalSupportedCached=J;const Z=["rgb(",0,",",0,",",0,")"];class ee{static makeCssRgb(e,t,r){return Z[1]=e,Z[3]=t,Z[5]=r,Z.join("")}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t){const r=e[0]*t[0]+e[1]*t[2]+t[4],i=e[0]*t[1]+e[1]*t[3]+t[5];return[r,i]}static applyInverseTransform(e,t){const r=t[0]*t[3]-t[1]*t[2],i=(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,n=(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r;return[i,n]}static getAxialAlignedBoundingBox(e,t){const r=ee.applyTransform(e,t),i=ee.applyTransform(e.slice(2,4),t),n=ee.applyTransform([e[0],e[3]],t),s=ee.applyTransform([e[2],e[1]],t);return[Math.min(r[0],i[0],n[0],s[0]),Math.min(r[1],i[1],n[1],s[1]),Math.max(r[0],i[0],n[0],s[0]),Math.max(r[1],i[1],n[1],s[1])]}static inverseTransform(e){const t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static apply3dTransform(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]]}static singularValueDecompose2dScale(e){const t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],i=e[0]*t[1]+e[1]*t[3],n=e[2]*t[0]+e[3]*t[2],s=e[2]*t[1]+e[3]*t[3],a=(r+s)/2,o=Math.sqrt((r+s)*(r+s)-4*(r*s-n*i))/2,l=a+o||1,c=a-o||1;return[Math.sqrt(l),Math.sqrt(c)]}static normalizeRect(e){const t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){function r(e,t){return e-t}const i=[e[0],e[2],t[0],t[2]].sort(r),n=[e[1],e[3],t[1],t[3]].sort(r),s=[];return e=ee.normalizeRect(e),t=ee.normalizeRect(t),i[0]===e[0]&&i[1]===t[0]||i[0]===t[0]&&i[1]===e[0]?(s[0]=i[1],s[2]=i[2],n[0]===e[1]&&n[1]===t[1]||n[0]===t[1]&&n[1]===e[1]?(s[1]=n[1],s[3]=n[2],s):null):null}}t.Util=ee;const te=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,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,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function re(e){const t=e.length,r=[];if("þ"===e[0]&&"ÿ"===e[1])for(let i=2;i<t;i+=2)r.push(String.fromCharCode(e.charCodeAt(i)<<8|e.charCodeAt(i+1)));else if("ÿ"===e[0]&&"þ"===e[1])for(let i=2;i<t;i+=2)r.push(String.fromCharCode(e.charCodeAt(i+1)<<8|e.charCodeAt(i)));else for(let i=0;i<t;++i){const t=te[e.charCodeAt(i)];r.push(t?String.fromCharCode(t):e.charAt(i))}return r.join("")}function ie(e){return decodeURIComponent(escape(e))}function ne(e){return unescape(encodeURIComponent(e))}function se(e){for(const t in e)return!1;return!0}function ae(e){return"boolean"===typeof e}function oe(e){return"number"===typeof e}function le(e){return"string"===typeof e}function ce(e){return"object"===typeof e&&null!==e&&void 0!==e.byteLength}function de(e,t){return e.length===t.length&&e.every((function(e,r){return e===t[r]}))}function he(){const e=Object.create(null);let t=!1;return Object.defineProperty(e,"settled",{get(){return t}}),e.promise=new Promise((function(r,i){e.resolve=function(e){t=!0,r(e)},e.reject=function(e){t=!0,i(e)}})),e}const ue=function(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function(t,r,i=!1){if(!i&&URL.createObjectURL){const e=new Blob([t],{type:r});return URL.createObjectURL(e)}let n=`data:${r};base64,`;for(let s=0,a=t.length;s<a;s+=3){const r=255&t[s],i=255&t[s+1],o=255&t[s+2],l=r>>2,c=(3&r)<<4|i>>4,d=s+1<a?(15&i)<<2|o>>6:64,h=s+2<a?63&o:64;n+=e[l]+e[c]+e[d]+e[h]}return n}}();t.createObjectURL=ue},function(e,t,r){"use strict";r(4)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeJS=void 0;const i="object"===typeof process&&process+""==="[object process]"&&!process.versions.nw&&!process.versions.electron;t.isNodeJS=i},function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getDocument=getDocument,exports.setPDFNetworkStreamFactory=setPDFNetworkStreamFactory,exports.build=exports.version=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFWorker=exports.PDFDataRangeTransport=exports.LoopbackPort=void 0;var _util=__w_pdfjs_require__(2),_display_utils=__w_pdfjs_require__(1),_font_loader=__w_pdfjs_require__(6),_api_compatibility=__w_pdfjs_require__(7),_canvas=__w_pdfjs_require__(8),_worker_options=__w_pdfjs_require__(10),_is_node=__w_pdfjs_require__(4),_message_handler=__w_pdfjs_require__(11),_metadata=__w_pdfjs_require__(12),_transport_stream=__w_pdfjs_require__(14),_webgl=__w_pdfjs_require__(15);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100;let createPDFNetworkStream;function setPDFNetworkStreamFactory(e){createPDFNetworkStream=e}function getDocument(e){const t=new PDFDocumentLoadingTask;let r;if("string"===typeof e)r={url:e};else if((0,_util.isArrayBuffer)(e))r={data:e};else if(e instanceof PDFDataRangeTransport)r={range:e};else{if("object"!==typeof e)throw new Error("Invalid parameter in getDocument, need either Uint8Array, string or a parameter object");if(!e.url&&!e.data&&!e.range)throw new Error("Invalid parameter object: need either .data, .range or .url");r=e}const i=Object.create(null);let n=null,s=null;for(const o in r)if("url"!==o||"undefined"===typeof window)if("range"!==o)if("worker"!==o)if("data"!==o||r[o]instanceof Uint8Array)i[o]=r[o];else{const e=r[o];if("string"===typeof e)i[o]=(0,_util.stringToBytes)(e);else if("object"!==typeof e||null===e||isNaN(e.length)){if(!(0,_util.isArrayBuffer)(e))throw new Error("Invalid PDF binary data: either typed array, string or array-like object is expected in the data property.");i[o]=new Uint8Array(e)}else i[o]=new Uint8Array(e)}else s=r[o];else n=r[o];else i[o]=new URL(r[o],window.location).href;if(i.rangeChunkSize=i.rangeChunkSize||DEFAULT_RANGE_CHUNK_SIZE,i.CMapReaderFactory=i.CMapReaderFactory||_display_utils.DOMCMapReaderFactory,i.ignoreErrors=!0!==i.stopAtErrors,i.fontExtraProperties=!0===i.fontExtraProperties,i.pdfBug=!0===i.pdfBug,Number.isInteger(i.maxImageSize)||(i.maxImageSize=-1),"boolean"!==typeof i.isEvalSupported&&(i.isEvalSupported=!0),"boolean"!==typeof i.disableFontFace&&(i.disableFontFace=_api_compatibility.apiCompatibilityParams.disableFontFace||!1),"boolean"!==typeof i.disableRange&&(i.disableRange=!1),"boolean"!==typeof i.disableStream&&(i.disableStream=!1),"boolean"!==typeof i.disableAutoFetch&&(i.disableAutoFetch=!1),(0,_util.setVerbosityLevel)(i.verbosity),!s){const e={verbosity:i.verbosity,port:_worker_options.GlobalWorkerOptions.workerPort};s=e.port?PDFWorker.fromPort(e):new PDFWorker(e),t._worker=s}const a=t.docId;return s.promise.then((function(){if(t.destroyed)throw new Error("Loading aborted");const e=_fetchDocument(s,i,n,a),r=new Promise((function(e){let t;n?t=new _transport_stream.PDFDataTransportStream({length:i.length,initialData:i.initialData,progressiveDone:i.progressiveDone,disableRange:i.disableRange,disableStream:i.disableStream},n):i.data||(t=createPDFNetworkStream({url:i.url,length:i.length,httpHeaders:i.httpHeaders,withCredentials:i.withCredentials,rangeChunkSize:i.rangeChunkSize,disableRange:i.disableRange,disableStream:i.disableStream})),e(t)}));return Promise.all([e,r]).then((function([e,r]){if(t.destroyed)throw new Error("Loading aborted");const n=new _message_handler.MessageHandler(a,e,s.port);n.postMessageTransfers=s.postMessageTransfers;const o=new WorkerTransport(n,t,r,i);t._transport=o,n.send("Ready",null)}))})).catch(t._capability.reject),t}function _fetchDocument(e,t,r,i){return e.destroyed?Promise.reject(new Error("Worker was destroyed")):(r&&(t.length=r.length,t.initialData=r.initialData,t.progressiveDone=r.progressiveDone),e.messageHandler.sendWithPromise("GetDocRequest",{docId:i,apiVersion:"2.5.207",source:{data:t.data,url:t.url,password:t.password,disableAutoFetch:t.disableAutoFetch,rangeChunkSize:t.rangeChunkSize,length:t.length},maxImageSize:t.maxImageSize,disableFontFace:t.disableFontFace,postMessageTransfers:e.postMessageTransfers,docBaseUrl:t.docBaseUrl,ignoreErrors:t.ignoreErrors,isEvalSupported:t.isEvalSupported,fontExtraProperties:t.fontExtraProperties}).then((function(t){if(e.destroyed)throw new Error("Worker was destroyed");return t})))}const PDFDocumentLoadingTask=function(){let e=0;class t{constructor(){this._capability=(0,_util.createPromiseCapability)(),this._transport=null,this._worker=null,this.docId="d"+e++,this.destroyed=!1,this.onPassword=null,this.onProgress=null,this.onUnsupportedFeature=null}get promise(){return this._capability.promise}destroy(){this.destroyed=!0;const e=this._transport?this._transport.destroy():Promise.resolve();return e.then((()=>{this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}))}}return t}();class PDFDataRangeTransport{constructor(e,t,r=!1){this.length=e,this.initialData=t,this.progressiveDone=r,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,_util.createPromiseCapability)()}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(const r of this._rangeListeners)r(e,t)}onDataProgress(e,t){this._readyCapability.promise.then((()=>{for(const r of this._progressListeners)r(e,t)}))}onDataProgressiveRead(e){this._readyCapability.promise.then((()=>{for(const t of this._progressiveReadListeners)t(e)}))}onDataProgressiveDone(){this._readyCapability.promise.then((()=>{for(const e of this._progressiveDoneListeners)e()}))}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(e,t){this._pdfInfo=e,this._transport=t}get numPages(){return this._pdfInfo.numPages}get fingerprint(){return this._pdfInfo.fingerprint}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getOpenActionDestination(){return(0,_display_utils.deprecated)("getOpenActionDestination, use getOpenAction instead."),this.getOpenAction().then((function(e){return e&&e.dest?e.dest:null}))}getAttachments(){return this._transport.getAttachments()}getJavaScript(){return this._transport.getJavaScript()}getOutline(){return this._transport.getOutline()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getData(){return this._transport.getData()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}getStats(){return this._transport.getStats()}cleanup(){return this._transport.startCleanup()}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{constructor(e,t,r,i=!1){this._pageIndex=e,this._pageInfo=t,this._transport=r,this._stats=i?new _display_utils.StatTimer:null,this._pdfBug=i,this.commonObjs=r.commonObjs,this.objs=new PDFObjects,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this.intentStates=Object.create(null),this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:e,rotation:t=this.rotate,offsetX:r=0,offsetY:i=0,dontFlip:n=!1}={}){return new _display_utils.PageViewport({viewBox:this.view,scale:e,rotation:t,offsetX:r,offsetY:i,dontFlip:n})}getAnnotations({intent:e=null}={}){return this.annotationsPromise&&this.annotationsIntent===e||(this.annotationsPromise=this._transport.getAnnotations(this._pageIndex,e),this.annotationsIntent=e),this.annotationsPromise}render({canvasContext:e,viewport:t,intent:r="display",enableWebGL:i=!1,renderInteractiveForms:n=!1,transform:s=null,imageLayer:a=null,canvasFactory:o=null,background:l=null}){this._stats&&this._stats.time("Overall");const c="print"===r?"print":"display";this.pendingCleanup=!1,this.intentStates[c]||(this.intentStates[c]=Object.create(null));const d=this.intentStates[c];d.streamReaderCancelTimeout&&(clearTimeout(d.streamReaderCancelTimeout),d.streamReaderCancelTimeout=null);const h=o||new _display_utils.DOMCanvasFactory,u=new _webgl.WebGLContext({enable:i});d.displayReadyCapability||(d.displayReadyCapability=(0,_util.createPromiseCapability)(),d.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:c,renderInteractiveForms:!0===n}));const p=e=>{const t=d.renderTasks.indexOf(g);t>=0&&d.renderTasks.splice(t,1),(this.cleanupAfterRender||"print"===c)&&(this.pendingCleanup=!0),this._tryCleanup(),e?(g.capability.reject(e),this._abortOperatorList({intentState:d,reason:e})):g.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"))},g=new InternalRenderTask({callback:p,params:{canvasContext:e,viewport:t,transform:s,imageLayer:a,background:l},objs:this.objs,commonObjs:this.commonObjs,operatorList:d.operatorList,pageIndex:this._pageIndex,canvasFactory:h,webGLContext:u,useRequestAnimationFrame:"print"!==c,pdfBug:this._pdfBug});d.renderTasks||(d.renderTasks=[]),d.renderTasks.push(g);const f=g.task;return d.displayReadyCapability.promise.then((e=>{this.pendingCleanup?p():(this._stats&&this._stats.time("Rendering"),g.initializeGraphics(e),g.operatorListChanged())})).catch(p),f}getOperatorList(){function e(){if(r.operatorList.lastChunk){r.opListReadCapability.resolve(r.operatorList);const e=r.renderTasks.indexOf(i);e>=0&&r.renderTasks.splice(e,1)}}const t="oplist";this.intentStates[t]||(this.intentStates[t]=Object.create(null));const r=this.intentStates[t];let i;return r.opListReadCapability||(i={},i.operatorListChanged=e,r.opListReadCapability=(0,_util.createPromiseCapability)(),r.renderTasks=[],r.renderTasks.push(i),r.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:t})),r.opListReadCapability.promise}streamTextContent({normalizeWhitespace:e=!1,disableCombineTextItems:t=!1}={}){const r=100;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,normalizeWhitespace:!0===e,combineTextItems:!0!==t},{highWaterMark:r,size(e){return e.items.length}})}getTextContent(e={}){const t=this.streamTextContent(e);return new Promise((function(e,r){function i(){n.read().then((function({value:t,done:r}){r?e(s):(Object.assign(s.styles,t.styles),s.items.push(...t.items),i())}),r)}const n=t.getReader(),s={items:[],styles:Object.create(null)};i()}))}_destroy(){this.destroyed=!0,this._transport.pageCache[this._pageIndex]=null;const e=[];return Object.keys(this.intentStates).forEach((t=>{const r=this.intentStates[t];this._abortOperatorList({intentState:r,reason:new Error("Page was destroyed."),force:!0}),"oplist"!==t&&r.renderTasks.forEach((function(t){const r=t.capability.promise.catch((function(){}));e.push(r),t.cancel()}))})),this.objs.clear(),this.annotationsPromise=null,this.pendingCleanup=!1,Promise.all(e)}cleanup(e=!1){return this.pendingCleanup=!0,this._tryCleanup(e)}_tryCleanup(e=!1){return!(!this.pendingCleanup||Object.keys(this.intentStates).some((e=>{const t=this.intentStates[e];return 0!==t.renderTasks.length||!t.operatorList.lastChunk})))&&(Object.keys(this.intentStates).forEach((e=>{delete this.intentStates[e]})),this.objs.clear(),this.annotationsPromise=null,e&&this._stats&&(this._stats=new _display_utils.StatTimer),this.pendingCleanup=!1,!0)}_startRenderPage(e,t){const r=this.intentStates[t];r&&(this._stats&&this._stats.timeEnd("Page Request"),r.displayReadyCapability&&r.displayReadyCapability.resolve(e))}_renderPageChunk(e,t){for(let r=0,i=e.length;r<i;r++)t.operatorList.fnArray.push(e.fnArray[r]),t.operatorList.argsArray.push(e.argsArray[r]);t.operatorList.lastChunk=e.lastChunk;for(let r=0;r<t.renderTasks.length;r++)t.renderTasks[r].operatorListChanged();e.lastChunk&&this._tryCleanup()}_pumpOperatorList(e){(0,_util.assert)(e.intent,'PDFPageProxy._pumpOperatorList: Expected "intent" argument.');const t=this._transport.messageHandler.sendWithStream("GetOperatorList",e),r=t.getReader(),i=this.intentStates[e.intent];i.streamReader=r;const n=()=>{r.read().then((({value:e,done:t})=>{t?i.streamReader=null:this._transport.destroyed||(this._renderPageChunk(e,i),n())}),(e=>{if(i.streamReader=null,!this._transport.destroyed){if(i.operatorList){i.operatorList.lastChunk=!0;for(let e=0;e<i.renderTasks.length;e++)i.renderTasks[e].operatorListChanged();this._tryCleanup()}if(i.displayReadyCapability)i.displayReadyCapability.reject(e);else{if(!i.opListReadCapability)throw e;i.opListReadCapability.reject(e)}}}))};n()}_abortOperatorList({intentState:e,reason:t,force:r=!1}){if((0,_util.assert)(t instanceof Error||"object"===typeof t&&null!==t,'PDFPageProxy._abortOperatorList: Expected "reason" argument.'),e.streamReader){if(!r){if(0!==e.renderTasks.length)return;if(t instanceof _display_utils.RenderingCancelledException)return void(e.streamReaderCancelTimeout=setTimeout((()=>{this._abortOperatorList({intentState:e,reason:t,force:!0}),e.streamReaderCancelTimeout=null}),RENDERING_CANCELLED_TIMEOUT))}e.streamReader.cancel(new _util.AbortException(t&&t.message)),e.streamReader=null,this._transport.destroyed||(Object.keys(this.intentStates).some((t=>this.intentStates[t]===e&&(delete this.intentStates[t],!0))),this.cleanup())}}get stats(){return this._stats}}exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{constructor(e=!0){this._listeners=[],this._defer=e,this._deferred=Promise.resolve(void 0)}postMessage(e,t){function r(e){if("object"!==typeof e||null===e)return e;if(i.has(e))return i.get(e);let n,s;if((n=e.buffer)&&(0,_util.isArrayBuffer)(n)){const r=t&&t.includes(n);return s=r?new e.constructor(n,e.byteOffset,e.byteLength):new e.constructor(e),i.set(e,s),s}s=Array.isArray(e)?[]:{},i.set(e,s);for(const t in e){let i,n=e;while(!(i=Object.getOwnPropertyDescriptor(n,t)))n=Object.getPrototypeOf(n);if("undefined"!==typeof i.value)if("function"!==typeof i.value)s[t]=r(i.value);else if(e.hasOwnProperty&&e.hasOwnProperty(t))throw new Error(`LoopbackPort.postMessage - cannot clone: ${e[t]}`)}return s}if(!this._defer)return void this._listeners.forEach((t=>{t.call(this,{data:e})}));const i=new WeakMap,n={data:r(e)};this._deferred.then((()=>{this._listeners.forEach((e=>{e.call(this,n)}))}))}addEventListener(e,t){this._listeners.push(t)}removeEventListener(e,t){const r=this._listeners.indexOf(t);this._listeners.splice(r,1)}terminate(){this._listeners.length=0}}exports.LoopbackPort=LoopbackPort;const PDFWorker=function PDFWorkerClosure(){const pdfWorkerPorts=new WeakMap;let isWorkerDisabled=!1,fallbackWorkerSrc,nextFakeWorkerId=0,fakeWorkerCapability;if(_is_node.isNodeJS)isWorkerDisabled=!0,fallbackWorkerSrc="./pdf.worker.js";else if("object"===typeof document&&"currentScript"in document){const e=document.currentScript&&document.currentScript.src;e&&(fallbackWorkerSrc=e.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}function getWorkerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if("undefined"!==typeof fallbackWorkerSrc)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}function getMainThreadWorkerMessageHandler(){let e;try{e=globalThis.pdfjsWorker&&globalThis.pdfjsWorker.WorkerMessageHandler}catch(t){}return e||null}function setupFakeWorkerGlobal(){if(fakeWorkerCapability)return fakeWorkerCapability.promise;fakeWorkerCapability=(0,_util.createPromiseCapability)();const loader=async function(){const mainWorkerMessageHandler=getMainThreadWorkerMessageHandler();if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_is_node.isNodeJS){const worker=eval("require")(getWorkerSrc());return worker.WorkerMessageHandler}return await(0,_display_utils.loadScript)(getWorkerSrc()),window.pdfjsWorker.WorkerMessageHandler};return loader().then(fakeWorkerCapability.resolve,fakeWorkerCapability.reject),fakeWorkerCapability.promise}function createCDNWrapper(e){const t="importScripts('"+e+"');";return URL.createObjectURL(new Blob([t]))}class PDFWorker{constructor({name:e=null,port:t=null,verbosity:r=(0,_util.getVerbosityLevel)()}={}){if(t&&pdfWorkerPorts.has(t))throw new Error("Cannot use more than one PDFWorker per port");if(this.name=e,this.destroyed=!1,this.postMessageTransfers=!0,this.verbosity=r,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,t)return pdfWorkerPorts.set(t,this),void this._initializeFromPort(t);this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new _message_handler.MessageHandler("main","worker",e),this._messageHandler.on("ready",(function(){})),this._readyCapability.resolve()}_initialize(){if("undefined"!==typeof Worker&&!isWorkerDisabled&&!getMainThreadWorkerMessageHandler()){let t=getWorkerSrc();try{(0,_util.isSameOrigin)(window.location.href,t)||(t=createCDNWrapper(new URL(t,window.location).href));const e=new Worker(t),r=new _message_handler.MessageHandler("main","worker",e),i=()=>{e.removeEventListener("error",n),r.destroy(),e.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},n=()=>{this._webWorker||i()};e.addEventListener("error",n),r.on("test",(t=>{e.removeEventListener("error",n),this.destroyed?i():t?(this._messageHandler=r,this._port=e,this._webWorker=e,t.supportTransfers||(this.postMessageTransfers=!1),this._readyCapability.resolve(),r.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),r.destroy(),e.terminate())})),r.on("ready",(t=>{if(e.removeEventListener("error",n),this.destroyed)i();else try{s()}catch(r){this._setupFakeWorker()}}));const s=()=>{const e=new Uint8Array([this.postMessageTransfers?255:0]);try{r.send("test",e,[e.buffer])}catch(t){(0,_util.warn)("Cannot use postMessage transfers."),e[0]=0,r.send("test",e)}};return void s()}catch(e){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),isWorkerDisabled=!0),setupFakeWorkerGlobal().then((e=>{if(this.destroyed)return void this._readyCapability.reject(new Error("Worker was destroyed"));const t=new LoopbackPort;this._port=t;const r="fake"+nextFakeWorkerId++,i=new _message_handler.MessageHandler(r+"_worker",r,t);e.setup(i,t);const n=new _message_handler.MessageHandler(r,r+"_worker",t);this._messageHandler=n,this._readyCapability.resolve(),n.send("configure",{verbosity:this.verbosity})})).catch((e=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${e.message}".`))}))}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),pdfWorkerPorts.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(e){if(!e||!e.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return pdfWorkerPorts.has(e.port)?pdfWorkerPorts.get(e.port):new PDFWorker(e)}static getWorkerSrc(){return getWorkerSrc()}}return PDFWorker}();exports.PDFWorker=PDFWorker;class WorkerTransport{constructor(e,t,r,i){this.messageHandler=e,this.loadingTask=t,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({docId:t.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this)}),this._params=i,this.CMapReaderFactory=new i.CMapReaderFactory({baseUrl:i.cMapUrl,isCompressed:i.cMapPacked}),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=r,this._fullReader=null,this._lastProgress=null,this.pageCache=[],this.pagePromises=[],this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=(0,_util.createPromiseCapability)(),this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));const e=[];this.pageCache.forEach((function(t){t&&e.push(t._destroy())})),this.pageCache.length=0,this.pagePromises.length=0;const t=this.messageHandler.sendWithPromise("Terminate",null);return e.push(t),Promise.all(e).then((()=>{this.fontLoader.clear(),this._networkStream&&this._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()}),this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:e,loadingTask:t}=this;e.on("GetReader",((e,t)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=e=>{this._lastProgress={loaded:e.loaded,total:e.total}},t.onPull=()=>{this._fullReader.read().then((function({value:e,done:r}){r?t.close():((0,_util.assert)((0,_util.isArrayBuffer)(e),"GetReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(e),1,[e]))})).catch((e=>{t.error(e)}))},t.onCancel=e=>{this._fullReader.cancel(e)}})),e.on("ReaderHeadersReady",(e=>{const r=(0,_util.createPromiseCapability)(),i=this._fullReader;return i.headersReady.then((()=>{i.isStreamingSupported&&i.isRangeSupported||(this._lastProgress&&t.onProgress&&t.onProgress(this._lastProgress),i.onProgress=e=>{t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})}),r.resolve({isStreamingSupported:i.isStreamingSupported,isRangeSupported:i.isRangeSupported,contentLength:i.contentLength})}),r.reject),r.promise})),e.on("GetRangeReader",((e,t)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const r=this._networkStream.getRangeReader(e.begin,e.end);r?(t.onPull=()=>{r.read().then((function({value:e,done:r}){r?t.close():((0,_util.assert)((0,_util.isArrayBuffer)(e),"GetRangeReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(e),1,[e]))})).catch((e=>{t.error(e)}))},t.onCancel=e=>{r.cancel(e)}):t.close()})),e.on("GetDoc",(({pdfInfo:e})=>{this._numPages=e.numPages,t._capability.resolve(new PDFDocumentProxy(e,this))})),e.on("DocException",(function(e){let r;switch(e.name){case"PasswordException":r=new _util.PasswordException(e.message,e.code);break;case"InvalidPDFException":r=new _util.InvalidPDFException(e.message);break;case"MissingPDFException":r=new _util.MissingPDFException(e.message);break;case"UnexpectedResponseException":r=new _util.UnexpectedResponseException(e.message,e.status);break;case"UnknownErrorException":r=new _util.UnknownErrorException(e.message,e.details);break}t._capability.reject(r)})),e.on("PasswordRequest",(e=>{if(this._passwordCapability=(0,_util.createPromiseCapability)(),t.onPassword){const i=e=>{this._passwordCapability.resolve({password:e})};try{t.onPassword(i,e.code)}catch(r){this._passwordCapability.reject(r)}}else this._passwordCapability.reject(new _util.PasswordException(e.message,e.code));return this._passwordCapability.promise})),e.on("DataLoaded",(e=>{t.onProgress&&t.onProgress({loaded:e.length,total:e.length}),this.downloadInfoCapability.resolve(e)})),e.on("StartRenderPage",(e=>{if(this.destroyed)return;const t=this.pageCache[e.pageIndex];t._startRenderPage(e.transparency,e.intent)})),e.on("commonobj",(t=>{if(this.destroyed)return;const[r,i,n]=t;if(!this.commonObjs.has(r))switch(i){case"Font":const t=this._params;if("error"in n){const e=n.error;(0,_util.warn)(`Error during font loading: ${e}`),this.commonObjs.resolve(r,e);break}let s=null;t.pdfBug&&globalThis.FontInspector&&globalThis.FontInspector.enabled&&(s={registerFont(e,t){globalThis.FontInspector.fontAdded(e,t)}});const a=new _font_loader.FontFaceObject(n,{isEvalSupported:t.isEvalSupported,disableFontFace:t.disableFontFace,ignoreErrors:t.ignoreErrors,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),fontRegistry:s});this.fontLoader.bind(a).catch((t=>e.sendWithPromise("FontFallback",{id:r}))).finally((()=>{!t.fontExtraProperties&&a.data&&(a.data=null),this.commonObjs.resolve(r,a)}));break;case"FontPath":case"FontType3Res":case"Image":this.commonObjs.resolve(r,n);break;default:throw new Error(`Got unknown common object type ${i}`)}})),e.on("obj",(e=>{if(this.destroyed)return;const[t,r,i,n]=e,s=this.pageCache[r];if(!s.objs.has(t))switch(i){case"Image":s.objs.resolve(t,n);const e=8e6;n&&"data"in n&&n.data.length>e&&(s.cleanupAfterRender=!0);break;default:throw new Error(`Got unknown object type ${i}`)}})),e.on("DocProgress",(e=>{this.destroyed||t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})})),e.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),e.on("FetchBuiltInCMap",((e,t)=>{if(this.destroyed)return void t.error(new Error("Worker was destroyed"));let r=!1;t.onPull=()=>{r?t.close():(r=!0,this.CMapReaderFactory.fetch(e).then((function(e){t.enqueue(e,1,[e.cMapData.buffer])})).catch((function(e){t.error(e)})))}}))}_onUnsupportedFeature({featureId:e}){this.destroyed||this.loadingTask.onUnsupportedFeature&&this.loadingTask.onUnsupportedFeature(e)}getData(){return this.messageHandler.sendWithPromise("GetData",null)}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request"));const t=e-1;if(t in this.pagePromises)return this.pagePromises[t];const r=this.messageHandler.sendWithPromise("GetPage",{pageIndex:t}).then((e=>{if(this.destroyed)throw new Error("Transport destroyed");const r=new PDFPageProxy(t,e,this,this._params.pdfBug);return this.pageCache[t]=r,r}));return this.pagePromises[t]=r,r}getPageIndex(e){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:e}).catch((function(e){return Promise.reject(new Error(e))}))}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return"string"!==typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getJavaScript(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){return this.messageHandler.sendWithPromise("GetMetadata",null).then((e=>({info:e[0],metadata:e[1]?new _metadata.Metadata(e[1]):null,contentDispositionFilename:this._fullReader?this._fullReader.filename:null})))}getStats(){return this.messageHandler.sendWithPromise("GetStats",null)}startCleanup(){return this.messageHandler.sendWithPromise("Cleanup",null).then((()=>{for(let e=0,t=this.pageCache.length;e<t;e++){const t=this.pageCache[e];if(t){const r=t.cleanup();if(!r)throw new Error(`startCleanup: Page ${e+1} is currently rendering.`)}}this.commonObjs.clear(),this.fontLoader.clear()}))}get loadingParams(){const e=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:e.disableAutoFetch,disableFontFace:e.disableFontFace})}}class PDFObjects{constructor(){this._objs=Object.create(null)}_ensureObj(e){return this._objs[e]?this._objs[e]:this._objs[e]={capability:(0,_util.createPromiseCapability)(),data:null,resolved:!1}}get(e,t=null){if(t)return this._ensureObj(e).capability.promise.then(t),null;const r=this._objs[e];if(!r||!r.resolved)throw new Error(`Requesting object that isn't resolved yet ${e}.`);return r.data}has(e){const t=this._objs[e];return!!t&&t.resolved}resolve(e,t){const r=this._ensureObj(e);r.resolved=!0,r.data=t,r.capability.resolve(t)}clear(){this._objs=Object.create(null)}}class RenderTask{constructor(e){this._internalRenderTask=e,this.onContinue=null}get promise(){return this._internalRenderTask.capability.promise}cancel(){this._internalRenderTask.cancel()}}const InternalRenderTask=function(){const e=new WeakSet;class t{constructor({callback:e,params:t,objs:r,commonObjs:i,operatorList:n,pageIndex:s,canvasFactory:a,webGLContext:o,useRequestAnimationFrame:l=!1,pdfBug:c=!1}){this.callback=e,this.params=t,this.objs=r,this.commonObjs=i,this.operatorListIdx=null,this.operatorList=n,this._pageIndex=s,this.canvasFactory=a,this.webGLContext=o,this._pdfBug=c,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===l&&"undefined"!==typeof window,this.cancelled=!1,this.capability=(0,_util.createPromiseCapability)(),this.task=new RenderTask(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=t.canvasContext.canvas}initializeGraphics(t=!1){if(this.cancelled)return;if(this._canvas){if(e.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");e.add(this._canvas)}this._pdfBug&&globalThis.StepperManager&&globalThis.StepperManager.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:r,viewport:i,transform:n,imageLayer:s,background:a}=this.params;this.gfx=new _canvas.CanvasGraphics(r,this.commonObjs,this.objs,this.canvasFactory,this.webGLContext,s),this.gfx.beginDrawing({transform:n,viewport:i,transparency:t,background:a}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}cancel(t=null){this.running=!1,this.cancelled=!0,this.gfx&&this.gfx.endDrawing(),this._canvas&&e.delete(this._canvas),this.callback(t||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,"canvas"))}operatorListChanged(){this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame((()=>{this._nextBound().catch(this.cancel.bind(this))})):Promise.resolve().then(this._nextBound).catch(this.cancel.bind(this))}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),this._canvas&&e.delete(this._canvas),this.callback())))}}return t}(),version="2.5.207";exports.version=version;const build="0974d605";exports.build=build},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var i=r(2);class n{constructor({docId:e,onUnsupportedFeature:t}){this.constructor===n&&(0,i.unreachable)("Cannot initialize BaseFontLoader."),this.docId=e,this._onUnsupportedFeature=t,this.nativeFontFaces=[],this.styleElement=null}addNativeFontFace(e){this.nativeFontFaces.push(e),document.fonts.add(e)}insertRule(e){let t=this.styleElement;t||(t=this.styleElement=document.createElement("style"),t.id=`PDFJS_FONT_STYLE_TAG_${this.docId}`,document.documentElement.getElementsByTagName("head")[0].appendChild(t));const r=t.sheet;r.insertRule(e,r.cssRules.length)}clear(){this.nativeFontFaces.forEach((function(e){document.fonts.delete(e)})),this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async bind(e){if(e.attached||e.missingFile)return;if(e.attached=!0,this.isFontLoadingAPISupported){const t=e.createNativeFontFace();if(t){this.addNativeFontFace(t);try{await t.loaded}catch(r){throw this._onUnsupportedFeature({featureId:i.UNSUPPORTED_FEATURES.errorFontLoadNative}),(0,i.warn)(`Failed to load font '${t.family}': '${r}'.`),e.disableFontFace=!0,r}}return}const t=e.createFontFaceRule();if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return;await new Promise((r=>{const i=this._queueLoadingCallback(r);this._prepareFontLoadEvent([t],[e],i)}))}}_queueLoadingCallback(e){(0,i.unreachable)("Abstract method `_queueLoadingCallback`.")}get isFontLoadingAPISupported(){const e="undefined"!==typeof document&&!!document.fonts;return(0,i.shadow)(this,"isFontLoadingAPISupported",e)}get isSyncFontLoadingSupported(){(0,i.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}get _loadTestFont(){(0,i.unreachable)("Abstract method `_loadTestFont`.")}_prepareFontLoadEvent(e,t,r){(0,i.unreachable)("Abstract method `_prepareFontLoadEvent`.")}}let s;t.FontLoader=s,t.FontLoader=s=class extends n{constructor(e){super(e),this.loadingContext={requests:[],nextRequestId:0},this.loadTestFontId=0}get isSyncFontLoadingSupported(){let e=!1;if("undefined"===typeof navigator)e=!0;else{const t=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);t&&t[1]>=14&&(e=!0)}return(0,i.shadow)(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){function t(){(0,i.assert)(!n.done,"completeRequest() cannot be called twice."),n.done=!0;while(r.requests.length>0&&r.requests[0].done){const e=r.requests.shift();setTimeout(e.callback,0)}}const r=this.loadingContext,n={id:"pdfjs-font-loading-"+r.nextRequestId++,done:!1,complete:t,callback:e};return r.requests.push(n),n}get _loadTestFont(){const e=function(){return atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==")};return(0,i.shadow)(this,"_loadTestFont",e())}_prepareFontLoadEvent(e,t,r){function n(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function s(e,t,r,i){const n=e.substring(0,t),s=e.substring(t+r);return n+i+s}let a,o;const l=document.createElement("canvas");l.width=1,l.height=1;const c=l.getContext("2d");let d=0;function h(e,t){if(d++,d>30)return(0,i.warn)("Load test font never loaded."),void t();c.font="30px "+e,c.fillText(".",0,20);const r=c.getImageData(0,0,1,1);r.data[3]>0?t():setTimeout(h.bind(null,e,t))}const u=`lt${Date.now()}${this.loadTestFontId++}`;let p=this._loadTestFont;const g=976;p=s(p,g,u.length,u);const f=16,m=1482184792;let _=n(p,f);for(a=0,o=u.length-3;a<o;a+=4)_=_-m+n(u,a)|0;a<u.length&&(_=_-m+n(u+"XXX",a)|0),p=s(p,f,4,(0,i.string32)(_));const b=`url(data:font/opentype;base64,${btoa(p)});`,v=`@font-face {font-family:"${u}";src:${b}}`;this.insertRule(v);const y=[];for(a=0,o=t.length;a<o;a++)y.push(t[a].loadedName);y.push(u);const A=document.createElement("div");for(A.style.visibility="hidden",A.style.width=A.style.height="10px",A.style.position="absolute",A.style.top=A.style.left="0px",a=0,o=y.length;a<o;++a){const e=document.createElement("span");e.textContent="Hi",e.style.fontFamily=y[a],A.appendChild(e)}document.body.appendChild(A),h(u,(function(){document.body.removeChild(A),r.complete()}))}};class a{constructor(e,{isEvalSupported:t=!0,disableFontFace:r=!1,ignoreErrors:i=!1,onUnsupportedFeature:n=null,fontRegistry:s=null}){this.compiledGlyphs=Object.create(null);for(const a in e)this[a]=e[a];this.isEvalSupported=!1!==t,this.disableFontFace=!0===r,this.ignoreErrors=!0===i,this._onUnsupportedFeature=n,this.fontRegistry=s}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;const e=new FontFace(this.loadedName,this.data,{});return this.fontRegistry&&this.fontRegistry.registerFont(this),e}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const e=(0,i.bytesToString)(new Uint8Array(this.data)),t=`url(data:${this.mimetype};base64,${btoa(e)});`,r=`@font-face {font-family:"${this.loadedName}";src:${t}}`;return this.fontRegistry&&this.fontRegistry.registerFont(this,t),r}getPathGenerator(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];let r,n;try{r=e.get(this.loadedName+"_path_"+t)}catch(s){if(!this.ignoreErrors)throw s;return this._onUnsupportedFeature&&this._onUnsupportedFeature({featureId:i.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,i.warn)(`getPathGenerator - ignoring character: "${s}".`),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&i.IsEvalSupportedCached.value){let e,i="";for(let t=0,s=r.length;t<s;t++)n=r[t],e=void 0!==n.args?n.args.join(","):"",i+="c."+n.cmd+"("+e+");\n";return this.compiledGlyphs[t]=new Function("c","size",i)}return this.compiledGlyphs[t]=function(e,t){for(let i=0,s=r.length;i<s;i++)n=r[i],"scale"===n.cmd&&(n.args=[t,-t]),e[n.cmd].apply(e,n.args)}}}t.FontFaceObject=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.apiCompatibilityParams=void 0;var i=r(4);const n=Object.create(null);(function(){i.isNodeJS&&(n.disableFontFace=!0)})();const s=Object.freeze(n);t.apiCompatibilityParams=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var i=r(2),n=r(9),s=16,a=100,o=4096,l=.65,c=!0,d=1e3,h=16;function u(e){e.mozCurrentTransform||(e._originalSave=e.save,e._originalRestore=e.restore,e._originalRotate=e.rotate,e._originalScale=e.scale,e._originalTranslate=e.translate,e._originalTransform=e.transform,e._originalSetTransform=e.setTransform,e._transformMatrix=e._transformMatrix||[1,0,0,1,0,0],e._transformStack=[],Object.defineProperty(e,"mozCurrentTransform",{get:function(){return this._transformMatrix}}),Object.defineProperty(e,"mozCurrentTransformInverse",{get:function(){var e=this._transformMatrix,t=e[0],r=e[1],i=e[2],n=e[3],s=e[4],a=e[5],o=t*n-r*i,l=r*i-t*n;return[n/o,r/l,i/l,t/o,(n*s-i*a)/l,(r*s-t*a)/o]}}),e.save=function(){var e=this._transformMatrix;this._transformStack.push(e),this._transformMatrix=e.slice(0,6),this._originalSave()},e.restore=function(){var e=this._transformStack.pop();e&&(this._transformMatrix=e,this._originalRestore())},e.translate=function(e,t){var r=this._transformMatrix;r[4]=r[0]*e+r[2]*t+r[4],r[5]=r[1]*e+r[3]*t+r[5],this._originalTranslate(e,t)},e.scale=function(e,t){var r=this._transformMatrix;r[0]=r[0]*e,r[1]=r[1]*e,r[2]=r[2]*t,r[3]=r[3]*t,this._originalScale(e,t)},e.transform=function(t,r,i,n,s,a){var o=this._transformMatrix;this._transformMatrix=[o[0]*t+o[2]*r,o[1]*t+o[3]*r,o[0]*i+o[2]*n,o[1]*i+o[3]*n,o[0]*s+o[2]*a+o[4],o[1]*s+o[3]*a+o[5]],e._originalTransform(t,r,i,n,s,a)},e.setTransform=function(t,r,i,n,s,a){this._transformMatrix=[t,r,i,n,s,a],e._originalSetTransform(t,r,i,n,s,a)},e.rotate=function(e){var t=Math.cos(e),r=Math.sin(e),i=this._transformMatrix;this._transformMatrix=[i[0]*t+i[2]*r,i[1]*t+i[3]*r,i[0]*-r+i[2]*t,i[1]*-r+i[3]*t,i[4],i[5]],this._originalRotate(e)})}var p=function(){function e(e){this.canvasFactory=e,this.cache=Object.create(null)}return e.prototype={getCanvas:function(e,t,r,i){var n;return void 0!==this.cache[e]?(n=this.cache[e],this.canvasFactory.reset(n,t,r),n.context.setTransform(1,0,0,1,0,0)):(n=this.canvasFactory.create(t,r),this.cache[e]=n),i&&u(n.context),n},clear(){for(var e in this.cache){var t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}},e}();function g(e){var t,r,i,n,s=1e3,a=e.width,o=e.height,l=a+1,c=new Uint8Array(l*(o+1)),d=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),h=a+7&-8,u=e.data,p=new Uint8Array(h*o),g=0;for(t=0,n=u.length;t<n;t++){var f=128,m=u[t];while(f>0)p[g++]=m&f?0:255,f>>=1}var _=0;for(g=0,0!==p[g]&&(c[0]=1,++_),r=1;r<a;r++)p[g]!==p[g+1]&&(c[r]=p[g]?2:1,++_),g++;for(0!==p[g]&&(c[r]=2,++_),t=1;t<o;t++){g=t*h,i=t*l,p[g-h]!==p[g]&&(c[i]=p[g]?1:8,++_);var b=(p[g]?4:0)+(p[g-h]?8:0);for(r=1;r<a;r++)b=(b>>2)+(p[g+1]?4:0)+(p[g-h+1]?8:0),d[b]&&(c[i+r]=d[b],++_),g++;if(p[g-h]!==p[g]&&(c[i+r]=p[g]?2:4,++_),_>s)return null}for(g=h*(o-1),i=t*l,0!==p[g]&&(c[i]=8,++_),r=1;r<a;r++)p[g]!==p[g+1]&&(c[i+r]=p[g]?4:8,++_),g++;if(0!==p[g]&&(c[i+r]=4,++_),_>s)return null;var v=new Int32Array([0,l,-1,0,-l,0,0,0,1]),y=[];for(t=0;_&&t<=o;t++){var A=t*l,w=A+a;while(A<w&&!c[A])A++;if(A!==w){var S,C=[A%l,t],x=c[A],P=A;do{var T=v[x];do{A+=T}while(!c[A]);S=c[A],5!==S&&10!==S?(x=S,c[A]=0):(x=S&51*x>>4,c[A]&=x>>2|x<<2),C.push(A%l),C.push(A/l|0),c[A]||--_}while(P!==A);y.push(C),--t}}var E=function(e){e.save(),e.scale(1/a,-1/o),e.translate(0,-o),e.beginPath();for(let r=0,i=y.length;r<i;r++){var t=y[r];e.moveTo(t[0],t[1]);for(let r=2,i=t.length;r<i;r+=2)e.lineTo(t[r],t[r+1])}e.fill(),e.beginPath(),e.restore()};return E}var f=function(){function e(){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=i.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=i.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=i.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.resumeSMaskCtx=null}return e.prototype={clone:function(){return Object.create(this)},setCurrentPoint:function(e,t){this.x=e,this.y=t}},e}(),m=function(){var e=15,t=10;function r(e,t,r,i,n,s){this.ctx=e,this.current=new f,this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=r,this.canvasFactory=i,this.webGLContext=n,this.imageLayer=s,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.cachedCanvases=new p(this.canvasFactory),e&&u(e),this._cachedGetSinglePixelWidth=null}function m(e,t){if("undefined"!==typeof ImageData&&t instanceof ImageData)e.putImageData(t,0,0);else{var r,n,s,a,o,l=t.height,c=t.width,d=l%h,u=(l-d)/h,p=0===d?u:u+1,g=e.createImageData(c,h),f=0,m=t.data,_=g.data;if(t.kind===i.ImageKind.GRAYSCALE_1BPP){var b=m.byteLength,v=new Uint32Array(_.buffer,0,_.byteLength>>2),y=v.length,A=c+7>>3,w=4294967295,S=i.IsLittleEndianCached.value?4278190080:255;for(n=0;n<p;n++){for(a=n<u?h:d,r=0,s=0;s<a;s++){for(var C=b-f,x=0,P=C>A?c:8*C-7,T=-8&P,E=0,L=0;x<T;x+=8)L=m[f++],v[r++]=128&L?w:S,v[r++]=64&L?w:S,v[r++]=32&L?w:S,v[r++]=16&L?w:S,v[r++]=8&L?w:S,v[r++]=4&L?w:S,v[r++]=2&L?w:S,v[r++]=1&L?w:S;for(;x<P;x++)0===E&&(L=m[f++],E=128),v[r++]=L&E?w:S,E>>=1}while(r<y)v[r++]=0;e.putImageData(g,0,n*h)}}else if(t.kind===i.ImageKind.RGBA_32BPP){for(s=0,o=c*h*4,n=0;n<u;n++)_.set(m.subarray(f,f+o)),f+=o,e.putImageData(g,0,s),s+=h;n<p&&(o=c*d*4,_.set(m.subarray(f,f+o)),e.putImageData(g,0,s))}else{if(t.kind!==i.ImageKind.RGB_24BPP)throw new Error(`bad image kind: ${t.kind}`);for(a=h,o=c*a,n=0;n<p;n++){for(n>=u&&(a=d,o=c*a),r=0,s=o;s--;)_[r++]=m[f++],_[r++]=m[f++],_[r++]=m[f++],_[r++]=255;e.putImageData(g,0,n*h)}}}}function _(e,t){for(var r=t.height,i=t.width,n=r%h,s=(r-n)/h,a=0===n?s:s+1,o=e.createImageData(i,h),l=0,c=t.data,d=o.data,u=0;u<a;u++){for(var p=u<s?h:n,g=3,f=0;f<p;f++)for(var m=0,_=0;_<i;_++){if(!m){var b=c[l++];m=128}d[g]=b&m?0:255,g+=4,m>>=1}e.putImageData(o,0,u*h)}}function b(e,t){for(var r=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],i=0,n=r.length;i<n;i++){var s=r[i];void 0!==e[s]&&(t[s]=e[s])}void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function v(e){e.strokeStyle="#000000",e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",void 0!==e.setLineDash&&(e.setLineDash([]),e.lineDashOffset=0)}function y(e,t,r,i){for(var n=e.length,s=3;s<n;s+=4){var a=e[s];if(0===a)e[s-3]=t,e[s-2]=r,e[s-1]=i;else if(a<255){var o=255-a;e[s-3]=e[s-3]*a+t*o>>8,e[s-2]=e[s-2]*a+r*o>>8,e[s-1]=e[s-1]*a+i*o>>8}}}function A(e,t,r){for(var i=e.length,n=1/255,s=3;s<i;s+=4){var a=r?r[e[s]]:e[s];t[s]=t[s]*a*n|0}}function w(e,t,r){for(var i=e.length,n=3;n<i;n+=4){var s=77*e[n-3]+152*e[n-2]+28*e[n-1];t[n]=r?t[n]*r[s>>8]>>8:t[n]*s>>16}}function S(e,t,r,i,n,s,a){var o,l=!!s,c=l?s[0]:0,d=l?s[1]:0,h=l?s[2]:0;o="Luminosity"===n?w:A;for(var u=1048576,p=Math.min(i,Math.ceil(u/r)),g=0;g<i;g+=p){var f=Math.min(p,i-g),m=e.getImageData(0,g,r,f),_=t.getImageData(0,g,r,f);l&&y(m.data,c,d,h),o(m.data,_.data,a),e.putImageData(_,0,g)}}function C(e,t,r,i){var n=t.canvas,s=t.context;e.setTransform(t.scaleX,0,0,t.scaleY,t.offsetX,t.offsetY);var a=t.backdrop||null;if(!t.transferMap&&i.isEnabled){const s=i.composeSMask({layer:r.canvas,mask:n,properties:{subtype:t.subtype,backdrop:a}});return e.setTransform(1,0,0,1,0,0),void e.drawImage(s,t.offsetX,t.offsetY)}S(s,r,n.width,n.height,t.subtype,a,t.transferMap),e.drawImage(n,0,0)}var x=["butt","round","square"],P=["miter","round","bevel"],T={},E={};for(var L in r.prototype={beginDrawing({transform:e,viewport:t,transparency:r=!1,background:i=null}){var n=this.ctx.canvas.width,s=this.ctx.canvas.height;if(this.ctx.save(),this.ctx.fillStyle=i||"rgb(255, 255, 255)",this.ctx.fillRect(0,0,n,s),this.ctx.restore(),r){var a=this.cachedCanvases.getCanvas("transparent",n,s,!0);this.compositeCtx=this.ctx,this.transparentCanvas=a.canvas,this.ctx=a.context,this.ctx.save(),this.ctx.transform.apply(this.ctx,this.compositeCtx.mozCurrentTransform)}this.ctx.save(),v(this.ctx),e&&this.ctx.transform.apply(this.ctx,e),this.ctx.transform.apply(this.ctx,t.transform),this.baseTransform=this.ctx.mozCurrentTransform.slice(),this.imageLayer&&this.imageLayer.beginLayout()},executeOperatorList:function(r,n,s,a){var o=r.argsArray,l=r.fnArray,c=n||0,d=o.length;if(d===c)return c;var h,u=d-c>t&&"function"===typeof s,p=u?Date.now()+e:0,g=0,f=this.commonObjs,m=this.objs;while(1){if(void 0!==a&&c===a.nextBreakPoint)return a.breakIt(c,s),c;if(h=l[c],h!==i.OPS.dependency)this[h].apply(this,o[c]);else for(const e of o[c]){const t=e.startsWith("g_")?f:m;if(!t.has(e))return t.get(e,s),c}if(c++,c===d)return c;if(u&&++g>t){if(Date.now()>p)return s(),c;g=0}}},endDrawing:function(){null!==this.current.activeSMask&&this.endSMaskGroup(),this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null),this.cachedCanvases.clear(),this.webGLContext.clear(),this.imageLayer&&this.imageLayer.endLayout()},setLineWidth:function(e){this.current.lineWidth=e,this.ctx.lineWidth=e},setLineCap:function(e){this.ctx.lineCap=x[e]},setLineJoin:function(e){this.ctx.lineJoin=P[e]},setMiterLimit:function(e){this.ctx.miterLimit=e},setDash:function(e,t){var r=this.ctx;void 0!==r.setLineDash&&(r.setLineDash(e),r.lineDashOffset=t)},setRenderingIntent(e){},setFlatness(e){},setGState:function(e){for(var t=0,r=e.length;t<r;t++){var i=e[t],n=i[0],s=i[1];switch(n){case"LW":this.setLineWidth(s);break;case"LC":this.setLineCap(s);break;case"LJ":this.setLineJoin(s);break;case"ML":this.setMiterLimit(s);break;case"D":this.setDash(s[0],s[1]);break;case"RI":this.setRenderingIntent(s);break;case"FL":this.setFlatness(s);break;case"Font":this.setFont(s[0],s[1]);break;case"CA":this.current.strokeAlpha=i[1];break;case"ca":this.current.fillAlpha=i[1],this.ctx.globalAlpha=i[1];break;case"BM":this.ctx.globalCompositeOperation=s;break;case"SMask":this.current.activeSMask&&(this.stateStack.length>0&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask?this.suspendSMaskGroup():this.endSMaskGroup()),this.current.activeSMask=s?this.tempSMask:null,this.current.activeSMask&&this.beginSMaskGroup(),this.tempSMask=null;break}}},beginSMaskGroup:function(){var e=this.current.activeSMask,t=e.canvas.width,r=e.canvas.height,i="smaskGroupAt"+this.groupLevel,n=this.cachedCanvases.getCanvas(i,t,r,!0),s=this.ctx,a=s.mozCurrentTransform;this.ctx.save();var o=n.context;o.scale(1/e.scaleX,1/e.scaleY),o.translate(-e.offsetX,-e.offsetY),o.transform.apply(o,a),e.startTransformInverse=o.mozCurrentTransformInverse,b(s,o),this.ctx=o,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(s),this.groupLevel++},suspendSMaskGroup:function(){var e=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),C(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),this.ctx.save(),b(e,this.ctx),this.current.resumeSMaskCtx=e;var t=i.Util.transform(this.current.activeSMask.startTransformInverse,e.mozCurrentTransform);this.ctx.transform.apply(this.ctx,t),e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,e.canvas.width,e.canvas.height),e.restore()},resumeSMaskGroup:function(){var e=this.current.resumeSMaskCtx,t=this.ctx;this.ctx=e,this.groupStack.push(t),this.groupLevel++},endSMaskGroup:function(){var e=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),C(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),b(e,this.ctx);var t=i.Util.transform(this.current.activeSMask.startTransformInverse,e.mozCurrentTransform);this.ctx.transform.apply(this.ctx,t)},save:function(){this.ctx.save();var e=this.current;this.stateStack.push(e),this.current=e.clone(),this.current.resumeSMaskCtx=null},restore:function(){this.current.resumeSMaskCtx&&this.resumeSMaskGroup(),null===this.current.activeSMask||0!==this.stateStack.length&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask||this.endSMaskGroup(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.ctx.restore(),this.pendingClip=null,this._cachedGetSinglePixelWidth=null)},transform:function(e,t,r,i,n,s){this.ctx.transform(e,t,r,i,n,s),this._cachedGetSinglePixelWidth=null},constructPath:function(e,t){for(var r=this.ctx,n=this.current,s=n.x,a=n.y,o=0,l=0,c=e.length;o<c;o++)switch(0|e[o]){case i.OPS.rectangle:s=t[l++],a=t[l++];var d=t[l++],h=t[l++];0===d&&(d=this.getSinglePixelWidth()),0===h&&(h=this.getSinglePixelWidth());var u=s+d,p=a+h;this.ctx.moveTo(s,a),this.ctx.lineTo(u,a),this.ctx.lineTo(u,p),this.ctx.lineTo(s,p),this.ctx.lineTo(s,a),this.ctx.closePath();break;case i.OPS.moveTo:s=t[l++],a=t[l++],r.moveTo(s,a);break;case i.OPS.lineTo:s=t[l++],a=t[l++],r.lineTo(s,a);break;case i.OPS.curveTo:s=t[l+4],a=t[l+5],r.bezierCurveTo(t[l],t[l+1],t[l+2],t[l+3],s,a),l+=6;break;case i.OPS.curveTo2:r.bezierCurveTo(s,a,t[l],t[l+1],t[l+2],t[l+3]),s=t[l+2],a=t[l+3],l+=4;break;case i.OPS.curveTo3:s=t[l+2],a=t[l+3],r.bezierCurveTo(t[l],t[l+1],s,a,s,a),l+=4;break;case i.OPS.closePath:r.closePath();break}n.setCurrentPoint(s,a)},closePath:function(){this.ctx.closePath()},stroke:function(e){e="undefined"===typeof e||e;var t=this.ctx,r=this.current.strokeColor;if(t.globalAlpha=this.current.strokeAlpha,r&&r.hasOwnProperty("type")&&"Pattern"===r.type){t.save();const e=t.mozCurrentTransform,n=i.Util.singularValueDecompose2dScale(e)[0];t.strokeStyle=r.getPattern(t,this),t.lineWidth=Math.max(this.getSinglePixelWidth()*l,this.current.lineWidth*n),t.stroke(),t.restore()}else t.lineWidth=Math.max(this.getSinglePixelWidth()*l,this.current.lineWidth),t.stroke();e&&this.consumePath(),t.globalAlpha=this.current.fillAlpha},closeStroke:function(){this.closePath(),this.stroke()},fill:function(e){e="undefined"===typeof e||e;var t=this.ctx,r=this.current.fillColor,i=this.current.patternFill,n=!1;i&&(t.save(),this.baseTransform&&t.setTransform.apply(t,this.baseTransform),t.fillStyle=r.getPattern(t,this),n=!0),this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill(),n&&t.restore(),e&&this.consumePath()},eoFill:function(){this.pendingEOFill=!0,this.fill()},fillStroke:function(){this.fill(!1),this.stroke(!1),this.consumePath()},eoFillStroke:function(){this.pendingEOFill=!0,this.fillStroke()},closeFillStroke:function(){this.closePath(),this.fillStroke()},closeEOFillStroke:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()},endPath:function(){this.consumePath()},clip:function(){this.pendingClip=T},eoClip:function(){this.pendingClip=E},beginText:function(){this.current.textMatrix=i.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},endText:function(){var e=this.pendingTextPaths,t=this.ctx;if(void 0!==e){t.save(),t.beginPath();for(var r=0;r<e.length;r++){var i=e[r];t.setTransform.apply(t,i.transform),t.translate(i.x,i.y),i.addToPath(t,i.fontSize)}t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else t.beginPath()},setCharSpacing:function(e){this.current.charSpacing=e},setWordSpacing:function(e){this.current.wordSpacing=e},setHScale:function(e){this.current.textHScale=e/100},setLeading:function(e){this.current.leading=-e},setFont:function(e,t){var r=this.commonObjs.get(e),n=this.current;if(!r)throw new Error(`Can't find font for ${e}`);if(n.fontMatrix=r.fontMatrix?r.fontMatrix:i.FONT_IDENTITY_MATRIX,0!==n.fontMatrix[0]&&0!==n.fontMatrix[3]||(0,i.warn)("Invalid font matrix for font "+e),t<0?(t=-t,n.fontDirection=-1):n.fontDirection=1,this.current.font=r,this.current.fontSize=t,r.isType3Font)return;var o=r.loadedName||"sans-serif";let l="normal";r.black?l="900":r.bold&&(l="bold");var c=r.italic?"italic":"normal",d=`"${o}", ${r.fallbackName}`;let h=t;t<s?h=s:t>a&&(h=a),this.current.fontSizeScale=t/h,this.ctx.font=`${c} ${l} ${h}px ${d}`},setTextRenderingMode:function(e){this.current.textRenderingMode=e},setTextRise:function(e){this.current.textRise=e},moveText:function(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t},setLeadingMoveText:function(e,t){this.setLeading(-t),this.moveText(e,t)},setTextMatrix:function(e,t,r,i,n,s){this.current.textMatrix=[e,t,r,i,n,s],this.current.textMatrixScale=Math.sqrt(e*e+t*t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},nextLine:function(){this.moveText(0,this.current.leading)},paintChar(e,t,r,n){var s=this.ctx,a=this.current,o=a.font,l=a.textRenderingMode,c=a.fontSize/a.fontSizeScale,d=l&i.TextRenderingMode.FILL_STROKE_MASK,h=!!(l&i.TextRenderingMode.ADD_TO_PATH_FLAG);const u=a.patternFill&&!o.missingFile;var p;if((o.disableFontFace||h||u)&&(p=o.getPathGenerator(this.commonObjs,e)),o.disableFontFace||u?(s.save(),s.translate(t,r),s.beginPath(),p(s,c),n&&s.setTransform.apply(s,n),d!==i.TextRenderingMode.FILL&&d!==i.TextRenderingMode.FILL_STROKE||s.fill(),d!==i.TextRenderingMode.STROKE&&d!==i.TextRenderingMode.FILL_STROKE||s.stroke(),s.restore()):(d!==i.TextRenderingMode.FILL&&d!==i.TextRenderingMode.FILL_STROKE||s.fillText(e,t,r),d!==i.TextRenderingMode.STROKE&&d!==i.TextRenderingMode.FILL_STROKE||s.strokeText(e,t,r)),h){var g=this.pendingTextPaths||(this.pendingTextPaths=[]);g.push({transform:s.mozCurrentTransform,x:t,y:r,fontSize:c,addToPath:p})}},get isFontSubpixelAAEnabled(){const{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e.scale(1.5,1),e.fillText("I",0,10);for(var t=e.getImageData(0,0,10,10).data,r=!1,n=3;n<t.length;n+=4)if(t[n]>0&&t[n]<255){r=!0;break}return(0,i.shadow)(this,"isFontSubpixelAAEnabled",r)},showText:function(e){var t=this.current,r=t.font;if(r.isType3Font)return this.showType3Text(e);var n=t.fontSize;if(0===n)return;var s=this.ctx,a=t.fontSizeScale,o=t.charSpacing,c=t.wordSpacing,d=t.fontDirection,h=t.textHScale*d,u=e.length,p=r.vertical,g=p?1:-1,f=r.defaultVMetrics,m=n*t.fontMatrix[0],_=t.textRenderingMode===i.TextRenderingMode.FILL&&!r.disableFontFace&&!t.patternFill;let b;if(s.save(),t.patternFill){s.save();const e=t.fillColor.getPattern(s,this);b=s.mozCurrentTransform,s.restore(),s.fillStyle=e}s.transform.apply(s,t.textMatrix),s.translate(t.x,t.y+t.textRise),d>0?s.scale(h,-1):s.scale(h,1);var v=t.lineWidth,y=t.textMatrixScale;if(0===y||0===v){var A=t.textRenderingMode&i.TextRenderingMode.FILL_STROKE_MASK;A!==i.TextRenderingMode.STROKE&&A!==i.TextRenderingMode.FILL_STROKE||(this._cachedGetSinglePixelWidth=null,v=this.getSinglePixelWidth()*l)}else v/=y;1!==a&&(s.scale(a,a),v/=a),s.lineWidth=v;var w,S=0;for(w=0;w<u;++w){var C=e[w];if((0,i.isNum)(C))S+=g*C*n/1e3;else{var x,P,T,E,L,k,R,I,F=!1,M=(C.isSpace?c:0)+o,N=C.fontChar,D=C.accent,O=C.width;if(p)L=C.vmetric||f,k=C.vmetric?L[1]:.5*O,k=-k*m,R=L[2]*m,O=L?-L[0]:O,x=k/a,P=(S+R)/a;else x=S/a,P=0;if(r.remeasure&&O>0){var B=1e3*s.measureText(N).width/n*a;if(O<B&&this.isFontSubpixelAAEnabled){var U=O/B;F=!0,s.save(),s.scale(U,1),x/=U}else O!==B&&(x+=(O-B)/2e3*n/a)}(C.isInFont||r.missingFile)&&(_&&!D?s.fillText(N,x,P):(this.paintChar(N,x,P,b),D&&(T=x+D.offset.x/a,E=P-D.offset.y/a,this.paintChar(D.fontChar,T,E,b)))),I=p?O*m-M*d:O*m+M*d,S+=I,F&&s.restore()}}p?t.y-=S:t.x+=S*h,s.restore()},showType3Text:function(e){var t,r,n,s,a=this.ctx,o=this.current,l=o.font,c=o.fontSize,d=o.fontDirection,h=l.vertical?1:-1,u=o.charSpacing,p=o.wordSpacing,g=o.textHScale*d,f=o.fontMatrix||i.FONT_IDENTITY_MATRIX,m=e.length,_=o.textRenderingMode===i.TextRenderingMode.INVISIBLE;if(!_&&0!==c){for(this._cachedGetSinglePixelWidth=null,a.save(),a.transform.apply(a,o.textMatrix),a.translate(o.x,o.y),a.scale(g,d),t=0;t<m;++t)if(r=e[t],(0,i.isNum)(r))s=h*r*c/1e3,this.ctx.translate(s,0),o.x+=s*g;else{var b=(r.isSpace?p:0)+u,v=l.charProcOperatorList[r.operatorListId];if(v){this.processingType3=r,this.save(),a.scale(c,c),a.transform.apply(a,f),this.executeOperatorList(v),this.restore();var y=i.Util.applyTransform([r.width,0],f);n=y[0]*c+b,a.translate(n,0),o.x+=n*g}else(0,i.warn)(`Type3 character "${r.operatorListId}" is not available.`)}a.restore(),this.processingType3=null}},setCharWidth:function(e,t){},setCharWidthAndBounds:function(e,t,r,i,n,s){this.ctx.rect(r,i,n-r,s-i),this.clip(),this.endPath()},getColorN_Pattern:function(e){var t;if("TilingPattern"===e[0]){var i=e[1],s=this.baseTransform||this.ctx.mozCurrentTransform.slice(),a={createCanvasGraphics:e=>new r(e,this.commonObjs,this.objs,this.canvasFactory,this.webGLContext)};t=new n.TilingPattern(e,i,this.ctx,a,s)}else t=(0,n.getShadingPatternFromIR)(e);return t},setStrokeColorN:function(){this.current.strokeColor=this.getColorN_Pattern(arguments)},setFillColorN:function(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0},setStrokeRGBColor:function(e,t,r){var n=i.Util.makeCssRgb(e,t,r);this.ctx.strokeStyle=n,this.current.strokeColor=n},setFillRGBColor:function(e,t,r){var n=i.Util.makeCssRgb(e,t,r);this.ctx.fillStyle=n,this.current.fillColor=n,this.current.patternFill=!1},shadingFill:function(e){var t=this.ctx;this.save();var r=(0,n.getShadingPatternFromIR)(e);t.fillStyle=r.getPattern(t,this,!0);var s=t.mozCurrentTransformInverse;if(s){var a=t.canvas,o=a.width,l=a.height,c=i.Util.applyTransform([0,0],s),d=i.Util.applyTransform([0,l],s),h=i.Util.applyTransform([o,0],s),u=i.Util.applyTransform([o,l],s),p=Math.min(c[0],d[0],h[0],u[0]),g=Math.min(c[1],d[1],h[1],u[1]),f=Math.max(c[0],d[0],h[0],u[0]),m=Math.max(c[1],d[1],h[1],u[1]);this.ctx.fillRect(p,g,f-p,m-g)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.restore()},beginInlineImage:function(){(0,i.unreachable)("Should not call beginInlineImage")},beginImageData:function(){(0,i.unreachable)("Should not call beginImageData")},paintFormXObjectBegin:function(e,t){if(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(e)&&6===e.length&&this.transform.apply(this,e),this.baseTransform=this.ctx.mozCurrentTransform,t){var r=t[2]-t[0],i=t[3]-t[1];this.ctx.rect(t[0],t[1],r,i),this.clip(),this.endPath()}},paintFormXObjectEnd:function(){this.restore(),this.baseTransform=this.baseTransformStack.pop()},beginGroup:function(e){this.save();var t=this.ctx;e.isolated||(0,i.info)("TODO: Support non-isolated groups."),e.knockout&&(0,i.warn)("Knockout groups not supported.");var r=t.mozCurrentTransform;if(e.matrix&&t.transform.apply(t,e.matrix),!e.bbox)throw new Error("Bounding box is required.");var n=i.Util.getAxialAlignedBoundingBox(e.bbox,t.mozCurrentTransform),s=[0,0,t.canvas.width,t.canvas.height];n=i.Util.intersect(n,s)||[0,0,0,0];var a=Math.floor(n[0]),l=Math.floor(n[1]),c=Math.max(Math.ceil(n[2])-a,1),d=Math.max(Math.ceil(n[3])-l,1),h=1,u=1;c>o&&(h=c/o,c=o),d>o&&(u=d/o,d=o);var p="groupAt"+this.groupLevel;e.smask&&(p+="_smask_"+this.smaskCounter++%2);var g=this.cachedCanvases.getCanvas(p,c,d,!0),f=g.context;f.scale(1/h,1/u),f.translate(-a,-l),f.transform.apply(f,r),e.smask?this.smaskStack.push({canvas:g.canvas,context:f,offsetX:a,offsetY:l,scaleX:h,scaleY:u,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(a,l),t.scale(h,u)),b(t,f),this.ctx=f,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++,this.current.activeSMask=null},endGroup:function(e){this.groupLevel--;var t=this.ctx;this.ctx=this.groupStack.pop(),void 0!==this.ctx.imageSmoothingEnabled?this.ctx.imageSmoothingEnabled=!1:this.ctx.mozImageSmoothingEnabled=!1,e.smask?this.tempSMask=this.smaskStack.pop():this.ctx.drawImage(t.canvas,0,0),this.restore()},beginAnnotations:function(){this.save(),this.baseTransform&&this.ctx.setTransform.apply(this.ctx,this.baseTransform)},endAnnotations:function(){this.restore()},beginAnnotation:function(e,t,r){if(this.save(),v(this.ctx),this.current=new f,Array.isArray(e)&&4===e.length){var i=e[2]-e[0],n=e[3]-e[1];this.ctx.rect(e[0],e[1],i,n),this.clip(),this.endPath()}this.transform.apply(this,t),this.transform.apply(this,r)},endAnnotation:function(){this.restore()},paintImageMaskXObject:function(e){var t=this.ctx,r=e.width,i=e.height,n=this.current.fillColor,s=this.current.patternFill,a=this.processingType3;if(c&&a&&void 0===a.compiled&&(a.compiled=r<=d&&i<=d?g({data:e.data,width:r,height:i}):null),a&&a.compiled)a.compiled(t);else{var o=this.cachedCanvases.getCanvas("maskCanvas",r,i),l=o.context;l.save(),_(l,e),l.globalCompositeOperation="source-in",l.fillStyle=s?n.getPattern(l,this):n,l.fillRect(0,0,r,i),l.restore(),this.paintInlineImageXObject(o.canvas)}},paintImageMaskXObjectRepeat:function(e,t,r,i){var n=e.width,s=e.height,a=this.current.fillColor,o=this.current.patternFill,l=this.cachedCanvases.getCanvas("maskCanvas",n,s),c=l.context;c.save(),_(c,e),c.globalCompositeOperation="source-in",c.fillStyle=o?a.getPattern(c,this):a,c.fillRect(0,0,n,s),c.restore();for(var d=this.ctx,h=0,u=i.length;h<u;h+=2)d.save(),d.transform(t,0,0,r,i[h],i[h+1]),d.scale(1,-1),d.drawImage(l.canvas,0,0,n,s,0,-1,1,1),d.restore()},paintImageMaskXObjectGroup:function(e){for(var t=this.ctx,r=this.current.fillColor,i=this.current.patternFill,n=0,s=e.length;n<s;n++){var a=e[n],o=a.width,l=a.height,c=this.cachedCanvases.getCanvas("maskCanvas",o,l),d=c.context;d.save(),_(d,a),d.globalCompositeOperation="source-in",d.fillStyle=i?r.getPattern(d,this):r,d.fillRect(0,0,o,l),d.restore(),t.save(),t.transform.apply(t,a.transform),t.scale(1,-1),t.drawImage(c.canvas,0,0,o,l,0,-1,1,1),t.restore()}},paintImageXObject:function(e){const t=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);t?this.paintInlineImageXObject(t):(0,i.warn)("Dependent image isn't ready yet")},paintImageXObjectRepeat:function(e,t,r,n){const s=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);if(s){for(var a=s.width,o=s.height,l=[],c=0,d=n.length;c<d;c+=2)l.push({transform:[t,0,0,r,n[c],n[c+1]],x:0,y:0,w:a,h:o});this.paintInlineImageXObjectGroup(s,l)}else(0,i.warn)("Dependent image isn't ready yet")},paintInlineImageXObject:function(e){var t=e.width,r=e.height,i=this.ctx;this.save(),i.scale(1/t,-1/r);var n,s,a=i.mozCurrentTransformInverse,o=a[0],l=a[1],c=Math.max(Math.sqrt(o*o+l*l),1),d=a[2],h=a[3],u=Math.max(Math.sqrt(d*d+h*h),1);if("function"===typeof HTMLElement&&e instanceof HTMLElement||!e.data)n=e;else{s=this.cachedCanvases.getCanvas("inlineImage",t,r);var p=s.context;m(p,e),n=s.canvas}var g=t,f=r,_="prescale1";while(c>2&&g>1||u>2&&f>1){var b=g,v=f;c>2&&g>1&&(b=Math.ceil(g/2),c/=g/b),u>2&&f>1&&(v=Math.ceil(f/2),u/=f/v),s=this.cachedCanvases.getCanvas(_,b,v),p=s.context,p.clearRect(0,0,b,v),p.drawImage(n,0,0,g,f,0,0,b,v),n=s.canvas,g=b,f=v,_="prescale1"===_?"prescale2":"prescale1"}if(i.drawImage(n,0,0,g,f,0,-r,t,r),this.imageLayer){var y=this.getCanvasPosition(0,-r);this.imageLayer.appendImage({imgData:e,left:y[0],top:y[1],width:t/a[0],height:r/a[3]})}this.restore()},paintInlineImageXObjectGroup:function(e,t){var r=this.ctx,i=e.width,n=e.height,s=this.cachedCanvases.getCanvas("inlineImage",i,n),a=s.context;m(a,e);for(var o=0,l=t.length;o<l;o++){var c=t[o];if(r.save(),r.transform.apply(r,c.transform),r.scale(1,-1),r.drawImage(s.canvas,c.x,c.y,c.w,c.h,0,-1,1,1),this.imageLayer){var d=this.getCanvasPosition(c.x,c.y);this.imageLayer.appendImage({imgData:e,left:d[0],top:d[1],width:i,height:n})}r.restore()}},paintSolidColorImageMask:function(){this.ctx.fillRect(0,0,1,1)},paintXObject:function(){(0,i.warn)("Unsupported 'paintXObject' command.")},markPoint:function(e){},markPointProps:function(e,t){},beginMarkedContent:function(e){},beginMarkedContentProps:function(e,t){},endMarkedContent:function(){},beginCompat:function(){},endCompat:function(){},consumePath:function(){var e=this.ctx;this.pendingClip&&(this.pendingClip===E?e.clip("evenodd"):e.clip(),this.pendingClip=null),e.beginPath()},getSinglePixelWidth(e){if(null===this._cachedGetSinglePixelWidth){const e=this.ctx.mozCurrentTransformInverse;this._cachedGetSinglePixelWidth=Math.sqrt(Math.max(e[0]*e[0]+e[1]*e[1],e[2]*e[2]+e[3]*e[3]))}return this._cachedGetSinglePixelWidth},getCanvasPosition:function(e,t){var r=this.ctx.mozCurrentTransform;return[r[0]*e+r[2]*t+r[4],r[1]*e+r[3]*t+r[5]]}},i.OPS)r.prototype[i.OPS[L]]=r.prototype[L];return r}();t.CanvasGraphics=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getShadingPatternFromIR=o,t.TilingPattern=void 0;var i=r(2),n={};function s(e,t){if(!t||"undefined"===typeof Path2D)return;const r=t[2]-t[0],i=t[3]-t[1],n=new Path2D;n.rect(t[0],t[1],r,i),e.clip(n)}n.RadialAxial={fromIR:function(e){var t=e[1],r=e[2],i=e[3],n=e[4],a=e[5],o=e[6],l=e[7];return{type:"Pattern",getPattern:function(e){var c;s(e,r),"axial"===t?c=e.createLinearGradient(n[0],n[1],a[0],a[1]):"radial"===t&&(c=e.createRadialGradient(n[0],n[1],o,a[0],a[1],l));for(var d=0,h=i.length;d<h;++d){var u=i[d];c.addColorStop(u[0],u[1])}return c}}}};var a=function(){function e(e,t,r,i,n,s,a,o){var l,c=t.coords,d=t.colors,h=e.data,u=4*e.width;c[r+1]>c[i+1]&&(l=r,r=i,i=l,l=s,s=a,a=l),c[i+1]>c[n+1]&&(l=i,i=n,n=l,l=a,a=o,o=l),c[r+1]>c[i+1]&&(l=r,r=i,i=l,l=s,s=a,a=l);var p=(c[r]+t.offsetX)*t.scaleX,g=(c[r+1]+t.offsetY)*t.scaleY,f=(c[i]+t.offsetX)*t.scaleX,m=(c[i+1]+t.offsetY)*t.scaleY,_=(c[n]+t.offsetX)*t.scaleX,b=(c[n+1]+t.offsetY)*t.scaleY;if(!(g>=b))for(var v,y,A,w,S,C,x,P,T=d[s],E=d[s+1],L=d[s+2],k=d[a],R=d[a+1],I=d[a+2],F=d[o],M=d[o+1],N=d[o+2],D=Math.round(g),O=Math.round(b),B=D;B<=O;B++){if(B<m){let e;e=B<g?0:g===m?1:(g-B)/(g-m),v=p-(p-f)*e,y=T-(T-k)*e,A=E-(E-R)*e,w=L-(L-I)*e}else{let e;e=B>b?1:m===b?0:(m-B)/(m-b),v=f-(f-_)*e,y=k-(k-F)*e,A=R-(R-M)*e,w=I-(I-N)*e}let e;e=B<g?0:B>b?1:(g-B)/(g-b),S=p-(p-_)*e,C=T-(T-F)*e,x=E-(E-M)*e,P=L-(L-N)*e;for(var U=Math.round(Math.min(v,S)),j=Math.round(Math.max(v,S)),V=u*B+4*U,q=U;q<=j;q++)e=(v-q)/(v-S),e<0?e=0:e>1&&(e=1),h[V++]=y-(y-C)*e|0,h[V++]=A-(A-x)*e|0,h[V++]=w-(w-P)*e|0,h[V++]=255}}function t(t,r,i){var n,s,a=r.coords,o=r.colors;switch(r.type){case"lattice":var l=r.verticesPerRow,c=Math.floor(a.length/l)-1,d=l-1;for(n=0;n<c;n++)for(var h=n*l,u=0;u<d;u++,h++)e(t,i,a[h],a[h+1],a[h+l],o[h],o[h+1],o[h+l]),e(t,i,a[h+l+1],a[h+1],a[h+l],o[h+l+1],o[h+1],o[h+l]);break;case"triangles":for(n=0,s=a.length;n<s;n+=3)e(t,i,a[n],a[n+1],a[n+2],o[n],o[n+1],o[n+2]);break;default:throw new Error("illegal figure")}}function r(e,r,i,n,s,a,o,l){var c,d,h,u,p=1.1,g=3e3,f=2,m=Math.floor(e[0]),_=Math.floor(e[1]),b=Math.ceil(e[2])-m,v=Math.ceil(e[3])-_,y=Math.min(Math.ceil(Math.abs(b*r[0]*p)),g),A=Math.min(Math.ceil(Math.abs(v*r[1]*p)),g),w=b/y,S=v/A,C={coords:i,colors:n,offsetX:-m,offsetY:-_,scaleX:1/w,scaleY:1/S},x=y+2*f,P=A+2*f;if(l.isEnabled)c=l.drawFigures({width:y,height:A,backgroundColor:a,figures:s,context:C}),d=o.getCanvas("mesh",x,P,!1),d.context.drawImage(c,f,f),c=d.canvas;else{d=o.getCanvas("mesh",x,P,!1);var T=d.context,E=T.createImageData(y,A);if(a){var L=E.data;for(h=0,u=L.length;h<u;h+=4)L[h]=a[0],L[h+1]=a[1],L[h+2]=a[2],L[h+3]=255}for(h=0;h<s.length;h++)t(E,s[h],C);T.putImageData(E,f,f),c=d.canvas}return{canvas:c,offsetX:m-f*w,offsetY:_-f*S,scaleX:w,scaleY:S}}return r}();function o(e){var t=n[e[0]];if(!t)throw new Error(`Unknown IR type: ${e[0]}`);return t.fromIR(e)}n.Mesh={fromIR:function(e){var t=e[2],r=e[3],n=e[4],o=e[5],l=e[6],c=e[7],d=e[8];return{type:"Pattern",getPattern:function(e,h,u){var p;if(s(e,c),u)p=i.Util.singularValueDecompose2dScale(e.mozCurrentTransform);else if(p=i.Util.singularValueDecompose2dScale(h.baseTransform),l){var g=i.Util.singularValueDecompose2dScale(l);p=[p[0]*g[0],p[1]*g[1]]}var f=a(o,p,t,r,n,u?null:d,h.cachedCanvases,h.webGLContext);return u||(e.setTransform.apply(e,h.baseTransform),l&&e.transform.apply(e,l)),e.translate(f.offsetX,f.offsetY),e.scale(f.scaleX,f.scaleY),e.createPattern(f.canvas,"no-repeat")}}}},n.Dummy={fromIR:function(){return{type:"Pattern",getPattern:function(){return"hotpink"}}}};var l=function(){var e={COLORED:1,UNCOLORED:2},t=3e3;function r(e,t,r,i,n){this.operatorList=e[2],this.matrix=e[3]||[1,0,0,1,0,0],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=t,this.canvasGraphicsFactory=i,this.baseTransform=n,this.type="Pattern",this.ctx=r}return r.prototype={createPatternCanvas:function(e){var t=this.operatorList,r=this.bbox,n=this.xstep,s=this.ystep,a=this.paintType,o=this.tilingType,l=this.color,c=this.canvasGraphicsFactory;(0,i.info)("TilingType: "+o);var d=r[0],h=r[1],u=r[2],p=r[3],g=i.Util.singularValueDecompose2dScale(this.matrix),f=i.Util.singularValueDecompose2dScale(this.baseTransform),m=[g[0]*f[0],g[1]*f[1]],_=this.getSizeAndScale(n,this.ctx.canvas.width,m[0]),b=this.getSizeAndScale(s,this.ctx.canvas.height,m[1]),v=e.cachedCanvases.getCanvas("pattern",_.size,b.size,!0),y=v.context,A=c.createCanvasGraphics(y);return A.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(A,a,l),A.transform(_.scale,0,0,b.scale,0,0),A.transform(1,0,0,1,-d,-h),this.clipBbox(A,r,d,h,u,p),A.executeOperatorList(t),this.ctx.transform(1,0,0,1,d,h),this.ctx.scale(1/_.scale,1/b.scale),v.canvas},getSizeAndScale:function(e,r,i){e=Math.abs(e);var n=Math.max(t,r),s=Math.ceil(e*i);return s>=n?s=n:i=s/e,{scale:i,size:s}},clipBbox:function(e,t,r,i,n,s){if(Array.isArray(t)&&4===t.length){var a=n-r,o=s-i;e.ctx.rect(r,i,a,o),e.clip(),e.endPath()}},setFillAndStrokeStyleToContext:function(t,r,n){const s=t.ctx,a=t.current;switch(r){case e.COLORED:var o=this.ctx;s.fillStyle=o.fillStyle,s.strokeStyle=o.strokeStyle,a.fillColor=o.fillStyle,a.strokeColor=o.strokeStyle;break;case e.UNCOLORED:var l=i.Util.makeCssRgb(n[0],n[1],n[2]);s.fillStyle=l,s.strokeStyle=l,a.fillColor=l,a.strokeColor=l;break;default:throw new i.FormatError(`Unsupported paint type: ${r}`)}},getPattern:function(e,t){e=this.ctx,e.setTransform.apply(e,this.baseTransform),e.transform.apply(e,this.matrix);var r=this.createPatternCanvas(t);return e.createPattern(r,"repeat")}},r}();t.TilingPattern=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;const i=Object.create(null);t.GlobalWorkerOptions=i,i.workerPort=void 0===i.workerPort?null:i.workerPort,i.workerSrc=void 0===i.workerSrc?"":i.workerSrc},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var i=r(2);const n={UNKNOWN:0,DATA:1,ERROR:2},s={UNKNOWN:0,CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function a(e){if("object"!==typeof e||null===e)return e;switch(e.name){case"AbortException":return new i.AbortException(e.message);case"MissingPDFException":return new i.MissingPDFException(e.message);case"UnexpectedResponseException":return new i.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new i.UnknownErrorException(e.message,e.details);default:return new i.UnknownErrorException(e.message,e.toString())}}class o{constructor(e,t,r){this.sourceName=e,this.targetName=t,this.comObj=r,this.callbackId=1,this.streamId=1,this.postMessageTransfers=!0,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=e=>{const t=e.data;if(t.targetName!==this.sourceName)return;if(t.stream)return void this._processStreamMessage(t);if(t.callback){const e=t.callbackId,r=this.callbackCapabilities[e];if(!r)throw new Error(`Cannot resolve callback ${e}`);if(delete this.callbackCapabilities[e],t.callback===n.DATA)r.resolve(t.data);else{if(t.callback!==n.ERROR)throw new Error("Unexpected callback case");r.reject(a(t.reason))}return}const i=this.actionHandler[t.action];if(!i)throw new Error(`Unknown action from worker: ${t.action}`);if(t.callbackId){const e=this.sourceName,s=t.sourceName;new Promise((function(e){e(i(t.data))})).then((function(i){r.postMessage({sourceName:e,targetName:s,callback:n.DATA,callbackId:t.callbackId,data:i})}),(function(i){r.postMessage({sourceName:e,targetName:s,callback:n.ERROR,callbackId:t.callbackId,reason:a(i)})}))}else t.streamId?this._createStreamSink(t):i(t.data)},r.addEventListener("message",this._onComObjOnMessage)}on(e,t){const r=this.actionHandler;if(r[e])throw new Error(`There is already an actionName called "${e}"`);r[e]=t}send(e,t,r){this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},r)}sendWithPromise(e,t,r){const n=this.callbackId++,s=(0,i.createPromiseCapability)();this.callbackCapabilities[n]=s;try{this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:n,data:t},r)}catch(a){s.reject(a)}return s.promise}sendWithStream(e,t,r,n){const o=this.streamId++,l=this.sourceName,c=this.targetName,d=this.comObj;return new ReadableStream({start:r=>{const s=(0,i.createPromiseCapability)();return this.streamControllers[o]={controller:r,startCall:s,pullCall:null,cancelCall:null,isClosed:!1},this._postMessage({sourceName:l,targetName:c,action:e,streamId:o,data:t,desiredSize:r.desiredSize},n),s.promise},pull:e=>{const t=(0,i.createPromiseCapability)();return this.streamControllers[o].pullCall=t,d.postMessage({sourceName:l,targetName:c,stream:s.PULL,streamId:o,desiredSize:e.desiredSize}),t.promise},cancel:e=>{(0,i.assert)(e instanceof Error,"cancel must have a valid reason");const t=(0,i.createPromiseCapability)();return this.streamControllers[o].cancelCall=t,this.streamControllers[o].isClosed=!0,d.postMessage({sourceName:l,targetName:c,stream:s.CANCEL,streamId:o,reason:a(e)}),t.promise}},r)}_createStreamSink(e){const t=this,r=this.actionHandler[e.action],n=e.streamId,o=this.sourceName,l=e.sourceName,c=this.comObj,d={enqueue(e,r=1,a){if(this.isCancelled)return;const c=this.desiredSize;this.desiredSize-=r,c>0&&this.desiredSize<=0&&(this.sinkCapability=(0,i.createPromiseCapability)(),this.ready=this.sinkCapability.promise),t._postMessage({sourceName:o,targetName:l,stream:s.ENQUEUE,streamId:n,chunk:e},a)},close(){this.isCancelled||(this.isCancelled=!0,c.postMessage({sourceName:o,targetName:l,stream:s.CLOSE,streamId:n}),delete t.streamSinks[n])},error(e){(0,i.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,c.postMessage({sourceName:o,targetName:l,stream:s.ERROR,streamId:n,reason:a(e)}))},sinkCapability:(0,i.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};d.sinkCapability.resolve(),d.ready=d.sinkCapability.promise,this.streamSinks[n]=d,new Promise((function(t){t(r(e.data,d))})).then((function(){c.postMessage({sourceName:o,targetName:l,stream:s.START_COMPLETE,streamId:n,success:!0})}),(function(e){c.postMessage({sourceName:o,targetName:l,stream:s.START_COMPLETE,streamId:n,reason:a(e)})}))}_processStreamMessage(e){const t=e.streamId,r=this.sourceName,n=e.sourceName,o=this.comObj;switch(e.stream){case s.START_COMPLETE:e.success?this.streamControllers[t].startCall.resolve():this.streamControllers[t].startCall.reject(a(e.reason));break;case s.PULL_COMPLETE:e.success?this.streamControllers[t].pullCall.resolve():this.streamControllers[t].pullCall.reject(a(e.reason));break;case s.PULL:if(!this.streamSinks[t]){o.postMessage({sourceName:r,targetName:n,stream:s.PULL_COMPLETE,streamId:t,success:!0});break}this.streamSinks[t].desiredSize<=0&&e.desiredSize>0&&this.streamSinks[t].sinkCapability.resolve(),this.streamSinks[t].desiredSize=e.desiredSize;const{onPull:l}=this.streamSinks[e.streamId];new Promise((function(e){e(l&&l())})).then((function(){o.postMessage({sourceName:r,targetName:n,stream:s.PULL_COMPLETE,streamId:t,success:!0})}),(function(e){o.postMessage({sourceName:r,targetName:n,stream:s.PULL_COMPLETE,streamId:t,reason:a(e)})}));break;case s.ENQUEUE:if((0,i.assert)(this.streamControllers[t],"enqueue should have stream controller"),this.streamControllers[t].isClosed)break;this.streamControllers[t].controller.enqueue(e.chunk);break;case s.CLOSE:if((0,i.assert)(this.streamControllers[t],"close should have stream controller"),this.streamControllers[t].isClosed)break;this.streamControllers[t].isClosed=!0,this.streamControllers[t].controller.close(),this._deleteStreamController(t);break;case s.ERROR:(0,i.assert)(this.streamControllers[t],"error should have stream controller"),this.streamControllers[t].controller.error(a(e.reason)),this._deleteStreamController(t);break;case s.CANCEL_COMPLETE:e.success?this.streamControllers[t].cancelCall.resolve():this.streamControllers[t].cancelCall.reject(a(e.reason)),this._deleteStreamController(t);break;case s.CANCEL:if(!this.streamSinks[t])break;const{onCancel:c}=this.streamSinks[e.streamId];new Promise((function(t){t(c&&c(a(e.reason)))})).then((function(){o.postMessage({sourceName:r,targetName:n,stream:s.CANCEL_COMPLETE,streamId:t,success:!0})}),(function(e){o.postMessage({sourceName:r,targetName:n,stream:s.CANCEL_COMPLETE,streamId:t,reason:a(e)})})),this.streamSinks[t].sinkCapability.reject(a(e.reason)),this.streamSinks[t].isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}async _deleteStreamController(e){await Promise.allSettled([this.streamControllers[e].startCall,this.streamControllers[e].pullCall,this.streamControllers[e].cancelCall].map((function(e){return e&&e.promise}))),delete this.streamControllers[e]}_postMessage(e,t){t&&this.postMessageTransfers?this.comObj.postMessage(e,t):this.comObj.postMessage(e)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}t.MessageHandler=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var i=r(2),n=r(13);class s{constructor(e){(0,i.assert)("string"===typeof e,"Metadata: input is not a string"),e=this._repair(e);const t=new n.SimpleXMLParser,r=t.parseFromString(e);this._metadataMap=new Map,r&&this._parse(r)}_repair(e){return e.replace(/^[^<]+/,"").replace(/>\\376\\377([^<]+)/g,(function(e,t){const r=t.replace(/\\([0-3])([0-7])([0-7])/g,(function(e,t,r,i){return String.fromCharCode(64*t+8*r+1*i)})).replace(/&(amp|apos|gt|lt|quot);/g,(function(e,t){switch(t){case"amp":return"&";case"apos":return"'";case"gt":return">";case"lt":return"<";case"quot":return'"'}throw new Error(`_repair: ${t} isn't defined.`)}));let i="";for(let n=0,s=r.length;n<s;n+=2){const e=256*r.charCodeAt(n)+r.charCodeAt(n+1);i+=e>=32&&e<127&&60!==e&&62!==e&&38!==e?String.fromCharCode(e):"&#x"+(65536+e).toString(16).substring(1)+";"}return">"+i}))}_parse(e){let t=e.documentElement;if("rdf:rdf"!==t.nodeName.toLowerCase()){t=t.firstChild;while(t&&"rdf:rdf"!==t.nodeName.toLowerCase())t=t.nextSibling}const r=t?t.nodeName.toLowerCase():null;if(!t||"rdf:rdf"!==r||!t.hasChildNodes())return;const i=t.childNodes;for(let n=0,s=i.length;n<s;n++){const e=i[n];if("rdf:description"===e.nodeName.toLowerCase())for(let t=0,r=e.childNodes.length;t<r;t++)if("#text"!==e.childNodes[t].nodeName.toLowerCase()){const r=e.childNodes[t],i=r.nodeName.toLowerCase();this._metadataMap.set(i,r.textContent.trim())}}}get(e){return this._metadataMap.has(e)?this._metadataMap.get(e):null}getAll(){const e=Object.create(null);for(const[t,r]of this._metadataMap)e[t]=r;return e}has(e){return this._metadataMap.has(e)}}t.Metadata=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleXMLParser=void 0;const i={NoError:0,EndOfDocument:-1,UnterminatedCdat:-2,UnterminatedXmlDeclaration:-3,UnterminatedDoctypeDeclaration:-4,UnterminatedComment:-5,MalformedElement:-6,OutOfMemory:-7,UnterminatedAttributeValue:-8,UnterminatedElement:-9,ElementNeverBegun:-10};function n(e,t){const r=e[t];return" "===r||"\n"===r||"\r"===r||"\t"===r}function s(e){for(let t=0,r=e.length;t<r;t++)if(!n(e,t))return!1;return!0}class a{_resolveEntities(e){return e.replace(/&([^;]+);/g,((e,t)=>{if("#x"===t.substring(0,2))return String.fromCharCode(parseInt(t.substring(2),16));if("#"===t.substring(0,1))return String.fromCharCode(parseInt(t.substring(1),10));switch(t){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return'"'}return this.onResolveEntity(t)}))}_parseContent(e,t){const r=[];let i=t;function s(){while(i<e.length&&n(e,i))++i}while(i<e.length&&!n(e,i)&&">"!==e[i]&&"/"!==e[i])++i;const a=e.substring(t,i);s();while(i<e.length&&">"!==e[i]&&"/"!==e[i]&&"?"!==e[i]){s();let t="",a="";while(i<e.length&&!n(e,i)&&"="!==e[i])t+=e[i],++i;if(s(),"="!==e[i])return null;++i,s();const o=e[i];if('"'!==o&&"'"!==o)return null;const l=e.indexOf(o,++i);if(l<0)return null;a=e.substring(i,l),r.push({name:t,value:this._resolveEntities(a)}),i=l+1,s()}return{name:a,attributes:r,parsed:i-t}}_parseProcessingInstruction(e,t){let r=t;function i(){while(r<e.length&&n(e,r))++r}while(r<e.length&&!n(e,r)&&">"!==e[r]&&"/"!==e[r])++r;const s=e.substring(t,r);i();const a=r;while(r<e.length&&("?"!==e[r]||">"!==e[r+1]))++r;const o=e.substring(a,r);return{name:s,value:o,parsed:r-t}}parseXml(e){let t=0;while(t<e.length){const r=e[t];let n=t;if("<"===r){++n;const t=e[n];let r;switch(t){case"/":if(++n,r=e.indexOf(">",n),r<0)return void this.onError(i.UnterminatedElement);this.onEndElement(e.substring(n,r)),n=r+1;break;case"?":++n;const t=this._parseProcessingInstruction(e,n);if("?>"!==e.substring(n+t.parsed,n+t.parsed+2))return void this.onError(i.UnterminatedXmlDeclaration);this.onPi(t.name,t.value),n+=t.parsed+2;break;case"!":if("--"===e.substring(n+1,n+3)){if(r=e.indexOf("--\x3e",n+3),r<0)return void this.onError(i.UnterminatedComment);this.onComment(e.substring(n+3,r)),n=r+3}else if("[CDATA["===e.substring(n+1,n+8)){if(r=e.indexOf("]]>",n+8),r<0)return void this.onError(i.UnterminatedCdat);this.onCdata(e.substring(n+8,r)),n=r+3}else{if("DOCTYPE"!==e.substring(n+1,n+8))return void this.onError(i.MalformedElement);{const t=e.indexOf("[",n+8);let s=!1;if(r=e.indexOf(">",n+8),r<0)return void this.onError(i.UnterminatedDoctypeDeclaration);if(t>0&&r>t){if(r=e.indexOf("]>",n+8),r<0)return void this.onError(i.UnterminatedDoctypeDeclaration);s=!0}const a=e.substring(n+8,r+(s?1:0));this.onDoctype(a),n=r+(s?2:1)}}break;default:const s=this._parseContent(e,n);if(null===s)return void this.onError(i.MalformedElement);let a=!1;if("/>"===e.substring(n+s.parsed,n+s.parsed+2))a=!0;else if(">"!==e.substring(n+s.parsed,n+s.parsed+1))return void this.onError(i.UnterminatedElement);this.onBeginElement(s.name,s.attributes,a),n+=s.parsed+(a?2:1);break}}else{while(n<e.length&&"<"!==e[n])n++;const r=e.substring(t,n);this.onText(this._resolveEntities(r))}t=n}}onResolveEntity(e){return`&${e};`}onPi(e,t){}onComment(e){}onCdata(e){}onDoctype(e){}onText(e){}onBeginElement(e,t,r){}onEndElement(e){}onError(e){}}class o{constructor(e,t){this.nodeName=e,this.nodeValue=t,Object.defineProperty(this,"parentNode",{value:null,writable:!0})}get firstChild(){return this.childNodes&&this.childNodes[0]}get nextSibling(){const e=this.parentNode.childNodes;if(!e)return;const t=e.indexOf(this);return-1!==t?e[t+1]:void 0}get textContent(){return this.childNodes?this.childNodes.map((function(e){return e.textContent})).join(""):this.nodeValue||""}hasChildNodes(){return this.childNodes&&this.childNodes.length>0}}class l extends a{constructor(){super(),this._currentFragment=null,this._stack=null,this._errorCode=i.NoError}parseFromString(e){if(this._currentFragment=[],this._stack=[],this._errorCode=i.NoError,this.parseXml(e),this._errorCode!==i.NoError)return;const[t]=this._currentFragment;return t?{documentElement:t}:void 0}onResolveEntity(e){switch(e){case"apos":return"'"}return super.onResolveEntity(e)}onText(e){if(s(e))return;const t=new o("#text",e);this._currentFragment.push(t)}onCdata(e){const t=new o("#text",e);this._currentFragment.push(t)}onBeginElement(e,t,r){const i=new o(e);i.childNodes=[],this._currentFragment.push(i),r||(this._stack.push(this._currentFragment),this._currentFragment=i.childNodes)}onEndElement(e){this._currentFragment=this._stack.pop()||[];const t=this._currentFragment[this._currentFragment.length-1];if(t)for(let r=0,i=t.childNodes.length;r<i;r++)t.childNodes[r].parentNode=t}onError(e){this._errorCode=e}}t.SimpleXMLParser=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDataTransportStream=void 0;var i=r(2);class n{constructor(e,t){(0,i.assert)(t,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=e.progressiveDone||!1;const r=e.initialData;if(r&&r.length>0){const e=new Uint8Array(r).buffer;this._queuedChunks.push(e)}this._pdfDataRangeTransport=t,this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._contentLength=e.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener(((e,t)=>{this._onReceiveData({begin:e,chunk:t})})),this._pdfDataRangeTransport.addProgressListener(((e,t)=>{this._onProgress({loaded:e,total:t})})),this._pdfDataRangeTransport.addProgressiveReadListener((e=>{this._onReceiveData({chunk:e})})),this._pdfDataRangeTransport.addProgressiveDoneListener((()=>{this._onProgressiveDone()})),this._pdfDataRangeTransport.transportReady()}_onReceiveData(e){const t=new Uint8Array(e.chunk).buffer;if(void 0===e.begin)this._fullRequestReader?this._fullRequestReader._enqueue(t):this._queuedChunks.push(t);else{const r=this._rangeReaders.some((function(r){return r._begin===e.begin&&(r._enqueue(t),!0)}));(0,i.assert)(r,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?this._fullRequestReader._loaded:0}_onProgress(e){if(void 0===e.total){const t=this._rangeReaders[0];t&&t.onProgress&&t.onProgress({loaded:e.loaded})}else{const t=this._fullRequestReader;t&&t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})}}_onProgressiveDone(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){const t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}getFullReader(){(0,i.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const e=this._queuedChunks;return this._queuedChunks=null,new s(this,e,this._progressiveDone)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const r=new a(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);const t=this._rangeReaders.slice(0);t.forEach((function(t){t.cancel(e)})),this._pdfDataRangeTransport.abort()}}t.PDFDataTransportStream=n;class s{constructor(e,t,r=!1){this._stream=e,this._done=r||!1,this._filename=null,this._queuedChunks=t||[],this._loaded=0;for(const i of this._queuedChunks)this._loaded+=i.byteLength;this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){if(!this._done){if(this._requests.length>0){const t=this._requests.shift();t.resolve({value:e,done:!1})}else this._queuedChunks.push(e);this._loaded+=e.byteLength}}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0){const e=this._queuedChunks.shift();return{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=(0,i.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[]}progressiveDone(){this._done||(this._done=!0)}}class a{constructor(e,t,r){this._stream=e,this._begin=t,this._end=r,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else{const t=this._requests.shift();t.resolve({value:e,done:!1}),this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[]}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=(0,i.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._stream._removeRangeReader(this)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebGLContext=void 0;var i=r(2);class n{constructor({enable:e=!1}){this._enabled=!0===e}get isEnabled(){let e=this._enabled;return e&&(e=s.tryInitGL()),(0,i.shadow)(this,"isEnabled",e)}composeSMask({layer:e,mask:t,properties:r}){return s.composeSMask(e,t,r)}drawFigures({width:e,height:t,backgroundColor:r,figures:i,context:n}){return s.drawFigures(e,t,r,i,n)}clear(){s.cleanup()}}t.WebGLContext=n;var s=function(){function e(e,t,r){var i=e.createShader(r);e.shaderSource(i,t),e.compileShader(i);var n=e.getShaderParameter(i,e.COMPILE_STATUS);if(!n){var s=e.getShaderInfoLog(i);throw new Error("Error during shader compilation: "+s)}return i}function t(t,r){return e(t,r,t.VERTEX_SHADER)}function r(t,r){return e(t,r,t.FRAGMENT_SHADER)}function i(e,t){for(var r=e.createProgram(),i=0,n=t.length;i<n;++i)e.attachShader(r,t[i]);e.linkProgram(r);var s=e.getProgramParameter(r,e.LINK_STATUS);if(!s){var a=e.getProgramInfoLog(r);throw new Error("Error during program linking: "+a)}return r}function n(e,t,r){e.activeTexture(r);var i=e.createTexture();return e.bindTexture(e.TEXTURE_2D,i),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),i}var s,a;function o(){s||(a=document.createElement("canvas"),s=a.getContext("webgl",{premultipliedalpha:!1}))}var l=" attribute vec2 a_position; attribute vec2 a_texCoord; uniform vec2 u_resolution; varying vec2 v_texCoord; void main() { vec2 clipSpace = (a_position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_texCoord = a_texCoord; } ",c=" precision mediump float; uniform vec4 u_backdrop; uniform int u_subtype; uniform sampler2D u_image; uniform sampler2D u_mask; varying vec2 v_texCoord; void main() { vec4 imageColor = texture2D(u_image, v_texCoord); vec4 maskColor = texture2D(u_mask, v_texCoord); if (u_backdrop.a > 0.0) { maskColor.rgb = maskColor.rgb * maskColor.a + u_backdrop.rgb * (1.0 - maskColor.a); } float lum; if (u_subtype == 0) { lum = maskColor.a; } else { lum = maskColor.r * 0.3 + maskColor.g * 0.59 + maskColor.b * 0.11; } imageColor.a *= lum; imageColor.rgb *= imageColor.a; gl_FragColor = imageColor; } ",d=null;function h(){var e,n;o(),e=a,a=null,n=s,s=null;var h=t(n,l),u=r(n,c),p=i(n,[h,u]);n.useProgram(p);var g={};g.gl=n,g.canvas=e,g.resolutionLocation=n.getUniformLocation(p,"u_resolution"),g.positionLocation=n.getAttribLocation(p,"a_position"),g.backdropLocation=n.getUniformLocation(p,"u_backdrop"),g.subtypeLocation=n.getUniformLocation(p,"u_subtype");var f=n.getAttribLocation(p,"a_texCoord"),m=n.getUniformLocation(p,"u_image"),_=n.getUniformLocation(p,"u_mask"),b=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,b),n.bufferData(n.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),n.STATIC_DRAW),n.enableVertexAttribArray(f),n.vertexAttribPointer(f,2,n.FLOAT,!1,0,0),n.uniform1i(m,0),n.uniform1i(_,1),d=g}function u(e,t,r){var i=e.width,s=e.height;d||h();var a=d,o=a.canvas,l=a.gl;o.width=i,o.height=s,l.viewport(0,0,l.drawingBufferWidth,l.drawingBufferHeight),l.uniform2f(a.resolutionLocation,i,s),r.backdrop?l.uniform4f(a.resolutionLocation,r.backdrop[0],r.backdrop[1],r.backdrop[2],1):l.uniform4f(a.resolutionLocation,0,0,0,0),l.uniform1i(a.subtypeLocation,"Luminosity"===r.subtype?1:0);var c=n(l,e,l.TEXTURE0),u=n(l,t,l.TEXTURE1),p=l.createBuffer();return l.bindBuffer(l.ARRAY_BUFFER,p),l.bufferData(l.ARRAY_BUFFER,new Float32Array([0,0,i,0,0,s,0,s,i,0,i,s]),l.STATIC_DRAW),l.enableVertexAttribArray(a.positionLocation),l.vertexAttribPointer(a.positionLocation,2,l.FLOAT,!1,0,0),l.clearColor(0,0,0,0),l.enable(l.BLEND),l.blendFunc(l.ONE,l.ONE_MINUS_SRC_ALPHA),l.clear(l.COLOR_BUFFER_BIT),l.drawArrays(l.TRIANGLES,0,6),l.flush(),l.deleteTexture(c),l.deleteTexture(u),l.deleteBuffer(p),o}var p=" attribute vec2 a_position; attribute vec3 a_color; uniform vec2 u_resolution; uniform vec2 u_scale; uniform vec2 u_offset; varying vec4 v_color; void main() { vec2 position = (a_position + u_offset) * u_scale; vec2 clipSpace = (position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_color = vec4(a_color / 255.0, 1.0); } ",g=" precision mediump float; varying vec4 v_color; void main() { gl_FragColor = v_color; } ",f=null;function m(){var e,n;o(),e=a,a=null,n=s,s=null;var l=t(n,p),c=r(n,g),d=i(n,[l,c]);n.useProgram(d);var h={};h.gl=n,h.canvas=e,h.resolutionLocation=n.getUniformLocation(d,"u_resolution"),h.scaleLocation=n.getUniformLocation(d,"u_scale"),h.offsetLocation=n.getUniformLocation(d,"u_offset"),h.positionLocation=n.getAttribLocation(d,"a_position"),h.colorLocation=n.getAttribLocation(d,"a_color"),f=h}function _(e,t,r,i,n){f||m();var s=f,a=s.canvas,o=s.gl;a.width=e,a.height=t,o.viewport(0,0,o.drawingBufferWidth,o.drawingBufferHeight),o.uniform2f(s.resolutionLocation,e,t);var l,c,d,h=0;for(l=0,c=i.length;l<c;l++)switch(i[l].type){case"lattice":d=i[l].coords.length/i[l].verticesPerRow|0,h+=(d-1)*(i[l].verticesPerRow-1)*6;break;case"triangles":h+=i[l].coords.length;break}var u=new Float32Array(2*h),p=new Uint8Array(3*h),g=n.coords,_=n.colors,b=0,v=0;for(l=0,c=i.length;l<c;l++){var y=i[l],A=y.coords,w=y.colors;switch(y.type){case"lattice":var S=y.verticesPerRow;d=A.length/S|0;for(var C=1;C<d;C++)for(var x=C*S+1,P=1;P<S;P++,x++)u[b]=g[A[x-S-1]],u[b+1]=g[A[x-S-1]+1],u[b+2]=g[A[x-S]],u[b+3]=g[A[x-S]+1],u[b+4]=g[A[x-1]],u[b+5]=g[A[x-1]+1],p[v]=_[w[x-S-1]],p[v+1]=_[w[x-S-1]+1],p[v+2]=_[w[x-S-1]+2],p[v+3]=_[w[x-S]],p[v+4]=_[w[x-S]+1],p[v+5]=_[w[x-S]+2],p[v+6]=_[w[x-1]],p[v+7]=_[w[x-1]+1],p[v+8]=_[w[x-1]+2],u[b+6]=u[b+2],u[b+7]=u[b+3],u[b+8]=u[b+4],u[b+9]=u[b+5],u[b+10]=g[A[x]],u[b+11]=g[A[x]+1],p[v+9]=p[v+3],p[v+10]=p[v+4],p[v+11]=p[v+5],p[v+12]=p[v+6],p[v+13]=p[v+7],p[v+14]=p[v+8],p[v+15]=_[w[x]],p[v+16]=_[w[x]+1],p[v+17]=_[w[x]+2],b+=12,v+=18;break;case"triangles":for(var T=0,E=A.length;T<E;T++)u[b]=g[A[T]],u[b+1]=g[A[T]+1],p[v]=_[w[T]],p[v+1]=_[w[T]+1],p[v+2]=_[w[T]+2],b+=2,v+=3;break}}r?o.clearColor(r[0]/255,r[1]/255,r[2]/255,1):o.clearColor(0,0,0,0),o.clear(o.COLOR_BUFFER_BIT);var L=o.createBuffer();o.bindBuffer(o.ARRAY_BUFFER,L),o.bufferData(o.ARRAY_BUFFER,u,o.STATIC_DRAW),o.enableVertexAttribArray(s.positionLocation),o.vertexAttribPointer(s.positionLocation,2,o.FLOAT,!1,0,0);var k=o.createBuffer();return o.bindBuffer(o.ARRAY_BUFFER,k),o.bufferData(o.ARRAY_BUFFER,p,o.STATIC_DRAW),o.enableVertexAttribArray(s.colorLocation),o.vertexAttribPointer(s.colorLocation,3,o.UNSIGNED_BYTE,!1,0,0),o.uniform2f(s.scaleLocation,n.scaleX,n.scaleY),o.uniform2f(s.offsetLocation,n.offsetX,n.offsetY),o.drawArrays(o.TRIANGLES,0,h),o.flush(),o.deleteBuffer(L),o.deleteBuffer(k),a}return{tryInitGL(){try{return o(),!!s}catch(e){}return!1},composeSMask:u,drawFigures:_,cleanup(){d&&d.canvas&&(d.canvas.width=0,d.canvas.height=0),f&&f.canvas&&(f.canvas.width=0,f.canvas.height=0),d=null,f=null}}}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationLayer=void 0;var i=r(1),n=r(2);class s{static create(e){const t=e.data.annotationType;switch(t){case n.AnnotationType.LINK:return new o(e);case n.AnnotationType.TEXT:return new l(e);case n.AnnotationType.WIDGET:const t=e.data.fieldType;switch(t){case"Tx":return new d(e);case"Btn":return e.data.radioButton?new u(e):e.data.checkBox?new h(e):new p(e);case"Ch":return new g(e)}return new c(e);case n.AnnotationType.POPUP:return new f(e);case n.AnnotationType.FREETEXT:return new _(e);case n.AnnotationType.LINE:return new b(e);case n.AnnotationType.SQUARE:return new v(e);case n.AnnotationType.CIRCLE:return new y(e);case n.AnnotationType.POLYLINE:return new A(e);case n.AnnotationType.CARET:return new S(e);case n.AnnotationType.INK:return new C(e);case n.AnnotationType.POLYGON:return new w(e);case n.AnnotationType.HIGHLIGHT:return new x(e);case n.AnnotationType.UNDERLINE:return new P(e);case n.AnnotationType.SQUIGGLY:return new T(e);case n.AnnotationType.STRIKEOUT:return new E(e);case n.AnnotationType.STAMP:return new L(e);case n.AnnotationType.FILEATTACHMENT:return new k(e);default:return new a(e)}}}class a{constructor(e,t=!1,r=!1){this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.page=e.page,this.viewport=e.viewport,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderInteractiveForms=e.renderInteractiveForms,this.svgFactory=e.svgFactory,t&&(this.container=this._createContainer(r))}_createContainer(e=!1){const t=this.data,r=this.page,i=this.viewport,s=document.createElement("section");let a=t.rect[2]-t.rect[0],o=t.rect[3]-t.rect[1];s.setAttribute("data-annotation-id",t.id);const l=n.Util.normalizeRect([t.rect[0],r.view[3]-t.rect[1]+r.view[1],t.rect[2],r.view[3]-t.rect[3]+r.view[1]]);if(s.style.transform=`matrix(${i.transform.join(",")})`,s.style.transformOrigin=`-${l[0]}px -${l[1]}px`,!e&&t.borderStyle.width>0){s.style.borderWidth=`${t.borderStyle.width}px`,t.borderStyle.style!==n.AnnotationBorderStyleType.UNDERLINE&&(a-=2*t.borderStyle.width,o-=2*t.borderStyle.width);const e=t.borderStyle.horizontalCornerRadius,r=t.borderStyle.verticalCornerRadius;if(e>0||r>0){const t=`${e}px / ${r}px`;s.style.borderRadius=t}switch(t.borderStyle.style){case n.AnnotationBorderStyleType.SOLID:s.style.borderStyle="solid";break;case n.AnnotationBorderStyleType.DASHED:s.style.borderStyle="dashed";break;case n.AnnotationBorderStyleType.BEVELED:(0,n.warn)("Unimplemented border style: beveled");break;case n.AnnotationBorderStyleType.INSET:(0,n.warn)("Unimplemented border style: inset");break;case n.AnnotationBorderStyleType.UNDERLINE:s.style.borderBottomStyle="solid";break;default:break}t.color?s.style.borderColor=n.Util.makeCssRgb(0|t.color[0],0|t.color[1],0|t.color[2]):s.style.borderWidth=0}return s.style.left=`${l[0]}px`,s.style.top=`${l[1]}px`,s.style.width=`${a}px`,s.style.height=`${o}px`,s}_createPopup(e,t,r){t||(t=document.createElement("div"),t.style.height=e.style.height,t.style.width=e.style.width,e.appendChild(t));const i=new m({container:e,trigger:t,color:r.color,title:r.title,modificationDate:r.modificationDate,contents:r.contents,hideWrapper:!0}),n=i.render();n.style.left=e.style.width,e.appendChild(n)}render(){(0,n.unreachable)("Abstract method `AnnotationElement.render` called")}}class o extends a{constructor(e){const t=!!(e.data.url||e.data.dest||e.data.action);super(e,t)}render(){this.container.className="linkAnnotation";const{data:e,linkService:t}=this,r=document.createElement("a");return e.url?(0,i.addLinkAttributes)(r,{url:e.url,target:e.newWindow?i.LinkTarget.BLANK:t.externalLinkTarget,rel:t.externalLinkRel,enabled:t.externalLinkEnabled}):e.action?this._bindNamedAction(r,e.action):this._bindLink(r,e.dest),this.container.appendChild(r),this.container}_bindLink(e,t){e.href=this.linkService.getDestinationHash(t),e.onclick=()=>(t&&this.linkService.navigateTo(t),!1),t&&(e.className="internalLink")}_bindNamedAction(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(t),!1),e.className="internalLink"}}class l extends a{constructor(e){const t=!!(e.data.hasPopup||e.data.title||e.data.contents);super(e,t)}render(){this.container.className="textAnnotation";const e=document.createElement("img");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.alt="[{{type}} Annotation]",e.dataset.l10nId="text_annotation_type",e.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup(this.container,e,this.data),this.container.appendChild(e),this.container}}class c extends a{render(){return this.container}}class d extends c{constructor(e){const t=e.renderInteractiveForms||!e.data.hasAppearance&&!!e.data.fieldValue;super(e,t)}render(){const e=["left","center","right"];this.container.className="textWidgetAnnotation";let t=null;if(this.renderInteractiveForms){if(this.data.multiLine?(t=document.createElement("textarea"),t.textContent=this.data.fieldValue):(t=document.createElement("input"),t.type="text",t.setAttribute("value",this.data.fieldValue)),t.disabled=this.data.readOnly,t.name=this.data.fieldName,null!==this.data.maxLen&&(t.maxLength=this.data.maxLen),this.data.comb){const e=this.data.rect[2]-this.data.rect[0],r=e/this.data.maxLen;t.classList.add("comb"),t.style.letterSpacing=`calc(${r}px - 1ch)`}}else{t=document.createElement("div"),t.textContent=this.data.fieldValue,t.style.verticalAlign="middle",t.style.display="table-cell";let e=null;this.data.fontRefName&&this.page.commonObjs.has(this.data.fontRefName)&&(e=this.page.commonObjs.get(this.data.fontRefName)),this._setTextStyle(t,e)}return null!==this.data.textAlignment&&(t.style.textAlign=e[this.data.textAlignment]),this.container.appendChild(t),this.container}_setTextStyle(e,t){const r=e.style;if(r.fontSize=`${this.data.fontSize}px`,r.direction=this.data.fontDirection<0?"rtl":"ltr",!t)return;let i="normal";t.black?i="900":t.bold&&(i="bold"),r.fontWeight=i,r.fontStyle=t.italic?"italic":"normal";const n=t.loadedName?`"${t.loadedName}", `:"",s=t.fallbackName||"Helvetica, sans-serif";r.fontFamily=n+s}}class h extends c{constructor(e){super(e,e.renderInteractiveForms)}render(){this.container.className="buttonWidgetAnnotation checkBox";const e=document.createElement("input");return e.disabled=this.data.readOnly,e.type="checkbox",e.name=this.data.fieldName,this.data.fieldValue&&"Off"!==this.data.fieldValue&&e.setAttribute("checked",!0),this.container.appendChild(e),this.container}}class u extends c{constructor(e){super(e,e.renderInteractiveForms)}render(){this.container.className="buttonWidgetAnnotation radioButton";const e=document.createElement("input");return e.disabled=this.data.readOnly,e.type="radio",e.name=this.data.fieldName,this.data.fieldValue===this.data.buttonValue&&e.setAttribute("checked",!0),this.container.appendChild(e),this.container}}class p extends o{render(){const e=super.render();return e.className="buttonWidgetAnnotation pushButton",e}}class g extends c{constructor(e){super(e,e.renderInteractiveForms)}render(){this.container.className="choiceWidgetAnnotation";const e=document.createElement("select");e.disabled=this.data.readOnly,e.name=this.data.fieldName,this.data.combo||(e.size=this.data.options.length,this.data.multiSelect&&(e.multiple=!0));for(const t of this.data.options){const r=document.createElement("option");r.textContent=t.displayValue,r.value=t.exportValue,this.data.fieldValue.includes(t.displayValue)&&r.setAttribute("selected",!0),e.appendChild(r)}return this.container.appendChild(e),this.container}}class f extends a{constructor(e){const t=!(!e.data.title&&!e.data.contents);super(e,t)}render(){const e=["Line","Square","Circle","PolyLine","Polygon","Ink"];if(this.container.className="popupAnnotation",e.includes(this.data.parentType))return this.container;const t=`[data-annotation-id="${this.data.parentId}"]`,r=this.layer.querySelector(t);if(!r)return this.container;const i=new m({container:this.container,trigger:r,color:this.data.color,title:this.data.title,modificationDate:this.data.modificationDate,contents:this.data.contents}),n=parseFloat(r.style.left),s=parseFloat(r.style.width);return this.container.style.transformOrigin=`-${n+s}px -${r.style.top}`,this.container.style.left=`${n+s}px`,this.container.appendChild(i.render()),this.container}}class m{constructor(e){this.container=e.container,this.trigger=e.trigger,this.color=e.color,this.title=e.title,this.modificationDate=e.modificationDate,this.contents=e.contents,this.hideWrapper=e.hideWrapper||!1,this.pinned=!1}render(){const e=.7,t=document.createElement("div");t.className="popupWrapper",this.hideElement=this.hideWrapper?t:this.container,this.hideElement.setAttribute("hidden",!0);const r=document.createElement("div");r.className="popup";const s=this.color;if(s){const t=e*(255-s[0])+s[0],i=e*(255-s[1])+s[1],a=e*(255-s[2])+s[2];r.style.backgroundColor=n.Util.makeCssRgb(0|t,0|i,0|a)}const a=document.createElement("h1");a.textContent=this.title,r.appendChild(a);const o=i.PDFDateString.toDateObject(this.modificationDate);if(o){const e=document.createElement("span");e.textContent="{{date}}, {{time}}",e.dataset.l10nId="annotation_date_string",e.dataset.l10nArgs=JSON.stringify({date:o.toLocaleDateString(),time:o.toLocaleTimeString()}),r.appendChild(e)}const l=this._formatContents(this.contents);return r.appendChild(l),this.trigger.addEventListener("click",this._toggle.bind(this)),this.trigger.addEventListener("mouseover",this._show.bind(this,!1)),this.trigger.addEventListener("mouseout",this._hide.bind(this,!1)),r.addEventListener("click",this._hide.bind(this,!0)),t.appendChild(r),t}_formatContents(e){const t=document.createElement("p"),r=e.split(/(?:\r\n?|\n)/);for(let i=0,n=r.length;i<n;++i){const e=r[i];t.appendChild(document.createTextNode(e)),i<n-1&&t.appendChild(document.createElement("br"))}return t}_toggle(){this.pinned?this._hide(!0):this._show(!0)}_show(e=!1){e&&(this.pinned=!0),this.hideElement.hasAttribute("hidden")&&(this.hideElement.removeAttribute("hidden"),this.container.style.zIndex+=1)}_hide(e=!0){e&&(this.pinned=!1),this.hideElement.hasAttribute("hidden")||this.pinned||(this.hideElement.setAttribute("hidden",!0),this.container.style.zIndex-=1)}}class _ extends a{constructor(e){const t=!!(e.data.hasPopup||e.data.title||e.data.contents);super(e,t,!0)}render(){return this.container.className="freeTextAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class b extends a{constructor(e){const t=!!(e.data.hasPopup||e.data.title||e.data.contents);super(e,t,!0)}render(){this.container.className="lineAnnotation";const e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],i=this.svgFactory.create(t,r),n=this.svgFactory.createElement("svg:line");return n.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),n.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),n.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),n.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),n.setAttribute("stroke-width",e.borderStyle.width||1),n.setAttribute("stroke","transparent"),i.appendChild(n),this.container.append(i),this._createPopup(this.container,n,e),this.container}}class v extends a{constructor(e){const t=!!(e.data.hasPopup||e.data.title||e.data.contents);super(e,t,!0)}render(){this.container.className="squareAnnotation";const e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],i=this.svgFactory.create(t,r),n=e.borderStyle.width,s=this.svgFactory.createElement("svg:rect");return s.setAttribute("x",n/2),s.setAttribute("y",n/2),s.setAttribute("width",t-n),s.setAttribute("height",r-n),s.setAttribute("stroke-width",n||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","none"),i.appendChild(s),this.container.append(i),this._createPopup(this.container,s,e),this.container}}class y extends a{constructor(e){const t=!!(e.data.hasPopup||e.data.title||e.data.contents);super(e,t,!0)}render(){this.container.className="circleAnnotation";const e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],i=this.svgFactory.create(t,r),n=e.borderStyle.width,s=this.svgFactory.createElement("svg:ellipse");return s.setAttribute("cx",t/2),s.setAttribute("cy",r/2),s.setAttribute("rx",t/2-n/2),s.setAttribute("ry",r/2-n/2),s.setAttribute("stroke-width",n||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","none"),i.appendChild(s),this.container.append(i),this._createPopup(this.container,s,e),this.container}}class A extends a{constructor(e){const t=!!(e.data.hasPopup||e.data.title||e.data.contents);super(e,t,!0),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.className=this.containerClassName;const e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],i=this.svgFactory.create(t,r);let n=[];for(const a of e.vertices){const t=a.x-e.rect[0],r=e.rect[3]-a.y;n.push(t+","+r)}n=n.join(" ");const s=this.svgFactory.createElement(this.svgElementName);return s.setAttribute("points",n),s.setAttribute("stroke-width",e.borderStyle.width||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","none"),i.appendChild(s),this.container.append(i),this._createPopup(this.container,s,e),this.container}}class w extends A{constructor(e){super(e),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class S extends a{constructor(e){const t=!!(e.data.hasPopup||e.data.title||e.data.contents);super(e,t,!0)}render(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class C extends a{constructor(e){const t=!!(e.data.hasPopup||e.data.title||e.data.contents);super(e,t,!0),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline"}render(){this.container.className=this.containerClassName;const e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],i=this.svgFactory.create(t,r);for(const n of e.inkLists){let t=[];for(const i of n){const r=i.x-e.rect[0],n=e.rect[3]-i.y;t.push(`${r},${n}`)}t=t.join(" ");const r=this.svgFactory.createElement(this.svgElementName);r.setAttribute("points",t),r.setAttribute("stroke-width",e.borderStyle.width||1),r.setAttribute("stroke","transparent"),r.setAttribute("fill","none"),this._createPopup(this.container,r,e),i.appendChild(r)}return this.container.append(i),this.container}}class x extends a{constructor(e){const t=!!(e.data.hasPopup||e.data.title||e.data.contents);super(e,t,!0)}render(){return this.container.className="highlightAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class P extends a{constructor(e){const t=!!(e.data.hasPopup||e.data.title||e.data.contents);super(e,t,!0)}render(){return this.container.className="underlineAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class T extends a{constructor(e){const t=!!(e.data.hasPopup||e.data.title||e.data.contents);super(e,t,!0)}render(){return this.container.className="squigglyAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class E extends a{constructor(e){const t=!!(e.data.hasPopup||e.data.title||e.data.contents);super(e,t,!0)}render(){return this.container.className="strikeoutAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class L extends a{constructor(e){const t=!!(e.data.hasPopup||e.data.title||e.data.contents);super(e,t,!0)}render(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class k extends a{constructor(e){super(e,!0);const{filename:t,content:r}=this.data.file;this.filename=(0,i.getFilenameFromUrl)(t),this.content=r,this.linkService.eventBus&&this.linkService.eventBus.dispatch("fileattachmentannotation",{source:this,id:(0,n.stringToPDFString)(t),filename:t,content:r})}render(){this.container.className="fileAttachmentAnnotation";const e=document.createElement("div");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,e.addEventListener("dblclick",this._download.bind(this)),this.data.hasPopup||!this.data.title&&!this.data.contents||this._createPopup(this.container,e,this.data),this.container.appendChild(e),this.container}_download(){this.downloadManager?this.downloadManager.downloadData(this.content,this.filename,""):(0,n.warn)("Download cannot be started due to unavailable download manager")}}class R{static render(e){const t=[],r=[];for(const i of e.annotations)i&&(i.annotationType!==n.AnnotationType.POPUP?t.push(i):r.push(i));r.length&&t.push(...r);for(const n of t){const t=s.create({data:n,layer:e.div,page:e.page,viewport:e.viewport,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderInteractiveForms:e.renderInteractiveForms||!1,svgFactory:new i.DOMSVGFactory});t.isRenderable&&e.div.appendChild(t.render())}}static update(e){for(const t of e.annotations){const r=e.div.querySelector(`[data-annotation-id="${t.id}"]`);r&&(r.style.transform=`matrix(${e.viewport.transform.join(",")})`)}e.div.removeAttribute("hidden")}}t.AnnotationLayer=R},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderTextLayer=void 0;var i=r(2),n=function(){var e=1e5,t=/\S/;function r(e){return!t.test(e)}function n(e,t,n){var s=document.createElement("span"),a={angle:0,canvasWidth:0,isWhitespace:!1,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1};if(e._textDivs.push(s),r(t.str))return a.isWhitespace=!0,void e._textDivProperties.set(s,a);var o=i.Util.transform(e._viewport.transform,t.transform),l=Math.atan2(o[1],o[0]),c=n[t.fontName];c.vertical&&(l+=Math.PI/2);var d=Math.sqrt(o[2]*o[2]+o[3]*o[3]),h=d;let u,p;c.ascent?h=c.ascent*h:c.descent&&(h=(1+c.descent)*h),0===l?(u=o[4],p=o[5]-h):(u=o[4]+h*Math.sin(l),p=o[5]-h*Math.cos(l)),s.style.left=`${u}px`,s.style.top=`${p}px`,s.style.fontSize=`${d}px`,s.style.fontFamily=c.fontFamily,s.textContent=t.str,e._fontInspectorEnabled&&(s.dataset.fontName=t.fontName),0!==l&&(a.angle=l*(180/Math.PI));let g=!1;if(t.str.length>1)g=!0;else if(t.transform[0]!==t.transform[3]){const e=Math.abs(t.transform[0]),r=Math.abs(t.transform[3]);e!==r&&Math.max(e,r)/Math.min(e,r)>1.5&&(g=!0)}if(g&&(c.vertical?a.canvasWidth=t.height*e._viewport.scale:a.canvasWidth=t.width*e._viewport.scale),e._textDivProperties.set(s,a),e._textContentStream&&e._layoutText(s),e._enhanceTextSelection){var f=1,m=0;0!==l&&(f=Math.cos(l),m=Math.sin(l));var _,b,v=(c.vertical?t.height:t.width)*e._viewport.scale,y=d;0!==l?(_=[f,m,-m,f,u,p],b=i.Util.getAxialAlignedBoundingBox([0,0,v,y],_)):b=[u,p,u+v,p+y],e._bounds.push({left:b[0],top:b[1],right:b[2],bottom:b[3],div:s,size:[v,y],m:_})}}function s(t){if(!t._canceled){var r=t._textDivs,i=t._capability,n=r.length;if(n>e)return t._renderingDone=!0,void i.resolve();if(!t._textContentStream)for(var s=0;s<n;s++)t._layoutText(r[s]);t._renderingDone=!0,i.resolve()}}function a(e,t,r){let i=0;for(let n=0;n<r;n++){const r=e[t++];r>0&&(i=i?Math.min(r,i):r)}return i}function o(e){for(var t=e._bounds,r=e._viewport,n=l(r.width,r.height,t),s=0;s<n.length;s++){var o=t[s].div,c=e._textDivProperties.get(o);if(0!==c.angle){var d=n[s],h=t[s],u=h.m,p=u[0],g=u[1],f=[[0,0],[0,h.size[1]],[h.size[0],0],h.size],m=new Float64Array(64);f.forEach((function(e,t){var r=i.Util.applyTransform(e,u);m[t+0]=p&&(d.left-r[0])/p,m[t+4]=g&&(d.top-r[1])/g,m[t+8]=p&&(d.right-r[0])/p,m[t+12]=g&&(d.bottom-r[1])/g,m[t+16]=g&&(d.left-r[0])/-g,m[t+20]=p&&(d.top-r[1])/p,m[t+24]=g&&(d.right-r[0])/-g,m[t+28]=p&&(d.bottom-r[1])/p,m[t+32]=p&&(d.left-r[0])/-p,m[t+36]=g&&(d.top-r[1])/-g,m[t+40]=p&&(d.right-r[0])/-p,m[t+44]=g&&(d.bottom-r[1])/-g,m[t+48]=g&&(d.left-r[0])/g,m[t+52]=p&&(d.top-r[1])/-p,m[t+56]=g&&(d.right-r[0])/g,m[t+60]=p&&(d.bottom-r[1])/-p}));var _=1+Math.min(Math.abs(p),Math.abs(g));c.paddingLeft=a(m,32,16)/_,c.paddingTop=a(m,48,16)/_,c.paddingRight=a(m,0,16)/_,c.paddingBottom=a(m,16,16)/_,e._textDivProperties.set(o,c)}else c.paddingLeft=t[s].left-n[s].left,c.paddingTop=t[s].top-n[s].top,c.paddingRight=n[s].right-t[s].right,c.paddingBottom=n[s].bottom-t[s].bottom,e._textDivProperties.set(o,c)}}function l(e,t,r){var i=r.map((function(e,t){return{x1:e.left,y1:e.top,x2:e.right,y2:e.bottom,index:t,x1New:void 0,x2New:void 0}}));c(e,i);var n=new Array(r.length);return i.forEach((function(e){var t=e.index;n[t]={left:e.x1New,top:0,right:e.x2New,bottom:0}})),r.map((function(t,r){var s=n[r],a=i[r];a.x1=t.top,a.y1=e-s.right,a.x2=t.bottom,a.y2=e-s.left,a.index=r,a.x1New=void 0,a.x2New=void 0})),c(t,i),i.forEach((function(e){var t=e.index;n[t].top=e.x1New,n[t].bottom=e.x2New})),n}function c(e,t){t.sort((function(e,t){return e.x1-t.x1||e.index-t.index}));var r={x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0},i=[{start:-1/0,end:1/0,boundary:r}];t.forEach((function(e){var t=0;while(t<i.length&&i[t].end<=e.y1)t++;var r,n,s=i.length-1;while(s>=0&&i[s].start>=e.y2)s--;var a,o,l=-1/0;for(a=t;a<=s;a++){var c;r=i[a],n=r.boundary,c=n.x2>e.x1?n.index>e.index?n.x1New:e.x1:void 0===n.x2New?(n.x2+e.x1)/2:n.x2New,c>l&&(l=c)}for(e.x1New=l,a=t;a<=s;a++)r=i[a],n=r.boundary,void 0===n.x2New?n.x2>e.x1?n.index>e.index&&(n.x2New=n.x2):n.x2New=l:n.x2New>l&&(n.x2New=Math.max(l,n.x2));var d=[],h=null;for(a=t;a<=s;a++){r=i[a],n=r.boundary;var u=n.x2>e.x2?n:e;h===u?d[d.length-1].end=r.end:(d.push({start:r.start,end:r.end,boundary:u}),h=u)}for(i[t].start<e.y1&&(d[0].start=e.y1,d.unshift({start:i[t].start,end:e.y1,boundary:i[t].boundary})),e.y2<i[s].end&&(d[d.length-1].end=e.y2,d.push({start:e.y2,end:i[s].end,boundary:i[s].boundary})),a=t;a<=s;a++)if(r=i[a],n=r.boundary,void 0===n.x2New){var p=!1;for(o=t-1;!p&&o>=0&&i[o].start>=n.y1;o--)p=i[o].boundary===n;for(o=s+1;!p&&o<i.length&&i[o].end<=n.y2;o++)p=i[o].boundary===n;for(o=0;!p&&o<d.length;o++)p=d[o].boundary===n;p||(n.x2New=l)}Array.prototype.splice.apply(i,[t,s-t+1].concat(d))})),i.forEach((function(t){var r=t.boundary;void 0===r.x2New&&(r.x2New=Math.max(e,r.x2))}))}function d({textContent:e,textContentStream:t,container:r,viewport:n,textDivs:s,textContentItemsStr:a,enhanceTextSelection:o}){this._textContent=e,this._textContentStream=t,this._container=r,this._viewport=n,this._textDivs=s||[],this._textContentItemsStr=a||[],this._enhanceTextSelection=!!o,this._fontInspectorEnabled=!(!globalThis.FontInspector||!globalThis.FontInspector.enabled),this._reader=null,this._layoutTextLastFontSize=null,this._layoutTextLastFontFamily=null,this._layoutTextCtx=null,this._textDivProperties=new WeakMap,this._renderingDone=!1,this._canceled=!1,this._capability=(0,i.createPromiseCapability)(),this._renderTimer=null,this._bounds=[],this._capability.promise.finally((()=>{this._layoutTextCtx&&(this._layoutTextCtx.canvas.width=0,this._layoutTextCtx.canvas.height=0,this._layoutTextCtx=null)})).catch((()=>{}))}function h(e){var t=new d({textContent:e.textContent,textContentStream:e.textContentStream,container:e.container,viewport:e.viewport,textDivs:e.textDivs,textContentItemsStr:e.textContentItemsStr,enhanceTextSelection:e.enhanceTextSelection});return t._render(e.timeout),t}return d.prototype={get promise(){return this._capability.promise},cancel:function(){this._canceled=!0,this._reader&&(this._reader.cancel(new i.AbortException("TextLayer task cancelled.")),this._reader=null),null!==this._renderTimer&&(clearTimeout(this._renderTimer),this._renderTimer=null),this._capability.reject(new Error("TextLayer task cancelled."))},_processItems(e,t){for(let r=0,i=e.length;r<i;r++)this._textContentItemsStr.push(e[r].str),n(this,e[r],t)},_layoutText(e){const t=this._textDivProperties.get(e);if(t.isWhitespace)return;let r="";if(0!==t.canvasWidth){const{fontSize:i,fontFamily:n}=e.style;i===this._layoutTextLastFontSize&&n===this._layoutTextLastFontFamily||(this._layoutTextCtx.font=`${i} ${n}`,this._layoutTextLastFontSize=i,this._layoutTextLastFontFamily=n);const{width:s}=this._layoutTextCtx.measureText(e.textContent);s>0&&(t.scale=t.canvasWidth/s,r=`scaleX(${t.scale})`)}0!==t.angle&&(r=`rotate(${t.angle}deg) ${r}`),r.length>0&&(this._enhanceTextSelection&&(t.originalTransform=r),e.style.transform=r),this._textDivProperties.set(e,t),this._container.appendChild(e)},_render:function(e){const t=(0,i.createPromiseCapability)();let r=Object.create(null);const n=document.createElement("canvas");if(n.mozOpaque=!0,this._layoutTextCtx=n.getContext("2d",{alpha:!1}),this._textContent){const e=this._textContent.items,r=this._textContent.styles;this._processItems(e,r),t.resolve()}else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');{const e=()=>{this._reader.read().then((({value:i,done:n})=>{n?t.resolve():(Object.assign(r,i.styles),this._processItems(i.items,r),e())}),t.reject)};this._reader=this._textContentStream.getReader(),e()}}t.promise.then((()=>{r=null,e?this._renderTimer=setTimeout((()=>{s(this),this._renderTimer=null}),e):s(this)}),this._capability.reject)},expandTextDivs:function(e){if(!this._enhanceTextSelection||!this._renderingDone)return;null!==this._bounds&&(o(this),this._bounds=null);const t=[],r=[];for(var i=0,n=this._textDivs.length;i<n;i++){const n=this._textDivs[i],s=this._textDivProperties.get(n);s.isWhitespace||(e?(t.length=0,r.length=0,s.originalTransform&&t.push(s.originalTransform),s.paddingTop>0?(r.push(`${s.paddingTop}px`),t.push(`translateY(${-s.paddingTop}px)`)):r.push(0),s.paddingRight>0?r.push(s.paddingRight/s.scale+"px"):r.push(0),s.paddingBottom>0?r.push(`${s.paddingBottom}px`):r.push(0),s.paddingLeft>0?(r.push(s.paddingLeft/s.scale+"px"),t.push(`translateX(${-s.paddingLeft/s.scale}px)`)):r.push(0),n.style.padding=r.join(" "),t.length&&(n.style.transform=t.join(" "))):(n.style.padding=null,n.style.transform=s.originalTransform))}}},h}();t.renderTextLayer=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var i=r(2),n=r(1),s=r(4);let a=function(){throw new Error("Not implemented: SVGGraphics")};t.SVGGraphics=a;{const o={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},l="http://www.w3.org/XML/1998/namespace",c="http://www.w3.org/1999/xlink",d=["butt","round","square"],h=["miter","round","bevel"],u=function(){const e=new Uint8Array([137,80,78,71,13,10,26,10]),t=12,r=new Int32Array(256);for(let i=0;i<256;i++){let e=i;for(let t=0;t<8;t++)e=1&e?3988292384^e>>1&2147483647:e>>1&2147483647;r[i]=e}function n(e,t,i){let n=-1;for(let s=t;s<i;s++){const t=255&(n^e[s]),i=r[t];n=n>>>8^i}return-1^n}function a(e,t,r,i){let s=i;const a=t.length;r[s]=a>>24&255,r[s+1]=a>>16&255,r[s+2]=a>>8&255,r[s+3]=255&a,s+=4,r[s]=255&e.charCodeAt(0),r[s+1]=255&e.charCodeAt(1),r[s+2]=255&e.charCodeAt(2),r[s+3]=255&e.charCodeAt(3),s+=4,r.set(t,s),s+=t.length;const o=n(r,i+4,s);r[s]=o>>24&255,r[s+1]=o>>16&255,r[s+2]=o>>8&255,r[s+3]=255&o}function o(e,t,r){let i=1,n=0;for(let s=t;s<r;++s)i=(i+(255&e[s]))%65521,n=(n+i)%65521;return n<<16|i}function l(e){if(!s.isNodeJS)return c(e);try{let t;t=parseInt(process.versions.node)>=8?e:Buffer.from(e);const r=__webpack_require__(258).deflateSync(t,{level:9});return r instanceof Uint8Array?r:new Uint8Array(r)}catch(t){(0,i.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+t)}return c(e)}function c(e){let t=e.length;const r=65535,i=Math.ceil(t/r),n=new Uint8Array(2+t+5*i+4);let s=0;n[s++]=120,n[s++]=156;let a=0;while(t>r)n[s++]=0,n[s++]=255,n[s++]=255,n[s++]=0,n[s++]=0,n.set(e.subarray(a,a+r),s),s+=r,a+=r,t-=r;n[s++]=1,n[s++]=255&t,n[s++]=t>>8&255,n[s++]=255&~t,n[s++]=(65535&~t)>>8&255,n.set(e.subarray(a),s),s+=e.length-a;const l=o(e,0,e.length);return n[s++]=l>>24&255,n[s++]=l>>16&255,n[s++]=l>>8&255,n[s++]=255&l,n}function d(r,n,s,o){const c=r.width,d=r.height;let h,u,p;const g=r.data;switch(n){case i.ImageKind.GRAYSCALE_1BPP:u=0,h=1,p=c+7>>3;break;case i.ImageKind.RGB_24BPP:u=2,h=8,p=3*c;break;case i.ImageKind.RGBA_32BPP:u=6,h=8,p=4*c;break;default:throw new Error("invalid format")}const f=new Uint8Array((1+p)*d);let m=0,_=0;for(let e=0;e<d;++e)f[m++]=0,f.set(g.subarray(_,_+p),m),_+=p,m+=p;if(n===i.ImageKind.GRAYSCALE_1BPP&&o){m=0;for(let e=0;e<d;e++){m++;for(let e=0;e<p;e++)f[m++]^=255}}const b=new Uint8Array([c>>24&255,c>>16&255,c>>8&255,255&c,d>>24&255,d>>16&255,d>>8&255,255&d,h,u,0,0,0]),v=l(f),y=e.length+3*t+b.length+v.length,A=new Uint8Array(y);let w=0;return A.set(e,w),w+=e.length,a("IHDR",b,A,w),w+=t+b.length,a("IDATA",v,A,w),w+=t+v.length,a("IEND",new Uint8Array(0),A,w),(0,i.createObjectURL)(A,"image/png",s)}return function(e,t,r){const n=void 0===e.kind?i.ImageKind.GRAYSCALE_1BPP:e.kind;return d(e,n,t,r)}}();class p{constructor(){this.fontSizeScale=1,this.fontWeight=o.fontWeight,this.fontSize=0,this.textMatrix=i.IDENTITY_MATRIX,this.fontMatrix=i.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=i.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=o.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(e,t){this.x=e,this.y=t}}function g(e){let t=[];const r=[];for(const i of e)"save"!==i.fn?"restore"===i.fn?t=r.pop():t.push(i):(t.push({fnId:92,fn:"group",items:[]}),r.push(t),t=t[t.length-1].items);return t}function f(e){if(Number.isInteger(e))return e.toString();const t=e.toFixed(10);let r=t.length-1;if("0"!==t[r])return t;do{r--}while("0"===t[r]);return t.substring(0,"."===t[r]?r:r+1)}function m(e){if(0===e[4]&&0===e[5]){if(0===e[1]&&0===e[2])return 1===e[0]&&1===e[3]?"":`scale(${f(e[0])} ${f(e[3])})`;if(e[0]===e[3]&&e[1]===-e[2]){const t=180*Math.acos(e[0])/Math.PI;return`rotate(${f(t)})`}}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return`translate(${f(e[4])} ${f(e[5])})`;return`matrix(${f(e[0])} ${f(e[1])} ${f(e[2])} ${f(e[3])} ${f(e[4])} ${f(e[5])})`}let _=0,b=0,v=0;t.SVGGraphics=a=class{constructor(e,t,r=!1){this.svgFactory=new n.DOMSVGFactory,this.current=new p,this.transformMatrix=i.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=e,this.objs=t,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!r,this._operatorIdMapping=[];for(const n in i.OPS)this._operatorIdMapping[i.OPS[n]]=n}save(){this.transformStack.push(this.transformMatrix);const e=this.current;this.extraStack.push(e),this.current=e.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(e){this.save(),this.executeOpTree(e),this.restore()}loadDependencies(e){const t=e.fnArray,r=e.argsArray;for(let n=0,s=t.length;n<s;n++)if(t[n]===i.OPS.dependency)for(const e of r[n]){const t=e.startsWith("g_")?this.commonObjs:this.objs,r=new Promise((r=>{t.get(e,r)}));this.current.dependencies.push(r)}return Promise.all(this.current.dependencies)}transform(e,t,r,n,s,a){const o=[e,t,r,n,s,a];this.transformMatrix=i.Util.transform(this.transformMatrix,o),this.tgrp=null}getSVG(e,t){this.viewport=t;const r=this._initialize(t);return this.loadDependencies(e).then((()=>(this.transformMatrix=i.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(e)),r)))}convertOpList(e){const t=this._operatorIdMapping,r=e.argsArray,i=e.fnArray,n=[];for(let s=0,a=i.length;s<a;s++){const e=i[s];n.push({fnId:e,fn:t[e],args:r[s]})}return g(n)}executeOpTree(e){for(const t of e){const e=t.fn,r=t.fnId,n=t.args;switch(0|r){case i.OPS.beginText:this.beginText();break;case i.OPS.dependency:break;case i.OPS.setLeading:this.setLeading(n);break;case i.OPS.setLeadingMoveText:this.setLeadingMoveText(n[0],n[1]);break;case i.OPS.setFont:this.setFont(n);break;case i.OPS.showText:this.showText(n[0]);break;case i.OPS.showSpacedText:this.showText(n[0]);break;case i.OPS.endText:this.endText();break;case i.OPS.moveText:this.moveText(n[0],n[1]);break;case i.OPS.setCharSpacing:this.setCharSpacing(n[0]);break;case i.OPS.setWordSpacing:this.setWordSpacing(n[0]);break;case i.OPS.setHScale:this.setHScale(n[0]);break;case i.OPS.setTextMatrix:this.setTextMatrix(n[0],n[1],n[2],n[3],n[4],n[5]);break;case i.OPS.setTextRise:this.setTextRise(n[0]);break;case i.OPS.setTextRenderingMode:this.setTextRenderingMode(n[0]);break;case i.OPS.setLineWidth:this.setLineWidth(n[0]);break;case i.OPS.setLineJoin:this.setLineJoin(n[0]);break;case i.OPS.setLineCap:this.setLineCap(n[0]);break;case i.OPS.setMiterLimit:this.setMiterLimit(n[0]);break;case i.OPS.setFillRGBColor:this.setFillRGBColor(n[0],n[1],n[2]);break;case i.OPS.setStrokeRGBColor:this.setStrokeRGBColor(n[0],n[1],n[2]);break;case i.OPS.setStrokeColorN:this.setStrokeColorN(n);break;case i.OPS.setFillColorN:this.setFillColorN(n);break;case i.OPS.shadingFill:this.shadingFill(n[0]);break;case i.OPS.setDash:this.setDash(n[0],n[1]);break;case i.OPS.setRenderingIntent:this.setRenderingIntent(n[0]);break;case i.OPS.setFlatness:this.setFlatness(n[0]);break;case i.OPS.setGState:this.setGState(n[0]);break;case i.OPS.fill:this.fill();break;case i.OPS.eoFill:this.eoFill();break;case i.OPS.stroke:this.stroke();break;case i.OPS.fillStroke:this.fillStroke();break;case i.OPS.eoFillStroke:this.eoFillStroke();break;case i.OPS.clip:this.clip("nonzero");break;case i.OPS.eoClip:this.clip("evenodd");break;case i.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case i.OPS.paintImageXObject:this.paintImageXObject(n[0]);break;case i.OPS.paintInlineImageXObject:this.paintInlineImageXObject(n[0]);break;case i.OPS.paintImageMaskXObject:this.paintImageMaskXObject(n[0]);break;case i.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(n[0],n[1]);break;case i.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case i.OPS.closePath:this.closePath();break;case i.OPS.closeStroke:this.closeStroke();break;case i.OPS.closeFillStroke:this.closeFillStroke();break;case i.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case i.OPS.nextLine:this.nextLine();break;case i.OPS.transform:this.transform(n[0],n[1],n[2],n[3],n[4],n[5]);break;case i.OPS.constructPath:this.constructPath(n[0],n[1]);break;case i.OPS.endPath:this.endPath();break;case 92:this.group(t.items);break;default:(0,i.warn)(`Unimplemented operator ${e}`);break}}}setWordSpacing(e){this.current.wordSpacing=e}setCharSpacing(e){this.current.charSpacing=e}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(e,t,r,i,n,s){const a=this.current;a.textMatrix=a.lineMatrix=[e,t,r,i,n,s],a.textMatrixScale=Math.sqrt(e*e+t*t),a.x=a.lineX=0,a.y=a.lineY=0,a.xcoords=[],a.ycoords=[],a.tspan=this.svgFactory.createElement("svg:tspan"),a.tspan.setAttributeNS(null,"font-family",a.fontFamily),a.tspan.setAttributeNS(null,"font-size",`${f(a.fontSize)}px`),a.tspan.setAttributeNS(null,"y",f(-a.y)),a.txtElement=this.svgFactory.createElement("svg:text"),a.txtElement.appendChild(a.tspan)}beginText(){const e=this.current;e.x=e.lineX=0,e.y=e.lineY=0,e.textMatrix=i.IDENTITY_MATRIX,e.lineMatrix=i.IDENTITY_MATRIX,e.textMatrixScale=1,e.tspan=this.svgFactory.createElement("svg:tspan"),e.txtElement=this.svgFactory.createElement("svg:text"),e.txtgrp=this.svgFactory.createElement("svg:g"),e.xcoords=[],e.ycoords=[]}moveText(e,t){const r=this.current;r.x=r.lineX+=e,r.y=r.lineY+=t,r.xcoords=[],r.ycoords=[],r.tspan=this.svgFactory.createElement("svg:tspan"),r.tspan.setAttributeNS(null,"font-family",r.fontFamily),r.tspan.setAttributeNS(null,"font-size",`${f(r.fontSize)}px`),r.tspan.setAttributeNS(null,"y",f(-r.y))}showText(e){const t=this.current,r=t.font,n=t.fontSize;if(0===n)return;const s=t.fontSizeScale,a=t.charSpacing,c=t.wordSpacing,d=t.fontDirection,h=t.textHScale*d,u=r.vertical,p=u?1:-1,g=r.defaultVMetrics,_=n*t.fontMatrix[0];let b=0;for(const o of e){if(null===o){b+=d*c;continue}if((0,i.isNum)(o)){b+=p*o*n/1e3;continue}const e=(o.isSpace?c:0)+a,l=o.fontChar;let h,f,m,v=o.width;if(u){let e;const t=o.vmetric||g;e=o.vmetric?t[1]:.5*v,e=-e*_;const r=t[2]*_;v=t?-t[0]:v,h=e/s,f=(b+r)/s}else h=b/s,f=0;(o.isInFont||r.missingFile)&&(t.xcoords.push(t.x+h),u&&t.ycoords.push(-t.y+f),t.tspan.textContent+=l),m=u?v*_-e*d:v*_+e*d,b+=m}t.tspan.setAttributeNS(null,"x",t.xcoords.map(f).join(" ")),u?t.tspan.setAttributeNS(null,"y",t.ycoords.map(f).join(" ")):t.tspan.setAttributeNS(null,"y",f(-t.y)),u?t.y-=b:t.x+=b*h,t.tspan.setAttributeNS(null,"font-family",t.fontFamily),t.tspan.setAttributeNS(null,"font-size",`${f(t.fontSize)}px`),t.fontStyle!==o.fontStyle&&t.tspan.setAttributeNS(null,"font-style",t.fontStyle),t.fontWeight!==o.fontWeight&&t.tspan.setAttributeNS(null,"font-weight",t.fontWeight);const v=t.textRenderingMode&i.TextRenderingMode.FILL_STROKE_MASK;if(v===i.TextRenderingMode.FILL||v===i.TextRenderingMode.FILL_STROKE?(t.fillColor!==o.fillColor&&t.tspan.setAttributeNS(null,"fill",t.fillColor),t.fillAlpha<1&&t.tspan.setAttributeNS(null,"fill-opacity",t.fillAlpha)):t.textRenderingMode===i.TextRenderingMode.ADD_TO_PATH?t.tspan.setAttributeNS(null,"fill","transparent"):t.tspan.setAttributeNS(null,"fill","none"),v===i.TextRenderingMode.STROKE||v===i.TextRenderingMode.FILL_STROKE){const e=1/(t.textMatrixScale||1);this._setStrokeAttributes(t.tspan,e)}let y=t.textMatrix;0!==t.textRise&&(y=y.slice(),y[5]+=t.textRise),t.txtElement.setAttributeNS(null,"transform",`${m(y)} scale(${f(h)}, -1)`),t.txtElement.setAttributeNS(l,"xml:space","preserve"),t.txtElement.appendChild(t.tspan),t.txtgrp.appendChild(t.txtElement),this._ensureTransformGroup().appendChild(t.txtElement)}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}addFontStyle(e){if(!e.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.appendChild(this.cssStyle));const t=(0,i.createObjectURL)(e.data,e.mimetype,this.forceDataSchema);this.cssStyle.textContent+=`@font-face { font-family: "${e.loadedName}"; src: url(${t}); }\n`}setFont(e){const t=this.current,r=this.commonObjs.get(e[0]);let n=e[1];t.font=r,!this.embedFonts||r.missingFile||this.embeddedFonts[r.loadedName]||(this.addFontStyle(r),this.embeddedFonts[r.loadedName]=r),t.fontMatrix=r.fontMatrix?r.fontMatrix:i.FONT_IDENTITY_MATRIX;let s="normal";r.black?s="900":r.bold&&(s="bold");const a=r.italic?"italic":"normal";n<0?(n=-n,t.fontDirection=-1):t.fontDirection=1,t.fontSize=n,t.fontFamily=r.loadedName,t.fontWeight=s,t.fontStyle=a,t.tspan=this.svgFactory.createElement("svg:tspan"),t.tspan.setAttributeNS(null,"y",f(-t.y)),t.xcoords=[],t.ycoords=[]}endText(){const e=this.current;e.textRenderingMode&i.TextRenderingMode.ADD_TO_PATH_FLAG&&e.txtElement&&e.txtElement.hasChildNodes()&&(e.element=e.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(e){e>0&&(this.current.lineWidth=e)}setLineCap(e){this.current.lineCap=d[e]}setLineJoin(e){this.current.lineJoin=h[e]}setMiterLimit(e){this.current.miterLimit=e}setStrokeAlpha(e){this.current.strokeAlpha=e}setStrokeRGBColor(e,t,r){this.current.strokeColor=i.Util.makeCssRgb(e,t,r)}setFillAlpha(e){this.current.fillAlpha=e}setFillRGBColor(e,t,r){this.current.fillColor=i.Util.makeCssRgb(e,t,r),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(e){this.current.strokeColor=this._makeColorN_Pattern(e)}setFillColorN(e){this.current.fillColor=this._makeColorN_Pattern(e)}shadingFill(e){const t=this.viewport.width,r=this.viewport.height,n=i.Util.inverseTransform(this.transformMatrix),s=i.Util.applyTransform([0,0],n),a=i.Util.applyTransform([0,r],n),o=i.Util.applyTransform([t,0],n),l=i.Util.applyTransform([t,r],n),c=Math.min(s[0],a[0],o[0],l[0]),d=Math.min(s[1],a[1],o[1],l[1]),h=Math.max(s[0],a[0],o[0],l[0]),u=Math.max(s[1],a[1],o[1],l[1]),p=this.svgFactory.createElement("svg:rect");p.setAttributeNS(null,"x",c),p.setAttributeNS(null,"y",d),p.setAttributeNS(null,"width",h-c),p.setAttributeNS(null,"height",u-d),p.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this.current.fillAlpha<1&&p.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().appendChild(p)}_makeColorN_Pattern(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}_makeTilingPattern(e){const t=e[1],r=e[2],n=e[3]||i.IDENTITY_MATRIX,[s,a,o,l]=e[4],c=e[5],d=e[6],h=e[7],u="shading"+v++,[p,g]=i.Util.applyTransform([s,a],n),[f,m]=i.Util.applyTransform([o,l],n),[_,b]=i.Util.singularValueDecompose2dScale(n),y=c*_,A=d*b,w=this.svgFactory.createElement("svg:pattern");w.setAttributeNS(null,"id",u),w.setAttributeNS(null,"patternUnits","userSpaceOnUse"),w.setAttributeNS(null,"width",y),w.setAttributeNS(null,"height",A),w.setAttributeNS(null,"x",`${p}`),w.setAttributeNS(null,"y",`${g}`);const S=this.svg,C=this.transformMatrix,x=this.current.fillColor,P=this.current.strokeColor,T=this.svgFactory.create(f-p,m-g);if(this.svg=T,this.transformMatrix=n,2===h){const e=i.Util.makeCssRgb(...t);this.current.fillColor=e,this.current.strokeColor=e}return this.executeOpTree(this.convertOpList(r)),this.svg=S,this.transformMatrix=C,this.current.fillColor=x,this.current.strokeColor=P,w.appendChild(T.childNodes[0]),this.defs.appendChild(w),`url(#${u})`}_makeShadingPattern(e){switch(e[0]){case"RadialAxial":const t="shading"+v++,r=e[3];let n;switch(e[1]){case"axial":const r=e[4],i=e[5];n=this.svgFactory.createElement("svg:linearGradient"),n.setAttributeNS(null,"id",t),n.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),n.setAttributeNS(null,"x1",r[0]),n.setAttributeNS(null,"y1",r[1]),n.setAttributeNS(null,"x2",i[0]),n.setAttributeNS(null,"y2",i[1]);break;case"radial":const s=e[4],a=e[5],o=e[6],l=e[7];n=this.svgFactory.createElement("svg:radialGradient"),n.setAttributeNS(null,"id",t),n.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),n.setAttributeNS(null,"cx",a[0]),n.setAttributeNS(null,"cy",a[1]),n.setAttributeNS(null,"r",l),n.setAttributeNS(null,"fx",s[0]),n.setAttributeNS(null,"fy",s[1]),n.setAttributeNS(null,"fr",o);break;default:throw new Error(`Unknown RadialAxial type: ${e[1]}`)}for(const e of r){const t=this.svgFactory.createElement("svg:stop");t.setAttributeNS(null,"offset",e[0]),t.setAttributeNS(null,"stop-color",e[1]),n.appendChild(t)}return this.defs.appendChild(n),`url(#${t})`;case"Mesh":return(0,i.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${e[0]}`)}}setDash(e,t){this.current.dashArray=e,this.current.dashPhase=t}constructPath(e,t){const r=this.current;let n=r.x,s=r.y,a=[],o=0;for(const l of e)switch(0|l){case i.OPS.rectangle:n=t[o++],s=t[o++];const e=t[o++],r=t[o++],l=n+e,c=s+r;a.push("M",f(n),f(s),"L",f(l),f(s),"L",f(l),f(c),"L",f(n),f(c),"Z");break;case i.OPS.moveTo:n=t[o++],s=t[o++],a.push("M",f(n),f(s));break;case i.OPS.lineTo:n=t[o++],s=t[o++],a.push("L",f(n),f(s));break;case i.OPS.curveTo:n=t[o+4],s=t[o+5],a.push("C",f(t[o]),f(t[o+1]),f(t[o+2]),f(t[o+3]),f(n),f(s)),o+=6;break;case i.OPS.curveTo2:a.push("C",f(n),f(s),f(t[o]),f(t[o+1]),f(t[o+2]),f(t[o+3])),n=t[o+2],s=t[o+3],o+=4;break;case i.OPS.curveTo3:n=t[o+2],s=t[o+3],a.push("C",f(t[o]),f(t[o+1]),f(n),f(s),f(n),f(s)),o+=4;break;case i.OPS.closePath:a.push("Z");break}a=a.join(" "),r.path&&e.length>0&&e[0]!==i.OPS.rectangle&&e[0]!==i.OPS.moveTo?a=r.path.getAttributeNS(null,"d")+a:(r.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().appendChild(r.path)),r.path.setAttributeNS(null,"d",a),r.path.setAttributeNS(null,"fill","none"),r.element=r.path,r.setCurrentPoint(n,s)}endPath(){const e=this.current;if(e.path=null,!this.pendingClip)return;if(!e.element)return void(this.pendingClip=null);const t="clippath"+_++,r=this.svgFactory.createElement("svg:clipPath");r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"transform",m(this.transformMatrix));const i=e.element.cloneNode(!0);"evenodd"===this.pendingClip?i.setAttributeNS(null,"clip-rule","evenodd"):i.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,r.appendChild(i),this.defs.appendChild(r),e.activeClipUrl&&(e.clipGroup=null,this.extraStack.forEach((function(e){e.clipGroup=null})),r.setAttributeNS(null,"clip-path",e.activeClipUrl)),e.activeClipUrl=`url(#${t})`,this.tgrp=null}clip(e){this.pendingClip=e}closePath(){const e=this.current;if(e.path){const t=`${e.path.getAttributeNS(null,"d")}Z`;e.path.setAttributeNS(null,"d",t)}}setLeading(e){this.current.leading=-e}setTextRise(e){this.current.textRise=e}setTextRenderingMode(e){this.current.textRenderingMode=e}setHScale(e){this.current.textHScale=e/100}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,r]of e)switch(t){case"LW":this.setLineWidth(r);break;case"LC":this.setLineCap(r);break;case"LJ":this.setLineJoin(r);break;case"ML":this.setMiterLimit(r);break;case"D":this.setDash(r[0],r[1]);break;case"RI":this.setRenderingIntent(r);break;case"FL":this.setFlatness(r);break;case"Font":this.setFont(r);break;case"CA":this.setStrokeAlpha(r);break;case"ca":this.setFillAlpha(r);break;default:(0,i.warn)(`Unimplemented graphic state operator ${t}`);break}}fill(){const e=this.current;e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}stroke(){const e=this.current;e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(e,t=1){const r=this.current;let i=r.dashArray;1!==t&&i.length>0&&(i=i.map((function(e){return t*e}))),e.setAttributeNS(null,"stroke",r.strokeColor),e.setAttributeNS(null,"stroke-opacity",r.strokeAlpha),e.setAttributeNS(null,"stroke-miterlimit",f(r.miterLimit)),e.setAttributeNS(null,"stroke-linecap",r.lineCap),e.setAttributeNS(null,"stroke-linejoin",r.lineJoin),e.setAttributeNS(null,"stroke-width",f(t*r.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",i.map(f).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",f(t*r.dashPhase)+"px")}eoFill(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const e=this.svgFactory.createElement("svg:rect");e.setAttributeNS(null,"x","0"),e.setAttributeNS(null,"y","0"),e.setAttributeNS(null,"width","1px"),e.setAttributeNS(null,"height","1px"),e.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().appendChild(e)}paintImageXObject(e){const t=this.objs.get(e);t?this.paintInlineImageXObject(t):(0,i.warn)(`Dependent image with object ID ${e} is not ready yet`)}paintInlineImageXObject(e,t){const r=e.width,i=e.height,n=u(e,this.forceDataSchema,!!t),s=this.svgFactory.createElement("svg:rect");s.setAttributeNS(null,"x","0"),s.setAttributeNS(null,"y","0"),s.setAttributeNS(null,"width",f(r)),s.setAttributeNS(null,"height",f(i)),this.current.element=s,this.clip("nonzero");const a=this.svgFactory.createElement("svg:image");a.setAttributeNS(c,"xlink:href",n),a.setAttributeNS(null,"x","0"),a.setAttributeNS(null,"y",f(-i)),a.setAttributeNS(null,"width",f(r)+"px"),a.setAttributeNS(null,"height",f(i)+"px"),a.setAttributeNS(null,"transform",`scale(${f(1/r)} ${f(-1/i)})`),t?t.appendChild(a):this._ensureTransformGroup().appendChild(a)}paintImageMaskXObject(e){const t=this.current,r=e.width,i=e.height,n=t.fillColor;t.maskId="mask"+b++;const s=this.svgFactory.createElement("svg:mask");s.setAttributeNS(null,"id",t.maskId);const a=this.svgFactory.createElement("svg:rect");a.setAttributeNS(null,"x","0"),a.setAttributeNS(null,"y","0"),a.setAttributeNS(null,"width",f(r)),a.setAttributeNS(null,"height",f(i)),a.setAttributeNS(null,"fill",n),a.setAttributeNS(null,"mask",`url(#${t.maskId})`),this.defs.appendChild(s),this._ensureTransformGroup().appendChild(a),this.paintInlineImageXObject(e,s)}paintFormXObjectBegin(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){const e=t[2]-t[0],r=t[3]-t[1],i=this.svgFactory.createElement("svg:rect");i.setAttributeNS(null,"x",t[0]),i.setAttributeNS(null,"y",t[1]),i.setAttributeNS(null,"width",f(e)),i.setAttributeNS(null,"height",f(r)),this.current.element=i,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(e){const t=this.svgFactory.create(e.width,e.height),r=this.svgFactory.createElement("svg:defs");t.appendChild(r),this.defs=r;const i=this.svgFactory.createElement("svg:g");return i.setAttributeNS(null,"transform",m(e.transform)),t.appendChild(i),this.svg=i,t}_ensureClipGroup(){if(!this.current.clipGroup){const e=this.svgFactory.createElement("svg:g");e.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.appendChild(e),this.current.clipGroup=e}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",m(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var i=r(2),n=r(20);const s=__webpack_require__(172),a=__webpack_require__(1),o=__webpack_require__(779),l=__webpack_require__(558),c=/^file:\/\/\/[a-zA-Z]:\//;function d(e){const t=l.parse(e);return"file:"===t.protocol||t.host?t:/^[a-z]:[/\\]/i.test(e)?l.parse(`file:///${e}`):(t.host||(t.protocol="file:"),t)}class h{constructor(e){this.source=e,this.url=d(e.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?this._fullRequestReader._loaded:0}getFullReader(){return(0,i.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new _(this):new f(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const r=this.isFsUrl?new b(this,e,t):new m(this,e,t);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);const t=this._rangeRequestReaders.slice(0);t.forEach((function(t){t.cancel(e)}))}}t.PDFNodeStream=h;class u{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;const t=e.source;this._contentLength=t.length,this._loaded=0,this._filename=null,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._readableStream=null,this._readCapability=(0,i.createPromiseCapability)(),this._headersCapability=(0,i.createPromiseCapability)()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();if(null===e)return this._readCapability=(0,i.createPromiseCapability)(),this.read();this._loaded+=e.length,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength});const t=new Uint8Array(e).buffer;return{value:t,done:!1}}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",(()=>{this._readCapability.resolve()})),e.on("end",(()=>{e.destroy(),this._done=!0,this._readCapability.resolve()})),e.on("error",(e=>{this._error(e)})),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new i.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class p{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,i.createPromiseCapability)();const t=e.source;this._isStreamingSupported=!t.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();if(null===e)return this._readCapability=(0,i.createPromiseCapability)(),this.read();this._loaded+=e.length,this.onProgress&&this.onProgress({loaded:this._loaded});const t=new Uint8Array(e).buffer;return{value:t,done:!1}}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",(()=>{this._readCapability.resolve()})),e.on("end",(()=>{e.destroy(),this._done=!0,this._readCapability.resolve()})),e.on("error",(e=>{this._error(e)})),this._storedError&&this._readableStream.destroy(this._storedError)}}function g(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}class f extends u{constructor(e){super(e);const t=t=>{if(404===t.statusCode){const e=new i.MissingPDFException(`Missing PDF "${this._url}".`);return this._storedError=e,void this._headersCapability.reject(e)}this._headersCapability.resolve(),this._setReadableStream(t);const r=e=>this._readableStream.headers[e.toLowerCase()],{allowRangeRequests:s,suggestedLength:a}=(0,n.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=s,this._contentLength=a||this._contentLength,this._filename=(0,n.extractFilenameFromHeader)(r)};this._request=null,"http:"===this._url.protocol?this._request=a.request(g(this._url,e.httpHeaders),t):this._request=o.request(g(this._url,e.httpHeaders),t),this._request.on("error",(e=>{this._storedError=e,this._headersCapability.reject(e)})),this._request.end()}}class m extends p{constructor(e,t,r){super(e),this._httpHeaders={};for(const i in e.httpHeaders){const t=e.httpHeaders[i];"undefined"!==typeof t&&(this._httpHeaders[i]=t)}this._httpHeaders.Range=`bytes=${t}-${r-1}`;const n=e=>{if(404!==e.statusCode)this._setReadableStream(e);else{const e=new i.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=e}};this._request=null,"http:"===this._url.protocol?this._request=a.request(g(this._url,this._httpHeaders),n):this._request=o.request(g(this._url,this._httpHeaders),n),this._request.on("error",(e=>{this._storedError=e})),this._request.end()}}class _ extends u{constructor(e){super(e);let t=decodeURIComponent(this._url.path);c.test(this._url.href)&&(t=t.replace(/^\//,"")),s.lstat(t,((e,r)=>{if(e)return"ENOENT"===e.code&&(e=new i.MissingPDFException(`Missing PDF "${t}".`)),this._storedError=e,void this._headersCapability.reject(e);this._contentLength=r.size,this._setReadableStream(s.createReadStream(t)),this._headersCapability.resolve()}))}}class b extends p{constructor(e,t,r){super(e);let i=decodeURIComponent(this._url.path);c.test(this._url.href)&&(i=i.replace(/^\//,"")),this._setReadableStream(s.createReadStream(i,{start:t,end:r-1}))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createResponseStatusError=o,t.extractFilenameFromHeader=a,t.validateRangeRequestCapabilities=s,t.validateResponseStatus=l;var i=r(2),n=r(21);function s({getResponseHeader:e,isHttp:t,rangeChunkSize:r,disableRange:n}){(0,i.assert)(r>0,"Range chunk size must be larger than zero");const s={allowRangeRequests:!1,suggestedLength:void 0},a=parseInt(e("Content-Length"),10);if(!Number.isInteger(a))return s;if(s.suggestedLength=a,a<=2*r)return s;if(n||!t)return s;if("bytes"!==e("Accept-Ranges"))return s;const o=e("Content-Encoding")||"identity";return"identity"!==o||(s.allowRangeRequests=!0),s}function a(e){const t=e("Content-Disposition");if(t){let e=(0,n.getFilenameFromContentDispositionHeader)(t);if(e.includes("%"))try{e=decodeURIComponent(e)}catch(r){}if(/\.pdf$/i.test(e))return e}return null}function o(e,t){return 404===e||0===e&&t.startsWith("file:")?new i.MissingPDFException('Missing PDF "'+t+'".'):new i.UnexpectedResponseException("Unexpected server response ("+e+') while retrieving PDF "'+t+'".',e)}function l(e){return 200===e||206===e}},function(e,t,r){"use strict";function i(e){let t=!0,r=i("filename\\*","i").exec(e);if(r){r=r[1];let e=o(r);return e=unescape(e),e=l(e),e=c(e),s(e)}if(r=a(e),r){const e=c(r);return s(e)}if(r=i("filename","i").exec(e),r){r=r[1];let e=o(r);return e=c(e),s(e)}function i(e,t){return new RegExp("(?:^|;)\\s*"+e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',t)}function n(e,r){if(e){if(!/^[\x00-\xFF]+$/.test(r))return r;try{const i=new TextDecoder(e,{fatal:!0}),n=Array.from(r,(function(e){return 255&e.charCodeAt(0)}));r=i.decode(new Uint8Array(n)),t=!1}catch(i){if(/^utf-?8$/i.test(e))try{r=decodeURIComponent(escape(r)),t=!1}catch(n){}}}return r}function s(e){return t&&/[\x80-\xff]/.test(e)&&(e=n("utf-8",e),t&&(e=n("iso-8859-1",e))),e}function a(e){const t=[];let r;const n=i("filename\\*((?!0\\d)\\d+)(\\*?)","ig");while(null!==(r=n.exec(e))){let[,e,i,n]=r;if(e=parseInt(e,10),e in t){if(0===e)break}else t[e]=[i,n]}const s=[];for(let i=0;i<t.length;++i){if(!(i in t))break;let[e,r]=t[i];r=o(r),e&&(r=unescape(r),0===i&&(r=l(r))),s.push(r)}return s.join("")}function o(e){if(e.startsWith('"')){const t=e.slice(1).split('\\"');for(let e=0;e<t.length;++e){const r=t[e].indexOf('"');-1!==r&&(t[e]=t[e].slice(0,r),t.length=e+1),t[e]=t[e].replace(/\\(.)/g,"$1")}e=t.join('"')}return e}function l(e){const t=e.indexOf("'");if(-1===t)return e;const r=e.slice(0,t),i=e.slice(t+1),s=i.replace(/^[^']*'/,"");return n(r,s)}function c(e){return!e.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(e)?e:e.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(e,t,r,i){if("q"===r||"Q"===r)return i=i.replace(/_/g," "),i=i.replace(/=([0-9a-fA-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt(t,16))})),n(t,i);try{i=atob(i)}catch(s){}return n(t,i)}))}return""}Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNetworkStream=void 0;var i=r(2),n=r(20);const s=200,a=206;function o(e){const t=e.response;if("string"!==typeof t)return t;const r=(0,i.stringToBytes)(t);return r.buffer}class l{constructor(e,t){this.url=e,t=t||{},this.isHttp=/^https?:/i.test(e),this.httpHeaders=this.isHttp&&t.httpHeaders||{},this.withCredentials=t.withCredentials||!1,this.getXhr=t.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e,t,r){const i={begin:e,end:t};for(const n in r)i[n]=r[n];return this.request(i)}requestFull(e){return this.request(e)}request(e){const t=this.getXhr(),r=this.currXhrId++,i=this.pendingRequests[r]={xhr:t};t.open("GET",this.url),t.withCredentials=this.withCredentials;for(const n in this.httpHeaders){const e=this.httpHeaders[n];"undefined"!==typeof e&&t.setRequestHeader(n,e)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`),i.expectedStatus=a):i.expectedStatus=s,t.responseType="arraybuffer",e.onError&&(t.onerror=function(r){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,r),t.onprogress=this.onProgress.bind(this,r),i.onHeadersReceived=e.onHeadersReceived,i.onDone=e.onDone,i.onError=e.onError,i.onProgress=e.onProgress,t.send(null),r}onProgress(e,t){const r=this.pendingRequests[e];r&&r.onProgress&&r.onProgress(t)}onStateChange(e,t){const r=this.pendingRequests[e];if(!r)return;const i=r.xhr;if(i.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),4!==i.readyState)return;if(!(e in this.pendingRequests))return;if(delete this.pendingRequests[e],0===i.status&&this.isHttp)return void(r.onError&&r.onError(i.status));const n=i.status||s,l=n===s&&r.expectedStatus===a;if(!l&&n!==r.expectedStatus)return void(r.onError&&r.onError(i.status));const c=o(i);if(n===a){const e=i.getResponseHeader("Content-Range"),t=/bytes (\d+)-(\d+)\/(\d+)/.exec(e);r.onDone({begin:parseInt(t[1],10),chunk:c})}else c?r.onDone({begin:0,chunk:c}):r.onError&&r.onError(i.status)}hasPendingRequests(){for(const e in this.pendingRequests)return!0;return!1}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortAllRequests(){for(const e in this.pendingRequests)this.abortRequest(0|e)}abortRequest(e){const t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}class c{constructor(e){this._source=e,this._manager=new l(e.url,{httpHeaders:e.httpHeaders,withCredentials:e.withCredentials}),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){const t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}getFullReader(){return(0,i.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new d(this._manager,this._source),this._fullRequestReader}getRangeReader(e,t){const r=new h(this._manager,e,t);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);const t=this._rangeRequestReaders.slice(0);t.forEach((function(t){t.cancel(e)}))}}t.PDFNetworkStream=c;class d{constructor(e,t){this._manager=e;const r={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._fullRequestId=e.requestFull(r),this._headersReceivedCapability=(0,i.createPromiseCapability)(),this._disableRange=t.disableRange||!1,this._contentLength=t.length,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const e=this._fullRequestId,t=this._manager.getRequestXhr(e),r=e=>t.getResponseHeader(e),{allowRangeRequests:i,suggestedLength:s}=(0,n.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});i&&(this._isRangeSupported=!0),this._contentLength=s||this._contentLength,this._filename=(0,n.extractFilenameFromHeader)(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}_onDone(e){if(e)if(this._requests.length>0){const t=this._requests.shift();t.resolve({value:e.chunk,done:!1})}else this._cachedChunks.push(e.chunk);this._done=!0,this._cachedChunks.length>0||(this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[])}_onError(e){const t=this._url,r=(0,n.createResponseStatusError)(e,t);this._storedError=r,this._headersReceivedCapability.reject(r),this._requests.forEach((function(e){e.reject(r)})),this._requests=[],this._cachedChunks=[]}_onProgress(e){this.onProgress&&this.onProgress({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0){const e=this._cachedChunks.shift();return{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=(0,i.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersReceivedCapability.reject(e),this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class h{constructor(e,t,r){this._manager=e;const i={onDone:this._onDone.bind(this),onProgress:this._onProgress.bind(this)};this._requestId=e.requestRange(t,r,i),this._requests=[],this._queuedChunk=null,this._done=!1,this.onProgress=null,this.onClosed=null}_close(){this.onClosed&&this.onClosed(this)}_onDone(e){const t=e.chunk;if(this._requests.length>0){const e=this._requests.shift();e.resolve({value:t,done:!1})}else this._queuedChunk=t;this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._close()}_onProgress(e){!this.isStreamingSupported&&this.onProgress&&this.onProgress({loaded:e.loaded})}get isStreamingSupported(){return!1}async read(){if(null!==this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=(0,i.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._requests.forEach((function(e){e.resolve({value:void 0,done:!0})})),this._requests=[],this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var i=r(2),n=r(20);function s(e,t,r){return{method:"GET",headers:e,signal:r&&r.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function a(e){const t=new Headers;for(const r in e){const i=e[r];"undefined"!==typeof i&&t.append(r,i)}return t}class o{constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?this._fullRequestReader._loaded:0}getFullReader(){return(0,i.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new l(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const r=new c(this,e,t);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);const t=this._rangeRequestReaders.slice(0);t.forEach((function(t){t.cancel(e)}))}}t.PDFFetchStream=o;class l{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null;const t=e.source;this._withCredentials=t.withCredentials||!1,this._contentLength=t.length,this._headersCapability=(0,i.createPromiseCapability)(),this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),"undefined"!==typeof AbortController&&(this._abortController=new AbortController),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._headers=a(this._stream.httpHeaders);const r=t.url;fetch(r,s(this._headers,this._withCredentials,this._abortController)).then((e=>{if(!(0,n.validateResponseStatus)(e.status))throw(0,n.createResponseStatusError)(e.status,r);this._reader=e.body.getReader(),this._headersCapability.resolve();const t=t=>e.headers.get(t),{allowRangeRequests:s,suggestedLength:a}=(0,n.validateRangeRequestCapabilities)({getResponseHeader:t,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=s,this._contentLength=a||this._contentLength,this._filename=(0,n.extractFilenameFromHeader)(t),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new i.AbortException("Streaming is disabled."))})).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;const{value:e,done:t}=await this._reader.read();if(t)return{value:e,done:t};this._loaded+=e.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength});const r=new Uint8Array(e).buffer;return{value:r,done:!1}}cancel(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}}class c{constructor(e,t,r){this._stream=e,this._reader=null,this._loaded=0;const o=e.source;this._withCredentials=o.withCredentials||!1,this._readCapability=(0,i.createPromiseCapability)(),this._isStreamingSupported=!o.disableStream,"undefined"!==typeof AbortController&&(this._abortController=new AbortController),this._headers=a(this._stream.httpHeaders),this._headers.append("Range",`bytes=${t}-${r-1}`);const l=o.url;fetch(l,s(this._headers,this._withCredentials,this._abortController)).then((e=>{if(!(0,n.validateResponseStatus)(e.status))throw(0,n.createResponseStatusError)(e.status,l);this._readCapability.resolve(),this._reader=e.body.getReader()})),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:e,done:t}=await this._reader.read();if(t)return{value:e,done:t};this._loaded+=e.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded});const r=new Uint8Array(e).buffer;return{value:r,done:!1}}cancel(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}}}])}))},420:function(e,t){"use strict";
|
24
|
+
/**
|
25
|
+
* @licstart The following is the entire license notice for the
|
26
|
+
* Javascript code in this page
|
27
|
+
*
|
28
|
+
* Copyright 2020 Mozilla Foundation
|
29
|
+
*
|
30
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
31
|
+
* you may not use this file except in compliance with the License.
|
32
|
+
* You may obtain a copy of the License at
|
33
|
+
*
|
34
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
35
|
+
*
|
36
|
+
* Unless required by applicable law or agreed to in writing, software
|
37
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
38
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
39
|
+
* See the License for the specific language governing permissions and
|
40
|
+
* limitations under the License.
|
41
|
+
*
|
42
|
+
* @licend The above is the entire license notice for the
|
43
|
+
* Javascript code in this page
|
44
|
+
*/Object.defineProperty(t,"__esModule",{value:!0}),t.isValidRotation=F,t.isValidScrollMode=M,t.isValidSpreadMode=N,t.isPortraitOrientation=D,t.clamp=V,t.getPDFFileNameFromURL=R,t.noContextMenuHandler=L,t.parseQueryString=w,t.backtrackBeforeAllVisibleElements=T,t.getVisibleElements=E,t.roundToDivide=x,t.getPageSizeInches=P,t.approximateFraction=C,t.getOutputScale=v,t.scrollIntoView=y,t.watchScroll=A,t.binarySearchFirstItem=S,t.normalizeWheelEventDelta=I,t.waitOnEventOrTimeout=B,t.moveToEndOfArray=W,t.WaitOnType=t.animationStarted=t.ProgressBar=t.EventBus=t.NullL10n=t.SpreadMode=t.ScrollMode=t.TextLayerMode=t.RendererType=t.PresentationModeState=t.VERTICAL_PADDING=t.SCROLLBAR_PADDING=t.MAX_AUTO_SCALE=t.UNKNOWN_SCALE=t.MAX_SCALE=t.MIN_SCALE=t.DEFAULT_SCALE=t.DEFAULT_SCALE_VALUE=t.CSS_UNITS=t.AutoPrintRegExp=void 0;const r=96/72;t.CSS_UNITS=r;const i="auto";t.DEFAULT_SCALE_VALUE=i;const n=1;t.DEFAULT_SCALE=n;const s=.1;t.MIN_SCALE=s;const a=10;t.MAX_SCALE=a;const o=0;t.UNKNOWN_SCALE=o;const l=1.25;t.MAX_AUTO_SCALE=l;const c=40;t.SCROLLBAR_PADDING=c;const d=5;t.VERTICAL_PADDING=d;const h={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3};t.PresentationModeState=h;const u={CANVAS:"canvas",SVG:"svg"};t.RendererType=u;const p={DISABLE:0,ENABLE:1,ENABLE_ENHANCE:2};t.TextLayerMode=p;const g={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2};t.ScrollMode=g;const f={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2};t.SpreadMode=f;const m=/\bprint\s*\(/;function _(e,t){return t?e.replace(/\{\{\s*(\w+)\s*\}\}/g,((e,r)=>r in t?t[r]:"{{"+r+"}}")):e}t.AutoPrintRegExp=m;const b={async getLanguage(){return"en-us"},async getDirection(){return"ltr"},async get(e,t,r){return _(r,t)},async translate(e){}};function v(e){const t=window.devicePixelRatio||1,r=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1,i=t/r;return{sx:i,sy:i,scaled:1!==i}}function y(e,t,r=!1){let i=e.offsetParent;if(!i)return void console.error("offsetParent is not set -- cannot scroll");let n=e.offsetTop+e.clientTop,s=e.offsetLeft+e.clientLeft;while(i.clientHeight===i.scrollHeight&&i.clientWidth===i.scrollWidth||r&&"hidden"===getComputedStyle(i).overflow)if(i.dataset._scaleY&&(n/=i.dataset._scaleY,s/=i.dataset._scaleX),n+=i.offsetTop,s+=i.offsetLeft,i=i.offsetParent,!i)return;t&&(void 0!==t.top&&(n+=t.top),void 0!==t.left&&(s+=t.left,i.scrollLeft=s)),i.scrollTop=n}function A(e,t){const r=function(r){n||(n=window.requestAnimationFrame((function(){n=null;const r=e.scrollLeft,s=i.lastX;r!==s&&(i.right=r>s),i.lastX=r;const a=e.scrollTop,o=i.lastY;a!==o&&(i.down=a>o),i.lastY=a,t(i)})))},i={right:!0,down:!0,lastX:e.scrollLeft,lastY:e.scrollTop,_eventHandler:r};let n=null;return e.addEventListener("scroll",r,!0),i}function w(e){const t=e.split("&"),r=Object.create(null);for(let i=0,n=t.length;i<n;++i){const e=t[i].split("="),n=e[0].toLowerCase(),s=e.length>1?e[1]:null;r[decodeURIComponent(n)]=decodeURIComponent(s)}return r}function S(e,t){let r=0,i=e.length-1;if(i<0||!t(e[i]))return e.length;if(t(e[r]))return r;while(r<i){const n=r+i>>1,s=e[n];t(s)?i=n:r=n+1}return r}function C(e){if(Math.floor(e)===e)return[e,1];const t=1/e,r=8;if(t>r)return[1,r];if(Math.floor(t)===t)return[1,t];const i=e>1?t:e;let n,s=0,a=1,o=1,l=1;while(1){const e=s+o,t=a+l;if(t>r)break;i<=e/t?(o=e,l=t):(s=e,a=t)}return n=i-s/a<o/l-i?i===e?[s,a]:[a,s]:i===e?[o,l]:[l,o],n}function x(e,t){const r=e%t;return 0===r?e:Math.round(e-r+t)}function P({view:e,userUnit:t,rotate:r}){const[i,n,s,a]=e,o=r%180!==0,l=(s-i)/72*t,c=(a-n)/72*t;return{width:o?c:l,height:o?l:c}}function T(e,t,r){if(e<2)return e;let i=t[e].div,n=i.offsetTop+i.clientTop;n>=r&&(i=t[e-1].div,n=i.offsetTop+i.clientTop);for(let s=e-2;s>=0;--s){if(i=t[s].div,i.offsetTop+i.clientTop+i.clientHeight<=n)break;e=s}return e}function E(e,t,r=!1,i=!1){const n=e.scrollTop,s=n+e.clientHeight,a=e.scrollLeft,o=a+e.clientWidth;function l(e){const t=e.div,r=t.offsetTop+t.clientTop+t.clientHeight;return r>n}function c(e){const t=e.div,r=t.offsetLeft+t.clientLeft+t.clientWidth;return r>a}const d=[],h=t.length;let u=0===h?0:S(t,i?c:l);u>0&&u<h&&!i&&(u=T(u,t,n));let p=i?o:-1;for(let m=u;m<h;m++){const e=t[m],r=e.div,l=r.offsetLeft+r.clientLeft,c=r.offsetTop+r.clientTop,h=r.clientWidth,u=r.clientHeight,g=l+h,f=c+u;if(-1===p)f>=s&&(p=f);else if((i?l:c)>p)break;if(f<=n||c>=s||g<=a||l>=o)continue;const _=Math.max(0,n-c)+Math.max(0,f-s),b=Math.max(0,a-l)+Math.max(0,g-o),v=(u-_)*(h-b)*100/u/h|0;d.push({id:e.id,x:l,y:c,view:e,percent:v})}const g=d[0],f=d[d.length-1];return r&&d.sort((function(e,t){const r=e.percent-t.percent;return Math.abs(r)>.001?-r:e.id-t.id})),{first:g,last:f,views:d}}function L(e){e.preventDefault()}function k(e){let t=0;const r=e.length;while(t<r&&""===e[t].trim())t++;return"data:"===e.substring(t,t+5).toLowerCase()}function R(e,t="document.pdf"){if("string"!==typeof e)return t;if(k(e))return console.warn('getPDFFileNameFromURL: ignoring "data:" URL for performance reasons.'),t;const r=/^(?:(?:[^:]+:)?\/\/[^\/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,i=/[^\/?#=]+\.pdf\b(?!.*\.pdf\b)/i,n=r.exec(e);let s=i.exec(n[1])||i.exec(n[2])||i.exec(n[3]);if(s&&(s=s[0],s.includes("%")))try{s=i.exec(decodeURIComponent(s))[0]}catch(a){}return s||t}function I(e){let t=Math.sqrt(e.deltaX*e.deltaX+e.deltaY*e.deltaY);const r=Math.atan2(e.deltaY,e.deltaX);-.25*Math.PI<r&&r<.75*Math.PI&&(t=-t);const i=0,n=1,s=30,a=30;return e.deltaMode===i?t/=s*a:e.deltaMode===n&&(t/=a),t}function F(e){return Number.isInteger(e)&&e%90===0}function M(e){return Number.isInteger(e)&&Object.values(g).includes(e)&&e!==g.UNKNOWN}function N(e){return Number.isInteger(e)&&Object.values(f).includes(e)&&e!==f.UNKNOWN}function D(e){return e.width<=e.height}t.NullL10n=b;const O={EVENT:"event",TIMEOUT:"timeout"};function B({target:e,name:t,delay:r=0}){return new Promise((function(i,n){if("object"!==typeof e||!t||"string"!==typeof t||!(Number.isInteger(r)&&r>=0))throw new Error("waitOnEventOrTimeout - invalid parameters.");function s(r){e instanceof j?e._off(t,a):e.removeEventListener(t,a),l&&clearTimeout(l),i(r)}const a=s.bind(null,O.EVENT);e instanceof j?e._on(t,a):e.addEventListener(t,a);const o=s.bind(null,O.TIMEOUT),l=setTimeout(o,r)}))}t.WaitOnType=O;const U=new Promise((function(e){window.requestAnimationFrame(e)}));t.animationStarted=U;class j{constructor(e){this._listeners=Object.create(null)}on(e,t){this._on(e,t,{external:!0})}off(e,t){this._off(e,t,{external:!0})}dispatch(e){const t=this._listeners[e];if(!t||0===t.length)return;const r=Array.prototype.slice.call(arguments,1);let i;t.slice(0).forEach((function({listener:e,external:t}){if(t)return i||(i=[]),void i.push(e);e.apply(null,r)})),i&&(i.forEach((function(e){e.apply(null,r)})),i=null)}_on(e,t,r=null){let i=this._listeners[e];i||(this._listeners[e]=i=[]),i.push({listener:t,external:!0===(r&&r.external)})}_off(e,t,r=null){const i=this._listeners[e];if(i)for(let n=0,s=i.length;n<s;n++)if(i[n].listener===t)return void i.splice(n,1)}}function V(e,t,r){return Math.min(Math.max(e,t),r)}t.EventBus=j;class q{constructor(e,{height:t,width:r,units:i}={}){this.visible=!0,this.div=document.querySelector(e+" .progress"),this.bar=this.div.parentNode,this.height=t||100,this.width=r||100,this.units=i||"%",this.div.style.height=this.height+this.units,this.percent=0}_updateBar(){if(this._indeterminate)return this.div.classList.add("indeterminate"),void(this.div.style.width=this.width+this.units);this.div.classList.remove("indeterminate");const e=this.width*this._percent/100;this.div.style.width=e+this.units}get percent(){return this._percent}set percent(e){this._indeterminate=isNaN(e),this._percent=V(e,0,100),this._updateBar()}setWidth(e){if(!e)return;const t=e.parentNode,r=t.offsetWidth-e.offsetWidth;r>0&&(this.bar.style.width=`calc(100% - ${r}px)`)}hide(){this.visible&&(this.visible=!1,this.bar.classList.add("hidden"),document.body.classList.remove("loadingInProgress"))}show(){this.visible||(this.visible=!0,document.body.classList.add("loadingInProgress"),this.bar.classList.remove("hidden"))}}function W(e,t){const r=[],i=e.length;let n=0;for(let s=0;s<i;++s)t(e[s])?r.push(e[s]):(e[n]=e[s],++n);for(let s=0;n<i;++s,++n)e[n]=r[s]}t.ProgressBar=q},963:function(e,t,r){
|
45
|
+
/**
|
46
|
+
* @licstart The following is the entire license notice for the
|
47
|
+
* Javascript code in this page
|
48
|
+
*
|
49
|
+
* Copyright 2020 Mozilla Foundation
|
50
|
+
*
|
51
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
52
|
+
* you may not use this file except in compliance with the License.
|
53
|
+
* You may obtain a copy of the License at
|
54
|
+
*
|
55
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
56
|
+
*
|
57
|
+
* Unless required by applicable law or agreed to in writing, software
|
58
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
59
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
60
|
+
* See the License for the specific language governing permissions and
|
61
|
+
* limitations under the License.
|
62
|
+
*
|
63
|
+
* @licend The above is the entire license notice for the
|
64
|
+
* Javascript code in this page
|
65
|
+
*/
|
66
|
+
(function(t,r){e.exports=r()})(0,(function(){return function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AnnotationLayerBuilder",{enumerable:!0,get:function(){return i.AnnotationLayerBuilder}}),Object.defineProperty(t,"DefaultAnnotationLayerFactory",{enumerable:!0,get:function(){return i.DefaultAnnotationLayerFactory}}),Object.defineProperty(t,"DefaultTextLayerFactory",{enumerable:!0,get:function(){return n.DefaultTextLayerFactory}}),Object.defineProperty(t,"TextLayerBuilder",{enumerable:!0,get:function(){return n.TextLayerBuilder}}),Object.defineProperty(t,"EventBus",{enumerable:!0,get:function(){return s.EventBus}}),Object.defineProperty(t,"NullL10n",{enumerable:!0,get:function(){return s.NullL10n}}),Object.defineProperty(t,"ProgressBar",{enumerable:!0,get:function(){return s.ProgressBar}}),Object.defineProperty(t,"PDFLinkService",{enumerable:!0,get:function(){return a.PDFLinkService}}),Object.defineProperty(t,"SimpleLinkService",{enumerable:!0,get:function(){return a.SimpleLinkService}}),Object.defineProperty(t,"DownloadManager",{enumerable:!0,get:function(){return o.DownloadManager}}),Object.defineProperty(t,"GenericL10n",{enumerable:!0,get:function(){return l.GenericL10n}}),Object.defineProperty(t,"PDFFindController",{enumerable:!0,get:function(){return c.PDFFindController}}),Object.defineProperty(t,"PDFHistory",{enumerable:!0,get:function(){return d.PDFHistory}}),Object.defineProperty(t,"PDFPageView",{enumerable:!0,get:function(){return h.PDFPageView}}),Object.defineProperty(t,"PDFSinglePageViewer",{enumerable:!0,get:function(){return u.PDFSinglePageViewer}}),Object.defineProperty(t,"PDFViewer",{enumerable:!0,get:function(){return p.PDFViewer}});var i=r(1),n=r(5),s=r(3),a=r(4),o=r(6),l=r(8),c=r(10),d=r(12),h=r(13),u=r(15),p=r(17)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultAnnotationLayerFactory=t.AnnotationLayerBuilder=void 0;var i=r(2),n=r(3),s=r(4);class a{constructor({pageDiv:e,pdfPage:t,linkService:r,downloadManager:i,imageResourcesPath:s="",renderInteractiveForms:a=!1,l10n:o=n.NullL10n}){this.pageDiv=e,this.pdfPage=t,this.linkService=r,this.downloadManager=i,this.imageResourcesPath=s,this.renderInteractiveForms=a,this.l10n=o,this.div=null,this._cancelled=!1}render(e,t="display"){this.pdfPage.getAnnotations({intent:t}).then((t=>{if(this._cancelled)return;const r={viewport:e.clone({dontFlip:!0}),div:this.div,annotations:t,page:this.pdfPage,imageResourcesPath:this.imageResourcesPath,renderInteractiveForms:this.renderInteractiveForms,linkService:this.linkService,downloadManager:this.downloadManager};if(this.div)i.AnnotationLayer.update(r);else{if(0===t.length)return;this.div=document.createElement("div"),this.div.className="annotationLayer",this.pageDiv.appendChild(this.div),r.div=this.div,i.AnnotationLayer.render(r),this.l10n.translate(this.div)}}))}cancel(){this._cancelled=!0}hide(){this.div&&this.div.setAttribute("hidden","true")}}t.AnnotationLayerBuilder=a;class o{createAnnotationLayerBuilder(e,t,r="",i=!1,o=n.NullL10n){return new a({pageDiv:e,pdfPage:t,imageResourcesPath:r,renderInteractiveForms:i,linkService:new s.SimpleLinkService,l10n:o})}}t.DefaultAnnotationLayerFactory=o},function(e,t,i){"use strict";let n;n="undefined"!==typeof window&&window["pdfjs-dist/build/pdf"]?window["pdfjs-dist/build/pdf"]:r(299),e.exports=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidRotation=M,t.isValidScrollMode=N,t.isValidSpreadMode=D,t.isPortraitOrientation=O,t.clamp=q,t.getPDFFileNameFromURL=I,t.noContextMenuHandler=k,t.parseQueryString=S,t.backtrackBeforeAllVisibleElements=E,t.getVisibleElements=L,t.roundToDivide=P,t.getPageSizeInches=T,t.approximateFraction=x,t.getOutputScale=y,t.scrollIntoView=A,t.watchScroll=w,t.binarySearchFirstItem=C,t.normalizeWheelEventDelta=F,t.waitOnEventOrTimeout=U,t.moveToEndOfArray=z,t.WaitOnType=t.animationStarted=t.ProgressBar=t.EventBus=t.NullL10n=t.SpreadMode=t.ScrollMode=t.TextLayerMode=t.RendererType=t.PresentationModeState=t.VERTICAL_PADDING=t.SCROLLBAR_PADDING=t.MAX_AUTO_SCALE=t.UNKNOWN_SCALE=t.MAX_SCALE=t.MIN_SCALE=t.DEFAULT_SCALE=t.DEFAULT_SCALE_VALUE=t.CSS_UNITS=t.AutoPrintRegExp=void 0;const i=96/72;t.CSS_UNITS=i;const n="auto";t.DEFAULT_SCALE_VALUE=n;const s=1;t.DEFAULT_SCALE=s;const a=.1;t.MIN_SCALE=a;const o=10;t.MAX_SCALE=o;const l=0;t.UNKNOWN_SCALE=l;const c=1.25;t.MAX_AUTO_SCALE=c;const d=40;t.SCROLLBAR_PADDING=d;const h=5;t.VERTICAL_PADDING=h;const u={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3};t.PresentationModeState=u;const p={CANVAS:"canvas",SVG:"svg"};t.RendererType=p;const g={DISABLE:0,ENABLE:1,ENABLE_ENHANCE:2};t.TextLayerMode=g;const f={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2};t.ScrollMode=f;const m={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2};t.SpreadMode=m;const _=/\bprint\s*\(/;function b(e,t){return t?e.replace(/\{\{\s*(\w+)\s*\}\}/g,((e,r)=>r in t?t[r]:"{{"+r+"}}")):e}t.AutoPrintRegExp=_;const v={async getLanguage(){return"en-us"},async getDirection(){return"ltr"},async get(e,t,r){return b(r,t)},async translate(e){}};function y(e){const t=window.devicePixelRatio||1,r=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1,i=t/r;return{sx:i,sy:i,scaled:1!==i}}function A(e,t,r=!1){let i=e.offsetParent;if(!i)return void console.error("offsetParent is not set -- cannot scroll");let n=e.offsetTop+e.clientTop,s=e.offsetLeft+e.clientLeft;while(i.clientHeight===i.scrollHeight&&i.clientWidth===i.scrollWidth||r&&"hidden"===getComputedStyle(i).overflow)if(i.dataset._scaleY&&(n/=i.dataset._scaleY,s/=i.dataset._scaleX),n+=i.offsetTop,s+=i.offsetLeft,i=i.offsetParent,!i)return;t&&(void 0!==t.top&&(n+=t.top),void 0!==t.left&&(s+=t.left,i.scrollLeft=s)),i.scrollTop=n}function w(e,t){const r=function(r){n||(n=window.requestAnimationFrame((function(){n=null;const r=e.scrollLeft,s=i.lastX;r!==s&&(i.right=r>s),i.lastX=r;const a=e.scrollTop,o=i.lastY;a!==o&&(i.down=a>o),i.lastY=a,t(i)})))},i={right:!0,down:!0,lastX:e.scrollLeft,lastY:e.scrollTop,_eventHandler:r};let n=null;return e.addEventListener("scroll",r,!0),i}function S(e){const t=e.split("&"),r=Object.create(null);for(let i=0,n=t.length;i<n;++i){const e=t[i].split("="),n=e[0].toLowerCase(),s=e.length>1?e[1]:null;r[decodeURIComponent(n)]=decodeURIComponent(s)}return r}function C(e,t){let r=0,i=e.length-1;if(i<0||!t(e[i]))return e.length;if(t(e[r]))return r;while(r<i){const n=r+i>>1,s=e[n];t(s)?i=n:r=n+1}return r}function x(e){if(Math.floor(e)===e)return[e,1];const t=1/e,r=8;if(t>r)return[1,r];if(Math.floor(t)===t)return[1,t];const i=e>1?t:e;let n,s=0,a=1,o=1,l=1;while(1){const e=s+o,t=a+l;if(t>r)break;i<=e/t?(o=e,l=t):(s=e,a=t)}return n=i-s/a<o/l-i?i===e?[s,a]:[a,s]:i===e?[o,l]:[l,o],n}function P(e,t){const r=e%t;return 0===r?e:Math.round(e-r+t)}function T({view:e,userUnit:t,rotate:r}){const[i,n,s,a]=e,o=r%180!==0,l=(s-i)/72*t,c=(a-n)/72*t;return{width:o?c:l,height:o?l:c}}function E(e,t,r){if(e<2)return e;let i=t[e].div,n=i.offsetTop+i.clientTop;n>=r&&(i=t[e-1].div,n=i.offsetTop+i.clientTop);for(let s=e-2;s>=0;--s){if(i=t[s].div,i.offsetTop+i.clientTop+i.clientHeight<=n)break;e=s}return e}function L(e,t,r=!1,i=!1){const n=e.scrollTop,s=n+e.clientHeight,a=e.scrollLeft,o=a+e.clientWidth;function l(e){const t=e.div,r=t.offsetTop+t.clientTop+t.clientHeight;return r>n}function c(e){const t=e.div,r=t.offsetLeft+t.clientLeft+t.clientWidth;return r>a}const d=[],h=t.length;let u=0===h?0:C(t,i?c:l);u>0&&u<h&&!i&&(u=E(u,t,n));let p=i?o:-1;for(let m=u;m<h;m++){const e=t[m],r=e.div,l=r.offsetLeft+r.clientLeft,c=r.offsetTop+r.clientTop,h=r.clientWidth,u=r.clientHeight,g=l+h,f=c+u;if(-1===p)f>=s&&(p=f);else if((i?l:c)>p)break;if(f<=n||c>=s||g<=a||l>=o)continue;const _=Math.max(0,n-c)+Math.max(0,f-s),b=Math.max(0,a-l)+Math.max(0,g-o),v=(u-_)*(h-b)*100/u/h|0;d.push({id:e.id,x:l,y:c,view:e,percent:v})}const g=d[0],f=d[d.length-1];return r&&d.sort((function(e,t){const r=e.percent-t.percent;return Math.abs(r)>.001?-r:e.id-t.id})),{first:g,last:f,views:d}}function k(e){e.preventDefault()}function R(e){let t=0;const r=e.length;while(t<r&&""===e[t].trim())t++;return"data:"===e.substring(t,t+5).toLowerCase()}function I(e,t="document.pdf"){if("string"!==typeof e)return t;if(R(e))return console.warn('getPDFFileNameFromURL: ignoring "data:" URL for performance reasons.'),t;const r=/^(?:(?:[^:]+:)?\/\/[^\/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,i=/[^\/?#=]+\.pdf\b(?!.*\.pdf\b)/i,n=r.exec(e);let s=i.exec(n[1])||i.exec(n[2])||i.exec(n[3]);if(s&&(s=s[0],s.includes("%")))try{s=i.exec(decodeURIComponent(s))[0]}catch(a){}return s||t}function F(e){let t=Math.sqrt(e.deltaX*e.deltaX+e.deltaY*e.deltaY);const r=Math.atan2(e.deltaY,e.deltaX);-.25*Math.PI<r&&r<.75*Math.PI&&(t=-t);const i=0,n=1,s=30,a=30;return e.deltaMode===i?t/=s*a:e.deltaMode===n&&(t/=a),t}function M(e){return Number.isInteger(e)&&e%90===0}function N(e){return Number.isInteger(e)&&Object.values(f).includes(e)&&e!==f.UNKNOWN}function D(e){return Number.isInteger(e)&&Object.values(m).includes(e)&&e!==m.UNKNOWN}function O(e){return e.width<=e.height}t.NullL10n=v;const B={EVENT:"event",TIMEOUT:"timeout"};function U({target:e,name:t,delay:r=0}){return new Promise((function(i,n){if("object"!==typeof e||!t||"string"!==typeof t||!(Number.isInteger(r)&&r>=0))throw new Error("waitOnEventOrTimeout - invalid parameters.");function s(r){e instanceof V?e._off(t,a):e.removeEventListener(t,a),l&&clearTimeout(l),i(r)}const a=s.bind(null,B.EVENT);e instanceof V?e._on(t,a):e.addEventListener(t,a);const o=s.bind(null,B.TIMEOUT),l=setTimeout(o,r)}))}t.WaitOnType=B;const j=new Promise((function(e){window.requestAnimationFrame(e)}));t.animationStarted=j;class V{constructor(e){this._listeners=Object.create(null)}on(e,t){this._on(e,t,{external:!0})}off(e,t){this._off(e,t,{external:!0})}dispatch(e){const t=this._listeners[e];if(!t||0===t.length)return;const r=Array.prototype.slice.call(arguments,1);let i;t.slice(0).forEach((function({listener:e,external:t}){if(t)return i||(i=[]),void i.push(e);e.apply(null,r)})),i&&(i.forEach((function(e){e.apply(null,r)})),i=null)}_on(e,t,r=null){let i=this._listeners[e];i||(this._listeners[e]=i=[]),i.push({listener:t,external:!0===(r&&r.external)})}_off(e,t,r=null){const i=this._listeners[e];if(i)for(let n=0,s=i.length;n<s;n++)if(i[n].listener===t)return void i.splice(n,1)}}function q(e,t,r){return Math.min(Math.max(e,t),r)}t.EventBus=V;class W{constructor(e,{height:t,width:r,units:i}={}){this.visible=!0,this.div=document.querySelector(e+" .progress"),this.bar=this.div.parentNode,this.height=t||100,this.width=r||100,this.units=i||"%",this.div.style.height=this.height+this.units,this.percent=0}_updateBar(){if(this._indeterminate)return this.div.classList.add("indeterminate"),void(this.div.style.width=this.width+this.units);this.div.classList.remove("indeterminate");const e=this.width*this._percent/100;this.div.style.width=e+this.units}get percent(){return this._percent}set percent(e){this._indeterminate=isNaN(e),this._percent=q(e,0,100),this._updateBar()}setWidth(e){if(!e)return;const t=e.parentNode,r=t.offsetWidth-e.offsetWidth;r>0&&(this.bar.style.width=`calc(100% - ${r}px)`)}hide(){this.visible&&(this.visible=!1,this.bar.classList.add("hidden"),document.body.classList.remove("loadingInProgress"))}show(){this.visible||(this.visible=!0,document.body.classList.add("loadingInProgress"),this.bar.classList.remove("hidden"))}}function z(e,t){const r=[],i=e.length;let n=0;for(let s=0;s<i;++s)t(e[s])?r.push(e[s]):(e[n]=e[s],++n);for(let s=0;n<i;++s,++n)e[n]=r[s]}t.ProgressBar=W},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleLinkService=t.PDFLinkService=void 0;var i=r(3);class n{constructor({eventBus:e,externalLinkTarget:t=null,externalLinkRel:r=null,externalLinkEnabled:i=!0,ignoreDestinationZoom:n=!1}={}){this.eventBus=e,this.externalLinkTarget=t,this.externalLinkRel=r,this.externalLinkEnabled=i,this._ignoreDestinationZoom=n,this.baseUrl=null,this.pdfDocument=null,this.pdfViewer=null,this.pdfHistory=null,this._pagesRefCache=null}setDocument(e,t=null){this.baseUrl=t,this.pdfDocument=e,this._pagesRefCache=Object.create(null)}setViewer(e){this.pdfViewer=e}setHistory(e){this.pdfHistory=e}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return this.pdfViewer.currentPageNumber}set page(e){this.pdfViewer.currentPageNumber=e}get rotation(){return this.pdfViewer.pagesRotation}set rotation(e){this.pdfViewer.pagesRotation=e}navigateTo(e){const t=({namedDest:r,explicitDest:i})=>{const n=i[0];let s;if(n instanceof Object){if(s=this._cachedPageNumber(n),null===s)return void this.pdfDocument.getPageIndex(n).then((e=>{this.cachePageRef(e+1,n),t({namedDest:r,explicitDest:i})})).catch((()=>{console.error(`PDFLinkService.navigateTo: "${n}" is not a valid page reference, for dest="${e}".`)}))}else{if(!Number.isInteger(n))return void console.error(`PDFLinkService.navigateTo: "${n}" is not a valid destination reference, for dest="${e}".`);s=n+1}!s||s<1||s>this.pagesCount?console.error(`PDFLinkService.navigateTo: "${s}" is not a valid page number, for dest="${e}".`):(this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.push({namedDest:r,explicitDest:i,pageNumber:s})),this.pdfViewer.scrollPageIntoView({pageNumber:s,destArray:i,ignoreDestinationZoom:this._ignoreDestinationZoom}))};new Promise(((t,r)=>{"string"!==typeof e?t({namedDest:"",explicitDest:e}):this.pdfDocument.getDestination(e).then((r=>{t({namedDest:e,explicitDest:r})}))})).then((r=>{Array.isArray(r.explicitDest)?t(r):console.error(`PDFLinkService.navigateTo: "${r.explicitDest}" is not a valid destination array, for dest="${e}".`)}))}getDestinationHash(e){if("string"===typeof e)return this.getAnchorUrl("#"+escape(e));if(Array.isArray(e)){const t=JSON.stringify(e);return this.getAnchorUrl("#"+escape(t))}return this.getAnchorUrl("")}getAnchorUrl(e){return(this.baseUrl||"")+e}setHash(e){let t,r;if(e.includes("=")){const n=(0,i.parseQueryString)(e);if("search"in n&&this.eventBus.dispatch("findfromurlhash",{source:this,query:n.search.replace(/"/g,""),phraseSearch:"true"===n.phrase}),"page"in n&&(t=0|n.page||1),"zoom"in n){const e=n.zoom.split(","),t=e[0],i=parseFloat(t);t.includes("Fit")?"Fit"===t||"FitB"===t?r=[null,{name:t}]:"FitH"===t||"FitBH"===t||"FitV"===t||"FitBV"===t?r=[null,{name:t},e.length>1?0|e[1]:null]:"FitR"===t?5!==e.length?console.error('PDFLinkService.setHash: Not enough parameters for "FitR".'):r=[null,{name:t},0|e[1],0|e[2],0|e[3],0|e[4]]:console.error(`PDFLinkService.setHash: "${t}" is not a valid zoom value.`):r=[null,{name:"XYZ"},e.length>1?0|e[1]:null,e.length>2?0|e[2]:null,i?i/100:t]}r?this.pdfViewer.scrollPageIntoView({pageNumber:t||this.page,destArray:r,allowNegativeOffset:!0}):t&&(this.page=t),"pagemode"in n&&this.eventBus.dispatch("pagemode",{source:this,mode:n.pagemode}),"nameddest"in n&&this.navigateTo(n.nameddest)}else{r=unescape(e);try{r=JSON.parse(r),Array.isArray(r)||(r=r.toString())}catch(n){}if("string"===typeof r||s(r))return void this.navigateTo(r);console.error(`PDFLinkService.setHash: "${unescape(e)}" is not a valid destination.`)}}executeNamedAction(e){switch(e){case"GoBack":this.pdfHistory&&this.pdfHistory.back();break;case"GoForward":this.pdfHistory&&this.pdfHistory.forward();break;case"NextPage":this.page<this.pagesCount&&this.page++;break;case"PrevPage":this.page>1&&this.page--;break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1;break;default:break}this.eventBus.dispatch("namedaction",{source:this,action:e})}cachePageRef(e,t){if(!t)return;const r=0===t.gen?`${t.num}R`:`${t.num}R${t.gen}`;this._pagesRefCache[r]=e}_cachedPageNumber(e){const t=0===e.gen?`${e.num}R`:`${e.num}R${e.gen}`;return this._pagesRefCache&&this._pagesRefCache[t]||null}isPageVisible(e){return this.pdfViewer.isPageVisible(e)}}function s(e){if(!Array.isArray(e))return!1;const t=e.length;if(t<2)return!1;const r=e[0];if(("object"!==typeof r||!Number.isInteger(r.num)||!Number.isInteger(r.gen))&&!(Number.isInteger(r)&&r>=0))return!1;const i=e[1];if("object"!==typeof i||"string"!==typeof i.name)return!1;let n=!0;switch(i.name){case"XYZ":if(5!==t)return!1;break;case"Fit":case"FitB":return 2===t;case"FitH":case"FitBH":case"FitV":case"FitBV":if(3!==t)return!1;break;case"FitR":if(6!==t)return!1;n=!1;break;default:return!1}for(let s=2;s<t;s++){const t=e[s];if(!("number"===typeof t||n&&null===t))return!1}return!0}t.PDFLinkService=n;class a{constructor(){this.externalLinkTarget=null,this.externalLinkRel=null,this.externalLinkEnabled=!0,this._ignoreDestinationZoom=!1}get pagesCount(){return 0}get page(){return 0}set page(e){}get rotation(){return 0}set rotation(e){}navigateTo(e){}getDestinationHash(e){return"#"}getAnchorUrl(e){return"#"}setHash(e){}executeNamedAction(e){}cachePageRef(e,t){}isPageVisible(e){return!0}}t.SimpleLinkService=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultTextLayerFactory=t.TextLayerBuilder=void 0;var i=r(2);const n=300;class s{constructor({textLayerDiv:e,eventBus:t,pageIndex:r,viewport:i,findController:n=null,enhanceTextSelection:s=!1}){this.textLayerDiv=e,this.eventBus=t,this.textContent=null,this.textContentItemsStr=[],this.textContentStream=null,this.renderingDone=!1,this.pageIdx=r,this.pageNumber=this.pageIdx+1,this.matches=[],this.viewport=i,this.textDivs=[],this.findController=n,this.textLayerRenderTask=null,this.enhanceTextSelection=s,this._onUpdateTextLayerMatches=null,this._bindMouse()}_finishRendering(){if(this.renderingDone=!0,!this.enhanceTextSelection){const e=document.createElement("div");e.className="endOfContent",this.textLayerDiv.appendChild(e)}this.eventBus.dispatch("textlayerrendered",{source:this,pageNumber:this.pageNumber,numTextDivs:this.textDivs.length})}render(e=0){if(!this.textContent&&!this.textContentStream||this.renderingDone)return;this.cancel(),this.textDivs=[];const t=document.createDocumentFragment();this.textLayerRenderTask=(0,i.renderTextLayer)({textContent:this.textContent,textContentStream:this.textContentStream,container:t,viewport:this.viewport,textDivs:this.textDivs,textContentItemsStr:this.textContentItemsStr,timeout:e,enhanceTextSelection:this.enhanceTextSelection}),this.textLayerRenderTask.promise.then((()=>{this.textLayerDiv.appendChild(t),this._finishRendering(),this._updateMatches()}),(function(e){})),this._onUpdateTextLayerMatches||(this._onUpdateTextLayerMatches=e=>{e.pageIndex!==this.pageIdx&&-1!==e.pageIndex||this._updateMatches()},this.eventBus._on("updatetextlayermatches",this._onUpdateTextLayerMatches))}cancel(){this.textLayerRenderTask&&(this.textLayerRenderTask.cancel(),this.textLayerRenderTask=null),this._onUpdateTextLayerMatches&&(this.eventBus._off("updatetextlayermatches",this._onUpdateTextLayerMatches),this._onUpdateTextLayerMatches=null)}setTextContentStream(e){this.cancel(),this.textContentStream=e}setTextContent(e){this.cancel(),this.textContent=e}_convertMatches(e,t){if(!e)return[];const{findController:r,textContentItemsStr:i}=this;let n=0,s=0;const a=i.length-1,o=r.state.query.length,l=[];for(let c=0,d=e.length;c<d;c++){let r=e[c];while(n!==a&&r>=s+i[n].length)s+=i[n].length,n++;n===i.length&&console.error("Could not find a matching mapping");const d={begin:{divIdx:n,offset:r-s}};r+=t?t[c]:o;while(n!==a&&r>s+i[n].length)s+=i[n].length,n++;d.end={divIdx:n,offset:r-s},l.push(d)}return l}_renderMatches(e){if(0===e.length)return;const{findController:t,pageIdx:r,textContentItemsStr:i,textDivs:n}=this,s=r===t.selected.pageIdx,a=t.selected.matchIdx,o=t.state.highlightAll;let l=null;const c={divIdx:-1,offset:void 0};function d(e,t){const r=e.divIdx;n[r].textContent="",h(r,0,e.offset,t)}function h(e,t,r,s){const a=n[e],o=i[e].substring(t,r),l=document.createTextNode(o);if(s){const e=document.createElement("span");return e.className=s,e.appendChild(l),void a.appendChild(e)}a.appendChild(l)}let u=a,p=u+1;if(o)u=0,p=e.length;else if(!s)return;for(let g=u;g<p;g++){const i=e[g],o=i.begin,u=i.end,p=s&&g===a,f=p?" selected":"";if(p&&t.scrollMatchIntoView({element:n[o.divIdx],pageIndex:r,matchIndex:a}),l&&o.divIdx===l.divIdx?h(l.divIdx,l.offset,o.offset):(null!==l&&h(l.divIdx,l.offset,c.offset),d(o)),o.divIdx===u.divIdx)h(o.divIdx,o.offset,u.offset,"highlight"+f);else{h(o.divIdx,o.offset,c.offset,"highlight begin"+f);for(let e=o.divIdx+1,t=u.divIdx;e<t;e++)n[e].className="highlight middle"+f;d(u,"highlight end"+f)}l=u}l&&h(l.divIdx,l.offset,c.offset)}_updateMatches(){if(!this.renderingDone)return;const{findController:e,matches:t,pageIdx:r,textContentItemsStr:i,textDivs:n}=this;let s=-1;for(let l=0,c=t.length;l<c;l++){const e=t[l],r=Math.max(s,e.begin.divIdx);for(let t=r,s=e.end.divIdx;t<=s;t++){const e=n[t];e.textContent=i[t],e.className=""}s=e.end.divIdx+1}if(!e||!e.highlightMatches)return;const a=e.pageMatches[r]||null,o=e.pageMatchesLength[r]||null;this.matches=this._convertMatches(a,o),this._renderMatches(this.matches)}_bindMouse(){const e=this.textLayerDiv;let t=null;e.addEventListener("mousedown",(r=>{if(this.enhanceTextSelection&&this.textLayerRenderTask)return this.textLayerRenderTask.expandTextDivs(!0),void(t&&(clearTimeout(t),t=null));const i=e.querySelector(".endOfContent");if(!i)return;let n=r.target!==e;if(n=n&&"none"!==window.getComputedStyle(i).getPropertyValue("-moz-user-select"),n){const t=e.getBoundingClientRect(),n=Math.max(0,(r.pageY-t.top)/t.height);i.style.top=(100*n).toFixed(2)+"%"}i.classList.add("active")})),e.addEventListener("mouseup",(()=>{if(this.enhanceTextSelection&&this.textLayerRenderTask)return void(t=setTimeout((()=>{this.textLayerRenderTask&&this.textLayerRenderTask.expandTextDivs(!1),t=null}),n));const r=e.querySelector(".endOfContent");r&&(r.style.top="",r.classList.remove("active"))}))}}t.TextLayerBuilder=s;class a{createTextLayerBuilder(e,t,r,i=!1,n){return new s({textLayerDiv:e,pageIndex:t,viewport:r,enhanceTextSelection:i,eventBus:n})}}t.DefaultTextLayerFactory=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadManager=void 0;var i=r(2),n=r(7);const s=n.viewerCompatibilityParams.disableCreateObjectURL||!1;function a(e,t){const r=document.createElement("a");if(!r.click)throw new Error('DownloadManager: "a.click()" is not supported.');r.href=e,r.target="_parent","download"in r&&(r.download=t),(document.body||document.documentElement).appendChild(r),r.click(),r.remove()}class o{constructor({disableCreateObjectURL:e=s}){this.disableCreateObjectURL=e}downloadUrl(e,t){(0,i.createValidAbsoluteUrl)(e,"http://example.com")&&a(e+"#pdfjs.action=download",t)}downloadData(e,t,r){if(navigator.msSaveBlob)return void navigator.msSaveBlob(new Blob([e],{type:r}),t);const n=(0,i.createObjectURL)(e,r,this.disableCreateObjectURL);a(n,t)}download(e,t,r){if(navigator.msSaveBlob)return void(navigator.msSaveBlob(e,r)||this.downloadUrl(t,r));if(this.disableCreateObjectURL)return void this.downloadUrl(t,r);const i=URL.createObjectURL(e);a(i,r)}}t.DownloadManager=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.viewerCompatibilityParams=void 0;const i=Object.create(null);{const e="undefined"!==typeof navigator&&navigator.userAgent||"",t="undefined"!==typeof navigator&&navigator.platform||"",r="undefined"!==typeof navigator&&navigator.maxTouchPoints||1,n=/Android/.test(e),s=/Trident/.test(e),a=/\b(iPad|iPhone|iPod)(?=;)/.test(e)||"MacIntel"===t&&r>1,o=/CriOS/.test(e);(function(){(s||o)&&(i.disableCreateObjectURL=!0)})(),function(){(a||n)&&(i.maxCanvasPixels=5242880)}()}const n=Object.freeze(i);t.viewerCompatibilityParams=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenericL10n=void 0,r(9);const i=document.webL10n;class n{constructor(e){this._lang=e,this._ready=new Promise(((t,r)=>{i.setLanguage(e,(()=>{t(i)}))}))}async getLanguage(){const e=await this._ready;return e.getLanguage()}async getDirection(){const e=await this._ready;return e.getDirection()}async get(e,t,r){const i=await this._ready;return i.get(e,t,r)}async translate(e){const t=await this._ready;return t.translate(e)}}t.GenericL10n=n},function(e,t,r){"use strict";document.webL10n=function(e,t,r){var i={},n="",s="textContent",a="",o={},l="loading",c=!0;function d(){return t.querySelectorAll('link[type="application/l10n"]')}function h(){var e=t.querySelector('script[type="application/l10n"]');return e?JSON.parse(e.innerHTML):null}function u(e){return e?e.querySelectorAll("*[data-l10n-id]"):[]}function p(e){if(!e)return{};var t=e.getAttribute("data-l10n-id"),r=e.getAttribute("data-l10n-args"),i={};if(r)try{i=JSON.parse(r)}catch(n){console.warn("could not parse arguments for #"+t)}return{id:t,args:i}}function g(e,t,r){t=t||function(e){},r=r||function(){};var i=new XMLHttpRequest;i.open("GET",e,c),i.overrideMimeType&&i.overrideMimeType("text/plain; charset=utf-8"),i.onreadystatechange=function(){4==i.readyState&&(200==i.status||0===i.status?t(i.responseText):r())},i.onerror=r,i.ontimeout=r;try{i.send(null)}catch(n){r()}}function f(e,t,r,a){var o=e.replace(/[^\/]*$/,"")||"./";function l(e){return e.lastIndexOf("\\")<0?e:e.replace(/\\\\/g,"\\").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\{/g,"{").replace(/\\}/g,"}").replace(/\\"/g,'"').replace(/\\'/g,"'")}function c(e,r){var i={},n=/^\s*|\s*$/,s=/^\s*#|^\s*$/,a=/^\s*\[(.*)\]\s*$/,c=/^\s*@import\s+url\((.*)\)\s*$/i,d=/^([^=\s]*)\s*=\s*(.+)$/;function h(e,r,h){var p=e.replace(n,"").split(/[\r\n]+/),g="*",f=t.split("-",1)[0],m=!1,_="";function b(){while(1){if(!p.length)return void h();var e=p.shift();if(!s.test(e)){if(r){if(_=a.exec(e),_){g=_[1].toLowerCase(),m="*"!==g&&g!==t&&g!==f;continue}if(m)continue;if(_=c.exec(e),_)return void u(o+_[1],b)}var n=e.match(d);n&&3==n.length&&(i[n[1]]=l(n[2]))}}}b()}function u(e,t){g(e,(function(e){h(e,!1,t)}),(function(){console.warn(e+" not found."),t()}))}h(e,!0,(function(){r(i)}))}g(e,(function(e){n+=e,c(e,(function(e){for(var t in e){var n,a,o=t.lastIndexOf(".");o>0?(n=t.substring(0,o),a=t.substring(o+1)):(n=t,a=s),i[n]||(i[n]={}),i[n][a]=e[t]}r&&r()}))}),a)}function m(e,t){e&&(e=e.toLowerCase()),t=t||function(){},_(),a=e;var r=d(),n=r.length;if(0!==n){var s=null,o=0;s=function(){o++,o>=n&&(t(),l="complete")};for(var c=0;c<n;c++){var u=new b(r[c]);u.load(e,s)}}else{var p=h();if(p&&p.locales&&p.default_locale){if(console.log("using the embedded JSON directory, early way out"),i=p.locales[e],!i){var g=p.default_locale.toLowerCase();for(var m in p.locales){if(m=m.toLowerCase(),m===e){i=p.locales[e];break}m===g&&(i=p.locales[g])}}t()}else console.log("no resource to load, early way out");l="complete"}function b(e){var t=e.href;this.load=function(e,r){f(t,e,r,(function(){console.warn(t+" not found."),console.warn('"'+e+'" resource not found'),a="",r()}))}}}function _(){i={},n="",a=""}function b(e){var t={af:3,ak:4,am:4,ar:1,asa:3,az:0,be:11,bem:3,bez:3,bg:3,bh:4,bm:0,bn:3,bo:0,br:20,brx:3,bs:11,ca:3,cgg:3,chr:3,cs:12,cy:17,da:3,de:3,dv:3,dz:0,ee:3,el:3,en:3,eo:3,es:3,et:3,eu:3,fa:0,ff:5,fi:3,fil:4,fo:3,fr:5,fur:3,fy:3,ga:8,gd:24,gl:3,gsw:3,gu:3,guw:4,gv:23,ha:3,haw:3,he:2,hi:4,hr:11,hu:0,id:0,ig:0,ii:0,is:3,it:3,iu:7,ja:0,jmc:3,jv:0,ka:0,kab:5,kaj:3,kcg:3,kde:0,kea:0,kk:3,kl:3,km:0,kn:0,ko:0,ksb:3,ksh:21,ku:3,kw:7,lag:18,lb:3,lg:3,ln:4,lo:0,lt:10,lv:6,mas:3,mg:4,mk:16,ml:3,mn:3,mo:9,mr:3,ms:0,mt:15,my:0,nah:3,naq:7,nb:3,nd:3,ne:3,nl:3,nn:3,no:3,nr:3,nso:4,ny:3,nyn:3,om:3,or:3,pa:3,pap:3,pl:13,ps:3,pt:3,rm:3,ro:9,rof:3,ru:11,rwk:3,sah:0,saq:3,se:7,seh:3,ses:0,sg:0,sh:11,shi:19,sk:12,sl:14,sma:7,smi:7,smj:7,smn:7,sms:7,sn:3,so:3,sq:3,sr:11,ss:3,ssy:3,st:3,sv:3,sw:3,syr:3,ta:3,te:3,teo:3,th:0,ti:4,tig:3,tk:3,tl:4,tn:3,to:0,tr:0,ts:3,tzm:22,uk:11,ur:3,ve:3,vi:0,vun:3,wa:4,wae:3,wo:0,xh:3,xog:3,yo:0,zh:0,zu:3};function r(e,t){return-1!==t.indexOf(e)}function i(e,t,r){return t<=e&&e<=r}var n={0:function(e){return"other"},1:function(e){return i(e%100,3,10)?"few":0===e?"zero":i(e%100,11,99)?"many":2==e?"two":1==e?"one":"other"},2:function(e){return 0!==e&&e%10===0?"many":2==e?"two":1==e?"one":"other"},3:function(e){return 1==e?"one":"other"},4:function(e){return i(e,0,1)?"one":"other"},5:function(e){return i(e,0,2)&&2!=e?"one":"other"},6:function(e){return 0===e?"zero":e%10==1&&e%100!=11?"one":"other"},7:function(e){return 2==e?"two":1==e?"one":"other"},8:function(e){return i(e,3,6)?"few":i(e,7,10)?"many":2==e?"two":1==e?"one":"other"},9:function(e){return 0===e||1!=e&&i(e%100,1,19)?"few":1==e?"one":"other"},10:function(e){return i(e%10,2,9)&&!i(e%100,11,19)?"few":e%10!=1||i(e%100,11,19)?"other":"one"},11:function(e){return i(e%10,2,4)&&!i(e%100,12,14)?"few":e%10===0||i(e%10,5,9)||i(e%100,11,14)?"many":e%10==1&&e%100!=11?"one":"other"},12:function(e){return i(e,2,4)?"few":1==e?"one":"other"},13:function(e){return i(e%10,2,4)&&!i(e%100,12,14)?"few":1!=e&&i(e%10,0,1)||i(e%10,5,9)||i(e%100,12,14)?"many":1==e?"one":"other"},14:function(e){return i(e%100,3,4)?"few":e%100==2?"two":e%100==1?"one":"other"},15:function(e){return 0===e||i(e%100,2,10)?"few":i(e%100,11,19)?"many":1==e?"one":"other"},16:function(e){return e%10==1&&11!=e?"one":"other"},17:function(e){return 3==e?"few":0===e?"zero":6==e?"many":2==e?"two":1==e?"one":"other"},18:function(e){return 0===e?"zero":i(e,0,2)&&0!==e&&2!=e?"one":"other"},19:function(e){return i(e,2,10)?"few":i(e,0,1)?"one":"other"},20:function(e){return!i(e%10,3,4)&&e%10!=9||i(e%100,10,19)||i(e%100,70,79)||i(e%100,90,99)?e%1e6===0&&0!==e?"many":e%10!=2||r(e%100,[12,72,92])?e%10!=1||r(e%100,[11,71,91])?"other":"one":"two":"few"},21:function(e){return 0===e?"zero":1==e?"one":"other"},22:function(e){return i(e,0,1)||i(e,11,99)?"one":"other"},23:function(e){return i(e%10,1,2)||e%20===0?"one":"other"},24:function(e){return i(e,3,10)||i(e,13,19)?"few":r(e,[2,12])?"two":r(e,[1,11])?"one":"other"}},s=t[e.replace(/-.*$/,"")];return s in n?n[s]:(console.warn("plural form unknown for ["+e+"]"),function(){return"other"})}function v(e,t,r){var n=i[e];if(!n){if(console.warn("#"+e+" is undefined."),!r)return null;n=r}var s={};for(var a in n){var o=n[a];o=y(o,t,e,a),o=A(o,t,e),s[a]=o}return s}function y(e,t,r,n){var s=/\{\[\s*([a-zA-Z]+)\(([a-zA-Z]+)\)\s*\]\}/,a=s.exec(e);if(!a||!a.length)return e;var l,c=a[1],d=a[2];if(t&&d in t?l=t[d]:d in i&&(l=i[d]),c in o){var h=o[c];e=h(e,l,r,n)}return e}function A(e,t,r){var n=/\{\{\s*(.+?)\s*\}\}/g;return e.replace(n,(function(e,n){return t&&n in t?t[n]:n in i?i[n]:(console.log("argument {{"+n+"}} for #"+r+" is undefined."),e)}))}function w(e){var r=p(e);if(r.id){var i=v(r.id,r.args);if(i){if(i[s]){if(0===S(e))e[s]=i[s];else{for(var n=e.childNodes,a=!1,o=0,l=n.length;o<l;o++)3===n[o].nodeType&&/\S/.test(n[o].nodeValue)&&(a?n[o].nodeValue="":(n[o].nodeValue=i[s],a=!0));if(!a){var c=t.createTextNode(i[s]);e.insertBefore(c,e.firstChild)}}delete i[s]}for(var d in i)e[d]=i[d]}else console.warn("#"+r.id+" is undefined.")}}function S(e){if(e.children)return e.children.length;if("undefined"!==typeof e.childElementCount)return e.childElementCount;for(var t=0,r=0;r<e.childNodes.length;r++)t+=1===e.nodeType?1:0;return t}function C(e){e=e||t.documentElement;for(var r=u(e),i=r.length,n=0;n<i;n++)w(r[n]);w(e)}return o.plural=function(e,t,r,n){var l=parseFloat(t);if(isNaN(l))return e;if(n!=s)return e;o._pluralRules||(o._pluralRules=b(a));var c="["+o._pluralRules(l)+"]";return 0===l&&r+"[zero]"in i?e=i[r+"[zero]"][n]:1==l&&r+"[one]"in i?e=i[r+"[one]"][n]:2==l&&r+"[two]"in i?e=i[r+"[two]"][n]:r+c in i?e=i[r+c][n]:r+"[other]"in i&&(e=i[r+"[other]"][n]),e},{get:function(e,t,r){var i,n=e.lastIndexOf("."),a=s;n>0&&(a=e.substring(n+1),e=e.substring(0,n)),r&&(i={},i[a]=r);var o=v(e,t,i);return o&&a in o?o[a]:"{{"+e+"}}"},getData:function(){return i},getText:function(){return n},getLanguage:function(){return a},setLanguage:function(e,t){m(e,(function(){t&&t()}))},getDirection:function(){var e=["ar","he","fa","ps","ur"],t=a.split("-",1)[0];return e.indexOf(t)>=0?"rtl":"ltr"},translate:C,getReadyState:function(){return l},ready:function(r){r&&("complete"==l||"interactive"==l?e.setTimeout((function(){r()})):t.addEventListener&&t.addEventListener("localized",(function e(){t.removeEventListener("localized",e),r()})))}}}(window,document)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFindController=t.FindState=void 0;var i=r(2),n=r(11),s=r(3);const a={FOUND:0,NOT_FOUND:1,WRAPPED:2,PENDING:3};t.FindState=a;const o=250,l=-50,c=-400,d={"‘":"'","’":"'","‚":"'","‛":"'","“":'"',"”":'"',"„":'"',"‟":'"',"¼":"1/4","½":"1/2","¾":"3/4"};let h=null;function u(e){if(!h){const e=Object.keys(d).join("");h=new RegExp(`[${e}]`,"g")}return e.replace(h,(function(e){return d[e]}))}class p{constructor({linkService:e,eventBus:t}){this._linkService=e,this._eventBus=t,this._reset(),t._on("findbarclose",this._onFindBarClose.bind(this))}get highlightMatches(){return this._highlightMatches}get pageMatches(){return this._pageMatches}get pageMatchesLength(){return this._pageMatchesLength}get selected(){return this._selected}get state(){return this._state}setDocument(e){this._pdfDocument&&this._reset(),e&&(this._pdfDocument=e,this._firstPageCapability.resolve())}executeCommand(e,t){if(!t)return;const r=this._pdfDocument;(null===this._state||this._shouldDirtyMatch(e,t))&&(this._dirtyMatch=!0),this._state=t,"findhighlightallchange"!==e&&this._updateUIState(a.PENDING),this._firstPageCapability.promise.then((()=>{if(!this._pdfDocument||r&&this._pdfDocument!==r)return;this._extractText();const t=!this._highlightMatches,i=!!this._findTimeout;this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),"find"===e?this._findTimeout=setTimeout((()=>{this._nextMatch(),this._findTimeout=null}),o):this._dirtyMatch?this._nextMatch():"findagain"===e?(this._nextMatch(),t&&this._state.highlightAll&&this._updateAllPages()):"findhighlightallchange"===e?(i?this._nextMatch():this._highlightMatches=!0,this._updateAllPages()):this._nextMatch()}))}scrollMatchIntoView({element:e=null,pageIndex:t=-1,matchIndex:r=-1}){if(!this._scrollMatches||!e)return;if(-1===r||r!==this._selected.matchIdx)return;if(-1===t||t!==this._selected.pageIdx)return;this._scrollMatches=!1;const i={top:l,left:c};(0,s.scrollIntoView)(e,i,!0)}_reset(){this._highlightMatches=!1,this._scrollMatches=!1,this._pdfDocument=null,this._pageMatches=[],this._pageMatchesLength=[],this._state=null,this._selected={pageIdx:-1,matchIdx:-1},this._offset={pageIdx:null,matchIdx:null,wrapped:!1},this._extractTextPromises=[],this._pageContents=[],this._matchesCountTotal=0,this._pagesToSearch=null,this._pendingFindMatches=Object.create(null),this._resumePageIdx=null,this._dirtyMatch=!1,clearTimeout(this._findTimeout),this._findTimeout=null,this._firstPageCapability=(0,i.createPromiseCapability)()}get _query(){return this._state.query!==this._rawQuery&&(this._rawQuery=this._state.query,this._normalizedQuery=u(this._state.query)),this._normalizedQuery}_shouldDirtyMatch(e,t){if(t.query!==this._state.query)return!0;switch(e){case"findagain":const e=this._selected.pageIdx+1,t=this._linkService;return e>=1&&e<=t.pagesCount&&e!==t.page&&!t.isPageVisible(e);case"findhighlightallchange":return!1}return!0}_prepareMatches(e,t,r){function i(t){const r=e[t],i=e[t+1];if(t<e.length-1&&r.match===i.match)return r.skipped=!0,!0;for(let n=t-1;n>=0;n--){const t=e[n];if(!t.skipped){if(t.match+t.matchLength<r.match)break;if(t.match+t.matchLength>=r.match+r.matchLength)return r.skipped=!0,!0}}return!1}e.sort((function(e,t){return e.match===t.match?e.matchLength-t.matchLength:e.match-t.match}));for(let n=0,s=e.length;n<s;n++)i(n)||(t.push(e[n].match),r.push(e[n].matchLength))}_isEntireWord(e,t,r){if(t>0){const r=e.charCodeAt(t),i=e.charCodeAt(t-1);if((0,n.getCharacterType)(r)===(0,n.getCharacterType)(i))return!1}const i=t+r-1;if(i<e.length-1){const t=e.charCodeAt(i),r=e.charCodeAt(i+1);if((0,n.getCharacterType)(t)===(0,n.getCharacterType)(r))return!1}return!0}_calculatePhraseMatch(e,t,r,i){const n=[],s=e.length;let a=-s;while(1){if(a=r.indexOf(e,a+s),-1===a)break;i&&!this._isEntireWord(r,a,s)||n.push(a)}this._pageMatches[t]=n}_calculateWordMatch(e,t,r,i){const n=[],s=e.match(/\S+/g);for(let a=0,o=s.length;a<o;a++){const e=s[a],t=e.length;let o=-t;while(1){if(o=r.indexOf(e,o+t),-1===o)break;i&&!this._isEntireWord(r,o,t)||n.push({match:o,matchLength:t,skipped:!1})}}this._pageMatchesLength[t]=[],this._pageMatches[t]=[],this._prepareMatches(n,this._pageMatches[t],this._pageMatchesLength[t])}_calculateMatch(e){let t=this._pageContents[e],r=this._query;const{caseSensitive:i,entireWord:n,phraseSearch:s}=this._state;if(0===r.length)return;i||(t=t.toLowerCase(),r=r.toLowerCase()),s?this._calculatePhraseMatch(r,e,t,n):this._calculateWordMatch(r,e,t,n),this._state.highlightAll&&this._updatePage(e),this._resumePageIdx===e&&(this._resumePageIdx=null,this._nextPageMatch());const a=this._pageMatches[e].length;a>0&&(this._matchesCountTotal+=a,this._updateUIResultsCount())}_extractText(){if(this._extractTextPromises.length>0)return;let e=Promise.resolve();for(let t=0,r=this._linkService.pagesCount;t<r;t++){const r=(0,i.createPromiseCapability)();this._extractTextPromises[t]=r.promise,e=e.then((()=>this._pdfDocument.getPage(t+1).then((e=>e.getTextContent({normalizeWhitespace:!0}))).then((e=>{const i=e.items,n=[];for(let t=0,r=i.length;t<r;t++)n.push(i[t].str);this._pageContents[t]=u(n.join("")),r.resolve(t)}),(e=>{console.error(`Unable to get text content for page ${t+1}`,e),this._pageContents[t]="",r.resolve(t)}))))}}_updatePage(e){this._scrollMatches&&this._selected.pageIdx===e&&(this._linkService.page=e+1),this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:e})}_updateAllPages(){this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:-1})}_nextMatch(){const e=this._state.findPrevious,t=this._linkService.page-1,r=this._linkService.pagesCount;if(this._highlightMatches=!0,this._dirtyMatch){this._dirtyMatch=!1,this._selected.pageIdx=this._selected.matchIdx=-1,this._offset.pageIdx=t,this._offset.matchIdx=null,this._offset.wrapped=!1,this._resumePageIdx=null,this._pageMatches.length=0,this._pageMatchesLength.length=0,this._matchesCountTotal=0,this._updateAllPages();for(let e=0;e<r;e++)!0!==this._pendingFindMatches[e]&&(this._pendingFindMatches[e]=!0,this._extractTextPromises[e].then((e=>{delete this._pendingFindMatches[e],this._calculateMatch(e)})))}if(""===this._query)return void this._updateUIState(a.FOUND);if(this._resumePageIdx)return;const i=this._offset;if(this._pagesToSearch=r,null!==i.matchIdx){const t=this._pageMatches[i.pageIdx].length;if(!e&&i.matchIdx+1<t||e&&i.matchIdx>0)return i.matchIdx=e?i.matchIdx-1:i.matchIdx+1,void this._updateMatch(!0);this._advanceOffsetPage(e)}this._nextPageMatch()}_matchesReady(e){const t=this._offset,r=e.length,i=this._state.findPrevious;return r?(t.matchIdx=i?r-1:0,this._updateMatch(!0),!0):(this._advanceOffsetPage(i),!!(t.wrapped&&(t.matchIdx=null,this._pagesToSearch<0))&&(this._updateMatch(!1),!0))}_nextPageMatch(){null!==this._resumePageIdx&&console.error("There can only be one pending page.");let e=null;do{const t=this._offset.pageIdx;if(e=this._pageMatches[t],!e){this._resumePageIdx=t;break}}while(!this._matchesReady(e))}_advanceOffsetPage(e){const t=this._offset,r=this._linkService.pagesCount;t.pageIdx=e?t.pageIdx-1:t.pageIdx+1,t.matchIdx=null,this._pagesToSearch--,(t.pageIdx>=r||t.pageIdx<0)&&(t.pageIdx=e?r-1:0,t.wrapped=!0)}_updateMatch(e=!1){let t=a.NOT_FOUND;const r=this._offset.wrapped;if(this._offset.wrapped=!1,e){const e=this._selected.pageIdx;this._selected.pageIdx=this._offset.pageIdx,this._selected.matchIdx=this._offset.matchIdx,t=r?a.WRAPPED:a.FOUND,-1!==e&&e!==this._selected.pageIdx&&this._updatePage(e)}this._updateUIState(t,this._state.findPrevious),-1!==this._selected.pageIdx&&(this._scrollMatches=!0,this._updatePage(this._selected.pageIdx))}_onFindBarClose(e){const t=this._pdfDocument;this._firstPageCapability.promise.then((()=>{!this._pdfDocument||t&&this._pdfDocument!==t||(this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),this._resumePageIdx&&(this._resumePageIdx=null,this._dirtyMatch=!0),this._updateUIState(a.FOUND),this._highlightMatches=!1,this._updateAllPages())}))}_requestMatchesCount(){const{pageIdx:e,matchIdx:t}=this._selected;let r=0,i=this._matchesCountTotal;if(-1!==t){for(let t=0;t<e;t++)r+=this._pageMatches[t]&&this._pageMatches[t].length||0;r+=t+1}return(r<1||r>i)&&(r=i=0),{current:r,total:i}}_updateUIResultsCount(){this._eventBus.dispatch("updatefindmatchescount",{source:this,matchesCount:this._requestMatchesCount()})}_updateUIState(e,t){this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:e,previous:t,matchesCount:this._requestMatchesCount()})}}t.PDFFindController=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCharacterType=g,t.CharacterType=void 0;const i={SPACE:0,ALPHA_LETTER:1,PUNCT:2,HAN_LETTER:3,KATAKANA_LETTER:4,HIRAGANA_LETTER:5,HALFWIDTH_KATAKANA_LETTER:6,THAI_LETTER:7};function n(e){return e<11904}function s(e){return 0===(65408&e)}function a(e){return e>=97&&e<=122||e>=65&&e<=90}function o(e){return e>=48&&e<=57}function l(e){return 32===e||9===e||13===e||10===e}function c(e){return e>=13312&&e<=40959||e>=63744&&e<=64255}function d(e){return e>=12448&&e<=12543}function h(e){return e>=12352&&e<=12447}function u(e){return e>=65376&&e<=65439}function p(e){return 3584===(65408&e)}function g(e){return n(e)?s(e)?l(e)?i.SPACE:a(e)||o(e)||95===e?i.ALPHA_LETTER:i.PUNCT:p(e)?i.THAI_LETTER:160===e?i.SPACE:i.ALPHA_LETTER:c(e)?i.HAN_LETTER:d(e)?i.KATAKANA_LETTER:h(e)?i.HIRAGANA_LETTER:u(e)?i.HALFWIDTH_KATAKANA_LETTER:i.ALPHA_LETTER}t.CharacterType=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDestHashesEqual=c,t.isDestArraysEqual=d,t.PDFHistory=void 0;var i=r(3);const n=1e3,s=50,a=1e3;function o(){return document.location.hash}class l{constructor({linkService:e,eventBus:t}){this.linkService=e,this.eventBus=t,this._initialized=!1,this._fingerprint="",this.reset(),this._boundEvents=null,this._isViewerInPresentationMode=!1,this.eventBus._on("presentationmodechanged",(e=>{this._isViewerInPresentationMode=e.active||e.switchInProgress})),this.eventBus._on("pagesinit",(()=>{this._isPagesLoaded=!1;const e=t=>{this.eventBus._off("pagesloaded",e),this._isPagesLoaded=!!t.pagesCount};this.eventBus._on("pagesloaded",e)}))}initialize({fingerprint:e,resetHistory:t=!1,updateUrl:r=!1}){if(!e||"string"!==typeof e)return void console.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.');this._initialized&&this.reset();const i=""!==this._fingerprint&&this._fingerprint!==e;this._fingerprint=e,this._updateUrl=!0===r,this._initialized=!0,this._bindEvents();const n=window.history.state;if(this._popStateInProgress=!1,this._blockHashChange=0,this._currentHash=o(),this._numPositionUpdates=0,this._uid=this._maxUid=0,this._destination=null,this._position=null,!this._isValidState(n,!0)||t){const{hash:e,page:r,rotation:n}=this._parseCurrentHash(!0);return!e||i||t?void this._pushOrReplaceState(null,!0):void this._pushOrReplaceState({hash:e,page:r,rotation:n},!0)}const s=n.destination;this._updateInternalState(s,n.uid,!0),this._uid>this._maxUid&&(this._maxUid=this._uid),void 0!==s.rotation&&(this._initialRotation=s.rotation),s.dest?(this._initialBookmark=JSON.stringify(s.dest),this._destination.page=null):s.hash?this._initialBookmark=s.hash:s.page&&(this._initialBookmark=`page=${s.page}`)}reset(){this._initialized&&(this._pageHide(),this._initialized=!1,this._unbindEvents()),this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._initialBookmark=null,this._initialRotation=null}push({namedDest:e=null,explicitDest:t,pageNumber:r}){if(!this._initialized)return;if(e&&"string"!==typeof e)return void console.error(`PDFHistory.push: "${e}" is not a valid namedDest parameter.`);if(!Array.isArray(t))return void console.error(`PDFHistory.push: "${t}" is not a valid explicitDest parameter.`);if(!(Number.isInteger(r)&&r>0&&r<=this.linkService.pagesCount)&&(null!==r||this._destination))return void console.error(`PDFHistory.push: "${r}" is not a valid pageNumber parameter.`);const i=e||JSON.stringify(t);if(!i)return;let n=!1;if(this._destination&&(c(this._destination.hash,i)||d(this._destination.dest,t))){if(this._destination.page)return;n=!0}this._popStateInProgress&&!n||(this._pushOrReplaceState({dest:t,hash:i,page:r,rotation:this.linkService.rotation},n),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then((()=>{this._popStateInProgress=!1}))))}pushCurrentPosition(){this._initialized&&!this._popStateInProgress&&this._tryPushCurrentPosition()}back(){if(!this._initialized||this._popStateInProgress)return;const e=window.history.state;this._isValidState(e)&&e.uid>0&&window.history.back()}forward(){if(!this._initialized||this._popStateInProgress)return;const e=window.history.state;this._isValidState(e)&&e.uid<this._maxUid&&window.history.forward()}get popStateInProgress(){return this._initialized&&(this._popStateInProgress||this._blockHashChange>0)}get initialBookmark(){return this._initialized?this._initialBookmark:null}get initialRotation(){return this._initialized?this._initialRotation:null}_pushOrReplaceState(e,t=!1){const r=t||!this._destination,i={fingerprint:this._fingerprint,uid:r?this._uid:this._uid+1,destination:e};let n;if(this._updateInternalState(e,i.uid),this._updateUrl&&e&&e.hash){const t=document.location.href.split("#")[0];t.startsWith("file://")||(n=`${t}#${e.hash}`)}r?window.history.replaceState(i,"",n):(this._maxUid=this._uid,window.history.pushState(i,"",n))}_tryPushCurrentPosition(e=!1){if(!this._position)return;let t=this._position;if(e&&(t=Object.assign(Object.create(null),this._position),t.temporary=!0),!this._destination)return void this._pushOrReplaceState(t);if(this._destination.temporary)return void this._pushOrReplaceState(t,!0);if(this._destination.hash===t.hash)return;if(!this._destination.page&&(s<=0||this._numPositionUpdates<=s))return;let r=!1;if(this._destination.page>=t.first&&this._destination.page<=t.page){if(this._destination.dest||!this._destination.first)return;r=!0}this._pushOrReplaceState(t,r)}_isValidState(e,t=!1){if(!e)return!1;if(e.fingerprint!==this._fingerprint){if(!t)return!1;{if("string"!==typeof e.fingerprint||e.fingerprint.length!==this._fingerprint.length)return!1;const[t]=performance.getEntriesByType("navigation");if(!t||"reload"!==t.type)return!1}}return!(!Number.isInteger(e.uid)||e.uid<0)&&(null!==e.destination&&"object"===typeof e.destination)}_updateInternalState(e,t,r=!1){this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),r&&e&&e.temporary&&delete e.temporary,this._destination=e,this._uid=t,this._numPositionUpdates=0}_parseCurrentHash(e=!1){const t=unescape(o()).substring(1),r=(0,i.parseQueryString)(t),n=r.nameddest||"";let s=0|r.page;return Number.isInteger(s)&&s>0&&s<=this.linkService.pagesCount&&!(e&&n.length>0)||(s=null),{hash:t,page:s,rotation:this.linkService.rotation}}_updateViewarea({location:e}){this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._position={hash:this._isViewerInPresentationMode?`page=${e.pageNumber}`:e.pdfOpenParams.substring(1),page:this.linkService.page,first:e.pageNumber,rotation:e.rotation},this._popStateInProgress||(s>0&&this._isPagesLoaded&&this._destination&&!this._destination.page&&this._numPositionUpdates++,a>0&&(this._updateViewareaTimeout=setTimeout((()=>{this._popStateInProgress||this._tryPushCurrentPosition(!0),this._updateViewareaTimeout=null}),a)))}_popState({state:e}){const t=o(),r=this._currentHash!==t;if(this._currentHash=t,!e){this._uid++;const{hash:e,page:t,rotation:r}=this._parseCurrentHash();return void this._pushOrReplaceState({hash:e,page:t,rotation:r},!0)}if(!this._isValidState(e))return;this._popStateInProgress=!0,r&&(this._blockHashChange++,(0,i.waitOnEventOrTimeout)({target:window,name:"hashchange",delay:n}).then((()=>{this._blockHashChange--})));const s=e.destination;this._updateInternalState(s,e.uid,!0),this._uid>this._maxUid&&(this._maxUid=this._uid),(0,i.isValidRotation)(s.rotation)&&(this.linkService.rotation=s.rotation),s.dest?this.linkService.navigateTo(s.dest):s.hash?this.linkService.setHash(s.hash):s.page&&(this.linkService.page=s.page),Promise.resolve().then((()=>{this._popStateInProgress=!1}))}_pageHide(){this._destination&&!this._destination.temporary||this._tryPushCurrentPosition()}_bindEvents(){this._boundEvents||(this._boundEvents={updateViewarea:this._updateViewarea.bind(this),popState:this._popState.bind(this),pageHide:this._pageHide.bind(this)},this.eventBus._on("updateviewarea",this._boundEvents.updateViewarea),window.addEventListener("popstate",this._boundEvents.popState),window.addEventListener("pagehide",this._boundEvents.pageHide))}_unbindEvents(){this._boundEvents&&(this.eventBus._off("updateviewarea",this._boundEvents.updateViewarea),window.removeEventListener("popstate",this._boundEvents.popState),window.removeEventListener("pagehide",this._boundEvents.pageHide),this._boundEvents=null)}}function c(e,t){if("string"!==typeof e||"string"!==typeof t)return!1;if(e===t)return!0;const{nameddest:r}=(0,i.parseQueryString)(e);return r===t}function d(e,t){function r(e,t){if(typeof e!==typeof t)return!1;if(Array.isArray(e)||Array.isArray(t))return!1;if(null!==e&&"object"===typeof e&&null!==t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!r(e[i],t[i]))return!1;return!0}return e===t||Number.isNaN(e)&&Number.isNaN(t)}if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i<n;i++)if(!r(e[i],t[i]))return!1;return!0}t.PDFHistory=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFPageView=void 0;var i=r(3),n=r(2),s=r(14),a=r(7);const o=a.viewerCompatibilityParams.maxCanvasPixels||16777216;class l{constructor(e){const t=e.container,r=e.defaultViewport;this.id=e.id,this.renderingId="page"+this.id,this.pdfPage=null,this.pageLabel=null,this.rotation=0,this.scale=e.scale||i.DEFAULT_SCALE,this.viewport=r,this.pdfPageRotate=r.rotation,this.hasRestrictedScaling=!1,this.textLayerMode=Number.isInteger(e.textLayerMode)?e.textLayerMode:i.TextLayerMode.ENABLE,this.imageResourcesPath=e.imageResourcesPath||"",this.renderInteractiveForms=e.renderInteractiveForms||!1,this.useOnlyCssZoom=e.useOnlyCssZoom||!1,this.maxCanvasPixels=e.maxCanvasPixels||o,this.eventBus=e.eventBus,this.renderingQueue=e.renderingQueue,this.textLayerFactory=e.textLayerFactory,this.annotationLayerFactory=e.annotationLayerFactory,this.renderer=e.renderer||i.RendererType.CANVAS,this.enableWebGL=e.enableWebGL||!1,this.l10n=e.l10n||i.NullL10n,this.paintTask=null,this.paintedViewportMap=new WeakMap,this.renderingState=s.RenderingStates.INITIAL,this.resume=null,this.error=null,this.annotationLayer=null,this.textLayer=null,this.zoomLayer=null;const n=document.createElement("div");n.className="page",n.style.width=Math.floor(this.viewport.width)+"px",n.style.height=Math.floor(this.viewport.height)+"px",n.setAttribute("data-page-number",this.id),this.div=n,t.appendChild(n)}setPdfPage(e){this.pdfPage=e,this.pdfPageRotate=e.rotate;const t=(this.rotation+this.pdfPageRotate)%360;this.viewport=e.getViewport({scale:this.scale*i.CSS_UNITS,rotation:t}),this.stats=e.stats,this.reset()}destroy(){this.reset(),this.pdfPage&&this.pdfPage.cleanup()}_resetZoomLayer(e=!1){if(!this.zoomLayer)return;const t=this.zoomLayer.firstChild;this.paintedViewportMap.delete(t),t.width=0,t.height=0,e&&this.zoomLayer.remove(),this.zoomLayer=null}reset(e=!1,t=!1){this.cancelRendering(t),this.renderingState=s.RenderingStates.INITIAL;const r=this.div;r.style.width=Math.floor(this.viewport.width)+"px",r.style.height=Math.floor(this.viewport.height)+"px";const i=r.childNodes,n=e&&this.zoomLayer||null,a=t&&this.annotationLayer&&this.annotationLayer.div||null;for(let s=i.length-1;s>=0;s--){const e=i[s];n!==e&&a!==e&&r.removeChild(e)}r.removeAttribute("data-loaded"),a?this.annotationLayer.hide():this.annotationLayer&&(this.annotationLayer.cancel(),this.annotationLayer=null),n||(this.canvas&&(this.paintedViewportMap.delete(this.canvas),this.canvas.width=0,this.canvas.height=0,delete this.canvas),this._resetZoomLayer()),this.svg&&(this.paintedViewportMap.delete(this.svg),delete this.svg),this.loadingIconDiv=document.createElement("div"),this.loadingIconDiv.className="loadingIcon",r.appendChild(this.loadingIconDiv)}update(e,t){this.scale=e||this.scale,"undefined"!==typeof t&&(this.rotation=t);const r=(this.rotation+this.pdfPageRotate)%360;if(this.viewport=this.viewport.clone({scale:this.scale*i.CSS_UNITS,rotation:r}),this.svg)return this.cssTransform(this.svg,!0),void this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now()});let n=!1;if(this.canvas&&this.maxCanvasPixels>0){const e=this.outputScale;(Math.floor(this.viewport.width)*e.sx|0)*(Math.floor(this.viewport.height)*e.sy|0)>this.maxCanvasPixels&&(n=!0)}if(this.canvas){if(this.useOnlyCssZoom||this.hasRestrictedScaling&&n)return this.cssTransform(this.canvas,!0),void this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now()});this.zoomLayer||this.canvas.hasAttribute("hidden")||(this.zoomLayer=this.canvas.parentNode,this.zoomLayer.style.position="absolute")}this.zoomLayer&&this.cssTransform(this.zoomLayer.firstChild),this.reset(!0,!0)}cancelRendering(e=!1){this.paintTask&&(this.paintTask.cancel(),this.paintTask=null),this.resume=null,this.textLayer&&(this.textLayer.cancel(),this.textLayer=null),!e&&this.annotationLayer&&(this.annotationLayer.cancel(),this.annotationLayer=null)}cssTransform(e,t=!1){const r=this.viewport.width,i=this.viewport.height,n=this.div;e.style.width=e.parentNode.style.width=n.style.width=Math.floor(r)+"px",e.style.height=e.parentNode.style.height=n.style.height=Math.floor(i)+"px";const s=this.viewport.rotation-this.paintedViewportMap.get(e).rotation,a=Math.abs(s);let o=1,l=1;90!==a&&270!==a||(o=i/r,l=r/i);const c="rotate("+s+"deg) scale("+o+","+l+")";if(e.style.transform=c,this.textLayer){const e=this.textLayer.viewport,t=this.viewport.rotation-e.rotation,i=Math.abs(t);let n=r/e.width;90!==i&&270!==i||(n=r/e.height);const s=this.textLayer.textLayerDiv;let a,o;switch(i){case 0:a=o=0;break;case 90:a=0,o="-"+s.style.height;break;case 180:a="-"+s.style.width,o="-"+s.style.height;break;case 270:a="-"+s.style.width,o=0;break;default:console.error("Bad rotation value.");break}s.style.transform="rotate("+i+"deg) scale("+n+", "+n+") translate("+a+", "+o+")",s.style.transformOrigin="0% 0%"}t&&this.annotationLayer&&this.annotationLayer.render(this.viewport,"display")}get width(){return this.viewport.width}get height(){return this.viewport.height}getPagePoint(e,t){return this.viewport.convertToPdfPoint(e,t)}draw(){this.renderingState!==s.RenderingStates.INITIAL&&(console.error("Must be in new state before drawing"),this.reset());const{div:e,pdfPage:t}=this;if(!t)return this.renderingState=s.RenderingStates.FINISHED,this.loadingIconDiv&&(e.removeChild(this.loadingIconDiv),delete this.loadingIconDiv),Promise.reject(new Error("pdfPage is not loaded"));this.renderingState=s.RenderingStates.RUNNING;const r=document.createElement("div");r.style.width=e.style.width,r.style.height=e.style.height,r.classList.add("canvasWrapper"),this.annotationLayer&&this.annotationLayer.div?e.insertBefore(r,this.annotationLayer.div):e.appendChild(r);let a=null;if(this.textLayerMode!==i.TextLayerMode.DISABLE&&this.textLayerFactory){const t=document.createElement("div");t.className="textLayer",t.style.width=r.style.width,t.style.height=r.style.height,this.annotationLayer&&this.annotationLayer.div?e.insertBefore(t,this.annotationLayer.div):e.appendChild(t),a=this.textLayerFactory.createTextLayerBuilder(t,this.id-1,this.viewport,this.textLayerMode===i.TextLayerMode.ENABLE_ENHANCE,this.eventBus)}this.textLayer=a;let o=null;this.renderingQueue&&(o=e=>{if(!this.renderingQueue.isHighestPriority(this))return this.renderingState=s.RenderingStates.PAUSED,void(this.resume=()=>{this.renderingState=s.RenderingStates.RUNNING,e()});e()});const l=async r=>{if(c===this.paintTask&&(this.paintTask=null),r instanceof n.RenderingCancelledException)this.error=null;else if(this.renderingState=s.RenderingStates.FINISHED,this.loadingIconDiv&&(e.removeChild(this.loadingIconDiv),delete this.loadingIconDiv),this._resetZoomLayer(!0),this.error=r,this.stats=t.stats,this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!1,timestamp:performance.now()}),r)throw r},c=this.renderer===i.RendererType.SVG?this.paintOnSvg(r):this.paintOnCanvas(r);c.onRenderContinue=o,this.paintTask=c;const d=c.promise.then((function(){return l(null).then((function(){if(a){const e=t.streamTextContent({normalizeWhitespace:!0});a.setTextContentStream(e),a.render()}}))}),(function(e){return l(e)}));return this.annotationLayerFactory&&(this.annotationLayer||(this.annotationLayer=this.annotationLayerFactory.createAnnotationLayerBuilder(e,t,this.imageResourcesPath,this.renderInteractiveForms,this.l10n)),this.annotationLayer.render(this.viewport,"display")),e.setAttribute("data-loaded",!0),this.eventBus.dispatch("pagerender",{source:this,pageNumber:this.id}),d}paintOnCanvas(e){const t=(0,n.createPromiseCapability)(),r={promise:t.promise,onRenderContinue(e){e()},cancel(){f.cancel()}},s=this.viewport,a=document.createElement("canvas");this.l10n.get("page_canvas",{page:this.id},"Page {{page}}").then((e=>{a.setAttribute("aria-label",e)})),a.setAttribute("hidden","hidden");let o=!0;const l=function(){o&&(a.removeAttribute("hidden"),o=!1)};e.appendChild(a),this.canvas=a,a.mozOpaque=!0;const c=a.getContext("2d",{alpha:!1}),d=(0,i.getOutputScale)(c);if(this.outputScale=d,this.useOnlyCssZoom){const e=s.clone({scale:i.CSS_UNITS});d.sx*=e.width/s.width,d.sy*=e.height/s.height,d.scaled=!0}if(this.maxCanvasPixels>0){const e=s.width*s.height,t=Math.sqrt(this.maxCanvasPixels/e);d.sx>t||d.sy>t?(d.sx=t,d.sy=t,d.scaled=!0,this.hasRestrictedScaling=!0):this.hasRestrictedScaling=!1}const h=(0,i.approximateFraction)(d.sx),u=(0,i.approximateFraction)(d.sy);a.width=(0,i.roundToDivide)(s.width*d.sx,h[0]),a.height=(0,i.roundToDivide)(s.height*d.sy,u[0]),a.style.width=(0,i.roundToDivide)(s.width,h[1])+"px",a.style.height=(0,i.roundToDivide)(s.height,u[1])+"px",this.paintedViewportMap.set(a,s);const p=d.scaled?[d.sx,0,0,d.sy,0,0]:null,g={canvasContext:c,transform:p,viewport:this.viewport,enableWebGL:this.enableWebGL,renderInteractiveForms:this.renderInteractiveForms},f=this.pdfPage.render(g);return f.onContinue=function(e){l(),r.onRenderContinue?r.onRenderContinue(e):e()},f.promise.then((function(){l(),t.resolve(void 0)}),(function(e){l(),t.reject(e)})),r}paintOnSvg(e){let t=!1;const r=()=>{if(t)throw new n.RenderingCancelledException(`Rendering cancelled, page ${this.id}`,"svg")},a=this.pdfPage,o=this.viewport.clone({scale:i.CSS_UNITS}),l=a.getOperatorList().then((t=>{r();const i=new n.SVGGraphics(a.commonObjs,a.objs);return i.getSVG(t,o).then((t=>{r(),this.svg=t,this.paintedViewportMap.set(t,o),t.style.width=e.style.width,t.style.height=e.style.height,this.renderingState=s.RenderingStates.FINISHED,e.appendChild(t)}))}));return{promise:l,onRenderContinue(e){e()},cancel(){t=!0}}}setPageLabel(e){this.pageLabel="string"===typeof e?e:null,null!==this.pageLabel?this.div.setAttribute("data-page-label",this.pageLabel):this.div.removeAttribute("data-page-label")}}t.PDFPageView=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFRenderingQueue=t.RenderingStates=void 0;const i=3e4,n={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3};t.RenderingStates=n;class s{constructor(){this.pdfViewer=null,this.pdfThumbnailViewer=null,this.onIdle=null,this.highestPriorityPage=null,this.idleTimeout=null,this.printing=!1,this.isThumbnailViewEnabled=!1}setViewer(e){this.pdfViewer=e}setThumbnailViewer(e){this.pdfThumbnailViewer=e}isHighestPriority(e){return this.highestPriorityPage===e.renderingId}renderHighestPriority(e){this.idleTimeout&&(clearTimeout(this.idleTimeout),this.idleTimeout=null),this.pdfViewer.forceRendering(e)||this.pdfThumbnailViewer&&this.isThumbnailViewEnabled&&this.pdfThumbnailViewer.forceRendering()||this.printing||this.onIdle&&(this.idleTimeout=setTimeout(this.onIdle.bind(this),i))}getHighestPriority(e,t,r){const i=e.views,n=i.length;if(0===n)return null;for(let s=0;s<n;++s){const e=i[s].view;if(!this.isViewFinished(e))return e}if(r){const r=e.last.id;if(t[r]&&!this.isViewFinished(t[r]))return t[r]}else{const r=e.first.id-2;if(t[r]&&!this.isViewFinished(t[r]))return t[r]}return null}isViewFinished(e){return e.renderingState===n.FINISHED}renderView(e){switch(e.renderingState){case n.FINISHED:return!1;case n.PAUSED:this.highestPriorityPage=e.renderingId,e.resume();break;case n.RUNNING:this.highestPriorityPage=e.renderingId;break;case n.INITIAL:this.highestPriorityPage=e.renderingId,e.draw().finally((()=>{this.renderHighestPriority()})).catch((e=>{console.error(`renderView: "${e}"`)}));break}return!0}}t.PDFRenderingQueue=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFSinglePageViewer=void 0;var i=r(16),n=r(2);class s extends i.BaseViewer{constructor(e){super(e),this.eventBus._on("pagesinit",(e=>{this._ensurePageViewVisible()}))}get _viewerElement(){return(0,n.shadow)(this,"_viewerElement",this._shadowViewer)}_resetView(){super._resetView(),this._previousPageNumber=1,this._shadowViewer=document.createDocumentFragment(),this._updateScrollDown=null}_ensurePageViewVisible(){const e=this._pages[this._currentPageNumber-1],t=this._pages[this._previousPageNumber-1],r=this.viewer.childNodes;switch(r.length){case 0:this.viewer.appendChild(e.div);break;case 1:if(r[0]!==t.div)throw new Error("_ensurePageViewVisible: Unexpected previously visible page.");if(e===t)break;this._shadowViewer.appendChild(t.div),this.viewer.appendChild(e.div),this.container.scrollTop=0;break;default:throw new Error("_ensurePageViewVisible: Only one page should be visible at a time.")}this._previousPageNumber=this._currentPageNumber}_scrollUpdate(){this._updateScrollDown&&this._updateScrollDown(),super._scrollUpdate()}_scrollIntoView({pageDiv:e,pageSpot:t=null,pageNumber:r=null}){r&&this._setCurrentPageNumber(r);const i=this._currentPageNumber>=this._previousPageNumber;this._ensurePageViewVisible(),this.update(),super._scrollIntoView({pageDiv:e,pageSpot:t,pageNumber:r}),this._updateScrollDown=()=>{this.scroll.down=i,this._updateScrollDown=null}}_getVisiblePages(){return this._getCurrentVisiblePage()}_updateHelper(e){}get _isScrollModeHorizontal(){return(0,n.shadow)(this,"_isScrollModeHorizontal",!1)}_updateScrollMode(){}_updateSpreadMode(){}}t.PDFSinglePageViewer=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseViewer=void 0;var i=r(3),n=r(14),s=r(1),a=r(2),o=r(13),l=r(4),c=r(5);const d=10;function h(e){const t=[];this.push=function(r){const i=t.indexOf(r);i>=0&&t.splice(i,1),t.push(r),t.length>e&&t.shift().destroy()},this.resize=function(r,n){if(e=r,n){const e=new Set;for(let t=0,r=n.length;t<r;++t)e.add(n[t].id);(0,i.moveToEndOfArray)(t,(function(t){return e.has(t.id)}))}while(t.length>e)t.shift().destroy()}}function u(e,t){return t===e||Math.abs(t-e)<1e-15}class p{constructor(e){if(this.constructor===p)throw new Error("Cannot initialize BaseViewer.");this._name=this.constructor.name,this.container=e.container,this.viewer=e.viewer||e.container.firstElementChild,this.eventBus=e.eventBus,this.linkService=e.linkService||new l.SimpleLinkService,this.downloadManager=e.downloadManager||null,this.findController=e.findController||null,this.removePageBorders=e.removePageBorders||!1,this.textLayerMode=Number.isInteger(e.textLayerMode)?e.textLayerMode:i.TextLayerMode.ENABLE,this.imageResourcesPath=e.imageResourcesPath||"",this.renderInteractiveForms=e.renderInteractiveForms||!1,this.enablePrintAutoRotate=e.enablePrintAutoRotate||!1,this.renderer=e.renderer||i.RendererType.CANVAS,this.enableWebGL=e.enableWebGL||!1,this.useOnlyCssZoom=e.useOnlyCssZoom||!1,this.maxCanvasPixels=e.maxCanvasPixels,this.l10n=e.l10n||i.NullL10n,this.defaultRenderingQueue=!e.renderingQueue,this.defaultRenderingQueue?(this.renderingQueue=new n.PDFRenderingQueue,this.renderingQueue.setViewer(this)):this.renderingQueue=e.renderingQueue,this.scroll=(0,i.watchScroll)(this.container,this._scrollUpdate.bind(this)),this.presentationModeState=i.PresentationModeState.UNKNOWN,this._onBeforeDraw=this._onAfterDraw=null,this._resetView(),this.removePageBorders&&this.viewer.classList.add("removePageBorders"),Promise.resolve().then((()=>{this.eventBus.dispatch("baseviewerinit",{source:this})}))}get pagesCount(){return this._pages.length}getPageView(e){return this._pages[e]}get pageViewsReady(){return!!this._pagesCapability.settled&&this._pages.every((function(e){return e&&e.pdfPage}))}get currentPageNumber(){return this._currentPageNumber}set currentPageNumber(e){if(!Number.isInteger(e))throw new Error("Invalid page number.");this.pdfDocument&&(this._setCurrentPageNumber(e,!0)||console.error(`${this._name}.currentPageNumber: "${e}" is not a valid page.`))}_setCurrentPageNumber(e,t=!1){return this._currentPageNumber===e?(t&&this._resetCurrentPageView(),!0):0<e&&e<=this.pagesCount&&(this._currentPageNumber=e,this.eventBus.dispatch("pagechanging",{source:this,pageNumber:e,pageLabel:this._pageLabels&&this._pageLabels[e-1]}),t&&this._resetCurrentPageView(),!0)}get currentPageLabel(){return this._pageLabels&&this._pageLabels[this._currentPageNumber-1]}set currentPageLabel(e){if(!this.pdfDocument)return;let t=0|e;if(this._pageLabels){const r=this._pageLabels.indexOf(e);r>=0&&(t=r+1)}this._setCurrentPageNumber(t,!0)||console.error(`${this._name}.currentPageLabel: "${e}" is not a valid page.`)}get currentScale(){return this._currentScale!==i.UNKNOWN_SCALE?this._currentScale:i.DEFAULT_SCALE}set currentScale(e){if(isNaN(e))throw new Error("Invalid numeric scale.");this.pdfDocument&&this._setScale(e,!1)}get currentScaleValue(){return this._currentScaleValue}set currentScaleValue(e){this.pdfDocument&&this._setScale(e,!1)}get pagesRotation(){return this._pagesRotation}set pagesRotation(e){if(!(0,i.isValidRotation)(e))throw new Error("Invalid pages rotation angle.");if(!this.pdfDocument)return;if(this._pagesRotation===e)return;this._pagesRotation=e;const t=this._currentPageNumber;for(let r=0,i=this._pages.length;r<i;r++){const t=this._pages[r];t.update(t.scale,e)}this._currentScaleValue&&this._setScale(this._currentScaleValue,!0),this.eventBus.dispatch("rotationchanging",{source:this,pagesRotation:e,pageNumber:t}),this.defaultRenderingQueue&&this.update()}get firstPagePromise(){return this.pdfDocument?this._firstPageCapability.promise:null}get onePageRendered(){return this.pdfDocument?this._onePageRenderedCapability.promise:null}get pagesPromise(){return this.pdfDocument?this._pagesCapability.promise:null}get _viewerElement(){throw new Error("Not implemented: _viewerElement")}_onePageRenderedOrForceFetch(){return this.container.offsetParent&&0!==this._getVisiblePages().views.length?this._onePageRenderedCapability.promise:Promise.resolve()}setDocument(e){if(this.pdfDocument&&(this._cancelRendering(),this._resetView(),this.findController&&this.findController.setDocument(null)),this.pdfDocument=e,!e)return;const t=e.numPages,r=e.getPage(1);this._pagesCapability.promise.then((()=>{this.eventBus.dispatch("pagesloaded",{source:this,pagesCount:t})})),this._onBeforeDraw=e=>{const t=this._pages[e.pageNumber-1];t&&this._buffer.push(t)},this.eventBus._on("pagerender",this._onBeforeDraw),this._onAfterDraw=e=>{e.cssTransform||this._onePageRenderedCapability.settled||(this._onePageRenderedCapability.resolve(),this.eventBus._off("pagerendered",this._onAfterDraw),this._onAfterDraw=null)},this.eventBus._on("pagerendered",this._onAfterDraw),r.then((r=>{this._firstPageCapability.resolve(r);const n=this.currentScale,s=r.getViewport({scale:n*i.CSS_UNITS}),a=this.textLayerMode!==i.TextLayerMode.DISABLE?this:null;for(let e=1;e<=t;++e){const t=new o.PDFPageView({container:this._viewerElement,eventBus:this.eventBus,id:e,scale:n,defaultViewport:s.clone(),renderingQueue:this.renderingQueue,textLayerFactory:a,textLayerMode:this.textLayerMode,annotationLayerFactory:this,imageResourcesPath:this.imageResourcesPath,renderInteractiveForms:this.renderInteractiveForms,renderer:this.renderer,enableWebGL:this.enableWebGL,useOnlyCssZoom:this.useOnlyCssZoom,maxCanvasPixels:this.maxCanvasPixels,l10n:this.l10n});this._pages.push(t)}const l=this._pages[0];l&&(l.setPdfPage(r),this.linkService.cachePageRef(1,r.ref)),this._spreadMode!==i.SpreadMode.NONE&&this._updateSpreadMode(),this._onePageRenderedOrForceFetch().then((()=>{if(this.findController&&this.findController.setDocument(e),e.loadingParams.disableAutoFetch||t>7500)return void this._pagesCapability.resolve();let r=t-1;if(r<=0)this._pagesCapability.resolve();else for(let i=2;i<=t;++i)e.getPage(i).then((e=>{const t=this._pages[i-1];t.pdfPage||t.setPdfPage(e),this.linkService.cachePageRef(i,e.ref),0===--r&&this._pagesCapability.resolve()}),(e=>{console.error(`Unable to get page ${i} to initialize viewer`,e),0===--r&&this._pagesCapability.resolve()}))})),this.eventBus.dispatch("pagesinit",{source:this}),this.defaultRenderingQueue&&this.update()})).catch((e=>{console.error("Unable to initialize viewer",e)}))}setPageLabels(e){if(this.pdfDocument){e?Array.isArray(e)&&this.pdfDocument.numPages===e.length?this._pageLabels=e:(this._pageLabels=null,console.error(`${this._name}.setPageLabels: Invalid page labels.`)):this._pageLabels=null;for(let e=0,t=this._pages.length;e<t;e++){const t=this._pages[e],r=this._pageLabels&&this._pageLabels[e];t.setPageLabel(r)}}}_resetView(){this._pages=[],this._currentPageNumber=1,this._currentScale=i.UNKNOWN_SCALE,this._currentScaleValue=null,this._pageLabels=null,this._buffer=new h(d),this._location=null,this._pagesRotation=0,this._pagesRequests=new WeakMap,this._firstPageCapability=(0,a.createPromiseCapability)(),this._onePageRenderedCapability=(0,a.createPromiseCapability)(),this._pagesCapability=(0,a.createPromiseCapability)(),this._scrollMode=i.ScrollMode.VERTICAL,this._spreadMode=i.SpreadMode.NONE,this._onBeforeDraw&&(this.eventBus._off("pagerender",this._onBeforeDraw),this._onBeforeDraw=null),this._onAfterDraw&&(this.eventBus._off("pagerendered",this._onAfterDraw),this._onAfterDraw=null),this.viewer.textContent="",this._updateScrollMode()}_scrollUpdate(){0!==this.pagesCount&&this.update()}_scrollIntoView({pageDiv:e,pageSpot:t=null,pageNumber:r=null}){(0,i.scrollIntoView)(e,t)}_setScaleUpdatePages(e,t,r=!1,i=!1){if(this._currentScaleValue=t.toString(),u(this._currentScale,e))i&&this.eventBus.dispatch("scalechanging",{source:this,scale:e,presetValue:t});else{for(let t=0,r=this._pages.length;t<r;t++)this._pages[t].update(e);if(this._currentScale=e,!r){let e,t=this._currentPageNumber;!this._location||this.isInPresentationMode||this.isChangingPresentationMode||(t=this._location.pageNumber,e=[null,{name:"XYZ"},this._location.left,this._location.top,null]),this.scrollPageIntoView({pageNumber:t,destArray:e,allowNegativeOffset:!0})}this.eventBus.dispatch("scalechanging",{source:this,scale:e,presetValue:i?t:void 0}),this.defaultRenderingQueue&&this.update()}}_setScale(e,t=!1){let r=parseFloat(e);if(r>0)this._setScaleUpdatePages(r,e,t,!1);else{const n=this._pages[this._currentPageNumber-1];if(!n)return;const s=this.isInPresentationMode||this.removePageBorders;let a=s?0:i.SCROLLBAR_PADDING,o=s?0:i.VERTICAL_PADDING;!s&&this._isScrollModeHorizontal&&([a,o]=[o,a]);const l=(this.container.clientWidth-a)/n.width*n.scale,c=(this.container.clientHeight-o)/n.height*n.scale;switch(e){case"page-actual":r=1;break;case"page-width":r=l;break;case"page-height":r=c;break;case"page-fit":r=Math.min(l,c);break;case"auto":const t=(0,i.isPortraitOrientation)(n)?l:Math.min(c,l);r=Math.min(i.MAX_AUTO_SCALE,t);break;default:return void console.error(`${this._name}._setScale: "${e}" is an unknown zoom value.`)}this._setScaleUpdatePages(r,e,t,!0)}}_resetCurrentPageView(){this.isInPresentationMode&&this._setScale(this._currentScaleValue,!0);const e=this._pages[this._currentPageNumber-1];this._scrollIntoView({pageDiv:e.div})}scrollPageIntoView({pageNumber:e,destArray:t=null,allowNegativeOffset:r=!1,ignoreDestinationZoom:n=!1}){if(!this.pdfDocument)return;const s=Number.isInteger(e)&&this._pages[e-1];if(!s)return void console.error(`${this._name}.scrollPageIntoView: "${e}" is not a valid pageNumber parameter.`);if(this.isInPresentationMode||!t)return void this._setCurrentPageNumber(e,!0);let a,o,l=0,c=0,d=0,h=0;const u=s.rotation%180!==0,p=(u?s.height:s.width)/s.scale/i.CSS_UNITS,g=(u?s.width:s.height)/s.scale/i.CSS_UNITS;let f=0;switch(t[1].name){case"XYZ":l=t[2],c=t[3],f=t[4],l=null!==l?l:0,c=null!==c?c:g;break;case"Fit":case"FitB":f="page-fit";break;case"FitH":case"FitBH":c=t[2],f="page-width",null===c&&this._location&&(l=this._location.left,c=this._location.top);break;case"FitV":case"FitBV":l=t[2],d=p,h=g,f="page-height";break;case"FitR":l=t[2],c=t[3],d=t[4]-l,h=t[5]-c;const e=this.removePageBorders?0:i.SCROLLBAR_PADDING,r=this.removePageBorders?0:i.VERTICAL_PADDING;a=(this.container.clientWidth-e)/d/i.CSS_UNITS,o=(this.container.clientHeight-r)/h/i.CSS_UNITS,f=Math.min(Math.abs(a),Math.abs(o));break;default:return void console.error(`${this._name}.scrollPageIntoView: "${t[1].name}" is not a valid destination type.`)}if(n||(f&&f!==this._currentScale?this.currentScaleValue=f:this._currentScale===i.UNKNOWN_SCALE&&(this.currentScaleValue=i.DEFAULT_SCALE_VALUE)),"page-fit"===f&&!t[4])return void this._scrollIntoView({pageDiv:s.div,pageNumber:e});const m=[s.viewport.convertToViewportPoint(l,c),s.viewport.convertToViewportPoint(l+d,c+h)];let _=Math.min(m[0][0],m[1][0]),b=Math.min(m[0][1],m[1][1]);r||(_=Math.max(_,0),b=Math.max(b,0)),this._scrollIntoView({pageDiv:s.div,pageSpot:{left:_,top:b},pageNumber:e})}_updateLocation(e){const t=this._currentScale,r=this._currentScaleValue,i=parseFloat(r)===t?Math.round(1e4*t)/100:r,n=e.id;let s="#page="+n;s+="&zoom="+i;const a=this._pages[n-1],o=this.container,l=a.getPagePoint(o.scrollLeft-e.x,o.scrollTop-e.y),c=Math.round(l[0]),d=Math.round(l[1]);s+=","+c+","+d,this._location={pageNumber:n,scale:i,top:d,left:c,rotation:this._pagesRotation,pdfOpenParams:s}}_updateHelper(e){throw new Error("Not implemented: _updateHelper")}update(){const e=this._getVisiblePages(),t=e.views,r=t.length;if(0===r)return;const i=Math.max(d,2*r+1);this._buffer.resize(i,t),this.renderingQueue.renderHighestPriority(e),this._updateHelper(t),this._updateLocation(e.first),this.eventBus.dispatch("updateviewarea",{source:this,location:this._location})}containsElement(e){return this.container.contains(e)}focus(){this.container.focus()}get _isScrollModeHorizontal(){return!this.isInPresentationMode&&this._scrollMode===i.ScrollMode.HORIZONTAL}get isInPresentationMode(){return this.presentationModeState===i.PresentationModeState.FULLSCREEN}get isChangingPresentationMode(){return this.presentationModeState===i.PresentationModeState.CHANGING}get isHorizontalScrollbarEnabled(){return!this.isInPresentationMode&&this.container.scrollWidth>this.container.clientWidth}get isVerticalScrollbarEnabled(){return!this.isInPresentationMode&&this.container.scrollHeight>this.container.clientHeight}_getCurrentVisiblePage(){if(!this.pagesCount)return{views:[]};const e=this._pages[this._currentPageNumber-1],t=e.div,r={id:e.id,x:t.offsetLeft+t.clientLeft,y:t.offsetTop+t.clientTop,view:e};return{first:r,last:r,views:[r]}}_getVisiblePages(){return(0,i.getVisibleElements)(this.container,this._pages,!0,this._isScrollModeHorizontal)}isPageVisible(e){return!!this.pdfDocument&&(e<1||e>this.pagesCount?(console.error(`${this._name}.isPageVisible: "${e}" is out of bounds.`),!1):this._getVisiblePages().views.some((function(t){return t.id===e})))}cleanup(){for(let e=0,t=this._pages.length;e<t;e++)this._pages[e]&&this._pages[e].renderingState!==n.RenderingStates.FINISHED&&this._pages[e].reset()}_cancelRendering(){for(let e=0,t=this._pages.length;e<t;e++)this._pages[e]&&this._pages[e].cancelRendering()}_ensurePdfPageLoaded(e){if(e.pdfPage)return Promise.resolve(e.pdfPage);if(this._pagesRequests.has(e))return this._pagesRequests.get(e);const t=this.pdfDocument.getPage(e.id).then((t=>(e.pdfPage||e.setPdfPage(t),this._pagesRequests.delete(e),t))).catch((t=>{console.error("Unable to get page for page view",t),this._pagesRequests.delete(e)}));return this._pagesRequests.set(e,t),t}forceRendering(e){const t=e||this._getVisiblePages(),r=this._isScrollModeHorizontal?this.scroll.right:this.scroll.down,i=this.renderingQueue.getHighestPriority(t,this._pages,r);return!!i&&(this._ensurePdfPageLoaded(i).then((()=>{this.renderingQueue.renderView(i)})),!0)}createTextLayerBuilder(e,t,r,i=!1,n){return new c.TextLayerBuilder({textLayerDiv:e,eventBus:n,pageIndex:t,viewport:r,findController:this.isInPresentationMode?null:this.findController,enhanceTextSelection:!this.isInPresentationMode&&i})}createAnnotationLayerBuilder(e,t,r="",n=!1,a=i.NullL10n){return new s.AnnotationLayerBuilder({pageDiv:e,pdfPage:t,imageResourcesPath:r,renderInteractiveForms:n,linkService:this.linkService,downloadManager:this.downloadManager,l10n:a})}get hasEqualPageSizes(){const e=this._pages[0];for(let t=1,r=this._pages.length;t<r;++t){const r=this._pages[t];if(r.width!==e.width||r.height!==e.height)return!1}return!0}getPagesOverview(){const e=this._pages.map((function(e){const t=e.pdfPage.getViewport({scale:1});return{width:t.width,height:t.height,rotation:t.rotation}}));if(!this.enablePrintAutoRotate)return e;const t=(0,i.isPortraitOrientation)(e[0]);return e.map((function(e){return t===(0,i.isPortraitOrientation)(e)?e:{width:e.height,height:e.width,rotation:(e.rotation+90)%360}}))}get scrollMode(){return this._scrollMode}set scrollMode(e){if(this._scrollMode!==e){if(!(0,i.isValidScrollMode)(e))throw new Error(`Invalid scroll mode: ${e}`);this._scrollMode=e,this.eventBus.dispatch("scrollmodechanged",{source:this,mode:e}),this._updateScrollMode(this._currentPageNumber)}}_updateScrollMode(e=null){const t=this._scrollMode,r=this.viewer;r.classList.toggle("scrollHorizontal",t===i.ScrollMode.HORIZONTAL),r.classList.toggle("scrollWrapped",t===i.ScrollMode.WRAPPED),this.pdfDocument&&e&&(this._currentScaleValue&&isNaN(this._currentScaleValue)&&this._setScale(this._currentScaleValue,!0),this._setCurrentPageNumber(e,!0),this.update())}get spreadMode(){return this._spreadMode}set spreadMode(e){if(this._spreadMode!==e){if(!(0,i.isValidSpreadMode)(e))throw new Error(`Invalid spread mode: ${e}`);this._spreadMode=e,this.eventBus.dispatch("spreadmodechanged",{source:this,mode:e}),this._updateSpreadMode(this._currentPageNumber)}}_updateSpreadMode(e=null){if(!this.pdfDocument)return;const t=this.viewer,r=this._pages;if(t.textContent="",this._spreadMode===i.SpreadMode.NONE)for(let i=0,n=r.length;i<n;++i)t.appendChild(r[i].div);else{const e=this._spreadMode-1;let i=null;for(let n=0,s=r.length;n<s;++n)null===i?(i=document.createElement("div"),i.className="spread",t.appendChild(i)):n%2===e&&(i=i.cloneNode(!1),t.appendChild(i)),i.appendChild(r[n].div)}e&&(this._setCurrentPageNumber(e,!0),this.update())}}t.BaseViewer=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFViewer=void 0;var i=r(16),n=r(2);class s extends i.BaseViewer{get _viewerElement(){return(0,n.shadow)(this,"_viewerElement",this.viewer)}_scrollIntoView({pageDiv:e,pageSpot:t=null,pageNumber:r=null}){if(!t&&!this.isInPresentationMode){const r=e.offsetLeft+e.clientLeft,i=r+e.clientWidth,{scrollLeft:n,clientWidth:s}=this.container;(this._isScrollModeHorizontal||r<n||i>n+s)&&(t={left:0,top:0})}super._scrollIntoView({pageDiv:e,pageSpot:t,pageNumber:r})}_getVisiblePages(){return this.isInPresentationMode?this._getCurrentVisiblePage():super._getVisiblePages()}_updateHelper(e){if(this.isInPresentationMode)return;let t=this._currentPageNumber,r=!1;for(const i of e){if(i.percent<100)break;if(i.id===t){r=!0;break}}r||(t=e[0].id),this._setCurrentPageNumber(t)}}t.PDFViewer=s}])}))},316:function(e,t,r){var i=r(934);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.id,i,""]]),i.locals&&(e.exports=i.locals);var n=r(402).Z;n("7f4a3e57",i,!0,{sourceMap:!1,shadowMode:!1})},402:function(e,t,r){"use strict";function i(e,t){for(var r=[],i={},n=0;n<t.length;n++){var s=t[n],a=s[0],o=s[1],l=s[2],c=s[3],d={id:e+":"+n,css:o,media:l,sourceMap:c};i[a]?i[a].parts.push(d):r.push(i[a]={id:a,parts:[d]})}return r}r.d(t,{Z:function(){return g}});var n="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!n)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var s={},a=n&&(document.head||document.getElementsByTagName("head")[0]),o=null,l=0,c=!1,d=function(){},h=null,u="data-vue-ssr-id",p="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function g(e,t,r,n){c=r,h=n||{};var a=i(e,t);return f(a),function(t){for(var r=[],n=0;n<a.length;n++){var o=a[n],l=s[o.id];l.refs--,r.push(l)}t?(a=i(e,t),f(a)):a=[];for(n=0;n<r.length;n++){l=r[n];if(0===l.refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete s[l.id]}}}}function f(e){for(var t=0;t<e.length;t++){var r=e[t],i=s[r.id];if(i){i.refs++;for(var n=0;n<i.parts.length;n++)i.parts[n](r.parts[n]);for(;n<r.parts.length;n++)i.parts.push(_(r.parts[n]));i.parts.length>r.parts.length&&(i.parts.length=r.parts.length)}else{var a=[];for(n=0;n<r.parts.length;n++)a.push(_(r.parts[n]));s[r.id]={id:r.id,refs:1,parts:a}}}}function m(){var e=document.createElement("style");return e.type="text/css",a.appendChild(e),e}function _(e){var t,r,i=document.querySelector("style["+u+'~="'+e.id+'"]');if(i){if(c)return d;i.parentNode.removeChild(i)}if(p){var n=l++;i=o||(o=m()),t=v.bind(null,i,n,!1),r=v.bind(null,i,n,!0)}else i=m(),t=y.bind(null,i),r=function(){i.parentNode.removeChild(i)};return t(e),function(i){if(i){if(i.css===e.css&&i.media===e.media&&i.sourceMap===e.sourceMap)return;t(e=i)}else r()}}var b=function(){var e=[];return function(t,r){return e[t]=r,e.filter(Boolean).join("\n")}}();function v(e,t,r,i){var n=r?"":i.css;if(e.styleSheet)e.styleSheet.cssText=b(t,n);else{var s=document.createTextNode(n),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(s,a[t]):e.appendChild(s)}}function y(e,t){var r=t.css,i=t.media,n=t.sourceMap;if(i&&e.setAttribute("media",i),h.ssrId&&e.setAttribute(u,t.id),n&&(r+="\n/*# sourceURL="+n.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),e.styleSheet)e.styleSheet.cssText=r;else{while(e.firstChild)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}},172:function(){},1:function(){},779:function(){},558:function(){},258:function(){}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}!function(){__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return __webpack_require__.d(t,{a:t}),t}}(),function(){__webpack_require__.d=function(e,t){for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}}(),function(){__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){__webpack_require__.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){__webpack_require__.p=""}();var __webpack_exports__={};return function(){"use strict";if(__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:function(){return P}}),"undefined"!==typeof window){var e=window.document.currentScript,t=e&&e.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);t&&(__webpack_require__.p=t[1])}var r=function(){var e=this;e._self._c;return e._m(0)},i=[function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"outerContainer"}},[t("div",{attrs:{id:"mainContainer"}},[t("div",{staticClass:"secondaryToolbar hidden doorHangerRight",attrs:{id:"secondaryToolbar"}},[t("div",{attrs:{id:"secondaryToolbarButtonContainer"}},[t("button",{staticClass:"secondaryToolbarButton openFile visibleLargeView",attrs:{id:"secondaryOpenFile",title:"打开文件",tabindex:"52","data-l10n-id":"open_file"}},[t("span",{attrs:{"data-l10n-id":"open_file_label"}},[e._v("打开")])]),t("button",{staticClass:"secondaryToolbarButton print visibleMediumView",attrs:{id:"secondaryPrint",title:"打印",tabindex:"53","data-l10n-id":"print"}},[t("span",{attrs:{"data-l10n-id":"print_label"}},[e._v("打印")])]),t("button",{staticClass:"secondaryToolbarButton documentProperties",attrs:{id:"documentProperties",title:"文档属性…",tabindex:"69","data-l10n-id":"document_properties","aria-controls":"documentPropertiesDialog"}},[t("span",{attrs:{"data-l10n-id":"document_properties_label"}},[e._v("文档属性…")])])])]),e._v(" "),t("div",{staticClass:"toolbar"},[t("div",{attrs:{id:"toolbarContainer"}},[t("div",{attrs:{id:"toolbarViewer"}},[t("div",{attrs:{id:"toolbarViewerLeft"}},[t("div",{staticClass:"splitToolbarButton hiddenSmallView"},[t("button",{staticClass:"toolbarButton pageUp",attrs:{title:"上一页",id:"previous",tabindex:"13","data-l10n-id":"previous"}},[t("span",{attrs:{"data-l10n-id":"previous_label"}},[e._v("上一页")])]),t("div",{staticClass:"splitToolbarButtonSeparator"}),t("button",{staticClass:"toolbarButton pageDown",attrs:{title:"下一页",id:"next",tabindex:"14","data-l10n-id":"next"}},[t("span",{attrs:{"data-l10n-id":"next_label"}},[e._v("下一页")])])]),t("input",{staticClass:"toolbarField pageNumber",attrs:{type:"number",id:"pageNumber",title:"页面",value:"1",size:"4",min:"1",tabindex:"15","data-l10n-id":"page",autocomplete:"off"}}),t("span",{staticClass:"toolbarLabel",attrs:{id:"numPages"}})]),t("div",{attrs:{id:"toolbarViewerRight"}},[t("button",{staticClass:"toolbarButton openFile hiddenLargeView",attrs:{id:"openFile",title:"打开文件",tabindex:"32","data-l10n-id":"open_file"}},[t("span",{attrs:{"data-l10n-id":"open_file_label"}},[e._v("打开")])]),t("button",{staticClass:"toolbarButton print hiddenMediumView",attrs:{id:"print",title:"打印",tabindex:"33","data-l10n-id":"print"}},[t("span",{attrs:{"data-l10n-id":"print_label"}},[e._v("打印")])]),t("div",{staticClass:"verticalToolbarSeparator hiddenSmallView"}),t("button",{staticClass:"toolbarButton",attrs:{id:"secondaryToolbarToggle",title:"工具",tabindex:"36","data-l10n-id":"tools","aria-expanded":"false","aria-controls":"secondaryToolbar"}},[t("span",{attrs:{"data-l10n-id":"tools_label"}},[e._v("工具")])])]),t("div",{attrs:{id:"toolbarViewerMiddle"}},[t("div",{staticClass:"splitToolbarButton"},[t("button",{staticClass:"toolbarButton zoomOut",attrs:{id:"zoomOut",title:"缩小",tabindex:"21","data-l10n-id":"zoom_out"}},[t("span",{attrs:{"data-l10n-id":"zoom_out_label"}},[e._v("缩小")])]),t("div",{staticClass:"splitToolbarButtonSeparator"}),t("button",{staticClass:"toolbarButton zoomIn",attrs:{id:"zoomIn",title:"放大",tabindex:"22","data-l10n-id":"zoom_in"}},[t("span",{attrs:{"data-l10n-id":"zoom_in_label"}},[e._v("放大")])])]),t("span",{staticClass:"dropdownToolbarButton",attrs:{id:"scaleSelectContainer"}},[t("select",{attrs:{id:"scaleSelect",title:"缩放",tabindex:"23","data-l10n-id":"zoom"}},[t("option",{attrs:{id:"pageAutoOption",title:"",value:"auto",selected:"selected","data-l10n-id":"page_scale_auto"}},[e._v("自动缩放")]),t("option",{attrs:{id:"pageActualOption",title:"",value:"page-actual","data-l10n-id":"page_scale_actual"}},[e._v("实际大小")]),t("option",{attrs:{id:"pageFitOption",title:"",value:"page-fit","data-l10n-id":"page_scale_fit"}},[e._v("适合页面")]),t("option",{attrs:{id:"pageWidthOption",title:"",value:"page-width","data-l10n-id":"page_scale_width"}},[e._v("适合页宽")]),t("option",{attrs:{id:"customScaleOption",title:"",value:"custom",disabled:"disabled",hidden:"true"}}),t("option",{attrs:{title:"",value:"0.5","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 50 }'}},[e._v("50%")]),t("option",{attrs:{title:"",value:"0.75","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 75 }'}},[e._v("75%")]),t("option",{attrs:{title:"",value:"1","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 100 }'}},[e._v("100%")]),t("option",{attrs:{title:"",value:"1.25","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 125 }'}},[e._v("125%")]),t("option",{attrs:{title:"",value:"1.5","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 150 }'}},[e._v("150%")]),t("option",{attrs:{title:"",value:"2","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 200 }'}},[e._v("200%")]),t("option",{attrs:{title:"",value:"3","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 300 }'}},[e._v("300%")]),t("option",{attrs:{title:"",value:"4","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 400 }'}},[e._v("400%")])])])])])])]),t("div",{attrs:{id:"viewerContainer",tabindex:"0"}},[t("div",{staticClass:"pdfViewer",attrs:{id:"viewer"}})]),t("div",{attrs:{id:"errorWrapper",hidden:"true"}},[t("div",{attrs:{id:"errorMessageLeft"}},[t("span",{attrs:{id:"errorMessage"}}),t("button",{attrs:{id:"errorShowMore","data-l10n-id":"error_more_info"}},[e._v(" More Information ")]),t("button",{attrs:{id:"errorShowLess","data-l10n-id":"error_less_info",hidden:"true"}},[e._v(" Less Information ")])]),t("div",{attrs:{id:"errorMessageRight"}},[t("button",{attrs:{id:"errorClose","data-l10n-id":"error_close"}},[e._v(" Close ")])]),t("div",{staticClass:"clearBoth"}),t("textarea",{attrs:{id:"errorMoreInfo",hidden:"true",readonly:"readonly"}})])]),e._v(" "),t("div",{attrs:{id:"dialogContainer"}},[t("dialog",{attrs:{id:"documentPropertiesDialog"}},[t("div",{staticClass:"row"},[t("span",{attrs:{id:"fileNameLabel","data-l10n-id":"document_properties_file_name"}},[e._v("文件名:")]),t("p",{attrs:{id:"fileNameField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"fileSizeLabel","data-l10n-id":"document_properties_file_size"}},[e._v("文件大小:")]),t("p",{attrs:{id:"fileSizeField","aria-labelledby":"fileSizeLabel"}},[e._v("-")])]),t("div",{staticClass:"separator"}),t("div",{staticClass:"row"},[t("span",{attrs:{id:"titleLabel","data-l10n-id":"document_properties_title"}},[e._v("标题:")]),t("p",{attrs:{id:"titleField","aria-labelledby":"titleLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"authorLabel","data-l10n-id":"document_properties_author"}},[e._v("作者:")]),t("p",{attrs:{id:"authorField","aria-labelledby":"authorLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"subjectLabel","data-l10n-id":"document_properties_subject"}},[e._v("主题:")]),t("p",{attrs:{id:"subjectField","aria-labelledby":"subjectLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"keywordsLabel","data-l10n-id":"document_properties_keywords"}},[e._v("关键词:")]),t("p",{attrs:{id:"keywordsField","aria-labelledby":"keywordsLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"creationDateLabel","data-l10n-id":"document_properties_creation_date"}},[e._v("创建日期:")]),t("p",{attrs:{id:"creationDateField","aria-labelledby":"creationDateLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"modificationDateLabel","data-l10n-id":"document_properties_modification_date"}},[e._v("修改日期:")]),t("p",{attrs:{id:"modificationDateField","aria-labelledby":"modificationDateLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"creatorLabel","data-l10n-id":"document_properties_creator"}},[e._v("创建者:")]),t("p",{attrs:{id:"creatorField","aria-labelledby":"creatorLabel"}},[e._v("-")])]),t("div",{staticClass:"separator"}),t("div",{staticClass:"row"},[t("span",{attrs:{id:"producerLabel","data-l10n-id":"document_properties_producer"}},[e._v("OFD 生成器:")]),t("p",{attrs:{id:"producerField","aria-labelledby":"producerLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"versionLabel","data-l10n-id":"document_properties_version"}},[e._v("OFD 版本:")]),t("p",{attrs:{id:"versionField","aria-labelledby":"versionLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"pageCountLabel","data-l10n-id":"document_properties_page_count"}},[e._v("页数:")]),t("p",{attrs:{id:"pageCountField","aria-labelledby":"pageCountLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"pageSizeLabel","data-l10n-id":"document_properties_page_size"}},[e._v("页面大小:")]),t("p",{attrs:{id:"pageSizeField","aria-labelledby":"pageSizeLabel"}},[e._v("-")])]),t("div",{staticClass:"separator"}),t("div",{staticClass:"row",attrs:{hidden:"hidden"}},[t("span",{attrs:{id:"linearizedLabel","data-l10n-id":"document_properties_linearized"}},[e._v("快速 Web 视图:")]),t("p",{attrs:{id:"linearizedField","aria-labelledby":"linearizedLabel"}},[e._v("-")])]),t("div",{staticClass:"buttonRow"},[t("button",{staticClass:"dialogButton",attrs:{id:"documentPropertiesClose"}},[t("span",{attrs:{"data-l10n-id":"document_properties_close"}},[e._v("关闭")])])])]),t("dialog",{staticStyle:{"min-width":"200px"},attrs:{id:"printServiceDialog"}},[t("div",{staticClass:"row"},[t("span",{attrs:{"data-l10n-id":"print_progress_message"}},[e._v("正在准备打印文档…")])]),t("div",{staticClass:"row"},[t("progress",{attrs:{id:"printProgress",value:"0",max:"100"}}),t("span",{staticClass:"relative-progress",attrs:{"data-l10n-id":"print_progress_percent","data-l10n-args":'{ "progress": 0 }'}},[e._v("0%")])]),t("div",{staticClass:"buttonRow"},[t("button",{staticClass:"dialogButton",attrs:{id:"printCancel"}},[t("span",{attrs:{"data-l10n-id":"print_progress_close"}},[e._v("取消")])])])]),t("dialog",{attrs:{id:"signaturePropertiesDialog"}},[t("div",{staticClass:"row"},[t("span",{attrs:{id:"signerLabel"}},[e._v("签章人:")]),t("p",{attrs:{id:"signerField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"providerLabel"}},[e._v("签章提供者:")]),t("p",{attrs:{id:"providerField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"hashedValueLabel"}},[e._v("原文摘要值:")]),t("p",{attrs:{id:"hashedValueField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"signedValueLabel"}},[e._v("签名值:")]),t("p",{attrs:{id:"signedValueField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"signMethodLabel"}},[e._v("签名算法:")]),t("p",{attrs:{id:"signMethodField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"signVersionLabel"}},[e._v("版本号:")]),t("p",{attrs:{id:"signVersionField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"verifyLabel"}},[e._v("验签结果:")]),t("p",{attrs:{id:"verifyField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"separator"}),t("div",{staticClass:"row"},[t("span",{attrs:{id:"sealIDLabel"}},[e._v("印章标识:")]),t("p",{attrs:{id:"sealIDField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"sealNameLabel"}},[e._v("印章名称:")]),t("p",{attrs:{id:"sealNameField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"sealTypeLabel"}},[e._v("印章类型:")]),t("p",{attrs:{id:"sealTypeField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"sealAuthTimeLabel"}},[e._v("有效时间:")]),t("p",{attrs:{id:"sealAuthTimeField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"sealMakeTimeLabel"}},[e._v("制章日期:")]),t("p",{attrs:{id:"sealMakeTimeField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"sealVersionLabel"}},[e._v("印章版本:")]),t("p",{attrs:{id:"sealVersionField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"buttonRow"},[t("button",{staticClass:"dialogButton",attrs:{id:"signaturePropertiesClose"}},[t("span",{attrs:{"data-l10n-id":"document_properties_close"}},[e._v("关闭")])])])])])])}],n={name:"OfdView",props:{},watch:{},data(){return{config:null}},mounted(){if(!this.config){this.config=this.getViewerConfiguration();let e=new Image;e.style.position="absolute",e.style.left=0,e.style.right=0,e.style.margin="auto",e.style.top=0,e.style.bottom=0,e.src="data:image/gif;base64,R0lGODlhNgA3APMAAP///zAyOJKTlkdJTzw+RN/g4XV2euPj5M/Q0WtscaChpDAyODAyODAyODAyODAyOCH5BAkKAAAAIf4aQ3JlYXRlZCB3aXRoIGFqYXhsb2FkLmluZm8AIf8LTkVUU0NBUEUyLjADAQAAACwAAAAANgA3AAAEzBDISau9OOvNu/9gKI5kaZ4lkhBEgqCnws6EApMITb93uOqsRC8EpA1Bxdnx8wMKl51ckXcsGFiGAkamsy0LA9pAe1EFqRbBYCAYXXUGk4DWJhZN4dlAlMSLRW80cSVzM3UgB3ksAwcnamwkB28GjVCWl5iZmpucnZ4cj4eWoRqFLKJHpgSoFIoEe5ausBeyl7UYqqw9uaVrukOkn8LDxMXGx8ibwY6+JLxydCO3JdMg1dJ/Is+E0SPLcs3Jnt/F28XXw+jC5uXh4u89EQAh+QQJCgAAACwAAAAANgA3AAAEzhDISau9OOvNu/9gKI5kaZ5oqhYGQRiFWhaD6w6xLLa2a+iiXg8YEtqIIF7vh/QcarbB4YJIuBKIpuTAM0wtCqNiJBgMBCaE0ZUFCXpoknWdCEFvpfURdCcM8noEIW82cSNzRnWDZoYjamttWhphQmOSHFVXkZecnZ6foKFujJdlZxqELo1AqQSrFH1/TbEZtLM9shetrzK7qKSSpryixMXGx8jJyifCKc1kcMzRIrYl1Xy4J9cfvibdIs/MwMue4cffxtvE6qLoxubk8ScRACH5BAkKAAAALAAAAAA2ADcAAATOEMhJq7046827/2AojmRpnmiqrqwwDAJbCkRNxLI42MSQ6zzfD0Sz4YYfFwyZKxhqhgJJeSQVdraBNFSsVUVPHsEAzJrEtnJNSELXRN2bKcwjw19f0QG7PjA7B2EGfn+FhoeIiYoSCAk1CQiLFQpoChlUQwhuBJEWcXkpjm4JF3w9P5tvFqZsLKkEF58/omiksXiZm52SlGKWkhONj7vAxcbHyMkTmCjMcDygRNAjrCfVaqcm11zTJrIjzt64yojhxd/G28XqwOjG5uTxJhEAIfkECQoAAAAsAAAAADYANwAABM0QyEmrvTjrzbv/YCiOZGmeaKqurDAMAlsKRE3EsjjYxJDrPN8PRLPhhh8XDMk0KY/OF5TIm4qKNWtnZxOWuDUvCNw7kcXJ6gl7Iz1T76Z8Tq/b7/i8qmCoGQoacT8FZ4AXbFopfTwEBhhnQ4w2j0GRkgQYiEOLPI6ZUkgHZwd6EweLBqSlq6ytricICTUJCKwKkgojgiMIlwS1VEYlspcJIZAkvjXHlcnKIZokxJLG0KAlvZfAebeMuUi7FbGz2z/Rq8jozavn7Nev8CsRACH5BAkKAAAALAAAAAA2ADcAAATLEMhJq7046827/2AojmRpnmiqrqwwDAJbCkRNxLI42MSQ6zzfD0Sz4YYfFwzJNCmPzheUyJuKijVrZ2cTlrg1LwjcO5HFyeoJeyM9U++mfE6v2+/4PD6O5F/YWiqAGWdIhRiHP4kWg0ONGH4/kXqUlZaXmJlMBQY1BgVuUicFZ6AhjyOdPAQGQF0mqzauYbCxBFdqJao8rVeiGQgJNQkIFwdnB0MKsQrGqgbJPwi2BMV5wrYJetQ129x62LHaedO21nnLq82VwcPnIhEAIfkECQoAAAAsAAAAADYANwAABMwQyEmrvTjrzbv/YCiOZGmeaKqurDAMAlsKRE3EsjjYxJDrPN8PRLPhhh8XDMk0KY/OF5TIm4qKNWtnZxOWuDUvCNw7kcXJ6gl7Iz1T76Z8Tq/b7/g8Po7kX9haKoAZZ0iFGIc/iRaDQ40Yfj+RepSVlpeYAAgJNQkIlgo8NQqUCKI2nzNSIpynBAkzaiCuNl9BIbQ1tl0hraewbrIfpq6pbqsioaKkFwUGNQYFSJudxhUFZ9KUz6IGlbTfrpXcPN6UB2cHlgfcBuqZKBEAIfkECQoAAAAsAAAAADYANwAABMwQyEmrvTjrzbv/YCiOZGmeaKqurDAMAlsKRE3EsjjYxJDrPN8PRLPhhh8XDMk0KY/OF5TIm4qKNWtnZxOWuDUvCNw7kcXJ6gl7Iz1T76Z8Tq/b7yJEopZA4CsKPDUKfxIIgjZ+P3EWe4gECYtqFo82P2cXlTWXQReOiJE5bFqHj4qiUhmBgoSFho59rrKztLVMBQY1BgWzBWe8UUsiuYIGTpMglSaYIcpfnSHEPMYzyB8HZwdrqSMHxAbath2MsqO0zLLorua05OLvJxEAIfkECQoAAAAsAAAAADYANwAABMwQyEmrvTjrzbv/YCiOZGmeaKqurDAMAlsKRE3EsjjYxJDrPN8PRLPhfohELYHQuGBDgIJXU0Q5CKqtOXsdP0otITHjfTtiW2lnE37StXUwFNaSScXaGZvm4r0jU1RWV1hhTIWJiouMjVcFBjUGBY4WBWw1A5RDT3sTkVQGnGYYaUOYPaVip3MXoDyiP3k3GAeoAwdRnRoHoAa5lcHCw8TFxscduyjKIrOeRKRAbSe3I9Um1yHOJ9sjzCbfyInhwt3E2cPo5dHF5OLvJREAOw==",e.draggable=!1,this.config.loadingContainer=e}this.$emit("ofdViewReady",this.config)},methods:{getViewerConfiguration(){let e=null;return e={container:document.getElementById("errorWrapper"),errorMessage:document.getElementById("errorMessage"),closeButton:document.getElementById("errorClose"),errorMoreInfo:document.getElementById("errorMoreInfo"),moreInfoButton:document.getElementById("errorShowMore"),lessInfoButton:document.getElementById("errorShowLess")},{appContainer:document.body,mainContainer:document.getElementById("viewerContainer"),viewerContainer:document.getElementById("viewer"),toolbar:{container:document.getElementById("toolbarViewer"),numPages:document.getElementById("numPages"),pageNumber:document.getElementById("pageNumber"),scaleSelect:document.getElementById("scaleSelect"),customScaleOption:document.getElementById("customScaleOption"),previous:document.getElementById("previous"),next:document.getElementById("next"),zoomIn:document.getElementById("zoomIn"),zoomOut:document.getElementById("zoomOut"),openFile:document.getElementById("openFile"),print:document.getElementById("print")},secondaryToolbar:{toolbar:document.getElementById("secondaryToolbar"),toggleButton:document.getElementById("secondaryToolbarToggle"),toolbarButtonContainer:document.getElementById("secondaryToolbarButtonContainer"),openFileButton:document.getElementById("secondaryOpenFile"),printButton:document.getElementById("secondaryPrint"),documentPropertiesButton:document.getElementById("documentProperties")},sidebar:{outerContainer:document.getElementById("outerContainer"),viewerContainer:document.getElementById("viewerContainer")},sidebarResizer:{outerContainer:document.getElementById("outerContainer")},documentProperties:{dialog:document.getElementById("documentPropertiesDialog"),closeButton:document.getElementById("documentPropertiesClose"),fields:{fileName:document.getElementById("fileNameField"),fileSize:document.getElementById("fileSizeField"),title:document.getElementById("titleField"),author:document.getElementById("authorField"),subject:document.getElementById("subjectField"),keywords:document.getElementById("keywordsField"),creationDate:document.getElementById("creationDateField"),modificationDate:document.getElementById("modificationDateField"),creator:document.getElementById("creatorField"),producer:document.getElementById("producerField"),version:document.getElementById("versionField"),pageCount:document.getElementById("pageCountField"),pageSize:document.getElementById("pageSizeField"),linearized:document.getElementById("linearizedField")}},signatureProperties:{dialog:document.getElementById("signaturePropertiesDialog"),closeButton:document.getElementById("signaturePropertiesClose"),fields:{signer:document.getElementById("signerField"),provider:document.getElementById("providerField"),hashedValue:document.getElementById("hashedValueField"),signedValue:document.getElementById("signedValueField"),signMethod:document.getElementById("signMethodField"),signVersion:document.getElementById("signVersionField"),verify:document.getElementById("verifyField"),sealID:document.getElementById("sealIDField"),sealName:document.getElementById("sealNameField"),sealType:document.getElementById("sealTypeField"),sealAuthTime:document.getElementById("sealAuthTimeField"),sealMakeTime:document.getElementById("sealMakeTimeField"),sealVersion:document.getElementById("sealVersionField")}},errorWrapper:e,printContainer:document.getElementById("printContainer"),openFileInputName:"fileInput"}}}},s=n;function a(e,t,r,i,n,s,a,o){var l,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=r,c._compiled=!0),i&&(c.functional=!0),s&&(c._scopeId="data-v-"+s),a?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},c._ssrRegister=l):n&&(l=o?function(){n.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:n),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:e,options:c}}var o=a(s,r,i,!1,null,"5f966ce0",null),l=o.exports;l.install=e=>e.component(l.name,l);var c=l,d=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"outerContainer"}},[t("div",{attrs:{id:"mainContainer"}},[e._m(0),e._v(" "),t("div",{staticClass:"toolbar"},[t("div",{attrs:{id:"toolbarContainer"}},[t("div",{attrs:{id:"toolbarViewer"}},[t("div",{attrs:{id:"toolbarViewerLeft"}},[t("div",{staticClass:"splitToolbarButton hiddenSmallView"},[t("button",{staticClass:"toolbarButton pageUp",attrs:{title:"上一页",id:"previous",tabindex:"13","data-l10n-id":"previous",disabled:1===e.page},on:{click:e.prevPage}},[t("span",{attrs:{"data-l10n-id":"previous_label"}},[e._v("上一页")])]),t("div",{staticClass:"splitToolbarButtonSeparator"}),t("button",{staticClass:"toolbarButton pageDown",attrs:{title:"下一页",id:"next",tabindex:"14","data-l10n-id":"next",disabled:e.page===e.numPages},on:{click:e.nextPage}},[t("span",{attrs:{"data-l10n-id":"next_label"}},[e._v("下一页")])])]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.page,expression:"page"}],staticClass:"toolbarField pageNumber",attrs:{type:"number",id:"pageNumber",title:"页面",size:"4",min:"1",tabindex:"15","data-l10n-id":"page",autocomplete:"off"},domProps:{value:e.page},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.goPage.apply(null,arguments)},blur:e.goPage,input:function(t){t.target.composing||(e.page=t.target.value)}}}),e.numPages>0?t("span",{staticClass:"toolbarLabel",attrs:{id:"numPages"}},[e._v("/ "+e._s(e.numPages))]):e._e()]),t("div",{attrs:{id:"toolbarViewerRight"}}),t("div",{attrs:{id:"toolbarViewerMiddle"}},[t("div",{staticClass:"splitToolbarButton"},[t("button",{staticClass:"toolbarButton zoomOut",attrs:{id:"zoomOut",title:"缩小",tabindex:"21","data-l10n-id":"zoom_out"},on:{click:e.zoomOut}},[t("span",{attrs:{"data-l10n-id":"zoom_out_label"}},[e._v("缩小")])]),t("div",{staticClass:"splitToolbarButtonSeparator"}),t("button",{staticClass:"toolbarButton zoomIn",attrs:{id:"zoomIn",title:"放大",tabindex:"22","data-l10n-id":"zoom_in"},on:{click:e.zoomIn}},[t("span",{attrs:{"data-l10n-id":"zoom_in_label"}},[e._v("放大")])])]),t("span",{staticClass:"dropdownToolbarButton",attrs:{id:"scaleSelectContainer"}},[t("select",{directives:[{name:"model",rawName:"v-model",value:e.scale,expression:"scale"}],attrs:{id:"scaleSelect",title:"缩放",tabindex:"23","data-l10n-id":"zoom"},on:{change:[function(t){var r=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.scale=t.target.multiple?r:r[0]},e.scaleChanged]}},[t("option",{attrs:{id:"pageAutoOption",title:"",value:"auto",selected:"selected","data-l10n-id":"page_scale_auto"}},[e._v("自动缩放")]),t("option",{attrs:{id:"pageActualOption",title:"",value:"page-actual","data-l10n-id":"page_scale_actual"}},[e._v("实际大小")]),t("option",{attrs:{id:"pageFitOption",title:"",value:"page-fit","data-l10n-id":"page_scale_fit"}},[e._v("适合页面")]),t("option",{attrs:{id:"pageWidthOption",title:"",value:"page-width","data-l10n-id":"page_scale_width"}},[e._v("适合页宽")]),t("option",{attrs:{id:"customScaleOption",title:"",value:"custom",disabled:"disabled",hidden:"true"}},[e._v(e._s(e.custom))]),t("option",{attrs:{title:"",value:"0.5","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 50 }'}},[e._v("50%")]),t("option",{attrs:{title:"",value:"0.75","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 75 }'}},[e._v("75%")]),t("option",{attrs:{title:"",value:"1","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 100 }'}},[e._v("100%")]),t("option",{attrs:{title:"",value:"1.25","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 125 }'}},[e._v("125%")]),t("option",{attrs:{title:"",value:"1.5","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 150 }'}},[e._v("150%")]),t("option",{attrs:{title:"",value:"2","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 200 }'}},[e._v("200%")]),t("option",{attrs:{title:"",value:"3","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 300 }'}},[e._v("300%")]),t("option",{attrs:{title:"",value:"4","data-l10n-id":"page_scale_percent","data-l10n-args":'{ "scale": 400 }'}},[e._v("400%")])])])])])])]),e._m(1),e._m(2)]),e._v(" "),e._m(3)])},h=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"secondaryToolbar hidden doorHangerRight",attrs:{id:"secondaryToolbar"}},[t("div",{attrs:{id:"secondaryToolbarButtonContainer"}})])},function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"viewerContainer",tabindex:"0"}},[t("div",{staticClass:"pdfViewer",attrs:{id:"viewer"}})])},function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"errorWrapper",hidden:"true"}},[t("div",{attrs:{id:"errorMessageLeft"}},[t("span",{attrs:{id:"errorMessage"}}),t("button",{attrs:{id:"errorShowMore","data-l10n-id":"error_more_info"}},[e._v(" More Information ")]),t("button",{attrs:{id:"errorShowLess","data-l10n-id":"error_less_info",hidden:"true"}},[e._v(" Less Information ")])]),t("div",{attrs:{id:"errorMessageRight"}},[t("button",{attrs:{id:"errorClose","data-l10n-id":"error_close"}},[e._v(" Close ")])]),t("div",{staticClass:"clearBoth"}),t("textarea",{attrs:{id:"errorMoreInfo",hidden:"true",readonly:"readonly"}})])},function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"dialogContainer"}},[t("dialog",{attrs:{id:"documentPropertiesDialog"}},[t("div",{staticClass:"row"},[t("span",{attrs:{id:"fileNameLabel","data-l10n-id":"document_properties_file_name"}},[e._v("文件名:")]),t("p",{attrs:{id:"fileNameField","aria-labelledby":"fileNameLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"fileSizeLabel","data-l10n-id":"document_properties_file_size"}},[e._v("文件大小:")]),t("p",{attrs:{id:"fileSizeField","aria-labelledby":"fileSizeLabel"}},[e._v("-")])]),t("div",{staticClass:"separator"}),t("div",{staticClass:"row"},[t("span",{attrs:{id:"titleLabel","data-l10n-id":"document_properties_title"}},[e._v("标题:")]),t("p",{attrs:{id:"titleField","aria-labelledby":"titleLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"authorLabel","data-l10n-id":"document_properties_author"}},[e._v("作者:")]),t("p",{attrs:{id:"authorField","aria-labelledby":"authorLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"subjectLabel","data-l10n-id":"document_properties_subject"}},[e._v("主题:")]),t("p",{attrs:{id:"subjectField","aria-labelledby":"subjectLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"keywordsLabel","data-l10n-id":"document_properties_keywords"}},[e._v("关键词:")]),t("p",{attrs:{id:"keywordsField","aria-labelledby":"keywordsLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"creationDateLabel","data-l10n-id":"document_properties_creation_date"}},[e._v("创建日期:")]),t("p",{attrs:{id:"creationDateField","aria-labelledby":"creationDateLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"modificationDateLabel","data-l10n-id":"document_properties_modification_date"}},[e._v("修改日期:")]),t("p",{attrs:{id:"modificationDateField","aria-labelledby":"modificationDateLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"creatorLabel","data-l10n-id":"document_properties_creator"}},[e._v("创建者:")]),t("p",{attrs:{id:"creatorField","aria-labelledby":"creatorLabel"}},[e._v("-")])]),t("div",{staticClass:"separator"}),t("div",{staticClass:"row"},[t("span",{attrs:{id:"producerLabel","data-l10n-id":"document_properties_producer"}},[e._v("OFD 生成器:")]),t("p",{attrs:{id:"producerField","aria-labelledby":"producerLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"versionLabel","data-l10n-id":"document_properties_version"}},[e._v("OFD 版本:")]),t("p",{attrs:{id:"versionField","aria-labelledby":"versionLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"pageCountLabel","data-l10n-id":"document_properties_page_count"}},[e._v("页数:")]),t("p",{attrs:{id:"pageCountField","aria-labelledby":"pageCountLabel"}},[e._v("-")])]),t("div",{staticClass:"row"},[t("span",{attrs:{id:"pageSizeLabel","data-l10n-id":"document_properties_page_size"}},[e._v("页面大小:")]),t("p",{attrs:{id:"pageSizeField","aria-labelledby":"pageSizeLabel"}},[e._v("-")])]),t("div",{staticClass:"separator"}),t("div",{staticClass:"row",attrs:{hidden:"hidden"}},[t("span",{attrs:{id:"linearizedLabel","data-l10n-id":"document_properties_linearized"}},[e._v("快速 Web 视图:")]),t("p",{attrs:{id:"linearizedField","aria-labelledby":"linearizedLabel"}},[e._v("-")])]),t("div",{staticClass:"buttonRow"},[t("button",{staticClass:"dialogButton",attrs:{id:"documentPropertiesClose"}},[t("span",{attrs:{"data-l10n-id":"document_properties_close"}},[e._v("关闭")])])])]),t("dialog",{staticStyle:{"min-width":"200px"},attrs:{id:"printServiceDialog"}},[t("div",{staticClass:"row"},[t("span",{attrs:{"data-l10n-id":"print_progress_message"}},[e._v("正在准备打印文档…")])]),t("div",{staticClass:"row"},[t("progress",{attrs:{id:"printProgress",value:"0",max:"100"}}),t("span",{staticClass:"relative-progress",attrs:{"data-l10n-id":"print_progress_percent","data-l10n-args":'{ "progress": 0 }'}},[e._v("0%")])]),t("div",{staticClass:"buttonRow"},[t("button",{staticClass:"dialogButton",attrs:{id:"printCancel"}},[t("span",{attrs:{"data-l10n-id":"print_progress_close"}},[e._v("取消")])])])])])}],u=__webpack_require__(420),p=__webpack_require__(963);const g=__webpack_require__(299);g.GlobalWorkerOptions.workerSrc="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.5.207/pdf.worker.js";const f=__webpack_require__(420),m=1.1,_=1e3;var b={name:"PDFJSViewer",props:{url:{type:String,required:!0},rangeChunkSize:{type:Number,required:!1,default:524288},disableAutoFetch:{type:Boolean,required:!1,default:!1},disableCreateObjectURL:{type:Boolean,required:!1,default:!1},disableFontFace:{type:Boolean,required:!1,default:!1},disableRange:{type:Boolean,required:!1,default:!1},disableStream:{type:Boolean,required:!1,default:!0},isEvalSupported:{type:Boolean,required:!1,default:!0},maxImageSize:{type:Number,required:!1,default:-1},postMessageTransfers:{type:Boolean,required:!1,default:!0},verbosity:{type:Number,required:!1,default:1}},watch:{page:function(e,t){e>this.numPages&&(this.page=t)}},data(){return{APIS:["rangeChunkSize","disableAutoFetch","disableCreateObjectURL","disableFontFace","disableRange","disableStream","isEvalSupported","maxImageSize","postMessageTransfers","verbosity"],pdfViewer:null,pdfThumbnailViewer:null,pdfLinkService:null,numPages:0,page:1,scale:"auto",zoomDisabledTimeout:null,custom:null,sidebaropen:!1,isThumbnailViewVisible:!1,viewVisible:!1,dragging:!1,dist:0,eventBus:new u.EventBus,sp:1,overlay:!1,printProgress:0}},beforeUnmount(){this.pdfViewer.setDocument(null),this.pdfThumbnailViewer&&this.pdfThumbnailViewer.setDocument(null),this.pdfViewer=null,this.pdfThumbnailViewer=null,this.eventBus.off("resize",this.viewerResize),this.eventBus.off("pagerendered",this.viewerPageRendered),this.eventBus.off("pagechanging",this.viewerPageChanging),this.eventBus.off("scalechanging",this.viewerScaleChanging),this.eventBus.off("updateviewarea",this.updateViewerArea),document.removeEventListener("visibilitychange",this.viewerVisibilityChange),window.removeEventListener("resize",this.windowResize),this.config.mainContainer.removeEventListener("wheel",this.viewerWheel)},mounted(){this.config||(this.config=this.getViewerConfiguration()),this.initialize()},methods:{_readPreferences(){let e={};return this.APIS.forEach((t=>{e[t]=this[t]})),e},initialize(){let e=this._readPreferences();e.url=this.url,this._initializeViewerComponents(),this.eventBus.on("resize",this.viewerResize),this.eventBus.on("beforeprint",this.beforePrint),this.eventBus.on("afterprint",this.afterPrint),this.eventBus.on("updateviewarea",this.updateViewerArea),this.eventBus.on("pagerendered",this.viewerPageRendered),this.eventBus.on("pagechanging",this.viewerPageChanging),this.eventBus.on("scalechanging",this.viewerScaleChanging),document.addEventListener("visibilitychange",this.viewerVisibilityChange),window.addEventListener("resize",this.windowResize),window.addEventListener("beforeprint",this.windowBeforePrint),window.addEventListener("afterprint",this.windowAfterPrint),this.config.mainContainer.addEventListener("transitionend",(()=>{this.eventBus.dispatch("resize",{source:this})})),this.config.mainContainer.addEventListener("wheel",this.viewerWheel),e.cMapUrl="/static/cmaps/",e.cMapPacked=!0,this._load(e)},_initializeViewerComponents(){this.pdfLinkService=new p.PDFLinkService({eventBus:this.eventBus,externalLinkTarget:0,externalLinkRel:"noopener noreferrer nofollow"}),this.pdfViewer=new p.PDFViewer({container:this.config.mainContainer,viewer:this.config.viewerContainer,eventBus:this.eventBus,linkService:this.pdfLinkService,textLayerMode:1,scale:"auto",useOnlyCssZoom:!1}),this.pdfLinkService.setViewer(this.pdfViewer),this.pdfViewer.renderingQueue.onIdle=this.cleanup.bind(this)},cleanup(){this.pdfViewer&&this.pdfViewer.pdfDocument&&(this.pdfViewer.cleanup(),"svg"!==this.pdfViewer.renderer&&this.pdfViewer.pdfDocument.cleanup())},getViewerConfiguration(){let e=null;return e={container:document.getElementById("errorWrapper"),errorMessage:document.getElementById("errorMessage"),closeButton:document.getElementById("errorClose"),errorMoreInfo:document.getElementById("errorMoreInfo"),moreInfoButton:document.getElementById("errorShowMore"),lessInfoButton:document.getElementById("errorShowLess")},{appContainer:document.body,mainContainer:document.getElementById("viewerContainer"),viewerContainer:document.getElementById("viewer"),toolbar:{container:document.getElementById("toolbarViewer"),numPages:document.getElementById("numPages"),pageNumber:document.getElementById("pageNumber"),scaleSelect:document.getElementById("scaleSelect"),customScaleOption:document.getElementById("customScaleOption"),previous:document.getElementById("previous"),next:document.getElementById("next"),zoomIn:document.getElementById("zoomIn"),zoomOut:document.getElementById("zoomOut"),openFile:document.getElementById("openFile"),print:document.getElementById("print")},secondaryToolbar:{toolbar:document.getElementById("secondaryToolbar"),toggleButton:document.getElementById("secondaryToolbarToggle"),toolbarButtonContainer:document.getElementById("secondaryToolbarButtonContainer"),openFileButton:document.getElementById("secondaryOpenFile"),printButton:document.getElementById("secondaryPrint"),documentPropertiesButton:document.getElementById("documentProperties")},sidebar:{outerContainer:document.getElementById("outerContainer"),viewerContainer:document.getElementById("viewerContainer")},sidebarResizer:{outerContainer:document.getElementById("outerContainer")},documentProperties:{dialog:document.getElementById("documentPropertiesDialog"),closeButton:document.getElementById("documentPropertiesClose"),fields:{fileName:document.getElementById("fileNameField"),fileSize:document.getElementById("fileSizeField"),title:document.getElementById("titleField"),author:document.getElementById("authorField"),subject:document.getElementById("subjectField"),keywords:document.getElementById("keywordsField"),creationDate:document.getElementById("creationDateField"),modificationDate:document.getElementById("modificationDateField"),creator:document.getElementById("creatorField"),producer:document.getElementById("producerField"),version:document.getElementById("versionField"),pageCount:document.getElementById("pageCountField"),pageSize:document.getElementById("pageSizeField"),linearized:document.getElementById("linearizedField")}},signatureProperties:{dialog:document.getElementById("signaturePropertiesDialog"),closeButton:document.getElementById("signaturePropertiesClose"),fields:{signer:document.getElementById("signerField"),provider:document.getElementById("providerField"),hashedValue:document.getElementById("hashedValueField"),signedValue:document.getElementById("signedValueField"),signMethod:document.getElementById("signMethodField"),signVersion:document.getElementById("signVersionField"),verify:document.getElementById("verifyField"),sealID:document.getElementById("sealIDField"),sealName:document.getElementById("sealNameField"),sealType:document.getElementById("sealTypeField"),sealAuthTime:document.getElementById("sealAuthTimeField"),sealMakeTime:document.getElementById("sealMakeTimeField"),sealVersion:document.getElementById("sealVersionField")}},errorWrapper:e,printContainer:document.getElementById("printContainer"),openFileInputName:"fileInput"}},_load(e){let t=g.getDocument(e);t.promise.then((e=>{this.numPages=e.numPages,this.pdfLinkService.setDocument(e,this.url),this.pdfViewer.setDocument(e);let t=this.pdfViewer.firstPagePromise,r=this.pdfViewer.pagesPromise;t.then((e=>{this.page=this.pdfViewer.currentPageNumber,this.pdfViewer.focus(),Promise.race([r,new Promise((e=>{setTimeout(e,1e4)}))]).then((()=>{this.pdfViewer.update()})),this.pdfViewer.currentScaleValue=this.scale,this.viewVisible=!0,this.$emit("viewready",this.pdfViewer)}))}))},scaleChanged(){this.pdfViewer.currentScaleValue=this.scale,this.pdfViewer.update()},viewerResize(){if(!this.pdfViewer.pdfDocument)return;let e=this.pdfViewer.currentScaleValue;"auto"!==e&&"page-fit"!==e&&"page-width"!==e||(this.pdfViewer.currentScaleValue=e),this.pdfViewer.update()},updateViewerArea(e){this.sp=e.location.pageNumber},viewerPageRendered(e){let t=e.pageNumber,r=t-1,i=this.pdfViewer.getPageView(r);if(i&&this.isThumbnailViewVisible){let e=this.pdfThumbnailViewer.getThumbnail(r);e.setImage(i)}},viewerPageChanging(e){this.page=e.pageNumber,this.isThumbnailViewVisible&&this.pdfThumbnailViewer.scrollThumbnailIntoView(this.page)},viewerScaleChanging(){this.pdfViewer.update()},viewerVisibilityChange(){"visible"===document.visibilityState&&this.setZoomDisabledTimeout()},windowResize(){this.eventBus.dispatch("resize",{source:window})},setZoomDisabledTimeout(){this.zoomDisabledTimeout&&clearTimeout(this.zoomDisabledTimeout),this.zoomDisabledTimeout=setTimeout((()=>{this.zoomDisabledTimeout=null}),_)},viewerWheel(e){let t=this.pdfViewer;if(e.ctrlKey||e.metaKey){if(e.preventDefault(),this.zoomDisabledTimeout||"hidden"===document.visibilityState)return;let r=t.currentScale,i=f.normalizeWheelEventDelta(e);const n=3;let s=i*n;s<0?this._zoomOut(-s):this._zoomIn(s);let a=t.currentScale;if(r!==a){let i=a/r-1,n=t.container.getBoundingClientRect(),s=e.clientX-n.left,o=e.clientY-n.top;t.container.scrollLeft+=s*i,t.container.scrollTop+=o*i}}else this.setZoomDisabledTimeout()},_zoomOut(e){let t=this.pdfViewer.currentScale;do{t=(t/m).toFixed(2),t=Math.floor(10*t)/10,t=Math.max(f.MIN_SCALE,t)}while(--e>0&&t>f.MIN_SCALE);this.pdfViewer.currentScaleValue=t,this.scale="custom",this.custom=Math.floor(100*t)+"%"},_zoomIn(e){let t=this.pdfViewer.currentScale;do{t=(t*m).toFixed(2),t=Math.ceil(10*t)/10,t=Math.min(f.MAX_SCALE,t)}while(--e>0&&t<f.MAX_SCALE);this.pdfViewer.currentScaleValue=t,this.scale="custom",this.custom=Math.floor(100*t)+"%"},zoomOut(){this._zoomOut()},zoomIn(){this._zoomIn()},nextPage(){this.page<this.numPages&&(this.page++,this.pdfViewer.currentPageNumber=this.page)},prevPage(){this.page>1&&(this.page--,this.pdfViewer.currentPageNumber=this.page)},goPage(){this.pdfViewer.currentPageLabel=this.page},webViewerPrint(){window.print()}}},v=b,y=(__webpack_require__(316),a(v,d,h,!1,null,"fa94153c",null)),A=y.exports;A.install=e=>e.component(A.name,A);var w=A;const S=[c,w],C=function(e){C.installed||S.map((t=>e.component(t.name,t)))};"undefined"!==typeof window&&window.Vue&&C(window.Vue);var x={install:C,OfdView:c,PdvView:w},P=x}(),__webpack_exports__}()}));
|
2
67
|
//# sourceMappingURL=ofd-view.umd.min.js.map
|