Version Description
Added support for Italian language Security & Bug fixes Updated compatibility for Wordpress 5.7
Download this release
Release Info
Developer | levertechadmin |
Plugin | PDF Embedder |
Version | 4.6.2 |
Comparing to | |
See all releases |
Code changes from version 4.5 to 4.6.2
- core/core_pdf_embedder.php +9 -9
- css/{pdfemb-admin.css → pdfemb-admin-4.6.2.css} +0 -0
- css/{pdfemb-admin-other.css → pdfemb-admin-other-4.6.2.css} +0 -0
- css/{pdfemb-blocks.css → pdfemb-blocks-4.6.2.css} +0 -0
- css/{pdfemb-embed-pdf.css → pdfemb-embed-pdf-4.6.2.css} +0 -0
- js/admin/{pdfemb-admin.js → pdfemb-admin-4.6.2.js} +0 -0
- js/all-pdfemb-basic-4.6.2.min.js +1 -0
- js/all-pdfemb-basic.min.js +0 -1
- js/{grabtopan-basic.js → grabtopan-basic-4.6.2.js} +0 -0
- js/{pdfemb-basic.js → pdfemb-basic-4.6.2.js} +0 -0
- js/{pdfemb-blocks.js → pdfemb-blocks-4.6.2.js} +0 -0
- js/{pdfemb-embed-pdf.js → pdfemb-embed-pdf-4.6.2.js} +12 -6
- js/{pdfemb-pv-core.js → pdfemb-pv-core-4.6.2.js} +1075 -1074
- js/pdfjs/{pdf.js → pdf-4.6.2.js} +5 -3
- js/pdfjs/{pdf.js.map → pdf-4.6.2.js.map} +0 -0
- js/pdfjs/pdf-4.6.2.min.js +1 -0
- js/pdfjs/{pdf.worker.js → pdf-4.6.2.worker.js} +0 -0
- js/pdfjs/{pdf.worker.js.map → pdf-4.6.2.worker.js.map} +0 -0
- js/pdfjs/{pdf.worker.min.js → pdf-4.6.2.worker.min.js} +0 -0
- js/pdfjs/pdf.min.js +0 -1
- lang/pdf-embedder-it_IT.mo +0 -0
- lang/pdf-embedder-it_IT.po +779 -0
- pdf_embedder.php +231 -231
- readme.txt +68 -51
core/core_pdf_embedder.php
CHANGED
@@ -26,13 +26,13 @@ class core_pdf_embedder {
|
|
26 |
|
27 |
wp_enqueue_script( 'pdfemb_pdf_js' );
|
28 |
|
29 |
-
wp_enqueue_style( 'pdfemb_embed_pdf_css', $this->my_plugin_url().'css/pdfemb-embed-pdf.css', array(), $this->PLUGIN_VERSION );
|
30 |
}
|
31 |
}
|
32 |
|
33 |
protected function get_translation_array() {
|
34 |
$options = $this->get_option_pdfemb();
|
35 |
-
return Array('worker_src' => $this->my_plugin_url().'js/pdfjs/pdf.worker'.($this->useminified() ? '.min' : '').'.js',
|
36 |
'cmap_url' => $this->my_plugin_url().'js/pdfjs/cmaps/',
|
37 |
'poweredby'=>$options['poweredby'],
|
38 |
'objectL10n' => array(
|
@@ -224,8 +224,8 @@ class core_pdf_embedder {
|
|
224 |
|
225 |
public function pdfemb_options_do_page() {
|
226 |
|
227 |
-
wp_enqueue_script( 'pdfemb_admin_js', $this->my_plugin_url().'js/admin/pdfemb-admin.js', array('jquery') );
|
228 |
-
wp_enqueue_style( 'pdfemb_admin_css', $this->my_plugin_url().'css/pdfemb-admin.css', array(), $this->PLUGIN_VERSION );
|
229 |
|
230 |
$submit_page = $this->is_multisite_and_network_activated() ? 'edit.php?action='.$this->get_options_menuname() : 'options.php';
|
231 |
|
@@ -339,7 +339,7 @@ class core_pdf_embedder {
|
|
339 |
<input type="radio" name='<?php echo $this->get_options_name(); ?>[pdfemb_toolbarfixed]' id='pdfemb_toolbarfixed_on' class='radio' value="on" <?php echo $options['pdfemb_toolbarfixed'] == 'on' ? 'checked' : ''; ?> />
|
340 |
<label for="pdfemb_toolbarfixed_on" class="radio"><?php esc_html_e('Toolbar always visible', 'pdf-embedder'); ?></label>
|
341 |
</span>
|
342 |
-
<br/>
|
343 |
<label for="pdfemb_toolbarfixed" class="textinput"><?php esc_html_e('Display Credit', 'pdf-embedder'); ?></label>
|
344 |
<span>
|
345 |
<input type='checkbox' name='<?php echo $this->get_options_name(); ?>[poweredby]' id='poweredby' class='checkbox' <?php echo $options['poweredby'] == 'on' ? 'checked' : ''; ?> />
|
@@ -584,7 +584,7 @@ class core_pdf_embedder {
|
|
584 |
|
585 |
add_filter( 'attachment_fields_to_edit', array($this, 'pdfemb_attachment_fields_to_edit'), 10, 2 );
|
586 |
|
587 |
-
wp_enqueue_style( 'pdfemb_admin_other_css', $this->my_plugin_url().'css/pdfemb-admin-other.css', array(), $this->PLUGIN_VERSION );
|
588 |
if (is_admin()) {
|
589 |
add_action( 'enqueue_block_editor_assets', array($this, 'gutenberg_enqueue_block_editor_assets') );
|
590 |
}
|
@@ -657,14 +657,14 @@ class core_pdf_embedder {
|
|
657 |
function gutenberg_enqueue_block_editor_assets() {
|
658 |
wp_enqueue_script(
|
659 |
'pdfemb-gutenberg-block-js', // Unique handle.
|
660 |
-
$this->my_plugin_url(). 'js/pdfemb-blocks.js',
|
661 |
array( 'wp-blocks', 'wp-i18n', 'wp-element' ), // Dependencies, defined above.
|
662 |
$this->PLUGIN_VERSION
|
663 |
);
|
664 |
|
665 |
wp_enqueue_style(
|
666 |
'pdfemb-gutenberg-block-css', // Handle.
|
667 |
-
$this->my_plugin_url(). 'css/pdfemb-blocks.css', // editor.css: This file styles the block within the Gutenberg editor.
|
668 |
//array( 'wp-edit-blocks' ), // Dependencies, defined above.
|
669 |
$this->PLUGIN_VERSION
|
670 |
);
|
@@ -673,7 +673,7 @@ class core_pdf_embedder {
|
|
673 |
function gutenberg_enqueue_block_assets() {
|
674 |
wp_enqueue_style(
|
675 |
'pdfemb-gutenberg-block-backend-js', // Handle.
|
676 |
-
$this->my_plugin_url(). 'css/pdfemb-blocks.css', // style.css: This file styles the block on the frontend.
|
677 |
//array( 'wp-blocks' ), // Dependencies, defined above.
|
678 |
$this->PLUGIN_VERSION
|
679 |
);
|
26 |
|
27 |
wp_enqueue_script( 'pdfemb_pdf_js' );
|
28 |
|
29 |
+
wp_enqueue_style( 'pdfemb_embed_pdf_css', $this->my_plugin_url().'css/pdfemb-embed-pdf-'.$this->PLUGIN_VERSION.'.css', array(), $this->PLUGIN_VERSION );
|
30 |
}
|
31 |
}
|
32 |
|
33 |
protected function get_translation_array() {
|
34 |
$options = $this->get_option_pdfemb();
|
35 |
+
return Array('worker_src' => $this->my_plugin_url().'js/pdfjs/pdf-'.$this->PLUGIN_VERSION.'.worker'.($this->useminified() ? '.min' : '').'.js',
|
36 |
'cmap_url' => $this->my_plugin_url().'js/pdfjs/cmaps/',
|
37 |
'poweredby'=>$options['poweredby'],
|
38 |
'objectL10n' => array(
|
224 |
|
225 |
public function pdfemb_options_do_page() {
|
226 |
|
227 |
+
wp_enqueue_script( 'pdfemb_admin_js', $this->my_plugin_url().'js/admin/pdfemb-admin-'.$this->PLUGIN_VERSION.'.js', array('jquery'), $this->PLUGIN_VERSION );
|
228 |
+
wp_enqueue_style( 'pdfemb_admin_css', $this->my_plugin_url().'css/pdfemb-admin-'.$this->PLUGIN_VERSION.'.css', array(), $this->PLUGIN_VERSION );
|
229 |
|
230 |
$submit_page = $this->is_multisite_and_network_activated() ? 'edit.php?action='.$this->get_options_menuname() : 'options.php';
|
231 |
|
339 |
<input type="radio" name='<?php echo $this->get_options_name(); ?>[pdfemb_toolbarfixed]' id='pdfemb_toolbarfixed_on' class='radio' value="on" <?php echo $options['pdfemb_toolbarfixed'] == 'on' ? 'checked' : ''; ?> />
|
340 |
<label for="pdfemb_toolbarfixed_on" class="radio"><?php esc_html_e('Toolbar always visible', 'pdf-embedder'); ?></label>
|
341 |
</span>
|
342 |
+
<br/><br/>
|
343 |
<label for="pdfemb_toolbarfixed" class="textinput"><?php esc_html_e('Display Credit', 'pdf-embedder'); ?></label>
|
344 |
<span>
|
345 |
<input type='checkbox' name='<?php echo $this->get_options_name(); ?>[poweredby]' id='poweredby' class='checkbox' <?php echo $options['poweredby'] == 'on' ? 'checked' : ''; ?> />
|
584 |
|
585 |
add_filter( 'attachment_fields_to_edit', array($this, 'pdfemb_attachment_fields_to_edit'), 10, 2 );
|
586 |
|
587 |
+
wp_enqueue_style( 'pdfemb_admin_other_css', $this->my_plugin_url().'css/pdfemb-admin-other-'.$this->PLUGIN_VERSION.'.css', array(), $this->PLUGIN_VERSION );
|
588 |
if (is_admin()) {
|
589 |
add_action( 'enqueue_block_editor_assets', array($this, 'gutenberg_enqueue_block_editor_assets') );
|
590 |
}
|
657 |
function gutenberg_enqueue_block_editor_assets() {
|
658 |
wp_enqueue_script(
|
659 |
'pdfemb-gutenberg-block-js', // Unique handle.
|
660 |
+
$this->my_plugin_url(). 'js/pdfemb-blocks-'.$this->PLUGIN_VERSION.'.js',
|
661 |
array( 'wp-blocks', 'wp-i18n', 'wp-element' ), // Dependencies, defined above.
|
662 |
$this->PLUGIN_VERSION
|
663 |
);
|
664 |
|
665 |
wp_enqueue_style(
|
666 |
'pdfemb-gutenberg-block-css', // Handle.
|
667 |
+
$this->my_plugin_url(). 'css/pdfemb-blocks-'.$this->PLUGIN_VERSION.'.css', // editor.css: This file styles the block within the Gutenberg editor.
|
668 |
//array( 'wp-edit-blocks' ), // Dependencies, defined above.
|
669 |
$this->PLUGIN_VERSION
|
670 |
);
|
673 |
function gutenberg_enqueue_block_assets() {
|
674 |
wp_enqueue_style(
|
675 |
'pdfemb-gutenberg-block-backend-js', // Handle.
|
676 |
+
$this->my_plugin_url(). 'css/pdfemb-blocks-'.$this->PLUGIN_VERSION.'.css', // style.css: This file styles the block on the frontend.
|
677 |
//array( 'wp-blocks' ), // Dependencies, defined above.
|
678 |
$this->PLUGIN_VERSION
|
679 |
);
|
css/{pdfemb-admin.css → pdfemb-admin-4.6.2.css}
RENAMED
File without changes
|
css/{pdfemb-admin-other.css → pdfemb-admin-other-4.6.2.css}
RENAMED
File without changes
|
css/{pdfemb-blocks.css → pdfemb-blocks-4.6.2.css}
RENAMED
File without changes
|
css/{pdfemb-embed-pdf.css → pdfemb-embed-pdf-4.6.2.css}
RENAMED
File without changes
|
js/admin/{pdfemb-admin.js → pdfemb-admin-4.6.2.js}
RENAMED
File without changes
|
js/all-pdfemb-basic-4.6.2.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
var pdfembGrabToPan=function(){function e(e){this.element=e.element,this.document=e.element.ownerDocument,"function"==typeof e.ignoreTarget&&(this.ignoreTarget=e.ignoreTarget),this.onActiveChanged=e.onActiveChanged,this.activate=this.activate.bind(this),this.deactivate=this.deactivate.bind(this),this.toggle=this.toggle.bind(this),this._onmousedown=this._onmousedown.bind(this),this._onmousemove=this._onmousemove.bind(this),this._onmousewheel=this._onmousewheel.bind(this),this._endPan=this._endPan.bind(this),(this.overlay=document.createElement("div")).className="grab-to-pan-grabbing"}var t;e.prototype={CSS_CLASS_GRAB:"grab-to-pan-grab",activate:function(){!this.active&&(this.active=!0,this.element.addEventListener("mousedown",this._onmousedown,!0),this.element.addEventListener("mousewheel",this._onmousewheel),this.element.addEventListener("wheel",this._onmousewheel),this.element.addEventListener("DOMMouseScroll",this._onmousewheel),this.element.classList.add(this.CSS_CLASS_GRAB),this.onActiveChanged)&&this.onActiveChanged(!0)},deactivate:function(){this.active&&(this.active=!1,this.element.removeEventListener("mousedown",this._onmousedown,!0),this._endPan(),this.element.classList.remove(this.CSS_CLASS_GRAB),this.onActiveChanged)&&this.onActiveChanged(!1)},toggle:function(){this.active?this.deactivate():this.activate()},ignoreTarget:function(e){return e[t]("a[href], a[href] *, input, textarea, button, button *, select, option")},_onmousedown:function(e){if(0===e.button&&!this.ignoreTarget(e.target)){this.scrollLeftStart=this.element.scrollLeft,this.scrollTopStart=this.element.scrollTop,this.clientXStart=e.clientX,this.clientYStart=e.clientY,this.document.addEventListener("mousemove",this._onmousemove,!0),this.document.addEventListener("mouseup",this._endPan,!0),this.element.addEventListener("scroll",this._endPan,!0),e.preventDefault(),e.stopPropagation(),this.document.documentElement.classList.add(this.CSS_CLASS_GRABBING);var t=document.activeElement;t&&!t.contains(e.target)&&t.blur()}},_onmousemove:function(e){var t;this.element.removeEventListener("scroll",this._endPan,!0),(t="buttons"in e&&n?!(1|e.buttons):i||o?0===e.which:void 0)?this._endPan():(t=e.clientX-this.clientXStart,this.element.scrollTop=this.scrollTopStart-(e.clientY-this.clientYStart),this.element.scrollLeft=this.scrollLeftStart-t,this.overlay.parentNode||document.body.appendChild(this.overlay))},_onmousewheel:function(e){this.element.removeEventListener("scroll",this._endPan,!0);var t=.5;e.deltaMode&&(1==e.deltaMode&&(t=10),2==e.deltaMode&&(t=1e3));var n=e.deltaY?-e.deltaY:e.wheelDelta?e.wheelDelta:-e.detail;if(this.scrollLeftStart=this.element.scrollLeft,this.scrollTopStart=this.element.scrollTop,t*=n,this.element.scrollTop=this.scrollTopStart-t,this.overlay.parentNode||document.body.appendChild(this.overlay),this.element.scrollTop!=this.scrollTopStart||0==t)return e.preventDefault(),!1},_endPan:function(){this.element.removeEventListener("scroll",this._endPan,!0),this.document.removeEventListener("mousemove",this._onmousemove,!0),this.document.removeEventListener("mouseup",this._endPan,!0),this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)}},["webkitM","mozM","msM","oM","m"].some(function(e){return(e+="atches")in document.documentElement&&(t=e),(e+="Selector")in document.documentElement&&(t=e),t});var n=!document.documentMode||9<document.documentMode,a=window.chrome,i=a&&(a.webstore||a.app),o=/Apple/.test(navigator.vendor)&&/Version\/([6-9]\d*|[1-5]\d+)/.test(navigator.userAgent);return e}(),PDFEMB_NS={};jQuery(document).ready(function(e){var t,n=(t=document.createElement("canvas").getContext("2d"),(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1));PDFEMB_NS.PIXEL_RATIO=n,createHiDPICanvas=function(e,t,a){a||(a=n);var i=document.createElement("canvas");return i.width=e*a,i.height=t*a,i.style.width=e+"px",i.style.height=t+"px",i.getContext("2d").setTransform(a,0,0,a,0,0),i};var a=0,i=0;!function(){var e=document.createElement("div");e.style.width="100px",e.style.height="100px",e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e),a=e.offsetWidth-e.clientWidth,i=e.offsetHeight-e.clientHeight,document.body.removeChild(e)}(),PDFEMB_NS.vscrollbarwidth=a,PDFEMB_NS.hscrollbarheight=i;var o=function(e,t,n){this.pdfDoc=e,this.divContainer=t,this.showIsSecure=n,this.initialResize=!1,this.firstPageHeight=this.firstPageWidth=0,this.invalidationRound=1,this.currentPageNum=0,this.zoom=100,this.toZoom=this.fromZoom=0};o.prototype.setup=function(){var t=this,n=this.divContainer,a=this.pdfDoc,i=this.showIsSecure;this.numPages=a.numPages;var o=n.data("scrollbar");this.vscrollbar="both"==o||"vertical"==o,this.hscrollbar="both"==o||"horizontal"==o,o="overflow-y: "+(this.vscrollbar?"scroll":"hidden")+"; ",o+="overflow-x: "+(this.hscrollbar?"scroll":"hidden")+"; ",n.empty().append(e("<div></div>",{class:"pdfemb-pagescontainer",style:o})),n.data("pdfDoc",a),"top"!=(o=n.data("toolbar"))&&"both"!=o||this.addToolbar(!0,"on"==n.data("toolbar-fixed"),i),"bottom"!=o&&"both"!=o||this.addToolbar(!1,"on"==n.data("toolbar-fixed"),i),t.annotationsLayerFactory=void 0!==PDFEMB_NS.pdfembPremiumAnnotationsLayerFactory?new PDFEMB_NS.pdfembPremiumAnnotationsLayerFactory:{createAnnotationsLayerBuilder:function(e,t){return null}},t.annotationLayerFactories=[],n.on("pdfembGotopage",function(e,n){n>this.numPages||0>=n||(t.gotoPage(n),t.jumpToTop())}),n.on("pdfembGotoHash",function(e,n){var a;n.dest&&(dest=n.dest,"string"==typeof dest?(destString=dest,a=t.pdfDoc.getDestination(dest)):a=Promise.resolve(dest),a.then(function(e){e instanceof Array&&!(1>e.length)&&t.pdfDoc.getPageIndex(e[0]).then(function(e){(e+=1)>t.numPages||0>=e||t.currentPageNum==e||(t.gotoPage(e),t.jumpToTop())})}))}),n.on("pdfembGotoAction",function(e,n){var a=t.currentPageNum,i=a;switch(n){case"GoBack":--i;break;case"GoForward":case"NextPage":++i;break;case"PrevPage":--i;break;case"LastPage":i=t.pageCount;break;case"FirstPage":i=1}i==a||i>t.pageCount||0>=i||t.gotoPage(i)}),n.on("pdfembMagnify",function(e){t.magnifyEvent(e)}),n.on("pdfembChangeZoom",function(e,n){t.changeZoom(n)}),this.pageCount=a.numPages,(!n.data("pagenum")||1>n.data("pagenum")||n.data("pagenum")>this.pageCount)&&n.data("pagenum",1),n.data("showIsSecure",this.showIsSecure),n.data("pageNumPending",null),a="on"==n.data("fullScreen")?parseInt(n.data("startfpzoom")):parseInt(n.data("startzoom")),(isNaN(a)||20>a||800<a)&&(a=100),this.zoom=a,100!=a&&n.find("span.pdfemb-zoom").text(a+"%"),n.find("span.pdfemb-page-count").text(this.pageCount),this.gotoPage(n.data("pagenum"))},o.prototype.checkForResize=function(){var t=this,n=t.divContainer,a=e(window).height(),i=e(window).width(),o=n.data("checked-window-height"),s=n.data("checked-window-width");o&&s||(n.data("checked-window-height",a),n.data("checked-window-width",i)),o==a&&s==i||(t.resizeViewer(),t.resizeInnerDivs(),t.invalidateAllPages(),t.renderPage(this.currentPageNum),t.prerenderNearbyPages(this.currentPageNum),t.pdfembMakeMobile(),n.data("checked-window-height",a),n.data("checked-window-width",i)),"true"!=n.data("fullScreenClosed")&&setTimeout(function(){t.checkForResize()},100)},o.prototype.setSizesBasedOnPage=function(e){e=e.getViewport(1),this.pageWidth=e.width,this.pageHeight=e.height,(0>=this.pageWidth||0>=this.pageHeight)&&this.divContainer.empty().append(document.createTextNode(pdfemb_trans.objectL10n.widthheightinvalid))},o.prototype.createPageInnerDivs=function(){for(var t=this.divContainer.find(".pdfemb-pagescontainer"),n=1;n<=this.pageCount;++n){var a=t.find(".pdfemb-inner-div.pdfemb-page"+n);0==a.length&&((a=e("<div></div>",{class:"pdfemb-inner-div pdfemb-page"+n})).data("pageNum",n),t.append(a))}this.resizeInnerDivs()},o.prototype.addGrabToPan=function(){var t=this,n=t.divContainer,a=n.find("div.pdfemb-pagescontainer"),i=new pdfembGrabToPan({element:a[0]});n.data("grabtopan",i),a.on("scroll",function(e){var n=t.getTopVisiblePageNum();n!=t.currentPageNum&&(t.currentPageNum=n,t.updatePageNumDisplay(n),t.renderPage(n,!1),t.prerenderNearbyPages(n),t.deallocateFarAwayPages(n)),e.stopPropagation()}),e(window).resize(function(){setTimeout(function(){t.checkForResize()},100)})},o.prototype.resizeInnerDivs=function(t){var n=this,a=n.wantCanvasWidth,i=n.wantCanvasHeight,o=n.wantHeight,s=this.divContainer.find(".pdfemb-pagescontainer").find(".pdfemb-inner-div");t&&(s=s.filter(".pdfemb-page"+t));var r=0;s.each(function(o,d){var h=e(d),p=h.data("widthfactor"),c=h.data("heightfactor");p||(p=1),c||(c=1),h.data("invalidation-round",this.invalidationRound-1),h.css("width",a*p);var m=i*c+(t==n.numPages||!t&&o==s.length-1?0:2);h.css("height",m),r+=m,(h=h.find(".pdfemb-the-canvas")).css("width",a*p),h.css("height",i*c)});var d=0;!t&&r<o&&(d=(o-r)/2),s.first().css("top",d)},o.prototype.invalidateAllPages=function(){++this.invalidationRound},o.prototype.prerenderNearbyPages=function(e){var t=3,n=2;for(100>this.zoom&&(t*=Math.min(Math.ceil(100/this.zoom),10),n*=Math.min(Math.ceil(100/this.zoom),10)),n=Math.max(1,e-n);n<=Math.min(e+t,this.numPages);++n)n!=e&&this.renderPage(n,!1)},o.prototype.deallocateFarAwayPages=function(e){var t=50,n=50;100>this.zoom&&(t+=i=Math.min(Math.ceil(100/this.zoom),50),n+=i);var a,i=function(e){var t=(e=o.find(".pdfemb-page"+e)).find(".pdfemb-the-canvas");t.length&&(t.remove(),e.data("invalidation-round",0))},o=this.divContainer.find("div.pdfemb-pagescontainer");for(a=3;a<e-n;++a)i(a);for(a=e+t;a<this.numPages;++a)i(a)},o.prototype.resizeViewer=function(){var e=this.pageWidth,t=this.pageHeight,o=this.divContainer,s=o.find("div.pdfemb-pagescontainer"),r=s[0].scrollLeft,d=s[0].scrollTop,h=o.parent().width(),p=e;"max"==o.data("width")?p=h:"auto"==o.data("width")?p=e:(p=parseInt(o.data("width"),10),(isNaN(p)||0>=p)&&(p=h)),0>=p&&(p=e),p>h&&0<h&&(p=h),t=t*p/e;var c=this.pdfembWantMobile(p,f);this.wantMobile=c;var m=o.find("div.pdfemb-toolbar-fixed"),l=c?0:m.length,f=parseInt(o.data("height"),10);(isNaN(f)||0>=f||f>t)&&(f="auto"==o.data("height")?o.parent().height()-l*m.height():t),this.userHeight=f,p=Math.floor(p),t=Math.floor(t),h=100;var u=p-(this.vscrollbar?a:0),g=t-(this.hscrollbar?i:0),v=1;c||16777e3<(u=u*(h=this.zoom)/100)*(g=g*h/100)*n*n&&(v=16777e3/(u*g*n*n)),p!=o.width()&&o.width(p),o.height()!=f&&o.height(f+l*m.height()),s.width(p),s.height(f),o=m.filter(".pdfemb-toolbar-top"),0<l&&s.css("top",o.height()),e=(p-(this.vscrollbar?a:0))/e,0!=this.fromZoom&&0!=this.toZoom&&(s[0].scrollLeft=this.toZoom/this.fromZoom*(r+this.pccentreLeft)-this.pccentreLeft,s[0].scrollTop=this.toZoom/this.fromZoom*(d+this.pccentreTop)-this.pccentreTop),this.toZoom=this.fromZoom=0,this.wantCanvasWidth=u,this.wantCanvasHeight=g,this.reducefactor=v,this.wantWidth=p,this.wantHeight=t,this.canvasscale=e,this.zoom=h},o.prototype.getTopVisiblePageNum=function(){var e=this.divContainer.find(".pdfemb-pagescontainer").find(".pdfemb-inner-div:visible");return 0<e.length?e.first().data("pageNum"):1},o.prototype.gotoPage=function(e){0>=e||e>this.pageCount||(this.renderPage(e,!0),this.currentPageNum=e,this.updatePageNumDisplay(e),this.prerenderNearbyPages(e),this.deallocateFarAwayPages(e))},o.prototype.updatePageNumDisplay=function(t){var n=this.divContainer;n.find("div.pdfemb-toolbar .pdfemb-page-num").each(function(n,a){var i=e(a);i.is("span")?i.text(t):i.val(t)}),t<this.pageCount?n.find(".pdfemb-next").removeAttr("disabled").removeClass("pdfemb-btndisabled"):n.find(".pdfemb-next").attr("disabled","disabled").addClass("pdfemb-btndisabled"),1<t?n.find(".pdfemb-prev").removeAttr("disabled").removeClass("pdfemb-btndisabled"):n.find(".pdfemb-prev").attr("disabled","disabled").addClass("pdfemb-btndisabled")},o.prototype.scrollPageIntoView=function(e){var t=this.divContainer.find(".pdfemb-pagescontainer"),n=t.find(".pdfemb-page"+e);t.find(".pdfemb-inner-div").not(".pdfemb-page"+e).hide(),n.show(),t[0].scrollTop=0},o.prototype.renderPage=function(t,a){var i=this,o=i.invalidationRound,s=this.divContainer,r=s.data("pdfDoc"),d=s.find(".pdfemb-pagescontainer"),h=d.find(".pdfemb-page"+t);if(h.length&&h.data("invalidation-round")>=o)a&&i.scrollPageIntoView(t);else{var p=h.data("pending-drawing-round");p>=o||(0<p&&p<o?h.data("pending-drawing-round",o):(h.data("pending-drawing-round",o),r.getPage(t).then(function(r){i.initialResize||(i.initialResize=!0,i.setSizesBasedOnPage(r),i.resizeViewer(),i.createPageInnerDivs(),i.addGrabToPan(),i.pdfembMakeMobile()),0==h.length&&(h=d.find(".pdfemb-page"+t));var c=h.data("widthfactor"),m=h.data("heightfactor");c&&m||(c=(g=r.getViewport(1)).width/i.pageWidth,m=g.height/i.pageHeight,h.data("widthfactor",c),h.data("heightfactor",m),1==c&&1==m||i.resizeInnerDivs(t));var l=h.find(".pdfemb-the-canvas");0==l.length&&(l=e("<canvas></canvas>",{class:"pdfemb-the-canvas"}),h.append(l)),a&&i.scrollPageIntoView(t);var f=i.wantCanvasWidth,u=i.wantCanvasHeight,g=i.canvasscale,v=i.zoom;l.css("width",f*c),l.css("height",u*m),i.wantMobile?s.data("grabtopan").deactivate():s.data("grabtopan").activate();var b=r.getViewport(g*v/100),w=document.createElement("canvas");w.width=f*n*i.reducefactor*c,w.height=u*n*i.reducefactor*m;var P=w.getContext("2d"),y=function(){l[0].width=f*n*i.reducefactor*c,l[0].height=u*n*i.reducefactor*m,i.preRenderCanvas(P,t,v);var e=P.getImageData(0,0,w.width,w.height);l[0].getContext("2d").putImageData(e,0,0),e=null,void 0===i.annotationLayerFactories[t]?(e=i.annotationsLayerFactory.createAnnotationsLayerBuilder(h[0],r),i.annotationLayerFactories[t]=e):e=i.annotationLayerFactories[t],null!=e&&e.setupAnnotations(b,i.divContainer.data("newwindow")),h.data("invalidation-round",o),p=h.data("pending-drawing-round"),h.data("pending-drawing-round",""),p>o&&i.renderPage(t,!1)};r.render({canvasContext:P,viewport:b,transform:[n*i.reducefactor,0,0,n*i.reducefactor,0,0]}).promise.then(function(){"requestAnimationFrame"in window?window.requestAnimationFrame(y):setTimeout(y,1)})})))}},o.prototype.changeZoom=function(e){var t=this.divContainer,n=this.zoom;this.zoom=e=n+e,t.find("span.pdfemb-zoom").text(e+"%"),this.fromZoom=n,this.toZoom=e,t=t.find(".pdfemb-pagescontainer"),this.pccentreLeft=t.width()/2,this.pccentreTop=t.height()/2,this.resizeViewer(),this.resizeInnerDivs(),this.invalidateAllPages(),this.renderPage(this.currentPageNum),this.prerenderNearbyPages(this.currentPageNum)},o.prototype.queueRenderPage=function(e,t){this.renderPage(e,t)},o.prototype.addToolbar=function(t,n,a){var i=this.divContainer,o=this,s=e("<div></div>",{class:"pdfemb-toolbar pdfemb-toolbar"+(n?"-fixed":"-hover")+" "+(t?" pdfemb-toolbar-top":"pdfemb-toolbar-bottom")}),r=e('<button class="pdfemb-prev" title="'+pdfemb_trans.objectL10n.prev+'" type="button"></button>');s.append(r);var d=e('<button class="pdfemb-next" title="'+pdfemb_trans.objectL10n.next+'" type="button"></button>');s.append(d),s.append(e('<div class="pdfemb-page-area">'+pdfemb_trans.objectL10n.page+' <span class="pdfemb-page-num">0</span> / <span class="pdfemb-page-count"></span></div>'));var h=e('<button class="pdfemb-zoomout" title="'+pdfemb_trans.objectL10n.zoomout+'" type="button"></button>');s.append(h);var p=e('<button class="pdfemb-zoomin" title="'+pdfemb_trans.objectL10n.zoomin+'" type="button"></button>');s.append(p),s.append(e("<div>"+pdfemb_trans.objectL10n.zoom+' <span class="pdfemb-zoom">100%</span></div>')),a&&s.append(e("<div>"+pdfemb_trans.objectL10n.secure+"</div>")),t?i.prepend(s):i.append(s),r.on("click",function(e){1>=o.currentPageNum||(o.gotoPage(o.currentPageNum-1),o.jumpToTop())}),d.on("click",function(e){o.currentPageNum>=o.pageCount||0==o.currentPageNum||(o.gotoPage(o.currentPageNum+1),o.jumpToTop())}),p.on("click",function(e){800<=o.zoom||o.changeZoom(10)}),h.on("click",function(e){20>=o.zoom||o.changeZoom(-10)}),o.addMoreToolbar(s),n||(i.on("mouseenter",function(e){!0!==(e=i.find("div.pdfemb-toolbar-hover")).data("no-hover")&&e.show()}),i.on("mouseleave",function(e){i.find("div.pdfemb-toolbar-hover").hide()}),i.on("pdfembTouchTapped",function(e){if(e.stopPropagation(),e.preventDefault(),!o.locktaps){o.locktaps=!0;var t=(e=i.find("div.pdfemb-toolbar-hover")).is(":visible");1==e.data("no-hover")&&(t=!0),t?e.hide():e.show(),setTimeout(function(){o.locktaps=!1},250)}})),"on"==pdfemb_trans.poweredby&&s.append(e("<div class='poweredby'>Powered by </div>",{class:"pdfemb-poweredby"}).append(e('<a href="https://wp-pdf.com/?utm_source=Poweredby&utm_medium=freemium&utm_campaign=Freemium" target="_blank">wp-pdf.com</a>')))},o.prototype.magnifyEvent=function(e){var t=e.originalEvent.magnification;if(-1==t)this.resizeViewer(),this.resizeInnerDivs(),this.invalidateAllPages(),this.renderPage(this.getTopVisiblePageNum());else{var n=this.divContainer.find(".pdfemb-pagescontainer").offset();this.magnifyZoom(t,e.originalEvent.centreLeft-n.left,e.originalEvent.centreTop-n.top)}},o.prototype.magnifyZoom=function(e,t,n){var a=this.zoom;20>(e=Math.floor(a*e))&&(e=20),800<e&&(e=800),this.zoom=e,this.divContainer.find("span.pdfemb-zoom").text(e+"%"),this.fromZoom=a,this.toZoom=e,this.pccentreLeft=t,this.pccentreTop=n,this.resizeViewer(),this.resizeInnerDivs(),this.invalidateAllPages()},o.prototype.pdfembWantMobile=function(e,t){return!1},o.prototype.pdfembMakeMobile=function(){},o.prototype.addMoreToolbar=function(e){},o.prototype.jumpToTop=function(){},o.prototype.preRenderCanvas=function(e,t,n){},PDFEMB_NS.pdfembPagesViewer=o}),jQuery(document).ready(function(e){var t=PDFEMB_NS.pdfembPagesViewer;(e=function(){t.apply(this,arguments)}).prototype=new t,PDFEMB_NS.pdfembPagesViewerUsable=e}),PDFEMB_NS.pdfembGetPDF=function(e,t){t(e,!1)},jQuery(document).ready(function(e){if(e.fn.pdfEmbedder=function(t){return this.each(function(n,a){var i,o=e(a);if(o.is("a")){var s=o.data();(i=e("<div></div>",{class:o.attr("class"),style:o.attr("style")})).data(e.extend({"pdf-url":o.attr("href")},s)),o.replaceWith(i)}else i=o;i.append(e("<div></div>",{class:"pdfemb-loadingmsg"}).append(document.createTextNode(pdfemb_trans.objectL10n.loading))),"on"==i.data("disablerightclick")&&i.bind("contextmenu",function(e){e.preventDefault()});var r=function(e,t){new PDFEMB_NS.pdfembPagesViewerUsable(e,i,t).setup()};if(i.data("pdfDoc"))r(i.data("pdfDoc"),i.data("showIsSecure"));else{var d=i.data("pdf-url");PDFEMB_NS.pdfembGetPDF(d,function(n,a){null!==n?pdfjsLib.getDocument(n,t).promise.then(function(e){r(e,a)},function(t){var n=document.createTextNode(t.message);"UnknownErrorException"==t.name&&"Failed to fetch"==t.message&&(n=e("<span></span>").append(document.createTextNode(t.message+" "+pdfemb_trans.objectL10n.domainerror+" ")).append(e('<a href="https://wp-pdf.com/kb/error-url-to-the-pdf-file-must-be-on-exactly-the-same-domain-as-the-current-web-page/" target="_blank">'+pdfemb_trans.objectL10n.clickhereinfo+"</a>"))),i.empty().append(e("<div></div>",{class:"pdfemb-errormsg"}).append(n))}):i.empty().append(e("<div></div>",{class:"pdfemb-errormsg"}).append(msgnode=e("<span></span>").append(document.createTextNode("Failed to load and decrypt PDF"))))})}}),this},"undefined"===pdfemb_trans.cmap_url)var t="";else t=pdfemb_trans.cmap_url;e(".pdfemb-viewer").pdfEmbedder(t)});
|
js/all-pdfemb-basic.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
var pdfembGrabToPan=function(){function e(e){this.element=e.element,this.document=e.element.ownerDocument,"function"==typeof e.ignoreTarget&&(this.ignoreTarget=e.ignoreTarget),this.onActiveChanged=e.onActiveChanged,this.activate=this.activate.bind(this),this.deactivate=this.deactivate.bind(this),this.toggle=this.toggle.bind(this),this._onmousedown=this._onmousedown.bind(this),this._onmousemove=this._onmousemove.bind(this),this._onmousewheel=this._onmousewheel.bind(this),this._endPan=this._endPan.bind(this),(this.overlay=document.createElement("div")).className="grab-to-pan-grabbing"}var t;e.prototype={CSS_CLASS_GRAB:"grab-to-pan-grab",activate:function(){!this.active&&(this.active=!0,this.element.addEventListener("mousedown",this._onmousedown,!0),this.element.addEventListener("mousewheel",this._onmousewheel),this.element.addEventListener("wheel",this._onmousewheel),this.element.addEventListener("DOMMouseScroll",this._onmousewheel),this.element.classList.add(this.CSS_CLASS_GRAB),this.onActiveChanged)&&this.onActiveChanged(!0)},deactivate:function(){this.active&&(this.active=!1,this.element.removeEventListener("mousedown",this._onmousedown,!0),this._endPan(),this.element.classList.remove(this.CSS_CLASS_GRAB),this.onActiveChanged)&&this.onActiveChanged(!1)},toggle:function(){this.active?this.deactivate():this.activate()},ignoreTarget:function(e){return e[t]("a[href], a[href] *, input, textarea, button, button *, select, option")},_onmousedown:function(e){if(0===e.button&&!this.ignoreTarget(e.target)){this.scrollLeftStart=this.element.scrollLeft,this.scrollTopStart=this.element.scrollTop,this.clientXStart=e.clientX,this.clientYStart=e.clientY,this.document.addEventListener("mousemove",this._onmousemove,!0),this.document.addEventListener("mouseup",this._endPan,!0),this.element.addEventListener("scroll",this._endPan,!0),e.preventDefault(),e.stopPropagation(),this.document.documentElement.classList.add(this.CSS_CLASS_GRABBING);var t=document.activeElement;t&&!t.contains(e.target)&&t.blur()}},_onmousemove:function(e){var t;this.element.removeEventListener("scroll",this._endPan,!0),(t="buttons"in e&&n?!(1|e.buttons):i||o?0===e.which:void 0)?this._endPan():(t=e.clientX-this.clientXStart,this.element.scrollTop=this.scrollTopStart-(e.clientY-this.clientYStart),this.element.scrollLeft=this.scrollLeftStart-t,this.overlay.parentNode||document.body.appendChild(this.overlay))},_onmousewheel:function(e){this.element.removeEventListener("scroll",this._endPan,!0);var t=.5;e.deltaMode&&(1==e.deltaMode&&(t=10),2==e.deltaMode&&(t=1e3));var n=e.deltaY?-e.deltaY:e.wheelDelta?e.wheelDelta:-e.detail;if(this.scrollLeftStart=this.element.scrollLeft,this.scrollTopStart=this.element.scrollTop,t*=n,this.element.scrollTop=this.scrollTopStart-t,this.overlay.parentNode||document.body.appendChild(this.overlay),this.element.scrollTop!=this.scrollTopStart||0==t)return e.preventDefault(),!1},_endPan:function(){this.element.removeEventListener("scroll",this._endPan,!0),this.document.removeEventListener("mousemove",this._onmousemove,!0),this.document.removeEventListener("mouseup",this._endPan,!0),this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)}},["webkitM","mozM","msM","oM","m"].some(function(e){return(e+="atches")in document.documentElement&&(t=e),(e+="Selector")in document.documentElement&&(t=e),t});var n=!document.documentMode||9<document.documentMode,a=window.chrome,i=a&&(a.webstore||a.app),o=/Apple/.test(navigator.vendor)&&/Version\/([6-9]\d*|[1-5]\d+)/.test(navigator.userAgent);return e}(),PDFEMB_NS={};jQuery(document).ready(function(e){var t,n=(t=document.createElement("canvas").getContext("2d"),(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1));PDFEMB_NS.PIXEL_RATIO=n,createHiDPICanvas=function(e,t,a){a||(a=n);var i=document.createElement("canvas");return i.width=e*a,i.height=t*a,i.style.width=e+"px",i.style.height=t+"px",i.getContext("2d").setTransform(a,0,0,a,0,0),i};var a=0,i=0;!function(){var e=document.createElement("div");e.style.width="100px",e.style.height="100px",e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e),a=e.offsetWidth-e.clientWidth,i=e.offsetHeight-e.clientHeight,document.body.removeChild(e)}(),PDFEMB_NS.vscrollbarwidth=a,PDFEMB_NS.hscrollbarheight=i;var o=function(e,t,n){this.pdfDoc=e,this.divContainer=t,this.showIsSecure=n,this.initialResize=!1,this.firstPageHeight=this.firstPageWidth=0,this.invalidationRound=1,this.currentPageNum=0,this.zoom=100,this.toZoom=this.fromZoom=0};o.prototype.setup=function(){var t=this,n=this.divContainer,a=this.pdfDoc,i=this.showIsSecure;this.numPages=a.numPages;var o=n.data("scrollbar");this.vscrollbar="both"==o||"vertical"==o,this.hscrollbar="both"==o||"horizontal"==o,o="overflow-y: "+(this.vscrollbar?"scroll":"hidden")+"; ",o+="overflow-x: "+(this.hscrollbar?"scroll":"hidden")+"; ",n.empty().append(e("<div></div>",{class:"pdfemb-pagescontainer",style:o})),n.data("pdfDoc",a),"top"!=(o=n.data("toolbar"))&&"both"!=o||this.addToolbar(!0,"on"==n.data("toolbar-fixed"),i),"bottom"!=o&&"both"!=o||this.addToolbar(!1,"on"==n.data("toolbar-fixed"),i),t.annotationsLayerFactory=void 0!==PDFEMB_NS.pdfembPremiumAnnotationsLayerFactory?new PDFEMB_NS.pdfembPremiumAnnotationsLayerFactory:{createAnnotationsLayerBuilder:function(e,t){return null}},t.annotationLayerFactories=[],n.on("pdfembGotopage",function(e,n){n>this.numPages||0>=n||(t.gotoPage(n),t.jumpToTop())}),n.on("pdfembGotoHash",function(e,n){var a;n.dest&&(dest=n.dest,"string"==typeof dest?(destString=dest,a=t.pdfDoc.getDestination(dest)):a=Promise.resolve(dest),a.then(function(e){e instanceof Array&&!(1>e.length)&&t.pdfDoc.getPageIndex(e[0]).then(function(e){(e+=1)>t.numPages||0>=e||t.currentPageNum==e||(t.gotoPage(e),t.jumpToTop())})}))}),n.on("pdfembGotoAction",function(e,n){var a=t.currentPageNum,i=a;switch(n){case"GoBack":--i;break;case"GoForward":case"NextPage":++i;break;case"PrevPage":--i;break;case"LastPage":i=t.pageCount;break;case"FirstPage":i=1}i==a||i>t.pageCount||0>=i||t.gotoPage(i)}),n.on("pdfembMagnify",function(e){t.magnifyEvent(e)}),n.on("pdfembChangeZoom",function(e,n){t.changeZoom(n)}),this.pageCount=a.numPages,(!n.data("pagenum")||1>n.data("pagenum")||n.data("pagenum")>this.pageCount)&&n.data("pagenum",1),n.data("showIsSecure",this.showIsSecure),n.data("pageNumPending",null),a="on"==n.data("fullScreen")?parseInt(n.data("startfpzoom")):parseInt(n.data("startzoom")),(isNaN(a)||20>a||500<a)&&(a=100),this.zoom=a,100!=a&&n.find("span.pdfemb-zoom").text(a+"%"),n.find("span.pdfemb-page-count").text(this.pageCount),this.gotoPage(n.data("pagenum"))},o.prototype.checkForResize=function(){var t=this,n=t.divContainer,a=e(window).height(),i=e(window).width(),o=n.data("checked-window-height"),s=n.data("checked-window-width");o&&s||(n.data("checked-window-height",a),n.data("checked-window-width",i)),o==a&&s==i||(t.resizeViewer(),t.resizeInnerDivs(),t.invalidateAllPages(),t.renderPage(this.currentPageNum),t.prerenderNearbyPages(this.currentPageNum),t.pdfembMakeMobile(),n.data("checked-window-height",a),n.data("checked-window-width",i)),"true"!=n.data("fullScreenClosed")&&setTimeout(function(){t.checkForResize()},100)},o.prototype.setSizesBasedOnPage=function(e){e=e.getViewport(1),this.pageWidth=e.width,this.pageHeight=e.height,(0>=this.pageWidth||0>=this.pageHeight)&&this.divContainer.empty().append(document.createTextNode(pdfemb_trans.objectL10n.widthheightinvalid))},o.prototype.createPageInnerDivs=function(){for(var t=this.divContainer.find(".pdfemb-pagescontainer"),n=1;n<=this.pageCount;++n){var a=t.find(".pdfemb-inner-div.pdfemb-page"+n);0==a.length&&((a=e("<div></div>",{class:"pdfemb-inner-div pdfemb-page"+n})).data("pageNum",n),t.append(a))}this.resizeInnerDivs()},o.prototype.addGrabToPan=function(){var t=this,n=t.divContainer,a=n.find("div.pdfemb-pagescontainer"),i=new pdfembGrabToPan({element:a[0]});n.data("grabtopan",i),a.on("scroll",function(e){var n=t.getTopVisiblePageNum();n!=t.currentPageNum&&(t.currentPageNum=n,t.updatePageNumDisplay(n),t.renderPage(n,!1),t.prerenderNearbyPages(n),t.deallocateFarAwayPages(n)),e.stopPropagation()}),e(window).resize(function(){setTimeout(function(){t.checkForResize()},100)})},o.prototype.resizeInnerDivs=function(t){var n=this,a=n.wantCanvasWidth,i=n.wantCanvasHeight,o=n.wantHeight,s=this.divContainer.find(".pdfemb-pagescontainer").find(".pdfemb-inner-div");t&&(s=s.filter(".pdfemb-page"+t));var r=0;s.each(function(o,d){var h=e(d),p=h.data("widthfactor"),c=h.data("heightfactor");p||(p=1),c||(c=1),h.data("invalidation-round",this.invalidationRound-1),h.css("width",a*p);var m=i*c+(t==n.numPages||!t&&o==s.length-1?0:2);h.css("height",m),r+=m,(h=h.find(".pdfemb-the-canvas")).css("width",a*p),h.css("height",i*c)});var d=0;!t&&r<o&&(d=(o-r)/2),s.first().css("top",d)},o.prototype.invalidateAllPages=function(){++this.invalidationRound},o.prototype.prerenderNearbyPages=function(e){var t=3,n=2;for(100>this.zoom&&(t*=Math.min(Math.ceil(100/this.zoom),10),n*=Math.min(Math.ceil(100/this.zoom),10)),n=Math.max(1,e-n);n<=Math.min(e+t,this.numPages);++n)n!=e&&this.renderPage(n,!1)},o.prototype.deallocateFarAwayPages=function(e){var t=50,n=50;if(100>this.zoom)t=t+(i=Math.min(Math.ceil(100/this.zoom),50)),n=n+i;var a,i=function(e){var t=(e=o.find(".pdfemb-page"+e)).find(".pdfemb-the-canvas");t.length&&(t.remove(),e.data("invalidation-round",0))},o=this.divContainer.find("div.pdfemb-pagescontainer");for(a=3;a<e-n;++a)i(a);for(a=e+t;a<this.numPages;++a)i(a)},o.prototype.resizeViewer=function(){var e=this.pageWidth,t=this.pageHeight,o=this.divContainer,s=o.find("div.pdfemb-pagescontainer"),r=s[0].scrollLeft,d=s[0].scrollTop,h=o.parent().width(),p=e;"max"==o.data("width")?p=h:"auto"==o.data("width")?p=e:(p=parseInt(o.data("width"),10),(isNaN(p)||0>=p)&&(p=h)),0>=p&&(p=e),p>h&&0<h&&(p=h);t=t*p/e;var c=this.pdfembWantMobile(p,f);this.wantMobile=c;var m=o.find("div.pdfemb-toolbar-fixed"),l=c?0:m.length,f=parseInt(o.data("height"),10);(isNaN(f)||0>=f||f>t)&&(f="auto"==o.data("height")?o.parent().height()-l*m.height():t),this.userHeight=f;p=Math.floor(p),t=Math.floor(t),h=100;var u=p-(this.vscrollbar?a:0),g=t-(this.hscrollbar?i:0),v=1;c||16777e3<(u=u*(h=this.zoom)/100)*(g=g*h/100)*n*n&&(v=16777e3/(u*g*n*n)),p!=o.width()&&o.width(p),o.height()!=f&&o.height(f+l*m.height()),s.width(p),s.height(f),o=m.filter(".pdfemb-toolbar-top"),0<l&&s.css("top",o.height()),e=(p-(this.vscrollbar?a:0))/e,0!=this.fromZoom&&0!=this.toZoom&&(s[0].scrollLeft=this.toZoom/this.fromZoom*(r+this.pccentreLeft)-this.pccentreLeft,s[0].scrollTop=this.toZoom/this.fromZoom*(d+this.pccentreTop)-this.pccentreTop),this.toZoom=this.fromZoom=0,this.wantCanvasWidth=u,this.wantCanvasHeight=g,this.reducefactor=v,this.wantWidth=p,this.wantHeight=t,this.canvasscale=e,this.zoom=h},o.prototype.getTopVisiblePageNum=function(){var e=this.divContainer.find(".pdfemb-pagescontainer").find(".pdfemb-inner-div:visible");return 0<e.length?e.first().data("pageNum"):1},o.prototype.gotoPage=function(e){0>=e||e>this.pageCount||(this.renderPage(e,!0),this.currentPageNum=e,this.updatePageNumDisplay(e),this.prerenderNearbyPages(e),this.deallocateFarAwayPages(e))},o.prototype.updatePageNumDisplay=function(t){var n=this.divContainer;n.find("div.pdfemb-toolbar .pdfemb-page-num").each(function(n,a){var i=e(a);i.is("span")?i.text(t):i.val(t)}),t<this.pageCount?n.find(".pdfemb-next").removeAttr("disabled").removeClass("pdfemb-btndisabled"):n.find(".pdfemb-next").attr("disabled","disabled").addClass("pdfemb-btndisabled"),1<t?n.find(".pdfemb-prev").removeAttr("disabled").removeClass("pdfemb-btndisabled"):n.find(".pdfemb-prev").attr("disabled","disabled").addClass("pdfemb-btndisabled")},o.prototype.scrollPageIntoView=function(e){var t=this.divContainer.find(".pdfemb-pagescontainer"),n=t.find(".pdfemb-page"+e);t.find(".pdfemb-inner-div").not(".pdfemb-page"+e).hide(),n.show(),t[0].scrollTop=0},o.prototype.renderPage=function(t,a){var i=this,o=i.invalidationRound,s=this.divContainer,r=s.data("pdfDoc"),d=s.find(".pdfemb-pagescontainer"),h=d.find(".pdfemb-page"+t);if(h.length&&h.data("invalidation-round")>=o)a&&i.scrollPageIntoView(t);else{var p=h.data("pending-drawing-round");p>=o||(0<p&&p<o?h.data("pending-drawing-round",o):(h.data("pending-drawing-round",o),r.getPage(t).then(function(r){i.initialResize||(i.initialResize=!0,i.setSizesBasedOnPage(r),i.resizeViewer(),i.createPageInnerDivs(),i.addGrabToPan(),i.pdfembMakeMobile()),0==h.length&&(h=d.find(".pdfemb-page"+t));var c=h.data("widthfactor"),m=h.data("heightfactor");if(!c||!m){c=(g=r.getViewport(1)).width/i.pageWidth,m=g.height/i.pageHeight;h.data("widthfactor",c),h.data("heightfactor",m),1==c&&1==m||i.resizeInnerDivs(t)}var l=h.find(".pdfemb-the-canvas");0==l.length&&(l=e("<canvas></canvas>",{class:"pdfemb-the-canvas"}),h.append(l)),a&&i.scrollPageIntoView(t);var f=i.wantCanvasWidth,u=i.wantCanvasHeight,g=i.canvasscale,v=i.zoom;l.css("width",f*c),l.css("height",u*m),i.wantMobile?s.data("grabtopan").deactivate():s.data("grabtopan").activate();var b=r.getViewport(g*v/100),w=document.createElement("canvas");w.width=f*n*i.reducefactor*c,w.height=u*n*i.reducefactor*m;var P=w.getContext("2d"),y=function(){l[0].width=f*n*i.reducefactor*c,l[0].height=u*n*i.reducefactor*m,i.preRenderCanvas(P,t,v);var e=P.getImageData(0,0,w.width,w.height);l[0].getContext("2d").putImageData(e,0,0),e=null,void 0===i.annotationLayerFactories[t]?(e=i.annotationsLayerFactory.createAnnotationsLayerBuilder(h[0],r),i.annotationLayerFactories[t]=e):e=i.annotationLayerFactories[t],null!=e&&e.setupAnnotations(b,i.divContainer.data("newwindow")),h.data("invalidation-round",o),p=h.data("pending-drawing-round"),h.data("pending-drawing-round",""),p>o&&i.renderPage(t,!1)};r.render({canvasContext:P,viewport:b,transform:[n*i.reducefactor,0,0,n*i.reducefactor,0,0]}).promise.then(function(){"requestAnimationFrame"in window?window.requestAnimationFrame(y):setTimeout(y,1)})})))}},o.prototype.changeZoom=function(e){var t=this.divContainer,n=this.zoom;this.zoom=e=n+e,t.find("span.pdfemb-zoom").text(e+"%"),this.fromZoom=n,this.toZoom=e,t=t.find(".pdfemb-pagescontainer"),this.pccentreLeft=t.width()/2,this.pccentreTop=t.height()/2,this.resizeViewer(),this.resizeInnerDivs(),this.invalidateAllPages(),this.renderPage(this.currentPageNum),this.prerenderNearbyPages(this.currentPageNum)},o.prototype.queueRenderPage=function(e,t){this.renderPage(e,t)},o.prototype.addToolbar=function(t,n,a){var i=this.divContainer,o=this,s=e("<div></div>",{class:"pdfemb-toolbar pdfemb-toolbar"+(n?"-fixed":"-hover")+" "+(t?" pdfemb-toolbar-top":"pdfemb-toolbar-bottom")}),r=e('<button class="pdfemb-prev" title="'+pdfemb_trans.objectL10n.prev+'" type="button"></button>');s.append(r);var d=e('<button class="pdfemb-next" title="'+pdfemb_trans.objectL10n.next+'" type="button"></button>');s.append(d),s.append(e('<div class="pdfemb-page-area">'+pdfemb_trans.objectL10n.page+' <span class="pdfemb-page-num">0</span> / <span class="pdfemb-page-count"></span></div>'));var h=e('<button class="pdfemb-zoomout" title="'+pdfemb_trans.objectL10n.zoomout+'" type="button"></button>');s.append(h);var p=e('<button class="pdfemb-zoomin" title="'+pdfemb_trans.objectL10n.zoomin+'" type="button"></button>');s.append(p),s.append(e("<div>"+pdfemb_trans.objectL10n.zoom+' <span class="pdfemb-zoom">100%</span></div>')),a&&s.append(e("<div>"+pdfemb_trans.objectL10n.secure+"</div>")),t?i.prepend(s):i.append(s),r.on("click",function(e){1>=o.currentPageNum||(o.gotoPage(o.currentPageNum-1),o.jumpToTop())}),d.on("click",function(e){o.currentPageNum>=o.pageCount||0==o.currentPageNum||(o.gotoPage(o.currentPageNum+1),o.jumpToTop())}),p.on("click",function(e){500<=o.zoom||o.changeZoom(10)}),h.on("click",function(e){20>=o.zoom||o.changeZoom(-10)}),o.addMoreToolbar(s),n||(i.on("mouseenter",function(e){!0!==(e=i.find("div.pdfemb-toolbar-hover")).data("no-hover")&&e.show()}),i.on("mouseleave",function(e){i.find("div.pdfemb-toolbar-hover").hide()}),i.on("pdfembTouchTapped",function(e){if(e.stopPropagation(),e.preventDefault(),!o.locktaps){o.locktaps=!0;var t=(e=i.find("div.pdfemb-toolbar-hover")).is(":visible");1==e.data("no-hover")&&(t=!0),t?e.hide():e.show(),setTimeout(function(){o.locktaps=!1},250)}})),"on"==pdfemb_trans.poweredby&&s.append(e("<div class='poweredby'>Powered by </div>",{class:"pdfemb-poweredby"}).append(e('<a href="https://wp-pdf.com/?utm_source=Poweredby&utm_medium=freemium&utm_campaign=Freemium" target="_blank">wp-pdf.com</a>')))},o.prototype.magnifyEvent=function(e){var t=e.originalEvent.magnification;if(-1==t)this.resizeViewer(),this.resizeInnerDivs(),this.invalidateAllPages(),this.renderPage(this.getTopVisiblePageNum());else{var n=this.divContainer.find(".pdfemb-pagescontainer").offset();this.magnifyZoom(t,e.originalEvent.centreLeft-n.left,e.originalEvent.centreTop-n.top)}},o.prototype.magnifyZoom=function(e,t,n){var a=this.zoom;20>(e=Math.floor(a*e))&&(e=20),500<e&&(e=500),this.zoom=e,this.divContainer.find("span.pdfemb-zoom").text(e+"%"),this.fromZoom=a,this.toZoom=e,this.pccentreLeft=t,this.pccentreTop=n,this.resizeViewer(),this.resizeInnerDivs(),this.invalidateAllPages()},o.prototype.pdfembWantMobile=function(e,t){return!1},o.prototype.pdfembMakeMobile=function(){},o.prototype.addMoreToolbar=function(e){},o.prototype.jumpToTop=function(){},o.prototype.preRenderCanvas=function(e,t,n){},PDFEMB_NS.pdfembPagesViewer=o}),jQuery(document).ready(function(e){var t=PDFEMB_NS.pdfembPagesViewer;(e=function(){t.apply(this,arguments)}).prototype=new t,PDFEMB_NS.pdfembPagesViewerUsable=e}),PDFEMB_NS.pdfembGetPDF=function(e,t){t(e,!1)},jQuery(document).ready(function(e){e.fn.pdfEmbedder=function(){return this.each(function(t,n){var a,i=e(n);if(i.is("a")){var o=i.data();(a=e("<div></div>",{class:i.attr("class"),style:i.attr("style")})).data(e.extend({"pdf-url":i.attr("href")},o)),i.replaceWith(a)}else a=i;a.append(e("<div></div>",{class:"pdfemb-loadingmsg"}).append(document.createTextNode(pdfemb_trans.objectL10n.loading))),"on"==a.data("disablerightclick")&&a.bind("contextmenu",function(e){e.preventDefault()});var s=function(e,t){new PDFEMB_NS.pdfembPagesViewerUsable(e,a,t).setup()};if(a.data("pdfDoc"))s(a.data("pdfDoc"),a.data("showIsSecure"));else{var r=a.data("pdf-url");PDFEMB_NS.pdfembGetPDF(r,function(t,n){null!==t?pdfjsLib.getDocument(t).promise.then(function(e){s(e,n)},function(t){var n=document.createTextNode(t.message);"UnknownErrorException"==t.name&&"Failed to fetch"==t.message&&(n=e("<span></span>").append(document.createTextNode(t.message+" "+pdfemb_trans.objectL10n.domainerror+" ")).append(e('<a href="https://wp-pdf.com/kb/error-url-to-the-pdf-file-must-be-on-exactly-the-same-domain-as-the-current-web-page/" target="_blank">'+pdfemb_trans.objectL10n.clickhereinfo+"</a>"))),a.empty().append(e("<div></div>",{class:"pdfemb-errormsg"}).append(n))}):a.empty().append(e("<div></div>",{class:"pdfemb-errormsg"}).append(msgnode=e("<span></span>").append(document.createTextNode("Failed to load and decrypt PDF"))))})}}),this},e(".pdfemb-viewer").pdfEmbedder()});
|
|
js/{grabtopan-basic.js → grabtopan-basic-4.6.2.js}
RENAMED
File without changes
|
js/{pdfemb-basic.js → pdfemb-basic-4.6.2.js}
RENAMED
File without changes
|
js/{pdfemb-blocks.js → pdfemb-blocks-4.6.2.js}
RENAMED
File without changes
|
js/{pdfemb-embed-pdf.js → pdfemb-embed-pdf-4.6.2.js}
RENAMED
@@ -1,9 +1,8 @@
|
|
1 |
-
|
2 |
// JQuery Plugin
|
3 |
jQuery(document).ready(function ($) {
|
4 |
|
5 |
-
$.fn.pdfEmbedder = function() {
|
6 |
-
|
7 |
this.each(function(index, rawAContainer) {
|
8 |
|
9 |
var divContainer;
|
@@ -56,7 +55,7 @@ jQuery(document).ready(function ($) {
|
|
56 |
return;
|
57 |
}
|
58 |
|
59 |
-
var loadingTask = pdfjsLib.getDocument(pdf);
|
60 |
loadingTask.promise.then(function(pdfDoc_) {
|
61 |
// you can now use *pdf* here
|
62 |
initPdfDoc(pdfDoc_, showIsSecure)
|
@@ -89,9 +88,16 @@ jQuery(document).ready(function ($) {
|
|
89 |
return this;
|
90 |
|
91 |
};
|
92 |
-
|
93 |
// Apply plugin to relevant divs
|
94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
|
96 |
});
|
97 |
|
|
|
1 |
// JQuery Plugin
|
2 |
jQuery(document).ready(function ($) {
|
3 |
|
4 |
+
$.fn.pdfEmbedder = function(cmapURL) {
|
5 |
+
|
6 |
this.each(function(index, rawAContainer) {
|
7 |
|
8 |
var divContainer;
|
55 |
return;
|
56 |
}
|
57 |
|
58 |
+
var loadingTask = pdfjsLib.getDocument(pdf,cmapURL);
|
59 |
loadingTask.promise.then(function(pdfDoc_) {
|
60 |
// you can now use *pdf* here
|
61 |
initPdfDoc(pdfDoc_, showIsSecure)
|
88 |
return this;
|
89 |
|
90 |
};
|
91 |
+
|
92 |
// Apply plugin to relevant divs
|
93 |
+
|
94 |
+
if (pdfemb_trans.cmap_url === "undefined") {
|
95 |
+
var cmapURLis = '';
|
96 |
+
}else{
|
97 |
+
var cmapURLis = pdfemb_trans.cmap_url;
|
98 |
+
}
|
99 |
+
|
100 |
+
$('.pdfemb-viewer').pdfEmbedder(cmapURLis);
|
101 |
|
102 |
});
|
103 |
|
js/{pdfemb-pv-core.js → pdfemb-pv-core-4.6.2.js}
RENAMED
@@ -1,1074 +1,1075 @@
|
|
1 |
-
;var PDFEMB_NS = {};
|
2 |
-
|
3 |
-
jQuery(document).ready(function($) {
|
4 |
-
|
5 |
-
var PIXEL_RATIO = (function () {
|
6 |
-
var ctx = document.createElement("canvas").getContext("2d"),
|
7 |
-
dpr = window.devicePixelRatio || 1,
|
8 |
-
bsr = ctx.webkitBackingStorePixelRatio ||
|
9 |
-
ctx.mozBackingStorePixelRatio ||
|
10 |
-
ctx.msBackingStorePixelRatio ||
|
11 |
-
ctx.oBackingStorePixelRatio ||
|
12 |
-
ctx.backingStorePixelRatio || 1;
|
13 |
-
|
14 |
-
return dpr / bsr;
|
15 |
-
})();
|
16 |
-
|
17 |
-
PDFEMB_NS.PIXEL_RATIO = PIXEL_RATIO;
|
18 |
-
|
19 |
-
var CANVAS_MAX_PIXELS = 16777000; // 16777216 is max on iPhone Safari
|
20 |
-
|
21 |
-
|
22 |
-
createHiDPICanvas = function (w, h, ratio) {
|
23 |
-
if (!ratio) {
|
24 |
-
ratio = PIXEL_RATIO;
|
25 |
-
}
|
26 |
-
var can = document.createElement("canvas");
|
27 |
-
can.width = w * ratio;
|
28 |
-
can.height = h * ratio;
|
29 |
-
can.style.width = w + "px";
|
30 |
-
can.style.height = h + "px";
|
31 |
-
can.getContext("2d").setTransform(ratio, 0, 0, ratio, 0, 0);
|
32 |
-
return can;
|
33 |
-
};
|
34 |
-
|
35 |
-
var vscrollbarwidth = 0,
|
36 |
-
hscrollbarheight = 0;
|
37 |
-
|
38 |
-
(function() {
|
39 |
-
// Create the measurement node
|
40 |
-
var scrollDiv = document.createElement("div");
|
41 |
-
scrollDiv.style.width = '100px';
|
42 |
-
scrollDiv.style.height = '100px';
|
43 |
-
scrollDiv.style.overflow = 'scroll';
|
44 |
-
scrollDiv.style.position = 'absolute';
|
45 |
-
scrollDiv.style.top = '-9999px';
|
46 |
-
document.body.appendChild(scrollDiv);
|
47 |
-
|
48 |
-
// Get the scrollbar width
|
49 |
-
vscrollbarwidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
|
50 |
-
hscrollbarheight = scrollDiv.offsetHeight - scrollDiv.clientHeight;
|
51 |
-
|
52 |
-
// Delete the DIV
|
53 |
-
document.body.removeChild(scrollDiv);
|
54 |
-
})();
|
55 |
-
|
56 |
-
PDFEMB_NS.vscrollbarwidth = vscrollbarwidth;
|
57 |
-
PDFEMB_NS.hscrollbarheight = hscrollbarheight;
|
58 |
-
|
59 |
-
var pdfembPagesViewer = function (pdfDoc, divContainer, showIsSecure) {
|
60 |
-
this.pdfDoc = pdfDoc;
|
61 |
-
this.divContainer = divContainer;
|
62 |
-
this.showIsSecure = showIsSecure;
|
63 |
-
|
64 |
-
this.initialResize = false;
|
65 |
-
this.firstPageWidth = 0;
|
66 |
-
this.firstPageHeight = 0;
|
67 |
-
this.invalidationRound = 1;
|
68 |
-
this.currentPageNum = 0;
|
69 |
-
this.zoom = 100;
|
70 |
-
this.fromZoom = 0;
|
71 |
-
this.toZoom = 0;
|
72 |
-
};
|
73 |
-
|
74 |
-
pdfembPagesViewer.prototype.setup = function () {
|
75 |
-
var self = this;
|
76 |
-
|
77 |
-
var divContainer = this.divContainer;
|
78 |
-
var pdfDoc_ = this.pdfDoc;
|
79 |
-
var showIsSecure = this.showIsSecure;
|
80 |
-
|
81 |
-
this.numPages = pdfDoc_.numPages;
|
82 |
-
|
83 |
-
var scrollbar = divContainer.data('scrollbar');
|
84 |
-
this.vscrollbar = scrollbar == 'both' || scrollbar == 'vertical';
|
85 |
-
this.hscrollbar = scrollbar == 'both' || scrollbar == 'horizontal';
|
86 |
-
|
87 |
-
var style = 'overflow-y: ' + (this.vscrollbar ? 'scroll' : 'hidden') + '; ';
|
88 |
-
style += 'overflow-x: ' + (this.hscrollbar ? 'scroll' : 'hidden') + '; ';
|
89 |
-
|
90 |
-
divContainer.empty().append(
|
91 |
-
$('<div></div>', {'class': 'pdfemb-pagescontainer', 'style': style}));
|
92 |
-
|
93 |
-
divContainer.data('pdfDoc', pdfDoc_);
|
94 |
-
|
95 |
-
var toolbar_location = divContainer.data('toolbar');
|
96 |
-
|
97 |
-
if (toolbar_location == 'top' || toolbar_location == 'both') {
|
98 |
-
this.addToolbar(true, divContainer.data('toolbar-fixed') == 'on', showIsSecure);
|
99 |
-
}
|
100 |
-
|
101 |
-
if (toolbar_location == 'bottom' || toolbar_location == 'both') {
|
102 |
-
this.addToolbar(false, divContainer.data('toolbar-fixed') == 'on', showIsSecure);
|
103 |
-
}
|
104 |
-
|
105 |
-
|
106 |
-
// Annotations layer
|
107 |
-
// Set up annotations layer factory
|
108 |
-
|
109 |
-
if (typeof(PDFEMB_NS.pdfembPremiumAnnotationsLayerFactory) != 'undefined') {
|
110 |
-
self.annotationsLayerFactory = new PDFEMB_NS.pdfembPremiumAnnotationsLayerFactory();
|
111 |
-
}
|
112 |
-
else {
|
113 |
-
self.annotationsLayerFactory = {
|
114 |
-
createAnnotationsLayerBuilder: function (pageDiv, pdfPage) {
|
115 |
-
return null;
|
116 |
-
}
|
117 |
-
}
|
118 |
-
}
|
119 |
-
self.annotationLayerFactories = Array();
|
120 |
-
|
121 |
-
// Text Layer
|
122 |
-
|
123 |
-
if (typeof(PDFEMB_NS.pdfembPremiumTextLayerFactory) != 'undefined') {
|
124 |
-
self.textLayerFactory = new PDFEMB_NS.pdfembPremiumTextLayerFactory();
|
125 |
-
}
|
126 |
-
else {
|
127 |
-
self.textLayerFactory = {
|
128 |
-
createTextLayerBuilder: function (pageDiv, pdfPage) {
|
129 |
-
return null;
|
130 |
-
}
|
131 |
-
}
|
132 |
-
}
|
133 |
-
self.textLayerFactories = Array();
|
134 |
-
|
135 |
-
// React to page jump event
|
136 |
-
|
137 |
-
divContainer.on('pdfembGotopage', function (e, pageNum) {
|
138 |
-
if (pageNum > this.numPages || pageNum <= 0) {
|
139 |
-
return;
|
140 |
-
}
|
141 |
-
|
142 |
-
self.gotoPage(pageNum);
|
143 |
-
self.jumpToTop();
|
144 |
-
|
145 |
-
});
|
146 |
-
|
147 |
-
divContainer.on('pdfembGotoHash', function (e, destobj) {
|
148 |
-
if (!destobj.dest) {
|
149 |
-
return;
|
150 |
-
}
|
151 |
-
dest = destobj.dest;
|
152 |
-
|
153 |
-
var destinationPromise;
|
154 |
-
if (typeof dest === 'string') {
|
155 |
-
destString = dest;
|
156 |
-
destinationPromise = self.pdfDoc.getDestination(dest);
|
157 |
-
} else {
|
158 |
-
destinationPromise = Promise.resolve(dest);
|
159 |
-
}
|
160 |
-
destinationPromise.then(function (destination) {
|
161 |
-
|
162 |
-
if (!(destination instanceof Array) || destination.length < 1) {
|
163 |
-
return; // invalid destination
|
164 |
-
}
|
165 |
-
|
166 |
-
self.pdfDoc.getPageIndex(destination[0]).then(function (pageIndex) {
|
167 |
-
var pageNum = pageIndex + 1;
|
168 |
-
|
169 |
-
if (pageNum > self.numPages || pageNum <= 0 || self.currentPageNum == pageNum) {
|
170 |
-
return;
|
171 |
-
}
|
172 |
-
|
173 |
-
self.gotoPage(pageNum)
|
174 |
-
self.jumpToTop();
|
175 |
-
});
|
176 |
-
|
177 |
-
});
|
178 |
-
});
|
179 |
-
|
180 |
-
divContainer.on('pdfembGotoAction', function (e, action) {
|
181 |
-
var curPage = self.currentPageNum;
|
182 |
-
var newPage = curPage;
|
183 |
-
switch (action) {
|
184 |
-
case 'GoBack':
|
185 |
-
--newPage;
|
186 |
-
break;
|
187 |
-
|
188 |
-
case 'GoForward':
|
189 |
-
++newPage;
|
190 |
-
break;
|
191 |
-
|
192 |
-
case 'NextPage':
|
193 |
-
++newPage;
|
194 |
-
break;
|
195 |
-
|
196 |
-
case 'PrevPage':
|
197 |
-
--newPage;
|
198 |
-
break;
|
199 |
-
|
200 |
-
case 'LastPage':
|
201 |
-
newPage = self.pageCount;
|
202 |
-
break;
|
203 |
-
|
204 |
-
case 'FirstPage':
|
205 |
-
newPage = 1;
|
206 |
-
break;
|
207 |
-
|
208 |
-
default:
|
209 |
-
break; // No action according to spec
|
210 |
-
}
|
211 |
-
|
212 |
-
if (newPage == curPage || newPage > self.pageCount || newPage <= 0) {
|
213 |
-
return;
|
214 |
-
}
|
215 |
-
|
216 |
-
self.gotoPage(newPage);
|
217 |
-
|
218 |
-
});
|
219 |
-
|
220 |
-
divContainer.on('pdfembMagnify', function (event) {
|
221 |
-
self.magnifyEvent(event);
|
222 |
-
});
|
223 |
-
|
224 |
-
divContainer.on('pdfembChangeZoom', function (event, amt) {
|
225 |
-
self.changeZoom(amt);
|
226 |
-
});
|
227 |
-
|
228 |
-
|
229 |
-
// Initial/first page rendering
|
230 |
-
|
231 |
-
this.pageCount = pdfDoc_.numPages;
|
232 |
-
|
233 |
-
if (!divContainer.data('pagenum') || divContainer.data('pagenum') < 1 || divContainer.data('pagenum') > this.pageCount) {
|
234 |
-
divContainer.data('pagenum', 1);
|
235 |
-
}
|
236 |
-
|
237 |
-
divContainer.data('showIsSecure', this.showIsSecure);
|
238 |
-
divContainer.data('pageNumPending', null);
|
239 |
-
|
240 |
-
var startZoom = divContainer.data('fullScreen') == 'on' ? parseInt(divContainer.data('startfpzoom')) : parseInt(divContainer.data('startzoom'));
|
241 |
-
if (isNaN(startZoom) || startZoom < 20 || startZoom >
|
242 |
-
startZoom = 100;
|
243 |
-
}
|
244 |
-
this.zoom = startZoom;
|
245 |
-
if (startZoom != 100) {
|
246 |
-
divContainer.find('span.pdfemb-zoom').text(startZoom + '%');
|
247 |
-
}
|
248 |
-
|
249 |
-
divContainer.find('span.pdfemb-page-count').text(this.pageCount);
|
250 |
-
|
251 |
-
this.gotoPage(divContainer.data('pagenum'));
|
252 |
-
|
253 |
-
};
|
254 |
-
|
255 |
-
pdfembPagesViewer.prototype.checkForResize = function () {
|
256 |
-
var self = this;
|
257 |
-
var divContainer = self.divContainer;
|
258 |
-
var newheight = $(window).height();
|
259 |
-
var newwidth = $(window).width();
|
260 |
-
|
261 |
-
var oldheight = divContainer.data('checked-window-height');
|
262 |
-
var oldwidth = divContainer.data('checked-window-width');
|
263 |
-
|
264 |
-
if (!oldheight || !oldwidth) {
|
265 |
-
divContainer.data('checked-window-height', newheight);
|
266 |
-
divContainer.data('checked-window-width', newwidth);
|
267 |
-
}
|
268 |
-
|
269 |
-
if (oldheight != newheight || oldwidth != newwidth) {
|
270 |
-
self.resizeViewer();
|
271 |
-
self.resizeInnerDivs();
|
272 |
-
self.invalidateAllPages();
|
273 |
-
self.renderPage(this.currentPageNum);
|
274 |
-
self.prerenderNearbyPages(this.currentPageNum);
|
275 |
-
self.pdfembMakeMobile();
|
276 |
-
|
277 |
-
divContainer.data('checked-window-height', newheight);
|
278 |
-
divContainer.data('checked-window-width', newwidth);
|
279 |
-
}
|
280 |
-
|
281 |
-
if (divContainer.data('fullScreenClosed') != 'true') {
|
282 |
-
setTimeout(function () {
|
283 |
-
self.checkForResize();
|
284 |
-
}, 100);
|
285 |
-
}
|
286 |
-
};
|
287 |
-
|
288 |
-
pdfembPagesViewer.prototype.setSizesBasedOnPage = function (page) {
|
289 |
-
var vp = page.getViewport(1.0); // scale = 1.0
|
290 |
-
|
291 |
-
this.pageWidth = vp.width;
|
292 |
-
this.pageHeight = vp.height;
|
293 |
-
|
294 |
-
if (this.pageWidth <= 0 || this.pageHeight <= 0) {
|
295 |
-
this.divContainer.empty().append(document.createTextNode(pdfemb_trans.objectL10n.widthheightinvalid));
|
296 |
-
return;
|
297 |
-
}
|
298 |
-
};
|
299 |
-
|
300 |
-
pdfembPagesViewer.prototype.createPageInnerDivs = function () {
|
301 |
-
var self = this;
|
302 |
-
var pagesContainer = this.divContainer.find('.pdfemb-pagescontainer');
|
303 |
-
|
304 |
-
for (var i = 1; i <= this.pageCount; ++i) {
|
305 |
-
var innerdiv = pagesContainer.find('.pdfemb-inner-div.pdfemb-page' + i);
|
306 |
-
if (innerdiv.length == 0) {
|
307 |
-
innerdiv = $('<div></div>', {'class': 'pdfemb-inner-div pdfemb-page' + i});
|
308 |
-
innerdiv.data('pageNum', i);
|
309 |
-
pagesContainer.append(innerdiv);
|
310 |
-
}
|
311 |
-
}
|
312 |
-
|
313 |
-
self.resizeInnerDivs();
|
314 |
-
};
|
315 |
-
|
316 |
-
pdfembPagesViewer.prototype.addGrabToPan = function () {
|
317 |
-
var self = this;
|
318 |
-
var divContainer = self.divContainer;
|
319 |
-
var jpagesContainer = divContainer.find('div.pdfemb-pagescontainer');
|
320 |
-
|
321 |
-
var grabtopan = new pdfembGrabToPan({
|
322 |
-
element: jpagesContainer[0]
|
323 |
-
});
|
324 |
-
divContainer.data('grabtopan', grabtopan);
|
325 |
-
|
326 |
-
jpagesContainer.on('scroll', function (e) {
|
327 |
-
var pn = self.getTopVisiblePageNum();
|
328 |
-
if (pn != self.currentPageNum) {
|
329 |
-
self.currentPageNum = pn;
|
330 |
-
self.updatePageNumDisplay(pn);
|
331 |
-
self.renderPage(pn, false);
|
332 |
-
self.prerenderNearbyPages(pn);
|
333 |
-
self.deallocateFarAwayPages(pn);
|
334 |
-
}
|
335 |
-
e.stopPropagation();
|
336 |
-
});
|
337 |
-
|
338 |
-
$(window).resize(function () {
|
339 |
-
setTimeout(function () {
|
340 |
-
self.checkForResize();
|
341 |
-
}, 100);
|
342 |
-
});
|
343 |
-
};
|
344 |
-
|
345 |
-
pdfembPagesViewer.prototype.resizeInnerDivs = function (pageNum) {
|
346 |
-
var self = this;
|
347 |
-
var wantCanvasWidth = self.wantCanvasWidth,
|
348 |
-
wantCanvasHeight = self.wantCanvasHeight,
|
349 |
-
wantHeight = self.wantHeight;
|
350 |
-
|
351 |
-
var pagesContainer = this.divContainer.find('.pdfemb-pagescontainer');
|
352 |
-
|
353 |
-
var innerdivs = pagesContainer.find('.pdfemb-inner-div');
|
354 |
-
|
355 |
-
if (pageNum) {
|
356 |
-
innerdivs = innerdivs.filter('.pdfemb-page'+pageNum);
|
357 |
-
}
|
358 |
-
|
359 |
-
var totalheight = 0;
|
360 |
-
|
361 |
-
innerdivs.each(function(i,elt) {
|
362 |
-
|
363 |
-
var e = $(elt);
|
364 |
-
|
365 |
-
var widthfactor = e.data('widthfactor'),
|
366 |
-
heightfactor = e.data('heightfactor');
|
367 |
-
|
368 |
-
if (!widthfactor) {
|
369 |
-
widthfactor = 1;
|
370 |
-
}
|
371 |
-
if (!heightfactor) {
|
372 |
-
heightfactor = 1;
|
373 |
-
}
|
374 |
-
|
375 |
-
e.data('invalidation-round', this.invalidationRound - 1);
|
376 |
-
|
377 |
-
e.css('width', wantCanvasWidth * widthfactor);
|
378 |
-
|
379 |
-
var height = wantCanvasHeight * heightfactor
|
380 |
-
+ (pageNum == self.numPages || (!pageNum && i == innerdivs.length-1) ? 0 : 2);
|
381 |
-
e.css('height', height);
|
382 |
-
|
383 |
-
totalheight += height;
|
384 |
-
|
385 |
-
var canvas = e.find('.pdfemb-the-canvas');
|
386 |
-
|
387 |
-
canvas.css('width', wantCanvasWidth * widthfactor);
|
388 |
-
canvas.css('height', wantCanvasHeight * heightfactor);
|
389 |
-
});
|
390 |
-
|
391 |
-
var VMargin = 0;
|
392 |
-
if (!pageNum && totalheight < wantHeight) {
|
393 |
-
VMargin = (wantHeight - totalheight) / 2;
|
394 |
-
}
|
395 |
-
innerdivs.first().css('top', VMargin);
|
396 |
-
};
|
397 |
-
|
398 |
-
pdfembPagesViewer.prototype.invalidateAllPages = function () {
|
399 |
-
++this.invalidationRound;
|
400 |
-
};
|
401 |
-
|
402 |
-
pdfembPagesViewer.prototype.prerenderNearbyPages = function (pageNum) {
|
403 |
-
var pagedelta_forward = 3, pagedelta_backward = 2;
|
404 |
-
|
405 |
-
if (this.zoom < 100) {
|
406 |
-
pagedelta_forward *= Math.min(Math.ceil(100 / this.zoom), 10);
|
407 |
-
pagedelta_backward *= Math.min(Math.ceil(100 / this.zoom), 10);
|
408 |
-
}
|
409 |
-
|
410 |
-
for (var pn = Math.max(1, pageNum - pagedelta_backward); pn <= Math.min(pageNum + pagedelta_forward, this.numPages); ++pn) {
|
411 |
-
if (pn != pageNum) {
|
412 |
-
this.renderPage(pn, false);
|
413 |
-
}
|
414 |
-
}
|
415 |
-
};
|
416 |
-
|
417 |
-
pdfembPagesViewer.prototype.deallocateFarAwayPages = function (pageNum) {
|
418 |
-
var pagedelta_forward = 50, pagedelta_backward = 50;
|
419 |
-
|
420 |
-
if (this.zoom < 100) {
|
421 |
-
var extra_pages = Math.min(Math.ceil(100 / this.zoom), 50);
|
422 |
-
pagedelta_forward += extra_pages;
|
423 |
-
pagedelta_backward += extra_pages;
|
424 |
-
}
|
425 |
-
|
426 |
-
var removeCanvas = function(pn) {
|
427 |
-
var pageInnerDiv = pagesContainer.find('.pdfemb-page' + pn);
|
428 |
-
var canvas = pageInnerDiv.find('.pdfemb-the-canvas');
|
429 |
-
if (canvas.length) {
|
430 |
-
canvas.remove();
|
431 |
-
pageInnerDiv.data('invalidation-round', 0);
|
432 |
-
}
|
433 |
-
};
|
434 |
-
|
435 |
-
var pagesContainer = this.divContainer.find('div.pdfemb-pagescontainer');
|
436 |
-
var pn;
|
437 |
-
|
438 |
-
for (pn = 3; pn < pageNum - pagedelta_backward; ++pn) {
|
439 |
-
removeCanvas(pn);
|
440 |
-
}
|
441 |
-
|
442 |
-
for (pn = pageNum + pagedelta_forward; pn < this.numPages; ++pn) {
|
443 |
-
removeCanvas(pn);
|
444 |
-
}
|
445 |
-
};
|
446 |
-
|
447 |
-
pdfembPagesViewer.prototype.resizeViewer = function () {
|
448 |
-
var self = this;
|
449 |
-
var pageWidth = self.pageWidth,
|
450 |
-
pageHeight = self.pageHeight,
|
451 |
-
divContainer = self.divContainer;
|
452 |
-
|
453 |
-
var pagesContainer = divContainer.find('div.pdfemb-pagescontainer');
|
454 |
-
|
455 |
-
var oldScrollLeft = pagesContainer[0].scrollLeft;
|
456 |
-
var oldScrollTop = pagesContainer[0].scrollTop;
|
457 |
-
|
458 |
-
// Max out at parent container width
|
459 |
-
var parentWidth = divContainer.parent().width();
|
460 |
-
|
461 |
-
var wantWidth = pageWidth;
|
462 |
-
|
463 |
-
if (divContainer.data('width') == 'max') {
|
464 |
-
wantWidth = parentWidth;
|
465 |
-
}
|
466 |
-
else if (divContainer.data('width') == 'auto') {
|
467 |
-
wantWidth = pageWidth;
|
468 |
-
}
|
469 |
-
else {
|
470 |
-
wantWidth = parseInt(divContainer.data('width'), 10);
|
471 |
-
if (isNaN(wantWidth) || wantWidth <= 0) {
|
472 |
-
wantWidth = parentWidth;
|
473 |
-
}
|
474 |
-
}
|
475 |
-
|
476 |
-
if (wantWidth <= 0) {
|
477 |
-
wantWidth = pageWidth;
|
478 |
-
}
|
479 |
-
|
480 |
-
// Always max at the parent container width
|
481 |
-
if (wantWidth > parentWidth && parentWidth > 0) {
|
482 |
-
wantWidth = parentWidth;
|
483 |
-
}
|
484 |
-
|
485 |
-
var wantHeight = pageHeight * wantWidth / pageWidth;
|
486 |
-
|
487 |
-
var wantMobile = self.pdfembWantMobile(wantWidth, userHeight);
|
488 |
-
|
489 |
-
self.wantMobile = wantMobile;
|
490 |
-
|
491 |
-
var fixedToolbars = divContainer.find('div.pdfemb-toolbar-fixed');
|
492 |
-
|
493 |
-
var actualFixedToolbars = wantMobile ? 0 : fixedToolbars.length;
|
494 |
-
|
495 |
-
// Height can be overridden by user
|
496 |
-
var userHeight = parseInt(divContainer.data('height'), 10);
|
497 |
-
if (isNaN(userHeight) || userHeight <= 0 || userHeight > wantHeight) {
|
498 |
-
if (divContainer.data('height') == "auto") { // Mainly for full screen mode
|
499 |
-
userHeight = divContainer.parent().height() - actualFixedToolbars * fixedToolbars.height();
|
500 |
-
}
|
501 |
-
else { // max
|
502 |
-
userHeight = wantHeight;
|
503 |
-
}
|
504 |
-
}
|
505 |
-
|
506 |
-
self.userHeight = userHeight;
|
507 |
-
|
508 |
-
wantWidth = Math.floor(wantWidth);
|
509 |
-
wantHeight = Math.floor(wantHeight);
|
510 |
-
|
511 |
-
|
512 |
-
var zoom = 100;
|
513 |
-
|
514 |
-
var wantCanvasWidth = wantWidth - (self.vscrollbar ? vscrollbarwidth : 0);
|
515 |
-
var wantCanvasHeight = wantHeight - (self.hscrollbar ? hscrollbarheight : 0);
|
516 |
-
|
517 |
-
var reducefactor = 1;
|
518 |
-
|
519 |
-
if (!wantMobile) {
|
520 |
-
|
521 |
-
zoom = self.zoom;
|
522 |
-
|
523 |
-
wantCanvasWidth = wantCanvasWidth * zoom / 100;
|
524 |
-
wantCanvasHeight = wantCanvasHeight * zoom / 100;
|
525 |
-
|
526 |
-
|
527 |
-
// Check canvas won't be too big
|
528 |
-
if (wantCanvasWidth*wantCanvasHeight*PIXEL_RATIO*PIXEL_RATIO > CANVAS_MAX_PIXELS) {
|
529 |
-
reducefactor = CANVAS_MAX_PIXELS / (wantCanvasWidth*wantCanvasHeight*PIXEL_RATIO*PIXEL_RATIO);
|
530 |
-
}
|
531 |
-
|
532 |
-
}
|
533 |
-
|
534 |
-
// Set values
|
535 |
-
|
536 |
-
if (wantWidth != divContainer.width()) {
|
537 |
-
divContainer.width(wantWidth);
|
538 |
-
}
|
539 |
-
|
540 |
-
if (divContainer.height() != userHeight) {
|
541 |
-
divContainer.height(userHeight + actualFixedToolbars * fixedToolbars.height());
|
542 |
-
}
|
543 |
-
|
544 |
-
pagesContainer.width(wantWidth);
|
545 |
-
pagesContainer.height(userHeight);
|
546 |
-
|
547 |
-
var fixedTopToolbars = fixedToolbars.filter('.pdfemb-toolbar-top');
|
548 |
-
if (actualFixedToolbars > 0) {
|
549 |
-
pagesContainer.css('top', fixedTopToolbars.height());
|
550 |
-
}
|
551 |
-
|
552 |
-
var canvasscale = ( wantWidth - (self.vscrollbar ? vscrollbarwidth : 0) ) / pageWidth;
|
553 |
-
|
554 |
-
if (self.fromZoom != 0 && self.toZoom != 0) {
|
555 |
-
|
556 |
-
var oldMidX = oldScrollLeft + self.pccentreLeft;
|
557 |
-
var oldMidY = oldScrollTop + self.pccentreTop;
|
558 |
-
|
559 |
-
pagesContainer[0].scrollLeft = (oldScrollLeft + self.pccentreLeft ) * (self.toZoom / self.fromZoom) - self.pccentreLeft;
|
560 |
-
pagesContainer[0].scrollTop = (oldScrollTop + self.pccentreTop) * (self.toZoom / self.fromZoom) - self.pccentreTop;
|
561 |
-
}
|
562 |
-
|
563 |
-
self.fromZoom = 0;
|
564 |
-
self.toZoom = 0;
|
565 |
-
|
566 |
-
self.wantCanvasWidth = wantCanvasWidth;
|
567 |
-
self.wantCanvasHeight = wantCanvasHeight;
|
568 |
-
self.reducefactor = reducefactor;
|
569 |
-
|
570 |
-
self.wantWidth = wantWidth;
|
571 |
-
self.wantHeight = wantHeight;
|
572 |
-
self.canvasscale = canvasscale;
|
573 |
-
self.zoom = zoom;
|
574 |
-
};
|
575 |
-
|
576 |
-
pdfembPagesViewer.prototype.getTopVisiblePageNum = function () {
|
577 |
-
var pagesContainer = this.divContainer.find('.pdfemb-pagescontainer');
|
578 |
-
var innerdivs = pagesContainer.find('.pdfemb-inner-div:visible');
|
579 |
-
|
580 |
-
if (innerdivs.length > 0) {
|
581 |
-
return innerdivs.first().data('pageNum');
|
582 |
-
}
|
583 |
-
return 1;
|
584 |
-
};
|
585 |
-
|
586 |
-
pdfembPagesViewer.prototype.gotoPage = function (pageNum) {
|
587 |
-
if (pageNum <= 0 || pageNum > this.pageCount) {
|
588 |
-
return;
|
589 |
-
}
|
590 |
-
this.renderPage(pageNum, true);
|
591 |
-
this.currentPageNum = pageNum;
|
592 |
-
this.updatePageNumDisplay(pageNum);
|
593 |
-
this.prerenderNearbyPages(pageNum);
|
594 |
-
this.deallocateFarAwayPages(pageNum);
|
595 |
-
|
596 |
-
};
|
597 |
-
|
598 |
-
pdfembPagesViewer.prototype.updatePageNumDisplay = function (pageNum) {
|
599 |
-
var divContainer = this.divContainer;
|
600 |
-
// Update page counters
|
601 |
-
divContainer.find('div.pdfemb-toolbar .pdfemb-page-num').each(function (i, pageNumDisplay) {
|
602 |
-
var jpageNumDisplay = $(pageNumDisplay);
|
603 |
-
if (jpageNumDisplay.is('span')) {
|
604 |
-
// Normal span area
|
605 |
-
jpageNumDisplay.text(pageNum);
|
606 |
-
} else {
|
607 |
-
// User-changeable text
|
608 |
-
jpageNumDisplay.val(pageNum);
|
609 |
-
}
|
610 |
-
});
|
611 |
-
|
612 |
-
// Enable or disable next/prev buttons
|
613 |
-
if (pageNum < this.pageCount) {
|
614 |
-
divContainer.find('.pdfemb-next').removeAttr('disabled').removeClass('pdfemb-btndisabled');
|
615 |
-
}
|
616 |
-
else {
|
617 |
-
divContainer.find('.pdfemb-next').attr('disabled', 'disabled').addClass('pdfemb-btndisabled');
|
618 |
-
}
|
619 |
-
|
620 |
-
if (pageNum > 1) {
|
621 |
-
divContainer.find('.pdfemb-prev').removeAttr('disabled').removeClass('pdfemb-btndisabled');
|
622 |
-
}
|
623 |
-
else {
|
624 |
-
divContainer.find('.pdfemb-prev').attr('disabled', 'disabled').addClass('pdfemb-btndisabled');
|
625 |
-
}
|
626 |
-
|
627 |
-
};
|
628 |
-
|
629 |
-
pdfembPagesViewer.prototype.scrollPageIntoView = function (pageNum) {
|
630 |
-
var pagesContainer = this.divContainer.find('.pdfemb-pagescontainer');
|
631 |
-
|
632 |
-
var innerdiv = pagesContainer.find('.pdfemb-page' + pageNum);
|
633 |
-
|
634 |
-
pagesContainer.find('.pdfemb-inner-div').not('.pdfemb-page' + pageNum).hide();
|
635 |
-
|
636 |
-
innerdiv.show();
|
637 |
-
pagesContainer[0].scrollTop = 0;
|
638 |
-
};
|
639 |
-
|
640 |
-
pdfembPagesViewer.prototype.renderPage = function (pageNum, scrollIntoView) {
|
641 |
-
var self = this;
|
642 |
-
|
643 |
-
var myInvalidationRound = self.invalidationRound;
|
644 |
-
|
645 |
-
var divContainer = this.divContainer;
|
646 |
-
|
647 |
-
// Using promise to fetch the page
|
648 |
-
var pdfDoc = divContainer.data('pdfDoc');
|
649 |
-
|
650 |
-
var pagesContainer = divContainer.find('.pdfemb-pagescontainer');
|
651 |
-
var innerdiv = pagesContainer.find('.pdfemb-page' + pageNum);
|
652 |
-
|
653 |
-
if (innerdiv.length && innerdiv.data('invalidation-round') >= myInvalidationRound) {
|
654 |
-
if (scrollIntoView) {
|
655 |
-
self.scrollPageIntoView(pageNum);
|
656 |
-
}
|
657 |
-
return;
|
658 |
-
}
|
659 |
-
|
660 |
-
var pendingInvalidationRound = innerdiv.data('pending-drawing-round');
|
661 |
-
|
662 |
-
if (pendingInvalidationRound >= myInvalidationRound) {
|
663 |
-
// Already being drawn
|
664 |
-
return;
|
665 |
-
}
|
666 |
-
else if (pendingInvalidationRound > 0 && pendingInvalidationRound < myInvalidationRound) {
|
667 |
-
innerdiv.data('pending-drawing-round', myInvalidationRound);
|
668 |
-
// Queue up this rendering - but we can't do it right now.
|
669 |
-
return;
|
670 |
-
}
|
671 |
-
|
672 |
-
innerdiv.data('pending-drawing-round', myInvalidationRound);
|
673 |
-
|
674 |
-
pdfDoc.getPage(pageNum).then(function (page) {
|
675 |
-
|
676 |
-
if (!self.initialResize) {
|
677 |
-
self.initialResize = true;
|
678 |
-
|
679 |
-
self.setSizesBasedOnPage(page);
|
680 |
-
|
681 |
-
self.resizeViewer();
|
682 |
-
|
683 |
-
self.createPageInnerDivs();
|
684 |
-
|
685 |
-
self.addGrabToPan();
|
686 |
-
|
687 |
-
self.pdfembMakeMobile();
|
688 |
-
}
|
689 |
-
|
690 |
-
// Lookup again if only just created
|
691 |
-
if (innerdiv.length == 0) {
|
692 |
-
innerdiv = pagesContainer.find('.pdfemb-page' + pageNum);
|
693 |
-
}
|
694 |
-
|
695 |
-
// Is this page the same size/shape as the first?
|
696 |
-
|
697 |
-
var widthfactor = innerdiv.data('widthfactor'),
|
698 |
-
heightfactor = innerdiv.data('heightfactor');
|
699 |
-
|
700 |
-
if (!widthfactor || !heightfactor) {
|
701 |
-
// calculate factors
|
702 |
-
var vp = page.getViewport(1.0); // scale = 1.0
|
703 |
-
|
704 |
-
widthfactor = vp.width / self.pageWidth;
|
705 |
-
heightfactor = vp.height / self.pageHeight;
|
706 |
-
|
707 |
-
innerdiv.data('widthfactor', widthfactor);
|
708 |
-
innerdiv.data('heightfactor', heightfactor);
|
709 |
-
|
710 |
-
if (widthfactor != 1 || heightfactor != 1) {
|
711 |
-
self.resizeInnerDivs(pageNum);
|
712 |
-
}
|
713 |
-
}
|
714 |
-
|
715 |
-
var canvas = innerdiv.find('.pdfemb-the-canvas');
|
716 |
-
if (canvas.length == 0) {
|
717 |
-
canvas = $('<canvas></canvas>', {'class': 'pdfemb-the-canvas'});
|
718 |
-
innerdiv.append(canvas);
|
719 |
-
}
|
720 |
-
|
721 |
-
if (scrollIntoView) {
|
722 |
-
self.scrollPageIntoView(pageNum);
|
723 |
-
}
|
724 |
-
|
725 |
-
var canvasImg = null;
|
726 |
-
var canvasCxt = null;
|
727 |
-
var oldCanvasWidth = null;
|
728 |
-
var oldCanvasHeight = null;
|
729 |
-
|
730 |
-
var wantCanvasWidth = self.wantCanvasWidth,
|
731 |
-
wantCanvasHeight = self.wantCanvasHeight,
|
732 |
-
canvasscale = self.canvasscale,
|
733 |
-
zoom = self.zoom;
|
734 |
-
|
735 |
-
canvas.css('width', wantCanvasWidth * widthfactor);
|
736 |
-
canvas.css('height', wantCanvasHeight * heightfactor);
|
737 |
-
|
738 |
-
if (self.wantMobile) {
|
739 |
-
divContainer.data('grabtopan').deactivate();
|
740 |
-
}
|
741 |
-
else {
|
742 |
-
divContainer.data('grabtopan').activate();
|
743 |
-
}
|
744 |
-
|
745 |
-
// Render PDF page into canvas context
|
746 |
-
var viewport = page.getViewport(canvasscale * zoom / 100);
|
747 |
-
|
748 |
-
var offscreenCanvas = document.createElement('canvas');
|
749 |
-
offscreenCanvas.width = wantCanvasWidth * PIXEL_RATIO * self.reducefactor * widthfactor;
|
750 |
-
offscreenCanvas.height = wantCanvasHeight * PIXEL_RATIO * self.reducefactor * heightfactor;
|
751 |
-
|
752 |
-
var ctx = offscreenCanvas.getContext('2d');
|
753 |
-
|
754 |
-
var renderContext = {
|
755 |
-
canvasContext: ctx,
|
756 |
-
viewport: viewport,
|
757 |
-
transform: [PIXEL_RATIO * self.reducefactor, 0, 0, PIXEL_RATIO * self.reducefactor, 0, 0]
|
758 |
-
};
|
759 |
-
|
760 |
-
// No longer set transform on ctx explicitly
|
761 |
-
// ctx.setTransform(PIXEL_RATIO, 0, 0, PIXEL_RATIO, 0, 0);
|
762 |
-
// This was not always being picked up first time on some browsers - set via renderContext instead above
|
763 |
-
|
764 |
-
var renderTask = page.render(renderContext);
|
765 |
-
|
766 |
-
var drawCallback = function () {
|
767 |
-
|
768 |
-
canvas[0].width = wantCanvasWidth * PIXEL_RATIO * self.reducefactor * widthfactor;
|
769 |
-
canvas[0].height = wantCanvasHeight * PIXEL_RATIO * self.reducefactor * heightfactor;
|
770 |
-
|
771 |
-
// Render any watermark to off-screen image
|
772 |
-
self.preRenderCanvas(ctx, pageNum, zoom);
|
773 |
-
|
774 |
-
// Copy from off screen canvas
|
775 |
-
var image = ctx.getImageData(0, 0, offscreenCanvas.width, offscreenCanvas.height);
|
776 |
-
canvas[0].getContext('2d').putImageData(image, 0, 0);
|
777 |
-
|
778 |
-
|
779 |
-
// Do annotations layer
|
780 |
-
var annotationLayer = null;
|
781 |
-
if (typeof self.annotationLayerFactories[pageNum] == 'undefined') {
|
782 |
-
annotationLayer = self.annotationsLayerFactory.createAnnotationsLayerBuilder(innerdiv[0], page);
|
783 |
-
self.annotationLayerFactories[pageNum] = annotationLayer;
|
784 |
-
}
|
785 |
-
else {
|
786 |
-
annotationLayer = self.annotationLayerFactories[pageNum];
|
787 |
-
}
|
788 |
-
|
789 |
-
if (annotationLayer != null) {
|
790 |
-
annotationLayer.setupAnnotations(viewport, self.divContainer.data('newwindow'));
|
791 |
-
}
|
792 |
-
|
793 |
-
// End annotations layer
|
794 |
-
|
795 |
-
|
796 |
-
// Do Text Layer
|
797 |
-
|
798 |
-
var textLayer = null;
|
799 |
-
if (typeof self.textLayerFactories[pageNum] == 'undefined') {
|
800 |
-
textLayer = self.textLayerFactory.createTextLayerBuilder(innerdiv[0], page);
|
801 |
-
self.textLayerFactories[pageNum] = textLayer;
|
802 |
-
}
|
803 |
-
else {
|
804 |
-
textLayer = self.textLayerFactories[pageNum];
|
805 |
-
}
|
806 |
-
|
807 |
-
if (textLayer != null) {
|
808 |
-
textLayer.setupText(viewport);
|
809 |
-
}
|
810 |
-
// End Text Layer
|
811 |
-
|
812 |
-
|
813 |
-
innerdiv.data('invalidation-round', myInvalidationRound);
|
814 |
-
|
815 |
-
pendingInvalidationRound = innerdiv.data('pending-drawing-round');
|
816 |
-
|
817 |
-
innerdiv.data('pending-drawing-round', '');
|
818 |
-
|
819 |
-
if (pendingInvalidationRound > myInvalidationRound) {
|
820 |
-
self.renderPage(pageNum, false);
|
821 |
-
}
|
822 |
-
|
823 |
-
}
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
// Wait for rendering to finish
|
828 |
-
renderTask.promise.then( function(){
|
829 |
-
if ('requestAnimationFrame' in window) {
|
830 |
-
window.requestAnimationFrame(drawCallback);
|
831 |
-
}
|
832 |
-
else {
|
833 |
-
setTimeout(drawCallback, 1);
|
834 |
-
}
|
835 |
-
});
|
836 |
-
|
837 |
-
});
|
838 |
-
|
839 |
-
};
|
840 |
-
|
841 |
-
pdfembPagesViewer.prototype.changeZoom = function (zoomdelta) {
|
842 |
-
var self = this;
|
843 |
-
var divContainer = self.divContainer;
|
844 |
-
|
845 |
-
var oldzoom = self.zoom;
|
846 |
-
var newzoom = oldzoom + zoomdelta;
|
847 |
-
self.zoom = newzoom;
|
848 |
-
divContainer.find('span.pdfemb-zoom').text(newzoom + '%');
|
849 |
-
|
850 |
-
self.fromZoom = oldzoom;
|
851 |
-
self.toZoom = newzoom;
|
852 |
-
|
853 |
-
var pagesContainer = divContainer.find('.pdfemb-pagescontainer');
|
854 |
-
self.pccentreLeft = pagesContainer.width()/2;
|
855 |
-
self.pccentreTop = pagesContainer.height()/2;
|
856 |
-
|
857 |
-
self.resizeViewer();
|
858 |
-
self.resizeInnerDivs();
|
859 |
-
self.invalidateAllPages();
|
860 |
-
self.renderPage(self.currentPageNum);
|
861 |
-
|
862 |
-
// Ensure top-left remains where it was
|
863 |
-
|
864 |
-
/*var pagesContainer = divContainer.find('.pdfemb-pagescontainer');
|
865 |
-
|
866 |
-
var cscrolltop = pagesContainer[0].scrollTop;
|
867 |
-
pagesContainer[0].scrollTop = cscrolltop * newzoom / oldzoom;
|
868 |
-
|
869 |
-
var cscrollleft = pagesContainer[0].scrollLeft;
|
870 |
-
pagesContainer[0].scrollLeft = cscrollleft * newzoom / oldzoom; */
|
871 |
-
|
872 |
-
|
873 |
-
self.prerenderNearbyPages(self.currentPageNum);
|
874 |
-
};
|
875 |
-
|
876 |
-
pdfembPagesViewer.prototype.queueRenderPage = function (num, noredraw) {
|
877 |
-
var divContainer = this.divContainer;
|
878 |
-
this.renderPage(num, noredraw);
|
879 |
-
|
880 |
-
/*if (divContainer.data('pageRendering')) {
|
881 |
-
divContainer.data('pageNumPending', num);
|
882 |
-
} else {
|
883 |
-
this.renderPage(num, noredraw);
|
884 |
-
}*/
|
885 |
-
};
|
886 |
-
|
887 |
-
pdfembPagesViewer.prototype.addToolbar = function (atTop, fixed, showIsSecure) {
|
888 |
-
var divContainer = this.divContainer;
|
889 |
-
var self = this;
|
890 |
-
|
891 |
-
var toolbar = $('<div></div>', {'class': 'pdfemb-toolbar pdfemb-toolbar' + (fixed ? '-fixed' : '-hover') + ' ' + (atTop ? ' pdfemb-toolbar-top' : 'pdfemb-toolbar-bottom')});
|
892 |
-
var prevbtn = $('<button class="pdfemb-prev" title="' + pdfemb_trans.objectL10n.prev + '" type="button"></button>');
|
893 |
-
toolbar.append(prevbtn);
|
894 |
-
var nextbtn = $('<button class="pdfemb-next" title="' + pdfemb_trans.objectL10n.next + '" type="button"></button>');
|
895 |
-
toolbar.append(nextbtn);
|
896 |
-
|
897 |
-
toolbar.append($('<div class="pdfemb-page-area">' + pdfemb_trans.objectL10n.page + ' <span class="pdfemb-page-num">0</span> / <span class="pdfemb-page-count"></span></div>'));
|
898 |
-
|
899 |
-
var zoomoutbtn = $('<button class="pdfemb-zoomout" title="' + pdfemb_trans.objectL10n.zoomout + '" type="button"></button>');
|
900 |
-
toolbar.append(zoomoutbtn);
|
901 |
-
|
902 |
-
var zoominbtn = $('<button class="pdfemb-zoomin" title="' + pdfemb_trans.objectL10n.zoomin + '" type="button"></button>');
|
903 |
-
toolbar.append(zoominbtn);
|
904 |
-
|
905 |
-
toolbar.append($('<div>' + pdfemb_trans.objectL10n.zoom + ' <span class="pdfemb-zoom">100%</span></div>'));
|
906 |
-
|
907 |
-
if (showIsSecure) {
|
908 |
-
toolbar.append($('<div>' + pdfemb_trans.objectL10n.secure + '</div>'));
|
909 |
-
}
|
910 |
-
|
911 |
-
if (atTop) {
|
912 |
-
divContainer.prepend(toolbar);
|
913 |
-
}
|
914 |
-
else {
|
915 |
-
divContainer.append(toolbar);
|
916 |
-
}
|
917 |
-
|
918 |
-
// Add button functions
|
919 |
-
prevbtn.on('click', function (e) {
|
920 |
-
if (self.currentPageNum <= 1) {
|
921 |
-
return;
|
922 |
-
}
|
923 |
-
|
924 |
-
self.gotoPage(self.currentPageNum - 1);
|
925 |
-
self.jumpToTop();
|
926 |
-
});
|
927 |
-
|
928 |
-
nextbtn.on('click', function (e) {
|
929 |
-
if (self.currentPageNum >= self.pageCount || self.currentPageNum == 0) {
|
930 |
-
return;
|
931 |
-
}
|
932 |
-
self.gotoPage(self.currentPageNum + 1);
|
933 |
-
|
934 |
-
self.jumpToTop();
|
935 |
-
});
|
936 |
-
|
937 |
-
zoominbtn.on('click', function (e) {
|
938 |
-
if (self.zoom >=
|
939 |
-
return;
|
940 |
-
}
|
941 |
-
self.changeZoom(10);
|
942 |
-
});
|
943 |
-
|
944 |
-
zoomoutbtn.on('click', function (e) {
|
945 |
-
if (self.zoom <= 20) {
|
946 |
-
return;
|
947 |
-
}
|
948 |
-
self.changeZoom(-10);
|
949 |
-
});
|
950 |
-
|
951 |
-
|
952 |
-
self.addMoreToolbar(toolbar);
|
953 |
-
|
954 |
-
if (!fixed) {
|
955 |
-
|
956 |
-
divContainer.on('mouseenter', function (e) {
|
957 |
-
var htoolbar = divContainer.find('div.pdfemb-toolbar-hover');
|
958 |
-
if (htoolbar.data('no-hover') !== true) {
|
959 |
-
htoolbar.show();
|
960 |
-
}
|
961 |
-
});
|
962 |
-
|
963 |
-
divContainer.on('mouseleave',
|
964 |
-
function (e) {
|
965 |
-
var htoolbar = divContainer.find('div.pdfemb-toolbar-hover');
|
966 |
-
htoolbar.hide();
|
967 |
-
}
|
968 |
-
);
|
969 |
-
|
970 |
-
divContainer.on('pdfembTouchTapped', function (e) {
|
971 |
-
e.stopPropagation();
|
972 |
-
e.preventDefault();
|
973 |
-
|
974 |
-
// We seem to receive two tap events in quick succession, so toggle doesn't work
|
975 |
-
// - it just gets cancelled immediately.
|
976 |
-
// So set a timed lock on allowing the toggle.
|
977 |
-
if (self.locktaps) {
|
978 |
-
return;
|
979 |
-
}
|
980 |
-
self.locktaps = true;
|
981 |
-
|
982 |
-
var htoolbar = divContainer.find('div.pdfemb-toolbar-hover');
|
983 |
-
|
984 |
-
var wanthide = htoolbar.is(':visible');
|
985 |
-
|
986 |
-
if (htoolbar.data('no-hover') == true) {
|
987 |
-
wanthide = true;
|
988 |
-
}
|
989 |
-
|
990 |
-
if (wanthide) {
|
991 |
-
htoolbar.hide();
|
992 |
-
}
|
993 |
-
else {
|
994 |
-
htoolbar.show();
|
995 |
-
}
|
996 |
-
|
997 |
-
setTimeout(function() {
|
998 |
-
// Release lock
|
999 |
-
self.locktaps = false;
|
1000 |
-
}, 250);
|
1001 |
-
|
1002 |
-
});
|
1003 |
-
|
1004 |
-
}
|
1005 |
-
|
1006 |
-
// Powered by
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
//var
|
1015 |
-
var
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
this.
|
1021 |
-
this.
|
1022 |
-
this.
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
var
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
this.
|
1042 |
-
|
1043 |
-
|
1044 |
-
this.
|
1045 |
-
|
1046 |
-
|
1047 |
-
this.
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
this.
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
|
1 |
+
;var PDFEMB_NS = {};
|
2 |
+
|
3 |
+
jQuery(document).ready(function($) {
|
4 |
+
|
5 |
+
var PIXEL_RATIO = (function () {
|
6 |
+
var ctx = document.createElement("canvas").getContext("2d"),
|
7 |
+
dpr = window.devicePixelRatio || 1,
|
8 |
+
bsr = ctx.webkitBackingStorePixelRatio ||
|
9 |
+
ctx.mozBackingStorePixelRatio ||
|
10 |
+
ctx.msBackingStorePixelRatio ||
|
11 |
+
ctx.oBackingStorePixelRatio ||
|
12 |
+
ctx.backingStorePixelRatio || 1;
|
13 |
+
|
14 |
+
return dpr / bsr;
|
15 |
+
})();
|
16 |
+
|
17 |
+
PDFEMB_NS.PIXEL_RATIO = PIXEL_RATIO;
|
18 |
+
|
19 |
+
var CANVAS_MAX_PIXELS = 16777000; // 16777216 is max on iPhone Safari
|
20 |
+
|
21 |
+
|
22 |
+
createHiDPICanvas = function (w, h, ratio) {
|
23 |
+
if (!ratio) {
|
24 |
+
ratio = PIXEL_RATIO;
|
25 |
+
}
|
26 |
+
var can = document.createElement("canvas");
|
27 |
+
can.width = w * ratio;
|
28 |
+
can.height = h * ratio;
|
29 |
+
can.style.width = w + "px";
|
30 |
+
can.style.height = h + "px";
|
31 |
+
can.getContext("2d").setTransform(ratio, 0, 0, ratio, 0, 0);
|
32 |
+
return can;
|
33 |
+
};
|
34 |
+
|
35 |
+
var vscrollbarwidth = 0,
|
36 |
+
hscrollbarheight = 0;
|
37 |
+
|
38 |
+
(function() {
|
39 |
+
// Create the measurement node
|
40 |
+
var scrollDiv = document.createElement("div");
|
41 |
+
scrollDiv.style.width = '100px';
|
42 |
+
scrollDiv.style.height = '100px';
|
43 |
+
scrollDiv.style.overflow = 'scroll';
|
44 |
+
scrollDiv.style.position = 'absolute';
|
45 |
+
scrollDiv.style.top = '-9999px';
|
46 |
+
document.body.appendChild(scrollDiv);
|
47 |
+
|
48 |
+
// Get the scrollbar width
|
49 |
+
vscrollbarwidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
|
50 |
+
hscrollbarheight = scrollDiv.offsetHeight - scrollDiv.clientHeight;
|
51 |
+
|
52 |
+
// Delete the DIV
|
53 |
+
document.body.removeChild(scrollDiv);
|
54 |
+
})();
|
55 |
+
|
56 |
+
PDFEMB_NS.vscrollbarwidth = vscrollbarwidth;
|
57 |
+
PDFEMB_NS.hscrollbarheight = hscrollbarheight;
|
58 |
+
|
59 |
+
var pdfembPagesViewer = function (pdfDoc, divContainer, showIsSecure) {
|
60 |
+
this.pdfDoc = pdfDoc;
|
61 |
+
this.divContainer = divContainer;
|
62 |
+
this.showIsSecure = showIsSecure;
|
63 |
+
|
64 |
+
this.initialResize = false;
|
65 |
+
this.firstPageWidth = 0;
|
66 |
+
this.firstPageHeight = 0;
|
67 |
+
this.invalidationRound = 1;
|
68 |
+
this.currentPageNum = 0;
|
69 |
+
this.zoom = 100;
|
70 |
+
this.fromZoom = 0;
|
71 |
+
this.toZoom = 0;
|
72 |
+
};
|
73 |
+
|
74 |
+
pdfembPagesViewer.prototype.setup = function () {
|
75 |
+
var self = this;
|
76 |
+
|
77 |
+
var divContainer = this.divContainer;
|
78 |
+
var pdfDoc_ = this.pdfDoc;
|
79 |
+
var showIsSecure = this.showIsSecure;
|
80 |
+
|
81 |
+
this.numPages = pdfDoc_.numPages;
|
82 |
+
|
83 |
+
var scrollbar = divContainer.data('scrollbar');
|
84 |
+
this.vscrollbar = scrollbar == 'both' || scrollbar == 'vertical';
|
85 |
+
this.hscrollbar = scrollbar == 'both' || scrollbar == 'horizontal';
|
86 |
+
|
87 |
+
var style = 'overflow-y: ' + (this.vscrollbar ? 'scroll' : 'hidden') + '; ';
|
88 |
+
style += 'overflow-x: ' + (this.hscrollbar ? 'scroll' : 'hidden') + '; ';
|
89 |
+
|
90 |
+
divContainer.empty().append(
|
91 |
+
$('<div></div>', {'class': 'pdfemb-pagescontainer', 'style': style}));
|
92 |
+
|
93 |
+
divContainer.data('pdfDoc', pdfDoc_);
|
94 |
+
|
95 |
+
var toolbar_location = divContainer.data('toolbar');
|
96 |
+
|
97 |
+
if (toolbar_location == 'top' || toolbar_location == 'both') {
|
98 |
+
this.addToolbar(true, divContainer.data('toolbar-fixed') == 'on', showIsSecure);
|
99 |
+
}
|
100 |
+
|
101 |
+
if (toolbar_location == 'bottom' || toolbar_location == 'both') {
|
102 |
+
this.addToolbar(false, divContainer.data('toolbar-fixed') == 'on', showIsSecure);
|
103 |
+
}
|
104 |
+
|
105 |
+
|
106 |
+
// Annotations layer
|
107 |
+
// Set up annotations layer factory
|
108 |
+
|
109 |
+
if (typeof(PDFEMB_NS.pdfembPremiumAnnotationsLayerFactory) != 'undefined') {
|
110 |
+
self.annotationsLayerFactory = new PDFEMB_NS.pdfembPremiumAnnotationsLayerFactory();
|
111 |
+
}
|
112 |
+
else {
|
113 |
+
self.annotationsLayerFactory = {
|
114 |
+
createAnnotationsLayerBuilder: function (pageDiv, pdfPage) {
|
115 |
+
return null;
|
116 |
+
}
|
117 |
+
}
|
118 |
+
}
|
119 |
+
self.annotationLayerFactories = Array();
|
120 |
+
|
121 |
+
// Text Layer
|
122 |
+
|
123 |
+
if (typeof(PDFEMB_NS.pdfembPremiumTextLayerFactory) != 'undefined') {
|
124 |
+
self.textLayerFactory = new PDFEMB_NS.pdfembPremiumTextLayerFactory();
|
125 |
+
}
|
126 |
+
else {
|
127 |
+
self.textLayerFactory = {
|
128 |
+
createTextLayerBuilder: function (pageDiv, pdfPage) {
|
129 |
+
return null;
|
130 |
+
}
|
131 |
+
}
|
132 |
+
}
|
133 |
+
self.textLayerFactories = Array();
|
134 |
+
|
135 |
+
// React to page jump event
|
136 |
+
|
137 |
+
divContainer.on('pdfembGotopage', function (e, pageNum) {
|
138 |
+
if (pageNum > this.numPages || pageNum <= 0) {
|
139 |
+
return;
|
140 |
+
}
|
141 |
+
|
142 |
+
self.gotoPage(pageNum);
|
143 |
+
self.jumpToTop();
|
144 |
+
|
145 |
+
});
|
146 |
+
|
147 |
+
divContainer.on('pdfembGotoHash', function (e, destobj) {
|
148 |
+
if (!destobj.dest) {
|
149 |
+
return;
|
150 |
+
}
|
151 |
+
dest = destobj.dest;
|
152 |
+
|
153 |
+
var destinationPromise;
|
154 |
+
if (typeof dest === 'string') {
|
155 |
+
destString = dest;
|
156 |
+
destinationPromise = self.pdfDoc.getDestination(dest);
|
157 |
+
} else {
|
158 |
+
destinationPromise = Promise.resolve(dest);
|
159 |
+
}
|
160 |
+
destinationPromise.then(function (destination) {
|
161 |
+
|
162 |
+
if (!(destination instanceof Array) || destination.length < 1) {
|
163 |
+
return; // invalid destination
|
164 |
+
}
|
165 |
+
|
166 |
+
self.pdfDoc.getPageIndex(destination[0]).then(function (pageIndex) {
|
167 |
+
var pageNum = pageIndex + 1;
|
168 |
+
|
169 |
+
if (pageNum > self.numPages || pageNum <= 0 || self.currentPageNum == pageNum) {
|
170 |
+
return;
|
171 |
+
}
|
172 |
+
|
173 |
+
self.gotoPage(pageNum)
|
174 |
+
self.jumpToTop();
|
175 |
+
});
|
176 |
+
|
177 |
+
});
|
178 |
+
});
|
179 |
+
|
180 |
+
divContainer.on('pdfembGotoAction', function (e, action) {
|
181 |
+
var curPage = self.currentPageNum;
|
182 |
+
var newPage = curPage;
|
183 |
+
switch (action) {
|
184 |
+
case 'GoBack':
|
185 |
+
--newPage;
|
186 |
+
break;
|
187 |
+
|
188 |
+
case 'GoForward':
|
189 |
+
++newPage;
|
190 |
+
break;
|
191 |
+
|
192 |
+
case 'NextPage':
|
193 |
+
++newPage;
|
194 |
+
break;
|
195 |
+
|
196 |
+
case 'PrevPage':
|
197 |
+
--newPage;
|
198 |
+
break;
|
199 |
+
|
200 |
+
case 'LastPage':
|
201 |
+
newPage = self.pageCount;
|
202 |
+
break;
|
203 |
+
|
204 |
+
case 'FirstPage':
|
205 |
+
newPage = 1;
|
206 |
+
break;
|
207 |
+
|
208 |
+
default:
|
209 |
+
break; // No action according to spec
|
210 |
+
}
|
211 |
+
|
212 |
+
if (newPage == curPage || newPage > self.pageCount || newPage <= 0) {
|
213 |
+
return;
|
214 |
+
}
|
215 |
+
|
216 |
+
self.gotoPage(newPage);
|
217 |
+
|
218 |
+
});
|
219 |
+
|
220 |
+
divContainer.on('pdfembMagnify', function (event) {
|
221 |
+
self.magnifyEvent(event);
|
222 |
+
});
|
223 |
+
|
224 |
+
divContainer.on('pdfembChangeZoom', function (event, amt) {
|
225 |
+
self.changeZoom(amt);
|
226 |
+
});
|
227 |
+
|
228 |
+
|
229 |
+
// Initial/first page rendering
|
230 |
+
|
231 |
+
this.pageCount = pdfDoc_.numPages;
|
232 |
+
|
233 |
+
if (!divContainer.data('pagenum') || divContainer.data('pagenum') < 1 || divContainer.data('pagenum') > this.pageCount) {
|
234 |
+
divContainer.data('pagenum', 1);
|
235 |
+
}
|
236 |
+
|
237 |
+
divContainer.data('showIsSecure', this.showIsSecure);
|
238 |
+
divContainer.data('pageNumPending', null);
|
239 |
+
|
240 |
+
var startZoom = divContainer.data('fullScreen') == 'on' ? parseInt(divContainer.data('startfpzoom')) : parseInt(divContainer.data('startzoom'));
|
241 |
+
if (isNaN(startZoom) || startZoom < 20 || startZoom > 800) {
|
242 |
+
startZoom = 100;
|
243 |
+
}
|
244 |
+
this.zoom = startZoom;
|
245 |
+
if (startZoom != 100) {
|
246 |
+
divContainer.find('span.pdfemb-zoom').text(startZoom + '%');
|
247 |
+
}
|
248 |
+
|
249 |
+
divContainer.find('span.pdfemb-page-count').text(this.pageCount);
|
250 |
+
|
251 |
+
this.gotoPage(divContainer.data('pagenum'));
|
252 |
+
|
253 |
+
};
|
254 |
+
|
255 |
+
pdfembPagesViewer.prototype.checkForResize = function () {
|
256 |
+
var self = this;
|
257 |
+
var divContainer = self.divContainer;
|
258 |
+
var newheight = $(window).height();
|
259 |
+
var newwidth = $(window).width();
|
260 |
+
|
261 |
+
var oldheight = divContainer.data('checked-window-height');
|
262 |
+
var oldwidth = divContainer.data('checked-window-width');
|
263 |
+
|
264 |
+
if (!oldheight || !oldwidth) {
|
265 |
+
divContainer.data('checked-window-height', newheight);
|
266 |
+
divContainer.data('checked-window-width', newwidth);
|
267 |
+
}
|
268 |
+
|
269 |
+
if (oldheight != newheight || oldwidth != newwidth) {
|
270 |
+
self.resizeViewer();
|
271 |
+
self.resizeInnerDivs();
|
272 |
+
self.invalidateAllPages();
|
273 |
+
self.renderPage(this.currentPageNum);
|
274 |
+
self.prerenderNearbyPages(this.currentPageNum);
|
275 |
+
self.pdfembMakeMobile();
|
276 |
+
|
277 |
+
divContainer.data('checked-window-height', newheight);
|
278 |
+
divContainer.data('checked-window-width', newwidth);
|
279 |
+
}
|
280 |
+
|
281 |
+
if (divContainer.data('fullScreenClosed') != 'true') {
|
282 |
+
setTimeout(function () {
|
283 |
+
self.checkForResize();
|
284 |
+
}, 100);
|
285 |
+
}
|
286 |
+
};
|
287 |
+
|
288 |
+
pdfembPagesViewer.prototype.setSizesBasedOnPage = function (page) {
|
289 |
+
var vp = page.getViewport(1.0); // scale = 1.0
|
290 |
+
|
291 |
+
this.pageWidth = vp.width;
|
292 |
+
this.pageHeight = vp.height;
|
293 |
+
|
294 |
+
if (this.pageWidth <= 0 || this.pageHeight <= 0) {
|
295 |
+
this.divContainer.empty().append(document.createTextNode(pdfemb_trans.objectL10n.widthheightinvalid));
|
296 |
+
return;
|
297 |
+
}
|
298 |
+
};
|
299 |
+
|
300 |
+
pdfembPagesViewer.prototype.createPageInnerDivs = function () {
|
301 |
+
var self = this;
|
302 |
+
var pagesContainer = this.divContainer.find('.pdfemb-pagescontainer');
|
303 |
+
|
304 |
+
for (var i = 1; i <= this.pageCount; ++i) {
|
305 |
+
var innerdiv = pagesContainer.find('.pdfemb-inner-div.pdfemb-page' + i);
|
306 |
+
if (innerdiv.length == 0) {
|
307 |
+
innerdiv = $('<div></div>', {'class': 'pdfemb-inner-div pdfemb-page' + i});
|
308 |
+
innerdiv.data('pageNum', i);
|
309 |
+
pagesContainer.append(innerdiv);
|
310 |
+
}
|
311 |
+
}
|
312 |
+
|
313 |
+
self.resizeInnerDivs();
|
314 |
+
};
|
315 |
+
|
316 |
+
pdfembPagesViewer.prototype.addGrabToPan = function () {
|
317 |
+
var self = this;
|
318 |
+
var divContainer = self.divContainer;
|
319 |
+
var jpagesContainer = divContainer.find('div.pdfemb-pagescontainer');
|
320 |
+
|
321 |
+
var grabtopan = new pdfembGrabToPan({
|
322 |
+
element: jpagesContainer[0]
|
323 |
+
});
|
324 |
+
divContainer.data('grabtopan', grabtopan);
|
325 |
+
|
326 |
+
jpagesContainer.on('scroll', function (e) {
|
327 |
+
var pn = self.getTopVisiblePageNum();
|
328 |
+
if (pn != self.currentPageNum) {
|
329 |
+
self.currentPageNum = pn;
|
330 |
+
self.updatePageNumDisplay(pn);
|
331 |
+
self.renderPage(pn, false);
|
332 |
+
self.prerenderNearbyPages(pn);
|
333 |
+
self.deallocateFarAwayPages(pn);
|
334 |
+
}
|
335 |
+
e.stopPropagation();
|
336 |
+
});
|
337 |
+
|
338 |
+
$(window).resize(function () {
|
339 |
+
setTimeout(function () {
|
340 |
+
self.checkForResize();
|
341 |
+
}, 100);
|
342 |
+
});
|
343 |
+
};
|
344 |
+
|
345 |
+
pdfembPagesViewer.prototype.resizeInnerDivs = function (pageNum) {
|
346 |
+
var self = this;
|
347 |
+
var wantCanvasWidth = self.wantCanvasWidth,
|
348 |
+
wantCanvasHeight = self.wantCanvasHeight,
|
349 |
+
wantHeight = self.wantHeight;
|
350 |
+
|
351 |
+
var pagesContainer = this.divContainer.find('.pdfemb-pagescontainer');
|
352 |
+
|
353 |
+
var innerdivs = pagesContainer.find('.pdfemb-inner-div');
|
354 |
+
|
355 |
+
if (pageNum) {
|
356 |
+
innerdivs = innerdivs.filter('.pdfemb-page'+pageNum);
|
357 |
+
}
|
358 |
+
|
359 |
+
var totalheight = 0;
|
360 |
+
|
361 |
+
innerdivs.each(function(i,elt) {
|
362 |
+
|
363 |
+
var e = $(elt);
|
364 |
+
|
365 |
+
var widthfactor = e.data('widthfactor'),
|
366 |
+
heightfactor = e.data('heightfactor');
|
367 |
+
|
368 |
+
if (!widthfactor) {
|
369 |
+
widthfactor = 1;
|
370 |
+
}
|
371 |
+
if (!heightfactor) {
|
372 |
+
heightfactor = 1;
|
373 |
+
}
|
374 |
+
|
375 |
+
e.data('invalidation-round', this.invalidationRound - 1);
|
376 |
+
|
377 |
+
e.css('width', wantCanvasWidth * widthfactor);
|
378 |
+
|
379 |
+
var height = wantCanvasHeight * heightfactor
|
380 |
+
+ (pageNum == self.numPages || (!pageNum && i == innerdivs.length-1) ? 0 : 2);
|
381 |
+
e.css('height', height);
|
382 |
+
|
383 |
+
totalheight += height;
|
384 |
+
|
385 |
+
var canvas = e.find('.pdfemb-the-canvas');
|
386 |
+
|
387 |
+
canvas.css('width', wantCanvasWidth * widthfactor);
|
388 |
+
canvas.css('height', wantCanvasHeight * heightfactor);
|
389 |
+
});
|
390 |
+
|
391 |
+
var VMargin = 0;
|
392 |
+
if (!pageNum && totalheight < wantHeight) {
|
393 |
+
VMargin = (wantHeight - totalheight) / 2;
|
394 |
+
}
|
395 |
+
innerdivs.first().css('top', VMargin);
|
396 |
+
};
|
397 |
+
|
398 |
+
pdfembPagesViewer.prototype.invalidateAllPages = function () {
|
399 |
+
++this.invalidationRound;
|
400 |
+
};
|
401 |
+
|
402 |
+
pdfembPagesViewer.prototype.prerenderNearbyPages = function (pageNum) {
|
403 |
+
var pagedelta_forward = 3, pagedelta_backward = 2;
|
404 |
+
|
405 |
+
if (this.zoom < 100) {
|
406 |
+
pagedelta_forward *= Math.min(Math.ceil(100 / this.zoom), 10);
|
407 |
+
pagedelta_backward *= Math.min(Math.ceil(100 / this.zoom), 10);
|
408 |
+
}
|
409 |
+
|
410 |
+
for (var pn = Math.max(1, pageNum - pagedelta_backward); pn <= Math.min(pageNum + pagedelta_forward, this.numPages); ++pn) {
|
411 |
+
if (pn != pageNum) {
|
412 |
+
this.renderPage(pn, false);
|
413 |
+
}
|
414 |
+
}
|
415 |
+
};
|
416 |
+
|
417 |
+
pdfembPagesViewer.prototype.deallocateFarAwayPages = function (pageNum) {
|
418 |
+
var pagedelta_forward = 50, pagedelta_backward = 50;
|
419 |
+
|
420 |
+
if (this.zoom < 100) {
|
421 |
+
var extra_pages = Math.min(Math.ceil(100 / this.zoom), 50);
|
422 |
+
pagedelta_forward += extra_pages;
|
423 |
+
pagedelta_backward += extra_pages;
|
424 |
+
}
|
425 |
+
|
426 |
+
var removeCanvas = function(pn) {
|
427 |
+
var pageInnerDiv = pagesContainer.find('.pdfemb-page' + pn);
|
428 |
+
var canvas = pageInnerDiv.find('.pdfemb-the-canvas');
|
429 |
+
if (canvas.length) {
|
430 |
+
canvas.remove();
|
431 |
+
pageInnerDiv.data('invalidation-round', 0);
|
432 |
+
}
|
433 |
+
};
|
434 |
+
|
435 |
+
var pagesContainer = this.divContainer.find('div.pdfemb-pagescontainer');
|
436 |
+
var pn;
|
437 |
+
|
438 |
+
for (pn = 3; pn < pageNum - pagedelta_backward; ++pn) {
|
439 |
+
removeCanvas(pn);
|
440 |
+
}
|
441 |
+
|
442 |
+
for (pn = pageNum + pagedelta_forward; pn < this.numPages; ++pn) {
|
443 |
+
removeCanvas(pn);
|
444 |
+
}
|
445 |
+
};
|
446 |
+
|
447 |
+
pdfembPagesViewer.prototype.resizeViewer = function () {
|
448 |
+
var self = this;
|
449 |
+
var pageWidth = self.pageWidth,
|
450 |
+
pageHeight = self.pageHeight,
|
451 |
+
divContainer = self.divContainer;
|
452 |
+
|
453 |
+
var pagesContainer = divContainer.find('div.pdfemb-pagescontainer');
|
454 |
+
|
455 |
+
var oldScrollLeft = pagesContainer[0].scrollLeft;
|
456 |
+
var oldScrollTop = pagesContainer[0].scrollTop;
|
457 |
+
|
458 |
+
// Max out at parent container width
|
459 |
+
var parentWidth = divContainer.parent().width();
|
460 |
+
|
461 |
+
var wantWidth = pageWidth;
|
462 |
+
|
463 |
+
if (divContainer.data('width') == 'max') {
|
464 |
+
wantWidth = parentWidth;
|
465 |
+
}
|
466 |
+
else if (divContainer.data('width') == 'auto') {
|
467 |
+
wantWidth = pageWidth;
|
468 |
+
}
|
469 |
+
else {
|
470 |
+
wantWidth = parseInt(divContainer.data('width'), 10);
|
471 |
+
if (isNaN(wantWidth) || wantWidth <= 0) {
|
472 |
+
wantWidth = parentWidth;
|
473 |
+
}
|
474 |
+
}
|
475 |
+
|
476 |
+
if (wantWidth <= 0) {
|
477 |
+
wantWidth = pageWidth;
|
478 |
+
}
|
479 |
+
|
480 |
+
// Always max at the parent container width
|
481 |
+
if (wantWidth > parentWidth && parentWidth > 0) {
|
482 |
+
wantWidth = parentWidth;
|
483 |
+
}
|
484 |
+
|
485 |
+
var wantHeight = pageHeight * wantWidth / pageWidth;
|
486 |
+
|
487 |
+
var wantMobile = self.pdfembWantMobile(wantWidth, userHeight);
|
488 |
+
|
489 |
+
self.wantMobile = wantMobile;
|
490 |
+
|
491 |
+
var fixedToolbars = divContainer.find('div.pdfemb-toolbar-fixed');
|
492 |
+
|
493 |
+
var actualFixedToolbars = wantMobile ? 0 : fixedToolbars.length;
|
494 |
+
|
495 |
+
// Height can be overridden by user
|
496 |
+
var userHeight = parseInt(divContainer.data('height'), 10);
|
497 |
+
if (isNaN(userHeight) || userHeight <= 0 || userHeight > wantHeight) {
|
498 |
+
if (divContainer.data('height') == "auto") { // Mainly for full screen mode
|
499 |
+
userHeight = divContainer.parent().height() - actualFixedToolbars * fixedToolbars.height();
|
500 |
+
}
|
501 |
+
else { // max
|
502 |
+
userHeight = wantHeight;
|
503 |
+
}
|
504 |
+
}
|
505 |
+
|
506 |
+
self.userHeight = userHeight;
|
507 |
+
|
508 |
+
wantWidth = Math.floor(wantWidth);
|
509 |
+
wantHeight = Math.floor(wantHeight);
|
510 |
+
|
511 |
+
|
512 |
+
var zoom = 100;
|
513 |
+
|
514 |
+
var wantCanvasWidth = wantWidth - (self.vscrollbar ? vscrollbarwidth : 0);
|
515 |
+
var wantCanvasHeight = wantHeight - (self.hscrollbar ? hscrollbarheight : 0);
|
516 |
+
|
517 |
+
var reducefactor = 1;
|
518 |
+
|
519 |
+
if (!wantMobile) {
|
520 |
+
|
521 |
+
zoom = self.zoom;
|
522 |
+
|
523 |
+
wantCanvasWidth = wantCanvasWidth * zoom / 100;
|
524 |
+
wantCanvasHeight = wantCanvasHeight * zoom / 100;
|
525 |
+
|
526 |
+
|
527 |
+
// Check canvas won't be too big
|
528 |
+
if (wantCanvasWidth*wantCanvasHeight*PIXEL_RATIO*PIXEL_RATIO > CANVAS_MAX_PIXELS) {
|
529 |
+
reducefactor = CANVAS_MAX_PIXELS / (wantCanvasWidth*wantCanvasHeight*PIXEL_RATIO*PIXEL_RATIO);
|
530 |
+
}
|
531 |
+
|
532 |
+
}
|
533 |
+
|
534 |
+
// Set values
|
535 |
+
|
536 |
+
if (wantWidth != divContainer.width()) {
|
537 |
+
divContainer.width(wantWidth);
|
538 |
+
}
|
539 |
+
|
540 |
+
if (divContainer.height() != userHeight) {
|
541 |
+
divContainer.height(userHeight + actualFixedToolbars * fixedToolbars.height());
|
542 |
+
}
|
543 |
+
|
544 |
+
pagesContainer.width(wantWidth);
|
545 |
+
pagesContainer.height(userHeight);
|
546 |
+
|
547 |
+
var fixedTopToolbars = fixedToolbars.filter('.pdfemb-toolbar-top');
|
548 |
+
if (actualFixedToolbars > 0) {
|
549 |
+
pagesContainer.css('top', fixedTopToolbars.height());
|
550 |
+
}
|
551 |
+
|
552 |
+
var canvasscale = ( wantWidth - (self.vscrollbar ? vscrollbarwidth : 0) ) / pageWidth;
|
553 |
+
|
554 |
+
if (self.fromZoom != 0 && self.toZoom != 0) {
|
555 |
+
|
556 |
+
var oldMidX = oldScrollLeft + self.pccentreLeft;
|
557 |
+
var oldMidY = oldScrollTop + self.pccentreTop;
|
558 |
+
|
559 |
+
pagesContainer[0].scrollLeft = (oldScrollLeft + self.pccentreLeft ) * (self.toZoom / self.fromZoom) - self.pccentreLeft;
|
560 |
+
pagesContainer[0].scrollTop = (oldScrollTop + self.pccentreTop) * (self.toZoom / self.fromZoom) - self.pccentreTop;
|
561 |
+
}
|
562 |
+
|
563 |
+
self.fromZoom = 0;
|
564 |
+
self.toZoom = 0;
|
565 |
+
|
566 |
+
self.wantCanvasWidth = wantCanvasWidth;
|
567 |
+
self.wantCanvasHeight = wantCanvasHeight;
|
568 |
+
self.reducefactor = reducefactor;
|
569 |
+
|
570 |
+
self.wantWidth = wantWidth;
|
571 |
+
self.wantHeight = wantHeight;
|
572 |
+
self.canvasscale = canvasscale;
|
573 |
+
self.zoom = zoom;
|
574 |
+
};
|
575 |
+
|
576 |
+
pdfembPagesViewer.prototype.getTopVisiblePageNum = function () {
|
577 |
+
var pagesContainer = this.divContainer.find('.pdfemb-pagescontainer');
|
578 |
+
var innerdivs = pagesContainer.find('.pdfemb-inner-div:visible');
|
579 |
+
|
580 |
+
if (innerdivs.length > 0) {
|
581 |
+
return innerdivs.first().data('pageNum');
|
582 |
+
}
|
583 |
+
return 1;
|
584 |
+
};
|
585 |
+
|
586 |
+
pdfembPagesViewer.prototype.gotoPage = function (pageNum) {
|
587 |
+
if (pageNum <= 0 || pageNum > this.pageCount) {
|
588 |
+
return;
|
589 |
+
}
|
590 |
+
this.renderPage(pageNum, true);
|
591 |
+
this.currentPageNum = pageNum;
|
592 |
+
this.updatePageNumDisplay(pageNum);
|
593 |
+
this.prerenderNearbyPages(pageNum);
|
594 |
+
this.deallocateFarAwayPages(pageNum);
|
595 |
+
|
596 |
+
};
|
597 |
+
|
598 |
+
pdfembPagesViewer.prototype.updatePageNumDisplay = function (pageNum) {
|
599 |
+
var divContainer = this.divContainer;
|
600 |
+
// Update page counters
|
601 |
+
divContainer.find('div.pdfemb-toolbar .pdfemb-page-num').each(function (i, pageNumDisplay) {
|
602 |
+
var jpageNumDisplay = $(pageNumDisplay);
|
603 |
+
if (jpageNumDisplay.is('span')) {
|
604 |
+
// Normal span area
|
605 |
+
jpageNumDisplay.text(pageNum);
|
606 |
+
} else {
|
607 |
+
// User-changeable text
|
608 |
+
jpageNumDisplay.val(pageNum);
|
609 |
+
}
|
610 |
+
});
|
611 |
+
|
612 |
+
// Enable or disable next/prev buttons
|
613 |
+
if (pageNum < this.pageCount) {
|
614 |
+
divContainer.find('.pdfemb-next').removeAttr('disabled').removeClass('pdfemb-btndisabled');
|
615 |
+
}
|
616 |
+
else {
|
617 |
+
divContainer.find('.pdfemb-next').attr('disabled', 'disabled').addClass('pdfemb-btndisabled');
|
618 |
+
}
|
619 |
+
|
620 |
+
if (pageNum > 1) {
|
621 |
+
divContainer.find('.pdfemb-prev').removeAttr('disabled').removeClass('pdfemb-btndisabled');
|
622 |
+
}
|
623 |
+
else {
|
624 |
+
divContainer.find('.pdfemb-prev').attr('disabled', 'disabled').addClass('pdfemb-btndisabled');
|
625 |
+
}
|
626 |
+
|
627 |
+
};
|
628 |
+
|
629 |
+
pdfembPagesViewer.prototype.scrollPageIntoView = function (pageNum) {
|
630 |
+
var pagesContainer = this.divContainer.find('.pdfemb-pagescontainer');
|
631 |
+
|
632 |
+
var innerdiv = pagesContainer.find('.pdfemb-page' + pageNum);
|
633 |
+
|
634 |
+
pagesContainer.find('.pdfemb-inner-div').not('.pdfemb-page' + pageNum).hide();
|
635 |
+
|
636 |
+
innerdiv.show();
|
637 |
+
pagesContainer[0].scrollTop = 0;
|
638 |
+
};
|
639 |
+
|
640 |
+
pdfembPagesViewer.prototype.renderPage = function (pageNum, scrollIntoView) {
|
641 |
+
var self = this;
|
642 |
+
|
643 |
+
var myInvalidationRound = self.invalidationRound;
|
644 |
+
|
645 |
+
var divContainer = this.divContainer;
|
646 |
+
|
647 |
+
// Using promise to fetch the page
|
648 |
+
var pdfDoc = divContainer.data('pdfDoc');
|
649 |
+
|
650 |
+
var pagesContainer = divContainer.find('.pdfemb-pagescontainer');
|
651 |
+
var innerdiv = pagesContainer.find('.pdfemb-page' + pageNum);
|
652 |
+
|
653 |
+
if (innerdiv.length && innerdiv.data('invalidation-round') >= myInvalidationRound) {
|
654 |
+
if (scrollIntoView) {
|
655 |
+
self.scrollPageIntoView(pageNum);
|
656 |
+
}
|
657 |
+
return;
|
658 |
+
}
|
659 |
+
|
660 |
+
var pendingInvalidationRound = innerdiv.data('pending-drawing-round');
|
661 |
+
|
662 |
+
if (pendingInvalidationRound >= myInvalidationRound) {
|
663 |
+
// Already being drawn
|
664 |
+
return;
|
665 |
+
}
|
666 |
+
else if (pendingInvalidationRound > 0 && pendingInvalidationRound < myInvalidationRound) {
|
667 |
+
innerdiv.data('pending-drawing-round', myInvalidationRound);
|
668 |
+
// Queue up this rendering - but we can't do it right now.
|
669 |
+
return;
|
670 |
+
}
|
671 |
+
|
672 |
+
innerdiv.data('pending-drawing-round', myInvalidationRound);
|
673 |
+
|
674 |
+
pdfDoc.getPage(pageNum).then(function (page) {
|
675 |
+
|
676 |
+
if (!self.initialResize) {
|
677 |
+
self.initialResize = true;
|
678 |
+
|
679 |
+
self.setSizesBasedOnPage(page);
|
680 |
+
|
681 |
+
self.resizeViewer();
|
682 |
+
|
683 |
+
self.createPageInnerDivs();
|
684 |
+
|
685 |
+
self.addGrabToPan();
|
686 |
+
|
687 |
+
self.pdfembMakeMobile();
|
688 |
+
}
|
689 |
+
|
690 |
+
// Lookup again if only just created
|
691 |
+
if (innerdiv.length == 0) {
|
692 |
+
innerdiv = pagesContainer.find('.pdfemb-page' + pageNum);
|
693 |
+
}
|
694 |
+
|
695 |
+
// Is this page the same size/shape as the first?
|
696 |
+
|
697 |
+
var widthfactor = innerdiv.data('widthfactor'),
|
698 |
+
heightfactor = innerdiv.data('heightfactor');
|
699 |
+
|
700 |
+
if (!widthfactor || !heightfactor) {
|
701 |
+
// calculate factors
|
702 |
+
var vp = page.getViewport(1.0); // scale = 1.0
|
703 |
+
|
704 |
+
widthfactor = vp.width / self.pageWidth;
|
705 |
+
heightfactor = vp.height / self.pageHeight;
|
706 |
+
|
707 |
+
innerdiv.data('widthfactor', widthfactor);
|
708 |
+
innerdiv.data('heightfactor', heightfactor);
|
709 |
+
|
710 |
+
if (widthfactor != 1 || heightfactor != 1) {
|
711 |
+
self.resizeInnerDivs(pageNum);
|
712 |
+
}
|
713 |
+
}
|
714 |
+
|
715 |
+
var canvas = innerdiv.find('.pdfemb-the-canvas');
|
716 |
+
if (canvas.length == 0) {
|
717 |
+
canvas = $('<canvas></canvas>', {'class': 'pdfemb-the-canvas'});
|
718 |
+
innerdiv.append(canvas);
|
719 |
+
}
|
720 |
+
|
721 |
+
if (scrollIntoView) {
|
722 |
+
self.scrollPageIntoView(pageNum);
|
723 |
+
}
|
724 |
+
|
725 |
+
var canvasImg = null;
|
726 |
+
var canvasCxt = null;
|
727 |
+
var oldCanvasWidth = null;
|
728 |
+
var oldCanvasHeight = null;
|
729 |
+
|
730 |
+
var wantCanvasWidth = self.wantCanvasWidth,
|
731 |
+
wantCanvasHeight = self.wantCanvasHeight,
|
732 |
+
canvasscale = self.canvasscale,
|
733 |
+
zoom = self.zoom;
|
734 |
+
|
735 |
+
canvas.css('width', wantCanvasWidth * widthfactor);
|
736 |
+
canvas.css('height', wantCanvasHeight * heightfactor);
|
737 |
+
|
738 |
+
if (self.wantMobile) {
|
739 |
+
divContainer.data('grabtopan').deactivate();
|
740 |
+
}
|
741 |
+
else {
|
742 |
+
divContainer.data('grabtopan').activate();
|
743 |
+
}
|
744 |
+
|
745 |
+
// Render PDF page into canvas context
|
746 |
+
var viewport = page.getViewport(canvasscale * zoom / 100);
|
747 |
+
|
748 |
+
var offscreenCanvas = document.createElement('canvas');
|
749 |
+
offscreenCanvas.width = wantCanvasWidth * PIXEL_RATIO * self.reducefactor * widthfactor;
|
750 |
+
offscreenCanvas.height = wantCanvasHeight * PIXEL_RATIO * self.reducefactor * heightfactor;
|
751 |
+
|
752 |
+
var ctx = offscreenCanvas.getContext('2d');
|
753 |
+
|
754 |
+
var renderContext = {
|
755 |
+
canvasContext: ctx,
|
756 |
+
viewport: viewport,
|
757 |
+
transform: [PIXEL_RATIO * self.reducefactor, 0, 0, PIXEL_RATIO * self.reducefactor, 0, 0]
|
758 |
+
};
|
759 |
+
|
760 |
+
// No longer set transform on ctx explicitly
|
761 |
+
// ctx.setTransform(PIXEL_RATIO, 0, 0, PIXEL_RATIO, 0, 0);
|
762 |
+
// This was not always being picked up first time on some browsers - set via renderContext instead above
|
763 |
+
|
764 |
+
var renderTask = page.render(renderContext);
|
765 |
+
|
766 |
+
var drawCallback = function () {
|
767 |
+
|
768 |
+
canvas[0].width = wantCanvasWidth * PIXEL_RATIO * self.reducefactor * widthfactor;
|
769 |
+
canvas[0].height = wantCanvasHeight * PIXEL_RATIO * self.reducefactor * heightfactor;
|
770 |
+
|
771 |
+
// Render any watermark to off-screen image
|
772 |
+
self.preRenderCanvas(ctx, pageNum, zoom);
|
773 |
+
|
774 |
+
// Copy from off screen canvas
|
775 |
+
var image = ctx.getImageData(0, 0, offscreenCanvas.width, offscreenCanvas.height);
|
776 |
+
canvas[0].getContext('2d').putImageData(image, 0, 0);
|
777 |
+
|
778 |
+
|
779 |
+
// Do annotations layer
|
780 |
+
var annotationLayer = null;
|
781 |
+
if (typeof self.annotationLayerFactories[pageNum] == 'undefined') {
|
782 |
+
annotationLayer = self.annotationsLayerFactory.createAnnotationsLayerBuilder(innerdiv[0], page);
|
783 |
+
self.annotationLayerFactories[pageNum] = annotationLayer;
|
784 |
+
}
|
785 |
+
else {
|
786 |
+
annotationLayer = self.annotationLayerFactories[pageNum];
|
787 |
+
}
|
788 |
+
|
789 |
+
if (annotationLayer != null) {
|
790 |
+
annotationLayer.setupAnnotations(viewport, self.divContainer.data('newwindow'));
|
791 |
+
}
|
792 |
+
|
793 |
+
// End annotations layer
|
794 |
+
|
795 |
+
|
796 |
+
// Do Text Layer
|
797 |
+
|
798 |
+
var textLayer = null;
|
799 |
+
if (typeof self.textLayerFactories[pageNum] == 'undefined') {
|
800 |
+
textLayer = self.textLayerFactory.createTextLayerBuilder(innerdiv[0], page);
|
801 |
+
self.textLayerFactories[pageNum] = textLayer;
|
802 |
+
}
|
803 |
+
else {
|
804 |
+
textLayer = self.textLayerFactories[pageNum];
|
805 |
+
}
|
806 |
+
|
807 |
+
if (textLayer != null) {
|
808 |
+
textLayer.setupText(viewport);
|
809 |
+
}
|
810 |
+
// End Text Layer
|
811 |
+
|
812 |
+
|
813 |
+
innerdiv.data('invalidation-round', myInvalidationRound);
|
814 |
+
|
815 |
+
pendingInvalidationRound = innerdiv.data('pending-drawing-round');
|
816 |
+
|
817 |
+
innerdiv.data('pending-drawing-round', '');
|
818 |
+
|
819 |
+
if (pendingInvalidationRound > myInvalidationRound) {
|
820 |
+
self.renderPage(pageNum, false);
|
821 |
+
}
|
822 |
+
|
823 |
+
}
|
824 |
+
|
825 |
+
|
826 |
+
|
827 |
+
// Wait for rendering to finish
|
828 |
+
renderTask.promise.then( function(){
|
829 |
+
if ('requestAnimationFrame' in window) {
|
830 |
+
window.requestAnimationFrame(drawCallback);
|
831 |
+
}
|
832 |
+
else {
|
833 |
+
setTimeout(drawCallback, 1);
|
834 |
+
}
|
835 |
+
});
|
836 |
+
|
837 |
+
});
|
838 |
+
|
839 |
+
};
|
840 |
+
|
841 |
+
pdfembPagesViewer.prototype.changeZoom = function (zoomdelta) {
|
842 |
+
var self = this;
|
843 |
+
var divContainer = self.divContainer;
|
844 |
+
|
845 |
+
var oldzoom = self.zoom;
|
846 |
+
var newzoom = oldzoom + zoomdelta;
|
847 |
+
self.zoom = newzoom;
|
848 |
+
divContainer.find('span.pdfemb-zoom').text(newzoom + '%');
|
849 |
+
|
850 |
+
self.fromZoom = oldzoom;
|
851 |
+
self.toZoom = newzoom;
|
852 |
+
|
853 |
+
var pagesContainer = divContainer.find('.pdfemb-pagescontainer');
|
854 |
+
self.pccentreLeft = pagesContainer.width()/2;
|
855 |
+
self.pccentreTop = pagesContainer.height()/2;
|
856 |
+
|
857 |
+
self.resizeViewer();
|
858 |
+
self.resizeInnerDivs();
|
859 |
+
self.invalidateAllPages();
|
860 |
+
self.renderPage(self.currentPageNum);
|
861 |
+
|
862 |
+
// Ensure top-left remains where it was
|
863 |
+
|
864 |
+
/*var pagesContainer = divContainer.find('.pdfemb-pagescontainer');
|
865 |
+
|
866 |
+
var cscrolltop = pagesContainer[0].scrollTop;
|
867 |
+
pagesContainer[0].scrollTop = cscrolltop * newzoom / oldzoom;
|
868 |
+
|
869 |
+
var cscrollleft = pagesContainer[0].scrollLeft;
|
870 |
+
pagesContainer[0].scrollLeft = cscrollleft * newzoom / oldzoom; */
|
871 |
+
|
872 |
+
|
873 |
+
self.prerenderNearbyPages(self.currentPageNum);
|
874 |
+
};
|
875 |
+
|
876 |
+
pdfembPagesViewer.prototype.queueRenderPage = function (num, noredraw) {
|
877 |
+
var divContainer = this.divContainer;
|
878 |
+
this.renderPage(num, noredraw);
|
879 |
+
|
880 |
+
/*if (divContainer.data('pageRendering')) {
|
881 |
+
divContainer.data('pageNumPending', num);
|
882 |
+
} else {
|
883 |
+
this.renderPage(num, noredraw);
|
884 |
+
}*/
|
885 |
+
};
|
886 |
+
|
887 |
+
pdfembPagesViewer.prototype.addToolbar = function (atTop, fixed, showIsSecure) {
|
888 |
+
var divContainer = this.divContainer;
|
889 |
+
var self = this;
|
890 |
+
|
891 |
+
var toolbar = $('<div></div>', {'class': 'pdfemb-toolbar pdfemb-toolbar' + (fixed ? '-fixed' : '-hover') + ' ' + (atTop ? ' pdfemb-toolbar-top' : 'pdfemb-toolbar-bottom')});
|
892 |
+
var prevbtn = $('<button class="pdfemb-prev" title="' + pdfemb_trans.objectL10n.prev + '" type="button"></button>');
|
893 |
+
toolbar.append(prevbtn);
|
894 |
+
var nextbtn = $('<button class="pdfemb-next" title="' + pdfemb_trans.objectL10n.next + '" type="button"></button>');
|
895 |
+
toolbar.append(nextbtn);
|
896 |
+
|
897 |
+
toolbar.append($('<div class="pdfemb-page-area">' + pdfemb_trans.objectL10n.page + ' <span class="pdfemb-page-num">0</span> / <span class="pdfemb-page-count"></span></div>'));
|
898 |
+
|
899 |
+
var zoomoutbtn = $('<button class="pdfemb-zoomout" title="' + pdfemb_trans.objectL10n.zoomout + '" type="button"></button>');
|
900 |
+
toolbar.append(zoomoutbtn);
|
901 |
+
|
902 |
+
var zoominbtn = $('<button class="pdfemb-zoomin" title="' + pdfemb_trans.objectL10n.zoomin + '" type="button"></button>');
|
903 |
+
toolbar.append(zoominbtn);
|
904 |
+
|
905 |
+
toolbar.append($('<div>' + pdfemb_trans.objectL10n.zoom + ' <span class="pdfemb-zoom">100%</span></div>'));
|
906 |
+
|
907 |
+
if (showIsSecure) {
|
908 |
+
toolbar.append($('<div>' + pdfemb_trans.objectL10n.secure + '</div>'));
|
909 |
+
}
|
910 |
+
|
911 |
+
if (atTop) {
|
912 |
+
divContainer.prepend(toolbar);
|
913 |
+
}
|
914 |
+
else {
|
915 |
+
divContainer.append(toolbar);
|
916 |
+
}
|
917 |
+
|
918 |
+
// Add button functions
|
919 |
+
prevbtn.on('click', function (e) {
|
920 |
+
if (self.currentPageNum <= 1) {
|
921 |
+
return;
|
922 |
+
}
|
923 |
+
|
924 |
+
self.gotoPage(self.currentPageNum - 1);
|
925 |
+
self.jumpToTop();
|
926 |
+
});
|
927 |
+
|
928 |
+
nextbtn.on('click', function (e) {
|
929 |
+
if (self.currentPageNum >= self.pageCount || self.currentPageNum == 0) {
|
930 |
+
return;
|
931 |
+
}
|
932 |
+
self.gotoPage(self.currentPageNum + 1);
|
933 |
+
|
934 |
+
self.jumpToTop();
|
935 |
+
});
|
936 |
+
|
937 |
+
zoominbtn.on('click', function (e) {
|
938 |
+
if (self.zoom >= 800) {
|
939 |
+
return;
|
940 |
+
}
|
941 |
+
self.changeZoom(10);
|
942 |
+
});
|
943 |
+
|
944 |
+
zoomoutbtn.on('click', function (e) {
|
945 |
+
if (self.zoom <= 20) {
|
946 |
+
return;
|
947 |
+
}
|
948 |
+
self.changeZoom(-10);
|
949 |
+
});
|
950 |
+
|
951 |
+
|
952 |
+
self.addMoreToolbar(toolbar);
|
953 |
+
|
954 |
+
if (!fixed) {
|
955 |
+
|
956 |
+
divContainer.on('mouseenter', function (e) {
|
957 |
+
var htoolbar = divContainer.find('div.pdfemb-toolbar-hover');
|
958 |
+
if (htoolbar.data('no-hover') !== true) {
|
959 |
+
htoolbar.show();
|
960 |
+
}
|
961 |
+
});
|
962 |
+
|
963 |
+
divContainer.on('mouseleave',
|
964 |
+
function (e) {
|
965 |
+
var htoolbar = divContainer.find('div.pdfemb-toolbar-hover');
|
966 |
+
htoolbar.hide();
|
967 |
+
}
|
968 |
+
);
|
969 |
+
|
970 |
+
divContainer.on('pdfembTouchTapped', function (e) {
|
971 |
+
e.stopPropagation();
|
972 |
+
e.preventDefault();
|
973 |
+
|
974 |
+
// We seem to receive two tap events in quick succession, so toggle doesn't work
|
975 |
+
// - it just gets cancelled immediately.
|
976 |
+
// So set a timed lock on allowing the toggle.
|
977 |
+
if (self.locktaps) {
|
978 |
+
return;
|
979 |
+
}
|
980 |
+
self.locktaps = true;
|
981 |
+
|
982 |
+
var htoolbar = divContainer.find('div.pdfemb-toolbar-hover');
|
983 |
+
|
984 |
+
var wanthide = htoolbar.is(':visible');
|
985 |
+
|
986 |
+
if (htoolbar.data('no-hover') == true) {
|
987 |
+
wanthide = true;
|
988 |
+
}
|
989 |
+
|
990 |
+
if (wanthide) {
|
991 |
+
htoolbar.hide();
|
992 |
+
}
|
993 |
+
else {
|
994 |
+
htoolbar.show();
|
995 |
+
}
|
996 |
+
|
997 |
+
setTimeout(function() {
|
998 |
+
// Release lock
|
999 |
+
self.locktaps = false;
|
1000 |
+
}, 250);
|
1001 |
+
|
1002 |
+
});
|
1003 |
+
|
1004 |
+
}
|
1005 |
+
|
1006 |
+
// Powered by
|
1007 |
+
//console.log("Hello pdf embedder",pdfemb_trans.poweredby);
|
1008 |
+
if (pdfemb_trans.poweredby == "on") {
|
1009 |
+
toolbar.append($('<div></div>', {'class': 'pdfemb-poweredby'}).append($('<a href="https://wp-pdf.com/?utm_source=Poweredby&utm_medium=freemium&utm_campaign=Freemium" target="_blank">wp-pdf.com</a>')));
|
1010 |
+
}
|
1011 |
+
};
|
1012 |
+
|
1013 |
+
pdfembPagesViewer.prototype.magnifyEvent = function (event) {
|
1014 |
+
//var gtpe = $(event.originalEvent.gtpelement);
|
1015 |
+
//var divContainer = gtpe.closest('.pdfemb-viewer');
|
1016 |
+
var mag = event.originalEvent.magnification;
|
1017 |
+
|
1018 |
+
if (mag == -1) {
|
1019 |
+
// End of touch
|
1020 |
+
this.resizeViewer();
|
1021 |
+
this.resizeInnerDivs();
|
1022 |
+
this.invalidateAllPages();
|
1023 |
+
this.renderPage(this.getTopVisiblePageNum());
|
1024 |
+
}
|
1025 |
+
else {
|
1026 |
+
var offset = this.divContainer.find('.pdfemb-pagescontainer').offset();
|
1027 |
+
this.magnifyZoom(mag, event.originalEvent.centreLeft - offset.left, event.originalEvent.centreTop - offset.top);
|
1028 |
+
}
|
1029 |
+
};
|
1030 |
+
|
1031 |
+
pdfembPagesViewer.prototype.magnifyZoom = function (magnification, centreLeft, centreTop) {
|
1032 |
+
var oldzoom = this.zoom;
|
1033 |
+
var newzoom = Math.floor(oldzoom * magnification);
|
1034 |
+
|
1035 |
+
if (newzoom < 20) {
|
1036 |
+
newzoom = 20;
|
1037 |
+
}
|
1038 |
+
if (newzoom > 800) {
|
1039 |
+
newzoom = 800;
|
1040 |
+
}
|
1041 |
+
this.zoom = newzoom;
|
1042 |
+
this.divContainer.find('span.pdfemb-zoom').text(newzoom + '%');
|
1043 |
+
|
1044 |
+
this.fromZoom = oldzoom;
|
1045 |
+
this.toZoom = newzoom;
|
1046 |
+
|
1047 |
+
this.pccentreLeft = centreLeft;
|
1048 |
+
this.pccentreTop = centreTop;
|
1049 |
+
|
1050 |
+
this.resizeViewer();
|
1051 |
+
|
1052 |
+
this.resizeInnerDivs();
|
1053 |
+
this.invalidateAllPages();
|
1054 |
+
|
1055 |
+
};
|
1056 |
+
|
1057 |
+
pdfembPagesViewer.prototype.pdfembWantMobile = function(wantWidth, wantHeight) {
|
1058 |
+
return false;
|
1059 |
+
}
|
1060 |
+
|
1061 |
+
pdfembPagesViewer.prototype.pdfembMakeMobile = function() {
|
1062 |
+
};
|
1063 |
+
|
1064 |
+
pdfembPagesViewer.prototype.addMoreToolbar = function(toolbar) {
|
1065 |
+
};
|
1066 |
+
|
1067 |
+
pdfembPagesViewer.prototype.jumpToTop = function() {
|
1068 |
+
};
|
1069 |
+
|
1070 |
+
pdfembPagesViewer.prototype.preRenderCanvas = function(ctx, pageNum, zoom) {
|
1071 |
+
};
|
1072 |
+
|
1073 |
+
PDFEMB_NS.pdfembPagesViewer = pdfembPagesViewer;
|
1074 |
+
|
1075 |
+
});
|
js/pdfjs/{pdf.js → pdf-4.6.2.js}
RENAMED
@@ -9891,10 +9891,10 @@ function setPDFNetworkStreamFactory(pdfNetworkStreamFactory) {
|
|
9891 |
createPDFNetworkStream = pdfNetworkStreamFactory;
|
9892 |
}
|
9893 |
|
9894 |
-
function getDocument(src) {
|
9895 |
var task = new PDFDocumentLoadingTask();
|
9896 |
var source;
|
9897 |
-
|
9898 |
if (typeof src === 'string') {
|
9899 |
source = {
|
9900 |
url: src
|
@@ -9951,11 +9951,13 @@ function getDocument(src) {
|
|
9951 |
|
9952 |
params[key] = source[key];
|
9953 |
}
|
9954 |
-
|
9955 |
params.rangeChunkSize = params.rangeChunkSize || DEFAULT_RANGE_CHUNK_SIZE;
|
9956 |
params.CMapReaderFactory = params.CMapReaderFactory || _display_utils.DOMCMapReaderFactory;
|
9957 |
params.ignoreErrors = params.stopAtErrors !== true;
|
9958 |
params.pdfBug = params.pdfBug === true;
|
|
|
|
|
9959 |
var NativeImageDecoderValues = Object.values(_util.NativeImageDecoding);
|
9960 |
|
9961 |
if (params.nativeImageDecoderSupport === undefined || !NativeImageDecoderValues.includes(params.nativeImageDecoderSupport)) {
|
9891 |
createPDFNetworkStream = pdfNetworkStreamFactory;
|
9892 |
}
|
9893 |
|
9894 |
+
function getDocument(src,cmapURL) {
|
9895 |
var task = new PDFDocumentLoadingTask();
|
9896 |
var source;
|
9897 |
+
|
9898 |
if (typeof src === 'string') {
|
9899 |
source = {
|
9900 |
url: src
|
9951 |
|
9952 |
params[key] = source[key];
|
9953 |
}
|
9954 |
+
|
9955 |
params.rangeChunkSize = params.rangeChunkSize || DEFAULT_RANGE_CHUNK_SIZE;
|
9956 |
params.CMapReaderFactory = params.CMapReaderFactory || _display_utils.DOMCMapReaderFactory;
|
9957 |
params.ignoreErrors = params.stopAtErrors !== true;
|
9958 |
params.pdfBug = params.pdfBug === true;
|
9959 |
+
params.cMapUrl = cmapURL;
|
9960 |
+
params.cMapPacked = true;
|
9961 |
var NativeImageDecoderValues = Object.values(_util.NativeImageDecoding);
|
9962 |
|
9963 |
if (params.nativeImageDecoderSupport === undefined || !NativeImageDecoderValues.includes(params.nativeImageDecoderSupport)) {
|
js/pdfjs/{pdf.js.map → pdf-4.6.2.js.map}
RENAMED
File without changes
|
js/pdfjs/pdf-4.6.2.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf",[],t):"object"==typeof exports?exports["pdfjs-dist/build/pdf"]=t():e["pdfjs-dist/build/pdf"]=e.pdfjsLib=t()}(this,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},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 n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},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";var n=r(1),i=r(147),a=r(162),o=r(163),s=r(151),u=r(164),l=r(156),c=r(153);if(r(4)()){var h=r(165).PDFNodeStream;i.setPDFNetworkStreamFactory(function(e){return new h(e)})}else{var d,f=r(168).PDFNetworkStream;s.isFetchSupported()&&(d=r(169).PDFFetchStream),i.setPDFNetworkStreamFactory(function(e){return d&&s.isValidFetchUrl(e.url)?new d(e):new f(e)})}t.build=i.build,t.version=i.version,t.getDocument=i.getDocument,t.LoopbackPort=i.LoopbackPort,t.PDFDataRangeTransport=i.PDFDataRangeTransport,t.PDFWorker=i.PDFWorker,t.renderTextLayer=a.renderTextLayer,t.AnnotationLayer=o.AnnotationLayer,t.createPromiseCapability=n.createPromiseCapability,t.PasswordResponses=n.PasswordResponses,t.InvalidPDFException=n.InvalidPDFException,t.MissingPDFException=n.MissingPDFException,t.SVGGraphics=u.SVGGraphics,t.NativeImageDecoding=n.NativeImageDecoding,t.CMapCompressionType=n.CMapCompressionType,t.PermissionFlag=n.PermissionFlag,t.UnexpectedResponseException=n.UnexpectedResponseException,t.OPS=n.OPS,t.VerbosityLevel=n.VerbosityLevel,t.UNSUPPORTED_FEATURES=n.UNSUPPORTED_FEATURES,t.createValidAbsoluteUrl=n.createValidAbsoluteUrl,t.createObjectURL=n.createObjectURL,t.removeNullCharacters=n.removeNullCharacters,t.shadow=n.shadow,t.Util=n.Util,t.ReadableStream=n.ReadableStream,t.URL=n.URL,t.RenderingCancelledException=s.RenderingCancelledException,t.getFilenameFromUrl=s.getFilenameFromUrl,t.LinkTarget=s.LinkTarget,t.addLinkAttributes=s.addLinkAttributes,t.loadScript=s.loadScript,t.PDFDateString=s.PDFDateString,t.GlobalWorkerOptions=l.GlobalWorkerOptions,t.apiCompatibilityParams=c.apiCompatibilityParams},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayByteLength=_,t.arraysToBytes=function(e){if(1===e.length&&e[0]instanceof Uint8Array)return e[0];var t,r,n,i=0,a=e.length;for(t=0;t<a;t++)r=e[t],n=_(r),i+=n;var o=0,s=new Uint8Array(i);for(t=0;t<a;t++)(r=e[t])instanceof Uint8Array||(r="string"==typeof r?b(r):new Uint8Array(r)),n=r.byteLength,s.set(r,o),o+=n;return s},t.assert=c,t.bytesToString=function(e){c(null!==e&&"object"===a(e)&&void 0!==e.length,"Invalid argument for bytesToString");var t=e.length;if(t<8192)return String.fromCharCode.apply(null,e);for(var r=[],n=0;n<t;n+=8192){var i=Math.min(n+8192,t),o=e.subarray(n,i);r.push(String.fromCharCode.apply(null,o))}return r.join("")},t.createPromiseCapability=function(){var e=Object.create(null),t=!1;return Object.defineProperty(e,"settled",{get:function(){return t}}),e.promise=new Promise(function(r,n){e.resolve=function(e){t=!0,r(e)},e.reject=function(e){t=!0,n(e)}}),e},t.getVerbosityLevel=function(){return s},t.info=function(e){s>=o.INFOS&&console.log("Info: "+e)},t.isArrayBuffer=function(e){return"object"===a(e)&&null!==e&&void 0!==e.byteLength},t.isArrayEqual=function(e,t){if(e.length!==t.length)return!1;return e.every(function(e,r){return e===t[r]})},t.isBool=function(e){return"boolean"==typeof e},t.isEmptyObj=function(e){for(var t in e)return!1;return!0},t.isNum=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSpace=function(e){return 32===e||9===e||13===e||10===e},t.isSameOrigin=function(e,t){try{var r=new i.URL(e);if(!r.origin||"null"===r.origin)return!1}catch(e){return!1}var n=new i.URL(t,r);return r.origin===n.origin},t.createValidAbsoluteUrl=function(e,t){if(!e)return null;try{var r=t?new i.URL(e,t):new i.URL(e);if(function(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(r))return r}catch(e){}return null},t.isLittleEndian=function(){var e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]},t.isEvalSupported=function(){try{return new Function(""),!0}catch(e){return!1}},t.log2=function(e){if(e<=0)return 0;return Math.ceil(Math.log2(e))},t.readInt8=function(e,t){return e[t]<<24>>24},t.readUint16=function(e,t){return e[t]<<8|e[t+1]},t.readUint32=function(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0},t.removeNullCharacters=function(e){if("string"!=typeof e)return u("The argument for removeNullCharacters must be a string."),e;return e.replace(y,"")},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(s=e)},t.shadow=function(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r},t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=b,t.stringToPDFString=function(e){var t,r=e.length,n=[];if("þ"===e[0]&&"ÿ"===e[1])for(t=2;t<r;t+=2)n.push(String.fromCharCode(e.charCodeAt(t)<<8|e.charCodeAt(t+1)));else for(t=0;t<r;++t){var i=S[e.charCodeAt(t)];n.push(i?String.fromCharCode(i):e.charAt(t))}return n.join("")},t.stringToUTF8String=function(e){return decodeURIComponent(escape(e))},t.utf8StringToString=function(e){return unescape(encodeURIComponent(e))},t.warn=u,t.unreachable=l,Object.defineProperty(t,"ReadableStream",{enumerable:!0,get:function(){return n.ReadableStream}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return i.URL}}),t.createObjectURL=t.FormatError=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.StreamType=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.NativeImageDecoding=t.MissingPDFException=t.InvalidPDFException=t.AbortException=t.CMapCompressionType=t.ImageKind=t.FontType=t.AnnotationType=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.UNSUPPORTED_FEATURES=t.VerbosityLevel=t.OPS=t.IDENTITY_MATRIX=t.FONT_IDENTITY_MATRIX=void 0,r(2);var n=r(143),i=r(145);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.IDENTITY_MATRIX=[1,0,0,1,0,0];t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0];t.NativeImageDecoding={NONE:"none",DECODE:"decode",DISPLAY:"display"};t.PermissionFlag={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.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4};t.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};t.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26};t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};t.AnnotationFieldFlag={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.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};t.StreamType={UNKNOWN:0,FLATE:1,LZW:2,DCT:3,JPX:4,JBIG:5,A85:6,AHX:7,CCF:8,RL:9};t.FontType={UNKNOWN:0,TYPE1:1,TYPE1C:2,CIDFONTTYPE0:3,CIDFONTTYPE0C:4,TRUETYPE:5,CIDFONTTYPE2:6,TYPE3:7,OPENTYPE:8,TYPE0:9,MMTYPE1:10};var o={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=o;t.CMapCompressionType={NONE:0,BINARY:1,STREAM:2};t.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,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.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"};t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var s=o.WARNINGS;function u(e){s>=o.WARNINGS&&console.log("Warning: "+e)}function l(e){throw new Error(e)}function c(e,t){e||l(t)}var h=function(){function e(e,t){this.name="PasswordException",this.message=e,this.code=t}return e.prototype=new Error,e.constructor=e,e}();t.PasswordException=h;var d=function(){function e(e,t){this.name="UnknownErrorException",this.message=e,this.details=t}return e.prototype=new Error,e.constructor=e,e}();t.UnknownErrorException=d;var f=function(){function e(e){this.name="InvalidPDFException",this.message=e}return e.prototype=new Error,e.constructor=e,e}();t.InvalidPDFException=f;var p=function(){function e(e){this.name="MissingPDFException",this.message=e}return e.prototype=new Error,e.constructor=e,e}();t.MissingPDFException=p;var v=function(){function e(e,t){this.name="UnexpectedResponseException",this.message=e,this.status=t}return e.prototype=new Error,e.constructor=e,e}();t.UnexpectedResponseException=v;var m=function(){function e(e){this.message=e}return e.prototype=new Error,e.prototype.name="FormatError",e.constructor=e,e}();t.FormatError=m;var g=function(){function e(e){this.name="AbortException",this.message=e}return e.prototype=new Error,e.constructor=e,e}();t.AbortException=g;var y=/\x00/g;function b(e){c("string"==typeof e,"Invalid argument for stringToBytes");for(var t=e.length,r=new Uint8Array(t),n=0;n<t;++n)r[n]=255&e.charCodeAt(n);return r}function _(e){return void 0!==e.length?e.length:(c(void 0!==e.byteLength),e.byteLength)}var A=function(){function e(){}var t=["rgb(",0,",",0,",",0,")"];return e.makeCssRgb=function(e,r,n){return t[1]=e,t[3]=r,t[5]=n,t.join("")},e.transform=function(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]]},e.applyTransform=function(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]},e.applyInverseTransform=function(e,t){var r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]},e.getAxialAlignedBoundingBox=function(t,r){var n=e.applyTransform(t,r),i=e.applyTransform(t.slice(2,4),r),a=e.applyTransform([t[0],t[3]],r),o=e.applyTransform([t[2],t[1]],r);return[Math.min(n[0],i[0],a[0],o[0]),Math.min(n[1],i[1],a[1],o[1]),Math.max(n[0],i[0],a[0],o[0]),Math.max(n[1],i[1],a[1],o[1])]},e.inverseTransform=function(e){var 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]},e.apply3dTransform=function(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]]},e.singularValueDecompose2dScale=function(e){var t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],n=e[0]*t[1]+e[1]*t[3],i=e[2]*t[0]+e[3]*t[2],a=e[2]*t[1]+e[3]*t[3],o=(r+a)/2,s=Math.sqrt((r+a)*(r+a)-4*(r*a-i*n))/2,u=o+s||1,l=o-s||1;return[Math.sqrt(u),Math.sqrt(l)]},e.normalizeRect=function(e){var 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},e.intersect=function(t,r){function n(e,t){return e-t}var i=[t[0],t[2],r[0],r[2]].sort(n),a=[t[1],t[3],r[1],r[3]].sort(n),o=[];return t=e.normalizeRect(t),r=e.normalizeRect(r),(i[0]===t[0]&&i[1]===r[0]||i[0]===r[0]&&i[1]===t[0])&&(o[0]=i[1],o[2]=i[2],(a[0]===t[1]&&a[1]===r[1]||a[0]===r[1]&&a[1]===t[1])&&(o[1]=a[1],o[3]=a[2],o))},e}();t.Util=A;var S=[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];var w,k=(w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",function(e,t){if(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2])&&i.URL.createObjectURL){var r=new Blob([e],{type:t});return i.URL.createObjectURL(r)}for(var n="data:"+t+";base64,",a=0,o=e.length;a<o;a+=3){var s=255&e[a],u=255&e[a+1],l=255&e[a+2];n+=w[s>>2]+w[(3&s)<<4|u>>4]+w[a+1<o?(15&u)<<2|l>>6:64]+w[a+2<o?63&l:64]}return n});t.createObjectURL=k},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(3);if(!i._pdfjsCompatibilityChecked){i._pdfjsCompatibilityChecked=!0;var a=r(4),o="object"===("undefined"==typeof window?"undefined":n(window))&&"object"===("undefined"==typeof document?"undefined":n(document));!i.btoa&&a()&&(i.btoa=function(e){return Buffer.from(e,"binary").toString("base64")}),!i.atob&&a()&&(i.atob=function(e){return Buffer.from(e,"base64").toString("binary")}),o&&void 0===Element.prototype.remove&&(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),function(){if(o&&!a()){var e=document.createElement("div");if(e.classList.add("testOne","testTwo"),!0!==e.classList.contains("testOne")||!0!==e.classList.contains("testTwo")){var t=DOMTokenList.prototype.add,r=DOMTokenList.prototype.remove;DOMTokenList.prototype.add=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];for(var i=0,a=r;i<a.length;i++){var o=a[i];t.call(this,o)}},DOMTokenList.prototype.remove=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0,a=t;i<a.length;i++){var o=a[i];r.call(this,o)}}}}}(),o&&!a()&&!1!==document.createElement("div").classList.toggle("test",0)&&(DOMTokenList.prototype.toggle=function(e){var t=arguments.length>1?!!arguments[1]:!this.contains(e);return this[t?"add":"remove"](e),t}),String.prototype.startsWith||r(5),String.prototype.endsWith||r(36),String.prototype.includes||r(38),Array.prototype.includes||r(40),Array.from||r(47),Object.assign||r(70),Math.log2||(Math.log2=r(75)),Number.isNaN||(Number.isNaN=r(77)),Number.isInteger||(Number.isInteger=r(79)),i.Promise&&i.Promise.prototype&&i.Promise.prototype.finally||(i.Promise=r(82)),i.WeakMap||(i.WeakMap=r(102)),i.WeakSet||(i.WeakSet=r(119)),String.codePointAt||(String.codePointAt=r(123)),String.fromCodePoint||(String.fromCodePoint=r(125)),i.Symbol||r(127),String.prototype.padStart||r(134),String.prototype.padEnd||r(138),Object.values||(Object.values=r(140))}},function(e,t,r){"use strict";e.exports="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:{}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(){return"object"===("undefined"==typeof process?"undefined":n(process))&&process+""=="[object process]"&&!process.versions.nw&&!process.versions.electron}},function(e,t,r){"use strict";r(6),e.exports=r(9).String.startsWith},function(e,t,r){"use strict";var n=r(7),i=r(28),a=r(30),o="".startsWith;n(n.P+n.F*r(35)("startsWith"),"String",{startsWith:function(e){var t=a(this,e,"startsWith"),r=i(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),n=String(e);return o?o.call(t,n,r):t.slice(r,r+n.length)===n}})},function(e,t,r){"use strict";var n=r(8),i=r(9),a=r(10),o=r(20),s=r(26),u=function e(t,r,u){var l,c,h,d,f=t&e.F,p=t&e.G,v=t&e.P,m=t&e.B,g=p?n:t&e.S?n[r]||(n[r]={}):(n[r]||{}).prototype,y=p?i:i[r]||(i[r]={}),b=y.prototype||(y.prototype={});for(l in p&&(u=r),u)h=((c=!f&&g&&void 0!==g[l])?g:u)[l],d=m&&c?s(h,n):v&&"function"==typeof h?s(Function.call,h):h,g&&o(g,l,h,t&e.U),y[l]!=h&&a(y,l,d),v&&b[l]!=h&&(b[l]=h)};n.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,r){"use strict";var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,r){"use strict";var n=e.exports={version:"2.6.9"};"number"==typeof __e&&(__e=n)},function(e,t,r){"use strict";var n=r(11),i=r(19);e.exports=r(15)?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){"use strict";var n=r(12),i=r(14),a=r(18),o=Object.defineProperty;t.f=r(15)?Object.defineProperty:function(e,t,r){if(n(e),t=a(t,!0),n(r),i)try{return o(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){"use strict";var n=r(13);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return"object"===n(e)?null!==e:"function"==typeof e}},function(e,t,r){"use strict";e.exports=!r(15)&&!r(16)(function(){return 7!=Object.defineProperty(r(17)("div"),"a",{get:function(){return 7}}).a})},function(e,t,r){"use strict";e.exports=!r(16)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,r){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){"use strict";var n=r(13),i=r(8).document,a=n(i)&&n(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,r){"use strict";var n=r(13);e.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,r){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){"use strict";var n=r(8),i=r(10),a=r(21),o=r(22)("src"),s=r(23),u=(""+s).split("toString");r(9).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,r,s){var l="function"==typeof r;l&&(a(r,"name")||i(r,"name",t)),e[t]!==r&&(l&&(a(r,o)||i(r,o,e[t]?""+e[t]:u.join(String(t)))),e===n?e[t]=r:s?e[t]?e[t]=r:i(e,t,r):(delete e[t],i(e,t,r)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[o]||s.call(this)})},function(e,t,r){"use strict";var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,r){"use strict";var n=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},function(e,t,r){"use strict";e.exports=r(24)("native-function-to-string",Function.toString)},function(e,t,r){"use strict";var n=r(9),i=r(8),a=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:n.version,mode:r(25)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t,r){"use strict";e.exports=!1},function(e,t,r){"use strict";var n=r(27);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,r){"use strict";e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,r){"use strict";var n=r(29),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},function(e,t,r){"use strict";var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},function(e,t,r){"use strict";var n=r(31),i=r(34);e.exports=function(e,t,r){if(n(t))throw TypeError("String#"+r+" doesn't accept regex!");return String(i(e))}},function(e,t,r){"use strict";var n=r(13),i=r(32),a=r(33)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==i(e))}},function(e,t,r){"use strict";var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,r){"use strict";var n=r(24)("wks"),i=r(22),a=r(8).Symbol,o="function"==typeof a;(e.exports=function(e){return n[e]||(n[e]=o&&a[e]||(o?a:i)("Symbol."+e))}).store=n},function(e,t,r){"use strict";e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,r){"use strict";var n=r(33)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,r){"use strict";r(37),e.exports=r(9).String.endsWith},function(e,t,r){"use strict";var n=r(7),i=r(28),a=r(30),o="".endsWith;n(n.P+n.F*r(35)("endsWith"),"String",{endsWith:function(e){var t=a(this,e,"endsWith"),r=arguments.length>1?arguments[1]:void 0,n=i(t.length),s=void 0===r?n:Math.min(i(r),n),u=String(e);return o?o.call(t,u,s):t.slice(s-u.length,s)===u}})},function(e,t,r){"use strict";r(39),e.exports=r(9).String.includes},function(e,t,r){"use strict";var n=r(7),i=r(30);n(n.P+n.F*r(35)("includes"),"String",{includes:function(e){return!!~i(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){"use strict";r(41),e.exports=r(9).Array.includes},function(e,t,r){"use strict";var n=r(7),i=r(42)(!0);n(n.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),r(46)("includes")},function(e,t,r){"use strict";var n=r(43),i=r(28),a=r(45);e.exports=function(e){return function(t,r,o){var s,u=n(t),l=i(u.length),c=a(o,l);if(e&&r!=r){for(;l>c;)if((s=u[c++])!=s)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===r)return e||c||0;return!e&&-1}}},function(e,t,r){"use strict";var n=r(44),i=r(34);e.exports=function(e){return n(i(e))}},function(e,t,r){"use strict";var n=r(32);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t,r){"use strict";var n=r(29),i=Math.max,a=Math.min;e.exports=function(e,t){return(e=n(e))<0?i(e+t,0):a(e,t)}},function(e,t,r){"use strict";var n=r(33)("unscopables"),i=Array.prototype;null==i[n]&&r(10)(i,n,{}),e.exports=function(e){i[n][e]=!0}},function(e,t,r){"use strict";r(48),r(63),e.exports=r(9).Array.from},function(e,t,r){"use strict";var n=r(49)(!0);r(50)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})})},function(e,t,r){"use strict";var n=r(29),i=r(34);e.exports=function(e){return function(t,r){var a,o,s=String(i(t)),u=n(r),l=s.length;return u<0||u>=l?e?"":void 0:(a=s.charCodeAt(u))<55296||a>56319||u+1===l||(o=s.charCodeAt(u+1))<56320||o>57343?e?s.charAt(u):a:e?s.slice(u,u+2):o-56320+(a-55296<<10)+65536}}},function(e,t,r){"use strict";var n=r(25),i=r(7),a=r(20),o=r(10),s=r(51),u=r(52),l=r(60),c=r(61),h=r(33)("iterator"),d=!([].keys&&"next"in[].keys()),f=function(){return this};e.exports=function(e,t,r,p,v,m,g){u(r,t,p);var y,b,_,A=function(e){if(!d&&e in x)return x[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},S=t+" Iterator",w="values"==v,k=!1,x=e.prototype,P=x[h]||x["@@iterator"]||v&&x[v],C=P||A(v),R=v?w?A("entries"):C:void 0,T="Array"==t&&x.entries||P;if(T&&(_=c(T.call(new e)))!==Object.prototype&&_.next&&(l(_,S,!0),n||"function"==typeof _[h]||o(_,h,f)),w&&P&&"values"!==P.name&&(k=!0,C=function(){return P.call(this)}),n&&!g||!d&&!k&&x[h]||o(x,h,C),s[t]=C,s[S]=f,v)if(y={values:w?C:A("values"),keys:m?C:A("keys"),entries:R},g)for(b in y)b in x||a(x,b,y[b]);else i(i.P+i.F*(d||k),t,y);return y}},function(e,t,r){"use strict";e.exports={}},function(e,t,r){"use strict";var n=r(53),i=r(19),a=r(60),o={};r(10)(o,r(33)("iterator"),function(){return this}),e.exports=function(e,t,r){e.prototype=n(o,{next:i(1,r)}),a(e,t+" Iterator")}},function(e,t,r){"use strict";var n=r(12),i=r(54),a=r(58),o=r(57)("IE_PROTO"),s=function(){},u=function(){var e,t=r(17)("iframe"),n=a.length;for(t.style.display="none",r(59).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;n--;)delete u.prototype[a[n]];return u()};e.exports=Object.create||function(e,t){var r;return null!==e?(s.prototype=n(e),r=new s,s.prototype=null,r[o]=e):r=u(),void 0===t?r:i(r,t)}},function(e,t,r){"use strict";var n=r(11),i=r(12),a=r(55);e.exports=r(15)?Object.defineProperties:function(e,t){i(e);for(var r,o=a(t),s=o.length,u=0;s>u;)n.f(e,r=o[u++],t[r]);return e}},function(e,t,r){"use strict";var n=r(56),i=r(58);e.exports=Object.keys||function(e){return n(e,i)}},function(e,t,r){"use strict";var n=r(21),i=r(43),a=r(42)(!1),o=r(57)("IE_PROTO");e.exports=function(e,t){var r,s=i(e),u=0,l=[];for(r in s)r!=o&&n(s,r)&&l.push(r);for(;t.length>u;)n(s,r=t[u++])&&(~a(l,r)||l.push(r));return l}},function(e,t,r){"use strict";var n=r(24)("keys"),i=r(22);e.exports=function(e){return n[e]||(n[e]=i(e))}},function(e,t,r){"use strict";e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,r){"use strict";var n=r(8).document;e.exports=n&&n.documentElement},function(e,t,r){"use strict";var n=r(11).f,i=r(21),a=r(33)("toStringTag");e.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,a)&&n(e,a,{configurable:!0,value:t})}},function(e,t,r){"use strict";var n=r(21),i=r(62),a=r(57)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),n(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},function(e,t,r){"use strict";var n=r(34);e.exports=function(e){return Object(n(e))}},function(e,t,r){"use strict";var n=r(26),i=r(7),a=r(62),o=r(64),s=r(65),u=r(28),l=r(66),c=r(67);i(i.S+i.F*!r(69)(function(e){Array.from(e)}),"Array",{from:function(e){var t,r,i,h,d=a(e),f="function"==typeof this?this:Array,p=arguments.length,v=p>1?arguments[1]:void 0,m=void 0!==v,g=0,y=c(d);if(m&&(v=n(v,p>2?arguments[2]:void 0,2)),null==y||f==Array&&s(y))for(r=new f(t=u(d.length));t>g;g++)l(r,g,m?v(d[g],g):d[g]);else for(h=y.call(d),r=new f;!(i=h.next()).done;g++)l(r,g,m?o(h,v,[i.value,g],!0):i.value);return r.length=g,r}})},function(e,t,r){"use strict";var n=r(12);e.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(t){var a=e.return;throw void 0!==a&&n(a.call(e)),t}}},function(e,t,r){"use strict";var n=r(51),i=r(33)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||a[i]===e)}},function(e,t,r){"use strict";var n=r(11),i=r(19);e.exports=function(e,t,r){t in e?n.f(e,t,i(0,r)):e[t]=r}},function(e,t,r){"use strict";var n=r(68),i=r(33)("iterator"),a=r(51);e.exports=r(9).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||a[n(e)]}},function(e,t,r){"use strict";var n=r(32),i=r(33)("toStringTag"),a="Arguments"==n(function(){return arguments}());e.exports=function(e){var t,r,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?r:a?n(t):"Object"==(o=n(t))&&"function"==typeof t.callee?"Arguments":o}},function(e,t,r){"use strict";var n=r(33)("iterator"),i=!1;try{var a=[7][n]();a.return=function(){i=!0},Array.from(a,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var r=!1;try{var a=[7],o=a[n]();o.next=function(){return{done:r=!0}},a[n]=function(){return o},e(a)}catch(e){}return r}},function(e,t,r){"use strict";r(71),e.exports=r(9).Object.assign},function(e,t,r){"use strict";var n=r(7);n(n.S+n.F,"Object",{assign:r(72)})},function(e,t,r){"use strict";var n=r(15),i=r(55),a=r(73),o=r(74),s=r(62),u=r(44),l=Object.assign;e.exports=!l||r(16)(function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!=l({},e)[r]||Object.keys(l({},t)).join("")!=n})?function(e,t){for(var r=s(e),l=arguments.length,c=1,h=a.f,d=o.f;l>c;)for(var f,p=u(arguments[c++]),v=h?i(p).concat(h(p)):i(p),m=v.length,g=0;m>g;)f=v[g++],n&&!d.call(p,f)||(r[f]=p[f]);return r}:l},function(e,t,r){"use strict";t.f=Object.getOwnPropertySymbols},function(e,t,r){"use strict";t.f={}.propertyIsEnumerable},function(e,t,r){"use strict";r(76),e.exports=r(9).Math.log2},function(e,t,r){"use strict";var n=r(7);n(n.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,r){"use strict";r(78),e.exports=r(9).Number.isNaN},function(e,t,r){"use strict";var n=r(7);n(n.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,r){"use strict";r(80),e.exports=r(9).Number.isInteger},function(e,t,r){"use strict";var n=r(7);n(n.S,"Number",{isInteger:r(81)})},function(e,t,r){"use strict";var n=r(13),i=Math.floor;e.exports=function(e){return!n(e)&&isFinite(e)&&i(e)===e}},function(e,t,r){"use strict";r(83),r(48),r(84),r(87),r(100),r(101),e.exports=r(9).Promise},function(e,t,r){"use strict";var n=r(68),i={};i[r(33)("toStringTag")]="z",i+""!="[object z]"&&r(20)(Object.prototype,"toString",function(){return"[object "+n(this)+"]"},!0)},function(e,t,r){"use strict";for(var n=r(85),i=r(55),a=r(20),o=r(8),s=r(10),u=r(51),l=r(33),c=l("iterator"),h=l("toStringTag"),d=u.Array,f={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(f),v=0;v<p.length;v++){var m,g=p[v],y=f[g],b=o[g],_=b&&b.prototype;if(_&&(_[c]||s(_,c,d),_[h]||s(_,h,g),u[g]=d,y))for(m in n)_[m]||a(_,m,n[m],!0)}},function(e,t,r){"use strict";var n=r(46),i=r(86),a=r(51),o=r(43);e.exports=r(50)(Array,"Array",function(e,t){this._t=o(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?r:"values"==t?e[r]:[r,e[r]])},"values"),a.Arguments=a.Array,n("keys"),n("values"),n("entries")},function(e,t,r){"use strict";e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,r){"use strict";var n,i,a,o,s=r(25),u=r(8),l=r(26),c=r(68),h=r(7),d=r(13),f=r(27),p=r(88),v=r(89),m=r(90),g=r(91).set,y=r(93)(),b=r(94),_=r(95),A=r(96),S=r(97),w=u.TypeError,k=u.process,x=k&&k.versions,P=x&&x.v8||"",C=u.Promise,R="process"==c(k),T=function(){},E=i=b.f,O=!!function(){try{var e=C.resolve(1),t=(e.constructor={})[r(33)("species")]=function(e){e(T,T)};return(R||"function"==typeof PromiseRejectionEvent)&&e.then(T)instanceof t&&0!==P.indexOf("6.6")&&-1===A.indexOf("Chrome/66")}catch(e){}}(),F=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},I=function(e,t){if(!e._n){e._n=!0;var r=e._c;y(function(){for(var n=e._v,i=1==e._s,a=0,o=function(t){var r,a,o,s=i?t.ok:t.fail,u=t.resolve,l=t.reject,c=t.domain;try{s?(i||(2==e._h&&j(e),e._h=1),!0===s?r=n:(c&&c.enter(),r=s(n),c&&(c.exit(),o=!0)),r===t.promise?l(w("Promise-chain cycle")):(a=F(r))?a.call(r,u,l):u(r)):l(n)}catch(e){c&&!o&&c.exit(),l(e)}};r.length>a;)o(r[a++]);e._c=[],e._n=!1,t&&!e._h&&L(e)})}},L=function(e){g.call(u,function(){var t,r,n,i=e._v,a=M(e);if(a&&(t=_(function(){R?k.emit("unhandledRejection",i,e):(r=u.onunhandledrejection)?r({promise:e,reason:i}):(n=u.console)&&n.error&&n.error("Unhandled promise rejection",i)}),e._h=R||M(e)?2:1),e._a=void 0,a&&t.e)throw t.v})},M=function(e){return 1!==e._h&&0===(e._a||e._c).length},j=function(e){g.call(u,function(){var t;R?k.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})})},D=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),I(t,!0))},N=function e(t){var r,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw w("Promise can't be resolved itself");(r=F(t))?y(function(){var i={_w:n,_d:!1};try{r.call(t,l(e,i,1),l(D,i,1))}catch(e){D.call(i,e)}}):(n._v=t,n._s=1,I(n,!1))}catch(e){D.call({_w:n,_d:!1},e)}}};O||(C=function(e){p(this,C,"Promise","_h"),f(e),n.call(this);try{e(l(N,this,1),l(D,this,1))}catch(e){D.call(this,e)}},(n=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=r(98)(C.prototype,{then:function(e,t){var r=E(m(this,C));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=R?k.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&I(this,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new n;this.promise=e,this.resolve=l(N,e,1),this.reject=l(D,e,1)},b.f=E=function(e){return e===C||e===o?new a(e):i(e)}),h(h.G+h.W+h.F*!O,{Promise:C}),r(60)(C,"Promise"),r(99)("Promise"),o=r(9).Promise,h(h.S+h.F*!O,"Promise",{reject:function(e){var t=E(this);return(0,t.reject)(e),t.promise}}),h(h.S+h.F*(s||!O),"Promise",{resolve:function(e){return S(s&&this===o?C:this,e)}}),h(h.S+h.F*!(O&&r(69)(function(e){C.all(e).catch(T)})),"Promise",{all:function(e){var t=this,r=E(t),n=r.resolve,i=r.reject,a=_(function(){var r=[],a=0,o=1;v(e,!1,function(e){var s=a++,u=!1;r.push(void 0),o++,t.resolve(e).then(function(e){u||(u=!0,r[s]=e,--o||n(r))},i)}),--o||n(r)});return a.e&&i(a.v),r.promise},race:function(e){var t=this,r=E(t),n=r.reject,i=_(function(){v(e,!1,function(e){t.resolve(e).then(r.resolve,n)})});return i.e&&n(i.v),r.promise}})},function(e,t,r){"use strict";e.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},function(e,t,r){"use strict";var n=r(26),i=r(64),a=r(65),o=r(12),s=r(28),u=r(67),l={},c={},h=e.exports=function(e,t,r,h,d){var f,p,v,m,g=d?function(){return e}:u(e),y=n(r,h,t?2:1),b=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(a(g)){for(f=s(e.length);f>b;b++)if((m=t?y(o(p=e[b])[0],p[1]):y(e[b]))===l||m===c)return m}else for(v=g.call(e);!(p=v.next()).done;)if((m=i(v,y,p.value,t))===l||m===c)return m};h.BREAK=l,h.RETURN=c},function(e,t,r){"use strict";var n=r(12),i=r(27),a=r(33)("species");e.exports=function(e,t){var r,o=n(e).constructor;return void 0===o||null==(r=n(o)[a])?t:i(r)}},function(e,t,r){"use strict";var n,i,a,o=r(26),s=r(92),u=r(59),l=r(17),c=r(8),h=c.process,d=c.setImmediate,f=c.clearImmediate,p=c.MessageChannel,v=c.Dispatch,m=0,g={},y=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},b=function(e){y.call(e.data)};d&&f||(d=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return g[++m]=function(){s("function"==typeof e?e:Function(e),t)},n(m),m},f=function(e){delete g[e]},"process"==r(32)(h)?n=function(e){h.nextTick(o(y,e,1))}:v&&v.now?n=function(e){v.now(o(y,e,1))}:p?(a=(i=new p).port2,i.port1.onmessage=b,n=o(a.postMessage,a,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(n=function(e){c.postMessage(e+"","*")},c.addEventListener("message",b,!1)):n="onreadystatechange"in l("script")?function(e){u.appendChild(l("script")).onreadystatechange=function(){u.removeChild(this),y.call(e)}}:function(e){setTimeout(o(y,e,1),0)}),e.exports={set:d,clear:f}},function(e,t,r){"use strict";e.exports=function(e,t,r){var n=void 0===r;switch(t.length){case 0:return n?e():e.call(r);case 1:return n?e(t[0]):e.call(r,t[0]);case 2:return n?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return n?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return n?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)}},function(e,t,r){"use strict";var n=r(8),i=r(91).set,a=n.MutationObserver||n.WebKitMutationObserver,o=n.process,s=n.Promise,u="process"==r(32)(o);e.exports=function(){var e,t,r,l=function(){var n,i;for(u&&(n=o.domain)&&n.exit();e;){i=e.fn,e=e.next;try{i()}catch(n){throw e?r():t=void 0,n}}t=void 0,n&&n.enter()};if(u)r=function(){o.nextTick(l)};else if(!a||n.navigator&&n.navigator.standalone)if(s&&s.resolve){var c=s.resolve(void 0);r=function(){c.then(l)}}else r=function(){i.call(n,l)};else{var h=!0,d=document.createTextNode("");new a(l).observe(d,{characterData:!0}),r=function(){d.data=h=!h}}return function(n){var i={fn:n,next:void 0};t&&(t.next=i),e||(e=i,r()),t=i}}},function(e,t,r){"use strict";var n=r(27);function i(e){var t,r;this.promise=new e(function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n}),this.resolve=n(t),this.reject=n(r)}e.exports.f=function(e){return new i(e)}},function(e,t,r){"use strict";e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,r){"use strict";var n=r(8).navigator;e.exports=n&&n.userAgent||""},function(e,t,r){"use strict";var n=r(12),i=r(13),a=r(94);e.exports=function(e,t){if(n(e),i(t)&&t.constructor===e)return t;var r=a.f(e);return(0,r.resolve)(t),r.promise}},function(e,t,r){"use strict";var n=r(20);e.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r);return e}},function(e,t,r){"use strict";var n=r(8),i=r(11),a=r(15),o=r(33)("species");e.exports=function(e){var t=n[e];a&&t&&!t[o]&&i.f(t,o,{configurable:!0,get:function(){return this}})}},function(e,t,r){"use strict";var n=r(7),i=r(9),a=r(8),o=r(90),s=r(97);n(n.P+n.R,"Promise",{finally:function(e){var t=o(this,i.Promise||a.Promise),r="function"==typeof e;return this.then(r?function(r){return s(t,e()).then(function(){return r})}:e,r?function(r){return s(t,e()).then(function(){throw r})}:e)}})},function(e,t,r){"use strict";var n=r(7),i=r(94),a=r(95);n(n.S,"Promise",{try:function(e){var t=i.f(this),r=a(e);return(r.e?t.reject:t.resolve)(r.v),t.promise}})},function(e,t,r){"use strict";r(83),r(84),r(103),r(115),r(117),e.exports=r(9).WeakMap},function(e,t,r){"use strict";var n,i=r(8),a=r(104)(0),o=r(20),s=r(108),u=r(72),l=r(109),c=r(13),h=r(110),d=r(110),f=!i.ActiveXObject&&"ActiveXObject"in i,p=s.getWeak,v=Object.isExtensible,m=l.ufstore,g=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},y={get:function(e){if(c(e)){var t=p(e);return!0===t?m(h(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return l.def(h(this,"WeakMap"),e,t)}},b=e.exports=r(111)("WeakMap",g,y,l,!0,!0);d&&f&&(u((n=l.getConstructor(g,"WeakMap")).prototype,y),s.NEED=!0,a(["delete","has","get","set"],function(e){var t=b.prototype,r=t[e];o(t,e,function(t,i){if(c(t)&&!v(t)){this._f||(this._f=new n);var a=this._f[e](t,i);return"set"==e?this:a}return r.call(this,t,i)})}))},function(e,t,r){"use strict";var n=r(26),i=r(44),a=r(62),o=r(28),s=r(105);e.exports=function(e,t){var r=1==e,u=2==e,l=3==e,c=4==e,h=6==e,d=5==e||h,f=t||s;return function(t,s,p){for(var v,m,g=a(t),y=i(g),b=n(s,p,3),_=o(y.length),A=0,S=r?f(t,_):u?f(t,0):void 0;_>A;A++)if((d||A in y)&&(m=b(v=y[A],A,g),e))if(r)S[A]=m;else if(m)switch(e){case 3:return!0;case 5:return v;case 6:return A;case 2:S.push(v)}else if(c)return!1;return h?-1:l||c?c:S}}},function(e,t,r){"use strict";var n=r(106);e.exports=function(e,t){return new(n(e))(t)}},function(e,t,r){"use strict";var n=r(13),i=r(107),a=r(33)("species");e.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),n(t)&&null===(t=t[a])&&(t=void 0)),void 0===t?Array:t}},function(e,t,r){"use strict";var n=r(32);e.exports=Array.isArray||function(e){return"Array"==n(e)}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(22)("meta"),a=r(13),o=r(21),s=r(11).f,u=0,l=Object.isExtensible||function(){return!0},c=!r(16)(function(){return l(Object.preventExtensions({}))}),h=function(e){s(e,i,{value:{i:"O"+ ++u,w:{}}})},d=e.exports={KEY:i,NEED:!1,fastKey:function(e,t){if(!a(e))return"symbol"==n(e)?e:("string"==typeof e?"S":"P")+e;if(!o(e,i)){if(!l(e))return"F";if(!t)return"E";h(e)}return e[i].i},getWeak:function(e,t){if(!o(e,i)){if(!l(e))return!0;if(!t)return!1;h(e)}return e[i].w},onFreeze:function(e){return c&&d.NEED&&l(e)&&!o(e,i)&&h(e),e}}},function(e,t,r){"use strict";var n=r(98),i=r(108).getWeak,a=r(12),o=r(13),s=r(88),u=r(89),l=r(104),c=r(21),h=r(110),d=l(5),f=l(6),p=0,v=function(e){return e._l||(e._l=new m)},m=function(){this.a=[]},g=function(e,t){return d(e.a,function(e){return e[0]===t})};m.prototype={get:function(e){var t=g(this,e);if(t)return t[1]},has:function(e){return!!g(this,e)},set:function(e,t){var r=g(this,e);r?r[1]=t:this.a.push([e,t])},delete:function(e){var t=f(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,r,a){var l=e(function(e,n){s(e,l,t,"_i"),e._t=t,e._i=p++,e._l=void 0,null!=n&&u(n,r,e[a],e)});return n(l.prototype,{delete:function(e){if(!o(e))return!1;var r=i(e);return!0===r?v(h(this,t)).delete(e):r&&c(r,this._i)&&delete r[this._i]},has:function(e){if(!o(e))return!1;var r=i(e);return!0===r?v(h(this,t)).has(e):r&&c(r,this._i)}}),l},def:function(e,t,r){var n=i(a(t),!0);return!0===n?v(e).set(t,r):n[e._i]=r,e},ufstore:v}},function(e,t,r){"use strict";var n=r(13);e.exports=function(e,t){if(!n(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,r){"use strict";var n=r(8),i=r(7),a=r(20),o=r(98),s=r(108),u=r(89),l=r(88),c=r(13),h=r(16),d=r(69),f=r(60),p=r(112);e.exports=function(e,t,r,v,m,g){var y=n[e],b=y,_=m?"set":"add",A=b&&b.prototype,S={},w=function(e){var t=A[e];a(A,e,"delete"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!c(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,r){return t.call(this,0===e?0:e,r),this})};if("function"==typeof b&&(g||A.forEach&&!h(function(){(new b).entries().next()}))){var k=new b,x=k[_](g?{}:-0,1)!=k,P=h(function(){k.has(1)}),C=d(function(e){new b(e)}),R=!g&&h(function(){for(var e=new b,t=5;t--;)e[_](t,t);return!e.has(-0)});C||((b=t(function(t,r){l(t,b,e);var n=p(new y,t,b);return null!=r&&u(r,m,n[_],n),n})).prototype=A,A.constructor=b),(P||R)&&(w("delete"),w("has"),m&&w("get")),(R||x)&&w(_),g&&A.clear&&delete A.clear}else b=v.getConstructor(t,e,m,_),o(b.prototype,r),s.NEED=!0;return f(b,e),S[e]=b,i(i.G+i.W+i.F*(b!=y),S),g||v.setStrong(b,e,m),b}},function(e,t,r){"use strict";var n=r(13),i=r(113).set;e.exports=function(e,t,r){var a,o=t.constructor;return o!==r&&"function"==typeof o&&(a=o.prototype)!==r.prototype&&n(a)&&i&&i(e,a),e}},function(e,t,r){"use strict";var n=r(13),i=r(12),a=function(e,t){if(i(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,n){try{(n=r(26)(Function.call,r(114).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,r){return a(e,r),t?e.__proto__=r:n(e,r),e}}({},!1):void 0),check:a}},function(e,t,r){"use strict";var n=r(74),i=r(19),a=r(43),o=r(18),s=r(21),u=r(14),l=Object.getOwnPropertyDescriptor;t.f=r(15)?l:function(e,t){if(e=a(e),t=o(t,!0),u)try{return l(e,t)}catch(e){}if(s(e,t))return i(!n.f.call(e,t),e[t])}},function(e,t,r){"use strict";r(116)("WeakMap")},function(e,t,r){"use strict";var n=r(7);e.exports=function(e){n(n.S,e,{of:function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},function(e,t,r){"use strict";r(118)("WeakMap")},function(e,t,r){"use strict";var n=r(7),i=r(27),a=r(26),o=r(89);e.exports=function(e){n(n.S,e,{from:function(e){var t,r,n,s,u=arguments[1];return i(this),(t=void 0!==u)&&i(u),null==e?new this:(r=[],t?(n=0,s=a(u,arguments[2],2),o(e,!1,function(e){r.push(s(e,n++))})):o(e,!1,r.push,r),new this(r))}})}},function(e,t,r){"use strict";r(83),r(84),r(120),r(121),r(122),e.exports=r(9).WeakSet},function(e,t,r){"use strict";var n=r(109),i=r(110);r(111)("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return n.def(i(this,"WeakSet"),e,!0)}},n,!1,!0)},function(e,t,r){"use strict";r(116)("WeakSet")},function(e,t,r){"use strict";r(118)("WeakSet")},function(e,t,r){"use strict";r(124),e.exports=r(9).String.codePointAt},function(e,t,r){"use strict";var n=r(7),i=r(49)(!1);n(n.P,"String",{codePointAt:function(e){return i(this,e)}})},function(e,t,r){"use strict";r(126),e.exports=r(9).String.fromCodePoint},function(e,t,r){"use strict";var n=r(7),i=r(45),a=String.fromCharCode,o=String.fromCodePoint;n(n.S+n.F*(!!o&&1!=o.length),"String",{fromCodePoint:function(e){for(var t,r=[],n=arguments.length,o=0;n>o;){if(t=+arguments[o++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");r.push(t<65536?a(t):a(55296+((t-=65536)>>10),t%1024+56320))}return r.join("")}})},function(e,t,r){"use strict";r(128),r(83),e.exports=r(9).Symbol},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(8),a=r(21),o=r(15),s=r(7),u=r(20),l=r(108).KEY,c=r(16),h=r(24),d=r(60),f=r(22),p=r(33),v=r(129),m=r(130),g=r(131),y=r(107),b=r(12),_=r(13),A=r(62),S=r(43),w=r(18),k=r(19),x=r(53),P=r(132),C=r(114),R=r(73),T=r(11),E=r(55),O=C.f,F=T.f,I=P.f,L=i.Symbol,M=i.JSON,j=M&&M.stringify,D=p("_hidden"),N=p("toPrimitive"),q={}.propertyIsEnumerable,W=h("symbol-registry"),U=h("symbols"),B=h("op-symbols"),z=Object.prototype,G="function"==typeof L&&!!R.f,H=i.QObject,X=!H||!H.prototype||!H.prototype.findChild,Y=o&&c(function(){return 7!=x(F({},"a",{get:function(){return F(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=O(z,t);n&&delete z[t],F(e,t,r),n&&e!==z&&F(z,t,n)}:F,V=function(e){var t=U[e]=x(L.prototype);return t._k=e,t},Q=G&&"symbol"==n(L.iterator)?function(e){return"symbol"==n(e)}:function(e){return e instanceof L},K=function(e,t,r){return e===z&&K(B,t,r),b(e),t=w(t,!0),b(r),a(U,t)?(r.enumerable?(a(e,D)&&e[D][t]&&(e[D][t]=!1),r=x(r,{enumerable:k(0,!1)})):(a(e,D)||F(e,D,k(1,{})),e[D][t]=!0),Y(e,t,r)):F(e,t,r)},J=function(e,t){b(e);for(var r,n=g(t=S(t)),i=0,a=n.length;a>i;)K(e,r=n[i++],t[r]);return e},Z=function(e){var t=q.call(this,e=w(e,!0));return!(this===z&&a(U,e)&&!a(B,e))&&(!(t||!a(this,e)||!a(U,e)||a(this,D)&&this[D][e])||t)},$=function(e,t){if(e=S(e),t=w(t,!0),e!==z||!a(U,t)||a(B,t)){var r=O(e,t);return!r||!a(U,t)||a(e,D)&&e[D][t]||(r.enumerable=!0),r}},ee=function(e){for(var t,r=I(S(e)),n=[],i=0;r.length>i;)a(U,t=r[i++])||t==D||t==l||n.push(t);return n},te=function(e){for(var t,r=e===z,n=I(r?B:S(e)),i=[],o=0;n.length>o;)!a(U,t=n[o++])||r&&!a(z,t)||i.push(U[t]);return i};G||(u((L=function(){if(this instanceof L)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0);return o&&X&&Y(z,e,{configurable:!0,set:function t(r){this===z&&t.call(B,r),a(this,D)&&a(this[D],e)&&(this[D][e]=!1),Y(this,e,k(1,r))}}),V(e)}).prototype,"toString",function(){return this._k}),C.f=$,T.f=K,r(133).f=P.f=ee,r(74).f=Z,R.f=te,o&&!r(25)&&u(z,"propertyIsEnumerable",Z,!0),v.f=function(e){return V(p(e))}),s(s.G+s.W+s.F*!G,{Symbol:L});for(var re="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;re.length>ne;)p(re[ne++]);for(var ie=E(p.store),ae=0;ie.length>ae;)m(ie[ae++]);s(s.S+s.F*!G,"Symbol",{for:function(e){return a(W,e+="")?W[e]:W[e]=L(e)},keyFor:function(e){if(!Q(e))throw TypeError(e+" is not a symbol!");for(var t in W)if(W[t]===e)return t},useSetter:function(){X=!0},useSimple:function(){X=!1}}),s(s.S+s.F*!G,"Object",{create:function(e,t){return void 0===t?x(e):J(x(e),t)},defineProperty:K,defineProperties:J,getOwnPropertyDescriptor:$,getOwnPropertyNames:ee,getOwnPropertySymbols:te});var oe=c(function(){R.f(1)});s(s.S+s.F*oe,"Object",{getOwnPropertySymbols:function(e){return R.f(A(e))}}),M&&s(s.S+s.F*(!G||c(function(){var e=L();return"[null]"!=j([e])||"{}"!=j({a:e})||"{}"!=j(Object(e))})),"JSON",{stringify:function(e){for(var t,r,n=[e],i=1;arguments.length>i;)n.push(arguments[i++]);if(r=t=n[1],(_(t)||void 0!==e)&&!Q(e))return y(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!Q(t))return t}),n[1]=t,j.apply(M,n)}}),L.prototype[N]||r(10)(L.prototype,N,L.prototype.valueOf),d(L,"Symbol"),d(Math,"Math",!0),d(i.JSON,"JSON",!0)},function(e,t,r){"use strict";t.f=r(33)},function(e,t,r){"use strict";var n=r(8),i=r(9),a=r(25),o=r(129),s=r(11).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=a?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:o.f(e)})}},function(e,t,r){"use strict";var n=r(55),i=r(73),a=r(74);e.exports=function(e){var t=n(e),r=i.f;if(r)for(var o,s=r(e),u=a.f,l=0;s.length>l;)u.call(e,o=s[l++])&&t.push(o);return t}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(43),a=r(133).f,o={}.toString,s="object"==("undefined"==typeof window?"undefined":n(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"[object Window]"==o.call(e)?function(e){try{return a(e)}catch(e){return s.slice()}}(e):a(i(e))}},function(e,t,r){"use strict";var n=r(56),i=r(58).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},function(e,t,r){"use strict";r(135),e.exports=r(9).String.padStart},function(e,t,r){"use strict";var n=r(7),i=r(136),a=r(96),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(a);n(n.P+n.F*o,"String",{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,r){"use strict";var n=r(28),i=r(137),a=r(34);e.exports=function(e,t,r,o){var s=String(a(e)),u=s.length,l=void 0===r?" ":String(r),c=n(t);if(c<=u||""==l)return s;var h=c-u,d=i.call(l,Math.ceil(h/l.length));return d.length>h&&(d=d.slice(0,h)),o?d+s:s+d}},function(e,t,r){"use strict";var n=r(29),i=r(34);e.exports=function(e){var t=String(i(this)),r="",a=n(e);if(a<0||a==1/0)throw RangeError("Count can't be negative");for(;a>0;(a>>>=1)&&(t+=t))1&a&&(r+=t);return r}},function(e,t,r){"use strict";r(139),e.exports=r(9).String.padEnd},function(e,t,r){"use strict";var n=r(7),i=r(136),a=r(96),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(a);n(n.P+n.F*o,"String",{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,r){"use strict";r(141),e.exports=r(9).Object.values},function(e,t,r){"use strict";var n=r(7),i=r(142)(!1);n(n.S,"Object",{values:function(e){return i(e)}})},function(e,t,r){"use strict";var n=r(15),i=r(55),a=r(43),o=r(74).f;e.exports=function(e){return function(t){for(var r,s=a(t),u=i(s),l=u.length,c=0,h=[];l>c;)r=u[c++],n&&!o.call(s,r)||h.push(e?[r,s[r]]:s[r]);return h}}},function(e,t,r){"use strict";var n=!1;if("undefined"!=typeof ReadableStream)try{new ReadableStream({start:function(e){e.close()}}),n=!0}catch(e){}t.ReadableStream=n?ReadableStream:r(144).ReadableStream},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e,t){for(var r in t)e[r]=t[r]}(t,function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},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=7)}([function(e,t,r){var i="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},a=r(1).assert;function o(e){return"string"==typeof e||"symbol"===(void 0===e?"undefined":i(e))}function s(e,t,r){if("function"!=typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}t.typeIsObject=function(e){return"object"===(void 0===e?"undefined":i(e))&&null!==e||"function"==typeof e},t.createDataProperty=function(e,r,n){a(t.typeIsObject(e)),Object.defineProperty(e,r,{value:n,writable:!0,enumerable:!0,configurable:!0})},t.createArrayFromList=function(e){return e.slice()},t.ArrayBufferCopy=function(e,t,r,n,i){new Uint8Array(e).set(new Uint8Array(r,n,i),t)},t.CreateIterResultObject=function(e,t){a("boolean"==typeof t);var r={};return Object.defineProperty(r,"value",{value:e,enumerable:!0,writable:!0,configurable:!0}),Object.defineProperty(r,"done",{value:t,enumerable:!0,writable:!0,configurable:!0}),r},t.IsFiniteNonNegativeNumber=function(e){return!Number.isNaN(e)&&(e!==1/0&&!(e<0))},t.InvokeOrNoop=function(e,t,r){a(void 0!==e),a(o(t)),a(Array.isArray(r));var n=e[t];if(void 0!==n)return s(n,e,r)},t.PromiseInvokeOrNoop=function(e,r,n){a(void 0!==e),a(o(r)),a(Array.isArray(n));try{return Promise.resolve(t.InvokeOrNoop(e,r,n))}catch(e){return Promise.reject(e)}},t.PromiseInvokeOrPerformFallback=function(e,t,r,n,i){a(void 0!==e),a(o(t)),a(Array.isArray(r)),a(Array.isArray(i));var u=void 0;try{u=e[t]}catch(e){return Promise.reject(e)}if(void 0===u)return n.apply(null,i);try{return Promise.resolve(s(u,e,r))}catch(e){return Promise.reject(e)}},t.TransferArrayBuffer=function(e){return e.slice()},t.ValidateAndNormalizeHighWaterMark=function(e){if(e=Number(e),Number.isNaN(e)||e<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return e},t.ValidateAndNormalizeQueuingStrategy=function(e,r){if(void 0!==e&&"function"!=typeof e)throw new TypeError("size property of a queuing strategy must be a function");return{size:e,highWaterMark:r=t.ValidateAndNormalizeHighWaterMark(r)}}},function(e,t,r){function n(e){this.name="AssertionError",this.message=e||"",this.stack=(new Error).stack}n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,e.exports={rethrowAssertionErrorRejection:function(e){e&&e.constructor===n&&setTimeout(function(){throw e},0)},AssertionError:n,assert:function(e,t){if(!e)throw new n(t)}}},function(e,t,r){var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=r(0),o=a.InvokeOrNoop,s=a.PromiseInvokeOrNoop,u=a.ValidateAndNormalizeQueuingStrategy,l=a.typeIsObject,c=r(1),h=c.assert,d=c.rethrowAssertionErrorRejection,f=r(3),p=f.DequeueValue,v=f.EnqueueValueWithSize,m=f.PeekQueueValue,g=f.ResetQueue,y=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.size,a=r.highWaterMark,o=void 0===a?1:a;if(i(this,e),this._state="writable",this._storedError=void 0,this._writer=void 0,this._writableStreamController=void 0,this._writeRequests=[],this._inFlightWriteRequest=void 0,this._closeRequest=void 0,this._inFlightCloseRequest=void 0,this._pendingAbortRequest=void 0,this._backpressure=!1,void 0!==t.type)throw new RangeError("Invalid type is specified");this._writableStreamController=new N(this,t,n,o),this._writableStreamController.__startSteps()}return n(e,[{key:"abort",value:function(e){return!1===_(this)?Promise.reject(G("abort")):!0===A(this)?Promise.reject(new TypeError("Cannot abort a stream that already has a writer")):S(this,e)}},{key:"getWriter",value:function(){if(!1===_(this))throw G("getWriter");return b(this)}},{key:"locked",get:function(){if(!1===_(this))throw G("locked");return A(this)}}]),e}();function b(e){return new O(e)}function _(e){return!!l(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function A(e){return h(!0===_(e),"IsWritableStreamLocked should only be used on known writable streams"),void 0!==e._writer}function S(e,t){var r=e._state;if("closed"===r)return Promise.resolve(void 0);if("errored"===r)return Promise.reject(e._storedError);var n=new TypeError("Requested to abort");if(void 0!==e._pendingAbortRequest)return Promise.reject(n);h("writable"===r||"erroring"===r,"state must be writable or erroring");var i=!1;"erroring"===r&&(i=!0,t=void 0);var a=new Promise(function(r,n){e._pendingAbortRequest={_resolve:r,_reject:n,_reason:t,_wasAlreadyErroring:i}});return!1===i&&k(e,n),a}function w(e,t){var r=e._state;"writable"!==r?(h("erroring"===r),x(e)):k(e,t)}function k(e,t){h(void 0===e._storedError,"stream._storedError === undefined"),h("writable"===e._state,"state must be writable");var r=e._writableStreamController;h(void 0!==r,"controller must not be undefined"),e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&M(n,t),!1===R(e)&&!0===r._started&&x(e)}function x(e){h("erroring"===e._state,"stream._state === erroring"),h(!1===R(e),"WritableStreamHasOperationMarkedInFlight(stream) === false"),e._state="errored",e._writableStreamController.__errorSteps();for(var t=e._storedError,r=0;r<e._writeRequests.length;r++){e._writeRequests[r]._reject(t)}if(e._writeRequests=[],void 0!==e._pendingAbortRequest){var n=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,!0===n._wasAlreadyErroring)return n._reject(t),void T(e);e._writableStreamController.__abortSteps(n._reason).then(function(){n._resolve(),T(e)},function(t){n._reject(t),T(e)})}else T(e)}function P(e){h(void 0!==e._inFlightCloseRequest),e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0;var t=e._state;h("writable"===t||"erroring"===t),"erroring"===t&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var r=e._writer;void 0!==r&&function(e){h(void 0!==e._closedPromise_resolve,"writer._closedPromise_resolve !== undefined"),h(void 0!==e._closedPromise_reject,"writer._closedPromise_reject !== undefined"),h("pending"===e._closedPromiseState,"writer._closedPromiseState is pending"),e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}(r),h(void 0===e._pendingAbortRequest,"stream._pendingAbortRequest === undefined"),h(void 0===e._storedError,"stream._storedError === undefined")}function C(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function R(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}function T(e){h("errored"===e._state,'_stream_.[[state]] is `"errored"`'),void 0!==e._closeRequest&&(h(void 0===e._inFlightCloseRequest),e._closeRequest._reject(e._storedError),e._closeRequest=void 0);var t=e._writer;void 0!==t&&(V(t,e._storedError),t._closedPromise.catch(function(){}))}function E(e,t){h("writable"===e._state),h(!1===C(e));var r=e._writer;void 0!==r&&t!==e._backpressure&&(!0===t?function(e){h(void 0===e._readyPromise_resolve,"writer._readyPromise_resolve === undefined"),h(void 0===e._readyPromise_reject,"writer._readyPromise_reject === undefined"),e._readyPromise=new Promise(function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r}),e._readyPromiseState="pending"}(r):(h(!1===t),J(r))),e._backpressure=t}e.exports={AcquireWritableStreamDefaultWriter:b,IsWritableStream:_,IsWritableStreamLocked:A,WritableStream:y,WritableStreamAbort:S,WritableStreamDefaultControllerError:z,WritableStreamDefaultWriterCloseWithErrorPropagation:function(e){var t=e._ownerWritableStream;h(void 0!==t);var r=t._state;if(!0===C(t)||"closed"===r)return Promise.resolve();if("errored"===r)return Promise.reject(t._storedError);return h("writable"===r||"erroring"===r),I(e)},WritableStreamDefaultWriterRelease:j,WritableStreamDefaultWriterWrite:D,WritableStreamCloseQueuedOrInFlight:C};var O=function(){function e(t){if(i(this,e),!1===_(t))throw new TypeError("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===A(t))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=t,t._writer=this;var r,n=t._state;if("writable"===n)!1===C(t)&&!0===t._backpressure?((r=this)._readyPromise=new Promise(function(e,t){r._readyPromise_resolve=e,r._readyPromise_reject=t}),r._readyPromiseState="pending"):K(this),Y(this);else if("erroring"===n)Q(this,t._storedError),this._readyPromise.catch(function(){}),Y(this);else if("closed"===n)K(this),function(e){e._closedPromise=Promise.resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}(this);else{h("errored"===n,"state must be errored");var a=t._storedError;Q(this,a),this._readyPromise.catch(function(){}),function(e,t){e._closedPromise=Promise.reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}(this,a),this._closedPromise.catch(function(){})}}return n(e,[{key:"abort",value:function(e){return!1===F(this)?Promise.reject(H("abort")):void 0===this._ownerWritableStream?Promise.reject(X("abort")):function(e,t){var r=e._ownerWritableStream;return h(void 0!==r),S(r,t)}(this,e)}},{key:"close",value:function(){if(!1===F(this))return Promise.reject(H("close"));var e=this._ownerWritableStream;return void 0===e?Promise.reject(X("close")):!0===C(e)?Promise.reject(new TypeError("cannot close an already-closing stream")):I(this)}},{key:"releaseLock",value:function(){if(!1===F(this))throw H("releaseLock");var e=this._ownerWritableStream;void 0!==e&&(h(void 0!==e._writer),j(this))}},{key:"write",value:function(e){return!1===F(this)?Promise.reject(H("write")):void 0===this._ownerWritableStream?Promise.reject(X("write to")):D(this,e)}},{key:"closed",get:function(){return!1===F(this)?Promise.reject(H("closed")):this._closedPromise}},{key:"desiredSize",get:function(){if(!1===F(this))throw H("desiredSize");if(void 0===this._ownerWritableStream)throw X("desiredSize");return function(e){var t=e._ownerWritableStream,r=t._state;if("errored"===r||"erroring"===r)return null;if("closed"===r)return 0;return q(t._writableStreamController)}(this)}},{key:"ready",get:function(){return!1===F(this)?Promise.reject(H("ready")):this._readyPromise}}]),e}();function F(e){return!!l(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")}function I(e){var t=e._ownerWritableStream;h(void 0!==t);var r=t._state;if("closed"===r||"errored"===r)return Promise.reject(new TypeError("The stream (in "+r+" state) is not in the writable state and cannot be closed"));h("writable"===r||"erroring"===r),h(!1===C(t));var n,i=new Promise(function(e,r){var n={_resolve:e,_reject:r};t._closeRequest=n});return!0===t._backpressure&&"writable"===r&&J(e),n=t._writableStreamController,v(n,"close",0),W(n),i}function L(e,t){"pending"===e._closedPromiseState?V(e,t):function(e,t){h(void 0===e._closedPromise_resolve,"writer._closedPromise_resolve === undefined"),h(void 0===e._closedPromise_reject,"writer._closedPromise_reject === undefined"),h("pending"!==e._closedPromiseState,"writer._closedPromiseState is not pending"),e._closedPromise=Promise.reject(t),e._closedPromiseState="rejected"}(e,t),e._closedPromise.catch(function(){})}function M(e,t){"pending"===e._readyPromiseState?function(e,t){h(void 0!==e._readyPromise_resolve,"writer._readyPromise_resolve !== undefined"),h(void 0!==e._readyPromise_reject,"writer._readyPromise_reject !== undefined"),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}(e,t):function(e,t){h(void 0===e._readyPromise_resolve,"writer._readyPromise_resolve === undefined"),h(void 0===e._readyPromise_reject,"writer._readyPromise_reject === undefined"),e._readyPromise=Promise.reject(t),e._readyPromiseState="rejected"}(e,t),e._readyPromise.catch(function(){})}function j(e){var t=e._ownerWritableStream;h(void 0!==t),h(t._writer===e);var r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");M(e,r),L(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function D(e,t){var r=e._ownerWritableStream;h(void 0!==r);var n=r._writableStreamController,i=function(e,t){var r=e._strategySize;if(void 0===r)return 1;try{return r(t)}catch(t){return U(e,t),1}}(n,t);if(r!==e._ownerWritableStream)return Promise.reject(X("write to"));var a=r._state;if("errored"===a)return Promise.reject(r._storedError);if(!0===C(r)||"closed"===a)return Promise.reject(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===a)return Promise.reject(r._storedError);h("writable"===a);var o=function(e){return h(!0===A(e)),h("writable"===e._state),new Promise(function(t,r){var n={_resolve:t,_reject:r};e._writeRequests.push(n)})}(r);return function(e,t,r){var n={chunk:t};try{v(e,n,r)}catch(t){return void U(e,t)}var i=e._controlledWritableStream;if(!1===C(i)&&"writable"===i._state){var a=B(e);E(i,a)}W(e)}(n,t,i),o}var N=function(){function e(t,r,n,a){if(i(this,e),!1===_(t))throw new TypeError("WritableStreamDefaultController can only be constructed with a WritableStream instance");if(void 0!==t._writableStreamController)throw new TypeError("WritableStreamDefaultController instances can only be created by the WritableStream constructor");this._controlledWritableStream=t,this._underlyingSink=r,this._queue=void 0,this._queueTotalSize=void 0,g(this),this._started=!1;var o=u(n,a);this._strategySize=o.size,this._strategyHWM=o.highWaterMark,E(t,B(this))}return n(e,[{key:"error",value:function(e){if(!1===function(e){if(!l(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_underlyingSink"))return!1;return!0}(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&z(this,e)}},{key:"__abortSteps",value:function(e){return s(this._underlyingSink,"abort",[e])}},{key:"__errorSteps",value:function(){g(this)}},{key:"__startSteps",value:function(){var e=this,t=o(this._underlyingSink,"start",[this]),r=this._controlledWritableStream;Promise.resolve(t).then(function(){h("writable"===r._state||"erroring"===r._state),e._started=!0,W(e)},function(t){h("writable"===r._state||"erroring"===r._state),e._started=!0,w(r,t)}).catch(d)}}]),e}();function q(e){return e._strategyHWM-e._queueTotalSize}function W(e){var t=e._controlledWritableStream;if(!1!==e._started&&void 0===t._inFlightWriteRequest){var r=t._state;if("closed"!==r&&"errored"!==r)if("erroring"!==r){if(0!==e._queue.length){var n=m(e);"close"===n?function(e){var t=e._controlledWritableStream;(function(e){h(void 0===e._inFlightCloseRequest),h(void 0!==e._closeRequest),e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),p(e),h(0===e._queue.length,"queue must be empty once the final write record is dequeued"),s(e._underlyingSink,"close",[]).then(function(){P(t)},function(e){!function(e,t){h(void 0!==e._inFlightCloseRequest),e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,h("writable"===e._state||"erroring"===e._state),void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),w(e,t)}(t,e)}).catch(d)}(e):function(e,t){var r=e._controlledWritableStream;(function(e){h(void 0===e._inFlightWriteRequest,"there must be no pending write request"),h(0!==e._writeRequests.length,"writeRequests must not be empty"),e._inFlightWriteRequest=e._writeRequests.shift()})(r),s(e._underlyingSink,"write",[t,e]).then(function(){!function(e){h(void 0!==e._inFlightWriteRequest),e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(r);var t=r._state;if(h("writable"===t||"erroring"===t),p(e),!1===C(r)&&"writable"===t){var n=B(e);E(r,n)}W(e)},function(e){!function(e,t){h(void 0!==e._inFlightWriteRequest),e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,h("writable"===e._state||"erroring"===e._state),w(e,t)}(r,e)}).catch(d)}(e,n.chunk)}}else x(t)}}function U(e,t){"writable"===e._controlledWritableStream._state&&z(e,t)}function B(e){return q(e)<=0}function z(e,t){var r=e._controlledWritableStream;h("writable"===r._state),k(r,t)}function G(e){return new TypeError("WritableStream.prototype."+e+" can only be used on a WritableStream")}function H(e){return new TypeError("WritableStreamDefaultWriter.prototype."+e+" can only be used on a WritableStreamDefaultWriter")}function X(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function Y(e){e._closedPromise=new Promise(function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"})}function V(e,t){h(void 0!==e._closedPromise_resolve,"writer._closedPromise_resolve !== undefined"),h(void 0!==e._closedPromise_reject,"writer._closedPromise_reject !== undefined"),h("pending"===e._closedPromiseState,"writer._closedPromiseState is pending"),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}function Q(e,t){e._readyPromise=Promise.reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}function K(e){e._readyPromise=Promise.resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled"}function J(e){h(void 0!==e._readyPromise_resolve,"writer._readyPromise_resolve !== undefined"),h(void 0!==e._readyPromise_reject,"writer._readyPromise_reject !== undefined"),e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled"}},function(e,t,r){var n=r(0).IsFiniteNonNegativeNumber,i=r(1).assert;t.DequeueValue=function(e){i("_queue"in e&&"_queueTotalSize"in e,"Spec-level failure: DequeueValue should only be used on containers with [[queue]] and [[queueTotalSize]]."),i(e._queue.length>0,"Spec-level failure: should never dequeue from an empty queue.");var t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value},t.EnqueueValueWithSize=function(e,t,r){if(i("_queue"in e&&"_queueTotalSize"in e,"Spec-level failure: EnqueueValueWithSize should only be used on containers with [[queue]] and [[queueTotalSize]]."),r=Number(r),!n(r))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r}),e._queueTotalSize+=r},t.PeekQueueValue=function(e){return i("_queue"in e&&"_queueTotalSize"in e,"Spec-level failure: PeekQueueValue should only be used on containers with [[queue]] and [[queueTotalSize]]."),i(e._queue.length>0,"Spec-level failure: should never peek at an empty queue."),e._queue[0].value},t.ResetQueue=function(e){i("_queue"in e&&"_queueTotalSize"in e,"Spec-level failure: ResetQueue should only be used on containers with [[queue]] and [[queueTotalSize]]."),e._queue=[],e._queueTotalSize=0}},function(e,t,r){var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=r(0),o=a.ArrayBufferCopy,s=a.CreateIterResultObject,u=a.IsFiniteNonNegativeNumber,l=a.InvokeOrNoop,c=a.PromiseInvokeOrNoop,h=a.TransferArrayBuffer,d=a.ValidateAndNormalizeQueuingStrategy,f=a.ValidateAndNormalizeHighWaterMark,p=r(0),v=p.createArrayFromList,m=p.createDataProperty,g=p.typeIsObject,y=r(1),b=y.assert,_=y.rethrowAssertionErrorRejection,A=r(3),S=A.DequeueValue,w=A.EnqueueValueWithSize,k=A.ResetQueue,x=r(2),P=x.AcquireWritableStreamDefaultWriter,C=x.IsWritableStream,R=x.IsWritableStreamLocked,T=x.WritableStreamAbort,E=x.WritableStreamDefaultWriterCloseWithErrorPropagation,O=x.WritableStreamDefaultWriterRelease,F=x.WritableStreamDefaultWriterWrite,I=x.WritableStreamCloseQueuedOrInFlight,L=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.size,a=r.highWaterMark;i(this,e),this._state="readable",this._reader=void 0,this._storedError=void 0,this._disturbed=!1,this._readableStreamController=void 0;var o=t.type;if("bytes"===String(o))void 0===a&&(a=0),this._readableStreamController=new de(this,t,a);else{if(void 0!==o)throw new RangeError("Invalid type is specified");void 0===a&&(a=1),this._readableStreamController=new ne(this,t,n,a)}}return n(e,[{key:"cancel",value:function(e){return!1===j(this)?Promise.reject(Te("cancel")):!0===D(this)?Promise.reject(new TypeError("Cannot cancel a stream that already has a reader")):U(this,e)}},{key:"getReader",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mode;if(!1===j(this))throw Te("getReader");if(void 0===e)return M(this);if("byob"===(e=String(e)))return new K(this);throw new RangeError("Invalid mode is specified")}},{key:"pipeThrough",value:function(e,t){var r=e.writable,n=e.readable;return function(e){try{Promise.prototype.then.call(e,void 0,function(){})}catch(e){}}(this.pipeTo(r,t)),n}},{key:"pipeTo",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.preventClose,i=r.preventAbort,a=r.preventCancel;if(!1===j(this))return Promise.reject(Te("pipeTo"));if(!1===C(e))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));if(n=Boolean(n),i=Boolean(i),a=Boolean(a),!0===D(this))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream"));if(!0===R(e))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream"));var o=M(this),s=P(e),u=!1,l=Promise.resolve();return new Promise(function(r,c){var h,d,f;if(m(t,o._closedPromise,function(t){!1===i?g(function(){return T(e,t)},!0,t):y(!0,t)}),m(e,s._closedPromise,function(e){!1===a?g(function(){return U(t,e)},!0,e):y(!0,e)}),h=t,d=o._closedPromise,f=function(){!1===n?g(function(){return E(s)}):y()},"closed"===h._state?f():d.then(f).catch(_),!0===I(e)||"closed"===e._state){var p=new TypeError("the destination writable stream closed before all data could be piped to it");!1===a?g(function(){return U(t,p)},!0,p):y(!0,p)}function v(){var e=l;return l.then(function(){return e!==l?v():void 0})}function m(e,t,r){"errored"===e._state?r(e._storedError):t.catch(r).catch(_)}function g(t,r,n){function i(){t().then(function(){return b(r,n)},function(e){return b(!0,e)}).catch(_)}!0!==u&&(u=!0,"writable"===e._state&&!1===I(e)?v().then(i):i())}function y(t,r){!0!==u&&(u=!0,"writable"===e._state&&!1===I(e)?v().then(function(){return b(t,r)}).catch(_):b(t,r))}function b(e,t){O(s),te(o),e?c(t):r(void 0)}(function e(){return l=Promise.resolve(),!0===u?Promise.resolve():s._readyPromise.then(function(){return re(o).then(function(e){var t=e.value;!0!==e.done&&(l=F(s,t).catch(function(){}))})}).then(e)})().catch(function(e){l=Promise.resolve(),_(e)})})}},{key:"tee",value:function(){if(!1===j(this))throw Te("tee");var e=N(this,!1);return v(e)}},{key:"locked",get:function(){if(!1===j(this))throw Te("locked");return D(this)}}]),e}();function M(e){return new Q(e)}function j(e){return!!g(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function D(e){return b(!0===j(e),"IsReadableStreamLocked should only be used on known readable streams"),void 0!==e._reader}function N(e,t){b(!0===j(e)),b("boolean"==typeof t);var r=M(e),n={closedOrErrored:!1,canceled1:!1,canceled2:!1,reason1:void 0,reason2:void 0};n.promise=new Promise(function(e){n._resolve=e});var i=function(){return function e(){var t=e._reader,r=e._branch1,n=e._branch2,i=e._teeState;return re(t).then(function(e){b(g(e));var t=e.value,a=e.done;if(b("boolean"==typeof a),!0===a&&!1===i.closedOrErrored&&(!1===i.canceled1&&oe(r),!1===i.canceled2&&oe(n),i.closedOrErrored=!0),!0!==i.closedOrErrored){var o=t,s=t;!1===i.canceled1&&se(r,o),!1===i.canceled2&&se(n,s)}})}}();i._reader=r,i._teeState=n,i._cloneForBranch2=t;var a=function(){return function e(t){var r=e._stream,n=e._teeState;n.canceled1=!0;n.reason1=t;if(!0===n.canceled2){var i=v([n.reason1,n.reason2]),a=U(r,i);n._resolve(a)}return n.promise}}();a._stream=e,a._teeState=n;var o=function(){return function e(t){var r=e._stream,n=e._teeState;n.canceled2=!0;n.reason2=t;if(!0===n.canceled1){var i=v([n.reason1,n.reason2]),a=U(r,i);n._resolve(a)}return n.promise}}();o._stream=e,o._teeState=n;var s=Object.create(Object.prototype);m(s,"pull",i),m(s,"cancel",a);var u=new L(s),l=Object.create(Object.prototype);m(l,"pull",i),m(l,"cancel",o);var c=new L(l);return i._branch1=u._readableStreamController,i._branch2=c._readableStreamController,r._closedPromise.catch(function(e){!0!==n.closedOrErrored&&(ue(i._branch1,e),ue(i._branch2,e),n.closedOrErrored=!0)}),[u,c]}function q(e){return b(!0===J(e._reader)),b("readable"===e._state||"closed"===e._state),new Promise(function(t,r){var n={_resolve:t,_reject:r};e._reader._readIntoRequests.push(n)})}function W(e){return b(!0===Z(e._reader)),b("readable"===e._state),new Promise(function(t,r){var n={_resolve:t,_reject:r};e._reader._readRequests.push(n)})}function U(e,t){return e._disturbed=!0,"closed"===e._state?Promise.resolve(void 0):"errored"===e._state?Promise.reject(e._storedError):(B(e),e._readableStreamController.__cancelSteps(t).then(function(){}))}function B(e){b("readable"===e._state),e._state="closed";var t=e._reader;if(void 0!==t){if(!0===Z(t)){for(var r=0;r<t._readRequests.length;r++){(0,t._readRequests[r]._resolve)(s(void 0,!0))}t._readRequests=[]}!function(e){b(void 0!==e._closedPromise_resolve),b(void 0!==e._closedPromise_reject),e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}(t)}}function z(e,t){b(!0===j(e),"stream must be ReadableStream"),b("readable"===e._state,"state must be readable"),e._state="errored",e._storedError=t;var r=e._reader;if(void 0!==r){if(!0===Z(r)){for(var n=0;n<r._readRequests.length;n++){r._readRequests[n]._reject(t)}r._readRequests=[]}else{b(J(r),"reader must be ReadableStreamBYOBReader");for(var i=0;i<r._readIntoRequests.length;i++){r._readIntoRequests[i]._reject(t)}r._readIntoRequests=[]}Fe(r,t),r._closedPromise.catch(function(){})}}function G(e,t,r){var n=e._reader;b(n._readRequests.length>0),n._readRequests.shift()._resolve(s(t,r))}function H(e){return e._reader._readIntoRequests.length}function X(e){return e._reader._readRequests.length}function Y(e){var t=e._reader;return void 0!==t&&!1!==J(t)}function V(e){var t=e._reader;return void 0!==t&&!1!==Z(t)}e.exports={ReadableStream:L,IsReadableStreamDisturbed:function(e){return b(!0===j(e),"IsReadableStreamDisturbed should only be used on known readable streams"),e._disturbed},ReadableStreamDefaultControllerClose:oe,ReadableStreamDefaultControllerEnqueue:se,ReadableStreamDefaultControllerError:ue,ReadableStreamDefaultControllerGetDesiredSize:ce};var Q=function(){function e(t){if(i(this,e),!1===j(t))throw new TypeError("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===D(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");$(this,t),this._readRequests=[]}return n(e,[{key:"cancel",value:function(e){return!1===Z(this)?Promise.reject(Oe("cancel")):void 0===this._ownerReadableStream?Promise.reject(Ee("cancel")):ee(this,e)}},{key:"read",value:function(){return!1===Z(this)?Promise.reject(Oe("read")):void 0===this._ownerReadableStream?Promise.reject(Ee("read from")):re(this)}},{key:"releaseLock",value:function(){if(!1===Z(this))throw Oe("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");te(this)}}},{key:"closed",get:function(){return!1===Z(this)?Promise.reject(Oe("closed")):this._closedPromise}}]),e}(),K=function(){function e(t){if(i(this,e),!j(t))throw new TypeError("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===fe(t._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(D(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");$(this,t),this._readIntoRequests=[]}return n(e,[{key:"cancel",value:function(e){return J(this)?void 0===this._ownerReadableStream?Promise.reject(Ee("cancel")):ee(this,e):Promise.reject(Ie("cancel"))}},{key:"read",value:function(e){return J(this)?void 0===this._ownerReadableStream?Promise.reject(Ee("read from")):ArrayBuffer.isView(e)?0===e.byteLength?Promise.reject(new TypeError("view must have non-zero byteLength")):function(e,t){var r=e._ownerReadableStream;if(b(void 0!==r),r._disturbed=!0,"errored"===r._state)return Promise.reject(r._storedError);return function(e,t){var r=e._controlledReadableStream,n=1;t.constructor!==DataView&&(n=t.constructor.BYTES_PER_ELEMENT);var i=t.constructor,a={buffer:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:n,ctor:i,readerType:"byob"};if(e._pendingPullIntos.length>0)return a.buffer=h(a.buffer),e._pendingPullIntos.push(a),q(r);if("closed"===r._state){var o=new t.constructor(a.buffer,a.byteOffset,0);return Promise.resolve(s(o,!0))}if(e._queueTotalSize>0){if(!0===_e(e,a)){var u=ye(a);return Se(e),Promise.resolve(s(u,!1))}if(!0===e._closeRequested){var l=new TypeError("Insufficient bytes to fill elements in the given buffer");return Ce(e,l),Promise.reject(l)}}a.buffer=h(a.buffer),e._pendingPullIntos.push(a);var c=q(r);return ve(e),c}(r._readableStreamController,t)}(this,e):Promise.reject(new TypeError("view must be an array buffer view")):Promise.reject(Ie("read"))}},{key:"releaseLock",value:function(){if(!J(this))throw Ie("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");te(this)}}},{key:"closed",get:function(){return J(this)?this._closedPromise:Promise.reject(Ie("closed"))}}]),e}();function J(e){return!!g(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function Z(e){return!!g(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function $(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?function(e){e._closedPromise=new Promise(function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r})}(e):"closed"===t._state?function(e){e._closedPromise=Promise.resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}(e):(b("errored"===t._state,"state must be errored"),function(e,t){e._closedPromise=Promise.reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}(e,t._storedError),e._closedPromise.catch(function(){}))}function ee(e,t){var r=e._ownerReadableStream;return b(void 0!==r),U(r,t)}function te(e){b(void 0!==e._ownerReadableStream),b(e._ownerReadableStream._reader===e),"readable"===e._ownerReadableStream._state?Fe(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e,t){b(void 0===e._closedPromise_resolve),b(void 0===e._closedPromise_reject),e._closedPromise=Promise.reject(t)}(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),e._closedPromise.catch(function(){}),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function re(e){var t=e._ownerReadableStream;return b(void 0!==t),t._disturbed=!0,"closed"===t._state?Promise.resolve(s(void 0,!0)):"errored"===t._state?Promise.reject(t._storedError):(b("readable"===t._state),t._readableStreamController.__pullSteps())}var ne=function(){function e(t,r,n,a){if(i(this,e),!1===j(t))throw new TypeError("ReadableStreamDefaultController can only be constructed with a ReadableStream instance");if(void 0!==t._readableStreamController)throw new TypeError("ReadableStreamDefaultController instances can only be created by the ReadableStream constructor");this._controlledReadableStream=t,this._underlyingSource=r,this._queue=void 0,this._queueTotalSize=void 0,k(this),this._started=!1,this._closeRequested=!1,this._pullAgain=!1,this._pulling=!1;var o=d(n,a);this._strategySize=o.size,this._strategyHWM=o.highWaterMark;var s=this,u=l(r,"start",[this]);Promise.resolve(u).then(function(){s._started=!0,b(!1===s._pulling),b(!1===s._pullAgain),ae(s)},function(e){le(s,e)}).catch(_)}return n(e,[{key:"close",value:function(){if(!1===ie(this))throw Le("close");if(!0===this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableStream._state;if("readable"!==e)throw new TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed");oe(this)}},{key:"enqueue",value:function(e){if(!1===ie(this))throw Le("enqueue");if(!0===this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableStream._state;if("readable"!==t)throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be enqueued to");return se(this,e)}},{key:"error",value:function(e){if(!1===ie(this))throw Le("error");var t=this._controlledReadableStream;if("readable"!==t._state)throw new TypeError("The stream is "+t._state+" and so cannot be errored");ue(this,e)}},{key:"__cancelSteps",value:function(e){return k(this),c(this._underlyingSource,"cancel",[e])}},{key:"__pullSteps",value:function(){var e=this._controlledReadableStream;if(this._queue.length>0){var t=S(this);return!0===this._closeRequested&&0===this._queue.length?B(e):ae(this),Promise.resolve(s(t,!1))}var r=W(e);return ae(this),r}},{key:"desiredSize",get:function(){if(!1===ie(this))throw Le("desiredSize");return ce(this)}}]),e}();function ie(e){return!!g(e)&&!!Object.prototype.hasOwnProperty.call(e,"_underlyingSource")}function ae(e){!1!==function(e){var t=e._controlledReadableStream;if("closed"===t._state||"errored"===t._state)return!1;if(!0===e._closeRequested)return!1;if(!1===e._started)return!1;if(!0===D(t)&&X(t)>0)return!0;if(ce(e)>0)return!0;return!1}(e)&&(!0!==e._pulling?(b(!1===e._pullAgain),e._pulling=!0,c(e._underlyingSource,"pull",[e]).then(function(){if(e._pulling=!1,!0===e._pullAgain)return e._pullAgain=!1,ae(e)},function(t){le(e,t)}).catch(_)):e._pullAgain=!0)}function oe(e){var t=e._controlledReadableStream;b(!1===e._closeRequested),b("readable"===t._state),e._closeRequested=!0,0===e._queue.length&&B(t)}function se(e,t){var r=e._controlledReadableStream;if(b(!1===e._closeRequested),b("readable"===r._state),!0===D(r)&&X(r)>0)G(r,t,!1);else{var n=1;if(void 0!==e._strategySize){var i=e._strategySize;try{n=i(t)}catch(t){throw le(e,t),t}}try{w(e,t,n)}catch(t){throw le(e,t),t}}ae(e)}function ue(e,t){var r=e._controlledReadableStream;b("readable"===r._state),k(e),z(r,t)}function le(e,t){"readable"===e._controlledReadableStream._state&&ue(e,t)}function ce(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}var he=function(){function e(t,r){i(this,e),this._associatedReadableByteStreamController=t,this._view=r}return n(e,[{key:"respond",value:function(e){if(!1===pe(this))throw Me("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");!function(e,t){if(t=Number(t),!1===u(t))throw new RangeError("bytesWritten must be a finite");b(e._pendingPullIntos.length>0),xe(e,t)}(this._associatedReadableByteStreamController,e)}},{key:"respondWithNewView",value:function(e){if(!1===pe(this))throw Me("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");!function(e,t){b(e._pendingPullIntos.length>0);var r=e._pendingPullIntos[0];if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.byteLength!==t.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");r.buffer=t.buffer,xe(e,t.byteLength)}(this._associatedReadableByteStreamController,e)}},{key:"view",get:function(){return this._view}}]),e}(),de=function(){function e(t,r,n){if(i(this,e),!1===j(t))throw new TypeError("ReadableByteStreamController can only be constructed with a ReadableStream instance given a byte source");if(void 0!==t._readableStreamController)throw new TypeError("ReadableByteStreamController instances can only be created by the ReadableStream constructor given a byte source");this._controlledReadableStream=t,this._underlyingByteSource=r,this._pullAgain=!1,this._pulling=!1,me(this),this._queue=this._queueTotalSize=void 0,k(this),this._closeRequested=!1,this._started=!1,this._strategyHWM=f(n);var a=r.autoAllocateChunkSize;if(void 0!==a&&(!1===Number.isInteger(a)||a<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");this._autoAllocateChunkSize=a,this._pendingPullIntos=[];var o=this,s=l(r,"start",[this]);Promise.resolve(s).then(function(){o._started=!0,b(!1===o._pulling),b(!1===o._pullAgain),ve(o)},function(e){"readable"===t._state&&Ce(o,e)}).catch(_)}return n(e,[{key:"close",value:function(){if(!1===fe(this))throw je("close");if(!0===this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableStream._state;if("readable"!==e)throw new TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed");!function(e){var t=e._controlledReadableStream;if(b(!1===e._closeRequested),b("readable"===t._state),e._queueTotalSize>0)return void(e._closeRequested=!0);if(e._pendingPullIntos.length>0){var r=e._pendingPullIntos[0];if(r.bytesFilled>0){var n=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Ce(e,n),n}}B(t)}(this)}},{key:"enqueue",value:function(e){if(!1===fe(this))throw je("enqueue");if(!0===this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableStream._state;if("readable"!==t)throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(e))throw new TypeError("You can only enqueue array buffer views when using a ReadableByteStreamController");!function(e,t){var r=e._controlledReadableStream;b(!1===e._closeRequested),b("readable"===r._state);var n=t.buffer,i=t.byteOffset,a=t.byteLength,o=h(n);if(!0===V(r))if(0===X(r))be(e,o,i,a);else{b(0===e._queue.length);var s=new Uint8Array(o,i,a);G(r,s,!1)}else!0===Y(r)?(be(e,o,i,a),ke(e)):(b(!1===D(r),"stream must not be locked"),be(e,o,i,a))}(this,e)}},{key:"error",value:function(e){if(!1===fe(this))throw je("error");var t=this._controlledReadableStream;if("readable"!==t._state)throw new TypeError("The stream is "+t._state+" and so cannot be errored");Ce(this,e)}},{key:"__cancelSteps",value:function(e){this._pendingPullIntos.length>0&&(this._pendingPullIntos[0].bytesFilled=0);return k(this),c(this._underlyingByteSource,"cancel",[e])}},{key:"__pullSteps",value:function(){var e=this._controlledReadableStream;if(b(!0===V(e)),this._queueTotalSize>0){b(0===X(e));var t=this._queue.shift();this._queueTotalSize-=t.byteLength,Se(this);var r=void 0;try{r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}catch(e){return Promise.reject(e)}return Promise.resolve(s(r,!1))}var n=this._autoAllocateChunkSize;if(void 0!==n){var i=void 0;try{i=new ArrayBuffer(n)}catch(e){return Promise.reject(e)}var a={buffer:i,byteOffset:0,byteLength:n,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(a)}var o=W(e);return ve(this),o}},{key:"byobRequest",get:function(){if(!1===fe(this))throw je("byobRequest");if(void 0===this._byobRequest&&this._pendingPullIntos.length>0){var e=this._pendingPullIntos[0],t=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled);this._byobRequest=new he(this,t)}return this._byobRequest}},{key:"desiredSize",get:function(){if(!1===fe(this))throw je("desiredSize");return Re(this)}}]),e}();function fe(e){return!!g(e)&&!!Object.prototype.hasOwnProperty.call(e,"_underlyingByteSource")}function pe(e){return!!g(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function ve(e){!1!==function(e){var t=e._controlledReadableStream;if("readable"!==t._state)return!1;if(!0===e._closeRequested)return!1;if(!1===e._started)return!1;if(!0===V(t)&&X(t)>0)return!0;if(!0===Y(t)&&H(t)>0)return!0;if(Re(e)>0)return!0;return!1}(e)&&(!0!==e._pulling?(b(!1===e._pullAgain),e._pulling=!0,c(e._underlyingByteSource,"pull",[e]).then(function(){e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,ve(e))},function(t){"readable"===e._controlledReadableStream._state&&Ce(e,t)}).catch(_)):e._pullAgain=!0)}function me(e){we(e),e._pendingPullIntos=[]}function ge(e,t){b("errored"!==e._state,"state must not be errored");var r=!1;"closed"===e._state&&(b(0===t.bytesFilled),r=!0);var n=ye(t);"default"===t.readerType?G(e,n,r):(b("byob"===t.readerType),function(e,t,r){var n=e._reader;b(n._readIntoRequests.length>0),n._readIntoRequests.shift()._resolve(s(t,r))}(e,n,r))}function ye(e){var t=e.bytesFilled,r=e.elementSize;return b(t<=e.byteLength),b(t%r==0),new e.ctor(e.buffer,e.byteOffset,t/r)}function be(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function _e(e,t){var r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),a=t.bytesFilled+i,s=a-a%r,u=i,l=!1;s>n&&(u=s-t.bytesFilled,l=!0);for(var c=e._queue;u>0;){var h=c[0],d=Math.min(u,h.byteLength),f=t.byteOffset+t.bytesFilled;o(t.buffer,f,h.buffer,h.byteOffset,d),h.byteLength===d?c.shift():(h.byteOffset+=d,h.byteLength-=d),e._queueTotalSize-=d,Ae(e,d,t),u-=d}return!1===l&&(b(0===e._queueTotalSize,"queue must be empty"),b(t.bytesFilled>0),b(t.bytesFilled<t.elementSize)),l}function Ae(e,t,r){b(0===e._pendingPullIntos.length||e._pendingPullIntos[0]===r),we(e),r.bytesFilled+=t}function Se(e){b("readable"===e._controlledReadableStream._state),0===e._queueTotalSize&&!0===e._closeRequested?B(e._controlledReadableStream):ve(e)}function we(e){void 0!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=void 0,e._byobRequest=void 0)}function ke(e){for(b(!1===e._closeRequested);e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos[0];!0===_e(e,t)&&(Pe(e),ge(e._controlledReadableStream,t))}}function xe(e,t){var r=e._pendingPullIntos[0],n=e._controlledReadableStream;if("closed"===n._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");!function(e,t){t.buffer=h(t.buffer),b(0===t.bytesFilled,"bytesFilled must be 0");var r=e._controlledReadableStream;if(!0===Y(r))for(;H(r)>0;)ge(r,Pe(e))}(e,r)}else b("readable"===n._state),function(e,t,r){if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range");if(Ae(e,t,r),!(r.bytesFilled<r.elementSize)){Pe(e);var n=r.bytesFilled%r.elementSize;if(n>0){var i=r.byteOffset+r.bytesFilled,a=r.buffer.slice(i-n,i);be(e,a,0,a.byteLength)}r.buffer=h(r.buffer),r.bytesFilled-=n,ge(e._controlledReadableStream,r),ke(e)}}(e,t,r)}function Pe(e){var t=e._pendingPullIntos.shift();return we(e),t}function Ce(e,t){var r=e._controlledReadableStream;b("readable"===r._state),me(e),k(e),z(r,t)}function Re(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Te(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}function Ee(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function Oe(e){return new TypeError("ReadableStreamDefaultReader.prototype."+e+" can only be used on a ReadableStreamDefaultReader")}function Fe(e,t){b(void 0!==e._closedPromise_resolve),b(void 0!==e._closedPromise_reject),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function Ie(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}function Le(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function Me(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function je(e){return new TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}},function(e,t,r){var n=r(6),i=r(4),a=r(2);t.TransformStream=n.TransformStream,t.ReadableStream=i.ReadableStream,t.IsReadableStreamDisturbed=i.IsReadableStreamDisturbed,t.ReadableStreamDefaultControllerClose=i.ReadableStreamDefaultControllerClose,t.ReadableStreamDefaultControllerEnqueue=i.ReadableStreamDefaultControllerEnqueue,t.ReadableStreamDefaultControllerError=i.ReadableStreamDefaultControllerError,t.ReadableStreamDefaultControllerGetDesiredSize=i.ReadableStreamDefaultControllerGetDesiredSize,t.AcquireWritableStreamDefaultWriter=a.AcquireWritableStreamDefaultWriter,t.IsWritableStream=a.IsWritableStream,t.IsWritableStreamLocked=a.IsWritableStreamLocked,t.WritableStream=a.WritableStream,t.WritableStreamAbort=a.WritableStreamAbort,t.WritableStreamDefaultControllerError=a.WritableStreamDefaultControllerError,t.WritableStreamDefaultWriterCloseWithErrorPropagation=a.WritableStreamDefaultWriterCloseWithErrorPropagation,t.WritableStreamDefaultWriterRelease=a.WritableStreamDefaultWriterRelease,t.WritableStreamDefaultWriterWrite=a.WritableStreamDefaultWriterWrite},function(e,t,r){var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=r(1).assert,o=r(0),s=o.InvokeOrNoop,u=o.PromiseInvokeOrPerformFallback,l=o.PromiseInvokeOrNoop,c=o.typeIsObject,h=r(4),d=h.ReadableStream,f=h.ReadableStreamDefaultControllerClose,p=h.ReadableStreamDefaultControllerEnqueue,v=h.ReadableStreamDefaultControllerError,m=h.ReadableStreamDefaultControllerGetDesiredSize,g=r(2),y=g.WritableStream,b=g.WritableStreamDefaultControllerError;function _(e,t){if(!0===e._errored)throw new TypeError("TransformStream is already errored");if(!0===e._readableClosed)throw new TypeError("Readable side is already closed");var r=e._readableController;try{p(r,t)}catch(t){throw e._readableClosed=!0,S(e,t),e._storedError}!0===m(r)<=0&&!1===e._backpressure&&x(e,!0)}function A(e){a(!1===e._errored),a(!1===e._readableClosed);try{f(e._readableController)}catch(e){a(!1)}e._readableClosed=!0}function S(e,t){!1===e._errored&&w(e,t)}function w(e,t){a(!1===e._errored),e._errored=!0,e._storedError=t,!1===e._writableDone&&b(e._writableController,t),!1===e._readableClosed&&v(e._readableController,t)}function k(e){return a(void 0!==e._backpressureChangePromise,"_backpressureChangePromise should have been initialized"),!1===e._backpressure?Promise.resolve():(a(!0===e._backpressure,"_backpressure should have been initialized"),e._backpressureChangePromise)}function x(e,t){a(e._backpressure!==t,"TransformStreamSetBackpressure() should be called only when backpressure is changed"),void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(t),e._backpressureChangePromise=new Promise(function(t){e._backpressureChangePromise_resolve=t}),e._backpressureChangePromise.then(function(e){a(e!==t,"_backpressureChangePromise should be fulfilled only when backpressure is changed")}),e._backpressure=t}function P(e,t){return _(t._controlledTransformStream,e),Promise.resolve()}function C(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function R(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}var T=function(){function e(t,r){i(this,e),this._transformStream=t,this._startPromise=r}return n(e,[{key:"start",value:function(e){var t=this._transformStream;return t._writableController=e,this._startPromise.then(function(){return k(t)})}},{key:"write",value:function(e){return function(e,t){a(!1===e._errored),a(!1===e._transforming),a(!1===e._backpressure),e._transforming=!0;var r=e._transformer,n=e._transformStreamController;return u(r,"transform",[t,n],P,[t,n]).then(function(){return e._transforming=!1,k(e)},function(t){return S(e,t),Promise.reject(t)})}(this._transformStream,e)}},{key:"abort",value:function(){var e=this._transformStream;e._writableDone=!0,w(e,new TypeError("Writable side aborted"))}},{key:"close",value:function(){var e=this._transformStream;return a(!1===e._transforming),e._writableDone=!0,l(e._transformer,"flush",[e._transformStreamController]).then(function(){return!0===e._errored?Promise.reject(e._storedError):(!1===e._readableClosed&&A(e),Promise.resolve())}).catch(function(t){return S(e,t),Promise.reject(e._storedError)})}}]),e}(),E=function(){function e(t,r){i(this,e),this._transformStream=t,this._startPromise=r}return n(e,[{key:"start",value:function(e){var t=this._transformStream;return t._readableController=e,this._startPromise.then(function(){return a(void 0!==t._backpressureChangePromise,"_backpressureChangePromise should have been initialized"),!0===t._backpressure?Promise.resolve():(a(!1===t._backpressure,"_backpressure should have been initialized"),t._backpressureChangePromise)})}},{key:"pull",value:function(){var e=this._transformStream;return a(!0===e._backpressure,"pull() should be never called while _backpressure is false"),a(void 0!==e._backpressureChangePromise,"_backpressureChangePromise should have been initialized"),x(e,!1),e._backpressureChangePromise}},{key:"cancel",value:function(){var e=this._transformStream;e._readableClosed=!0,w(e,new TypeError("Readable side canceled"))}}]),e}(),O=function(){function e(t){if(i(this,e),!1===R(t))throw new TypeError("TransformStreamDefaultController can only be constructed with a TransformStream instance");if(void 0!==t._transformStreamController)throw new TypeError("TransformStreamDefaultController instances can only be created by the TransformStream constructor");this._controlledTransformStream=t}return n(e,[{key:"enqueue",value:function(e){if(!1===C(this))throw I("enqueue");_(this._controlledTransformStream,e)}},{key:"close",value:function(){if(!1===C(this))throw I("close");!function(e){if(!0===e._errored)throw new TypeError("TransformStream is already errored");if(!0===e._readableClosed)throw new TypeError("Readable side is already closed");A(e)}(this._controlledTransformStream)}},{key:"error",value:function(e){if(!1===C(this))throw I("error");!function(e,t){if(!0===e._errored)throw new TypeError("TransformStream is already errored");w(e,t)}(this._controlledTransformStream,e)}},{key:"desiredSize",get:function(){if(!1===C(this))throw I("desiredSize");var e=this._controlledTransformStream._readableController;return m(e)}}]),e}(),F=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this._transformer=t;var r=t.readableStrategy,n=t.writableStrategy;this._transforming=!1,this._errored=!1,this._storedError=void 0,this._writableController=void 0,this._readableController=void 0,this._transformStreamController=void 0,this._writableDone=!1,this._readableClosed=!1,this._backpressure=void 0,this._backpressureChangePromise=void 0,this._backpressureChangePromise_resolve=void 0,this._transformStreamController=new O(this);var o=void 0,u=new Promise(function(e){o=e}),l=new E(this,u);this._readable=new d(l,r);var c=new T(this,u);this._writable=new y(c,n),a(void 0!==this._writableController),a(void 0!==this._readableController),x(this,m(this._readableController)<=0);var h=this,f=s(t,"start",[h._transformStreamController]);o(f),u.catch(function(e){!1===h._errored&&(h._errored=!0,h._storedError=e)})}return n(e,[{key:"readable",get:function(){if(!1===R(this))throw L("readable");return this._readable}},{key:"writable",get:function(){if(!1===R(this))throw L("writable");return this._writable}}]),e}();function I(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function L(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}e.exports={TransformStream:F}},function(e,t,r){e.exports=r(5)}]))},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=!1;try{if("function"==typeof URL&&"object"===n(URL.prototype)&&"origin"in URL.prototype){var a=new URL("b","http://a");a.pathname="c%20d",i="http://a/c%20d"===a.href}}catch(e){}if(i)t.URL=URL;else{var o=r(146).URL,s=r(3).URL;s&&(o.createObjectURL=function(e){return s.createObjectURL.apply(s,arguments)},o.revokeObjectURL=function(e){s.revokeObjectURL(e)}),t.URL=o}},function(e,t,r){"use strict";!function(){var e=Object.create(null);e.ftp=21,e.file=0,e.gopher=70,e.http=80,e.https=443,e.ws=80,e.wss=443;var r=Object.create(null);function n(t){return void 0!==e[t]}function i(){d.call(this),this._isInvalid=!0}function a(e){return""===e&&i.call(this),e.toLowerCase()}function o(e){var t=e.charCodeAt(0);return t>32&&t<127&&-1===[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function s(e){var t=e.charCodeAt(0);return t>32&&t<127&&-1===[34,35,60,62,96].indexOf(t)?e:encodeURIComponent(e)}r["%2e"]=".",r[".%2e"]="..",r["%2e."]="..",r["%2e%2e"]="..";var u,l=/[a-zA-Z]/,c=/[a-zA-Z0-9\+\-\.]/;function h(t,h,d){function f(e){b.push(e)}var p=h||"scheme start",v=0,m="",g=!1,y=!1,b=[];e:for(;(t[v-1]!==u||0===v)&&!this._isInvalid;){var _=t[v];switch(p){case"scheme start":if(!_||!l.test(_)){if(h){f("Invalid scheme.");break e}m="",p="no scheme";continue}m+=_.toLowerCase(),p="scheme";break;case"scheme":if(_&&c.test(_))m+=_.toLowerCase();else{if(":"!==_){if(h){if(_===u)break e;f("Code point not allowed in scheme: "+_);break e}m="",v=0,p="no scheme";continue}if(this._scheme=m,m="",h)break e;n(this._scheme)&&(this._isRelative=!0),p="file"===this._scheme?"relative":this._isRelative&&d&&d._scheme===this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"===_?(this._query="?",p="query"):"#"===_?(this._fragment="#",p="fragment"):_!==u&&"\t"!==_&&"\n"!==_&&"\r"!==_&&(this._schemeData+=o(_));break;case"no scheme":if(d&&n(d._scheme)){p="relative";continue}f("Missing scheme."),i.call(this);break;case"relative or authority":if("/"!==_||"/"!==t[v+1]){f("Expected /, got: "+_),p="relative";continue}p="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!==this._scheme&&(this._scheme=d._scheme),_===u){this._host=d._host,this._port=d._port,this._path=d._path.slice(),this._query=d._query,this._username=d._username,this._password=d._password;break e}if("/"===_||"\\"===_)"\\"===_&&f("\\ is an invalid code point."),p="relative slash";else if("?"===_)this._host=d._host,this._port=d._port,this._path=d._path.slice(),this._query="?",this._username=d._username,this._password=d._password,p="query";else{if("#"!==_){var A=t[v+1],S=t[v+2];("file"!==this._scheme||!l.test(_)||":"!==A&&"|"!==A||S!==u&&"/"!==S&&"\\"!==S&&"?"!==S&&"#"!==S)&&(this._host=d._host,this._port=d._port,this._username=d._username,this._password=d._password,this._path=d._path.slice(),this._path.pop()),p="relative path";continue}this._host=d._host,this._port=d._port,this._path=d._path.slice(),this._query=d._query,this._fragment="#",this._username=d._username,this._password=d._password,p="fragment"}break;case"relative slash":if("/"!==_&&"\\"!==_){"file"!==this._scheme&&(this._host=d._host,this._port=d._port,this._username=d._username,this._password=d._password),p="relative path";continue}"\\"===_&&f("\\ is an invalid code point."),p="file"===this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!==_){f("Expected '/', got: "+_),p="authority ignore slashes";continue}p="authority second slash";break;case"authority second slash":if(p="authority ignore slashes","/"!==_){f("Expected '/', got: "+_);continue}break;case"authority ignore slashes":if("/"!==_&&"\\"!==_){p="authority";continue}f("Expected authority, got: "+_);break;case"authority":if("@"===_){g&&(f("@ already seen."),m+="%40"),g=!0;for(var w=0;w<m.length;w++){var k=m[w];if("\t"!==k&&"\n"!==k&&"\r"!==k)if(":"!==k||null!==this._password){var x=o(k);null!==this._password?this._password+=x:this._username+=x}else this._password="";else f("Invalid whitespace in authority.")}m=""}else{if(_===u||"/"===_||"\\"===_||"?"===_||"#"===_){v-=m.length,m="",p="host";continue}m+=_}break;case"file host":if(_===u||"/"===_||"\\"===_||"?"===_||"#"===_){2!==m.length||!l.test(m[0])||":"!==m[1]&&"|"!==m[1]?0===m.length?p="relative path start":(this._host=a.call(this,m),m="",p="relative path start"):p="relative path";continue}"\t"===_||"\n"===_||"\r"===_?f("Invalid whitespace in file host."):m+=_;break;case"host":case"hostname":if(":"!==_||y){if(_===u||"/"===_||"\\"===_||"?"===_||"#"===_){if(this._host=a.call(this,m),m="",p="relative path start",h)break e;continue}"\t"!==_&&"\n"!==_&&"\r"!==_?("["===_?y=!0:"]"===_&&(y=!1),m+=_):f("Invalid code point in host/hostname: "+_)}else if(this._host=a.call(this,m),m="",p="port","hostname"===h)break e;break;case"port":if(/[0-9]/.test(_))m+=_;else{if(_===u||"/"===_||"\\"===_||"?"===_||"#"===_||h){if(""!==m){var P=parseInt(m,10);P!==e[this._scheme]&&(this._port=P+""),m=""}if(h)break e;p="relative path start";continue}"\t"===_||"\n"===_||"\r"===_?f("Invalid code point in port: "+_):i.call(this)}break;case"relative path start":if("\\"===_&&f("'\\' not allowed in path."),p="relative path","/"!==_&&"\\"!==_)continue;break;case"relative path":var C;if(_!==u&&"/"!==_&&"\\"!==_&&(h||"?"!==_&&"#"!==_))"\t"!==_&&"\n"!==_&&"\r"!==_&&(m+=o(_));else"\\"===_&&f("\\ not allowed in relative path."),(C=r[m.toLowerCase()])&&(m=C),".."===m?(this._path.pop(),"/"!==_&&"\\"!==_&&this._path.push("")):"."===m&&"/"!==_&&"\\"!==_?this._path.push(""):"."!==m&&("file"===this._scheme&&0===this._path.length&&2===m.length&&l.test(m[0])&&"|"===m[1]&&(m=m[0]+":"),this._path.push(m)),m="","?"===_?(this._query="?",p="query"):"#"===_&&(this._fragment="#",p="fragment");break;case"query":h||"#"!==_?_!==u&&"\t"!==_&&"\n"!==_&&"\r"!==_&&(this._query+=s(_)):(this._fragment="#",p="fragment");break;case"fragment":_!==u&&"\t"!==_&&"\n"!==_&&"\r"!==_&&(this._fragment+=_)}v++}}function d(){this._scheme="",this._schemeData="",this._username="",this._password=null,this._host="",this._port="",this._path=[],this._query="",this._fragment="",this._isInvalid=!1,this._isRelative=!1}function f(e,t){void 0===t||t instanceof f||(t=new f(String(t))),this._url=e,d.call(this);var r=e.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");h.call(this,r,null,t)}f.prototype={toString:function(){return this.href},get href(){if(this._isInvalid)return this._url;var e="";return""===this._username&&null===this._password||(e=this._username+(null!==this._password?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+e+this.host:"")+this.pathname+this._query+this._fragment},set href(e){d.call(this),h.call(this,e)},get protocol(){return this._scheme+":"},set protocol(e){this._isInvalid||h.call(this,e+":","scheme start")},get host(){return this._isInvalid?"":this._port?this._host+":"+this._port:this._host},set host(e){!this._isInvalid&&this._isRelative&&h.call(this,e,"host")},get hostname(){return this._host},set hostname(e){!this._isInvalid&&this._isRelative&&h.call(this,e,"hostname")},get port(){return this._port},set port(e){!this._isInvalid&&this._isRelative&&h.call(this,e,"port")},get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData},set pathname(e){!this._isInvalid&&this._isRelative&&(this._path=[],h.call(this,e,"relative path start"))},get search(){return this._isInvalid||!this._query||"?"===this._query?"":this._query},set search(e){!this._isInvalid&&this._isRelative&&(this._query="?","?"===e[0]&&(e=e.slice(1)),h.call(this,e,"query"))},get hash(){return this._isInvalid||!this._fragment||"#"===this._fragment?"":this._fragment},set hash(e){this._isInvalid||(this._fragment="#","#"===e[0]&&(e=e.slice(1)),h.call(this,e,"fragment"))},get origin(){var e;if(this._isInvalid||!this._scheme)return"";switch(this._scheme){case"data":case"file":case"javascript":case"mailto":return"null";case"blob":try{return new f(this._schemeData).origin||"null"}catch(e){}return"null"}return(e=this.host)?this._scheme+"://"+e:""}},t.URL=f}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDocument=function(e,t){var r,n=new F;if("string"==typeof e)r={url:e};else if((0,i.isArrayBuffer)(e))r={data:e};else if(e instanceof I)r={range:e};else{if("object"!==S(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}var o=Object.create(null),u=null,l=null;for(var d in r)if("url"!==d||"undefined"==typeof window)if("range"!==d)if("worker"!==d)if("data"!==d||r[d]instanceof Uint8Array)o[d]=r[d];else{var p=r[d];if("string"==typeof p)o[d]=(0,i.stringToBytes)(p);else if("object"!==S(p)||null===p||isNaN(p.length)){if(!(0,i.isArrayBuffer)(p))throw new Error("Invalid PDF binary data: either typed array, string or array-like object is expected in the data property.");o[d]=new Uint8Array(p)}else o[d]=new Uint8Array(p)}else l=r[d];else u=r[d];else o[d]=new i.URL(r[d],window.location).href;o.rangeChunkSize=o.rangeChunkSize||k,o.CMapReaderFactory=o.CMapReaderFactory||a.DOMCMapReaderFactory,o.ignoreErrors=!0!==o.stopAtErrors,o.pdfBug=!0===o.pdfBug,o.cMapUrl=t,o.cMapPacked=!0;var v=Object.values(i.NativeImageDecoding);void 0!==o.nativeImageDecoderSupport&&v.includes(o.nativeImageDecoderSupport)||(o.nativeImageDecoderSupport=s.apiCompatibilityParams.nativeImageDecoderSupport||i.NativeImageDecoding.DECODE);Number.isInteger(o.maxImageSize)||(o.maxImageSize=-1);"boolean"!=typeof o.isEvalSupported&&(o.isEvalSupported=!0);"boolean"!=typeof o.disableFontFace&&(o.disableFontFace=s.apiCompatibilityParams.disableFontFace||!1);"boolean"!=typeof o.disableRange&&(o.disableRange=!1);"boolean"!=typeof o.disableStream&&(o.disableStream=!1);"boolean"!=typeof o.disableAutoFetch&&(o.disableAutoFetch=!1);"boolean"!=typeof o.disableCreateObjectURL&&(o.disableCreateObjectURL=s.apiCompatibilityParams.disableCreateObjectURL||!1);if((0,i.setVerbosityLevel)(o.verbosity),!l){var m={postMessageTransfers:o.postMessageTransfers,verbosity:o.verbosity,port:c.GlobalWorkerOptions.workerPort};l=m.port?D.fromPort(m):new D(m),n._worker=l}var g=n.docId;return l.promise.then(function(){if(n.destroyed)throw new Error("Loading aborted");return function(e,t,r,n){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:n,apiVersion:"2.2.228",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,disableCreateObjectURL:t.disableCreateObjectURL,postMessageTransfers:e.postMessageTransfers,docBaseUrl:t.docBaseUrl,nativeImageDecoderSupport:t.nativeImageDecoderSupport,ignoreErrors:t.ignoreErrors,isEvalSupported:t.isEvalSupported}).then(function(t){if(e.destroyed)throw new Error("Worker was destroyed");return t}))}(l,o,u,g).then(function(e){if(n.destroyed)throw new Error("Loading aborted");var t;u?t=new f.PDFDataTransportStream({length:o.length,initialData:o.initialData,progressiveDone:o.progressiveDone,disableRange:o.disableRange,disableStream:o.disableStream},u):o.data||(t=R({url:o.url,length:o.length,httpHeaders:o.httpHeaders,withCredentials:o.withCredentials,rangeChunkSize:o.rangeChunkSize,disableRange:o.disableRange,disableStream:o.disableStream}));var r=new h.MessageHandler(g,e,l.port);r.postMessageTransfers=l.postMessageTransfers;var i=new q(r,n,t,o);n._transport=i,r.send("Ready",null)})}).catch(n._capability.reject),n},t.setPDFNetworkStreamFactory=function(e){R=e},t.build=t.version=t.PDFPageProxy=t.PDFDocumentProxy=t.PDFWorker=t.PDFDataRangeTransport=t.LoopbackPort=void 0;var n=v(r(148)),i=r(1),a=r(151),o=r(152),s=r(153),u=r(154),l=v(r(3)),c=r(156),h=r(157),d=r(158),f=r(160),p=r(161);function v(e){return e&&e.__esModule?e:{default:e}}function m(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function y(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function A(e,t,r){return t&&_(e.prototype,t),r&&_(e,r),e}function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var w,k=65536,x=!1,P=null,C=!1;"undefined"==typeof window?(x=!0,void 0===require.ensure&&(require.ensure=require("node-ensure")),C=!0):"undefined"!=typeof require&&"function"==typeof require.ensure&&(C=!0),"undefined"!=typeof requirejs&&requirejs.toUrl&&(w=requirejs.toUrl("pdfjs-dist/build/pdf.worker.js"));var R,T="undefined"!=typeof requirejs&&requirejs.load;if(P=C?function(){return new Promise(function(e,t){require.ensure([],function(){try{var r;r=require("./pdf.worker.js"),e(r.WorkerMessageHandler)}catch(e){t(e)}},t,"pdfjsWorker")})}:T?function(){return new Promise(function(e,t){requirejs(["pdfjs-dist/build/pdf.worker"],function(r){try{e(r.WorkerMessageHandler)}catch(e){t(e)}},t)})}:null,!w&&"object"===("undefined"==typeof document?"undefined":S(document))&&"currentScript"in document){var E=document.currentScript&&document.currentScript.src;E&&(w=E.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}var O,F=(O=0,function(){function e(){b(this,e),this._capability=(0,i.createPromiseCapability)(),this._transport=null,this._worker=null,this.docId="d"+O++,this.destroyed=!1,this.onPassword=null,this.onProgress=null,this.onUnsupportedFeature=null}return A(e,[{key:"destroy",value:function(){var e=this;return this.destroyed=!0,(this._transport?this._transport.destroy():Promise.resolve()).then(function(){e._transport=null,e._worker&&(e._worker.destroy(),e._worker=null)})}},{key:"then",value:function(e,t){return(0,a.deprecated)("PDFDocumentLoadingTask.then method, use the `promise` getter instead."),this.promise.then.apply(this.promise,arguments)}},{key:"promise",get:function(){return this._capability.promise}}]),e}()),I=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];b(this,e),this.length=t,this.initialData=r,this.progressiveDone=n,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,i.createPromiseCapability)()}return A(e,[{key:"addRangeListener",value:function(e){this._rangeListeners.push(e)}},{key:"addProgressListener",value:function(e){this._progressListeners.push(e)}},{key:"addProgressiveReadListener",value:function(e){this._progressiveReadListeners.push(e)}},{key:"addProgressiveDoneListener",value:function(e){this._progressiveDoneListeners.push(e)}},{key:"onDataRange",value:function(e,t){var r=!0,n=!1,i=void 0;try{for(var a,o=this._rangeListeners[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){(0,a.value)(e,t)}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}}},{key:"onDataProgress",value:function(e,t){var r=this;this._readyCapability.promise.then(function(){var n=!0,i=!1,a=void 0;try{for(var o,s=r._progressListeners[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){(0,o.value)(e,t)}}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}})}},{key:"onDataProgressiveRead",value:function(e){var t=this;this._readyCapability.promise.then(function(){var r=!0,n=!1,i=void 0;try{for(var a,o=t._progressiveReadListeners[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){(0,a.value)(e)}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}})}},{key:"onDataProgressiveDone",value:function(){var e=this;this._readyCapability.promise.then(function(){var t=!0,r=!1,n=void 0;try{for(var i,a=e._progressiveDoneListeners[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){(0,i.value)()}}catch(e){r=!0,n=e}finally{try{t||null==a.return||a.return()}finally{if(r)throw n}}})}},{key:"transportReady",value:function(){this._readyCapability.resolve()}},{key:"requestDataRange",value:function(e,t){(0,i.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}},{key:"abort",value:function(){}}]),e}();t.PDFDataRangeTransport=I;var L=function(){function e(t,r){b(this,e),this._pdfInfo=t,this._transport=r}return A(e,[{key:"getPage",value:function(e){return this._transport.getPage(e)}},{key:"getPageIndex",value:function(e){return this._transport.getPageIndex(e)}},{key:"getDestinations",value:function(){return this._transport.getDestinations()}},{key:"getDestination",value:function(e){return this._transport.getDestination(e)}},{key:"getPageLabels",value:function(){return this._transport.getPageLabels()}},{key:"getPageLayout",value:function(){return this._transport.getPageLayout()}},{key:"getPageMode",value:function(){return this._transport.getPageMode()}},{key:"getViewerPreferences",value:function(){return this._transport.getViewerPreferences()}},{key:"getOpenActionDestination",value:function(){return this._transport.getOpenActionDestination()}},{key:"getAttachments",value:function(){return this._transport.getAttachments()}},{key:"getJavaScript",value:function(){return this._transport.getJavaScript()}},{key:"getOutline",value:function(){return this._transport.getOutline()}},{key:"getPermissions",value:function(){return this._transport.getPermissions()}},{key:"getMetadata",value:function(){return this._transport.getMetadata()}},{key:"getData",value:function(){return this._transport.getData()}},{key:"getDownloadInfo",value:function(){return this._transport.downloadInfoCapability.promise}},{key:"getStats",value:function(){return this._transport.getStats()}},{key:"cleanup",value:function(){this._transport.startCleanup()}},{key:"destroy",value:function(){return this.loadingTask.destroy()}},{key:"numPages",get:function(){return this._pdfInfo.numPages}},{key:"fingerprint",get:function(){return this._pdfInfo.fingerprint}},{key:"loadingParams",get:function(){return this._transport.loadingParams}},{key:"loadingTask",get:function(){return this._transport.loadingTask}}]),e}();t.PDFDocumentProxy=L;var M=function(){function e(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];b(this,e),this.pageIndex=t,this._pageInfo=r,this._transport=n,this._stats=i?new a.StatTimer:a.DummyStatTimer,this._pdfBug=i,this.commonObjs=n.commonObjs,this.objs=new W,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this.intentStates=Object.create(null),this.destroyed=!1}return A(e,[{key:"getViewport",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.scale,r=e.rotation,n=void 0===r?this.rotate:r,i=e.dontFlip,o=void 0!==i&&i;return(arguments.length>1||"number"==typeof arguments[0])&&(t=arguments[0],n="number"==typeof arguments[1]?arguments[1]:this.rotate,o="boolean"==typeof arguments[2]&&arguments[2]),new a.PageViewport({viewBox:this.view,scale:t,rotation:n,dontFlip:o})}},{key:"getAnnotations",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).intent,t=void 0===e?null:e;return this.annotationsPromise&&this.annotationsIntent===t||(this.annotationsPromise=this._transport.getAnnotations(this.pageIndex,t),this.annotationsIntent=t),this.annotationsPromise}},{key:"render",value:function(e){var t=this,r=e.canvasContext,n=e.viewport,o=e.intent,s=void 0===o?"display":o,u=e.enableWebGL,l=void 0!==u&&u,c=e.renderInteractiveForms,h=void 0!==c&&c,d=e.transform,f=void 0===d?null:d,v=e.imageLayer,m=void 0===v?null:v,g=e.canvasFactory,y=void 0===g?null:g,b=e.background,_=void 0===b?null:b,A=this._stats;A.time("Overall"),this.pendingCleanup=!1;var S="print"===s?"print":"display",w=y||new a.DOMCanvasFactory,k=new p.WebGLContext({enable:l});this.intentStates[S]||(this.intentStates[S]=Object.create(null));var x=this.intentStates[S];x.displayReadyCapability||(x.receivingOperatorList=!0,x.displayReadyCapability=(0,i.createPromiseCapability)(),x.operatorList={fnArray:[],argsArray:[],lastChunk:!1},A.time("Page Request"),this._transport.messageHandler.send("RenderPageRequest",{pageIndex:this.pageNumber-1,intent:S,renderInteractiveForms:!0===h}));var P=function(e){var r=x.renderTasks.indexOf(C);r>=0&&x.renderTasks.splice(r,1),(t.cleanupAfterRender||"print"===S)&&(t.pendingCleanup=!0),t._tryCleanup(),e?C.capability.reject(e):C.capability.resolve(),A.timeEnd("Rendering"),A.timeEnd("Overall")},C=new B({callback:P,params:{canvasContext:r,viewport:n,transform:f,imageLayer:m,background:_},objs:this.objs,commonObjs:this.commonObjs,operatorList:x.operatorList,pageNumber:this.pageNumber,canvasFactory:w,webGLContext:k,useRequestAnimationFrame:"print"!==S,pdfBug:this._pdfBug});x.renderTasks||(x.renderTasks=[]),x.renderTasks.push(C);var R=C.task;return x.displayReadyCapability.promise.then(function(e){t.pendingCleanup?P():(A.time("Rendering"),C.initializeGraphics(e),C.operatorListChanged())}).catch(P),R}},{key:"getOperatorList",value:function(){this.intentStates.oplist||(this.intentStates.oplist=Object.create(null));var e,t=this.intentStates.oplist;return t.opListReadCapability||((e={}).operatorListChanged=function(){if(t.operatorList.lastChunk){t.opListReadCapability.resolve(t.operatorList);var r=t.renderTasks.indexOf(e);r>=0&&t.renderTasks.splice(r,1)}},t.receivingOperatorList=!0,t.opListReadCapability=(0,i.createPromiseCapability)(),t.renderTasks=[],t.renderTasks.push(e),t.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats.time("Page Request"),this._transport.messageHandler.send("RenderPageRequest",{pageIndex:this.pageIndex,intent:"oplist"})),t.opListReadCapability.promise}},{key:"streamTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.normalizeWhitespace,r=void 0!==t&&t,n=e.disableCombineTextItems,i=void 0!==n&&n;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this.pageNumber-1,normalizeWhitespace:!0===r,combineTextItems:!0!==i},{highWaterMark:100,size:function(e){return e.items.length}})}},{key:"getTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.streamTextContent(e);return new Promise(function(e,r){var n=t.getReader(),i={items:[],styles:Object.create(null)};!function t(){n.read().then(function(r){var n,a=r.value;r.done?e(i):(Object.assign(i.styles,a.styles),(n=i.items).push.apply(n,y(a.items)),t())},r)}()})}},{key:"_destroy",value:function(){this.destroyed=!0,this._transport.pageCache[this.pageIndex]=null;var e=[];return Object.keys(this.intentStates).forEach(function(t){"oplist"!==t&&this.intentStates[t].renderTasks.forEach(function(t){var r=t.capability.promise.catch(function(){});e.push(r),t.cancel()})},this),this.objs.clear(),this.annotationsPromise=null,this.pendingCleanup=!1,Promise.all(e)}},{key:"cleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.pendingCleanup=!0,this._tryCleanup(e)}},{key:"_tryCleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.pendingCleanup&&!Object.keys(this.intentStates).some(function(e){var t=this.intentStates[e];return 0!==t.renderTasks.length||t.receivingOperatorList},this)&&(Object.keys(this.intentStates).forEach(function(e){delete this.intentStates[e]},this),this.objs.clear(),this.annotationsPromise=null,e&&this._stats instanceof a.StatTimer&&(this._stats=new a.StatTimer),this.pendingCleanup=!1)}},{key:"_startRenderPage",value:function(e,t){var r=this.intentStates[t];r.displayReadyCapability&&r.displayReadyCapability.resolve(e)}},{key:"_renderPageChunk",value:function(e,t){for(var r=this.intentStates[t],n=0,i=e.length;n<i;n++)r.operatorList.fnArray.push(e.fnArray[n]),r.operatorList.argsArray.push(e.argsArray[n]);r.operatorList.lastChunk=e.lastChunk;for(var a=0;a<r.renderTasks.length;a++)r.renderTasks[a].operatorListChanged();e.lastChunk&&(r.receivingOperatorList=!1,this._tryCleanup())}},{key:"pageNumber",get:function(){return this.pageIndex+1}},{key:"rotate",get:function(){return this._pageInfo.rotate}},{key:"ref",get:function(){return this._pageInfo.ref}},{key:"userUnit",get:function(){return this._pageInfo.userUnit}},{key:"view",get:function(){return this._pageInfo.view}},{key:"stats",get:function(){return this._stats instanceof a.StatTimer?this._stats:null}}]),e}();t.PDFPageProxy=M;var j=function(){function e(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];b(this,e),this._listeners=[],this._defer=t,this._deferred=Promise.resolve(void 0)}return A(e,[{key:"postMessage",value:function(e,t){var r=this;if(this._defer){var n=new WeakMap,a={data:function e(r){if("object"!==S(r)||null===r)return r;if(n.has(r))return n.get(r);var a,o;if((a=r.buffer)&&(0,i.isArrayBuffer)(a)){var s=t&&t.includes(a);return o=r===a?r:s?new r.constructor(a,r.byteOffset,r.byteLength):new r.constructor(r),n.set(r,o),o}for(var u in o=Array.isArray(r)?[]:{},n.set(r,o),r){for(var l=void 0,c=r;!(l=Object.getOwnPropertyDescriptor(c,u));)c=Object.getPrototypeOf(c);void 0!==l.value&&"function"!=typeof l.value&&(o[u]=e(l.value))}return o}(e)};this._deferred.then(function(){r._listeners.forEach(function(e){e.call(this,a)},r)})}else this._listeners.forEach(function(t){t.call(this,{data:e})},this)}},{key:"addEventListener",value:function(e,t){this._listeners.push(t)}},{key:"removeEventListener",value:function(e,t){var r=this._listeners.indexOf(t);this._listeners.splice(r,1)}},{key:"terminate",value:function(){this._listeners.length=0}}]),e}();t.LoopbackPort=j;var D=function(){var e,t=new WeakMap,r=0;function n(){if(c.GlobalWorkerOptions.workerSrc)return c.GlobalWorkerOptions.workerSrc;if(void 0!==w)return w;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}function o(){try{if("undefined"!=typeof window)return window.pdfjsWorker&&window.pdfjsWorker.WorkerMessageHandler}catch(e){}return null}return function(){function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.name,n=void 0===r?null:r,a=e.port,o=void 0===a?null:a,u=e.postMessageTransfers,l=void 0===u||u,c=e.verbosity,h=void 0===c?(0,i.getVerbosityLevel)():c;if(b(this,s),o&&t.has(o))throw new Error("Cannot use more than one PDFWorker per port");if(this.name=n,this.destroyed=!1,this.postMessageTransfers=!1!==l,this.verbosity=h,this._readyCapability=(0,i.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,o)return t.set(o,this),void this._initializeFromPort(o);this._initialize()}return A(s,[{key:"_initializeFromPort",value:function(e){this._port=e,this._messageHandler=new h.MessageHandler("main","worker",e),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve()}},{key:"_initialize",value:function(){var e,t,r=this;if("undefined"!=typeof Worker&&!x&&!o()){var a=n();try{(0,i.isSameOrigin)(window.location.href,a)||(e=new i.URL(a,window.location).href,t="importScripts('"+e+"');",a=i.URL.createObjectURL(new Blob([t])));var s=new Worker(a),u=new h.MessageHandler("main","worker",s),l=function(){s.removeEventListener("error",c),u.destroy(),s.terminate(),r.destroyed?r._readyCapability.reject(new Error("Worker was destroyed")):r._setupFakeWorker()},c=function(){r._webWorker||l()};s.addEventListener("error",c),u.on("test",function(e){s.removeEventListener("error",c),r.destroyed?l():e&&e.supportTypedArray?(r._messageHandler=u,r._port=s,r._webWorker=s,e.supportTransfers||(r.postMessageTransfers=!1),r._readyCapability.resolve(),u.send("configure",{verbosity:r.verbosity})):(r._setupFakeWorker(),u.destroy(),s.terminate())}),u.on("ready",function(e){if(s.removeEventListener("error",c),r.destroyed)l();else try{d()}catch(e){r._setupFakeWorker()}});var d=function(){var e=new Uint8Array([r.postMessageTransfers?255:0]);try{u.send("test",e,[e.buffer])}catch(t){(0,i.info)("Cannot use postMessage transfers"),e[0]=0,u.send("test",e)}};return void d()}catch(e){(0,i.info)("The worker has been disabled.")}}this._setupFakeWorker()}},{key:"_setupFakeWorker",value:function(){var t=this;x||((0,i.warn)("Setting up fake worker."),x=!0),function(){if(e)return e.promise;e=(0,i.createPromiseCapability)();var t=o();return t?(e.resolve(t),e.promise):((P||function(){return(0,a.loadScript)(n()).then(function(){return window.pdfjsWorker.WorkerMessageHandler})})().then(e.resolve,e.reject),e.promise)}().then(function(e){if(t.destroyed)t._readyCapability.reject(new Error("Worker was destroyed"));else{var n=new j;t._port=n;var i="fake"+r++,a=new h.MessageHandler(i+"_worker",i,n);e.setup(a,n);var o=new h.MessageHandler(i,i+"_worker",n);t._messageHandler=o,t._readyCapability.resolve()}}).catch(function(e){t._readyCapability.reject(new Error('Setting up fake worker failed: "'.concat(e.message,'".')))})}},{key:"destroy",value:function(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),t.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}},{key:"promise",get:function(){return this._readyCapability.promise}},{key:"port",get:function(){return this._port}},{key:"messageHandler",get:function(){return this._messageHandler}}],[{key:"fromPort",value:function(e){if(!e||!e.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return t.has(e.port)?t.get(e.port):new s(e)}},{key:"getWorkerSrc",value:function(){return n()}}]),s}()}();t.PDFWorker=D;var N,q=function(){function e(t,r,n,a){b(this,e),this.messageHandler=t,this.loadingTask=r,this.commonObjs=new W,this.fontLoader=new o.FontLoader({docId:r.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this)}),this._params=a,this.CMapReaderFactory=new a.CMapReaderFactory({baseUrl:a.cMapUrl,isCompressed:a.cMapPacked}),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=n,this._fullReader=null,this._lastProgress=null,this.pageCache=[],this.pagePromises=[],this.downloadInfoCapability=(0,i.createPromiseCapability)(),this.setupMessageHandler()}return A(e,[{key:"destroy",value:function(){var e=this;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=(0,i.createPromiseCapability)(),this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));var t=[];this.pageCache.forEach(function(e){e&&t.push(e._destroy())}),this.pageCache.length=0,this.pagePromises.length=0;var r=this.messageHandler.sendWithPromise("Terminate",null);return t.push(r),Promise.all(t).then(function(){e.fontLoader.clear(),e._networkStream&&e._networkStream.cancelAllRequests(),e.messageHandler&&(e.messageHandler.destroy(),e.messageHandler=null),e.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}},{key:"setupMessageHandler",value:function(){var e=this.messageHandler,t=this.loadingTask;e.on("GetReader",function(e,t){var r=this;(0,i.assert)(this._networkStream),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=function(e){r._lastProgress={loaded:e.loaded,total:e.total}},t.onPull=function(){r._fullReader.read().then(function(e){var r=e.value;e.done?t.close():((0,i.assert)((0,i.isArrayBuffer)(r)),t.enqueue(new Uint8Array(r),1,[r]))}).catch(function(e){t.error(e)})},t.onCancel=function(e){r._fullReader.cancel(e)}},this),e.on("ReaderHeadersReady",function(e){var r=this,n=(0,i.createPromiseCapability)(),a=this._fullReader;return a.headersReady.then(function(){a.isStreamingSupported&&a.isRangeSupported||(r._lastProgress&&t.onProgress&&t.onProgress(r._lastProgress),a.onProgress=function(e){t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})}),n.resolve({isStreamingSupported:a.isStreamingSupported,isRangeSupported:a.isRangeSupported,contentLength:a.contentLength})},n.reject),n.promise},this),e.on("GetRangeReader",function(e,t){(0,i.assert)(this._networkStream);var r=this._networkStream.getRangeReader(e.begin,e.end);r?(t.onPull=function(){r.read().then(function(e){var r=e.value;e.done?t.close():((0,i.assert)((0,i.isArrayBuffer)(r)),t.enqueue(new Uint8Array(r),1,[r]))}).catch(function(e){t.error(e)})},t.onCancel=function(e){r.cancel(e)}):t.close()},this),e.on("GetDoc",function(e){var r=e.pdfInfo;this._numPages=r.numPages,t._capability.resolve(new L(r,this))},this),e.on("PasswordRequest",function(e){var r=this;if(this._passwordCapability=(0,i.createPromiseCapability)(),t.onPassword){try{t.onPassword(function(e){r._passwordCapability.resolve({password:e})},e.code)}catch(e){this._passwordCapability.reject(e)}}else this._passwordCapability.reject(new i.PasswordException(e.message,e.code));return this._passwordCapability.promise},this),e.on("PasswordException",function(e){t._capability.reject(new i.PasswordException(e.message,e.code))},this),e.on("InvalidPDF",function(e){t._capability.reject(new i.InvalidPDFException(e.message))},this),e.on("MissingPDF",function(e){t._capability.reject(new i.MissingPDFException(e.message))},this),e.on("UnexpectedResponse",function(e){t._capability.reject(new i.UnexpectedResponseException(e.message,e.status))},this),e.on("UnknownError",function(e){t._capability.reject(new i.UnknownErrorException(e.message,e.details))},this),e.on("DataLoaded",function(e){t.onProgress&&t.onProgress({loaded:e.length,total:e.length}),this.downloadInfoCapability.resolve(e)},this),e.on("StartRenderPage",function(e){if(!this.destroyed){var t=this.pageCache[e.pageIndex];t._stats.timeEnd("Page Request"),t._startRenderPage(e.transparency,e.intent)}},this),e.on("RenderPageChunk",function(e){this.destroyed||this.pageCache[e.pageIndex]._renderPageChunk(e.operatorList,e.intent)},this),e.on("commonobj",function(t){var r=this;if(!this.destroyed){var n=g(t,3),a=n[0],s=n[1],u=n[2];if(!this.commonObjs.has(a))switch(s){case"Font":var c=this._params;if("error"in u){var h=u.error;(0,i.warn)("Error during font loading: ".concat(h)),this.commonObjs.resolve(a,h);break}var d=null;c.pdfBug&&l.default.FontInspector&&l.default.FontInspector.enabled&&(d={registerFont:function(e,t){l.default.FontInspector.fontAdded(e,t)}});var f=new o.FontFaceObject(u,{isEvalSupported:c.isEvalSupported,disableFontFace:c.disableFontFace,ignoreErrors:c.ignoreErrors,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),fontRegistry:d});this.fontLoader.bind(f).then(function(){r.commonObjs.resolve(a,f)},function(t){e.sendWithPromise("FontFallback",{id:a}).finally(function(){r.commonObjs.resolve(a,f)})});break;case"FontPath":case"FontType3Res":this.commonObjs.resolve(a,u);break;default:throw new Error("Got unknown common object type ".concat(s))}}},this),e.on("obj",function(e){if(!this.destroyed){var t=g(e,4),r=t[0],n=t[1],i=t[2],o=t[3],s=this.pageCache[n];if(!s.objs.has(r))switch(i){case"JpegStream":return new Promise(function(e,t){var r=new Image;r.onload=function(){e(r)},r.onerror=function(){t(new Error("Error during JPEG image loading")),(0,a.releaseImageResources)(r)},r.src=o}).then(function(e){s.objs.resolve(r,e)});case"Image":s.objs.resolve(r,o);o&&"data"in o&&o.data.length>8e6&&(s.cleanupAfterRender=!0);break;default:throw new Error("Got unknown object type ".concat(i))}}},this),e.on("DocProgress",function(e){this.destroyed||t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})},this),e.on("PageError",function(e){if(!this.destroyed){var t=this.pageCache[e.pageIndex].intentStates[e.intent];if(!t.displayReadyCapability)throw new Error(e.error);if(t.displayReadyCapability.reject(new Error(e.error)),t.operatorList){t.operatorList.lastChunk=!0;for(var r=0;r<t.renderTasks.length;r++)t.renderTasks[r].operatorListChanged()}}},this),e.on("UnsupportedFeature",this._onUnsupportedFeature,this),e.on("JpegDecode",function(e){if(this.destroyed)return Promise.reject(new Error("Worker was destroyed"));if("undefined"==typeof document)return Promise.reject(new Error('"document" is not defined.'));var t=g(e,2),r=t[0],n=t[1];return 3!==n&&1!==n?Promise.reject(new Error("Only 3 components or 1 component can be returned")):new Promise(function(e,t){var i=new Image;i.onload=function(){var t=i.width,r=i.height,o=t*r,s=4*o,u=new Uint8ClampedArray(o*n),l=document.createElement("canvas");l.width=t,l.height=r;var c=l.getContext("2d");c.drawImage(i,0,0);var h=c.getImageData(0,0,t,r).data;if(3===n)for(var d=0,f=0;d<s;d+=4,f+=3)u[f]=h[d],u[f+1]=h[d+1],u[f+2]=h[d+2];else if(1===n)for(var p=0,v=0;p<s;p+=4,v++)u[v]=h[p];e({data:u,width:t,height:r}),(0,a.releaseImageResources)(i),l.width=0,l.height=0,l=null,c=null},i.onerror=function(){t(new Error("JpegDecode failed to load image")),(0,a.releaseImageResources)(i)},i.src=r})},this),e.on("FetchBuiltInCMap",function(e){return this.destroyed?Promise.reject(new Error("Worker was destroyed")):this.CMapReaderFactory.fetch({name:e.name})},this)}},{key:"_onUnsupportedFeature",value:function(e){var t=e.featureId;this.destroyed||this.loadingTask.onUnsupportedFeature&&this.loadingTask.onUnsupportedFeature(t)}},{key:"getData",value:function(){return this.messageHandler.sendWithPromise("GetData",null)}},{key:"getPage",value:function(e){var t=this;if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request"));var r=e-1;if(r in this.pagePromises)return this.pagePromises[r];var n=this.messageHandler.sendWithPromise("GetPage",{pageIndex:r}).then(function(e){if(t.destroyed)throw new Error("Transport destroyed");var n=new M(r,e,t,t._params.pdfBug);return t.pageCache[r]=n,n});return this.pagePromises[r]=n,n}},{key:"getPageIndex",value:function(e){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:e}).catch(function(e){return Promise.reject(new Error(e))})}},{key:"getAnnotations",value:function(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}},{key:"getDestinations",value:function(){return this.messageHandler.sendWithPromise("GetDestinations",null)}},{key:"getDestination",value:function(e){return"string"!=typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}},{key:"getPageLabels",value:function(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}},{key:"getPageLayout",value:function(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}},{key:"getPageMode",value:function(){return this.messageHandler.sendWithPromise("GetPageMode",null)}},{key:"getViewerPreferences",value:function(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}},{key:"getOpenActionDestination",value:function(){return this.messageHandler.sendWithPromise("GetOpenActionDestination",null)}},{key:"getAttachments",value:function(){return this.messageHandler.sendWithPromise("GetAttachments",null)}},{key:"getJavaScript",value:function(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}},{key:"getOutline",value:function(){return this.messageHandler.sendWithPromise("GetOutline",null)}},{key:"getPermissions",value:function(){return this.messageHandler.sendWithPromise("GetPermissions",null)}},{key:"getMetadata",value:function(){var e=this;return this.messageHandler.sendWithPromise("GetMetadata",null).then(function(t){return{info:t[0],metadata:t[1]?new d.Metadata(t[1]):null,contentDispositionFilename:e._fullReader?e._fullReader.filename:null}})}},{key:"getStats",value:function(){return this.messageHandler.sendWithPromise("GetStats",null)}},{key:"startCleanup",value:function(){var e=this;this.messageHandler.sendWithPromise("Cleanup",null).then(function(){for(var t=0,r=e.pageCache.length;t<r;t++){var n=e.pageCache[t];n&&n.cleanup()}e.commonObjs.clear(),e.fontLoader.clear()})}},{key:"loadingParams",get:function(){var e=this._params;return(0,i.shadow)(this,"loadingParams",{disableAutoFetch:e.disableAutoFetch,disableCreateObjectURL:e.disableCreateObjectURL,disableFontFace:e.disableFontFace,nativeImageDecoderSupport:e.nativeImageDecoderSupport})}}]),e}(),W=function(){function e(){b(this,e),this._objs=Object.create(null)}return A(e,[{key:"_ensureObj",value:function(e){return this._objs[e]?this._objs[e]:this._objs[e]={capability:(0,i.createPromiseCapability)(),data:null,resolved:!1}}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return this._ensureObj(e).capability.promise.then(t),null;var r=this._objs[e];if(!r||!r.resolved)throw new Error("Requesting object that isn't resolved yet ".concat(e,"."));return r.data}},{key:"has",value:function(e){var t=this._objs[e];return!!t&&t.resolved}},{key:"resolve",value:function(e,t){var r=this._ensureObj(e);r.resolved=!0,r.data=t,r.capability.resolve(t)}},{key:"clear",value:function(){for(var e in this._objs){var t=this._objs[e].data;"undefined"!=typeof Image&&t instanceof Image&&(0,a.releaseImageResources)(t)}this._objs=Object.create(null)}}]),e}(),U=function(){function e(t){b(this,e),this._internalRenderTask=t,this.onContinue=null}return A(e,[{key:"cancel",value:function(){this._internalRenderTask.cancel()}},{key:"then",value:function(e,t){return(0,a.deprecated)("RenderTask.then method, use the `promise` getter instead."),this.promise.then.apply(this.promise,arguments)}},{key:"promise",get:function(){return this._internalRenderTask.capability.promise}}]),e}(),B=(N=new WeakSet,function(){function e(t){var r=t.callback,n=t.params,a=t.objs,o=t.commonObjs,s=t.operatorList,u=t.pageNumber,l=t.canvasFactory,c=t.webGLContext,h=t.useRequestAnimationFrame,d=void 0!==h&&h,f=t.pdfBug,p=void 0!==f&&f;b(this,e),this.callback=r,this.params=n,this.objs=a,this.commonObjs=o,this.operatorListIdx=null,this.operatorList=s,this.pageNumber=u,this.canvasFactory=l,this.webGLContext=c,this._pdfBug=p,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===d&&"undefined"!=typeof window,this.cancelled=!1,this.capability=(0,i.createPromiseCapability)(),this.task=new U(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=n.canvasContext.canvas}return A(e,[{key:"initializeGraphics",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.cancelled){if(this._canvas){if(N.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.");N.add(this._canvas)}this._pdfBug&&l.default.StepperManager&&l.default.StepperManager.enabled&&(this.stepper=l.default.StepperManager.create(this.pageNumber-1),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());var t=this.params,r=t.canvasContext,n=t.viewport,i=t.transform,a=t.imageLayer,o=t.background;this.gfx=new u.CanvasGraphics(r,this.commonObjs,this.objs,this.canvasFactory,this.webGLContext,a),this.gfx.beginDrawing({transform:i,viewport:n,transparency:e,background:o}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}}},{key:"cancel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.running=!1,this.cancelled=!0,this.gfx&&this.gfx.endDrawing(),this._canvas&&N.delete(this._canvas),this.callback(e||new a.RenderingCancelledException("Rendering cancelled, page ".concat(this.pageNumber),"canvas"))}},{key:"operatorListChanged",value:function(){this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}},{key:"_continue",value:function(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}},{key:"_scheduleNext",value:function(){var e=this;this._useRequestAnimationFrame?window.requestAnimationFrame(function(){e._nextBound().catch(e.cancel.bind(e))}):Promise.resolve().then(this._nextBound).catch(this.cancel.bind(this))}},{key:"_next",value:(t=n.default.mark(function e(){return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.cancelled){e.next=2;break}return e.abrupt("return");case 2: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&&N.delete(this._canvas),this.callback()));case 4:case"end":return e.stop()}},e,this)}),r=function(){var e=this,r=arguments;return new Promise(function(n,i){var a=t.apply(e,r);function o(e){m(a,n,i,o,s,"next",e)}function s(e){m(a,n,i,o,s,"throw",e)}o(void 0)})},function(){return r.apply(this,arguments)})}]),e;var t,r}());t.version="2.2.228";t.build="d7afb74a"},function(e,t,r){"use strict";e.exports=r(149)},function(e,t,r){"use strict";(function(e){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r=function(e){var r,n=Object.prototype,i=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),o=new R(n||[]);return a._invoke=function(e,t,r){var n=h;return function(i,a){if(n===f)throw new Error("Generator is already running");if(n===p){if("throw"===i)throw a;return E()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=x(o,r);if(s){if(s===v)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=f;var u=c(e,t,r);if("normal"===u.type){if(n=r.done?p:d,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=p,r.method="throw",r.arg=u.arg)}}}(e,r,o),a}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",f="executing",p="completed",v={};function m(){}function g(){}function y(){}var b={};b[o]=function(){return this};var _=Object.getPrototypeOf,A=_&&_(_(T([])));A&&A!==n&&i.call(A,o)&&(b=A);var S=y.prototype=m.prototype=Object.create(b);function w(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function k(e){var r;this._invoke=function(n,a){function o(){return new Promise(function(r,o){!function r(n,a,o,s){var u=c(e[n],e,a);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"===t(h)&&i.call(h,"__await")?Promise.resolve(h.__await).then(function(e){r("next",e,o,s)},function(e){r("throw",e,o,s)}):Promise.resolve(h).then(function(e){l.value=e,o(l)},function(e){return r("throw",e,o,s)})}s(u.arg)}(n,a,r,o)})}return r=r?r.then(o,o):o()}}function x(e,t){var n=e.iterator[t.method];if(n===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=r,x(e,t),"throw"===t.method))return v;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=c(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,v;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,v):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}return{next:E}}function E(){return{value:r,done:!0}}return g.prototype=S.constructor=y,y.constructor=g,y[u]=g.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,u in e||(e[u]="GeneratorFunction")),e.prototype=Object.create(S),e},e.awrap=function(e){return{__await:e}},w(k.prototype),k.prototype[s]=function(){return this},e.AsyncIterator=k,e.async=function(t,r,n,i){var a=new k(l(t,r,n,i));return e.isGeneratorFunction(r)?a:a.next().then(function(e){return e.done?e.value:a.next()})},w(S),S[u]="Generator",S[o]=function(){return this},S.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=T,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,i){return s.type="throw",s.arg=e,t.next=n,i&&(t.method="next",t.arg=r),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(u&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;C(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),v}},e}("object"===t(e)?e.exports:{});try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}}).call(this,r(150)(e))},function(e,t,r){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addLinkAttributes=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.url,n=t.target,i=t.rel;if(e.href=e.title=r?(0,a.removeNullCharacters)(r):"",r){var o=Object.values(y),s=o.includes(n)?n:y.NONE;e.target=b[s],e.rel="string"==typeof i?i:h}},t.getFilenameFromUrl=function(e){var t=e.indexOf("#"),r=e.indexOf("?"),n=Math.min(t>0?t:e.length,r>0?r:e.length);return e.substring(e.lastIndexOf("/",n)+1,n)},t.isFetchSupported=w,t.isValidFetchUrl=k,t.loadScript=function(e){return new Promise(function(t,r){var n=document.createElement("script");n.src=e,n.onload=t,n.onerror=function(){r(new Error("Cannot load script at: ".concat(n.src)))},(document.head||document.documentElement).appendChild(n)})},t.deprecated=function(e){console.log("Deprecated API usage: "+e)},t.releaseImageResources=function(e){(0,a.assert)(e instanceof Image,"Invalid `img` parameter.");var t=e.src;"string"==typeof t&&t.startsWith("blob:")&&a.URL.revokeObjectURL&&a.URL.revokeObjectURL(t);e.removeAttribute("src")},t.PDFDateString=t.DummyStatTimer=t.StatTimer=t.DOMSVGFactory=t.DOMCMapReaderFactory=t.DOMCanvasFactory=t.DEFAULT_LINK_REL=t.LinkTarget=t.RenderingCancelledException=t.PageViewport=void 0;var n,i=(n=r(148))&&n.__esModule?n:{default:n},a=r(1);function o(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function s(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,u,"next",e)}function u(e){o(a,n,i,s,u,"throw",e)}s(void 0)})}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),e}var h="noopener noreferrer nofollow";t.DEFAULT_LINK_REL=h;var d="http://www.w3.org/2000/svg",f=function(){function e(){u(this,e)}return c(e,[{key:"create",value:function(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");var r=document.createElement("canvas"),n=r.getContext("2d");return r.width=e,r.height=t,{canvas:r,context:n}}},{key:"reset",value:function(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}},{key:"destroy",value:function(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}}]),e}();t.DOMCanvasFactory=f;var p=function(){function e(t){var r=t.baseUrl,n=void 0===r?null:r,i=t.isCompressed,a=void 0!==i&&i;u(this,e),this.baseUrl=n,this.isCompressed=a}return c(e,[{key:"fetch",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=s(i.default.mark(function e(t){var r,n,o,u=this;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.name,this.baseUrl){e.next=3;break}throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');case 3:if(r){e.next=5;break}throw new Error("CMap name must be specified.");case 5:if(n=this.baseUrl+r+(this.isCompressed?".bcmap":""),o=this.isCompressed?a.CMapCompressionType.BINARY:a.CMapCompressionType.NONE,!w()||!k(n,document.baseURI)){e.next=9;break}return e.abrupt("return",fetch(n).then(function(){var e=s(i.default.mark(function e(t){var r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.ok){e.next=2;break}throw new Error(t.statusText);case 2:if(!u.isCompressed){e.next=10;break}return e.t0=Uint8Array,e.next=6,t.arrayBuffer();case 6:e.t1=e.sent,r=new e.t0(e.t1),e.next=15;break;case 10:return e.t2=a.stringToBytes,e.next=13,t.text();case 13:e.t3=e.sent,r=(0,e.t2)(e.t3);case 15:return e.abrupt("return",{cMapData:r,compressionType:o});case 16:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()).catch(function(e){throw new Error("Unable to load ".concat(u.isCompressed?"binary ":"")+"CMap at: ".concat(n))}));case 9:return e.abrupt("return",new Promise(function(e,t){var r=new XMLHttpRequest;r.open("GET",n,!0),u.isCompressed&&(r.responseType="arraybuffer"),r.onreadystatechange=function(){if(r.readyState===XMLHttpRequest.DONE){var n;if(200===r.status||0===r.status)if(u.isCompressed&&r.response?n=new Uint8Array(r.response):!u.isCompressed&&r.responseText&&(n=(0,a.stringToBytes)(r.responseText)),n)return void e({cMapData:n,compressionType:o});t(new Error(r.statusText))}},r.send(null)}).catch(function(e){throw new Error("Unable to load ".concat(u.isCompressed?"binary ":"")+"CMap at: ".concat(n))}));case 10:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}())}]),e}();t.DOMCMapReaderFactory=p;var v=function(){function e(){u(this,e)}return c(e,[{key:"create",value:function(e,t){(0,a.assert)(e>0&&t>0,"Invalid SVG dimensions");var r=document.createElementNS(d,"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}},{key:"createElement",value:function(e){return(0,a.assert)("string"==typeof e,"Invalid SVG element type"),document.createElementNS(d,e)}}]),e}();t.DOMSVGFactory=v;var m=function(){function e(t){var r=t.viewBox,n=t.scale,i=t.rotation,a=t.offsetX,o=void 0===a?0:a,s=t.offsetY,l=void 0===s?0:s,c=t.dontFlip,h=void 0!==c&&c;u(this,e),this.viewBox=r,this.scale=n,this.rotation=i,this.offsetX=o,this.offsetY=l;var d,f,p,v,m,g,y,b,_=(r[2]+r[0])/2,A=(r[3]+r[1])/2;switch(i=(i%=360)<0?i+360:i){case 180:d=-1,f=0,p=0,v=1;break;case 90:d=0,f=1,p=1,v=0;break;case 270:d=0,f=-1,p=-1,v=0;break;default:d=1,f=0,p=0,v=-1}h&&(p=-p,v=-v),0===d?(m=Math.abs(A-r[1])*n+o,g=Math.abs(_-r[0])*n+l,y=Math.abs(r[3]-r[1])*n,b=Math.abs(r[2]-r[0])*n):(m=Math.abs(_-r[0])*n+o,g=Math.abs(A-r[1])*n+l,y=Math.abs(r[2]-r[0])*n,b=Math.abs(r[3]-r[1])*n),this.transform=[d*n,f*n,p*n,v*n,m-d*n*_-p*n*A,g-f*n*_-v*n*A],this.width=y,this.height=b}return c(e,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.scale,n=void 0===r?this.scale:r,i=t.rotation,a=void 0===i?this.rotation:i,o=t.dontFlip,s=void 0!==o&&o;return new e({viewBox:this.viewBox.slice(),scale:n,rotation:a,offsetX:this.offsetX,offsetY:this.offsetY,dontFlip:s})}},{key:"convertToViewportPoint",value:function(e,t){return a.Util.applyTransform([e,t],this.transform)}},{key:"convertToViewportRectangle",value:function(e){var t=a.Util.applyTransform([e[0],e[1]],this.transform),r=a.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],r[0],r[1]]}},{key:"convertToPdfPoint",value:function(e,t){return a.Util.applyInverseTransform([e,t],this.transform)}}]),e}();t.PageViewport=m;var g=function(){function e(e,t){this.message=e,this.type=t}return e.prototype=new Error,e.prototype.name="RenderingCancelledException",e.constructor=e,e}();t.RenderingCancelledException=g;var y={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};t.LinkTarget=y;var b=["","_self","_blank","_parent","_top"];var _=function(){function e(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];u(this,e),this.enabled=!!t,this.started=Object.create(null),this.times=[]}return c(e,[{key:"time",value:function(e){this.enabled&&(e in this.started&&(0,a.warn)("Timer is already running for "+e),this.started[e]=Date.now())}},{key:"timeEnd",value:function(e){this.enabled&&(e in this.started||(0,a.warn)("Timer has not been started for "+e),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e])}},{key:"toString",value:function(){var e="",t=0,r=!0,n=!1,i=void 0;try{for(var a,o=this.times[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value.name;s.length>t&&(t=s.length)}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}var u=!0,l=!1,c=void 0;try{for(var h,d=this.times[Symbol.iterator]();!(u=(h=d.next()).done);u=!0){var f=h.value,p=f.end-f.start;e+="".concat(f.name.padEnd(t)," ").concat(p,"ms\n")}}catch(e){l=!0,c=e}finally{try{u||null==d.return||d.return()}finally{if(l)throw c}}return e}}]),e}();t.StatTimer=_;var A,S=function(){function e(){u(this,e),(0,a.unreachable)("Cannot initialize DummyStatTimer.")}return c(e,null,[{key:"time",value:function(e){}},{key:"timeEnd",value:function(e){}},{key:"toString",value:function(){return""}}]),e}();function w(){return"undefined"!=typeof fetch&&"undefined"!=typeof Response&&"body"in Response.prototype&&"undefined"!=typeof ReadableStream}function k(e,t){try{var r=(t?new a.URL(e,t):new a.URL(e)).protocol;return"http:"===r||"https:"===r}catch(e){return!1}}t.DummyStatTimer=S;var x=function(){function e(){u(this,e)}return c(e,null,[{key:"toDateObject",value:function(e){if(!e||!(0,a.isString)(e))return null;A||(A=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var t=A.exec(e);if(!t)return null;var r=parseInt(t[1],10),n=parseInt(t[2],10);n=n>=1&&n<=12?n-1:0;var i=parseInt(t[3],10);i=i>=1&&i<=31?i:1;var o=parseInt(t[4],10);o=o>=0&&o<=23?o:0;var s=parseInt(t[5],10);s=s>=0&&s<=59?s:0;var u=parseInt(t[6],10);u=u>=0&&u<=59?u:0;var l=t[7]||"Z",c=parseInt(t[8],10);c=c>=0&&c<=23?c:0;var h=parseInt(t[9],10)||0;return h=h>=0&&h<=59?h:0,"-"===l?(o+=c,s+=h):"+"===l&&(o-=c,s-=h),new Date(Date.UTC(r,n,i,o,s,u))}}]),e}();t.PDFDateString=x},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var n,i=(n=r(148))&&n.__esModule?n:{default:n},a=r(1);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),e}var p,v=function(){function e(t){var r=t.docId,n=t.onUnsupportedFeature;h(this,e),this.constructor===e&&(0,a.unreachable)("Cannot initialize BaseFontLoader."),this.docId=r,this._onUnsupportedFeature=n,this.nativeFontFaces=[],this.styleElement=null}return f(e,[{key:"addNativeFontFace",value:function(e){this.nativeFontFaces.push(e),document.fonts.add(e)}},{key:"insertRule",value:function(e){var t=this.styleElement;t||((t=this.styleElement=document.createElement("style")).id="PDFJS_FONT_STYLE_TAG_".concat(this.docId),document.documentElement.getElementsByTagName("head")[0].appendChild(t));var r=t.sheet;r.insertRule(e,r.cssRules.length)}},{key:"clear",value:function(){this.nativeFontFaces.forEach(function(e){document.fonts.delete(e)}),this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}},{key:"bind",value:function(){var e,t=(e=i.default.mark(function e(t){var r,n,o=this;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.attached&&!t.missingFile){e.next=2;break}return e.abrupt("return",void 0);case 2:if(t.attached=!0,!this.isFontLoadingAPISupported){e.next=19;break}if(!(r=t.createNativeFontFace())){e.next=18;break}return this.addNativeFontFace(r),e.prev=7,e.next=10,r.loaded;case 10:e.next=18;break;case 12:throw e.prev=12,e.t0=e.catch(7),this._onUnsupportedFeature({featureId:a.UNSUPPORTED_FEATURES.font}),(0,a.warn)("Failed to load font '".concat(r.family,"': '").concat(e.t0,"'.")),t.disableFontFace=!0,e.t0;case 18:return e.abrupt("return",void 0);case 19:if(!(n=t.createFontFaceRule())){e.next=25;break}if(this.insertRule(n),!this.isSyncFontLoadingSupported){e.next=24;break}return e.abrupt("return",void 0);case 24:return e.abrupt("return",new Promise(function(e){var r=o._queueLoadingCallback(e);o._prepareFontLoadEvent([n],[t],r)}));case 25:return e.abrupt("return",void 0);case 26:case"end":return e.stop()}},e,this,[[7,12]])}),function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(e){c(a,n,i,o,s,"next",e)}function s(e){c(a,n,i,o,s,"throw",e)}o(void 0)})});return function(e){return t.apply(this,arguments)}}()},{key:"_queueLoadingCallback",value:function(e){(0,a.unreachable)("Abstract method `_queueLoadingCallback`.")}},{key:"_prepareFontLoadEvent",value:function(e,t,r){(0,a.unreachable)("Abstract method `_prepareFontLoadEvent`.")}},{key:"isFontLoadingAPISupported",get:function(){(0,a.unreachable)("Abstract method `isFontLoadingAPISupported`.")}},{key:"isSyncFontLoadingSupported",get:function(){(0,a.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}},{key:"_loadTestFont",get:function(){(0,a.unreachable)("Abstract method `_loadTestFont`.")}}]),e}();t.FontLoader=p,t.FontLoader=p=function(e){function t(e){var r;return h(this,t),(r=s(this,u(t).call(this,e))).loadingContext={requests:[],nextRequestId:0},r.loadTestFontId=0,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(t,v),f(t,[{key:"_queueLoadingCallback",value:function(e){var t=this.loadingContext,r={id:"pdfjs-font-loading-".concat(t.nextRequestId++),done:!1,complete:function(){for((0,a.assert)(!r.done,"completeRequest() cannot be called twice."),r.done=!0;t.requests.length>0&&t.requests[0].done;){var e=t.requests.shift();setTimeout(e.callback,0)}},callback:e};return t.requests.push(r),r}},{key:"_prepareFontLoadEvent",value:function(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 i(e,t,r,n){return e.substring(0,t)+n+e.substring(t+r)}var o,s,u=document.createElement("canvas");u.width=1,u.height=1;var l=u.getContext("2d"),c=0;var h="lt".concat(Date.now()).concat(this.loadTestFontId++),d=this._loadTestFont,f=n(d=i(d,976,h.length,h),16);for(o=0,s=h.length-3;o<s;o+=4)f=f-1482184792+n(h,o)|0;o<h.length&&(f=f-1482184792+n(h+"XXX",o)|0),d=i(d,16,4,(0,a.string32)(f));var p="url(data:font/opentype;base64,".concat(btoa(d),");"),v='@font-face {font-family:"'.concat(h,'";src:').concat(p,"}");this.insertRule(v);var m=[];for(o=0,s=t.length;o<s;o++)m.push(t[o].loadedName);m.push(h);var g=document.createElement("div");for(g.setAttribute("style","visibility: hidden;width: 10px; height: 10px;position: absolute; top: 0px; left: 0px;"),o=0,s=m.length;o<s;++o){var y=document.createElement("span");y.textContent="Hi",y.style.fontFamily=m[o],g.appendChild(y)}document.body.appendChild(g),function e(t,r){if(++c>30)return(0,a.warn)("Load test font never loaded."),void r();l.font="30px "+t,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0?r():setTimeout(e.bind(null,t,r))}(h,function(){document.body.removeChild(g),r.complete()})}},{key:"isFontLoadingAPISupported",get:function(){var e="undefined"!=typeof document&&!!document.fonts;if(e&&"undefined"!=typeof navigator){var t=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);t&&t[1]<63&&(e=!1)}return(0,a.shadow)(this,"isFontLoadingAPISupported",e)}},{key:"isSyncFontLoadingSupported",get:function(){var e=!1;if("undefined"==typeof navigator)e=!0;else{var t=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);t&&t[1]>=14&&(e=!0)}return(0,a.shadow)(this,"isSyncFontLoadingSupported",e)}},{key:"_loadTestFont",get:function(){return(0,a.shadow)(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}}]),t}();var m={get value(){return(0,a.shadow)(this,"value",(0,a.isEvalSupported)())}},g=function(){function e(t,r){var n=r.isEvalSupported,i=void 0===n||n,a=r.disableFontFace,o=void 0!==a&&a,s=r.ignoreErrors,u=void 0!==s&&s,l=r.onUnsupportedFeature,c=void 0===l?null:l,d=r.fontRegistry,f=void 0===d?null:d;for(var p in h(this,e),this.compiledGlyphs=Object.create(null),t)this[p]=t[p];this.isEvalSupported=!1!==i,this.disableFontFace=!0===o,this.ignoreErrors=!0===u,this._onUnsupportedFeature=c,this.fontRegistry=f}return f(e,[{key:"createNativeFontFace",value:function(){if(!this.data||this.disableFontFace)return null;var e=new FontFace(this.loadedName,this.data,{});return this.fontRegistry&&this.fontRegistry.registerFont(this),e}},{key:"createFontFaceRule",value:function(){if(!this.data||this.disableFontFace)return null;var e=(0,a.bytesToString)(new Uint8Array(this.data)),t="url(data:".concat(this.mimetype,";base64,").concat(btoa(e),");"),r='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(t,"}");return this.fontRegistry&&this.fontRegistry.registerFont(this,t),r}},{key:"getPathGenerator",value:function(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];var r,n;try{r=e.get(this.loadedName+"_path_"+t)}catch(e){if(!this.ignoreErrors)throw e;return this._onUnsupportedFeature&&this._onUnsupportedFeature({featureId:a.UNSUPPORTED_FEATURES.font}),(0,a.warn)('getPathGenerator - ignoring character: "'.concat(e,'".')),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&m.value){for(var i,o="",s=0,u=r.length;s<u;s++)i=void 0!==(n=r[s]).args?n.args.join(","):"",o+="c."+n.cmd+"("+i+");\n";return this.compiledGlyphs[t]=new Function("c","size",o)}return this.compiledGlyphs[t]=function(e,t){for(var i=0,a=r.length;i<a;i++)"scale"===(n=r[i]).cmd&&(n.args=[t,-t]),e[n.cmd].apply(e,n.args)}}}]),e}();t.FontFaceObject=g},function(e,t,r){"use strict";var n=Object.create(null),i=r(4),a="undefined"!=typeof navigator&&navigator.userAgent||"",o=/Trident/.test(a),s=/CriOS/.test(a);(o||s)&&(n.disableCreateObjectURL=!0),i()&&(n.disableFontFace=!0,n.nativeImageDecoderSupport="none"),t.apiCompatibilityParams=Object.freeze(n)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var n=r(1),i=r(155),a=16,o={get value(){return(0,n.shadow)(o,"value",(0,n.isLittleEndian)())}};function s(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],n=e[2],i=e[3],a=e[4],o=e[5],s=t*i-r*n,u=r*n-t*i;return[i/s,r/u,n/u,t/s,(i*a-n*o)/u,(r*a-t*o)/s]}}),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,n,i,a,o){var s=this._transformMatrix;this._transformMatrix=[s[0]*t+s[2]*r,s[1]*t+s[3]*r,s[0]*n+s[2]*i,s[1]*n+s[3]*i,s[0]*a+s[2]*o+s[4],s[1]*a+s[3]*o+s[5]],e._originalTransform(t,r,n,i,a,o)},e.setTransform=function(t,r,n,i,a,o){this._transformMatrix=[t,r,n,i,a,o],e._originalSetTransform(t,r,n,i,a,o)},e.rotate=function(e){var t=Math.cos(e),r=Math.sin(e),n=this._transformMatrix;this._transformMatrix=[n[0]*t+n[2]*r,n[1]*t+n[3]*r,n[0]*-r+n[2]*t,n[1]*-r+n[3]*t,n[4],n[5]],this._originalRotate(e)})}var u=function(){function e(e){this.canvasFactory=e,this.cache=Object.create(null)}return e.prototype={getCanvas:function(e,t,r,n){var i;return void 0!==this.cache[e]?(i=this.cache[e],this.canvasFactory.reset(i,t,r),i.context.setTransform(1,0,0,1,0,0)):(i=this.canvasFactory.create(t,r),this.cache[e]=i),n&&s(i.context),i},clear:function(){for(var e in this.cache){var t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}},e}();var l=function(){function e(){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=n.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=n.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=n.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}(),c=function(){function e(e,t,r,n,i,a){this.ctx=e,this.current=new l,this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=r,this.canvasFactory=n,this.webGLContext=i,this.imageLayer=a,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.cachedCanvases=new u(this.canvasFactory),e&&s(e),this._cachedGetSinglePixelWidth=null}function t(e,t){if("undefined"!=typeof ImageData&&t instanceof ImageData)e.putImageData(t,0,0);else{var r,i,s,u,l,c=t.height,h=t.width,d=c%a,f=(c-d)/a,p=0===d?f:f+1,v=e.createImageData(h,a),m=0,g=t.data,y=v.data;if(t.kind===n.ImageKind.GRAYSCALE_1BPP){var b=g.byteLength,_=new Uint32Array(y.buffer,0,y.byteLength>>2),A=_.length,S=h+7>>3,w=4294967295,k=o.value?4278190080:255;for(i=0;i<p;i++){for(u=i<f?a:d,r=0,s=0;s<u;s++){for(var x=b-m,P=0,C=x>S?h:8*x-7,R=-8&C,T=0,E=0;P<R;P+=8)E=g[m++],_[r++]=128&E?w:k,_[r++]=64&E?w:k,_[r++]=32&E?w:k,_[r++]=16&E?w:k,_[r++]=8&E?w:k,_[r++]=4&E?w:k,_[r++]=2&E?w:k,_[r++]=1&E?w:k;for(;P<C;P++)0===T&&(E=g[m++],T=128),_[r++]=E&T?w:k,T>>=1}for(;r<A;)_[r++]=0;e.putImageData(v,0,i*a)}}else if(t.kind===n.ImageKind.RGBA_32BPP){for(s=0,l=h*a*4,i=0;i<f;i++)y.set(g.subarray(m,m+l)),m+=l,e.putImageData(v,0,s),s+=a;i<p&&(l=h*d*4,y.set(g.subarray(m,m+l)),e.putImageData(v,0,s))}else{if(t.kind!==n.ImageKind.RGB_24BPP)throw new Error("bad image kind: ".concat(t.kind));for(l=h*(u=a),i=0;i<p;i++){for(i>=f&&(l=h*(u=d)),r=0,s=l;s--;)y[r++]=g[m++],y[r++]=g[m++],y[r++]=g[m++],y[r++]=255;e.putImageData(v,0,i*a)}}}}function r(e,t){for(var r=t.height,n=t.width,i=r%a,o=(r-i)/a,s=0===i?o:o+1,u=e.createImageData(n,a),l=0,c=t.data,h=u.data,d=0;d<s;d++){for(var f=d<o?a:i,p=3,v=0;v<f;v++)for(var m=0,g=0;g<n;g++){if(!m){var y=c[l++];m=128}h[p]=y&m?0:255,p+=4,m>>=1}e.putImageData(u,0,d*a)}}function c(e,t){for(var r=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],n=0,i=r.length;n<i;n++){var a=r[n];void 0!==e[a]&&(t[a]=e[a])}void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function h(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 d(e,t,r,n){for(var i=e.length,a=3;a<i;a+=4){var o=e[a];if(0===o)e[a-3]=t,e[a-2]=r,e[a-1]=n;else if(o<255){var s=255-o;e[a-3]=e[a-3]*o+t*s>>8,e[a-2]=e[a-2]*o+r*s>>8,e[a-1]=e[a-1]*o+n*s>>8}}}function f(e,t,r){for(var n=e.length,i=3;i<n;i+=4){var a=r?r[e[i]]:e[i];t[i]=t[i]*a*(1/255)|0}}function p(e,t,r){for(var n=e.length,i=3;i<n;i+=4){var a=77*e[i-3]+152*e[i-2]+28*e[i-1];t[i]=r?t[i]*r[a>>8]>>8:t[i]*a>>16}}function v(e,t,r,n){var i=t.canvas,a=t.context;e.setTransform(t.scaleX,0,0,t.scaleY,t.offsetX,t.offsetY);var o=t.backdrop||null;if(!t.transferMap&&n.isEnabled){var s=n.composeSMask({layer:r.canvas,mask:i,properties:{subtype:t.subtype,backdrop:o}});return e.setTransform(1,0,0,1,0,0),void e.drawImage(s,t.offsetX,t.offsetY)}!function(e,t,r,n,i,a,o){var s,u=!!a,l=u?a[0]:0,c=u?a[1]:0,h=u?a[2]:0;s="Luminosity"===i?p:f;for(var v=Math.min(n,Math.ceil(1048576/r)),m=0;m<n;m+=v){var g=Math.min(v,n-m),y=e.getImageData(0,m,r,g),b=t.getImageData(0,m,r,g);u&&d(y.data,l,c,h),s(y.data,b.data,o),e.putImageData(b,0,m)}}(a,r,i.width,i.height,t.subtype,o,t.transferMap),e.drawImage(i,0,0)}var m=["butt","round","square"],g=["miter","round","bevel"],y={},b={};for(var _ in e.prototype={beginDrawing:function(e){var t=e.transform,r=e.viewport,n=e.transparency,i=void 0!==n&&n,a=e.background,o=void 0===a?null:a,s=this.ctx.canvas.width,u=this.ctx.canvas.height;if(this.ctx.save(),this.ctx.fillStyle=o||"rgb(255, 255, 255)",this.ctx.fillRect(0,0,s,u),this.ctx.restore(),i){var l=this.cachedCanvases.getCanvas("transparent",s,u,!0);this.compositeCtx=this.ctx,this.transparentCanvas=l.canvas,this.ctx=l.context,this.ctx.save(),this.ctx.transform.apply(this.ctx,this.compositeCtx.mozCurrentTransform)}this.ctx.save(),h(this.ctx),t&&this.ctx.transform.apply(this.ctx,t),this.ctx.transform.apply(this.ctx,r.transform),this.baseTransform=this.ctx.mozCurrentTransform.slice(),this.imageLayer&&this.imageLayer.beginLayout()},executeOperatorList:function(e,t,r,i){var a=e.argsArray,o=e.fnArray,s=t||0,u=a.length;if(u===s)return s;for(var l,c=u-s>10&&"function"==typeof r,h=c?Date.now()+15:0,d=0,f=this.commonObjs,p=this.objs;;){if(void 0!==i&&s===i.nextBreakPoint)return i.breakIt(s,r),s;if((l=o[s])!==n.OPS.dependency)this[l].apply(this,a[s]);else{var v=!0,m=!1,g=void 0;try{for(var y,b=a[s][Symbol.iterator]();!(v=(y=b.next()).done);v=!0){var _=y.value,A=_.startsWith("g_")?f:p;if(!A.has(_))return A.get(_,r),s}}catch(e){m=!0,g=e}finally{try{v||null==b.return||b.return()}finally{if(m)throw g}}}if(++s===u)return s;if(c&&++d>10){if(Date.now()>h)return r(),s;d=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=m[e]},setLineJoin:function(e){this.ctx.lineJoin=g[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:function(e){},setFlatness:function(e){},setGState:function(e){for(var t=0,r=e.length;t<r;t++){var n=e[t],i=n[0],a=n[1];switch(i){case"LW":this.setLineWidth(a);break;case"LC":this.setLineCap(a);break;case"LJ":this.setLineJoin(a);break;case"ML":this.setMiterLimit(a);break;case"D":this.setDash(a[0],a[1]);break;case"RI":this.setRenderingIntent(a);break;case"FL":this.setFlatness(a);break;case"Font":this.setFont(a[0],a[1]);break;case"CA":this.current.strokeAlpha=n[1];break;case"ca":this.current.fillAlpha=n[1],this.ctx.globalAlpha=n[1];break;case"BM":this.ctx.globalCompositeOperation=a;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=a?this.tempSMask:null,this.current.activeSMask&&this.beginSMaskGroup(),this.tempSMask=null}}},beginSMaskGroup:function(){var e=this.current.activeSMask,t=e.canvas.width,r=e.canvas.height,n="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(n,t,r,!0),a=this.ctx,o=a.mozCurrentTransform;this.ctx.save();var s=i.context;s.scale(1/e.scaleX,1/e.scaleY),s.translate(-e.offsetX,-e.offsetY),s.transform.apply(s,o),e.startTransformInverse=s.mozCurrentTransformInverse,c(a,s),this.ctx=s,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(a),this.groupLevel++},suspendSMaskGroup:function(){var e=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),v(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),this.ctx.save(),c(e,this.ctx),this.current.resumeSMaskCtx=e;var t=n.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(),v(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),c(e,this.ctx);var t=n.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,n,i,a){this.ctx.transform(e,t,r,n,i,a),this._cachedGetSinglePixelWidth=null},constructPath:function(e,t){for(var r=this.ctx,i=this.current,a=i.x,o=i.y,s=0,u=0,l=e.length;s<l;s++)switch(0|e[s]){case n.OPS.rectangle:a=t[u++],o=t[u++];var c=t[u++],h=t[u++];0===c&&(c=this.getSinglePixelWidth()),0===h&&(h=this.getSinglePixelWidth());var d=a+c,f=o+h;this.ctx.moveTo(a,o),this.ctx.lineTo(d,o),this.ctx.lineTo(d,f),this.ctx.lineTo(a,f),this.ctx.lineTo(a,o),this.ctx.closePath();break;case n.OPS.moveTo:a=t[u++],o=t[u++],r.moveTo(a,o);break;case n.OPS.lineTo:a=t[u++],o=t[u++],r.lineTo(a,o);break;case n.OPS.curveTo:a=t[u+4],o=t[u+5],r.bezierCurveTo(t[u],t[u+1],t[u+2],t[u+3],a,o),u+=6;break;case n.OPS.curveTo2:r.bezierCurveTo(a,o,t[u],t[u+1],t[u+2],t[u+3]),a=t[u+2],o=t[u+3],u+=4;break;case n.OPS.curveTo3:a=t[u+2],o=t[u+3],r.bezierCurveTo(t[u],t[u+1],a,o,a,o),u+=4;break;case n.OPS.closePath:r.closePath()}i.setCurrentPoint(a,o)},closePath:function(){this.ctx.closePath()},stroke:function(e){e=void 0===e||e;var t=this.ctx,r=this.current.strokeColor;t.lineWidth=Math.max(.65*this.getSinglePixelWidth(),this.current.lineWidth),t.globalAlpha=this.current.strokeAlpha,r&&r.hasOwnProperty("type")&&"Pattern"===r.type?(t.save(),t.strokeStyle=r.getPattern(t,this),t.stroke(),t.restore()):t.stroke(),e&&this.consumePath(),t.globalAlpha=this.current.fillAlpha},closeStroke:function(){this.closePath(),this.stroke()},fill:function(e){e=void 0===e||e;var t=this.ctx,r=this.current.fillColor,n=!1;this.current.patternFill&&(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=y},eoClip:function(){this.pendingClip=b},beginText:function(){this.current.textMatrix=n.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 n=e[r];t.setTransform.apply(t,n.transform),t.translate(n.x,n.y),n.addToPath(t,n.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),i=this.current;if(!r)throw new Error("Can't find font for ".concat(e));if(i.fontMatrix=r.fontMatrix?r.fontMatrix:n.FONT_IDENTITY_MATRIX,0!==i.fontMatrix[0]&&0!==i.fontMatrix[3]||(0,n.warn)("Invalid font matrix for font "+e),t<0?(t=-t,i.fontDirection=-1):i.fontDirection=1,this.current.font=r,this.current.fontSize=t,!r.isType3Font){var a=r.loadedName||"sans-serif",o=r.black?"900":r.bold?"bold":"normal",s=r.italic?"italic":"normal",u='"'.concat(a,'", ').concat(r.fallbackName),l=t<16?16:t>100?100:t;this.current.fontSizeScale=t/l,this.ctx.font="".concat(s," ").concat(o," ").concat(l,"px ").concat(u)}},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,n,i,a){this.current.textMatrix=[e,t,r,n,i,a],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:function(e,t,r,i){var a,o=this.ctx,s=this.current,u=s.font,l=s.textRenderingMode,c=s.fontSize/s.fontSizeScale,h=l&n.TextRenderingMode.FILL_STROKE_MASK,d=!!(l&n.TextRenderingMode.ADD_TO_PATH_FLAG),f=s.patternFill&&u.data;((u.disableFontFace||d||f)&&(a=u.getPathGenerator(this.commonObjs,e)),u.disableFontFace||f?(o.save(),o.translate(t,r),o.beginPath(),a(o,c),i&&o.setTransform.apply(o,i),h!==n.TextRenderingMode.FILL&&h!==n.TextRenderingMode.FILL_STROKE||o.fill(),h!==n.TextRenderingMode.STROKE&&h!==n.TextRenderingMode.FILL_STROKE||o.stroke(),o.restore()):(h!==n.TextRenderingMode.FILL&&h!==n.TextRenderingMode.FILL_STROKE||o.fillText(e,t,r),h!==n.TextRenderingMode.STROKE&&h!==n.TextRenderingMode.FILL_STROKE||o.strokeText(e,t,r)),d)&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:o.mozCurrentTransform,x:t,y:r,fontSize:c,addToPath:a})},get isFontSubpixelAAEnabled(){var e=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10).context;e.scale(1.5,1),e.fillText("I",0,10);for(var t=e.getImageData(0,0,10,10).data,r=!1,i=3;i<t.length;i+=4)if(t[i]>0&&t[i]<255){r=!0;break}return(0,n.shadow)(this,"isFontSubpixelAAEnabled",r)},showText:function(e){var t=this.current,r=t.font;if(r.isType3Font)return this.showType3Text(e);var i=t.fontSize;if(0!==i){var a,o=this.ctx,s=t.fontSizeScale,u=t.charSpacing,l=t.wordSpacing,c=t.fontDirection,h=t.textHScale*c,d=e.length,f=r.vertical,p=f?1:-1,v=r.defaultVMetrics,m=i*t.fontMatrix[0],g=t.textRenderingMode===n.TextRenderingMode.FILL&&!r.disableFontFace&&!t.patternFill;if(o.save(),t.patternFill){o.save();var y=t.fillColor.getPattern(o,this);a=o.mozCurrentTransform,o.restore(),o.fillStyle=y}o.transform.apply(o,t.textMatrix),o.translate(t.x,t.y+t.textRise),c>0?o.scale(h,-1):o.scale(h,1);var b=t.lineWidth,_=t.textMatrixScale;if(0===_||0===b){var A=t.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;A!==n.TextRenderingMode.STROKE&&A!==n.TextRenderingMode.FILL_STROKE||(this._cachedGetSinglePixelWidth=null,b=.65*this.getSinglePixelWidth())}else b/=_;1!==s&&(o.scale(s,s),b/=s),o.lineWidth=b;var S,w=0;for(S=0;S<d;++S){var k=e[S];if((0,n.isNum)(k))w+=p*k*i/1e3;else{var x,P,C,R,T,E,O,F=!1,I=(k.isSpace?l:0)+u,L=k.fontChar,M=k.accent,j=k.width;if(f)T=k.vmetric||v,E=-(E=k.vmetric?T[1]:.5*j)*m,O=T[2]*m,j=T?-T[0]:j,x=E/s,P=(w+O)/s;else x=w/s,P=0;if(r.remeasure&&j>0){var D=1e3*o.measureText(L).width/i*s;if(j<D&&this.isFontSubpixelAAEnabled){var N=j/D;F=!0,o.save(),o.scale(N,1),x/=N}else j!==D&&(x+=(j-D)/2e3*i/s)}(k.isInFont||r.missingFile)&&(g&&!M?o.fillText(L,x,P):(this.paintChar(L,x,P,a),M&&(C=x+M.offset.x/s,R=P-M.offset.y/s,this.paintChar(M.fontChar,C,R,a)))),w+=j*m+I*c,F&&o.restore()}}f?t.y-=w*h:t.x+=w*h,o.restore()}},showType3Text:function(e){var t,r,i,a,o=this.ctx,s=this.current,u=s.font,l=s.fontSize,c=s.fontDirection,h=u.vertical?1:-1,d=s.charSpacing,f=s.wordSpacing,p=s.textHScale*c,v=s.fontMatrix||n.FONT_IDENTITY_MATRIX,m=e.length;if(!(s.textRenderingMode===n.TextRenderingMode.INVISIBLE)&&0!==l){for(this._cachedGetSinglePixelWidth=null,o.save(),o.transform.apply(o,s.textMatrix),o.translate(s.x,s.y),o.scale(p,c),t=0;t<m;++t)if(r=e[t],(0,n.isNum)(r))a=h*r*l/1e3,this.ctx.translate(a,0),s.x+=a*p;else{var g=(r.isSpace?f:0)+d,y=u.charProcOperatorList[r.operatorListId];if(y)this.processingType3=r,this.save(),o.scale(l,l),o.transform.apply(o,v),this.executeOperatorList(y),this.restore(),i=n.Util.applyTransform([r.width,0],v)[0]*l+g,o.translate(i,0),s.x+=i*p;else(0,n.warn)('Type3 character "'.concat(r.operatorListId,'" is not available.'))}o.restore(),this.processingType3=null}},setCharWidth:function(e,t){},setCharWidthAndBounds:function(e,t,r,n,i,a){this.ctx.rect(r,n,i-r,a-n),this.clip(),this.endPath()},getColorN_Pattern:function(t){var r,n=this;if("TilingPattern"===t[0]){var a=t[1],o=this.baseTransform||this.ctx.mozCurrentTransform.slice(),s={createCanvasGraphics:function(t){return new e(t,n.commonObjs,n.objs,n.canvasFactory,n.webGLContext)}};r=new i.TilingPattern(t,a,this.ctx,s,o)}else r=(0,i.getShadingPatternFromIR)(t);return r},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 i=n.Util.makeCssRgb(e,t,r);this.ctx.strokeStyle=i,this.current.strokeColor=i},setFillRGBColor:function(e,t,r){var i=n.Util.makeCssRgb(e,t,r);this.ctx.fillStyle=i,this.current.fillColor=i,this.current.patternFill=!1},shadingFill:function(e){var t=this.ctx;this.save();var r=(0,i.getShadingPatternFromIR)(e);t.fillStyle=r.getPattern(t,this,!0);var a=t.mozCurrentTransformInverse;if(a){var o=t.canvas,s=o.width,u=o.height,l=n.Util.applyTransform([0,0],a),c=n.Util.applyTransform([0,u],a),h=n.Util.applyTransform([s,0],a),d=n.Util.applyTransform([s,u],a),f=Math.min(l[0],c[0],h[0],d[0]),p=Math.min(l[1],c[1],h[1],d[1]),v=Math.max(l[0],c[0],h[0],d[0]),m=Math.max(l[1],c[1],h[1],d[1]);this.ctx.fillRect(f,p,v-f,m-p)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.restore()},beginInlineImage:function(){(0,n.unreachable)("Should not call beginInlineImage")},beginImageData:function(){(0,n.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],n=t[3]-t[1];this.ctx.rect(t[0],t[1],r,n),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,n.info)("TODO: Support non-isolated groups."),e.knockout&&(0,n.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 i=n.Util.getAxialAlignedBoundingBox(e.bbox,t.mozCurrentTransform),a=[0,0,t.canvas.width,t.canvas.height];i=n.Util.intersect(i,a)||[0,0,0,0];var o=Math.floor(i[0]),s=Math.floor(i[1]),u=Math.max(Math.ceil(i[2])-o,1),l=Math.max(Math.ceil(i[3])-s,1),h=1,d=1;u>4096&&(h=u/4096,u=4096),l>4096&&(d=l/4096,l=4096);var f="groupAt"+this.groupLevel;e.smask&&(f+="_smask_"+this.smaskCounter++%2);var p=this.cachedCanvases.getCanvas(f,u,l,!0),v=p.context;v.scale(1/h,1/d),v.translate(-o,-s),v.transform.apply(v,r),e.smask?this.smaskStack.push({canvas:p.canvas,context:v,offsetX:o,offsetY:s,scaleX:h,scaleY:d,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(o,s),t.scale(h,d)),c(t,v),this.ctx=v,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(),h(this.ctx),this.current=new l,Array.isArray(e)&&4===e.length){var n=e[2]-e[0],i=e[3]-e[1];this.ctx.rect(e[0],e[1],n,i),this.clip(),this.endPath()}this.transform.apply(this,t),this.transform.apply(this,r)},endAnnotation:function(){this.restore()},paintJpegXObject:function(e,t,r){var i=this.processingType3?this.commonObjs.get(e):this.objs.get(e);if(i){this.save();var a=this.ctx;if(a.scale(1/t,-1/r),a.drawImage(i,0,0,i.width,i.height,0,-r,t,r),this.imageLayer){var o=a.mozCurrentTransformInverse,s=this.getCanvasPosition(0,0);this.imageLayer.appendImage({objId:e,left:s[0],top:s[1],width:t/o[0],height:r/o[3]})}this.restore()}else(0,n.warn)("Dependent image isn't ready yet")},paintImageMaskXObject:function(e){var t=this.ctx,n=e.width,i=e.height,a=this.current.fillColor,o=this.current.patternFill,s=this.processingType3;if(s&&void 0===s.compiled&&(s.compiled=n<=1e3&&i<=1e3?function(e){var t,r,n,i,a=e.width,o=e.height,s=a+1,u=new Uint8Array(s*(o+1)),l=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),c=a+7&-8,h=e.data,d=new Uint8Array(c*o),f=0;for(t=0,i=h.length;t<i;t++)for(var p=128,v=h[t];p>0;)d[f++]=v&p?0:255,p>>=1;var m=0;for(0!==d[f=0]&&(u[0]=1,++m),r=1;r<a;r++)d[f]!==d[f+1]&&(u[r]=d[f]?2:1,++m),f++;for(0!==d[f]&&(u[r]=2,++m),t=1;t<o;t++){n=t*s,d[(f=t*c)-c]!==d[f]&&(u[n]=d[f]?1:8,++m);var g=(d[f]?4:0)+(d[f-c]?8:0);for(r=1;r<a;r++)l[g=(g>>2)+(d[f+1]?4:0)+(d[f-c+1]?8:0)]&&(u[n+r]=l[g],++m),f++;if(d[f-c]!==d[f]&&(u[n+r]=d[f]?2:4,++m),m>1e3)return null}for(n=t*s,0!==d[f=c*(o-1)]&&(u[n]=8,++m),r=1;r<a;r++)d[f]!==d[f+1]&&(u[n+r]=d[f]?4:8,++m),f++;if(0!==d[f]&&(u[n+r]=4,++m),m>1e3)return null;var y=new Int32Array([0,s,-1,0,-s,0,0,0,1]),b=[];for(t=0;m&&t<=o;t++){for(var _=t*s,A=_+a;_<A&&!u[_];)_++;if(_!==A){var S,w=[_%s,t],k=u[_],x=_;do{var P=y[k];do{_+=P}while(!u[_]);5!==(S=u[_])&&10!==S?(k=S,u[_]=0):(k=S&51*k>>4,u[_]&=k>>2|k<<2),w.push(_%s),w.push(_/s|0),u[_]||--m}while(x!==_);b.push(w),--t}}return function(e){e.save(),e.scale(1/a,-1/o),e.translate(0,-o),e.beginPath();for(var t=0,r=b.length;t<r;t++){var n=b[t];e.moveTo(n[0],n[1]);for(var i=2,s=n.length;i<s;i+=2)e.lineTo(n[i],n[i+1])}e.fill(),e.beginPath(),e.restore()}}({data:e.data,width:n,height:i}):null),s&&s.compiled)s.compiled(t);else{var u=this.cachedCanvases.getCanvas("maskCanvas",n,i),l=u.context;l.save(),r(l,e),l.globalCompositeOperation="source-in",l.fillStyle=o?a.getPattern(l,this):a,l.fillRect(0,0,n,i),l.restore(),this.paintInlineImageXObject(u.canvas)}},paintImageMaskXObjectRepeat:function(e,t,n,i){var a=e.width,o=e.height,s=this.current.fillColor,u=this.current.patternFill,l=this.cachedCanvases.getCanvas("maskCanvas",a,o),c=l.context;c.save(),r(c,e),c.globalCompositeOperation="source-in",c.fillStyle=u?s.getPattern(c,this):s,c.fillRect(0,0,a,o),c.restore();for(var h=this.ctx,d=0,f=i.length;d<f;d+=2)h.save(),h.transform(t,0,0,n,i[d],i[d+1]),h.scale(1,-1),h.drawImage(l.canvas,0,0,a,o,0,-1,1,1),h.restore()},paintImageMaskXObjectGroup:function(e){for(var t=this.ctx,n=this.current.fillColor,i=this.current.patternFill,a=0,o=e.length;a<o;a++){var s=e[a],u=s.width,l=s.height,c=this.cachedCanvases.getCanvas("maskCanvas",u,l),h=c.context;h.save(),r(h,s),h.globalCompositeOperation="source-in",h.fillStyle=i?n.getPattern(h,this):n,h.fillRect(0,0,u,l),h.restore(),t.save(),t.transform.apply(t,s.transform),t.scale(1,-1),t.drawImage(c.canvas,0,0,u,l,0,-1,1,1),t.restore()}},paintImageXObject:function(e){var t=this.processingType3?this.commonObjs.get(e):this.objs.get(e);t?this.paintInlineImageXObject(t):(0,n.warn)("Dependent image isn't ready yet")},paintImageXObjectRepeat:function(e,t,r,i){var a=this.processingType3?this.commonObjs.get(e):this.objs.get(e);if(a){for(var o=a.width,s=a.height,u=[],l=0,c=i.length;l<c;l+=2)u.push({transform:[t,0,0,r,i[l],i[l+1]],x:0,y:0,w:o,h:s});this.paintInlineImageXObjectGroup(a,u)}else(0,n.warn)("Dependent image isn't ready yet")},paintInlineImageXObject:function(e){var r=e.width,n=e.height,i=this.ctx;this.save(),i.scale(1/r,-1/n);var a,o,s=i.mozCurrentTransformInverse,u=s[0],l=s[1],c=Math.max(Math.sqrt(u*u+l*l),1),h=s[2],d=s[3],f=Math.max(Math.sqrt(h*h+d*d),1);if("function"==typeof HTMLElement&&e instanceof HTMLElement||!e.data)a=e;else{var p=(o=this.cachedCanvases.getCanvas("inlineImage",r,n)).context;t(p,e),a=o.canvas}for(var v=r,m=n,g="prescale1";c>2&&v>1||f>2&&m>1;){var y=v,b=m;c>2&&v>1&&(c/=v/(y=Math.ceil(v/2))),f>2&&m>1&&(f/=m/(b=Math.ceil(m/2))),(p=(o=this.cachedCanvases.getCanvas(g,y,b)).context).clearRect(0,0,y,b),p.drawImage(a,0,0,v,m,0,0,y,b),a=o.canvas,v=y,m=b,g="prescale1"===g?"prescale2":"prescale1"}if(i.drawImage(a,0,0,v,m,0,-n,r,n),this.imageLayer){var _=this.getCanvasPosition(0,-n);this.imageLayer.appendImage({imgData:e,left:_[0],top:_[1],width:r/s[0],height:n/s[3]})}this.restore()},paintInlineImageXObjectGroup:function(e,r){var n=this.ctx,i=e.width,a=e.height,o=this.cachedCanvases.getCanvas("inlineImage",i,a);t(o.context,e);for(var s=0,u=r.length;s<u;s++){var l=r[s];if(n.save(),n.transform.apply(n,l.transform),n.scale(1,-1),n.drawImage(o.canvas,l.x,l.y,l.w,l.h,0,-1,1,1),this.imageLayer){var c=this.getCanvasPosition(l.x,l.y);this.imageLayer.appendImage({imgData:e,left:c[0],top:c[1],width:i,height:a})}n.restore()}},paintSolidColorImageMask:function(){this.ctx.fillRect(0,0,1,1)},paintXObject:function(){(0,n.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===b?e.clip("evenodd"):e.clip(),this.pendingClip=null),e.beginPath()},getSinglePixelWidth:function(e){if(null===this._cachedGetSinglePixelWidth){var t=this.ctx.mozCurrentTransformInverse;this._cachedGetSinglePixelWidth=Math.sqrt(Math.max(t[0]*t[0]+t[1]*t[1],t[2]*t[2]+t[3]*t[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]]}},n.OPS)e.prototype[n.OPS[_]]=e.prototype[_];return e}();t.CanvasGraphics=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getShadingPatternFromIR=function(e){var t=i[e[0]];if(!t)throw new Error("Unknown IR type: ".concat(e[0]));return t.fromIR(e)},t.TilingPattern=void 0;var n=r(1),i={RadialAxial:{fromIR:function(e){var t=e[1],r=e[2],n=e[3],i=e[4],a=e[5],o=e[6];return{type:"Pattern",getPattern:function(e){var s;"axial"===t?s=e.createLinearGradient(n[0],n[1],i[0],i[1]):"radial"===t&&(s=e.createRadialGradient(n[0],n[1],a,i[0],i[1],o));for(var u=0,l=r.length;u<l;++u){var c=r[u];s.addColorStop(c[0],c[1])}return s}}}}},a=function(){function e(e,t,r,n,i,a,o,s){var u,l=t.coords,c=t.colors,h=e.data,d=4*e.width;l[r+1]>l[n+1]&&(u=r,r=n,n=u,u=a,a=o,o=u),l[n+1]>l[i+1]&&(u=n,n=i,i=u,u=o,o=s,s=u),l[r+1]>l[n+1]&&(u=r,r=n,n=u,u=a,a=o,o=u);var f=(l[r]+t.offsetX)*t.scaleX,p=(l[r+1]+t.offsetY)*t.scaleY,v=(l[n]+t.offsetX)*t.scaleX,m=(l[n+1]+t.offsetY)*t.scaleY,g=(l[i]+t.offsetX)*t.scaleX,y=(l[i+1]+t.offsetY)*t.scaleY;if(!(p>=y))for(var b,_,A,S,w,k,x,P,C,R=c[a],T=c[a+1],E=c[a+2],O=c[o],F=c[o+1],I=c[o+2],L=c[s],M=c[s+1],j=c[s+2],D=Math.round(p),N=Math.round(y),q=D;q<=N;q++){q<m?(b=f-(f-v)*(C=q<p?0:p===m?1:(p-q)/(p-m)),_=R-(R-O)*C,A=T-(T-F)*C,S=E-(E-I)*C):(b=v-(v-g)*(C=q>y?1:m===y?0:(m-q)/(m-y)),_=O-(O-L)*C,A=F-(F-M)*C,S=I-(I-j)*C),w=f-(f-g)*(C=q<p?0:q>y?1:(p-q)/(p-y)),k=R-(R-L)*C,x=T-(T-M)*C,P=E-(E-j)*C;for(var W=Math.round(Math.min(b,w)),U=Math.round(Math.max(b,w)),B=d*q+4*W,z=W;z<=U;z++)C=(C=(b-z)/(b-w))<0?0:C>1?1:C,h[B++]=_-(_-k)*C|0,h[B++]=A-(A-x)*C|0,h[B++]=S-(S-P)*C|0,h[B++]=255}}function t(t,r,n){var i,a,o=r.coords,s=r.colors;switch(r.type){case"lattice":var u=r.verticesPerRow,l=Math.floor(o.length/u)-1,c=u-1;for(i=0;i<l;i++)for(var h=i*u,d=0;d<c;d++,h++)e(t,n,o[h],o[h+1],o[h+u],s[h],s[h+1],s[h+u]),e(t,n,o[h+u+1],o[h+1],o[h+u],s[h+u+1],s[h+1],s[h+u]);break;case"triangles":for(i=0,a=o.length;i<a;i+=3)e(t,n,o[i],o[i+1],o[i+2],s[i],s[i+1],s[i+2]);break;default:throw new Error("illegal figure")}}return function(e,r,n,i,a,o,s,u){var l,c,h,d,f=Math.floor(e[0]),p=Math.floor(e[1]),v=Math.ceil(e[2])-f,m=Math.ceil(e[3])-p,g=Math.min(Math.ceil(Math.abs(v*r[0]*1.1)),3e3),y=Math.min(Math.ceil(Math.abs(m*r[1]*1.1)),3e3),b=v/g,_=m/y,A={coords:n,colors:i,offsetX:-f,offsetY:-p,scaleX:1/b,scaleY:1/_},S=g+4,w=y+4;if(u.isEnabled)l=u.drawFigures({width:g,height:y,backgroundColor:o,figures:a,context:A}),(c=s.getCanvas("mesh",S,w,!1)).context.drawImage(l,2,2),l=c.canvas;else{var k=(c=s.getCanvas("mesh",S,w,!1)).context,x=k.createImageData(g,y);if(o){var P=x.data;for(h=0,d=P.length;h<d;h+=4)P[h]=o[0],P[h+1]=o[1],P[h+2]=o[2],P[h+3]=255}for(h=0;h<a.length;h++)t(x,a[h],A);k.putImageData(x,2,2),l=c.canvas}return{canvas:l,offsetX:f-2*b,offsetY:p-2*_,scaleX:b,scaleY:_}}}();i.Mesh={fromIR:function(e){var t=e[2],r=e[3],i=e[4],o=e[5],s=e[6],u=e[8];return{type:"Pattern",getPattern:function(e,l,c){var h;if(c)h=n.Util.singularValueDecompose2dScale(e.mozCurrentTransform);else if(h=n.Util.singularValueDecompose2dScale(l.baseTransform),s){var d=n.Util.singularValueDecompose2dScale(s);h=[h[0]*d[0],h[1]*d[1]]}var f=a(o,h,t,r,i,c?null:u,l.cachedCanvases,l.webGLContext);return c||(e.setTransform.apply(e,l.baseTransform),s&&e.transform.apply(e,s)),e.translate(f.offsetX,f.offsetY),e.scale(f.scaleX,f.scaleY),e.createPattern(f.canvas,"no-repeat")}}}},i.Dummy={fromIR:function(){return{type:"Pattern",getPattern:function(){return"hotpink"}}}};var o=function(){var e=1,t=2;function r(e,t,r,n,i){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=n,this.baseTransform=i,this.type="Pattern",this.ctx=r}return r.prototype={createPatternCanvas:function(e){var t=this.operatorList,r=this.bbox,i=this.xstep,a=this.ystep,o=this.paintType,s=this.tilingType,u=this.color,l=this.canvasGraphicsFactory;(0,n.info)("TilingType: "+s);var c=r[0],h=r[1],d=r[2],f=r[3],p=n.Util.singularValueDecompose2dScale(this.matrix),v=n.Util.singularValueDecompose2dScale(this.baseTransform),m=[p[0]*v[0],p[1]*v[1]],g=this.getSizeAndScale(i,this.ctx.canvas.width,m[0]),y=this.getSizeAndScale(a,this.ctx.canvas.height,m[1]),b=e.cachedCanvases.getCanvas("pattern",g.size,y.size,!0),_=b.context,A=l.createCanvasGraphics(_);return A.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(A,o,u),A.transform(g.scale,0,0,y.scale,0,0),A.transform(1,0,0,1,-c,-h),this.clipBbox(A,r,c,h,d,f),A.executeOperatorList(t),this.ctx.transform(1,0,0,1,c,h),this.ctx.scale(1/g.scale,1/y.scale),b.canvas},getSizeAndScale:function(e,t,r){e=Math.abs(e);var n=Math.max(3e3,t),i=Math.ceil(e*r);return i>=n?i=n:r=i/e,{scale:r,size:i}},clipBbox:function(e,t,r,n,i,a){if(Array.isArray(t)&&4===t.length){var o=i-r,s=a-n;e.ctx.rect(r,n,o,s),e.clip(),e.endPath()}},setFillAndStrokeStyleToContext:function(r,i,a){var o=r.ctx,s=r.current;switch(i){case e:var u=this.ctx;o.fillStyle=u.fillStyle,o.strokeStyle=u.strokeStyle,s.fillColor=u.fillStyle,s.strokeColor=u.strokeStyle;break;case t:var l=n.Util.makeCssRgb(a[0],a[1],a[2]);o.fillStyle=l,o.strokeStyle=l,s.fillColor=l,s.strokeColor=l;break;default:throw new n.FormatError("Unsupported paint type: ".concat(i))}},getPattern:function(e,t){(e=this.ctx).setTransform.apply(e,this.baseTransform),e.transform.apply(e,this.matrix);var r=this.createPatternCanvas(t);return e.createPattern(r,"repeat")}},r}();t.TilingPattern=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;var n=Object.create(null);t.GlobalWorkerOptions=n,n.workerPort=void 0===n.workerPort?null:n.workerPort,n.workerSrc=void 0===n.workerSrc?"":n.workerSrc},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=f;var n,i=(n=r(148))&&n.__esModule?n:{default:n},a=r(1);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function u(e,t){return l.apply(this,arguments)}function l(){var e;return e=i.default.mark(function e(t,r){var n,a=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=a.length>2&&void 0!==a[2]?a[2]:null,t){e.next=3;break}return e.abrupt("return",void 0);case 3:return e.abrupt("return",t.apply(n,r));case 4:case"end":return e.stop()}},e)}),(l=function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(e){s(a,n,i,o,u,"next",e)}function u(e){s(a,n,i,o,u,"throw",e)}o(void 0)})}).apply(this,arguments)}function c(e){if("object"!==o(e))return e;switch(e.name){case"AbortException":return new a.AbortException(e.message);case"MissingPDFException":return new a.MissingPDFException(e.message);case"UnexpectedResponseException":return new a.UnexpectedResponseException(e.message,e.status);default:return new a.UnknownErrorException(e.message,e.details)}}function h(e){return!(e instanceof Error)||e instanceof a.AbortException||e instanceof a.MissingPDFException||e instanceof a.UnexpectedResponseException||e instanceof a.UnknownErrorException?e:new a.UnknownErrorException(e.message,e.toString())}function d(e,t,r){t?e.resolve():e.reject(r)}function f(e,t,r){var n=this;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);var i=this.callbacksCapabilities=Object.create(null),a=this.actionHandler=Object.create(null);this._onComObjOnMessage=function(e){var t=e.data;if(t.targetName===n.sourceName)if(t.stream)n._processStreamMessage(t);else if(t.isReply){var o=t.callbackId;if(!(t.callbackId in i))throw new Error("Cannot resolve callback ".concat(o));var s=i[o];delete i[o],"error"in t?s.reject(c(t.error)):s.resolve(t.data)}else{if(!(t.action in a))throw new Error("Unknown action from worker: ".concat(t.action));var u=a[t.action];if(t.callbackId){var l=n.sourceName,d=t.sourceName;Promise.resolve().then(function(){return u[0].call(u[1],t.data)}).then(function(e){r.postMessage({sourceName:l,targetName:d,isReply:!0,callbackId:t.callbackId,data:e})},function(e){r.postMessage({sourceName:l,targetName:d,isReply:!0,callbackId:t.callbackId,error:h(e)})})}else t.streamId?n._createStreamSink(t):u[0].call(u[1],t.data)}},r.addEventListener("message",this._onComObjOnMessage)}f.prototype={on:function(e,t,r){var n=this.actionHandler;if(n[e])throw new Error('There is already an actionName called "'.concat(e,'"'));n[e]=[t,r]},send:function(e,t,r){var n={sourceName:this.sourceName,targetName:this.targetName,action:e,data:t};this.postMessage(n,r)},sendWithPromise:function(e,t,r){var n=this.callbackId++,i={sourceName:this.sourceName,targetName:this.targetName,action:e,data:t,callbackId:n},o=(0,a.createPromiseCapability)();this.callbacksCapabilities[n]=o;try{this.postMessage(i,r)}catch(e){o.reject(e)}return o.promise},sendWithStream:function(e,t,r,n){var i=this,o=this.streamId++,s=this.sourceName,u=this.targetName;return new a.ReadableStream({start:function(r){var n=(0,a.createPromiseCapability)();return i.streamControllers[o]={controller:r,startCall:n,isClosed:!1},i.postMessage({sourceName:s,targetName:u,action:e,streamId:o,data:t,desiredSize:r.desiredSize}),n.promise},pull:function(e){var t=(0,a.createPromiseCapability)();return i.streamControllers[o].pullCall=t,i.postMessage({sourceName:s,targetName:u,stream:"pull",streamId:o,desiredSize:e.desiredSize}),t.promise},cancel:function(e){var t=(0,a.createPromiseCapability)();return i.streamControllers[o].cancelCall=t,i.streamControllers[o].isClosed=!0,i.postMessage({sourceName:s,targetName:u,stream:"cancel",reason:e,streamId:o}),t.promise}},r)},_createStreamSink:function(e){var t=this,r=this,n=this.actionHandler[e.action],i=e.streamId,o=e.desiredSize,s=this.sourceName,l=e.sourceName,c=(0,a.createPromiseCapability)(),h=function(e){var r=e.stream,n=e.chunk,a=e.transfers,o=e.success,u=e.reason;t.postMessage({sourceName:s,targetName:l,stream:r,streamId:i,chunk:n,success:o,reason:u},a)},d={enqueue:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var n=this.desiredSize;this.desiredSize-=t,n>0&&this.desiredSize<=0&&(this.sinkCapability=(0,a.createPromiseCapability)(),this.ready=this.sinkCapability.promise),h({stream:"enqueue",chunk:e,transfers:r})}},close:function(){this.isCancelled||(this.isCancelled=!0,h({stream:"close"}),delete r.streamSinks[i])},error:function(e){this.isCancelled||(this.isCancelled=!0,h({stream:"error",reason:e}))},sinkCapability:c,onPull:null,onCancel:null,isCancelled:!1,desiredSize:o,ready:null};d.sinkCapability.resolve(),d.ready=d.sinkCapability.promise,this.streamSinks[i]=d,u(n[0],[e.data,d],n[1]).then(function(){h({stream:"start_complete",success:!0})},function(e){h({stream:"start_complete",success:!1,reason:e})})},_processStreamMessage:function(e){var t=this,r=this.sourceName,n=e.sourceName,i=e.streamId,o=function(e){var a=e.stream,o=e.success,s=e.reason;t.comObj.postMessage({sourceName:r,targetName:n,stream:a,success:o,streamId:i,reason:s})},s=function(){Promise.all([t.streamControllers[e.streamId].startCall,t.streamControllers[e.streamId].pullCall,t.streamControllers[e.streamId].cancelCall].map(function(e){return e&&(t=e.promise,Promise.resolve(t).catch(function(){}));var t})).then(function(){delete t.streamControllers[e.streamId]})};switch(e.stream){case"start_complete":d(this.streamControllers[e.streamId].startCall,e.success,c(e.reason));break;case"pull_complete":d(this.streamControllers[e.streamId].pullCall,e.success,c(e.reason));break;case"pull":if(!this.streamSinks[e.streamId]){o({stream:"pull_complete",success:!0});break}this.streamSinks[e.streamId].desiredSize<=0&&e.desiredSize>0&&this.streamSinks[e.streamId].sinkCapability.resolve(),this.streamSinks[e.streamId].desiredSize=e.desiredSize,u(this.streamSinks[e.streamId].onPull).then(function(){o({stream:"pull_complete",success:!0})},function(e){o({stream:"pull_complete",success:!1,reason:e})});break;case"enqueue":(0,a.assert)(this.streamControllers[e.streamId],"enqueue should have stream controller"),this.streamControllers[e.streamId].isClosed||this.streamControllers[e.streamId].controller.enqueue(e.chunk);break;case"close":if((0,a.assert)(this.streamControllers[e.streamId],"close should have stream controller"),this.streamControllers[e.streamId].isClosed)break;this.streamControllers[e.streamId].isClosed=!0,this.streamControllers[e.streamId].controller.close(),s();break;case"error":(0,a.assert)(this.streamControllers[e.streamId],"error should have stream controller"),this.streamControllers[e.streamId].controller.error(c(e.reason)),s();break;case"cancel_complete":d(this.streamControllers[e.streamId].cancelCall,e.success,c(e.reason)),s();break;case"cancel":if(!this.streamSinks[e.streamId])break;u(this.streamSinks[e.streamId].onCancel,[c(e.reason)]).then(function(){o({stream:"cancel_complete",success:!0})},function(e){o({stream:"cancel_complete",success:!1,reason:e})}),this.streamSinks[e.streamId].sinkCapability.reject(c(e.reason)),this.streamSinks[e.streamId].isCancelled=!0,delete this.streamSinks[e.streamId];break;default:throw new Error("Unexpected stream case")}},postMessage:function(e,t){t&&this.postMessageTransfers?this.comObj.postMessage(e,t):this.comObj.postMessage(e)},destroy:function(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var n=r(1),i=r(159);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),(0,n.assert)("string"==typeof t,"Metadata: input is not a string"),t=this._repair(t);var r=(new i.SimpleXMLParser).parseFromString(t);this._metadata=Object.create(null),r&&this._parse(r)}var t,r,o;return t=e,(r=[{key:"_repair",value:function(e){return e.replace(/^([^<]+)/,"").replace(/>\\376\\377([^<]+)/g,function(e,t){for(var r=t.replace(/\\([0-3])([0-7])([0-7])/g,function(e,t,r,n){return String.fromCharCode(64*t+8*r+1*n)}).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: ".concat(t," isn't defined."))}),n="",i=0,a=r.length;i<a;i+=2){var o=256*r.charCodeAt(i)+r.charCodeAt(i+1);n+=o>=32&&o<127&&60!==o&&62!==o&&38!==o?String.fromCharCode(o):"&#x"+(65536+o).toString(16).substring(1)+";"}return">"+n})}},{key:"_parse",value:function(e){var t=e.documentElement;if("rdf:rdf"!==t.nodeName.toLowerCase())for(t=t.firstChild;t&&"rdf:rdf"!==t.nodeName.toLowerCase();)t=t.nextSibling;var r=t?t.nodeName.toLowerCase():null;if(t&&"rdf:rdf"===r&&t.hasChildNodes())for(var n=t.childNodes,i=0,a=n.length;i<a;i++){var o=n[i];if("rdf:description"===o.nodeName.toLowerCase())for(var s=0,u=o.childNodes.length;s<u;s++)if("#text"!==o.childNodes[s].nodeName.toLowerCase()){var l=o.childNodes[s],c=l.nodeName.toLowerCase();this._metadata[c]=l.textContent.trim()}}}},{key:"get",value:function(e){var t=this._metadata[e];return void 0!==t?t:null}},{key:"getAll",value:function(){return this._metadata}},{key:"has",value:function(e){return void 0!==this._metadata[e]}}])&&a(t.prototype,r),o&&a(t,o),e}();t.Metadata=o},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e,t,r){return(o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=s(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),e}Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleXMLParser=void 0;var d={NoError:0,EndOfDocument:-1,UnterminatedCdat:-2,UnterminatedXmlDeclaration:-3,UnterminatedDoctypeDeclaration:-4,UnterminatedComment:-5,MalformedElement:-6,OutOfMemory:-7,UnterminatedAttributeValue:-8,UnterminatedElement:-9,ElementNeverBegun:-10};function f(e,t){var r=e[t];return" "===r||"\n"===r||"\r"===r||"\t"===r}var p=function(){function e(){l(this,e)}return h(e,[{key:"_resolveEntities",value:function(e){var t=this;return e.replace(/&([^;]+);/g,function(e,r){if("#x"===r.substring(0,2))return String.fromCharCode(parseInt(r.substring(2),16));if("#"===r.substring(0,1))return String.fromCharCode(parseInt(r.substring(1),10));switch(r){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return'"'}return t.onResolveEntity(r)})}},{key:"_parseContent",value:function(e,t){var r,n=t,i=[];function a(){for(;n<e.length&&f(e,n);)++n}for(;n<e.length&&!f(e,n)&&">"!==e[n]&&"/"!==e[n];)++n;for(r=e.substring(t,n),a();n<e.length&&">"!==e[n]&&"/"!==e[n]&&"?"!==e[n];){a();for(var o,s="";n<e.length&&!f(e,n)&&"="!==e[n];)s+=e[n],++n;if(a(),"="!==e[n])return null;++n,a();var u=e[n];if('"'!==u&&"'"!==u)return null;var l=e.indexOf(u,++n);if(l<0)return null;o=e.substring(n,l),i.push({name:s,value:this._resolveEntities(o)}),n=l+1,a()}return{name:r,attributes:i,parsed:n-t}}},{key:"_parseProcessingInstruction",value:function(e,t){var r,n=t;for(;n<e.length&&!f(e,n)&&">"!==e[n]&&"/"!==e[n];)++n;r=e.substring(t,n),function(){for(;n<e.length&&f(e,n);)++n}();for(var i=n;n<e.length&&("?"!==e[n]||">"!==e[n+1]);)++n;return{name:r,value:e.substring(i,n),parsed:n-t}}},{key:"parseXml",value:function(e){for(var t=0;t<e.length;){var r=t;if("<"===e[t]){var n=void 0;switch(e[++r]){case"/":if(++r,(n=e.indexOf(">",r))<0)return void this.onError(d.UnterminatedElement);this.onEndElement(e.substring(r,n)),r=n+1;break;case"?":++r;var i=this._parseProcessingInstruction(e,r);if("?>"!==e.substring(r+i.parsed,r+i.parsed+2))return void this.onError(d.UnterminatedXmlDeclaration);this.onPi(i.name,i.value),r+=i.parsed+2;break;case"!":if("--"===e.substring(r+1,r+3)){if((n=e.indexOf("--\x3e",r+3))<0)return void this.onError(d.UnterminatedComment);this.onComment(e.substring(r+3,n)),r=n+3}else if("[CDATA["===e.substring(r+1,r+8)){if((n=e.indexOf("]]>",r+8))<0)return void this.onError(d.UnterminatedCdat);this.onCdata(e.substring(r+8,n)),r=n+3}else{if("DOCTYPE"!==e.substring(r+1,r+8))return void this.onError(d.MalformedElement);var a=e.indexOf("[",r+8),o=!1;if((n=e.indexOf(">",r+8))<0)return void this.onError(d.UnterminatedDoctypeDeclaration);if(a>0&&n>a){if((n=e.indexOf("]>",r+8))<0)return void this.onError(d.UnterminatedDoctypeDeclaration);o=!0}var s=e.substring(r+8,n+(o?1:0));this.onDoctype(s),r=n+(o?2:1)}break;default:var u=this._parseContent(e,r);if(null===u)return void this.onError(d.MalformedElement);var l=!1;if("/>"===e.substring(r+u.parsed,r+u.parsed+2))l=!0;else if(">"!==e.substring(r+u.parsed,r+u.parsed+1))return void this.onError(d.UnterminatedElement);this.onBeginElement(u.name,u.attributes,l),r+=u.parsed+(l?2:1)}}else{for(;r<e.length&&"<"!==e[r];)r++;var c=e.substring(t,r);this.onText(this._resolveEntities(c))}t=r}}},{key:"onResolveEntity",value:function(e){return"&".concat(e,";")}},{key:"onPi",value:function(e,t){}},{key:"onComment",value:function(e){}},{key:"onCdata",value:function(e){}},{key:"onDoctype",value:function(e){}},{key:"onText",value:function(e){}},{key:"onBeginElement",value:function(e,t,r){}},{key:"onEndElement",value:function(e){}},{key:"onError",value:function(e){}}]),e}(),v=function(){function e(t,r){l(this,e),this.nodeName=t,this.nodeValue=r,Object.defineProperty(this,"parentNode",{value:null,writable:!0})}return h(e,[{key:"hasChildNodes",value:function(){return this.childNodes&&this.childNodes.length>0}},{key:"firstChild",get:function(){return this.childNodes&&this.childNodes[0]}},{key:"nextSibling",get:function(){var e=this.parentNode.childNodes;if(e){var t=e.indexOf(this);if(-1!==t)return e[t+1]}}},{key:"textContent",get:function(){return this.childNodes?this.childNodes.map(function(e){return e.textContent}).join(""):this.nodeValue||""}}]),e}(),m=function(e){function t(){var e;return l(this,t),(e=a(this,s(t).call(this)))._currentFragment=null,e._stack=null,e._errorCode=d.NoError,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,p),h(t,[{key:"parseFromString",value:function(e){if(this._currentFragment=[],this._stack=[],this._errorCode=d.NoError,this.parseXml(e),this._errorCode===d.NoError){var t=i(this._currentFragment,1)[0];if(t)return{documentElement:t}}}},{key:"onResolveEntity",value:function(e){switch(e){case"apos":return"'"}return o(s(t.prototype),"onResolveEntity",this).call(this,e)}},{key:"onText",value:function(e){if(!function(e){for(var t=0,r=e.length;t<r;t++)if(!f(e,t))return!1;return!0}(e)){var t=new v("#text",e);this._currentFragment.push(t)}}},{key:"onCdata",value:function(e){var t=new v("#text",e);this._currentFragment.push(t)}},{key:"onBeginElement",value:function(e,t,r){var n=new v(e);n.childNodes=[],this._currentFragment.push(n),r||(this._stack.push(this._currentFragment),this._currentFragment=n.childNodes)}},{key:"onEndElement",value:function(e){this._currentFragment=this._stack.pop()||[];var t=this._currentFragment[this._currentFragment.length-1];if(t)for(var r=0,n=t.childNodes.length;r<n;r++)t.childNodes[r].parentNode=t}},{key:"onError",value:function(e){this._errorCode=e}}]),t}();t.SimpleXMLParser=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDataTransportStream=void 0;var n,i=(n=r(148))&&n.__esModule?n:{default:n},a=r(1);function o(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function s(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,u,"next",e)}function u(e){o(a,n,i,s,u,"throw",e)}s(void 0)})}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),e}var h=function(){function e(t,r){var n=this;u(this,e),(0,a.assert)(r),this._queuedChunks=[],this._progressiveDone=t.progressiveDone||!1;var i=t.initialData;if(i&&i.length>0){var o=new Uint8Array(i).buffer;this._queuedChunks.push(o)}this._pdfDataRangeTransport=r,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._contentLength=t.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener(function(e,t){n._onReceiveData({begin:e,chunk:t})}),this._pdfDataRangeTransport.addProgressListener(function(e,t){n._onProgress({loaded:e,total:t})}),this._pdfDataRangeTransport.addProgressiveReadListener(function(e){n._onReceiveData({chunk:e})}),this._pdfDataRangeTransport.addProgressiveDoneListener(function(){n._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}return c(e,[{key:"_onReceiveData",value:function(e){var t=new Uint8Array(e.chunk).buffer;if(void 0===e.begin)this._fullRequestReader?this._fullRequestReader._enqueue(t):this._queuedChunks.push(t);else{var r=this._rangeReaders.some(function(r){return r._begin===e.begin&&(r._enqueue(t),!0)});(0,a.assert)(r)}}},{key:"_onProgress",value:function(e){if(void 0===e.total){var t=this._rangeReaders[0];t&&t.onProgress&&t.onProgress({loaded:e.loaded})}else{var r=this._fullRequestReader;r&&r.onProgress&&r.onProgress({loaded:e.loaded,total:e.total})}}},{key:"_onProgressiveDone",value:function(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}},{key:"_removeRangeReader",value:function(e){var t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}},{key:"getFullReader",value:function(){(0,a.assert)(!this._fullRequestReader);var e=this._queuedChunks;return this._queuedChunks=null,new d(this,e,this._progressiveDone)}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=new f(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeReaders.slice(0).forEach(function(t){t.cancel(e)}),this._pdfDataRangeTransport.abort()}},{key:"_progressiveDataLength",get:function(){return this._fullRequestReader?this._fullRequestReader._loaded:0}}]),e}();t.PDFDataTransportStream=h;var d=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];u(this,e),this._stream=t,this._done=n||!1,this._filename=null,this._queuedChunks=r||[],this._loaded=0;var i=!0,a=!1,o=void 0;try{for(var s,l=this._queuedChunks[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var c=s.value;this._loaded+=c.byteLength}}catch(e){a=!0,o=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw o}}this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}return c(e,[{key:"_enqueue",value:function(e){if(!this._done){if(this._requests.length>0)this._requests.shift().resolve({value:e,done:!1});else this._queuedChunks.push(e);this._loaded+=e.byteLength}}},{key:"read",value:function(){var e=s(i.default.mark(function e(){var t,r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this._queuedChunks.length>0)){e.next=3;break}return t=this._queuedChunks.shift(),e.abrupt("return",{value:t,done:!1});case 3:if(!this._done){e.next=5;break}return e.abrupt("return",{value:void 0,done:!0});case 5:return r=(0,a.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 8:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._done=!0,this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[]}},{key:"progressiveDone",value:function(){this._done||(this._done=!0)}},{key:"headersReady",get:function(){return this._headersReady}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._stream._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._stream._isStreamingSupported}},{key:"contentLength",get:function(){return this._stream._contentLength}}]),e}(),f=function(){function e(t,r,n){u(this,e),this._stream=t,this._begin=r,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}return c(e,[{key:"_enqueue",value:function(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else this._requests.shift().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)}}},{key:"read",value:function(){var e=s(i.default.mark(function e(){var t,r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._queuedChunk){e.next=4;break}return t=this._queuedChunk,this._queuedChunk=null,e.abrupt("return",{value:t,done:!1});case 4:if(!this._done){e.next=6;break}return e.abrupt("return",{value:void 0,done:!0});case 6:return r=(0,a.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 9:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._done=!0,this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[],this._stream._removeRangeReader(this)}},{key:"isStreamingSupported",get:function(){return!1}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebGLContext=void 0;var n=r(1);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=function(){function e(t){var r=t.enable,n=void 0!==r&&r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._enabled=!0===n}var t,r,a;return t=e,(r=[{key:"composeSMask",value:function(e){var t=e.layer,r=e.mask,n=e.properties;return o.composeSMask(t,r,n)}},{key:"drawFigures",value:function(e){var t=e.width,r=e.height,n=e.backgroundColor,i=e.figures,a=e.context;return o.drawFigures(t,r,n,i,a)}},{key:"clear",value:function(){o.cleanup()}},{key:"isEnabled",get:function(){var e=this._enabled;return e&&(e=o.tryInitGL()),(0,n.shadow)(this,"isEnabled",e)}}])&&i(t.prototype,r),a&&i(t,a),e}();t.WebGLContext=a;var o=function(){function e(e,t,r){var n=e.createShader(r);if(e.shaderSource(n,t),e.compileShader(n),!e.getShaderParameter(n,e.COMPILE_STATUS)){var i=e.getShaderInfoLog(n);throw new Error("Error during shader compilation: "+i)}return n}function t(t,r){return e(t,r,t.VERTEX_SHADER)}function r(t,r){return e(t,r,t.FRAGMENT_SHADER)}function n(e,t){for(var r=e.createProgram(),n=0,i=t.length;n<i;++n)e.attachShader(r,t[n]);if(e.linkProgram(r),!e.getProgramParameter(r,e.LINK_STATUS)){var a=e.getProgramInfoLog(r);throw new Error("Error during program linking: "+a)}return r}function i(e,t,r){e.activeTexture(r);var n=e.createTexture();return e.bindTexture(e.TEXTURE_2D,n),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),n}var a,o;function s(){a||(o=document.createElement("canvas"),a=o.getContext("webgl",{premultipliedalpha:!1}))}var u=" 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; } ",l=" 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; } ",c=null;var h=" 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); } ",d=" precision mediump float; varying vec4 v_color; void main() { gl_FragColor = v_color; } ",f=null;return{tryInitGL:function(){try{return s(),!!a}catch(e){}return!1},composeSMask:function(e,h,d){var f=e.width,p=e.height;c||function(){var e,i;s(),e=o,o=null,i=a,a=null;var h=n(i,[t(i,u),r(i,l)]);i.useProgram(h);var d={};d.gl=i,d.canvas=e,d.resolutionLocation=i.getUniformLocation(h,"u_resolution"),d.positionLocation=i.getAttribLocation(h,"a_position"),d.backdropLocation=i.getUniformLocation(h,"u_backdrop"),d.subtypeLocation=i.getUniformLocation(h,"u_subtype");var f=i.getAttribLocation(h,"a_texCoord"),p=i.getUniformLocation(h,"u_image"),v=i.getUniformLocation(h,"u_mask"),m=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,m),i.bufferData(i.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),i.STATIC_DRAW),i.enableVertexAttribArray(f),i.vertexAttribPointer(f,2,i.FLOAT,!1,0,0),i.uniform1i(p,0),i.uniform1i(v,1),c=d}();var v=c,m=v.canvas,g=v.gl;m.width=f,m.height=p,g.viewport(0,0,g.drawingBufferWidth,g.drawingBufferHeight),g.uniform2f(v.resolutionLocation,f,p),d.backdrop?g.uniform4f(v.resolutionLocation,d.backdrop[0],d.backdrop[1],d.backdrop[2],1):g.uniform4f(v.resolutionLocation,0,0,0,0),g.uniform1i(v.subtypeLocation,"Luminosity"===d.subtype?1:0);var y=i(g,e,g.TEXTURE0),b=i(g,h,g.TEXTURE1),_=g.createBuffer();return g.bindBuffer(g.ARRAY_BUFFER,_),g.bufferData(g.ARRAY_BUFFER,new Float32Array([0,0,f,0,0,p,0,p,f,0,f,p]),g.STATIC_DRAW),g.enableVertexAttribArray(v.positionLocation),g.vertexAttribPointer(v.positionLocation,2,g.FLOAT,!1,0,0),g.clearColor(0,0,0,0),g.enable(g.BLEND),g.blendFunc(g.ONE,g.ONE_MINUS_SRC_ALPHA),g.clear(g.COLOR_BUFFER_BIT),g.drawArrays(g.TRIANGLES,0,6),g.flush(),g.deleteTexture(y),g.deleteTexture(b),g.deleteBuffer(_),m},drawFigures:function(e,i,u,l,c){f||function(){var e,i;s(),e=o,o=null,i=a,a=null;var u=n(i,[t(i,h),r(i,d)]);i.useProgram(u);var l={};l.gl=i,l.canvas=e,l.resolutionLocation=i.getUniformLocation(u,"u_resolution"),l.scaleLocation=i.getUniformLocation(u,"u_scale"),l.offsetLocation=i.getUniformLocation(u,"u_offset"),l.positionLocation=i.getAttribLocation(u,"a_position"),l.colorLocation=i.getAttribLocation(u,"a_color"),f=l}();var p=f,v=p.canvas,m=p.gl;v.width=e,v.height=i,m.viewport(0,0,m.drawingBufferWidth,m.drawingBufferHeight),m.uniform2f(p.resolutionLocation,e,i);var g,y,b,_=0;for(g=0,y=l.length;g<y;g++)switch(l[g].type){case"lattice":_+=((b=l[g].coords.length/l[g].verticesPerRow|0)-1)*(l[g].verticesPerRow-1)*6;break;case"triangles":_+=l[g].coords.length}var A=new Float32Array(2*_),S=new Uint8Array(3*_),w=c.coords,k=c.colors,x=0,P=0;for(g=0,y=l.length;g<y;g++){var C=l[g],R=C.coords,T=C.colors;switch(C.type){case"lattice":var E=C.verticesPerRow;b=R.length/E|0;for(var O=1;O<b;O++)for(var F=O*E+1,I=1;I<E;I++,F++)A[x]=w[R[F-E-1]],A[x+1]=w[R[F-E-1]+1],A[x+2]=w[R[F-E]],A[x+3]=w[R[F-E]+1],A[x+4]=w[R[F-1]],A[x+5]=w[R[F-1]+1],S[P]=k[T[F-E-1]],S[P+1]=k[T[F-E-1]+1],S[P+2]=k[T[F-E-1]+2],S[P+3]=k[T[F-E]],S[P+4]=k[T[F-E]+1],S[P+5]=k[T[F-E]+2],S[P+6]=k[T[F-1]],S[P+7]=k[T[F-1]+1],S[P+8]=k[T[F-1]+2],A[x+6]=A[x+2],A[x+7]=A[x+3],A[x+8]=A[x+4],A[x+9]=A[x+5],A[x+10]=w[R[F]],A[x+11]=w[R[F]+1],S[P+9]=S[P+3],S[P+10]=S[P+4],S[P+11]=S[P+5],S[P+12]=S[P+6],S[P+13]=S[P+7],S[P+14]=S[P+8],S[P+15]=k[T[F]],S[P+16]=k[T[F]+1],S[P+17]=k[T[F]+2],x+=12,P+=18;break;case"triangles":for(var L=0,M=R.length;L<M;L++)A[x]=w[R[L]],A[x+1]=w[R[L]+1],S[P]=k[T[L]],S[P+1]=k[T[L]+1],S[P+2]=k[T[L]+2],x+=2,P+=3}}u?m.clearColor(u[0]/255,u[1]/255,u[2]/255,1):m.clearColor(0,0,0,0),m.clear(m.COLOR_BUFFER_BIT);var j=m.createBuffer();m.bindBuffer(m.ARRAY_BUFFER,j),m.bufferData(m.ARRAY_BUFFER,A,m.STATIC_DRAW),m.enableVertexAttribArray(p.positionLocation),m.vertexAttribPointer(p.positionLocation,2,m.FLOAT,!1,0,0);var D=m.createBuffer();return m.bindBuffer(m.ARRAY_BUFFER,D),m.bufferData(m.ARRAY_BUFFER,S,m.STATIC_DRAW),m.enableVertexAttribArray(p.colorLocation),m.vertexAttribPointer(p.colorLocation,3,m.UNSIGNED_BYTE,!1,0,0),m.uniform2f(p.scaleLocation,c.scaleX,c.scaleY),m.uniform2f(p.offsetLocation,c.offsetX,c.offsetY),m.drawArrays(m.TRIANGLES,0,_),m.flush(),m.deleteBuffer(j),m.deleteBuffer(D),v},cleanup:function(){c&&c.canvas&&(c.canvas.width=0,c.canvas.height=0),f&&f.canvas&&(f.canvas.width=0,f.canvas.height=0),c=null,f=null}}}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderTextLayer=void 0;var n,i=r(1),a=(n=r(3))&&n.__esModule?n:{default:n};var o=function(){var e=1e5,t=/\S/;var r=["left: ",0,"px; top: ",0,"px; font-size: ",0,"px; font-family: ","",";"];function n(e,n,a){var o,s=document.createElement("span"),u={style:null,angle:0,canvasWidth:0,isWhitespace:!1,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1};if(e._textDivs.push(s),o=n.str,!t.test(o))return u.isWhitespace=!0,void e._textDivProperties.set(s,u);var l=i.Util.transform(e._viewport.transform,n.transform),c=Math.atan2(l[1],l[0]),h=a[n.fontName];h.vertical&&(c+=Math.PI/2);var d,f,p=Math.sqrt(l[2]*l[2]+l[3]*l[3]),v=p;if(h.ascent?v=h.ascent*v:h.descent&&(v=(1+h.descent)*v),0===c?(d=l[4],f=l[5]-v):(d=l[4]+v*Math.sin(c),f=l[5]-v*Math.cos(c)),r[1]=d,r[3]=f,r[5]=p,r[7]=h.fontFamily,u.style=r.join(""),s.setAttribute("style",u.style),s.textContent=n.str,e._fontInspectorEnabled&&(s.dataset.fontName=n.fontName),0!==c&&(u.angle=c*(180/Math.PI)),n.str.length>1&&(h.vertical?u.canvasWidth=n.height*e._viewport.scale:u.canvasWidth=n.width*e._viewport.scale),e._textDivProperties.set(s,u),e._textContentStream&&e._layoutText(s),e._enhanceTextSelection){var m=1,g=0;0!==c&&(m=Math.cos(c),g=Math.sin(c));var y,b,_=(h.vertical?n.height:n.width)*e._viewport.scale,A=p;0!==c?(y=[m,g,-g,m,d,f],b=i.Util.getAxialAlignedBoundingBox([0,0,_,A],y)):b=[d,f,d+_,f+A],e._bounds.push({left:b[0],top:b[1],right:b[2],bottom:b[3],div:s,size:[_,A],m:y})}}function o(t){if(!t._canceled){var r=t._textDivs,n=t._capability,i=r.length;if(i>e)return t._renderingDone=!0,void n.resolve();if(!t._textContentStream)for(var a=0;a<i;a++)t._layoutText(r[a]);t._renderingDone=!0,n.resolve()}}function s(e){for(var t=e._bounds,r=e._viewport,n=function(e,t,r){var n=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}});u(e,n);var i=new Array(r.length);return n.forEach(function(e){var t=e.index;i[t]={left:e.x1New,top:0,right:e.x2New,bottom:0}}),r.map(function(t,r){var a=i[r],o=n[r];o.x1=t.top,o.y1=e-a.right,o.x2=t.bottom,o.y2=e-a.left,o.index=r,o.x1New=void 0,o.x2New=void 0}),u(t,n),n.forEach(function(e){var t=e.index;i[t].top=e.x1New,i[t].bottom=e.x2New}),i}(r.width,r.height,t),a=0;a<n.length;a++){var o=t[a].div,s=e._textDivProperties.get(o);if(0!==s.angle){var l=n[a],c=t[a],h=c.m,d=h[0],f=h[1],p=[[0,0],[0,c.size[1]],[c.size[0],0],c.size],v=new Float64Array(64);p.forEach(function(e,t){var r=i.Util.applyTransform(e,h);v[t+0]=d&&(l.left-r[0])/d,v[t+4]=f&&(l.top-r[1])/f,v[t+8]=d&&(l.right-r[0])/d,v[t+12]=f&&(l.bottom-r[1])/f,v[t+16]=f&&(l.left-r[0])/-f,v[t+20]=d&&(l.top-r[1])/d,v[t+24]=f&&(l.right-r[0])/-f,v[t+28]=d&&(l.bottom-r[1])/d,v[t+32]=d&&(l.left-r[0])/-d,v[t+36]=f&&(l.top-r[1])/-f,v[t+40]=d&&(l.right-r[0])/-d,v[t+44]=f&&(l.bottom-r[1])/-f,v[t+48]=f&&(l.left-r[0])/f,v[t+52]=d&&(l.top-r[1])/-d,v[t+56]=f&&(l.right-r[0])/f,v[t+60]=d&&(l.bottom-r[1])/-d});var m=function(e,t,r){for(var n=0,i=0;i<r;i++){var a=e[t++];a>0&&(n=n?Math.min(a,n):a)}return n},g=1+Math.min(Math.abs(d),Math.abs(f));s.paddingLeft=m(v,32,16)/g,s.paddingTop=m(v,48,16)/g,s.paddingRight=m(v,0,16)/g,s.paddingBottom=m(v,16,16)/g,e._textDivProperties.set(o,s)}else s.paddingLeft=t[a].left-n[a].left,s.paddingTop=t[a].top-n[a].top,s.paddingRight=n[a].right-t[a].right,s.paddingBottom=n[a].bottom-t[a].bottom,e._textDivProperties.set(o,s)}}function u(e,t){t.sort(function(e,t){return e.x1-t.x1||e.index-t.index});var r=[{start:-1/0,end:1/0,boundary:{x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0}}];t.forEach(function(e){for(var t=0;t<r.length&&r[t].end<=e.y1;)t++;for(var n,i,a=r.length-1;a>=0&&r[a].start>=e.y2;)a--;var o,s,u=-1/0;for(o=t;o<=a;o++){var l;(l=(i=(n=r[o]).boundary).x2>e.x1?i.index>e.index?i.x1New:e.x1:void 0===i.x2New?(i.x2+e.x1)/2:i.x2New)>u&&(u=l)}for(e.x1New=u,o=t;o<=a;o++)void 0===(i=(n=r[o]).boundary).x2New?i.x2>e.x1?i.index>e.index&&(i.x2New=i.x2):i.x2New=u:i.x2New>u&&(i.x2New=Math.max(u,i.x2));var c=[],h=null;for(o=t;o<=a;o++){var d=(i=(n=r[o]).boundary).x2>e.x2?i:e;h===d?c[c.length-1].end=n.end:(c.push({start:n.start,end:n.end,boundary:d}),h=d)}for(r[t].start<e.y1&&(c[0].start=e.y1,c.unshift({start:r[t].start,end:e.y1,boundary:r[t].boundary})),e.y2<r[a].end&&(c[c.length-1].end=e.y2,c.push({start:e.y2,end:r[a].end,boundary:r[a].boundary})),o=t;o<=a;o++)if(void 0===(i=(n=r[o]).boundary).x2New){var f=!1;for(s=t-1;!f&&s>=0&&r[s].start>=i.y1;s--)f=r[s].boundary===i;for(s=a+1;!f&&s<r.length&&r[s].end<=i.y2;s++)f=r[s].boundary===i;for(s=0;!f&&s<c.length;s++)f=c[s].boundary===i;f||(i.x2New=u)}Array.prototype.splice.apply(r,[t,a-t+1].concat(c))}),r.forEach(function(t){var r=t.boundary;void 0===r.x2New&&(r.x2New=Math.max(e,r.x2))})}function l(e){var t=this,r=e.textContent,n=e.textContentStream,o=e.container,s=e.viewport,u=e.textDivs,l=e.textContentItemsStr,c=e.enhanceTextSelection;this._textContent=r,this._textContentStream=n,this._container=o,this._viewport=s,this._textDivs=u||[],this._textContentItemsStr=l||[],this._enhanceTextSelection=!!c,this._fontInspectorEnabled=!(!a.default.FontInspector||!a.default.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(function(){t._layoutTextCtx&&(t._layoutTextCtx.canvas.width=0,t._layoutTextCtx.canvas.height=0,t._layoutTextCtx=null)})}return l.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:function(e,t){for(var r=0,i=e.length;r<i;r++)this._textContentItemsStr.push(e[r].str),n(this,e[r],t)},_layoutText:function(e){var t=this._container,r=this._textDivProperties.get(e);if(!r.isWhitespace){var n=e.style.fontSize,i=e.style.fontFamily;n===this._layoutTextLastFontSize&&i===this._layoutTextLastFontFamily||(this._layoutTextCtx.font=n+" "+i,this._layoutTextLastFontSize=n,this._layoutTextLastFontFamily=i);var a=this._layoutTextCtx.measureText(e.textContent).width,o="";0!==r.canvasWidth&&a>0&&(r.scale=r.canvasWidth/a,o="scaleX(".concat(r.scale,")")),0!==r.angle&&(o="rotate(".concat(r.angle,"deg) ").concat(o)),o.length>0&&(r.originalTransform=o,e.style.transform=o),this._textDivProperties.set(e,r),t.appendChild(e)}},_render:function(e){var t=this,r=(0,i.createPromiseCapability)(),n=Object.create(null),a=document.createElement("canvas");if(a.mozOpaque=!0,this._layoutTextCtx=a.getContext("2d",{alpha:!1}),this._textContent){var s=this._textContent.items,u=this._textContent.styles;this._processItems(s,u),r.resolve()}else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');this._reader=this._textContentStream.getReader(),function e(){t._reader.read().then(function(i){var a=i.value;i.done?r.resolve():(Object.assign(n,a.styles),t._processItems(a.items,n),e())},r.reject)}()}r.promise.then(function(){n=null,e?t._renderTimer=setTimeout(function(){o(t),t._renderTimer=null},e):o(t)},this._capability.reject)},expandTextDivs:function(e){if(this._enhanceTextSelection&&this._renderingDone){null!==this._bounds&&(s(this),this._bounds=null);for(var t=0,r=this._textDivs.length;t<r;t++){var n=this._textDivs[t],i=this._textDivProperties.get(n);if(!i.isWhitespace)if(e){var a="",o="";1!==i.scale&&(a="scaleX("+i.scale+")"),0!==i.angle&&(a="rotate("+i.angle+"deg) "+a),0!==i.paddingLeft&&(o+=" padding-left: "+i.paddingLeft/i.scale+"px;",a+=" translateX("+-i.paddingLeft/i.scale+"px)"),0!==i.paddingTop&&(o+=" padding-top: "+i.paddingTop+"px;",a+=" translateY("+-i.paddingTop+"px)"),0!==i.paddingRight&&(o+=" padding-right: "+i.paddingRight/i.scale+"px;"),0!==i.paddingBottom&&(o+=" padding-bottom: "+i.paddingBottom+"px;"),""!==o&&n.setAttribute("style",i.style+o),""!==a&&(n.style.transform=a)}else n.style.padding=0,n.style.transform=i.originalTransform||""}}}},function(e){var t=new l({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}}();t.renderTextLayer=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationLayer=void 0;var n=r(151),i=r(1);function a(e,t,r){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?u(e):t}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),e}var v=function(){function e(){d(this,e)}return p(e,null,[{key:"create",value:function(e){switch(e.data.annotationType){case i.AnnotationType.LINK:return new g(e);case i.AnnotationType.TEXT:return new y(e);case i.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new _(e);case"Btn":return e.data.radioButton?new S(e):e.data.checkBox?new A(e):new w(e);case"Ch":return new k(e)}return new b(e);case i.AnnotationType.POPUP:return new x(e);case i.AnnotationType.FREETEXT:return new C(e);case i.AnnotationType.LINE:return new R(e);case i.AnnotationType.SQUARE:return new T(e);case i.AnnotationType.CIRCLE:return new E(e);case i.AnnotationType.POLYLINE:return new O(e);case i.AnnotationType.CARET:return new I(e);case i.AnnotationType.INK:return new L(e);case i.AnnotationType.POLYGON:return new F(e);case i.AnnotationType.HIGHLIGHT:return new M(e);case i.AnnotationType.UNDERLINE:return new j(e);case i.AnnotationType.SQUIGGLY:return new D(e);case i.AnnotationType.STRIKEOUT:return new N(e);case i.AnnotationType.STAMP:return new q(e);case i.AnnotationType.FILEATTACHMENT:return new W(e);default:return new m(e)}}}]),e}(),m=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];d(this,e),this.isRenderable=r,this.data=t.data,this.layer=t.layer,this.page=t.page,this.viewport=t.viewport,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderInteractiveForms=t.renderInteractiveForms,this.svgFactory=t.svgFactory,r&&(this.container=this._createContainer(n))}return p(e,[{key:"_createContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.data,r=this.page,n=this.viewport,a=document.createElement("section"),o=t.rect[2]-t.rect[0],s=t.rect[3]-t.rect[1];a.setAttribute("data-annotation-id",t.id);var u=i.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(a.style.transform="matrix("+n.transform.join(",")+")",a.style.transformOrigin=-u[0]+"px "+-u[1]+"px",!e&&t.borderStyle.width>0){a.style.borderWidth=t.borderStyle.width+"px",t.borderStyle.style!==i.AnnotationBorderStyleType.UNDERLINE&&(o-=2*t.borderStyle.width,s-=2*t.borderStyle.width);var l=t.borderStyle.horizontalCornerRadius,c=t.borderStyle.verticalCornerRadius;if(l>0||c>0){var h=l+"px / "+c+"px";a.style.borderRadius=h}switch(t.borderStyle.style){case i.AnnotationBorderStyleType.SOLID:a.style.borderStyle="solid";break;case i.AnnotationBorderStyleType.DASHED:a.style.borderStyle="dashed";break;case i.AnnotationBorderStyleType.BEVELED:(0,i.warn)("Unimplemented border style: beveled");break;case i.AnnotationBorderStyleType.INSET:(0,i.warn)("Unimplemented border style: inset");break;case i.AnnotationBorderStyleType.UNDERLINE:a.style.borderBottomStyle="solid"}t.color?a.style.borderColor=i.Util.makeCssRgb(0|t.color[0],0|t.color[1],0|t.color[2]):a.style.borderWidth=0}return a.style.left=u[0]+"px",a.style.top=u[1]+"px",a.style.width=o+"px",a.style.height=s+"px",a}},{key:"_createPopup",value:function(e,t,r){t||((t=document.createElement("div")).style.height=e.style.height,t.style.width=e.style.width,e.appendChild(t));var n=new P({container:e,trigger:t,color:r.color,title:r.title,modificationDate:r.modificationDate,contents:r.contents,hideWrapper:!0}).render();n.style.left=e.style.width,e.appendChild(n)}},{key:"render",value:function(){(0,i.unreachable)("Abstract method `AnnotationElement.render` called")}}]),e}(),g=function(e){function t(e){d(this,t);var r=!!(e.data.url||e.data.dest||e.data.action);return s(this,l(t).call(this,e,r))}return c(t,m),p(t,[{key:"render",value:function(){this.container.className="linkAnnotation";var e=this.data,t=this.linkService,r=document.createElement("a");return(0,n.addLinkAttributes)(r,{url:e.url,target:e.newWindow?n.LinkTarget.BLANK:t.externalLinkTarget,rel:t.externalLinkRel}),e.url||(e.action?this._bindNamedAction(r,e.action):this._bindLink(r,e.dest)),this.container.appendChild(r),this.container}},{key:"_bindLink",value:function(e,t){var r=this;e.href=this.linkService.getDestinationHash(t),e.onclick=function(){return t&&r.linkService.navigateTo(t),!1},t&&(e.className="internalLink")}},{key:"_bindNamedAction",value:function(e,t){var r=this;e.href=this.linkService.getAnchorUrl(""),e.onclick=function(){return r.linkService.executeNamedAction(t),!1},e.className="internalLink"}}]),t}(),y=function(e){function t(e){d(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return s(this,l(t).call(this,e,r))}return c(t,m),p(t,[{key:"render",value:function(){this.container.className="textAnnotation";var 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}}]),t}(),b=function(e){function t(){return d(this,t),s(this,l(t).apply(this,arguments))}return c(t,m),p(t,[{key:"render",value:function(){return this.container}}]),t}(),_=function(e){function t(e){d(this,t);var r=e.renderInteractiveForms||!e.data.hasAppearance&&!!e.data.fieldValue;return s(this,l(t).call(this,e,r))}return c(t,b),p(t,[{key:"render",value:function(){this.container.className="textWidgetAnnotation";var e=null;if(this.renderInteractiveForms){if(this.data.multiLine?(e=document.createElement("textarea")).textContent=this.data.fieldValue:((e=document.createElement("input")).type="text",e.setAttribute("value",this.data.fieldValue)),e.disabled=this.data.readOnly,null!==this.data.maxLen&&(e.maxLength=this.data.maxLen),this.data.comb){var t=(this.data.rect[2]-this.data.rect[0])/this.data.maxLen;e.classList.add("comb"),e.style.letterSpacing="calc("+t+"px - 1ch)"}}else{(e=document.createElement("div")).textContent=this.data.fieldValue,e.style.verticalAlign="middle",e.style.display="table-cell";var r=null;this.data.fontRefName&&this.page.commonObjs.has(this.data.fontRefName)&&(r=this.page.commonObjs.get(this.data.fontRefName)),this._setTextStyle(e,r)}return null!==this.data.textAlignment&&(e.style.textAlign=["left","center","right"][this.data.textAlignment]),this.container.appendChild(e),this.container}},{key:"_setTextStyle",value:function(e,t){var r=e.style;if(r.fontSize=this.data.fontSize+"px",r.direction=this.data.fontDirection<0?"rtl":"ltr",t){r.fontWeight=t.black?t.bold?"900":"bold":t.bold?"bold":"normal",r.fontStyle=t.italic?"italic":"normal";var n=t.loadedName?'"'+t.loadedName+'", ':"",i=t.fallbackName||"Helvetica, sans-serif";r.fontFamily=n+i}}}]),t}(),A=function(e){function t(e){return d(this,t),s(this,l(t).call(this,e,e.renderInteractiveForms))}return c(t,b),p(t,[{key:"render",value:function(){this.container.className="buttonWidgetAnnotation checkBox";var e=document.createElement("input");return e.disabled=this.data.readOnly,e.type="checkbox",this.data.fieldValue&&"Off"!==this.data.fieldValue&&e.setAttribute("checked",!0),this.container.appendChild(e),this.container}}]),t}(),S=function(e){function t(e){return d(this,t),s(this,l(t).call(this,e,e.renderInteractiveForms))}return c(t,b),p(t,[{key:"render",value:function(){this.container.className="buttonWidgetAnnotation radioButton";var 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}}]),t}(),w=function(e){function t(){return d(this,t),s(this,l(t).apply(this,arguments))}return c(t,g),p(t,[{key:"render",value:function(){var e=a(l(t.prototype),"render",this).call(this);return e.className="buttonWidgetAnnotation pushButton",e}}]),t}(),k=function(e){function t(e){return d(this,t),s(this,l(t).call(this,e,e.renderInteractiveForms))}return c(t,b),p(t,[{key:"render",value:function(){this.container.className="choiceWidgetAnnotation";var e=document.createElement("select");e.disabled=this.data.readOnly,this.data.combo||(e.size=this.data.options.length,this.data.multiSelect&&(e.multiple=!0));for(var t=0,r=this.data.options.length;t<r;t++){var n=this.data.options[t],i=document.createElement("option");i.textContent=n.displayValue,i.value=n.exportValue,this.data.fieldValue.includes(n.displayValue)&&i.setAttribute("selected",!0),e.appendChild(i)}return this.container.appendChild(e),this.container}}]),t}(),x=function(e){function t(e){d(this,t);var r=!(!e.data.title&&!e.data.contents);return s(this,l(t).call(this,e,r))}return c(t,m),p(t,[{key:"render",value:function(){if(this.container.className="popupAnnotation",["Line","Square","Circle","PolyLine","Polygon","Ink"].includes(this.data.parentType))return this.container;var e='[data-annotation-id="'+this.data.parentId+'"]',t=this.layer.querySelector(e);if(!t)return this.container;var r=new P({container:this.container,trigger:t,color:this.data.color,title:this.data.title,modificationDate:this.data.modificationDate,contents:this.data.contents}),n=parseFloat(t.style.left),i=parseFloat(t.style.width);return this.container.style.transformOrigin=-(n+i)+"px -"+t.style.top,this.container.style.left=n+i+"px",this.container.appendChild(r.render()),this.container}}]),t}(),P=function(){function e(t){d(this,e),this.container=t.container,this.trigger=t.trigger,this.color=t.color,this.title=t.title,this.modificationDate=t.modificationDate,this.contents=t.contents,this.hideWrapper=t.hideWrapper||!1,this.pinned=!1}return p(e,[{key:"render",value:function(){var e=document.createElement("div");e.className="popupWrapper",this.hideElement=this.hideWrapper?e:this.container,this.hideElement.setAttribute("hidden",!0);var t=document.createElement("div");t.className="popup";var r=this.color;if(r){var a=.7*(255-r[0])+r[0],o=.7*(255-r[1])+r[1],s=.7*(255-r[2])+r[2];t.style.backgroundColor=i.Util.makeCssRgb(0|a,0|o,0|s)}var u=document.createElement("h1");u.textContent=this.title,t.appendChild(u);var l=n.PDFDateString.toDateObject(this.modificationDate);if(l){var c=document.createElement("span");c.textContent="{{date}}, {{time}}",c.dataset.l10nId="annotation_date_string",c.dataset.l10nArgs=JSON.stringify({date:l.toLocaleDateString(),time:l.toLocaleTimeString()}),t.appendChild(c)}var h=this._formatContents(this.contents);return t.appendChild(h),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)),t.addEventListener("click",this._hide.bind(this,!0)),e.appendChild(t),e}},{key:"_formatContents",value:function(e){for(var t=document.createElement("p"),r=e.split(/(?:\r\n?|\n)/),n=0,i=r.length;n<i;++n){var a=r[n];t.appendChild(document.createTextNode(a)),n<i-1&&t.appendChild(document.createElement("br"))}return t}},{key:"_toggle",value:function(){this.pinned?this._hide(!0):this._show(!0)}},{key:"_show",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(this.pinned=!0),this.hideElement.hasAttribute("hidden")&&(this.hideElement.removeAttribute("hidden"),this.container.style.zIndex+=1)}},{key:"_hide",value:function(){(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.pinned=!1),this.hideElement.hasAttribute("hidden")||this.pinned||(this.hideElement.setAttribute("hidden",!0),this.container.style.zIndex-=1)}}]),e}(),C=function(e){function t(e){d(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return s(this,l(t).call(this,e,r,!0))}return c(t,m),p(t,[{key:"render",value:function(){return this.container.className="freeTextAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),t}(),R=function(e){function t(e){d(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return s(this,l(t).call(this,e,r,!0))}return c(t,m),p(t,[{key:"render",value:function(){this.container.className="lineAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],n=this.svgFactory.create(t,r),i=this.svgFactory.createElement("svg:line");return i.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),i.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),i.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),i.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),i.setAttribute("stroke-width",e.borderStyle.width),i.setAttribute("stroke","transparent"),n.appendChild(i),this.container.append(n),this._createPopup(this.container,i,e),this.container}}]),t}(),T=function(e){function t(e){d(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return s(this,l(t).call(this,e,r,!0))}return c(t,m),p(t,[{key:"render",value:function(){this.container.className="squareAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],n=this.svgFactory.create(t,r),i=e.borderStyle.width,a=this.svgFactory.createElement("svg:rect");return a.setAttribute("x",i/2),a.setAttribute("y",i/2),a.setAttribute("width",t-i),a.setAttribute("height",r-i),a.setAttribute("stroke-width",i),a.setAttribute("stroke","transparent"),a.setAttribute("fill","none"),n.appendChild(a),this.container.append(n),this._createPopup(this.container,a,e),this.container}}]),t}(),E=function(e){function t(e){d(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return s(this,l(t).call(this,e,r,!0))}return c(t,m),p(t,[{key:"render",value:function(){this.container.className="circleAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],n=this.svgFactory.create(t,r),i=e.borderStyle.width,a=this.svgFactory.createElement("svg:ellipse");return a.setAttribute("cx",t/2),a.setAttribute("cy",r/2),a.setAttribute("rx",t/2-i/2),a.setAttribute("ry",r/2-i/2),a.setAttribute("stroke-width",i),a.setAttribute("stroke","transparent"),a.setAttribute("fill","none"),n.appendChild(a),this.container.append(n),this._createPopup(this.container,a,e),this.container}}]),t}(),O=function(e){function t(e){var r;d(this,t);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return(r=s(this,l(t).call(this,e,n,!0))).containerClassName="polylineAnnotation",r.svgElementName="svg:polyline",r}return c(t,m),p(t,[{key:"render",value:function(){this.container.className=this.containerClassName;for(var e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],n=this.svgFactory.create(t,r),i=e.vertices,a=[],o=0,s=i.length;o<s;o++){var u=i[o].x-e.rect[0],l=e.rect[3]-i[o].y;a.push(u+","+l)}a=a.join(" ");var c=e.borderStyle.width,h=this.svgFactory.createElement(this.svgElementName);return h.setAttribute("points",a),h.setAttribute("stroke-width",c),h.setAttribute("stroke","transparent"),h.setAttribute("fill","none"),n.appendChild(h),this.container.append(n),this._createPopup(this.container,h,e),this.container}}]),t}(),F=function(e){function t(e){var r;return d(this,t),(r=s(this,l(t).call(this,e))).containerClassName="polygonAnnotation",r.svgElementName="svg:polygon",r}return c(t,O),t}(),I=function(e){function t(e){d(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return s(this,l(t).call(this,e,r,!0))}return c(t,m),p(t,[{key:"render",value:function(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),t}(),L=function(e){function t(e){var r;d(this,t);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return(r=s(this,l(t).call(this,e,n,!0))).containerClassName="inkAnnotation",r.svgElementName="svg:polyline",r}return c(t,m),p(t,[{key:"render",value:function(){this.container.className=this.containerClassName;for(var e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],n=this.svgFactory.create(t,r),i=e.inkLists,a=0,o=i.length;a<o;a++){for(var s=i[a],u=[],l=0,c=s.length;l<c;l++){var h=s[l].x-e.rect[0],d=e.rect[3]-s[l].y;u.push(h+","+d)}u=u.join(" ");var f=e.borderStyle.width,p=this.svgFactory.createElement(this.svgElementName);p.setAttribute("points",u),p.setAttribute("stroke-width",f),p.setAttribute("stroke","transparent"),p.setAttribute("fill","none"),this._createPopup(this.container,p,e),n.appendChild(p)}return this.container.append(n),this.container}}]),t}(),M=function(e){function t(e){d(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return s(this,l(t).call(this,e,r,!0))}return c(t,m),p(t,[{key:"render",value:function(){return this.container.className="highlightAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),t}(),j=function(e){function t(e){d(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return s(this,l(t).call(this,e,r,!0))}return c(t,m),p(t,[{key:"render",value:function(){return this.container.className="underlineAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),t}(),D=function(e){function t(e){d(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return s(this,l(t).call(this,e,r,!0))}return c(t,m),p(t,[{key:"render",value:function(){return this.container.className="squigglyAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),t}(),N=function(e){function t(e){d(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return s(this,l(t).call(this,e,r,!0))}return c(t,m),p(t,[{key:"render",value:function(){return this.container.className="strikeoutAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),t}(),q=function(e){function t(e){d(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return s(this,l(t).call(this,e,r,!0))}return c(t,m),p(t,[{key:"render",value:function(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),t}(),W=function(e){function t(e){var r;d(this,t);var a=(r=s(this,l(t).call(this,e,!0))).data.file,o=a.filename,c=a.content;return r.filename=(0,n.getFilenameFromUrl)(o),r.content=c,r.linkService.eventBus&&r.linkService.eventBus.dispatch("fileattachmentannotation",{source:u(r),id:(0,i.stringToPDFString)(o),filename:o,content:c}),r}return c(t,m),p(t,[{key:"render",value:function(){this.container.className="fileAttachmentAnnotation";var 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}},{key:"_download",value:function(){this.downloadManager?this.downloadManager.downloadData(this.content,this.filename,""):(0,i.warn)("Download cannot be started due to unavailable download manager")}}]),t}(),U=function(){function e(){d(this,e)}return p(e,null,[{key:"render",value:function(e){for(var t=0,r=e.annotations.length;t<r;t++){var i=e.annotations[t];if(i){var a=v.create({data:i,layer:e.div,page:e.page,viewport:e.viewport,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderInteractiveForms:e.renderInteractiveForms||!1,svgFactory:new n.DOMSVGFactory});a.isRenderable&&e.div.appendChild(a.render())}}}},{key:"update",value:function(e){for(var t=0,r=e.annotations.length;t<r;t++){var n=e.annotations[t],i=e.div.querySelector('[data-annotation-id="'+n.id+'"]');i&&(i.style.transform="matrix("+e.viewport.transform.join(",")+")")}e.div.removeAttribute("hidden")}}]),e}();t.AnnotationLayer=U},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var n,i=r(1),a=r(151),o=(n=r(4))&&n.__esModule?n:{default:n};function s(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),e}var d=function(){throw new Error("Not implemented: SVGGraphics")};t.SVGGraphics=d;var f=function(e){if(Number.isInteger(e))return e.toString();var t=e.toFixed(10),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)},p=function(e){if(0===e[4]&&0===e[5]){if(0===e[1]&&0===e[2])return 1===e[0]&&1===e[3]?"":"scale(".concat(f(e[0])," ").concat(f(e[3]),")");if(e[0]===e[3]&&e[1]===-e[2]){var t=180*Math.acos(e[0])/Math.PI;return"rotate(".concat(f(t),")")}}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return"translate(".concat(f(e[4])," ").concat(f(e[5]),")");return"matrix(".concat(f(e[0])," ").concat(f(e[1])," ").concat(f(e[2])," ").concat(f(e[3])," ").concat(f(e[4])," ")+"".concat(f(e[5]),")")},v={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},m="http://www.w3.org/1999/xlink",g=["butt","round","square"],y=["miter","round","bevel"],b=function(){for(var e=new Uint8Array([137,80,78,71,13,10,26,10]),t=12,r=new Int32Array(256),n=0;n<256;n++){for(var a=n,s=0;s<8;s++)a=1&a?3988292384^a>>1&2147483647:a>>1&2147483647;r[n]=a}function u(e,t,n,i){var a=i,o=t.length;n[a]=o>>24&255,n[a+1]=o>>16&255,n[a+2]=o>>8&255,n[a+3]=255&o,n[a+=4]=255&e.charCodeAt(0),n[a+1]=255&e.charCodeAt(1),n[a+2]=255&e.charCodeAt(2),n[a+3]=255&e.charCodeAt(3),a+=4,n.set(t,a);var s=function(e,t,n){for(var i=-1,a=t;a<n;a++){var o=255&(i^e[a]);i=i>>>8^r[o]}return-1^i}(n,i+4,a+=t.length);n[a]=s>>24&255,n[a+1]=s>>16&255,n[a+2]=s>>8&255,n[a+3]=255&s}function l(e){var t=e.length,r=Math.ceil(t/65535),n=new Uint8Array(2+t+5*r+4),i=0;n[i++]=120,n[i++]=156;for(var a=0;t>65535;)n[i++]=0,n[i++]=255,n[i++]=255,n[i++]=0,n[i++]=0,n.set(e.subarray(a,a+65535),i),i+=65535,a+=65535,t-=65535;n[i++]=1,n[i++]=255&t,n[i++]=t>>8&255,n[i++]=255&~t,n[i++]=(65535&~t)>>8&255,n.set(e.subarray(a),i),i+=e.length-a;var o=function(e,t,r){for(var n=1,i=0,a=t;a<r;++a)i=(i+(n=(n+(255&e[a]))%65521))%65521;return i<<16|n}(e,0,e.length);return n[i++]=o>>24&255,n[i++]=o>>16&255,n[i++]=o>>8&255,n[i++]=255&o,n}function c(r,n,a,s){var c,h,d,f=r.width,p=r.height,v=r.data;switch(n){case i.ImageKind.GRAYSCALE_1BPP:h=0,c=1,d=f+7>>3;break;case i.ImageKind.RGB_24BPP:h=2,c=8,d=3*f;break;case i.ImageKind.RGBA_32BPP:h=6,c=8,d=4*f;break;default:throw new Error("invalid format")}for(var m=new Uint8Array((1+d)*p),g=0,y=0,b=0;b<p;++b)m[g++]=0,m.set(v.subarray(y,y+d),g),y+=d,g+=d;if(n===i.ImageKind.GRAYSCALE_1BPP&&s){g=0;for(var _=0;_<p;_++){g++;for(var A=0;A<d;A++)m[g++]^=255}}var S=new Uint8Array([f>>24&255,f>>16&255,f>>8&255,255&f,p>>24&255,p>>16&255,p>>8&255,255&p,c,h,0,0,0]),w=function(e){if(!(0,o.default)())return l(e);try{var t;t=parseInt(process.versions.node)>=8?e:new Buffer(e);var r=require("zlib").deflateSync(t,{level:9});return r instanceof Uint8Array?r:new Uint8Array(r)}catch(e){(0,i.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+e)}return l(e)}(m),k=e.length+3*t+S.length+w.length,x=new Uint8Array(k),P=0;return x.set(e,P),u("IHDR",S,x,P+=e.length),u("IDATA",w,x,P+=t+S.length),P+=t+w.length,u("IEND",new Uint8Array(0),x,P),(0,i.createObjectURL)(x,"image/png",a)}return function(e,t,r){return c(e,void 0===e.kind?i.ImageKind.GRAYSCALE_1BPP:e.kind,t,r)}}(),_=function(){function e(){l(this,e),this.fontSizeScale=1,this.fontWeight=v.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=v.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=""}return h(e,[{key:"clone",value:function(){return Object.create(this)}},{key:"setCurrentPoint",value:function(e,t){this.x=e,this.y=t}}]),e}(),A=0,S=0,w=0;t.SVGGraphics=d=function(){function e(t,r,n){for(var o in l(this,e),this.svgFactory=new a.DOMSVGFactory,this.current=new _,this.transformMatrix=i.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=t,this.objs=r,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!n,this._operatorIdMapping=[],i.OPS)this._operatorIdMapping[i.OPS[o]]=o}return h(e,[{key:"save",value:function(){this.transformStack.push(this.transformMatrix);var e=this.current;this.extraStack.push(e),this.current=e.clone()}},{key:"restore",value:function(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}},{key:"group",value:function(e){this.save(),this.executeOpTree(e),this.restore()}},{key:"loadDependencies",value:function(e){for(var t=this,r=e.fnArray,n=e.argsArray,a=0,o=r.length;a<o;a++)if(r[a]===i.OPS.dependency){var s=!0,u=!1,l=void 0;try{for(var c,h=function(){var e=c.value,r=e.startsWith("g_")?t.commonObjs:t.objs,n=new Promise(function(t){r.get(e,t)});t.current.dependencies.push(n)},d=n[a][Symbol.iterator]();!(s=(c=d.next()).done);s=!0)h()}catch(e){u=!0,l=e}finally{try{s||null==d.return||d.return()}finally{if(u)throw l}}}return Promise.all(this.current.dependencies)}},{key:"transform",value:function(e,t,r,n,a,o){var s=[e,t,r,n,a,o];this.transformMatrix=i.Util.transform(this.transformMatrix,s),this.tgrp=null}},{key:"getSVG",value:function(e,t){var r=this;this.viewport=t;var n=this._initialize(t);return this.loadDependencies(e).then(function(){return r.transformMatrix=i.IDENTITY_MATRIX,r.executeOpTree(r.convertOpList(e)),n})}},{key:"convertOpList",value:function(e){for(var t=this._operatorIdMapping,r=e.argsArray,n=e.fnArray,i=[],a=0,o=n.length;a<o;a++){var s=n[a];i.push({fnId:s,fn:t[s],args:r[a]})}return function(e){var t=[],r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;"save"!==u.fn?"restore"===u.fn?t=r.pop():t.push(u):(t.push({fnId:92,fn:"group",items:[]}),r.push(t),t=t[t.length-1].items)}}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return t}(i)}},{key:"executeOpTree",value:function(e){var t=!0,r=!1,n=void 0;try{for(var a,o=e[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var s=a.value,u=s.fn,l=s.fnId,c=s.args;switch(0|l){case i.OPS.beginText:this.beginText();break;case i.OPS.dependency:break;case i.OPS.setLeading:this.setLeading(c);break;case i.OPS.setLeadingMoveText:this.setLeadingMoveText(c[0],c[1]);break;case i.OPS.setFont:this.setFont(c);break;case i.OPS.showText:case i.OPS.showSpacedText:this.showText(c[0]);break;case i.OPS.endText:this.endText();break;case i.OPS.moveText:this.moveText(c[0],c[1]);break;case i.OPS.setCharSpacing:this.setCharSpacing(c[0]);break;case i.OPS.setWordSpacing:this.setWordSpacing(c[0]);break;case i.OPS.setHScale:this.setHScale(c[0]);break;case i.OPS.setTextMatrix:this.setTextMatrix(c[0],c[1],c[2],c[3],c[4],c[5]);break;case i.OPS.setTextRise:this.setTextRise(c[0]);break;case i.OPS.setTextRenderingMode:this.setTextRenderingMode(c[0]);break;case i.OPS.setLineWidth:this.setLineWidth(c[0]);break;case i.OPS.setLineJoin:this.setLineJoin(c[0]);break;case i.OPS.setLineCap:this.setLineCap(c[0]);break;case i.OPS.setMiterLimit:this.setMiterLimit(c[0]);break;case i.OPS.setFillRGBColor:this.setFillRGBColor(c[0],c[1],c[2]);break;case i.OPS.setStrokeRGBColor:this.setStrokeRGBColor(c[0],c[1],c[2]);break;case i.OPS.setStrokeColorN:this.setStrokeColorN(c);break;case i.OPS.setFillColorN:this.setFillColorN(c);break;case i.OPS.shadingFill:this.shadingFill(c[0]);break;case i.OPS.setDash:this.setDash(c[0],c[1]);break;case i.OPS.setRenderingIntent:this.setRenderingIntent(c[0]);break;case i.OPS.setFlatness:this.setFlatness(c[0]);break;case i.OPS.setGState:this.setGState(c[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.paintJpegXObject:this.paintJpegXObject(c[0],c[1],c[2]);break;case i.OPS.paintImageXObject:this.paintImageXObject(c[0]);break;case i.OPS.paintInlineImageXObject:this.paintInlineImageXObject(c[0]);break;case i.OPS.paintImageMaskXObject:this.paintImageMaskXObject(c[0]);break;case i.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(c[0],c[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(c[0],c[1],c[2],c[3],c[4],c[5]);break;case i.OPS.constructPath:this.constructPath(c[0],c[1]);break;case i.OPS.endPath:this.endPath();break;case 92:this.group(s.items);break;default:(0,i.warn)("Unimplemented operator ".concat(u))}}}catch(e){r=!0,n=e}finally{try{t||null==o.return||o.return()}finally{if(r)throw n}}}},{key:"setWordSpacing",value:function(e){this.current.wordSpacing=e}},{key:"setCharSpacing",value:function(e){this.current.charSpacing=e}},{key:"nextLine",value:function(){this.moveText(0,this.current.leading)}},{key:"setTextMatrix",value:function(e,t,r,n,i,a){var o=this.current;o.textMatrix=o.lineMatrix=[e,t,r,n,i,a],o.textMatrixScale=Math.sqrt(e*e+t*t),o.x=o.lineX=0,o.y=o.lineY=0,o.xcoords=[],o.tspan=this.svgFactory.createElement("svg:tspan"),o.tspan.setAttributeNS(null,"font-family",o.fontFamily),o.tspan.setAttributeNS(null,"font-size","".concat(f(o.fontSize),"px")),o.tspan.setAttributeNS(null,"y",f(-o.y)),o.txtElement=this.svgFactory.createElement("svg:text"),o.txtElement.appendChild(o.tspan)}},{key:"beginText",value:function(){var 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=[]}},{key:"moveText",value:function(e,t){var r=this.current;r.x=r.lineX+=e,r.y=r.lineY+=t,r.xcoords=[],r.tspan=this.svgFactory.createElement("svg:tspan"),r.tspan.setAttributeNS(null,"font-family",r.fontFamily),r.tspan.setAttributeNS(null,"font-size","".concat(f(r.fontSize),"px")),r.tspan.setAttributeNS(null,"y",f(-r.y))}},{key:"showText",value:function(e){var t=this.current,r=t.font,n=t.fontSize;if(0!==n){var a=t.charSpacing,o=t.wordSpacing,s=t.fontDirection,u=t.textHScale*s,l=r.vertical,c=n*t.fontMatrix[0],h=0,d=!0,m=!1,g=void 0;try{for(var y,b=e[Symbol.iterator]();!(d=(y=b.next()).done);d=!0){var _=y.value;if(null!==_)if((0,i.isNum)(_))h+=-_*n*.001;else{var A=_.width,S=_.fontChar,w=A*c+((_.isSpace?o:0)+a)*s;_.isInFont||r.missingFile?(t.xcoords.push(t.x+h*u),t.tspan.textContent+=S,h+=w):h+=w}else h+=s*o}}catch(e){m=!0,g=e}finally{try{d||null==b.return||b.return()}finally{if(m)throw g}}l?t.y-=h*u:t.x+=h*u,t.tspan.setAttributeNS(null,"x",t.xcoords.map(f).join(" ")),t.tspan.setAttributeNS(null,"y",f(-t.y)),t.tspan.setAttributeNS(null,"font-family",t.fontFamily),t.tspan.setAttributeNS(null,"font-size","".concat(f(t.fontSize),"px")),t.fontStyle!==v.fontStyle&&t.tspan.setAttributeNS(null,"font-style",t.fontStyle),t.fontWeight!==v.fontWeight&&t.tspan.setAttributeNS(null,"font-weight",t.fontWeight);var k=t.textRenderingMode&i.TextRenderingMode.FILL_STROKE_MASK;if(k===i.TextRenderingMode.FILL||k===i.TextRenderingMode.FILL_STROKE?(t.fillColor!==v.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"),k===i.TextRenderingMode.STROKE||k===i.TextRenderingMode.FILL_STROKE){var x=1/(t.textMatrixScale||1);this._setStrokeAttributes(t.tspan,x)}var P=t.textMatrix;0!==t.textRise&&((P=P.slice())[5]+=t.textRise),t.txtElement.setAttributeNS(null,"transform","".concat(p(P)," scale(1, -1)")),t.txtElement.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.txtElement.appendChild(t.tspan),t.txtgrp.appendChild(t.txtElement),this._ensureTransformGroup().appendChild(t.txtElement)}}},{key:"setLeadingMoveText",value:function(e,t){this.setLeading(-t),this.moveText(e,t)}},{key:"addFontStyle",value:function(e){this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.appendChild(this.cssStyle));var t=(0,i.createObjectURL)(e.data,e.mimetype,this.forceDataSchema);this.cssStyle.textContent+='@font-face { font-family: "'.concat(e.loadedName,'";')+" src: url(".concat(t,"); }\n")}},{key:"setFont",value:function(e){var t=this.current,r=this.commonObjs.get(e[0]),n=e[1];t.font=r,this.embedFonts&&r.data&&!this.embeddedFonts[r.loadedName]&&(this.addFontStyle(r),this.embeddedFonts[r.loadedName]=r),t.fontMatrix=r.fontMatrix?r.fontMatrix:i.FONT_IDENTITY_MATRIX;var a=r.black?r.bold?"bolder":"bold":r.bold?"bold":"normal",o=r.italic?"italic":"normal";n<0?(n=-n,t.fontDirection=-1):t.fontDirection=1,t.fontSize=n,t.fontFamily=r.loadedName,t.fontWeight=a,t.fontStyle=o,t.tspan=this.svgFactory.createElement("svg:tspan"),t.tspan.setAttributeNS(null,"y",f(-t.y)),t.xcoords=[]}},{key:"endText",value:function(){var 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())}},{key:"setLineWidth",value:function(e){e>0&&(this.current.lineWidth=e)}},{key:"setLineCap",value:function(e){this.current.lineCap=g[e]}},{key:"setLineJoin",value:function(e){this.current.lineJoin=y[e]}},{key:"setMiterLimit",value:function(e){this.current.miterLimit=e}},{key:"setStrokeAlpha",value:function(e){this.current.strokeAlpha=e}},{key:"setStrokeRGBColor",value:function(e,t,r){this.current.strokeColor=i.Util.makeCssRgb(e,t,r)}},{key:"setFillAlpha",value:function(e){this.current.fillAlpha=e}},{key:"setFillRGBColor",value:function(e,t,r){this.current.fillColor=i.Util.makeCssRgb(e,t,r),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[]}},{key:"setStrokeColorN",value:function(e){this.current.strokeColor=this._makeColorN_Pattern(e)}},{key:"setFillColorN",value:function(e){this.current.fillColor=this._makeColorN_Pattern(e)}},{key:"shadingFill",value:function(e){var t=this.viewport.width,r=this.viewport.height,n=i.Util.inverseTransform(this.transformMatrix),a=i.Util.applyTransform([0,0],n),o=i.Util.applyTransform([0,r],n),s=i.Util.applyTransform([t,0],n),u=i.Util.applyTransform([t,r],n),l=Math.min(a[0],o[0],s[0],u[0]),c=Math.min(a[1],o[1],s[1],u[1]),h=Math.max(a[0],o[0],s[0],u[0]),d=Math.max(a[1],o[1],s[1],u[1]),f=this.svgFactory.createElement("svg:rect");f.setAttributeNS(null,"x",l),f.setAttributeNS(null,"y",c),f.setAttributeNS(null,"width",h-l),f.setAttributeNS(null,"height",d-c),f.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this._ensureTransformGroup().appendChild(f)}},{key:"_makeColorN_Pattern",value:function(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}},{key:"_makeTilingPattern",value:function(e){var t=e[1],r=e[2],n=e[3]||i.IDENTITY_MATRIX,a=u(e[4],4),o=a[0],l=a[1],c=a[2],h=a[3],d=e[5],f=e[6],p=e[7],v="shading".concat(w++),m=u(i.Util.applyTransform([o,l],n),2),g=m[0],y=m[1],b=u(i.Util.applyTransform([c,h],n),2),_=b[0],A=b[1],S=u(i.Util.singularValueDecompose2dScale(n),2),k=d*S[0],x=f*S[1],P=this.svgFactory.createElement("svg:pattern");P.setAttributeNS(null,"id",v),P.setAttributeNS(null,"patternUnits","userSpaceOnUse"),P.setAttributeNS(null,"width",k),P.setAttributeNS(null,"height",x),P.setAttributeNS(null,"x","".concat(g)),P.setAttributeNS(null,"y","".concat(y));var C=this.svg,R=this.transformMatrix,T=this.current.fillColor,E=this.current.strokeColor,O=this.svgFactory.create(_-g,A-y);if(this.svg=O,this.transformMatrix=n,2===p){var F=i.Util.makeCssRgb.apply(i.Util,s(t));this.current.fillColor=F,this.current.strokeColor=F}return this.executeOpTree(this.convertOpList(r)),this.svg=C,this.transformMatrix=R,this.current.fillColor=T,this.current.strokeColor=E,P.appendChild(O.childNodes[0]),this.defs.appendChild(P),"url(#".concat(v,")")}},{key:"_makeShadingPattern",value:function(e){switch(e[0]){case"RadialAxial":var t,r="shading".concat(w++),n=e[2];switch(e[1]){case"axial":var a=e[3],o=e[4];(t=this.svgFactory.createElement("svg:linearGradient")).setAttributeNS(null,"id",r),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"x1",a[0]),t.setAttributeNS(null,"y1",a[1]),t.setAttributeNS(null,"x2",o[0]),t.setAttributeNS(null,"y2",o[1]);break;case"radial":var s=e[3],u=e[4],l=e[5],c=e[6];(t=this.svgFactory.createElement("svg:radialGradient")).setAttributeNS(null,"id",r),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"cx",u[0]),t.setAttributeNS(null,"cy",u[1]),t.setAttributeNS(null,"r",c),t.setAttributeNS(null,"fx",s[0]),t.setAttributeNS(null,"fy",s[1]),t.setAttributeNS(null,"fr",l);break;default:throw new Error("Unknown RadialAxial type: ".concat(e[1]))}var h=!0,d=!1,f=void 0;try{for(var p,v=n[Symbol.iterator]();!(h=(p=v.next()).done);h=!0){var m=p.value,g=this.svgFactory.createElement("svg:stop");g.setAttributeNS(null,"offset",m[0]),g.setAttributeNS(null,"stop-color",m[1]),t.appendChild(g)}}catch(e){d=!0,f=e}finally{try{h||null==v.return||v.return()}finally{if(d)throw f}}return this.defs.appendChild(t),"url(#".concat(r,")");case"Mesh":return(0,i.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: ".concat(e[0]))}}},{key:"setDash",value:function(e,t){this.current.dashArray=e,this.current.dashPhase=t}},{key:"constructPath",value:function(e,t){var r=this.current,n=r.x,a=r.y,o=[],s=0,u=!0,l=!1,c=void 0;try{for(var h,d=e[Symbol.iterator]();!(u=(h=d.next()).done);u=!0){switch(0|h.value){case i.OPS.rectangle:n=t[s++],a=t[s++];var p=t[s++],v=t[s++],m=n+p,g=a+v;o.push("M",f(n),f(a),"L",f(m),f(a),"L",f(m),f(g),"L",f(n),f(g),"Z");break;case i.OPS.moveTo:n=t[s++],a=t[s++],o.push("M",f(n),f(a));break;case i.OPS.lineTo:n=t[s++],a=t[s++],o.push("L",f(n),f(a));break;case i.OPS.curveTo:n=t[s+4],a=t[s+5],o.push("C",f(t[s]),f(t[s+1]),f(t[s+2]),f(t[s+3]),f(n),f(a)),s+=6;break;case i.OPS.curveTo2:n=t[s+2],a=t[s+3],o.push("C",f(n),f(a),f(t[s]),f(t[s+1]),f(t[s+2]),f(t[s+3])),s+=4;break;case i.OPS.curveTo3:n=t[s+2],a=t[s+3],o.push("C",f(t[s]),f(t[s+1]),f(n),f(a),f(n),f(a)),s+=4;break;case i.OPS.closePath:o.push("Z")}}}catch(e){l=!0,c=e}finally{try{u||null==d.return||d.return()}finally{if(l)throw c}}o=o.join(" "),r.path&&e.length>0&&e[0]!==i.OPS.rectangle&&e[0]!==i.OPS.moveTo?o=r.path.getAttributeNS(null,"d")+o:(r.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().appendChild(r.path)),r.path.setAttributeNS(null,"d",o),r.path.setAttributeNS(null,"fill","none"),r.element=r.path,r.setCurrentPoint(n,a)}},{key:"endPath",value:function(){var e=this.current;if(e.path=null,this.pendingClip)if(e.element){var t="clippath".concat(A++),r=this.svgFactory.createElement("svg:clipPath");r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"transform",p(this.transformMatrix));var n=e.element.cloneNode(!0);"evenodd"===this.pendingClip?n.setAttributeNS(null,"clip-rule","evenodd"):n.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,r.appendChild(n),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(#".concat(t,")"),this.tgrp=null}else this.pendingClip=null}},{key:"clip",value:function(e){this.pendingClip=e}},{key:"closePath",value:function(){var e=this.current;if(e.path){var t="".concat(e.path.getAttributeNS(null,"d"),"Z");e.path.setAttributeNS(null,"d",t)}}},{key:"setLeading",value:function(e){this.current.leading=-e}},{key:"setTextRise",value:function(e){this.current.textRise=e}},{key:"setTextRenderingMode",value:function(e){this.current.textRenderingMode=e}},{key:"setHScale",value:function(e){this.current.textHScale=e/100}},{key:"setRenderingIntent",value:function(e){}},{key:"setFlatness",value:function(e){}},{key:"setGState",value:function(e){var t=!0,r=!1,n=void 0;try{for(var a,o=e[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var s=u(a.value,2),l=s[0],c=s[1];switch(l){case"LW":this.setLineWidth(c);break;case"LC":this.setLineCap(c);break;case"LJ":this.setLineJoin(c);break;case"ML":this.setMiterLimit(c);break;case"D":this.setDash(c[0],c[1]);break;case"RI":this.setRenderingIntent(c);break;case"FL":this.setFlatness(c);break;case"Font":this.setFont(c);break;case"CA":this.setStrokeAlpha(c);break;case"ca":this.setFillAlpha(c);break;default:(0,i.warn)("Unimplemented graphic state operator ".concat(l))}}}catch(e){r=!0,n=e}finally{try{t||null==o.return||o.return()}finally{if(r)throw n}}}},{key:"fill",value:function(){var e=this.current;e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}},{key:"stroke",value:function(){var e=this.current;e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}},{key:"_setStrokeAttributes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=this.current,n=r.dashArray;1!==t&&n.length>0&&(n=n.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",n.map(f).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",f(t*r.dashPhase)+"px")}},{key:"eoFill",value:function(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}},{key:"fillStroke",value:function(){this.stroke(),this.fill()}},{key:"eoFillStroke",value:function(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}},{key:"closeStroke",value:function(){this.closePath(),this.stroke()}},{key:"closeFillStroke",value:function(){this.closePath(),this.fillStroke()}},{key:"closeEOFillStroke",value:function(){this.closePath(),this.eoFillStroke()}},{key:"paintSolidColorImageMask",value:function(){var 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)}},{key:"paintJpegXObject",value:function(e,t,r){var n=this.objs.get(e),i=this.svgFactory.createElement("svg:image");i.setAttributeNS(m,"xlink:href",n.src),i.setAttributeNS(null,"width",f(t)),i.setAttributeNS(null,"height",f(r)),i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y",f(-r)),i.setAttributeNS(null,"transform","scale(".concat(f(1/t)," ").concat(f(-1/r),")")),this._ensureTransformGroup().appendChild(i)}},{key:"paintImageXObject",value:function(e){var t=this.objs.get(e);t?this.paintInlineImageXObject(t):(0,i.warn)("Dependent image with object ID ".concat(e," is not ready yet"))}},{key:"paintInlineImageXObject",value:function(e,t){var r=e.width,n=e.height,i=b(e,this.forceDataSchema,!!t),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(n)),this.current.element=a,this.clip("nonzero");var o=this.svgFactory.createElement("svg:image");o.setAttributeNS(m,"xlink:href",i),o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y",f(-n)),o.setAttributeNS(null,"width",f(r)+"px"),o.setAttributeNS(null,"height",f(n)+"px"),o.setAttributeNS(null,"transform","scale(".concat(f(1/r)," ").concat(f(-1/n),")")),t?t.appendChild(o):this._ensureTransformGroup().appendChild(o)}},{key:"paintImageMaskXObject",value:function(e){var t=this.current,r=e.width,n=e.height,i=t.fillColor;t.maskId="mask".concat(S++);var a=this.svgFactory.createElement("svg:mask");a.setAttributeNS(null,"id",t.maskId);var o=this.svgFactory.createElement("svg:rect");o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y","0"),o.setAttributeNS(null,"width",f(r)),o.setAttributeNS(null,"height",f(n)),o.setAttributeNS(null,"fill",i),o.setAttributeNS(null,"mask","url(#".concat(t.maskId,")")),this.defs.appendChild(a),this._ensureTransformGroup().appendChild(o),this.paintInlineImageXObject(e,a)}},{key:"paintFormXObjectBegin",value:function(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){var r=t[2]-t[0],n=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(r)),i.setAttributeNS(null,"height",f(n)),this.current.element=i,this.clip("nonzero"),this.endPath()}}},{key:"paintFormXObjectEnd",value:function(){}},{key:"_initialize",value:function(e){var t=this.svgFactory.create(e.width,e.height),r=this.svgFactory.createElement("svg:defs");t.appendChild(r),this.defs=r;var n=this.svgFactory.createElement("svg:g");return n.setAttributeNS(null,"transform",p(e.transform)),t.appendChild(n),this.svg=n,t}},{key:"_ensureClipGroup",value:function(){if(!this.current.clipGroup){var 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}},{key:"_ensureTransformGroup",value:function(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",p(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var n,i=(n=r(148))&&n.__esModule?n:{default:n},a=r(1),o=r(166);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(e){d(a,n,i,o,s,"next",e)}function s(e){d(a,n,i,o,s,"throw",e)}o(void 0)})}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function m(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),e}var g=require("fs"),y=require("http"),b=require("https"),_=require("url"),A=/^file:\/\/\/[a-zA-Z]:\//;var S=function(){function e(t){var r,n;p(this,e),this.source=t,this.url=(r=t.url,"file:"===(n=_.parse(r)).protocol||n.host?n:/^[a-z]:[\/\\]/i.test(r)?_.parse("file:///".concat(r)):(n.host||(n.protocol="file:"),n)),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}return m(e,[{key:"getFullReader",value:function(){return(0,a.assert)(!this._fullRequestReader),this._fullRequestReader=this.isFsUrl?new R(this):new P(this),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=this.isFsUrl?new T(this,e,t):new C(this,e,t);return this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach(function(t){t.cancel(e)})}},{key:"_progressiveDataLength",get:function(){return this._fullRequestReader?this._fullRequestReader._loaded:0}}]),e}();t.PDFNodeStream=S;var w=function(){function e(t){p(this,e),this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;var r=t.source;this._contentLength=r.length,this._loaded=0,this._filename=null,this._disableRange=r.disableRange||!1,this._rangeChunkSize=r.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!r.disableStream,this._isRangeSupported=!r.disableRange,this._readableStream=null,this._readCapability=(0,a.createPromiseCapability)(),this._headersCapability=(0,a.createPromiseCapability)()}return m(e,[{key:"read",value:function(){var e=f(i.default.mark(function e(){var t,r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:if(!this._done){e.next=4;break}return e.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){e.next=6;break}throw this._storedError;case 6:if(null!==(t=this._readableStream.read())){e.next=10;break}return this._readCapability=(0,a.createPromiseCapability)(),e.abrupt("return",this.read());case 10:return this._loaded+=t.length,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),r=new Uint8Array(t).buffer,e.abrupt("return",{value:r,done:!1});case 14:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}},{key:"_error",value:function(e){this._storedError=e,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(e){var t=this;this._readableStream=e,e.on("readable",function(){t._readCapability.resolve()}),e.on("end",function(){e.destroy(),t._done=!0,t._readCapability.resolve()}),e.on("error",function(e){t._error(e)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new a.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}},{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}}]),e}(),k=function(){function e(t){p(this,e),this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,a.createPromiseCapability)();var r=t.source;this._isStreamingSupported=!r.disableStream}return m(e,[{key:"read",value:function(){var e=f(i.default.mark(function e(){var t,r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:if(!this._done){e.next=4;break}return e.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){e.next=6;break}throw this._storedError;case 6:if(null!==(t=this._readableStream.read())){e.next=10;break}return this._readCapability=(0,a.createPromiseCapability)(),e.abrupt("return",this.read());case 10:return this._loaded+=t.length,this.onProgress&&this.onProgress({loaded:this._loaded}),r=new Uint8Array(t).buffer,e.abrupt("return",{value:r,done:!1});case 14:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}},{key:"_error",value:function(e){this._storedError=e,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(e){var t=this;this._readableStream=e,e.on("readable",function(){t._readCapability.resolve()}),e.on("end",function(){e.destroy(),t._done=!0,t._readCapability.resolve()}),e.on("error",function(e){t._error(e)}),this._storedError&&this._readableStream.destroy(this._storedError)}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}}]),e}();function x(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}var P=function(e){function t(e){var r;p(this,t);var n=function(t){if(404===t.statusCode){var n=new a.MissingPDFException('Missing PDF "'.concat(r._url,'".'));return r._storedError=n,void r._headersCapability.reject(n)}r._headersCapability.resolve(),r._setReadableStream(t);var i=function(e){return r._readableStream.headers[e.toLowerCase()]},s=(0,o.validateRangeRequestCapabilities)({getResponseHeader:i,isHttp:e.isHttp,rangeChunkSize:r._rangeChunkSize,disableRange:r._disableRange}),u=s.allowRangeRequests,l=s.suggestedLength;r._isRangeSupported=u,r._contentLength=l||r._contentLength,r._filename=(0,o.extractFilenameFromHeader)(i)};return(r=u(this,l(t).call(this,e)))._request=null,"http:"===r._url.protocol?r._request=y.request(x(r._url,e.httpHeaders),n):r._request=b.request(x(r._url,e.httpHeaders),n),r._request.on("error",function(e){r._storedError=e,r._headersCapability.reject(e)}),r._request.end(),r}return c(t,w),t}(),C=function(e){function t(e,r,n){var i;for(var o in p(this,t),(i=u(this,l(t).call(this,e)))._httpHeaders={},e.httpHeaders){var s=e.httpHeaders[o];void 0!==s&&(i._httpHeaders[o]=s)}i._httpHeaders.Range="bytes=".concat(r,"-").concat(n-1);var c=function(e){if(404!==e.statusCode)i._setReadableStream(e);else{var t=new a.MissingPDFException('Missing PDF "'.concat(i._url,'".'));i._storedError=t}};return i._request=null,"http:"===i._url.protocol?i._request=y.request(x(i._url,i._httpHeaders),c):i._request=b.request(x(i._url,i._httpHeaders),c),i._request.on("error",function(e){i._storedError=e}),i._request.end(),i}return c(t,k),t}(),R=function(e){function t(e){var r;p(this,t),r=u(this,l(t).call(this,e));var n=decodeURIComponent(r._url.path);return A.test(r._url.href)&&(n=n.replace(/^\//,"")),g.lstat(n,function(e,t){if(e)return"ENOENT"===e.code&&(e=new a.MissingPDFException('Missing PDF "'.concat(n,'".'))),r._storedError=e,void r._headersCapability.reject(e);r._contentLength=t.size,r._setReadableStream(g.createReadStream(n)),r._headersCapability.resolve()}),r}return c(t,w),t}(),T=function(e){function t(e,r,n){var i;p(this,t),i=u(this,l(t).call(this,e));var a=decodeURIComponent(i._url.path);return A.test(i._url.href)&&(a=a.replace(/^\//,"")),i._setReadableStream(g.createReadStream(a,{start:r,end:n-1})),i}return c(t,k),t}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createResponseStatusError=function(e,t){if(404===e||0===e&&/^file:/.test(t))return new n.MissingPDFException('Missing PDF "'+t+'".');return new n.UnexpectedResponseException("Unexpected server response ("+e+') while retrieving PDF "'+t+'".',e)},t.extractFilenameFromHeader=function(e){var t=e("Content-Disposition");if(t){var r=(0,i.getFilenameFromContentDispositionHeader)(t);if(/\.pdf$/i.test(r))return r}return null},t.validateRangeRequestCapabilities=function(e){var t=e.getResponseHeader,r=e.isHttp,i=e.rangeChunkSize,a=e.disableRange;(0,n.assert)(i>0,"Range chunk size must be larger than zero");var o={allowRangeRequests:!1,suggestedLength:void 0},s=parseInt(t("Content-Length"),10);if(!Number.isInteger(s))return o;if(o.suggestedLength=s,s<=2*i)return o;if(a||!r)return o;if("bytes"!==t("Accept-Ranges"))return o;if("identity"!==(t("Content-Encoding")||"identity"))return o;return o.allowRangeRequests=!0,o},t.validateResponseStatus=function(e){return 200===e||206===e};var n=r(1),i=r(167)},function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=function(e){var t=!0,r=s("filename\\*","i").exec(e);if(r){var i=c(r=r[1]);return l(i=d(i=h(i=unescape(i))))}if(r=function(e){for(var t,r=[],i=s("filename\\*((?!0\\d)\\d+)(\\*?)","ig");null!==(t=i.exec(e));){var a=t,o=n(a,4),u=o[1],l=o[2],d=o[3];if((u=parseInt(u,10))in r){if(0===u)break}else r[u]=[l,d]}for(var f=[],u=0;u<r.length&&u in r;++u){var p=n(r[u],2),l=p[0],d=p[1];d=c(d),l&&(d=unescape(d),0===u&&(d=h(d))),f.push(d)}return f.join("")}(e)){var a=d(r);return l(a)}if(r=s("filename","i").exec(e)){var o=c(r=r[1]);return l(o=d(o))}function s(e,t){return new RegExp("(?:^|;)\\s*"+e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',t)}function u(e,r){if(e){if(!/^[\x00-\xFF]+$/.test(r))return r;try{var n=new TextDecoder(e,{fatal:!0}),i=Array.from(r,function(e){return 255&e.charCodeAt(0)});r=n.decode(new Uint8Array(i)),t=!1}catch(n){if(/^utf-?8$/i.test(e))try{r=decodeURIComponent(escape(r)),t=!1}catch(e){}}}return r}function l(e){return t&&/[\x80-\xff]/.test(e)&&(e=u("utf-8",e),t&&(e=u("iso-8859-1",e))),e}function c(e){if(e.startsWith('"')){for(var t=e.slice(1).split('\\"'),r=0;r<t.length;++r){var n=t[r].indexOf('"');-1!==n&&(t[r]=t[r].slice(0,n),t.length=r+1),t[r]=t[r].replace(/\\(.)/g,"$1")}e=t.join('"')}return e}function h(e){var t=e.indexOf("'");if(-1===t)return e;var r=e.slice(0,t),n=e.slice(t+1),i=n.replace(/^[^']*'/,"");return u(r,i)}function d(e){return!e.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(e)?e:e.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(e,t,r,n){if("q"===r||"Q"===r)return n=(n=n.replace(/_/g," ")).replace(/=([0-9a-fA-F]{2})/g,function(e,t){return String.fromCharCode(parseInt(t,16))}),u(t,n);try{n=atob(n)}catch(e){}return u(t,n)})}return""}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNetworkStream=void 0;var n,i=(n=r(148))&&n.__esModule?n:{default:n},a=r(1),o=r(166);function s(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function u(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(e){s(a,n,i,o,u,"next",e)}function u(e){s(a,n,i,o,u,"throw",e)}o(void 0)})}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),e}var d=function(){function e(t,r){l(this,e),this.url=t,r=r||{},this.isHttp=/^https?:/i.test(t),this.httpHeaders=this.isHttp&&r.httpHeaders||{},this.withCredentials=r.withCredentials||!1,this.getXhr=r.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}return h(e,[{key:"requestRange",value:function(e,t,r){var n={begin:e,end:t};for(var i in r)n[i]=r[i];return this.request(n)}},{key:"requestFull",value:function(e){return this.request(e)}},{key:"request",value:function(e){var t=this.getXhr(),r=this.currXhrId++,n=this.pendingRequests[r]={xhr:t};for(var i in t.open("GET",this.url),t.withCredentials=this.withCredentials,this.httpHeaders){var a=this.httpHeaders[i];void 0!==a&&t.setRequestHeader(i,a)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range","bytes=".concat(e.begin,"-").concat(e.end-1)),n.expectedStatus=206):n.expectedStatus=200,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),n.onHeadersReceived=e.onHeadersReceived,n.onDone=e.onDone,n.onError=e.onError,n.onProgress=e.onProgress,t.send(null),r}},{key:"onProgress",value:function(e,t){var r=this.pendingRequests[e];r&&r.onProgress&&r.onProgress(t)}},{key:"onStateChange",value:function(e,t){var r=this.pendingRequests[e];if(r){var n=r.xhr;if(n.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),4===n.readyState&&e in this.pendingRequests)if(delete this.pendingRequests[e],0===n.status&&this.isHttp)r.onError&&r.onError(n.status);else{var i=n.status||200;if(200===i&&206===r.expectedStatus||i===r.expectedStatus){var o=function(e){var t=e.response;return"string"!=typeof t?t:(0,a.stringToBytes)(t).buffer}(n);if(206===i){var s=n.getResponseHeader("Content-Range"),u=/bytes (\d+)-(\d+)\/(\d+)/.exec(s);r.onDone({begin:parseInt(u[1],10),chunk:o})}else o?r.onDone({begin:0,chunk:o}):r.onError&&r.onError(n.status)}else r.onError&&r.onError(n.status)}}}},{key:"hasPendingRequests",value:function(){for(var e in this.pendingRequests)return!0;return!1}},{key:"getRequestXhr",value:function(e){return this.pendingRequests[e].xhr}},{key:"isPendingRequest",value:function(e){return e in this.pendingRequests}},{key:"abortAllRequests",value:function(){for(var e in this.pendingRequests)this.abortRequest(0|e)}},{key:"abortRequest",value:function(e){var t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}]),e}(),f=function(){function e(t){l(this,e),this._source=t,this._manager=new d(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials}),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}return h(e,[{key:"_onRangeRequestReaderClosed",value:function(e){var t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}},{key:"getFullReader",value:function(){return(0,a.assert)(!this._fullRequestReader),this._fullRequestReader=new p(this._manager,this._source),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){var r=new v(this._manager,e,t);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach(function(t){t.cancel(e)})}}]),e}();t.PDFNetworkStream=f;var p=function(){function e(t,r){l(this,e),this._manager=t;var n={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=r.url,this._fullRequestId=t.requestFull(n),this._headersReceivedCapability=(0,a.createPromiseCapability)(),this._disableRange=r.disableRange||!1,this._contentLength=r.length,this._rangeChunkSize=r.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}return h(e,[{key:"_onHeadersReceived",value:function(){var e=this._fullRequestId,t=this._manager.getRequestXhr(e),r=function(e){return t.getResponseHeader(e)},n=(0,o.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),i=n.allowRangeRequests,a=n.suggestedLength;i&&(this._isRangeSupported=!0),this._contentLength=a||this._contentLength,this._filename=(0,o.extractFilenameFromHeader)(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}},{key:"_onDone",value:function(e){e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):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=[])}},{key:"_onError",value:function(e){var t=this._url,r=(0,o.createResponseStatusError)(e,t);this._storedError=r,this._headersReceivedCapability.reject(r),this._requests.forEach(function(e){e.reject(r)}),this._requests=[],this._cachedChunks=[]}},{key:"_onProgress",value:function(e){this.onProgress&&this.onProgress({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}},{key:"read",value:function(){var e=u(i.default.mark(function e(){var t,r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._storedError){e.next=2;break}throw this._storedError;case 2:if(!(this._cachedChunks.length>0)){e.next=5;break}return t=this._cachedChunks.shift(),e.abrupt("return",{value:t,done:!1});case 5:if(!this._done){e.next=7;break}return e.abrupt("return",{value:void 0,done:!0});case 7:return r=(0,a.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 10:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(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}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"contentLength",get:function(){return this._contentLength}},{key:"headersReady",get:function(){return this._headersReceivedCapability.promise}}]),e}(),v=function(){function e(t,r,n){l(this,e),this._manager=t;var i={onDone:this._onDone.bind(this),onProgress:this._onProgress.bind(this)};this._requestId=t.requestRange(r,n,i),this._requests=[],this._queuedChunk=null,this._done=!1,this.onProgress=null,this.onClosed=null}return h(e,[{key:"_close",value:function(){this.onClosed&&this.onClosed(this)}},{key:"_onDone",value:function(e){var t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t;this._done=!0,this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[],this._close()}},{key:"_onProgress",value:function(e){!this.isStreamingSupported&&this.onProgress&&this.onProgress({loaded:e.loaded})}},{key:"read",value:function(){var e=u(i.default.mark(function e(){var t,r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null===this._queuedChunk){e.next=4;break}return t=this._queuedChunk,this._queuedChunk=null,e.abrupt("return",{value:t,done:!1});case 4:if(!this._done){e.next=6;break}return e.abrupt("return",{value:void 0,done:!0});case 6:return r=(0,a.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 9:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(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()}},{key:"isStreamingSupported",get:function(){return!1}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var n,i=(n=r(148))&&n.__esModule?n:{default:n},a=r(1),o=r(166);function s(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function u(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(e){s(a,n,i,o,u,"next",e)}function u(e){s(a,n,i,o,u,"throw",e)}o(void 0)})}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),e}function d(e,t,r){return{method:"GET",headers:e,signal:r&&r.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}var f=function(){function e(t){l(this,e),this.source=t,this.isHttp=/^https?:/i.test(t.url),this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}return h(e,[{key:"getFullReader",value:function(){return(0,a.assert)(!this._fullRequestReader),this._fullRequestReader=new p(this),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=new v(this,e,t);return this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach(function(t){t.cancel(e)})}},{key:"_progressiveDataLength",get:function(){return this._fullRequestReader?this._fullRequestReader._loaded:0}}]),e}();t.PDFFetchStream=f;var p=function(){function e(t){var r=this;l(this,e),this._stream=t,this._reader=null,this._loaded=0,this._filename=null;var n=t.source;for(var i in this._withCredentials=n.withCredentials||!1,this._contentLength=n.length,this._headersCapability=(0,a.createPromiseCapability)(),this._disableRange=n.disableRange||!1,this._rangeChunkSize=n.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),"undefined"!=typeof AbortController&&(this._abortController=new AbortController),this._isStreamingSupported=!n.disableStream,this._isRangeSupported=!n.disableRange,this._headers=new Headers,this._stream.httpHeaders){var s=this._stream.httpHeaders[i];void 0!==s&&this._headers.append(i,s)}var u=n.url;fetch(u,d(this._headers,this._withCredentials,this._abortController)).then(function(e){if(!(0,o.validateResponseStatus)(e.status))throw(0,o.createResponseStatusError)(e.status,u);r._reader=e.body.getReader(),r._headersCapability.resolve();var t=function(t){return e.headers.get(t)},n=(0,o.validateRangeRequestCapabilities)({getResponseHeader:t,isHttp:r._stream.isHttp,rangeChunkSize:r._rangeChunkSize,disableRange:r._disableRange}),i=n.allowRangeRequests,s=n.suggestedLength;r._isRangeSupported=i,r._contentLength=s||r._contentLength,r._filename=(0,o.extractFilenameFromHeader)(t),!r._isStreamingSupported&&r._isRangeSupported&&r.cancel(new a.AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}return h(e,[{key:"read",value:function(){var e=u(i.default.mark(function e(){var t,r,n,a;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._headersCapability.promise;case 2:return e.next=4,this._reader.read();case 4:if(t=e.sent,r=t.value,!(n=t.done)){e.next=9;break}return e.abrupt("return",{value:r,done:n});case 9:return this._loaded+=r.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),a=new Uint8Array(r).buffer,e.abrupt("return",{value:a,done:!1});case 13:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}},{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}}]),e}(),v=function(){function e(t,r,n){var i=this;l(this,e),this._stream=t,this._reader=null,this._loaded=0;var s=t.source;for(var u in this._withCredentials=s.withCredentials||!1,this._readCapability=(0,a.createPromiseCapability)(),this._isStreamingSupported=!s.disableStream,"undefined"!=typeof AbortController&&(this._abortController=new AbortController),this._headers=new Headers,this._stream.httpHeaders){var c=this._stream.httpHeaders[u];void 0!==c&&this._headers.append(u,c)}this._headers.append("Range","bytes=".concat(r,"-").concat(n-1));var h=s.url;fetch(h,d(this._headers,this._withCredentials,this._abortController)).then(function(e){if(!(0,o.validateResponseStatus)(e.status))throw(0,o.createResponseStatusError)(e.status,h);i._readCapability.resolve(),i._reader=e.body.getReader()}),this.onProgress=null}return h(e,[{key:"read",value:function(){var e=u(i.default.mark(function e(){var t,r,n,a;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:return e.next=4,this._reader.read();case 4:if(t=e.sent,r=t.value,!(n=t.done)){e.next=9;break}return e.abrupt("return",{value:r,done:n});case 9:return this._loaded+=r.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded}),a=new Uint8Array(r).buffer,e.abrupt("return",{value:a,done:!1});case 13:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}}]),e}()}])});
|
js/pdfjs/{pdf.worker.js → pdf-4.6.2.worker.js}
RENAMED
File without changes
|
js/pdfjs/{pdf.worker.js.map → pdf-4.6.2.worker.js.map}
RENAMED
File without changes
|
js/pdfjs/{pdf.worker.min.js → pdf-4.6.2.worker.min.js}
RENAMED
File without changes
|
js/pdfjs/pdf.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf",[],t):"object"==typeof exports?exports["pdfjs-dist/build/pdf"]=t():e["pdfjs-dist/build/pdf"]=e.pdfjsLib=t()}(this,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},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 n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},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";var n=r(1),i=r(147),a=r(162),o=r(163),s=r(151),u=r(164),l=r(156),c=r(153);if(r(4)()){var h=r(165).PDFNodeStream;i.setPDFNetworkStreamFactory(function(e){return new h(e)})}else{var d,f=r(168).PDFNetworkStream;s.isFetchSupported()&&(d=r(169).PDFFetchStream),i.setPDFNetworkStreamFactory(function(e){return d&&s.isValidFetchUrl(e.url)?new d(e):new f(e)})}t.build=i.build,t.version=i.version,t.getDocument=i.getDocument,t.LoopbackPort=i.LoopbackPort,t.PDFDataRangeTransport=i.PDFDataRangeTransport,t.PDFWorker=i.PDFWorker,t.renderTextLayer=a.renderTextLayer,t.AnnotationLayer=o.AnnotationLayer,t.createPromiseCapability=n.createPromiseCapability,t.PasswordResponses=n.PasswordResponses,t.InvalidPDFException=n.InvalidPDFException,t.MissingPDFException=n.MissingPDFException,t.SVGGraphics=u.SVGGraphics,t.NativeImageDecoding=n.NativeImageDecoding,t.CMapCompressionType=n.CMapCompressionType,t.PermissionFlag=n.PermissionFlag,t.UnexpectedResponseException=n.UnexpectedResponseException,t.OPS=n.OPS,t.VerbosityLevel=n.VerbosityLevel,t.UNSUPPORTED_FEATURES=n.UNSUPPORTED_FEATURES,t.createValidAbsoluteUrl=n.createValidAbsoluteUrl,t.createObjectURL=n.createObjectURL,t.removeNullCharacters=n.removeNullCharacters,t.shadow=n.shadow,t.Util=n.Util,t.ReadableStream=n.ReadableStream,t.URL=n.URL,t.RenderingCancelledException=s.RenderingCancelledException,t.getFilenameFromUrl=s.getFilenameFromUrl,t.LinkTarget=s.LinkTarget,t.addLinkAttributes=s.addLinkAttributes,t.loadScript=s.loadScript,t.PDFDateString=s.PDFDateString,t.GlobalWorkerOptions=l.GlobalWorkerOptions,t.apiCompatibilityParams=c.apiCompatibilityParams},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayByteLength=_,t.arraysToBytes=function(e){if(1===e.length&&e[0]instanceof Uint8Array)return e[0];var t,r,n,i=0,a=e.length;for(t=0;t<a;t++)r=e[t],n=_(r),i+=n;var o=0,s=new Uint8Array(i);for(t=0;t<a;t++)(r=e[t])instanceof Uint8Array||(r="string"==typeof r?b(r):new Uint8Array(r)),n=r.byteLength,s.set(r,o),o+=n;return s},t.assert=c,t.bytesToString=function(e){c(null!==e&&"object"===a(e)&&void 0!==e.length,"Invalid argument for bytesToString");var t=e.length;if(t<8192)return String.fromCharCode.apply(null,e);for(var r=[],n=0;n<t;n+=8192){var i=Math.min(n+8192,t),o=e.subarray(n,i);r.push(String.fromCharCode.apply(null,o))}return r.join("")},t.createPromiseCapability=function(){var e=Object.create(null),t=!1;return Object.defineProperty(e,"settled",{get:function(){return t}}),e.promise=new Promise(function(r,n){e.resolve=function(e){t=!0,r(e)},e.reject=function(e){t=!0,n(e)}}),e},t.getVerbosityLevel=function(){return s},t.info=function(e){s>=o.INFOS&&console.log("Info: "+e)},t.isArrayBuffer=function(e){return"object"===a(e)&&null!==e&&void 0!==e.byteLength},t.isArrayEqual=function(e,t){if(e.length!==t.length)return!1;return e.every(function(e,r){return e===t[r]})},t.isBool=function(e){return"boolean"==typeof e},t.isEmptyObj=function(e){for(var t in e)return!1;return!0},t.isNum=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSpace=function(e){return 32===e||9===e||13===e||10===e},t.isSameOrigin=function(e,t){try{var r=new i.URL(e);if(!r.origin||"null"===r.origin)return!1}catch(e){return!1}var n=new i.URL(t,r);return r.origin===n.origin},t.createValidAbsoluteUrl=function(e,t){if(!e)return null;try{var r=t?new i.URL(e,t):new i.URL(e);if(function(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(r))return r}catch(e){}return null},t.isLittleEndian=function(){var e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]},t.isEvalSupported=function(){try{return new Function(""),!0}catch(e){return!1}},t.log2=function(e){if(e<=0)return 0;return Math.ceil(Math.log2(e))},t.readInt8=function(e,t){return e[t]<<24>>24},t.readUint16=function(e,t){return e[t]<<8|e[t+1]},t.readUint32=function(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0},t.removeNullCharacters=function(e){if("string"!=typeof e)return u("The argument for removeNullCharacters must be a string."),e;return e.replace(y,"")},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(s=e)},t.shadow=function(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r},t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=b,t.stringToPDFString=function(e){var t,r=e.length,n=[];if("þ"===e[0]&&"ÿ"===e[1])for(t=2;t<r;t+=2)n.push(String.fromCharCode(e.charCodeAt(t)<<8|e.charCodeAt(t+1)));else for(t=0;t<r;++t){var i=S[e.charCodeAt(t)];n.push(i?String.fromCharCode(i):e.charAt(t))}return n.join("")},t.stringToUTF8String=function(e){return decodeURIComponent(escape(e))},t.utf8StringToString=function(e){return unescape(encodeURIComponent(e))},t.warn=u,t.unreachable=l,Object.defineProperty(t,"ReadableStream",{enumerable:!0,get:function(){return n.ReadableStream}}),Object.defineProperty(t,"URL",{enumerable:!0,get:function(){return i.URL}}),t.createObjectURL=t.FormatError=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.StreamType=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.NativeImageDecoding=t.MissingPDFException=t.InvalidPDFException=t.AbortException=t.CMapCompressionType=t.ImageKind=t.FontType=t.AnnotationType=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.UNSUPPORTED_FEATURES=t.VerbosityLevel=t.OPS=t.IDENTITY_MATRIX=t.FONT_IDENTITY_MATRIX=void 0,r(2);var n=r(143),i=r(145);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.IDENTITY_MATRIX=[1,0,0,1,0,0];t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0];t.NativeImageDecoding={NONE:"none",DECODE:"decode",DISPLAY:"display"};t.PermissionFlag={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.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4};t.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};t.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26};t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};t.AnnotationFieldFlag={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.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};t.StreamType={UNKNOWN:0,FLATE:1,LZW:2,DCT:3,JPX:4,JBIG:5,A85:6,AHX:7,CCF:8,RL:9};t.FontType={UNKNOWN:0,TYPE1:1,TYPE1C:2,CIDFONTTYPE0:3,CIDFONTTYPE0C:4,TRUETYPE:5,CIDFONTTYPE2:6,TYPE3:7,OPENTYPE:8,TYPE0:9,MMTYPE1:10};var o={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=o;t.CMapCompressionType={NONE:0,BINARY:1,STREAM:2};t.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,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.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"};t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var s=o.WARNINGS;function u(e){s>=o.WARNINGS&&console.log("Warning: "+e)}function l(e){throw new Error(e)}function c(e,t){e||l(t)}var h=function(){function e(e,t){this.name="PasswordException",this.message=e,this.code=t}return e.prototype=new Error,e.constructor=e,e}();t.PasswordException=h;var d=function(){function e(e,t){this.name="UnknownErrorException",this.message=e,this.details=t}return e.prototype=new Error,e.constructor=e,e}();t.UnknownErrorException=d;var f=function(){function e(e){this.name="InvalidPDFException",this.message=e}return e.prototype=new Error,e.constructor=e,e}();t.InvalidPDFException=f;var p=function(){function e(e){this.name="MissingPDFException",this.message=e}return e.prototype=new Error,e.constructor=e,e}();t.MissingPDFException=p;var v=function(){function e(e,t){this.name="UnexpectedResponseException",this.message=e,this.status=t}return e.prototype=new Error,e.constructor=e,e}();t.UnexpectedResponseException=v;var m=function(){function e(e){this.message=e}return e.prototype=new Error,e.prototype.name="FormatError",e.constructor=e,e}();t.FormatError=m;var g=function(){function e(e){this.name="AbortException",this.message=e}return e.prototype=new Error,e.constructor=e,e}();t.AbortException=g;var y=/\x00/g;function b(e){c("string"==typeof e,"Invalid argument for stringToBytes");for(var t=e.length,r=new Uint8Array(t),n=0;n<t;++n)r[n]=255&e.charCodeAt(n);return r}function _(e){return void 0!==e.length?e.length:(c(void 0!==e.byteLength),e.byteLength)}var A=function(){function e(){}var t=["rgb(",0,",",0,",",0,")"];return e.makeCssRgb=function(e,r,n){return t[1]=e,t[3]=r,t[5]=n,t.join("")},e.transform=function(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]]},e.applyTransform=function(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]},e.applyInverseTransform=function(e,t){var r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]},e.getAxialAlignedBoundingBox=function(t,r){var n=e.applyTransform(t,r),i=e.applyTransform(t.slice(2,4),r),a=e.applyTransform([t[0],t[3]],r),o=e.applyTransform([t[2],t[1]],r);return[Math.min(n[0],i[0],a[0],o[0]),Math.min(n[1],i[1],a[1],o[1]),Math.max(n[0],i[0],a[0],o[0]),Math.max(n[1],i[1],a[1],o[1])]},e.inverseTransform=function(e){var 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]},e.apply3dTransform=function(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]]},e.singularValueDecompose2dScale=function(e){var t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],n=e[0]*t[1]+e[1]*t[3],i=e[2]*t[0]+e[3]*t[2],a=e[2]*t[1]+e[3]*t[3],o=(r+a)/2,s=Math.sqrt((r+a)*(r+a)-4*(r*a-i*n))/2,u=o+s||1,l=o-s||1;return[Math.sqrt(u),Math.sqrt(l)]},e.normalizeRect=function(e){var 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},e.intersect=function(t,r){function n(e,t){return e-t}var i=[t[0],t[2],r[0],r[2]].sort(n),a=[t[1],t[3],r[1],r[3]].sort(n),o=[];return t=e.normalizeRect(t),r=e.normalizeRect(r),(i[0]===t[0]&&i[1]===r[0]||i[0]===r[0]&&i[1]===t[0])&&(o[0]=i[1],o[2]=i[2],(a[0]===t[1]&&a[1]===r[1]||a[0]===r[1]&&a[1]===t[1])&&(o[1]=a[1],o[3]=a[2],o))},e}();t.Util=A;var S=[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];var w,k=(w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",function(e,t){if(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2])&&i.URL.createObjectURL){var r=new Blob([e],{type:t});return i.URL.createObjectURL(r)}for(var n="data:"+t+";base64,",a=0,o=e.length;a<o;a+=3){var s=255&e[a],u=255&e[a+1],l=255&e[a+2];n+=w[s>>2]+w[(3&s)<<4|u>>4]+w[a+1<o?(15&u)<<2|l>>6:64]+w[a+2<o?63&l:64]}return n});t.createObjectURL=k},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(3);if(!i._pdfjsCompatibilityChecked){i._pdfjsCompatibilityChecked=!0;var a=r(4),o="object"===("undefined"==typeof window?"undefined":n(window))&&"object"===("undefined"==typeof document?"undefined":n(document));!i.btoa&&a()&&(i.btoa=function(e){return Buffer.from(e,"binary").toString("base64")}),!i.atob&&a()&&(i.atob=function(e){return Buffer.from(e,"base64").toString("binary")}),o&&void 0===Element.prototype.remove&&(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),function(){if(o&&!a()){var e=document.createElement("div");if(e.classList.add("testOne","testTwo"),!0!==e.classList.contains("testOne")||!0!==e.classList.contains("testTwo")){var t=DOMTokenList.prototype.add,r=DOMTokenList.prototype.remove;DOMTokenList.prototype.add=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];for(var i=0,a=r;i<a.length;i++){var o=a[i];t.call(this,o)}},DOMTokenList.prototype.remove=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0,a=t;i<a.length;i++){var o=a[i];r.call(this,o)}}}}}(),o&&!a()&&!1!==document.createElement("div").classList.toggle("test",0)&&(DOMTokenList.prototype.toggle=function(e){var t=arguments.length>1?!!arguments[1]:!this.contains(e);return this[t?"add":"remove"](e),t}),String.prototype.startsWith||r(5),String.prototype.endsWith||r(36),String.prototype.includes||r(38),Array.prototype.includes||r(40),Array.from||r(47),Object.assign||r(70),Math.log2||(Math.log2=r(75)),Number.isNaN||(Number.isNaN=r(77)),Number.isInteger||(Number.isInteger=r(79)),i.Promise&&i.Promise.prototype&&i.Promise.prototype.finally||(i.Promise=r(82)),i.WeakMap||(i.WeakMap=r(102)),i.WeakSet||(i.WeakSet=r(119)),String.codePointAt||(String.codePointAt=r(123)),String.fromCodePoint||(String.fromCodePoint=r(125)),i.Symbol||r(127),String.prototype.padStart||r(134),String.prototype.padEnd||r(138),Object.values||(Object.values=r(140))}},function(e,t,r){"use strict";e.exports="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:{}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(){return"object"===("undefined"==typeof process?"undefined":n(process))&&process+""=="[object process]"&&!process.versions.nw&&!process.versions.electron}},function(e,t,r){"use strict";r(6),e.exports=r(9).String.startsWith},function(e,t,r){"use strict";var n=r(7),i=r(28),a=r(30),o="".startsWith;n(n.P+n.F*r(35)("startsWith"),"String",{startsWith:function(e){var t=a(this,e,"startsWith"),r=i(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),n=String(e);return o?o.call(t,n,r):t.slice(r,r+n.length)===n}})},function(e,t,r){"use strict";var n=r(8),i=r(9),a=r(10),o=r(20),s=r(26),u=function e(t,r,u){var l,c,h,d,f=t&e.F,p=t&e.G,v=t&e.P,m=t&e.B,g=p?n:t&e.S?n[r]||(n[r]={}):(n[r]||{}).prototype,y=p?i:i[r]||(i[r]={}),b=y.prototype||(y.prototype={});for(l in p&&(u=r),u)h=((c=!f&&g&&void 0!==g[l])?g:u)[l],d=m&&c?s(h,n):v&&"function"==typeof h?s(Function.call,h):h,g&&o(g,l,h,t&e.U),y[l]!=h&&a(y,l,d),v&&b[l]!=h&&(b[l]=h)};n.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,r){"use strict";var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,r){"use strict";var n=e.exports={version:"2.6.9"};"number"==typeof __e&&(__e=n)},function(e,t,r){"use strict";var n=r(11),i=r(19);e.exports=r(15)?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){"use strict";var n=r(12),i=r(14),a=r(18),o=Object.defineProperty;t.f=r(15)?Object.defineProperty:function(e,t,r){if(n(e),t=a(t,!0),n(r),i)try{return o(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){"use strict";var n=r(13);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return"object"===n(e)?null!==e:"function"==typeof e}},function(e,t,r){"use strict";e.exports=!r(15)&&!r(16)(function(){return 7!=Object.defineProperty(r(17)("div"),"a",{get:function(){return 7}}).a})},function(e,t,r){"use strict";e.exports=!r(16)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,r){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){"use strict";var n=r(13),i=r(8).document,a=n(i)&&n(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,r){"use strict";var n=r(13);e.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,r){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){"use strict";var n=r(8),i=r(10),a=r(21),o=r(22)("src"),s=r(23),u=(""+s).split("toString");r(9).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,r,s){var l="function"==typeof r;l&&(a(r,"name")||i(r,"name",t)),e[t]!==r&&(l&&(a(r,o)||i(r,o,e[t]?""+e[t]:u.join(String(t)))),e===n?e[t]=r:s?e[t]?e[t]=r:i(e,t,r):(delete e[t],i(e,t,r)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[o]||s.call(this)})},function(e,t,r){"use strict";var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,r){"use strict";var n=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},function(e,t,r){"use strict";e.exports=r(24)("native-function-to-string",Function.toString)},function(e,t,r){"use strict";var n=r(9),i=r(8),a=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:n.version,mode:r(25)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t,r){"use strict";e.exports=!1},function(e,t,r){"use strict";var n=r(27);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,r){"use strict";e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,r){"use strict";var n=r(29),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},function(e,t,r){"use strict";var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},function(e,t,r){"use strict";var n=r(31),i=r(34);e.exports=function(e,t,r){if(n(t))throw TypeError("String#"+r+" doesn't accept regex!");return String(i(e))}},function(e,t,r){"use strict";var n=r(13),i=r(32),a=r(33)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==i(e))}},function(e,t,r){"use strict";var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,r){"use strict";var n=r(24)("wks"),i=r(22),a=r(8).Symbol,o="function"==typeof a;(e.exports=function(e){return n[e]||(n[e]=o&&a[e]||(o?a:i)("Symbol."+e))}).store=n},function(e,t,r){"use strict";e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,r){"use strict";var n=r(33)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,r){"use strict";r(37),e.exports=r(9).String.endsWith},function(e,t,r){"use strict";var n=r(7),i=r(28),a=r(30),o="".endsWith;n(n.P+n.F*r(35)("endsWith"),"String",{endsWith:function(e){var t=a(this,e,"endsWith"),r=arguments.length>1?arguments[1]:void 0,n=i(t.length),s=void 0===r?n:Math.min(i(r),n),u=String(e);return o?o.call(t,u,s):t.slice(s-u.length,s)===u}})},function(e,t,r){"use strict";r(39),e.exports=r(9).String.includes},function(e,t,r){"use strict";var n=r(7),i=r(30);n(n.P+n.F*r(35)("includes"),"String",{includes:function(e){return!!~i(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){"use strict";r(41),e.exports=r(9).Array.includes},function(e,t,r){"use strict";var n=r(7),i=r(42)(!0);n(n.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),r(46)("includes")},function(e,t,r){"use strict";var n=r(43),i=r(28),a=r(45);e.exports=function(e){return function(t,r,o){var s,u=n(t),l=i(u.length),c=a(o,l);if(e&&r!=r){for(;l>c;)if((s=u[c++])!=s)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===r)return e||c||0;return!e&&-1}}},function(e,t,r){"use strict";var n=r(44),i=r(34);e.exports=function(e){return n(i(e))}},function(e,t,r){"use strict";var n=r(32);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t,r){"use strict";var n=r(29),i=Math.max,a=Math.min;e.exports=function(e,t){return(e=n(e))<0?i(e+t,0):a(e,t)}},function(e,t,r){"use strict";var n=r(33)("unscopables"),i=Array.prototype;null==i[n]&&r(10)(i,n,{}),e.exports=function(e){i[n][e]=!0}},function(e,t,r){"use strict";r(48),r(63),e.exports=r(9).Array.from},function(e,t,r){"use strict";var n=r(49)(!0);r(50)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})})},function(e,t,r){"use strict";var n=r(29),i=r(34);e.exports=function(e){return function(t,r){var a,o,s=String(i(t)),u=n(r),l=s.length;return u<0||u>=l?e?"":void 0:(a=s.charCodeAt(u))<55296||a>56319||u+1===l||(o=s.charCodeAt(u+1))<56320||o>57343?e?s.charAt(u):a:e?s.slice(u,u+2):o-56320+(a-55296<<10)+65536}}},function(e,t,r){"use strict";var n=r(25),i=r(7),a=r(20),o=r(10),s=r(51),u=r(52),l=r(60),c=r(61),h=r(33)("iterator"),d=!([].keys&&"next"in[].keys()),f=function(){return this};e.exports=function(e,t,r,p,v,m,g){u(r,t,p);var y,b,_,A=function(e){if(!d&&e in x)return x[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},S=t+" Iterator",w="values"==v,k=!1,x=e.prototype,P=x[h]||x["@@iterator"]||v&&x[v],C=P||A(v),R=v?w?A("entries"):C:void 0,T="Array"==t&&x.entries||P;if(T&&(_=c(T.call(new e)))!==Object.prototype&&_.next&&(l(_,S,!0),n||"function"==typeof _[h]||o(_,h,f)),w&&P&&"values"!==P.name&&(k=!0,C=function(){return P.call(this)}),n&&!g||!d&&!k&&x[h]||o(x,h,C),s[t]=C,s[S]=f,v)if(y={values:w?C:A("values"),keys:m?C:A("keys"),entries:R},g)for(b in y)b in x||a(x,b,y[b]);else i(i.P+i.F*(d||k),t,y);return y}},function(e,t,r){"use strict";e.exports={}},function(e,t,r){"use strict";var n=r(53),i=r(19),a=r(60),o={};r(10)(o,r(33)("iterator"),function(){return this}),e.exports=function(e,t,r){e.prototype=n(o,{next:i(1,r)}),a(e,t+" Iterator")}},function(e,t,r){"use strict";var n=r(12),i=r(54),a=r(58),o=r(57)("IE_PROTO"),s=function(){},u=function(){var e,t=r(17)("iframe"),n=a.length;for(t.style.display="none",r(59).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;n--;)delete u.prototype[a[n]];return u()};e.exports=Object.create||function(e,t){var r;return null!==e?(s.prototype=n(e),r=new s,s.prototype=null,r[o]=e):r=u(),void 0===t?r:i(r,t)}},function(e,t,r){"use strict";var n=r(11),i=r(12),a=r(55);e.exports=r(15)?Object.defineProperties:function(e,t){i(e);for(var r,o=a(t),s=o.length,u=0;s>u;)n.f(e,r=o[u++],t[r]);return e}},function(e,t,r){"use strict";var n=r(56),i=r(58);e.exports=Object.keys||function(e){return n(e,i)}},function(e,t,r){"use strict";var n=r(21),i=r(43),a=r(42)(!1),o=r(57)("IE_PROTO");e.exports=function(e,t){var r,s=i(e),u=0,l=[];for(r in s)r!=o&&n(s,r)&&l.push(r);for(;t.length>u;)n(s,r=t[u++])&&(~a(l,r)||l.push(r));return l}},function(e,t,r){"use strict";var n=r(24)("keys"),i=r(22);e.exports=function(e){return n[e]||(n[e]=i(e))}},function(e,t,r){"use strict";e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,r){"use strict";var n=r(8).document;e.exports=n&&n.documentElement},function(e,t,r){"use strict";var n=r(11).f,i=r(21),a=r(33)("toStringTag");e.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,a)&&n(e,a,{configurable:!0,value:t})}},function(e,t,r){"use strict";var n=r(21),i=r(62),a=r(57)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),n(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},function(e,t,r){"use strict";var n=r(34);e.exports=function(e){return Object(n(e))}},function(e,t,r){"use strict";var n=r(26),i=r(7),a=r(62),o=r(64),s=r(65),u=r(28),l=r(66),c=r(67);i(i.S+i.F*!r(69)(function(e){Array.from(e)}),"Array",{from:function(e){var t,r,i,h,d=a(e),f="function"==typeof this?this:Array,p=arguments.length,v=p>1?arguments[1]:void 0,m=void 0!==v,g=0,y=c(d);if(m&&(v=n(v,p>2?arguments[2]:void 0,2)),null==y||f==Array&&s(y))for(r=new f(t=u(d.length));t>g;g++)l(r,g,m?v(d[g],g):d[g]);else for(h=y.call(d),r=new f;!(i=h.next()).done;g++)l(r,g,m?o(h,v,[i.value,g],!0):i.value);return r.length=g,r}})},function(e,t,r){"use strict";var n=r(12);e.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(t){var a=e.return;throw void 0!==a&&n(a.call(e)),t}}},function(e,t,r){"use strict";var n=r(51),i=r(33)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||a[i]===e)}},function(e,t,r){"use strict";var n=r(11),i=r(19);e.exports=function(e,t,r){t in e?n.f(e,t,i(0,r)):e[t]=r}},function(e,t,r){"use strict";var n=r(68),i=r(33)("iterator"),a=r(51);e.exports=r(9).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||a[n(e)]}},function(e,t,r){"use strict";var n=r(32),i=r(33)("toStringTag"),a="Arguments"==n(function(){return arguments}());e.exports=function(e){var t,r,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?r:a?n(t):"Object"==(o=n(t))&&"function"==typeof t.callee?"Arguments":o}},function(e,t,r){"use strict";var n=r(33)("iterator"),i=!1;try{var a=[7][n]();a.return=function(){i=!0},Array.from(a,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var r=!1;try{var a=[7],o=a[n]();o.next=function(){return{done:r=!0}},a[n]=function(){return o},e(a)}catch(e){}return r}},function(e,t,r){"use strict";r(71),e.exports=r(9).Object.assign},function(e,t,r){"use strict";var n=r(7);n(n.S+n.F,"Object",{assign:r(72)})},function(e,t,r){"use strict";var n=r(15),i=r(55),a=r(73),o=r(74),s=r(62),u=r(44),l=Object.assign;e.exports=!l||r(16)(function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!=l({},e)[r]||Object.keys(l({},t)).join("")!=n})?function(e,t){for(var r=s(e),l=arguments.length,c=1,h=a.f,d=o.f;l>c;)for(var f,p=u(arguments[c++]),v=h?i(p).concat(h(p)):i(p),m=v.length,g=0;m>g;)f=v[g++],n&&!d.call(p,f)||(r[f]=p[f]);return r}:l},function(e,t,r){"use strict";t.f=Object.getOwnPropertySymbols},function(e,t,r){"use strict";t.f={}.propertyIsEnumerable},function(e,t,r){"use strict";r(76),e.exports=r(9).Math.log2},function(e,t,r){"use strict";var n=r(7);n(n.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,r){"use strict";r(78),e.exports=r(9).Number.isNaN},function(e,t,r){"use strict";var n=r(7);n(n.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,r){"use strict";r(80),e.exports=r(9).Number.isInteger},function(e,t,r){"use strict";var n=r(7);n(n.S,"Number",{isInteger:r(81)})},function(e,t,r){"use strict";var n=r(13),i=Math.floor;e.exports=function(e){return!n(e)&&isFinite(e)&&i(e)===e}},function(e,t,r){"use strict";r(83),r(48),r(84),r(87),r(100),r(101),e.exports=r(9).Promise},function(e,t,r){"use strict";var n=r(68),i={};i[r(33)("toStringTag")]="z",i+""!="[object z]"&&r(20)(Object.prototype,"toString",function(){return"[object "+n(this)+"]"},!0)},function(e,t,r){"use strict";for(var n=r(85),i=r(55),a=r(20),o=r(8),s=r(10),u=r(51),l=r(33),c=l("iterator"),h=l("toStringTag"),d=u.Array,f={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(f),v=0;v<p.length;v++){var m,g=p[v],y=f[g],b=o[g],_=b&&b.prototype;if(_&&(_[c]||s(_,c,d),_[h]||s(_,h,g),u[g]=d,y))for(m in n)_[m]||a(_,m,n[m],!0)}},function(e,t,r){"use strict";var n=r(46),i=r(86),a=r(51),o=r(43);e.exports=r(50)(Array,"Array",function(e,t){this._t=o(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?r:"values"==t?e[r]:[r,e[r]])},"values"),a.Arguments=a.Array,n("keys"),n("values"),n("entries")},function(e,t,r){"use strict";e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,r){"use strict";var n,i,a,o,s=r(25),u=r(8),l=r(26),c=r(68),h=r(7),d=r(13),f=r(27),p=r(88),v=r(89),m=r(90),g=r(91).set,y=r(93)(),b=r(94),_=r(95),A=r(96),S=r(97),w=u.TypeError,k=u.process,x=k&&k.versions,P=x&&x.v8||"",C=u.Promise,R="process"==c(k),T=function(){},E=i=b.f,O=!!function(){try{var e=C.resolve(1),t=(e.constructor={})[r(33)("species")]=function(e){e(T,T)};return(R||"function"==typeof PromiseRejectionEvent)&&e.then(T)instanceof t&&0!==P.indexOf("6.6")&&-1===A.indexOf("Chrome/66")}catch(e){}}(),F=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},I=function(e,t){if(!e._n){e._n=!0;var r=e._c;y(function(){for(var n=e._v,i=1==e._s,a=0,o=function(t){var r,a,o,s=i?t.ok:t.fail,u=t.resolve,l=t.reject,c=t.domain;try{s?(i||(2==e._h&&j(e),e._h=1),!0===s?r=n:(c&&c.enter(),r=s(n),c&&(c.exit(),o=!0)),r===t.promise?l(w("Promise-chain cycle")):(a=F(r))?a.call(r,u,l):u(r)):l(n)}catch(e){c&&!o&&c.exit(),l(e)}};r.length>a;)o(r[a++]);e._c=[],e._n=!1,t&&!e._h&&L(e)})}},L=function(e){g.call(u,function(){var t,r,n,i=e._v,a=M(e);if(a&&(t=_(function(){R?k.emit("unhandledRejection",i,e):(r=u.onunhandledrejection)?r({promise:e,reason:i}):(n=u.console)&&n.error&&n.error("Unhandled promise rejection",i)}),e._h=R||M(e)?2:1),e._a=void 0,a&&t.e)throw t.v})},M=function(e){return 1!==e._h&&0===(e._a||e._c).length},j=function(e){g.call(u,function(){var t;R?k.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})})},D=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),I(t,!0))},N=function e(t){var r,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw w("Promise can't be resolved itself");(r=F(t))?y(function(){var i={_w:n,_d:!1};try{r.call(t,l(e,i,1),l(D,i,1))}catch(e){D.call(i,e)}}):(n._v=t,n._s=1,I(n,!1))}catch(e){D.call({_w:n,_d:!1},e)}}};O||(C=function(e){p(this,C,"Promise","_h"),f(e),n.call(this);try{e(l(N,this,1),l(D,this,1))}catch(e){D.call(this,e)}},(n=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=r(98)(C.prototype,{then:function(e,t){var r=E(m(this,C));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=R?k.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&I(this,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new n;this.promise=e,this.resolve=l(N,e,1),this.reject=l(D,e,1)},b.f=E=function(e){return e===C||e===o?new a(e):i(e)}),h(h.G+h.W+h.F*!O,{Promise:C}),r(60)(C,"Promise"),r(99)("Promise"),o=r(9).Promise,h(h.S+h.F*!O,"Promise",{reject:function(e){var t=E(this);return(0,t.reject)(e),t.promise}}),h(h.S+h.F*(s||!O),"Promise",{resolve:function(e){return S(s&&this===o?C:this,e)}}),h(h.S+h.F*!(O&&r(69)(function(e){C.all(e).catch(T)})),"Promise",{all:function(e){var t=this,r=E(t),n=r.resolve,i=r.reject,a=_(function(){var r=[],a=0,o=1;v(e,!1,function(e){var s=a++,u=!1;r.push(void 0),o++,t.resolve(e).then(function(e){u||(u=!0,r[s]=e,--o||n(r))},i)}),--o||n(r)});return a.e&&i(a.v),r.promise},race:function(e){var t=this,r=E(t),n=r.reject,i=_(function(){v(e,!1,function(e){t.resolve(e).then(r.resolve,n)})});return i.e&&n(i.v),r.promise}})},function(e,t,r){"use strict";e.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},function(e,t,r){"use strict";var n=r(26),i=r(64),a=r(65),o=r(12),s=r(28),u=r(67),l={},c={},h=e.exports=function(e,t,r,h,d){var f,p,v,m,g=d?function(){return e}:u(e),y=n(r,h,t?2:1),b=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(a(g)){for(f=s(e.length);f>b;b++)if((m=t?y(o(p=e[b])[0],p[1]):y(e[b]))===l||m===c)return m}else for(v=g.call(e);!(p=v.next()).done;)if((m=i(v,y,p.value,t))===l||m===c)return m};h.BREAK=l,h.RETURN=c},function(e,t,r){"use strict";var n=r(12),i=r(27),a=r(33)("species");e.exports=function(e,t){var r,o=n(e).constructor;return void 0===o||null==(r=n(o)[a])?t:i(r)}},function(e,t,r){"use strict";var n,i,a,o=r(26),s=r(92),u=r(59),l=r(17),c=r(8),h=c.process,d=c.setImmediate,f=c.clearImmediate,p=c.MessageChannel,v=c.Dispatch,m=0,g={},y=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},b=function(e){y.call(e.data)};d&&f||(d=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return g[++m]=function(){s("function"==typeof e?e:Function(e),t)},n(m),m},f=function(e){delete g[e]},"process"==r(32)(h)?n=function(e){h.nextTick(o(y,e,1))}:v&&v.now?n=function(e){v.now(o(y,e,1))}:p?(a=(i=new p).port2,i.port1.onmessage=b,n=o(a.postMessage,a,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(n=function(e){c.postMessage(e+"","*")},c.addEventListener("message",b,!1)):n="onreadystatechange"in l("script")?function(e){u.appendChild(l("script")).onreadystatechange=function(){u.removeChild(this),y.call(e)}}:function(e){setTimeout(o(y,e,1),0)}),e.exports={set:d,clear:f}},function(e,t,r){"use strict";e.exports=function(e,t,r){var n=void 0===r;switch(t.length){case 0:return n?e():e.call(r);case 1:return n?e(t[0]):e.call(r,t[0]);case 2:return n?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return n?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return n?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)}},function(e,t,r){"use strict";var n=r(8),i=r(91).set,a=n.MutationObserver||n.WebKitMutationObserver,o=n.process,s=n.Promise,u="process"==r(32)(o);e.exports=function(){var e,t,r,l=function(){var n,i;for(u&&(n=o.domain)&&n.exit();e;){i=e.fn,e=e.next;try{i()}catch(n){throw e?r():t=void 0,n}}t=void 0,n&&n.enter()};if(u)r=function(){o.nextTick(l)};else if(!a||n.navigator&&n.navigator.standalone)if(s&&s.resolve){var c=s.resolve(void 0);r=function(){c.then(l)}}else r=function(){i.call(n,l)};else{var h=!0,d=document.createTextNode("");new a(l).observe(d,{characterData:!0}),r=function(){d.data=h=!h}}return function(n){var i={fn:n,next:void 0};t&&(t.next=i),e||(e=i,r()),t=i}}},function(e,t,r){"use strict";var n=r(27);function i(e){var t,r;this.promise=new e(function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n}),this.resolve=n(t),this.reject=n(r)}e.exports.f=function(e){return new i(e)}},function(e,t,r){"use strict";e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,r){"use strict";var n=r(8).navigator;e.exports=n&&n.userAgent||""},function(e,t,r){"use strict";var n=r(12),i=r(13),a=r(94);e.exports=function(e,t){if(n(e),i(t)&&t.constructor===e)return t;var r=a.f(e);return(0,r.resolve)(t),r.promise}},function(e,t,r){"use strict";var n=r(20);e.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r);return e}},function(e,t,r){"use strict";var n=r(8),i=r(11),a=r(15),o=r(33)("species");e.exports=function(e){var t=n[e];a&&t&&!t[o]&&i.f(t,o,{configurable:!0,get:function(){return this}})}},function(e,t,r){"use strict";var n=r(7),i=r(9),a=r(8),o=r(90),s=r(97);n(n.P+n.R,"Promise",{finally:function(e){var t=o(this,i.Promise||a.Promise),r="function"==typeof e;return this.then(r?function(r){return s(t,e()).then(function(){return r})}:e,r?function(r){return s(t,e()).then(function(){throw r})}:e)}})},function(e,t,r){"use strict";var n=r(7),i=r(94),a=r(95);n(n.S,"Promise",{try:function(e){var t=i.f(this),r=a(e);return(r.e?t.reject:t.resolve)(r.v),t.promise}})},function(e,t,r){"use strict";r(83),r(84),r(103),r(115),r(117),e.exports=r(9).WeakMap},function(e,t,r){"use strict";var n,i=r(8),a=r(104)(0),o=r(20),s=r(108),u=r(72),l=r(109),c=r(13),h=r(110),d=r(110),f=!i.ActiveXObject&&"ActiveXObject"in i,p=s.getWeak,v=Object.isExtensible,m=l.ufstore,g=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},y={get:function(e){if(c(e)){var t=p(e);return!0===t?m(h(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return l.def(h(this,"WeakMap"),e,t)}},b=e.exports=r(111)("WeakMap",g,y,l,!0,!0);d&&f&&(u((n=l.getConstructor(g,"WeakMap")).prototype,y),s.NEED=!0,a(["delete","has","get","set"],function(e){var t=b.prototype,r=t[e];o(t,e,function(t,i){if(c(t)&&!v(t)){this._f||(this._f=new n);var a=this._f[e](t,i);return"set"==e?this:a}return r.call(this,t,i)})}))},function(e,t,r){"use strict";var n=r(26),i=r(44),a=r(62),o=r(28),s=r(105);e.exports=function(e,t){var r=1==e,u=2==e,l=3==e,c=4==e,h=6==e,d=5==e||h,f=t||s;return function(t,s,p){for(var v,m,g=a(t),y=i(g),b=n(s,p,3),_=o(y.length),A=0,S=r?f(t,_):u?f(t,0):void 0;_>A;A++)if((d||A in y)&&(m=b(v=y[A],A,g),e))if(r)S[A]=m;else if(m)switch(e){case 3:return!0;case 5:return v;case 6:return A;case 2:S.push(v)}else if(c)return!1;return h?-1:l||c?c:S}}},function(e,t,r){"use strict";var n=r(106);e.exports=function(e,t){return new(n(e))(t)}},function(e,t,r){"use strict";var n=r(13),i=r(107),a=r(33)("species");e.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),n(t)&&null===(t=t[a])&&(t=void 0)),void 0===t?Array:t}},function(e,t,r){"use strict";var n=r(32);e.exports=Array.isArray||function(e){return"Array"==n(e)}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(22)("meta"),a=r(13),o=r(21),s=r(11).f,u=0,l=Object.isExtensible||function(){return!0},c=!r(16)(function(){return l(Object.preventExtensions({}))}),h=function(e){s(e,i,{value:{i:"O"+ ++u,w:{}}})},d=e.exports={KEY:i,NEED:!1,fastKey:function(e,t){if(!a(e))return"symbol"==n(e)?e:("string"==typeof e?"S":"P")+e;if(!o(e,i)){if(!l(e))return"F";if(!t)return"E";h(e)}return e[i].i},getWeak:function(e,t){if(!o(e,i)){if(!l(e))return!0;if(!t)return!1;h(e)}return e[i].w},onFreeze:function(e){return c&&d.NEED&&l(e)&&!o(e,i)&&h(e),e}}},function(e,t,r){"use strict";var n=r(98),i=r(108).getWeak,a=r(12),o=r(13),s=r(88),u=r(89),l=r(104),c=r(21),h=r(110),d=l(5),f=l(6),p=0,v=function(e){return e._l||(e._l=new m)},m=function(){this.a=[]},g=function(e,t){return d(e.a,function(e){return e[0]===t})};m.prototype={get:function(e){var t=g(this,e);if(t)return t[1]},has:function(e){return!!g(this,e)},set:function(e,t){var r=g(this,e);r?r[1]=t:this.a.push([e,t])},delete:function(e){var t=f(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,r,a){var l=e(function(e,n){s(e,l,t,"_i"),e._t=t,e._i=p++,e._l=void 0,null!=n&&u(n,r,e[a],e)});return n(l.prototype,{delete:function(e){if(!o(e))return!1;var r=i(e);return!0===r?v(h(this,t)).delete(e):r&&c(r,this._i)&&delete r[this._i]},has:function(e){if(!o(e))return!1;var r=i(e);return!0===r?v(h(this,t)).has(e):r&&c(r,this._i)}}),l},def:function(e,t,r){var n=i(a(t),!0);return!0===n?v(e).set(t,r):n[e._i]=r,e},ufstore:v}},function(e,t,r){"use strict";var n=r(13);e.exports=function(e,t){if(!n(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,r){"use strict";var n=r(8),i=r(7),a=r(20),o=r(98),s=r(108),u=r(89),l=r(88),c=r(13),h=r(16),d=r(69),f=r(60),p=r(112);e.exports=function(e,t,r,v,m,g){var y=n[e],b=y,_=m?"set":"add",A=b&&b.prototype,S={},w=function(e){var t=A[e];a(A,e,"delete"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!c(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,r){return t.call(this,0===e?0:e,r),this})};if("function"==typeof b&&(g||A.forEach&&!h(function(){(new b).entries().next()}))){var k=new b,x=k[_](g?{}:-0,1)!=k,P=h(function(){k.has(1)}),C=d(function(e){new b(e)}),R=!g&&h(function(){for(var e=new b,t=5;t--;)e[_](t,t);return!e.has(-0)});C||((b=t(function(t,r){l(t,b,e);var n=p(new y,t,b);return null!=r&&u(r,m,n[_],n),n})).prototype=A,A.constructor=b),(P||R)&&(w("delete"),w("has"),m&&w("get")),(R||x)&&w(_),g&&A.clear&&delete A.clear}else b=v.getConstructor(t,e,m,_),o(b.prototype,r),s.NEED=!0;return f(b,e),S[e]=b,i(i.G+i.W+i.F*(b!=y),S),g||v.setStrong(b,e,m),b}},function(e,t,r){"use strict";var n=r(13),i=r(113).set;e.exports=function(e,t,r){var a,o=t.constructor;return o!==r&&"function"==typeof o&&(a=o.prototype)!==r.prototype&&n(a)&&i&&i(e,a),e}},function(e,t,r){"use strict";var n=r(13),i=r(12),a=function(e,t){if(i(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,n){try{(n=r(26)(Function.call,r(114).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,r){return a(e,r),t?e.__proto__=r:n(e,r),e}}({},!1):void 0),check:a}},function(e,t,r){"use strict";var n=r(74),i=r(19),a=r(43),o=r(18),s=r(21),u=r(14),l=Object.getOwnPropertyDescriptor;t.f=r(15)?l:function(e,t){if(e=a(e),t=o(t,!0),u)try{return l(e,t)}catch(e){}if(s(e,t))return i(!n.f.call(e,t),e[t])}},function(e,t,r){"use strict";r(116)("WeakMap")},function(e,t,r){"use strict";var n=r(7);e.exports=function(e){n(n.S,e,{of:function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},function(e,t,r){"use strict";r(118)("WeakMap")},function(e,t,r){"use strict";var n=r(7),i=r(27),a=r(26),o=r(89);e.exports=function(e){n(n.S,e,{from:function(e){var t,r,n,s,u=arguments[1];return i(this),(t=void 0!==u)&&i(u),null==e?new this:(r=[],t?(n=0,s=a(u,arguments[2],2),o(e,!1,function(e){r.push(s(e,n++))})):o(e,!1,r.push,r),new this(r))}})}},function(e,t,r){"use strict";r(83),r(84),r(120),r(121),r(122),e.exports=r(9).WeakSet},function(e,t,r){"use strict";var n=r(109),i=r(110);r(111)("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return n.def(i(this,"WeakSet"),e,!0)}},n,!1,!0)},function(e,t,r){"use strict";r(116)("WeakSet")},function(e,t,r){"use strict";r(118)("WeakSet")},function(e,t,r){"use strict";r(124),e.exports=r(9).String.codePointAt},function(e,t,r){"use strict";var n=r(7),i=r(49)(!1);n(n.P,"String",{codePointAt:function(e){return i(this,e)}})},function(e,t,r){"use strict";r(126),e.exports=r(9).String.fromCodePoint},function(e,t,r){"use strict";var n=r(7),i=r(45),a=String.fromCharCode,o=String.fromCodePoint;n(n.S+n.F*(!!o&&1!=o.length),"String",{fromCodePoint:function(e){for(var t,r=[],n=arguments.length,o=0;n>o;){if(t=+arguments[o++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");r.push(t<65536?a(t):a(55296+((t-=65536)>>10),t%1024+56320))}return r.join("")}})},function(e,t,r){"use strict";r(128),r(83),e.exports=r(9).Symbol},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(8),a=r(21),o=r(15),s=r(7),u=r(20),l=r(108).KEY,c=r(16),h=r(24),d=r(60),f=r(22),p=r(33),v=r(129),m=r(130),g=r(131),y=r(107),b=r(12),_=r(13),A=r(62),S=r(43),w=r(18),k=r(19),x=r(53),P=r(132),C=r(114),R=r(73),T=r(11),E=r(55),O=C.f,F=T.f,I=P.f,L=i.Symbol,M=i.JSON,j=M&&M.stringify,D=p("_hidden"),N=p("toPrimitive"),q={}.propertyIsEnumerable,W=h("symbol-registry"),U=h("symbols"),B=h("op-symbols"),z=Object.prototype,G="function"==typeof L&&!!R.f,H=i.QObject,X=!H||!H.prototype||!H.prototype.findChild,Y=o&&c(function(){return 7!=x(F({},"a",{get:function(){return F(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=O(z,t);n&&delete z[t],F(e,t,r),n&&e!==z&&F(z,t,n)}:F,V=function(e){var t=U[e]=x(L.prototype);return t._k=e,t},Q=G&&"symbol"==n(L.iterator)?function(e){return"symbol"==n(e)}:function(e){return e instanceof L},K=function(e,t,r){return e===z&&K(B,t,r),b(e),t=w(t,!0),b(r),a(U,t)?(r.enumerable?(a(e,D)&&e[D][t]&&(e[D][t]=!1),r=x(r,{enumerable:k(0,!1)})):(a(e,D)||F(e,D,k(1,{})),e[D][t]=!0),Y(e,t,r)):F(e,t,r)},J=function(e,t){b(e);for(var r,n=g(t=S(t)),i=0,a=n.length;a>i;)K(e,r=n[i++],t[r]);return e},Z=function(e){var t=q.call(this,e=w(e,!0));return!(this===z&&a(U,e)&&!a(B,e))&&(!(t||!a(this,e)||!a(U,e)||a(this,D)&&this[D][e])||t)},$=function(e,t){if(e=S(e),t=w(t,!0),e!==z||!a(U,t)||a(B,t)){var r=O(e,t);return!r||!a(U,t)||a(e,D)&&e[D][t]||(r.enumerable=!0),r}},ee=function(e){for(var t,r=I(S(e)),n=[],i=0;r.length>i;)a(U,t=r[i++])||t==D||t==l||n.push(t);return n},te=function(e){for(var t,r=e===z,n=I(r?B:S(e)),i=[],o=0;n.length>o;)!a(U,t=n[o++])||r&&!a(z,t)||i.push(U[t]);return i};G||(u((L=function(){if(this instanceof L)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0);return o&&X&&Y(z,e,{configurable:!0,set:function t(r){this===z&&t.call(B,r),a(this,D)&&a(this[D],e)&&(this[D][e]=!1),Y(this,e,k(1,r))}}),V(e)}).prototype,"toString",function(){return this._k}),C.f=$,T.f=K,r(133).f=P.f=ee,r(74).f=Z,R.f=te,o&&!r(25)&&u(z,"propertyIsEnumerable",Z,!0),v.f=function(e){return V(p(e))}),s(s.G+s.W+s.F*!G,{Symbol:L});for(var re="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;re.length>ne;)p(re[ne++]);for(var ie=E(p.store),ae=0;ie.length>ae;)m(ie[ae++]);s(s.S+s.F*!G,"Symbol",{for:function(e){return a(W,e+="")?W[e]:W[e]=L(e)},keyFor:function(e){if(!Q(e))throw TypeError(e+" is not a symbol!");for(var t in W)if(W[t]===e)return t},useSetter:function(){X=!0},useSimple:function(){X=!1}}),s(s.S+s.F*!G,"Object",{create:function(e,t){return void 0===t?x(e):J(x(e),t)},defineProperty:K,defineProperties:J,getOwnPropertyDescriptor:$,getOwnPropertyNames:ee,getOwnPropertySymbols:te});var oe=c(function(){R.f(1)});s(s.S+s.F*oe,"Object",{getOwnPropertySymbols:function(e){return R.f(A(e))}}),M&&s(s.S+s.F*(!G||c(function(){var e=L();return"[null]"!=j([e])||"{}"!=j({a:e})||"{}"!=j(Object(e))})),"JSON",{stringify:function(e){for(var t,r,n=[e],i=1;arguments.length>i;)n.push(arguments[i++]);if(r=t=n[1],(_(t)||void 0!==e)&&!Q(e))return y(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!Q(t))return t}),n[1]=t,j.apply(M,n)}}),L.prototype[N]||r(10)(L.prototype,N,L.prototype.valueOf),d(L,"Symbol"),d(Math,"Math",!0),d(i.JSON,"JSON",!0)},function(e,t,r){"use strict";t.f=r(33)},function(e,t,r){"use strict";var n=r(8),i=r(9),a=r(25),o=r(129),s=r(11).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=a?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:o.f(e)})}},function(e,t,r){"use strict";var n=r(55),i=r(73),a=r(74);e.exports=function(e){var t=n(e),r=i.f;if(r)for(var o,s=r(e),u=a.f,l=0;s.length>l;)u.call(e,o=s[l++])&&t.push(o);return t}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(43),a=r(133).f,o={}.toString,s="object"==("undefined"==typeof window?"undefined":n(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"[object Window]"==o.call(e)?function(e){try{return a(e)}catch(e){return s.slice()}}(e):a(i(e))}},function(e,t,r){"use strict";var n=r(56),i=r(58).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},function(e,t,r){"use strict";r(135),e.exports=r(9).String.padStart},function(e,t,r){"use strict";var n=r(7),i=r(136),a=r(96),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(a);n(n.P+n.F*o,"String",{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,r){"use strict";var n=r(28),i=r(137),a=r(34);e.exports=function(e,t,r,o){var s=String(a(e)),u=s.length,l=void 0===r?" ":String(r),c=n(t);if(c<=u||""==l)return s;var h=c-u,d=i.call(l,Math.ceil(h/l.length));return d.length>h&&(d=d.slice(0,h)),o?d+s:s+d}},function(e,t,r){"use strict";var n=r(29),i=r(34);e.exports=function(e){var t=String(i(this)),r="",a=n(e);if(a<0||a==1/0)throw RangeError("Count can't be negative");for(;a>0;(a>>>=1)&&(t+=t))1&a&&(r+=t);return r}},function(e,t,r){"use strict";r(139),e.exports=r(9).String.padEnd},function(e,t,r){"use strict";var n=r(7),i=r(136),a=r(96),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(a);n(n.P+n.F*o,"String",{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,r){"use strict";r(141),e.exports=r(9).Object.values},function(e,t,r){"use strict";var n=r(7),i=r(142)(!1);n(n.S,"Object",{values:function(e){return i(e)}})},function(e,t,r){"use strict";var n=r(15),i=r(55),a=r(43),o=r(74).f;e.exports=function(e){return function(t){for(var r,s=a(t),u=i(s),l=u.length,c=0,h=[];l>c;)r=u[c++],n&&!o.call(s,r)||h.push(e?[r,s[r]]:s[r]);return h}}},function(e,t,r){"use strict";var n=!1;if("undefined"!=typeof ReadableStream)try{new ReadableStream({start:function(e){e.close()}}),n=!0}catch(e){}t.ReadableStream=n?ReadableStream:r(144).ReadableStream},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e,t){for(var r in t)e[r]=t[r]}(t,function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},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=7)}([function(e,t,r){var i="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},a=r(1).assert;function o(e){return"string"==typeof e||"symbol"===(void 0===e?"undefined":i(e))}function s(e,t,r){if("function"!=typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}t.typeIsObject=function(e){return"object"===(void 0===e?"undefined":i(e))&&null!==e||"function"==typeof e},t.createDataProperty=function(e,r,n){a(t.typeIsObject(e)),Object.defineProperty(e,r,{value:n,writable:!0,enumerable:!0,configurable:!0})},t.createArrayFromList=function(e){return e.slice()},t.ArrayBufferCopy=function(e,t,r,n,i){new Uint8Array(e).set(new Uint8Array(r,n,i),t)},t.CreateIterResultObject=function(e,t){a("boolean"==typeof t);var r={};return Object.defineProperty(r,"value",{value:e,enumerable:!0,writable:!0,configurable:!0}),Object.defineProperty(r,"done",{value:t,enumerable:!0,writable:!0,configurable:!0}),r},t.IsFiniteNonNegativeNumber=function(e){return!Number.isNaN(e)&&(e!==1/0&&!(e<0))},t.InvokeOrNoop=function(e,t,r){a(void 0!==e),a(o(t)),a(Array.isArray(r));var n=e[t];if(void 0!==n)return s(n,e,r)},t.PromiseInvokeOrNoop=function(e,r,n){a(void 0!==e),a(o(r)),a(Array.isArray(n));try{return Promise.resolve(t.InvokeOrNoop(e,r,n))}catch(e){return Promise.reject(e)}},t.PromiseInvokeOrPerformFallback=function(e,t,r,n,i){a(void 0!==e),a(o(t)),a(Array.isArray(r)),a(Array.isArray(i));var u=void 0;try{u=e[t]}catch(e){return Promise.reject(e)}if(void 0===u)return n.apply(null,i);try{return Promise.resolve(s(u,e,r))}catch(e){return Promise.reject(e)}},t.TransferArrayBuffer=function(e){return e.slice()},t.ValidateAndNormalizeHighWaterMark=function(e){if(e=Number(e),Number.isNaN(e)||e<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return e},t.ValidateAndNormalizeQueuingStrategy=function(e,r){if(void 0!==e&&"function"!=typeof e)throw new TypeError("size property of a queuing strategy must be a function");return{size:e,highWaterMark:r=t.ValidateAndNormalizeHighWaterMark(r)}}},function(e,t,r){function n(e){this.name="AssertionError",this.message=e||"",this.stack=(new Error).stack}n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,e.exports={rethrowAssertionErrorRejection:function(e){e&&e.constructor===n&&setTimeout(function(){throw e},0)},AssertionError:n,assert:function(e,t){if(!e)throw new n(t)}}},function(e,t,r){var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=r(0),o=a.InvokeOrNoop,s=a.PromiseInvokeOrNoop,u=a.ValidateAndNormalizeQueuingStrategy,l=a.typeIsObject,c=r(1),h=c.assert,d=c.rethrowAssertionErrorRejection,f=r(3),p=f.DequeueValue,v=f.EnqueueValueWithSize,m=f.PeekQueueValue,g=f.ResetQueue,y=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.size,a=r.highWaterMark,o=void 0===a?1:a;if(i(this,e),this._state="writable",this._storedError=void 0,this._writer=void 0,this._writableStreamController=void 0,this._writeRequests=[],this._inFlightWriteRequest=void 0,this._closeRequest=void 0,this._inFlightCloseRequest=void 0,this._pendingAbortRequest=void 0,this._backpressure=!1,void 0!==t.type)throw new RangeError("Invalid type is specified");this._writableStreamController=new N(this,t,n,o),this._writableStreamController.__startSteps()}return n(e,[{key:"abort",value:function(e){return!1===_(this)?Promise.reject(G("abort")):!0===A(this)?Promise.reject(new TypeError("Cannot abort a stream that already has a writer")):S(this,e)}},{key:"getWriter",value:function(){if(!1===_(this))throw G("getWriter");return b(this)}},{key:"locked",get:function(){if(!1===_(this))throw G("locked");return A(this)}}]),e}();function b(e){return new O(e)}function _(e){return!!l(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function A(e){return h(!0===_(e),"IsWritableStreamLocked should only be used on known writable streams"),void 0!==e._writer}function S(e,t){var r=e._state;if("closed"===r)return Promise.resolve(void 0);if("errored"===r)return Promise.reject(e._storedError);var n=new TypeError("Requested to abort");if(void 0!==e._pendingAbortRequest)return Promise.reject(n);h("writable"===r||"erroring"===r,"state must be writable or erroring");var i=!1;"erroring"===r&&(i=!0,t=void 0);var a=new Promise(function(r,n){e._pendingAbortRequest={_resolve:r,_reject:n,_reason:t,_wasAlreadyErroring:i}});return!1===i&&k(e,n),a}function w(e,t){var r=e._state;"writable"!==r?(h("erroring"===r),x(e)):k(e,t)}function k(e,t){h(void 0===e._storedError,"stream._storedError === undefined"),h("writable"===e._state,"state must be writable");var r=e._writableStreamController;h(void 0!==r,"controller must not be undefined"),e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&M(n,t),!1===R(e)&&!0===r._started&&x(e)}function x(e){h("erroring"===e._state,"stream._state === erroring"),h(!1===R(e),"WritableStreamHasOperationMarkedInFlight(stream) === false"),e._state="errored",e._writableStreamController.__errorSteps();for(var t=e._storedError,r=0;r<e._writeRequests.length;r++){e._writeRequests[r]._reject(t)}if(e._writeRequests=[],void 0!==e._pendingAbortRequest){var n=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,!0===n._wasAlreadyErroring)return n._reject(t),void T(e);e._writableStreamController.__abortSteps(n._reason).then(function(){n._resolve(),T(e)},function(t){n._reject(t),T(e)})}else T(e)}function P(e){h(void 0!==e._inFlightCloseRequest),e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0;var t=e._state;h("writable"===t||"erroring"===t),"erroring"===t&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var r=e._writer;void 0!==r&&function(e){h(void 0!==e._closedPromise_resolve,"writer._closedPromise_resolve !== undefined"),h(void 0!==e._closedPromise_reject,"writer._closedPromise_reject !== undefined"),h("pending"===e._closedPromiseState,"writer._closedPromiseState is pending"),e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}(r),h(void 0===e._pendingAbortRequest,"stream._pendingAbortRequest === undefined"),h(void 0===e._storedError,"stream._storedError === undefined")}function C(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function R(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}function T(e){h("errored"===e._state,'_stream_.[[state]] is `"errored"`'),void 0!==e._closeRequest&&(h(void 0===e._inFlightCloseRequest),e._closeRequest._reject(e._storedError),e._closeRequest=void 0);var t=e._writer;void 0!==t&&(V(t,e._storedError),t._closedPromise.catch(function(){}))}function E(e,t){h("writable"===e._state),h(!1===C(e));var r=e._writer;void 0!==r&&t!==e._backpressure&&(!0===t?function(e){h(void 0===e._readyPromise_resolve,"writer._readyPromise_resolve === undefined"),h(void 0===e._readyPromise_reject,"writer._readyPromise_reject === undefined"),e._readyPromise=new Promise(function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r}),e._readyPromiseState="pending"}(r):(h(!1===t),J(r))),e._backpressure=t}e.exports={AcquireWritableStreamDefaultWriter:b,IsWritableStream:_,IsWritableStreamLocked:A,WritableStream:y,WritableStreamAbort:S,WritableStreamDefaultControllerError:z,WritableStreamDefaultWriterCloseWithErrorPropagation:function(e){var t=e._ownerWritableStream;h(void 0!==t);var r=t._state;if(!0===C(t)||"closed"===r)return Promise.resolve();if("errored"===r)return Promise.reject(t._storedError);return h("writable"===r||"erroring"===r),I(e)},WritableStreamDefaultWriterRelease:j,WritableStreamDefaultWriterWrite:D,WritableStreamCloseQueuedOrInFlight:C};var O=function(){function e(t){if(i(this,e),!1===_(t))throw new TypeError("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===A(t))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=t,t._writer=this;var r,n=t._state;if("writable"===n)!1===C(t)&&!0===t._backpressure?((r=this)._readyPromise=new Promise(function(e,t){r._readyPromise_resolve=e,r._readyPromise_reject=t}),r._readyPromiseState="pending"):K(this),Y(this);else if("erroring"===n)Q(this,t._storedError),this._readyPromise.catch(function(){}),Y(this);else if("closed"===n)K(this),function(e){e._closedPromise=Promise.resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}(this);else{h("errored"===n,"state must be errored");var a=t._storedError;Q(this,a),this._readyPromise.catch(function(){}),function(e,t){e._closedPromise=Promise.reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}(this,a),this._closedPromise.catch(function(){})}}return n(e,[{key:"abort",value:function(e){return!1===F(this)?Promise.reject(H("abort")):void 0===this._ownerWritableStream?Promise.reject(X("abort")):function(e,t){var r=e._ownerWritableStream;return h(void 0!==r),S(r,t)}(this,e)}},{key:"close",value:function(){if(!1===F(this))return Promise.reject(H("close"));var e=this._ownerWritableStream;return void 0===e?Promise.reject(X("close")):!0===C(e)?Promise.reject(new TypeError("cannot close an already-closing stream")):I(this)}},{key:"releaseLock",value:function(){if(!1===F(this))throw H("releaseLock");var e=this._ownerWritableStream;void 0!==e&&(h(void 0!==e._writer),j(this))}},{key:"write",value:function(e){return!1===F(this)?Promise.reject(H("write")):void 0===this._ownerWritableStream?Promise.reject(X("write to")):D(this,e)}},{key:"closed",get:function(){return!1===F(this)?Promise.reject(H("closed")):this._closedPromise}},{key:"desiredSize",get:function(){if(!1===F(this))throw H("desiredSize");if(void 0===this._ownerWritableStream)throw X("desiredSize");return function(e){var t=e._ownerWritableStream,r=t._state;if("errored"===r||"erroring"===r)return null;if("closed"===r)return 0;return q(t._writableStreamController)}(this)}},{key:"ready",get:function(){return!1===F(this)?Promise.reject(H("ready")):this._readyPromise}}]),e}();function F(e){return!!l(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")}function I(e){var t=e._ownerWritableStream;h(void 0!==t);var r=t._state;if("closed"===r||"errored"===r)return Promise.reject(new TypeError("The stream (in "+r+" state) is not in the writable state and cannot be closed"));h("writable"===r||"erroring"===r),h(!1===C(t));var n,i=new Promise(function(e,r){var n={_resolve:e,_reject:r};t._closeRequest=n});return!0===t._backpressure&&"writable"===r&&J(e),n=t._writableStreamController,v(n,"close",0),W(n),i}function L(e,t){"pending"===e._closedPromiseState?V(e,t):function(e,t){h(void 0===e._closedPromise_resolve,"writer._closedPromise_resolve === undefined"),h(void 0===e._closedPromise_reject,"writer._closedPromise_reject === undefined"),h("pending"!==e._closedPromiseState,"writer._closedPromiseState is not pending"),e._closedPromise=Promise.reject(t),e._closedPromiseState="rejected"}(e,t),e._closedPromise.catch(function(){})}function M(e,t){"pending"===e._readyPromiseState?function(e,t){h(void 0!==e._readyPromise_resolve,"writer._readyPromise_resolve !== undefined"),h(void 0!==e._readyPromise_reject,"writer._readyPromise_reject !== undefined"),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}(e,t):function(e,t){h(void 0===e._readyPromise_resolve,"writer._readyPromise_resolve === undefined"),h(void 0===e._readyPromise_reject,"writer._readyPromise_reject === undefined"),e._readyPromise=Promise.reject(t),e._readyPromiseState="rejected"}(e,t),e._readyPromise.catch(function(){})}function j(e){var t=e._ownerWritableStream;h(void 0!==t),h(t._writer===e);var r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");M(e,r),L(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function D(e,t){var r=e._ownerWritableStream;h(void 0!==r);var n=r._writableStreamController,i=function(e,t){var r=e._strategySize;if(void 0===r)return 1;try{return r(t)}catch(t){return U(e,t),1}}(n,t);if(r!==e._ownerWritableStream)return Promise.reject(X("write to"));var a=r._state;if("errored"===a)return Promise.reject(r._storedError);if(!0===C(r)||"closed"===a)return Promise.reject(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===a)return Promise.reject(r._storedError);h("writable"===a);var o=function(e){return h(!0===A(e)),h("writable"===e._state),new Promise(function(t,r){var n={_resolve:t,_reject:r};e._writeRequests.push(n)})}(r);return function(e,t,r){var n={chunk:t};try{v(e,n,r)}catch(t){return void U(e,t)}var i=e._controlledWritableStream;if(!1===C(i)&&"writable"===i._state){var a=B(e);E(i,a)}W(e)}(n,t,i),o}var N=function(){function e(t,r,n,a){if(i(this,e),!1===_(t))throw new TypeError("WritableStreamDefaultController can only be constructed with a WritableStream instance");if(void 0!==t._writableStreamController)throw new TypeError("WritableStreamDefaultController instances can only be created by the WritableStream constructor");this._controlledWritableStream=t,this._underlyingSink=r,this._queue=void 0,this._queueTotalSize=void 0,g(this),this._started=!1;var o=u(n,a);this._strategySize=o.size,this._strategyHWM=o.highWaterMark,E(t,B(this))}return n(e,[{key:"error",value:function(e){if(!1===function(e){if(!l(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_underlyingSink"))return!1;return!0}(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&z(this,e)}},{key:"__abortSteps",value:function(e){return s(this._underlyingSink,"abort",[e])}},{key:"__errorSteps",value:function(){g(this)}},{key:"__startSteps",value:function(){var e=this,t=o(this._underlyingSink,"start",[this]),r=this._controlledWritableStream;Promise.resolve(t).then(function(){h("writable"===r._state||"erroring"===r._state),e._started=!0,W(e)},function(t){h("writable"===r._state||"erroring"===r._state),e._started=!0,w(r,t)}).catch(d)}}]),e}();function q(e){return e._strategyHWM-e._queueTotalSize}function W(e){var t=e._controlledWritableStream;if(!1!==e._started&&void 0===t._inFlightWriteRequest){var r=t._state;if("closed"!==r&&"errored"!==r)if("erroring"!==r){if(0!==e._queue.length){var n=m(e);"close"===n?function(e){var t=e._controlledWritableStream;(function(e){h(void 0===e._inFlightCloseRequest),h(void 0!==e._closeRequest),e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),p(e),h(0===e._queue.length,"queue must be empty once the final write record is dequeued"),s(e._underlyingSink,"close",[]).then(function(){P(t)},function(e){!function(e,t){h(void 0!==e._inFlightCloseRequest),e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,h("writable"===e._state||"erroring"===e._state),void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),w(e,t)}(t,e)}).catch(d)}(e):function(e,t){var r=e._controlledWritableStream;(function(e){h(void 0===e._inFlightWriteRequest,"there must be no pending write request"),h(0!==e._writeRequests.length,"writeRequests must not be empty"),e._inFlightWriteRequest=e._writeRequests.shift()})(r),s(e._underlyingSink,"write",[t,e]).then(function(){!function(e){h(void 0!==e._inFlightWriteRequest),e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(r);var t=r._state;if(h("writable"===t||"erroring"===t),p(e),!1===C(r)&&"writable"===t){var n=B(e);E(r,n)}W(e)},function(e){!function(e,t){h(void 0!==e._inFlightWriteRequest),e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,h("writable"===e._state||"erroring"===e._state),w(e,t)}(r,e)}).catch(d)}(e,n.chunk)}}else x(t)}}function U(e,t){"writable"===e._controlledWritableStream._state&&z(e,t)}function B(e){return q(e)<=0}function z(e,t){var r=e._controlledWritableStream;h("writable"===r._state),k(r,t)}function G(e){return new TypeError("WritableStream.prototype."+e+" can only be used on a WritableStream")}function H(e){return new TypeError("WritableStreamDefaultWriter.prototype."+e+" can only be used on a WritableStreamDefaultWriter")}function X(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function Y(e){e._closedPromise=new Promise(function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"})}function V(e,t){h(void 0!==e._closedPromise_resolve,"writer._closedPromise_resolve !== undefined"),h(void 0!==e._closedPromise_reject,"writer._closedPromise_reject !== undefined"),h("pending"===e._closedPromiseState,"writer._closedPromiseState is pending"),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}function Q(e,t){e._readyPromise=Promise.reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}function K(e){e._readyPromise=Promise.resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled"}function J(e){h(void 0!==e._readyPromise_resolve,"writer._readyPromise_resolve !== undefined"),h(void 0!==e._readyPromise_reject,"writer._readyPromise_reject !== undefined"),e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled"}},function(e,t,r){var n=r(0).IsFiniteNonNegativeNumber,i=r(1).assert;t.DequeueValue=function(e){i("_queue"in e&&"_queueTotalSize"in e,"Spec-level failure: DequeueValue should only be used on containers with [[queue]] and [[queueTotalSize]]."),i(e._queue.length>0,"Spec-level failure: should never dequeue from an empty queue.");var t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value},t.EnqueueValueWithSize=function(e,t,r){if(i("_queue"in e&&"_queueTotalSize"in e,"Spec-level failure: EnqueueValueWithSize should only be used on containers with [[queue]] and [[queueTotalSize]]."),r=Number(r),!n(r))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r}),e._queueTotalSize+=r},t.PeekQueueValue=function(e){return i("_queue"in e&&"_queueTotalSize"in e,"Spec-level failure: PeekQueueValue should only be used on containers with [[queue]] and [[queueTotalSize]]."),i(e._queue.length>0,"Spec-level failure: should never peek at an empty queue."),e._queue[0].value},t.ResetQueue=function(e){i("_queue"in e&&"_queueTotalSize"in e,"Spec-level failure: ResetQueue should only be used on containers with [[queue]] and [[queueTotalSize]]."),e._queue=[],e._queueTotalSize=0}},function(e,t,r){var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=r(0),o=a.ArrayBufferCopy,s=a.CreateIterResultObject,u=a.IsFiniteNonNegativeNumber,l=a.InvokeOrNoop,c=a.PromiseInvokeOrNoop,h=a.TransferArrayBuffer,d=a.ValidateAndNormalizeQueuingStrategy,f=a.ValidateAndNormalizeHighWaterMark,p=r(0),v=p.createArrayFromList,m=p.createDataProperty,g=p.typeIsObject,y=r(1),b=y.assert,_=y.rethrowAssertionErrorRejection,A=r(3),S=A.DequeueValue,w=A.EnqueueValueWithSize,k=A.ResetQueue,x=r(2),P=x.AcquireWritableStreamDefaultWriter,C=x.IsWritableStream,R=x.IsWritableStreamLocked,T=x.WritableStreamAbort,E=x.WritableStreamDefaultWriterCloseWithErrorPropagation,O=x.WritableStreamDefaultWriterRelease,F=x.WritableStreamDefaultWriterWrite,I=x.WritableStreamCloseQueuedOrInFlight,L=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.size,a=r.highWaterMark;i(this,e),this._state="readable",this._reader=void 0,this._storedError=void 0,this._disturbed=!1,this._readableStreamController=void 0;var o=t.type;if("bytes"===String(o))void 0===a&&(a=0),this._readableStreamController=new de(this,t,a);else{if(void 0!==o)throw new RangeError("Invalid type is specified");void 0===a&&(a=1),this._readableStreamController=new ne(this,t,n,a)}}return n(e,[{key:"cancel",value:function(e){return!1===j(this)?Promise.reject(Te("cancel")):!0===D(this)?Promise.reject(new TypeError("Cannot cancel a stream that already has a reader")):U(this,e)}},{key:"getReader",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mode;if(!1===j(this))throw Te("getReader");if(void 0===e)return M(this);if("byob"===(e=String(e)))return new K(this);throw new RangeError("Invalid mode is specified")}},{key:"pipeThrough",value:function(e,t){var r=e.writable,n=e.readable;return function(e){try{Promise.prototype.then.call(e,void 0,function(){})}catch(e){}}(this.pipeTo(r,t)),n}},{key:"pipeTo",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.preventClose,i=r.preventAbort,a=r.preventCancel;if(!1===j(this))return Promise.reject(Te("pipeTo"));if(!1===C(e))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));if(n=Boolean(n),i=Boolean(i),a=Boolean(a),!0===D(this))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream"));if(!0===R(e))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream"));var o=M(this),s=P(e),u=!1,l=Promise.resolve();return new Promise(function(r,c){var h,d,f;if(m(t,o._closedPromise,function(t){!1===i?g(function(){return T(e,t)},!0,t):y(!0,t)}),m(e,s._closedPromise,function(e){!1===a?g(function(){return U(t,e)},!0,e):y(!0,e)}),h=t,d=o._closedPromise,f=function(){!1===n?g(function(){return E(s)}):y()},"closed"===h._state?f():d.then(f).catch(_),!0===I(e)||"closed"===e._state){var p=new TypeError("the destination writable stream closed before all data could be piped to it");!1===a?g(function(){return U(t,p)},!0,p):y(!0,p)}function v(){var e=l;return l.then(function(){return e!==l?v():void 0})}function m(e,t,r){"errored"===e._state?r(e._storedError):t.catch(r).catch(_)}function g(t,r,n){function i(){t().then(function(){return b(r,n)},function(e){return b(!0,e)}).catch(_)}!0!==u&&(u=!0,"writable"===e._state&&!1===I(e)?v().then(i):i())}function y(t,r){!0!==u&&(u=!0,"writable"===e._state&&!1===I(e)?v().then(function(){return b(t,r)}).catch(_):b(t,r))}function b(e,t){O(s),te(o),e?c(t):r(void 0)}(function e(){return l=Promise.resolve(),!0===u?Promise.resolve():s._readyPromise.then(function(){return re(o).then(function(e){var t=e.value;!0!==e.done&&(l=F(s,t).catch(function(){}))})}).then(e)})().catch(function(e){l=Promise.resolve(),_(e)})})}},{key:"tee",value:function(){if(!1===j(this))throw Te("tee");var e=N(this,!1);return v(e)}},{key:"locked",get:function(){if(!1===j(this))throw Te("locked");return D(this)}}]),e}();function M(e){return new Q(e)}function j(e){return!!g(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function D(e){return b(!0===j(e),"IsReadableStreamLocked should only be used on known readable streams"),void 0!==e._reader}function N(e,t){b(!0===j(e)),b("boolean"==typeof t);var r=M(e),n={closedOrErrored:!1,canceled1:!1,canceled2:!1,reason1:void 0,reason2:void 0};n.promise=new Promise(function(e){n._resolve=e});var i=function(){return function e(){var t=e._reader,r=e._branch1,n=e._branch2,i=e._teeState;return re(t).then(function(e){b(g(e));var t=e.value,a=e.done;if(b("boolean"==typeof a),!0===a&&!1===i.closedOrErrored&&(!1===i.canceled1&&oe(r),!1===i.canceled2&&oe(n),i.closedOrErrored=!0),!0!==i.closedOrErrored){var o=t,s=t;!1===i.canceled1&&se(r,o),!1===i.canceled2&&se(n,s)}})}}();i._reader=r,i._teeState=n,i._cloneForBranch2=t;var a=function(){return function e(t){var r=e._stream,n=e._teeState;n.canceled1=!0;n.reason1=t;if(!0===n.canceled2){var i=v([n.reason1,n.reason2]),a=U(r,i);n._resolve(a)}return n.promise}}();a._stream=e,a._teeState=n;var o=function(){return function e(t){var r=e._stream,n=e._teeState;n.canceled2=!0;n.reason2=t;if(!0===n.canceled1){var i=v([n.reason1,n.reason2]),a=U(r,i);n._resolve(a)}return n.promise}}();o._stream=e,o._teeState=n;var s=Object.create(Object.prototype);m(s,"pull",i),m(s,"cancel",a);var u=new L(s),l=Object.create(Object.prototype);m(l,"pull",i),m(l,"cancel",o);var c=new L(l);return i._branch1=u._readableStreamController,i._branch2=c._readableStreamController,r._closedPromise.catch(function(e){!0!==n.closedOrErrored&&(ue(i._branch1,e),ue(i._branch2,e),n.closedOrErrored=!0)}),[u,c]}function q(e){return b(!0===J(e._reader)),b("readable"===e._state||"closed"===e._state),new Promise(function(t,r){var n={_resolve:t,_reject:r};e._reader._readIntoRequests.push(n)})}function W(e){return b(!0===Z(e._reader)),b("readable"===e._state),new Promise(function(t,r){var n={_resolve:t,_reject:r};e._reader._readRequests.push(n)})}function U(e,t){return e._disturbed=!0,"closed"===e._state?Promise.resolve(void 0):"errored"===e._state?Promise.reject(e._storedError):(B(e),e._readableStreamController.__cancelSteps(t).then(function(){}))}function B(e){b("readable"===e._state),e._state="closed";var t=e._reader;if(void 0!==t){if(!0===Z(t)){for(var r=0;r<t._readRequests.length;r++){(0,t._readRequests[r]._resolve)(s(void 0,!0))}t._readRequests=[]}!function(e){b(void 0!==e._closedPromise_resolve),b(void 0!==e._closedPromise_reject),e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}(t)}}function z(e,t){b(!0===j(e),"stream must be ReadableStream"),b("readable"===e._state,"state must be readable"),e._state="errored",e._storedError=t;var r=e._reader;if(void 0!==r){if(!0===Z(r)){for(var n=0;n<r._readRequests.length;n++){r._readRequests[n]._reject(t)}r._readRequests=[]}else{b(J(r),"reader must be ReadableStreamBYOBReader");for(var i=0;i<r._readIntoRequests.length;i++){r._readIntoRequests[i]._reject(t)}r._readIntoRequests=[]}Fe(r,t),r._closedPromise.catch(function(){})}}function G(e,t,r){var n=e._reader;b(n._readRequests.length>0),n._readRequests.shift()._resolve(s(t,r))}function H(e){return e._reader._readIntoRequests.length}function X(e){return e._reader._readRequests.length}function Y(e){var t=e._reader;return void 0!==t&&!1!==J(t)}function V(e){var t=e._reader;return void 0!==t&&!1!==Z(t)}e.exports={ReadableStream:L,IsReadableStreamDisturbed:function(e){return b(!0===j(e),"IsReadableStreamDisturbed should only be used on known readable streams"),e._disturbed},ReadableStreamDefaultControllerClose:oe,ReadableStreamDefaultControllerEnqueue:se,ReadableStreamDefaultControllerError:ue,ReadableStreamDefaultControllerGetDesiredSize:ce};var Q=function(){function e(t){if(i(this,e),!1===j(t))throw new TypeError("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===D(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");$(this,t),this._readRequests=[]}return n(e,[{key:"cancel",value:function(e){return!1===Z(this)?Promise.reject(Oe("cancel")):void 0===this._ownerReadableStream?Promise.reject(Ee("cancel")):ee(this,e)}},{key:"read",value:function(){return!1===Z(this)?Promise.reject(Oe("read")):void 0===this._ownerReadableStream?Promise.reject(Ee("read from")):re(this)}},{key:"releaseLock",value:function(){if(!1===Z(this))throw Oe("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");te(this)}}},{key:"closed",get:function(){return!1===Z(this)?Promise.reject(Oe("closed")):this._closedPromise}}]),e}(),K=function(){function e(t){if(i(this,e),!j(t))throw new TypeError("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===fe(t._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(D(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");$(this,t),this._readIntoRequests=[]}return n(e,[{key:"cancel",value:function(e){return J(this)?void 0===this._ownerReadableStream?Promise.reject(Ee("cancel")):ee(this,e):Promise.reject(Ie("cancel"))}},{key:"read",value:function(e){return J(this)?void 0===this._ownerReadableStream?Promise.reject(Ee("read from")):ArrayBuffer.isView(e)?0===e.byteLength?Promise.reject(new TypeError("view must have non-zero byteLength")):function(e,t){var r=e._ownerReadableStream;if(b(void 0!==r),r._disturbed=!0,"errored"===r._state)return Promise.reject(r._storedError);return function(e,t){var r=e._controlledReadableStream,n=1;t.constructor!==DataView&&(n=t.constructor.BYTES_PER_ELEMENT);var i=t.constructor,a={buffer:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:n,ctor:i,readerType:"byob"};if(e._pendingPullIntos.length>0)return a.buffer=h(a.buffer),e._pendingPullIntos.push(a),q(r);if("closed"===r._state){var o=new t.constructor(a.buffer,a.byteOffset,0);return Promise.resolve(s(o,!0))}if(e._queueTotalSize>0){if(!0===_e(e,a)){var u=ye(a);return Se(e),Promise.resolve(s(u,!1))}if(!0===e._closeRequested){var l=new TypeError("Insufficient bytes to fill elements in the given buffer");return Ce(e,l),Promise.reject(l)}}a.buffer=h(a.buffer),e._pendingPullIntos.push(a);var c=q(r);return ve(e),c}(r._readableStreamController,t)}(this,e):Promise.reject(new TypeError("view must be an array buffer view")):Promise.reject(Ie("read"))}},{key:"releaseLock",value:function(){if(!J(this))throw Ie("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");te(this)}}},{key:"closed",get:function(){return J(this)?this._closedPromise:Promise.reject(Ie("closed"))}}]),e}();function J(e){return!!g(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function Z(e){return!!g(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function $(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?function(e){e._closedPromise=new Promise(function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r})}(e):"closed"===t._state?function(e){e._closedPromise=Promise.resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}(e):(b("errored"===t._state,"state must be errored"),function(e,t){e._closedPromise=Promise.reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}(e,t._storedError),e._closedPromise.catch(function(){}))}function ee(e,t){var r=e._ownerReadableStream;return b(void 0!==r),U(r,t)}function te(e){b(void 0!==e._ownerReadableStream),b(e._ownerReadableStream._reader===e),"readable"===e._ownerReadableStream._state?Fe(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e,t){b(void 0===e._closedPromise_resolve),b(void 0===e._closedPromise_reject),e._closedPromise=Promise.reject(t)}(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),e._closedPromise.catch(function(){}),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function re(e){var t=e._ownerReadableStream;return b(void 0!==t),t._disturbed=!0,"closed"===t._state?Promise.resolve(s(void 0,!0)):"errored"===t._state?Promise.reject(t._storedError):(b("readable"===t._state),t._readableStreamController.__pullSteps())}var ne=function(){function e(t,r,n,a){if(i(this,e),!1===j(t))throw new TypeError("ReadableStreamDefaultController can only be constructed with a ReadableStream instance");if(void 0!==t._readableStreamController)throw new TypeError("ReadableStreamDefaultController instances can only be created by the ReadableStream constructor");this._controlledReadableStream=t,this._underlyingSource=r,this._queue=void 0,this._queueTotalSize=void 0,k(this),this._started=!1,this._closeRequested=!1,this._pullAgain=!1,this._pulling=!1;var o=d(n,a);this._strategySize=o.size,this._strategyHWM=o.highWaterMark;var s=this,u=l(r,"start",[this]);Promise.resolve(u).then(function(){s._started=!0,b(!1===s._pulling),b(!1===s._pullAgain),ae(s)},function(e){le(s,e)}).catch(_)}return n(e,[{key:"close",value:function(){if(!1===ie(this))throw Le("close");if(!0===this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableStream._state;if("readable"!==e)throw new TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed");oe(this)}},{key:"enqueue",value:function(e){if(!1===ie(this))throw Le("enqueue");if(!0===this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableStream._state;if("readable"!==t)throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be enqueued to");return se(this,e)}},{key:"error",value:function(e){if(!1===ie(this))throw Le("error");var t=this._controlledReadableStream;if("readable"!==t._state)throw new TypeError("The stream is "+t._state+" and so cannot be errored");ue(this,e)}},{key:"__cancelSteps",value:function(e){return k(this),c(this._underlyingSource,"cancel",[e])}},{key:"__pullSteps",value:function(){var e=this._controlledReadableStream;if(this._queue.length>0){var t=S(this);return!0===this._closeRequested&&0===this._queue.length?B(e):ae(this),Promise.resolve(s(t,!1))}var r=W(e);return ae(this),r}},{key:"desiredSize",get:function(){if(!1===ie(this))throw Le("desiredSize");return ce(this)}}]),e}();function ie(e){return!!g(e)&&!!Object.prototype.hasOwnProperty.call(e,"_underlyingSource")}function ae(e){!1!==function(e){var t=e._controlledReadableStream;if("closed"===t._state||"errored"===t._state)return!1;if(!0===e._closeRequested)return!1;if(!1===e._started)return!1;if(!0===D(t)&&X(t)>0)return!0;if(ce(e)>0)return!0;return!1}(e)&&(!0!==e._pulling?(b(!1===e._pullAgain),e._pulling=!0,c(e._underlyingSource,"pull",[e]).then(function(){if(e._pulling=!1,!0===e._pullAgain)return e._pullAgain=!1,ae(e)},function(t){le(e,t)}).catch(_)):e._pullAgain=!0)}function oe(e){var t=e._controlledReadableStream;b(!1===e._closeRequested),b("readable"===t._state),e._closeRequested=!0,0===e._queue.length&&B(t)}function se(e,t){var r=e._controlledReadableStream;if(b(!1===e._closeRequested),b("readable"===r._state),!0===D(r)&&X(r)>0)G(r,t,!1);else{var n=1;if(void 0!==e._strategySize){var i=e._strategySize;try{n=i(t)}catch(t){throw le(e,t),t}}try{w(e,t,n)}catch(t){throw le(e,t),t}}ae(e)}function ue(e,t){var r=e._controlledReadableStream;b("readable"===r._state),k(e),z(r,t)}function le(e,t){"readable"===e._controlledReadableStream._state&&ue(e,t)}function ce(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}var he=function(){function e(t,r){i(this,e),this._associatedReadableByteStreamController=t,this._view=r}return n(e,[{key:"respond",value:function(e){if(!1===pe(this))throw Me("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");!function(e,t){if(t=Number(t),!1===u(t))throw new RangeError("bytesWritten must be a finite");b(e._pendingPullIntos.length>0),xe(e,t)}(this._associatedReadableByteStreamController,e)}},{key:"respondWithNewView",value:function(e){if(!1===pe(this))throw Me("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");!function(e,t){b(e._pendingPullIntos.length>0);var r=e._pendingPullIntos[0];if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.byteLength!==t.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");r.buffer=t.buffer,xe(e,t.byteLength)}(this._associatedReadableByteStreamController,e)}},{key:"view",get:function(){return this._view}}]),e}(),de=function(){function e(t,r,n){if(i(this,e),!1===j(t))throw new TypeError("ReadableByteStreamController can only be constructed with a ReadableStream instance given a byte source");if(void 0!==t._readableStreamController)throw new TypeError("ReadableByteStreamController instances can only be created by the ReadableStream constructor given a byte source");this._controlledReadableStream=t,this._underlyingByteSource=r,this._pullAgain=!1,this._pulling=!1,me(this),this._queue=this._queueTotalSize=void 0,k(this),this._closeRequested=!1,this._started=!1,this._strategyHWM=f(n);var a=r.autoAllocateChunkSize;if(void 0!==a&&(!1===Number.isInteger(a)||a<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");this._autoAllocateChunkSize=a,this._pendingPullIntos=[];var o=this,s=l(r,"start",[this]);Promise.resolve(s).then(function(){o._started=!0,b(!1===o._pulling),b(!1===o._pullAgain),ve(o)},function(e){"readable"===t._state&&Ce(o,e)}).catch(_)}return n(e,[{key:"close",value:function(){if(!1===fe(this))throw je("close");if(!0===this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableStream._state;if("readable"!==e)throw new TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed");!function(e){var t=e._controlledReadableStream;if(b(!1===e._closeRequested),b("readable"===t._state),e._queueTotalSize>0)return void(e._closeRequested=!0);if(e._pendingPullIntos.length>0){var r=e._pendingPullIntos[0];if(r.bytesFilled>0){var n=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Ce(e,n),n}}B(t)}(this)}},{key:"enqueue",value:function(e){if(!1===fe(this))throw je("enqueue");if(!0===this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableStream._state;if("readable"!==t)throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(e))throw new TypeError("You can only enqueue array buffer views when using a ReadableByteStreamController");!function(e,t){var r=e._controlledReadableStream;b(!1===e._closeRequested),b("readable"===r._state);var n=t.buffer,i=t.byteOffset,a=t.byteLength,o=h(n);if(!0===V(r))if(0===X(r))be(e,o,i,a);else{b(0===e._queue.length);var s=new Uint8Array(o,i,a);G(r,s,!1)}else!0===Y(r)?(be(e,o,i,a),ke(e)):(b(!1===D(r),"stream must not be locked"),be(e,o,i,a))}(this,e)}},{key:"error",value:function(e){if(!1===fe(this))throw je("error");var t=this._controlledReadableStream;if("readable"!==t._state)throw new TypeError("The stream is "+t._state+" and so cannot be errored");Ce(this,e)}},{key:"__cancelSteps",value:function(e){this._pendingPullIntos.length>0&&(this._pendingPullIntos[0].bytesFilled=0);return k(this),c(this._underlyingByteSource,"cancel",[e])}},{key:"__pullSteps",value:function(){var e=this._controlledReadableStream;if(b(!0===V(e)),this._queueTotalSize>0){b(0===X(e));var t=this._queue.shift();this._queueTotalSize-=t.byteLength,Se(this);var r=void 0;try{r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}catch(e){return Promise.reject(e)}return Promise.resolve(s(r,!1))}var n=this._autoAllocateChunkSize;if(void 0!==n){var i=void 0;try{i=new ArrayBuffer(n)}catch(e){return Promise.reject(e)}var a={buffer:i,byteOffset:0,byteLength:n,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(a)}var o=W(e);return ve(this),o}},{key:"byobRequest",get:function(){if(!1===fe(this))throw je("byobRequest");if(void 0===this._byobRequest&&this._pendingPullIntos.length>0){var e=this._pendingPullIntos[0],t=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled);this._byobRequest=new he(this,t)}return this._byobRequest}},{key:"desiredSize",get:function(){if(!1===fe(this))throw je("desiredSize");return Re(this)}}]),e}();function fe(e){return!!g(e)&&!!Object.prototype.hasOwnProperty.call(e,"_underlyingByteSource")}function pe(e){return!!g(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function ve(e){!1!==function(e){var t=e._controlledReadableStream;if("readable"!==t._state)return!1;if(!0===e._closeRequested)return!1;if(!1===e._started)return!1;if(!0===V(t)&&X(t)>0)return!0;if(!0===Y(t)&&H(t)>0)return!0;if(Re(e)>0)return!0;return!1}(e)&&(!0!==e._pulling?(b(!1===e._pullAgain),e._pulling=!0,c(e._underlyingByteSource,"pull",[e]).then(function(){e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,ve(e))},function(t){"readable"===e._controlledReadableStream._state&&Ce(e,t)}).catch(_)):e._pullAgain=!0)}function me(e){we(e),e._pendingPullIntos=[]}function ge(e,t){b("errored"!==e._state,"state must not be errored");var r=!1;"closed"===e._state&&(b(0===t.bytesFilled),r=!0);var n=ye(t);"default"===t.readerType?G(e,n,r):(b("byob"===t.readerType),function(e,t,r){var n=e._reader;b(n._readIntoRequests.length>0),n._readIntoRequests.shift()._resolve(s(t,r))}(e,n,r))}function ye(e){var t=e.bytesFilled,r=e.elementSize;return b(t<=e.byteLength),b(t%r==0),new e.ctor(e.buffer,e.byteOffset,t/r)}function be(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function _e(e,t){var r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),a=t.bytesFilled+i,s=a-a%r,u=i,l=!1;s>n&&(u=s-t.bytesFilled,l=!0);for(var c=e._queue;u>0;){var h=c[0],d=Math.min(u,h.byteLength),f=t.byteOffset+t.bytesFilled;o(t.buffer,f,h.buffer,h.byteOffset,d),h.byteLength===d?c.shift():(h.byteOffset+=d,h.byteLength-=d),e._queueTotalSize-=d,Ae(e,d,t),u-=d}return!1===l&&(b(0===e._queueTotalSize,"queue must be empty"),b(t.bytesFilled>0),b(t.bytesFilled<t.elementSize)),l}function Ae(e,t,r){b(0===e._pendingPullIntos.length||e._pendingPullIntos[0]===r),we(e),r.bytesFilled+=t}function Se(e){b("readable"===e._controlledReadableStream._state),0===e._queueTotalSize&&!0===e._closeRequested?B(e._controlledReadableStream):ve(e)}function we(e){void 0!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=void 0,e._byobRequest=void 0)}function ke(e){for(b(!1===e._closeRequested);e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos[0];!0===_e(e,t)&&(Pe(e),ge(e._controlledReadableStream,t))}}function xe(e,t){var r=e._pendingPullIntos[0],n=e._controlledReadableStream;if("closed"===n._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");!function(e,t){t.buffer=h(t.buffer),b(0===t.bytesFilled,"bytesFilled must be 0");var r=e._controlledReadableStream;if(!0===Y(r))for(;H(r)>0;)ge(r,Pe(e))}(e,r)}else b("readable"===n._state),function(e,t,r){if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range");if(Ae(e,t,r),!(r.bytesFilled<r.elementSize)){Pe(e);var n=r.bytesFilled%r.elementSize;if(n>0){var i=r.byteOffset+r.bytesFilled,a=r.buffer.slice(i-n,i);be(e,a,0,a.byteLength)}r.buffer=h(r.buffer),r.bytesFilled-=n,ge(e._controlledReadableStream,r),ke(e)}}(e,t,r)}function Pe(e){var t=e._pendingPullIntos.shift();return we(e),t}function Ce(e,t){var r=e._controlledReadableStream;b("readable"===r._state),me(e),k(e),z(r,t)}function Re(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Te(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}function Ee(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function Oe(e){return new TypeError("ReadableStreamDefaultReader.prototype."+e+" can only be used on a ReadableStreamDefaultReader")}function Fe(e,t){b(void 0!==e._closedPromise_resolve),b(void 0!==e._closedPromise_reject),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function Ie(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}function Le(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function Me(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function je(e){return new TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}},function(e,t,r){var n=r(6),i=r(4),a=r(2);t.TransformStream=n.TransformStream,t.ReadableStream=i.ReadableStream,t.IsReadableStreamDisturbed=i.IsReadableStreamDisturbed,t.ReadableStreamDefaultControllerClose=i.ReadableStreamDefaultControllerClose,t.ReadableStreamDefaultControllerEnqueue=i.ReadableStreamDefaultControllerEnqueue,t.ReadableStreamDefaultControllerError=i.ReadableStreamDefaultControllerError,t.ReadableStreamDefaultControllerGetDesiredSize=i.ReadableStreamDefaultControllerGetDesiredSize,t.AcquireWritableStreamDefaultWriter=a.AcquireWritableStreamDefaultWriter,t.IsWritableStream=a.IsWritableStream,t.IsWritableStreamLocked=a.IsWritableStreamLocked,t.WritableStream=a.WritableStream,t.WritableStreamAbort=a.WritableStreamAbort,t.WritableStreamDefaultControllerError=a.WritableStreamDefaultControllerError,t.WritableStreamDefaultWriterCloseWithErrorPropagation=a.WritableStreamDefaultWriterCloseWithErrorPropagation,t.WritableStreamDefaultWriterRelease=a.WritableStreamDefaultWriterRelease,t.WritableStreamDefaultWriterWrite=a.WritableStreamDefaultWriterWrite},function(e,t,r){var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=r(1).assert,o=r(0),s=o.InvokeOrNoop,u=o.PromiseInvokeOrPerformFallback,l=o.PromiseInvokeOrNoop,c=o.typeIsObject,h=r(4),d=h.ReadableStream,f=h.ReadableStreamDefaultControllerClose,p=h.ReadableStreamDefaultControllerEnqueue,v=h.ReadableStreamDefaultControllerError,m=h.ReadableStreamDefaultControllerGetDesiredSize,g=r(2),y=g.WritableStream,b=g.WritableStreamDefaultControllerError;function _(e,t){if(!0===e._errored)throw new TypeError("TransformStream is already errored");if(!0===e._readableClosed)throw new TypeError("Readable side is already closed");var r=e._readableController;try{p(r,t)}catch(t){throw e._readableClosed=!0,S(e,t),e._storedError}!0===m(r)<=0&&!1===e._backpressure&&x(e,!0)}function A(e){a(!1===e._errored),a(!1===e._readableClosed);try{f(e._readableController)}catch(e){a(!1)}e._readableClosed=!0}function S(e,t){!1===e._errored&&w(e,t)}function w(e,t){a(!1===e._errored),e._errored=!0,e._storedError=t,!1===e._writableDone&&b(e._writableController,t),!1===e._readableClosed&&v(e._readableController,t)}function k(e){return a(void 0!==e._backpressureChangePromise,"_backpressureChangePromise should have been initialized"),!1===e._backpressure?Promise.resolve():(a(!0===e._backpressure,"_backpressure should have been initialized"),e._backpressureChangePromise)}function x(e,t){a(e._backpressure!==t,"TransformStreamSetBackpressure() should be called only when backpressure is changed"),void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(t),e._backpressureChangePromise=new Promise(function(t){e._backpressureChangePromise_resolve=t}),e._backpressureChangePromise.then(function(e){a(e!==t,"_backpressureChangePromise should be fulfilled only when backpressure is changed")}),e._backpressure=t}function P(e,t){return _(t._controlledTransformStream,e),Promise.resolve()}function C(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function R(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}var T=function(){function e(t,r){i(this,e),this._transformStream=t,this._startPromise=r}return n(e,[{key:"start",value:function(e){var t=this._transformStream;return t._writableController=e,this._startPromise.then(function(){return k(t)})}},{key:"write",value:function(e){return function(e,t){a(!1===e._errored),a(!1===e._transforming),a(!1===e._backpressure),e._transforming=!0;var r=e._transformer,n=e._transformStreamController;return u(r,"transform",[t,n],P,[t,n]).then(function(){return e._transforming=!1,k(e)},function(t){return S(e,t),Promise.reject(t)})}(this._transformStream,e)}},{key:"abort",value:function(){var e=this._transformStream;e._writableDone=!0,w(e,new TypeError("Writable side aborted"))}},{key:"close",value:function(){var e=this._transformStream;return a(!1===e._transforming),e._writableDone=!0,l(e._transformer,"flush",[e._transformStreamController]).then(function(){return!0===e._errored?Promise.reject(e._storedError):(!1===e._readableClosed&&A(e),Promise.resolve())}).catch(function(t){return S(e,t),Promise.reject(e._storedError)})}}]),e}(),E=function(){function e(t,r){i(this,e),this._transformStream=t,this._startPromise=r}return n(e,[{key:"start",value:function(e){var t=this._transformStream;return t._readableController=e,this._startPromise.then(function(){return a(void 0!==t._backpressureChangePromise,"_backpressureChangePromise should have been initialized"),!0===t._backpressure?Promise.resolve():(a(!1===t._backpressure,"_backpressure should have been initialized"),t._backpressureChangePromise)})}},{key:"pull",value:function(){var e=this._transformStream;return a(!0===e._backpressure,"pull() should be never called while _backpressure is false"),a(void 0!==e._backpressureChangePromise,"_backpressureChangePromise should have been initialized"),x(e,!1),e._backpressureChangePromise}},{key:"cancel",value:function(){var e=this._transformStream;e._readableClosed=!0,w(e,new TypeError("Readable side canceled"))}}]),e}(),O=function(){function e(t){if(i(this,e),!1===R(t))throw new TypeError("TransformStreamDefaultController can only be constructed with a TransformStream instance");if(void 0!==t._transformStreamController)throw new TypeError("TransformStreamDefaultController instances can only be created by the TransformStream constructor");this._controlledTransformStream=t}return n(e,[{key:"enqueue",value:function(e){if(!1===C(this))throw I("enqueue");_(this._controlledTransformStream,e)}},{key:"close",value:function(){if(!1===C(this))throw I("close");!function(e){if(!0===e._errored)throw new TypeError("TransformStream is already errored");if(!0===e._readableClosed)throw new TypeError("Readable side is already closed");A(e)}(this._controlledTransformStream)}},{key:"error",value:function(e){if(!1===C(this))throw I("error");!function(e,t){if(!0===e._errored)throw new TypeError("TransformStream is already errored");w(e,t)}(this._controlledTransformStream,e)}},{key:"desiredSize",get:function(){if(!1===C(this))throw I("desiredSize");var e=this._controlledTransformStream._readableController;return m(e)}}]),e}(),F=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this._transformer=t;var r=t.readableStrategy,n=t.writableStrategy;this._transforming=!1,this._errored=!1,this._storedError=void 0,this._writableController=void 0,this._readableController=void 0,this._transformStreamController=void 0,this._writableDone=!1,this._readableClosed=!1,this._backpressure=void 0,this._backpressureChangePromise=void 0,this._backpressureChangePromise_resolve=void 0,this._transformStreamController=new O(this);var o=void 0,u=new Promise(function(e){o=e}),l=new E(this,u);this._readable=new d(l,r);var c=new T(this,u);this._writable=new y(c,n),a(void 0!==this._writableController),a(void 0!==this._readableController),x(this,m(this._readableController)<=0);var h=this,f=s(t,"start",[h._transformStreamController]);o(f),u.catch(function(e){!1===h._errored&&(h._errored=!0,h._storedError=e)})}return n(e,[{key:"readable",get:function(){if(!1===R(this))throw L("readable");return this._readable}},{key:"writable",get:function(){if(!1===R(this))throw L("writable");return this._writable}}]),e}();function I(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function L(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}e.exports={TransformStream:F}},function(e,t,r){e.exports=r(5)}]))},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=!1;try{if("function"==typeof URL&&"object"===n(URL.prototype)&&"origin"in URL.prototype){var a=new URL("b","http://a");a.pathname="c%20d",i="http://a/c%20d"===a.href}}catch(e){}if(i)t.URL=URL;else{var o=r(146).URL,s=r(3).URL;s&&(o.createObjectURL=function(e){return s.createObjectURL.apply(s,arguments)},o.revokeObjectURL=function(e){s.revokeObjectURL(e)}),t.URL=o}},function(e,t,r){"use strict";!function(){var e=Object.create(null);e.ftp=21,e.file=0,e.gopher=70,e.http=80,e.https=443,e.ws=80,e.wss=443;var r=Object.create(null);function n(t){return void 0!==e[t]}function i(){d.call(this),this._isInvalid=!0}function a(e){return""===e&&i.call(this),e.toLowerCase()}function o(e){var t=e.charCodeAt(0);return t>32&&t<127&&-1===[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function s(e){var t=e.charCodeAt(0);return t>32&&t<127&&-1===[34,35,60,62,96].indexOf(t)?e:encodeURIComponent(e)}r["%2e"]=".",r[".%2e"]="..",r["%2e."]="..",r["%2e%2e"]="..";var u,l=/[a-zA-Z]/,c=/[a-zA-Z0-9\+\-\.]/;function h(t,h,d){function f(e){b.push(e)}var p=h||"scheme start",v=0,m="",g=!1,y=!1,b=[];e:for(;(t[v-1]!==u||0===v)&&!this._isInvalid;){var _=t[v];switch(p){case"scheme start":if(!_||!l.test(_)){if(h){f("Invalid scheme.");break e}m="",p="no scheme";continue}m+=_.toLowerCase(),p="scheme";break;case"scheme":if(_&&c.test(_))m+=_.toLowerCase();else{if(":"!==_){if(h){if(_===u)break e;f("Code point not allowed in scheme: "+_);break e}m="",v=0,p="no scheme";continue}if(this._scheme=m,m="",h)break e;n(this._scheme)&&(this._isRelative=!0),p="file"===this._scheme?"relative":this._isRelative&&d&&d._scheme===this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"===_?(this._query="?",p="query"):"#"===_?(this._fragment="#",p="fragment"):_!==u&&"\t"!==_&&"\n"!==_&&"\r"!==_&&(this._schemeData+=o(_));break;case"no scheme":if(d&&n(d._scheme)){p="relative";continue}f("Missing scheme."),i.call(this);break;case"relative or authority":if("/"!==_||"/"!==t[v+1]){f("Expected /, got: "+_),p="relative";continue}p="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!==this._scheme&&(this._scheme=d._scheme),_===u){this._host=d._host,this._port=d._port,this._path=d._path.slice(),this._query=d._query,this._username=d._username,this._password=d._password;break e}if("/"===_||"\\"===_)"\\"===_&&f("\\ is an invalid code point."),p="relative slash";else if("?"===_)this._host=d._host,this._port=d._port,this._path=d._path.slice(),this._query="?",this._username=d._username,this._password=d._password,p="query";else{if("#"!==_){var A=t[v+1],S=t[v+2];("file"!==this._scheme||!l.test(_)||":"!==A&&"|"!==A||S!==u&&"/"!==S&&"\\"!==S&&"?"!==S&&"#"!==S)&&(this._host=d._host,this._port=d._port,this._username=d._username,this._password=d._password,this._path=d._path.slice(),this._path.pop()),p="relative path";continue}this._host=d._host,this._port=d._port,this._path=d._path.slice(),this._query=d._query,this._fragment="#",this._username=d._username,this._password=d._password,p="fragment"}break;case"relative slash":if("/"!==_&&"\\"!==_){"file"!==this._scheme&&(this._host=d._host,this._port=d._port,this._username=d._username,this._password=d._password),p="relative path";continue}"\\"===_&&f("\\ is an invalid code point."),p="file"===this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!==_){f("Expected '/', got: "+_),p="authority ignore slashes";continue}p="authority second slash";break;case"authority second slash":if(p="authority ignore slashes","/"!==_){f("Expected '/', got: "+_);continue}break;case"authority ignore slashes":if("/"!==_&&"\\"!==_){p="authority";continue}f("Expected authority, got: "+_);break;case"authority":if("@"===_){g&&(f("@ already seen."),m+="%40"),g=!0;for(var w=0;w<m.length;w++){var k=m[w];if("\t"!==k&&"\n"!==k&&"\r"!==k)if(":"!==k||null!==this._password){var x=o(k);null!==this._password?this._password+=x:this._username+=x}else this._password="";else f("Invalid whitespace in authority.")}m=""}else{if(_===u||"/"===_||"\\"===_||"?"===_||"#"===_){v-=m.length,m="",p="host";continue}m+=_}break;case"file host":if(_===u||"/"===_||"\\"===_||"?"===_||"#"===_){2!==m.length||!l.test(m[0])||":"!==m[1]&&"|"!==m[1]?0===m.length?p="relative path start":(this._host=a.call(this,m),m="",p="relative path start"):p="relative path";continue}"\t"===_||"\n"===_||"\r"===_?f("Invalid whitespace in file host."):m+=_;break;case"host":case"hostname":if(":"!==_||y){if(_===u||"/"===_||"\\"===_||"?"===_||"#"===_){if(this._host=a.call(this,m),m="",p="relative path start",h)break e;continue}"\t"!==_&&"\n"!==_&&"\r"!==_?("["===_?y=!0:"]"===_&&(y=!1),m+=_):f("Invalid code point in host/hostname: "+_)}else if(this._host=a.call(this,m),m="",p="port","hostname"===h)break e;break;case"port":if(/[0-9]/.test(_))m+=_;else{if(_===u||"/"===_||"\\"===_||"?"===_||"#"===_||h){if(""!==m){var P=parseInt(m,10);P!==e[this._scheme]&&(this._port=P+""),m=""}if(h)break e;p="relative path start";continue}"\t"===_||"\n"===_||"\r"===_?f("Invalid code point in port: "+_):i.call(this)}break;case"relative path start":if("\\"===_&&f("'\\' not allowed in path."),p="relative path","/"!==_&&"\\"!==_)continue;break;case"relative path":var C;if(_!==u&&"/"!==_&&"\\"!==_&&(h||"?"!==_&&"#"!==_))"\t"!==_&&"\n"!==_&&"\r"!==_&&(m+=o(_));else"\\"===_&&f("\\ not allowed in relative path."),(C=r[m.toLowerCase()])&&(m=C),".."===m?(this._path.pop(),"/"!==_&&"\\"!==_&&this._path.push("")):"."===m&&"/"!==_&&"\\"!==_?this._path.push(""):"."!==m&&("file"===this._scheme&&0===this._path.length&&2===m.length&&l.test(m[0])&&"|"===m[1]&&(m=m[0]+":"),this._path.push(m)),m="","?"===_?(this._query="?",p="query"):"#"===_&&(this._fragment="#",p="fragment");break;case"query":h||"#"!==_?_!==u&&"\t"!==_&&"\n"!==_&&"\r"!==_&&(this._query+=s(_)):(this._fragment="#",p="fragment");break;case"fragment":_!==u&&"\t"!==_&&"\n"!==_&&"\r"!==_&&(this._fragment+=_)}v++}}function d(){this._scheme="",this._schemeData="",this._username="",this._password=null,this._host="",this._port="",this._path=[],this._query="",this._fragment="",this._isInvalid=!1,this._isRelative=!1}function f(e,t){void 0===t||t instanceof f||(t=new f(String(t))),this._url=e,d.call(this);var r=e.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");h.call(this,r,null,t)}f.prototype={toString:function(){return this.href},get href(){if(this._isInvalid)return this._url;var e="";return""===this._username&&null===this._password||(e=this._username+(null!==this._password?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+e+this.host:"")+this.pathname+this._query+this._fragment},set href(e){d.call(this),h.call(this,e)},get protocol(){return this._scheme+":"},set protocol(e){this._isInvalid||h.call(this,e+":","scheme start")},get host(){return this._isInvalid?"":this._port?this._host+":"+this._port:this._host},set host(e){!this._isInvalid&&this._isRelative&&h.call(this,e,"host")},get hostname(){return this._host},set hostname(e){!this._isInvalid&&this._isRelative&&h.call(this,e,"hostname")},get port(){return this._port},set port(e){!this._isInvalid&&this._isRelative&&h.call(this,e,"port")},get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData},set pathname(e){!this._isInvalid&&this._isRelative&&(this._path=[],h.call(this,e,"relative path start"))},get search(){return this._isInvalid||!this._query||"?"===this._query?"":this._query},set search(e){!this._isInvalid&&this._isRelative&&(this._query="?","?"===e[0]&&(e=e.slice(1)),h.call(this,e,"query"))},get hash(){return this._isInvalid||!this._fragment||"#"===this._fragment?"":this._fragment},set hash(e){this._isInvalid||(this._fragment="#","#"===e[0]&&(e=e.slice(1)),h.call(this,e,"fragment"))},get origin(){var e;if(this._isInvalid||!this._scheme)return"";switch(this._scheme){case"data":case"file":case"javascript":case"mailto":return"null";case"blob":try{return new f(this._schemeData).origin||"null"}catch(e){}return"null"}return(e=this.host)?this._scheme+"://"+e:""}},t.URL=f}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDocument=function(e){var t,r=new F;if("string"==typeof e)t={url:e};else if((0,i.isArrayBuffer)(e))t={data:e};else if(e instanceof I)t={range:e};else{if("object"!==S(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");t=e}var n=Object.create(null),o=null,u=null;for(var l in t)if("url"!==l||"undefined"==typeof window)if("range"!==l)if("worker"!==l)if("data"!==l||t[l]instanceof Uint8Array)n[l]=t[l];else{var d=t[l];if("string"==typeof d)n[l]=(0,i.stringToBytes)(d);else if("object"!==S(d)||null===d||isNaN(d.length)){if(!(0,i.isArrayBuffer)(d))throw new Error("Invalid PDF binary data: either typed array, string or array-like object is expected in the data property.");n[l]=new Uint8Array(d)}else n[l]=new Uint8Array(d)}else u=t[l];else o=t[l];else n[l]=new i.URL(t[l],window.location).href;n.rangeChunkSize=n.rangeChunkSize||k,n.CMapReaderFactory=n.CMapReaderFactory||a.DOMCMapReaderFactory,n.ignoreErrors=!0!==n.stopAtErrors,n.pdfBug=!0===n.pdfBug;var p=Object.values(i.NativeImageDecoding);void 0!==n.nativeImageDecoderSupport&&p.includes(n.nativeImageDecoderSupport)||(n.nativeImageDecoderSupport=s.apiCompatibilityParams.nativeImageDecoderSupport||i.NativeImageDecoding.DECODE);Number.isInteger(n.maxImageSize)||(n.maxImageSize=-1);"boolean"!=typeof n.isEvalSupported&&(n.isEvalSupported=!0);"boolean"!=typeof n.disableFontFace&&(n.disableFontFace=s.apiCompatibilityParams.disableFontFace||!1);"boolean"!=typeof n.disableRange&&(n.disableRange=!1);"boolean"!=typeof n.disableStream&&(n.disableStream=!1);"boolean"!=typeof n.disableAutoFetch&&(n.disableAutoFetch=!1);"boolean"!=typeof n.disableCreateObjectURL&&(n.disableCreateObjectURL=s.apiCompatibilityParams.disableCreateObjectURL||!1);if((0,i.setVerbosityLevel)(n.verbosity),!u){var v={postMessageTransfers:n.postMessageTransfers,verbosity:n.verbosity,port:c.GlobalWorkerOptions.workerPort};u=v.port?D.fromPort(v):new D(v),r._worker=u}var m=r.docId;return u.promise.then(function(){if(r.destroyed)throw new Error("Loading aborted");return function(e,t,r,n){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:n,apiVersion:"2.2.228",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,disableCreateObjectURL:t.disableCreateObjectURL,postMessageTransfers:e.postMessageTransfers,docBaseUrl:t.docBaseUrl,nativeImageDecoderSupport:t.nativeImageDecoderSupport,ignoreErrors:t.ignoreErrors,isEvalSupported:t.isEvalSupported}).then(function(t){if(e.destroyed)throw new Error("Worker was destroyed");return t}))}(u,n,o,m).then(function(e){if(r.destroyed)throw new Error("Loading aborted");var t;o?t=new f.PDFDataTransportStream({length:n.length,initialData:n.initialData,progressiveDone:n.progressiveDone,disableRange:n.disableRange,disableStream:n.disableStream},o):n.data||(t=R({url:n.url,length:n.length,httpHeaders:n.httpHeaders,withCredentials:n.withCredentials,rangeChunkSize:n.rangeChunkSize,disableRange:n.disableRange,disableStream:n.disableStream}));var i=new h.MessageHandler(m,e,u.port);i.postMessageTransfers=u.postMessageTransfers;var a=new q(i,r,t,n);r._transport=a,i.send("Ready",null)})}).catch(r._capability.reject),r},t.setPDFNetworkStreamFactory=function(e){R=e},t.build=t.version=t.PDFPageProxy=t.PDFDocumentProxy=t.PDFWorker=t.PDFDataRangeTransport=t.LoopbackPort=void 0;var n=v(r(148)),i=r(1),a=r(151),o=r(152),s=r(153),u=r(154),l=v(r(3)),c=r(156),h=r(157),d=r(158),f=r(160),p=r(161);function v(e){return e&&e.__esModule?e:{default:e}}function m(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function y(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function A(e,t,r){return t&&_(e.prototype,t),r&&_(e,r),e}function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var w,k=65536,x=!1,P=null,C=!1;"undefined"==typeof window?(x=!0,void 0===require.ensure&&(require.ensure=require("node-ensure")),C=!0):"undefined"!=typeof require&&"function"==typeof require.ensure&&(C=!0),"undefined"!=typeof requirejs&&requirejs.toUrl&&(w=requirejs.toUrl("pdfjs-dist/build/pdf.worker.js"));var R,T="undefined"!=typeof requirejs&&requirejs.load;if(P=C?function(){return new Promise(function(e,t){require.ensure([],function(){try{var r;r=require("./pdf.worker.js"),e(r.WorkerMessageHandler)}catch(e){t(e)}},t,"pdfjsWorker")})}:T?function(){return new Promise(function(e,t){requirejs(["pdfjs-dist/build/pdf.worker"],function(r){try{e(r.WorkerMessageHandler)}catch(e){t(e)}},t)})}:null,!w&&"object"===("undefined"==typeof document?"undefined":S(document))&&"currentScript"in document){var E=document.currentScript&&document.currentScript.src;E&&(w=E.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}var O,F=(O=0,function(){function e(){b(this,e),this._capability=(0,i.createPromiseCapability)(),this._transport=null,this._worker=null,this.docId="d"+O++,this.destroyed=!1,this.onPassword=null,this.onProgress=null,this.onUnsupportedFeature=null}return A(e,[{key:"destroy",value:function(){var e=this;return this.destroyed=!0,(this._transport?this._transport.destroy():Promise.resolve()).then(function(){e._transport=null,e._worker&&(e._worker.destroy(),e._worker=null)})}},{key:"then",value:function(e,t){return(0,a.deprecated)("PDFDocumentLoadingTask.then method, use the `promise` getter instead."),this.promise.then.apply(this.promise,arguments)}},{key:"promise",get:function(){return this._capability.promise}}]),e}()),I=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];b(this,e),this.length=t,this.initialData=r,this.progressiveDone=n,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,i.createPromiseCapability)()}return A(e,[{key:"addRangeListener",value:function(e){this._rangeListeners.push(e)}},{key:"addProgressListener",value:function(e){this._progressListeners.push(e)}},{key:"addProgressiveReadListener",value:function(e){this._progressiveReadListeners.push(e)}},{key:"addProgressiveDoneListener",value:function(e){this._progressiveDoneListeners.push(e)}},{key:"onDataRange",value:function(e,t){var r=!0,n=!1,i=void 0;try{for(var a,o=this._rangeListeners[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){(0,a.value)(e,t)}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}}},{key:"onDataProgress",value:function(e,t){var r=this;this._readyCapability.promise.then(function(){var n=!0,i=!1,a=void 0;try{for(var o,s=r._progressListeners[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){(0,o.value)(e,t)}}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}})}},{key:"onDataProgressiveRead",value:function(e){var t=this;this._readyCapability.promise.then(function(){var r=!0,n=!1,i=void 0;try{for(var a,o=t._progressiveReadListeners[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){(0,a.value)(e)}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}})}},{key:"onDataProgressiveDone",value:function(){var e=this;this._readyCapability.promise.then(function(){var t=!0,r=!1,n=void 0;try{for(var i,a=e._progressiveDoneListeners[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){(0,i.value)()}}catch(e){r=!0,n=e}finally{try{t||null==a.return||a.return()}finally{if(r)throw n}}})}},{key:"transportReady",value:function(){this._readyCapability.resolve()}},{key:"requestDataRange",value:function(e,t){(0,i.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}},{key:"abort",value:function(){}}]),e}();t.PDFDataRangeTransport=I;var L=function(){function e(t,r){b(this,e),this._pdfInfo=t,this._transport=r}return A(e,[{key:"getPage",value:function(e){return this._transport.getPage(e)}},{key:"getPageIndex",value:function(e){return this._transport.getPageIndex(e)}},{key:"getDestinations",value:function(){return this._transport.getDestinations()}},{key:"getDestination",value:function(e){return this._transport.getDestination(e)}},{key:"getPageLabels",value:function(){return this._transport.getPageLabels()}},{key:"getPageLayout",value:function(){return this._transport.getPageLayout()}},{key:"getPageMode",value:function(){return this._transport.getPageMode()}},{key:"getViewerPreferences",value:function(){return this._transport.getViewerPreferences()}},{key:"getOpenActionDestination",value:function(){return this._transport.getOpenActionDestination()}},{key:"getAttachments",value:function(){return this._transport.getAttachments()}},{key:"getJavaScript",value:function(){return this._transport.getJavaScript()}},{key:"getOutline",value:function(){return this._transport.getOutline()}},{key:"getPermissions",value:function(){return this._transport.getPermissions()}},{key:"getMetadata",value:function(){return this._transport.getMetadata()}},{key:"getData",value:function(){return this._transport.getData()}},{key:"getDownloadInfo",value:function(){return this._transport.downloadInfoCapability.promise}},{key:"getStats",value:function(){return this._transport.getStats()}},{key:"cleanup",value:function(){this._transport.startCleanup()}},{key:"destroy",value:function(){return this.loadingTask.destroy()}},{key:"numPages",get:function(){return this._pdfInfo.numPages}},{key:"fingerprint",get:function(){return this._pdfInfo.fingerprint}},{key:"loadingParams",get:function(){return this._transport.loadingParams}},{key:"loadingTask",get:function(){return this._transport.loadingTask}}]),e}();t.PDFDocumentProxy=L;var M=function(){function e(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];b(this,e),this.pageIndex=t,this._pageInfo=r,this._transport=n,this._stats=i?new a.StatTimer:a.DummyStatTimer,this._pdfBug=i,this.commonObjs=n.commonObjs,this.objs=new W,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this.intentStates=Object.create(null),this.destroyed=!1}return A(e,[{key:"getViewport",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.scale,r=e.rotation,n=void 0===r?this.rotate:r,i=e.dontFlip,o=void 0!==i&&i;return(arguments.length>1||"number"==typeof arguments[0])&&(t=arguments[0],n="number"==typeof arguments[1]?arguments[1]:this.rotate,o="boolean"==typeof arguments[2]&&arguments[2]),new a.PageViewport({viewBox:this.view,scale:t,rotation:n,dontFlip:o})}},{key:"getAnnotations",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).intent,t=void 0===e?null:e;return this.annotationsPromise&&this.annotationsIntent===t||(this.annotationsPromise=this._transport.getAnnotations(this.pageIndex,t),this.annotationsIntent=t),this.annotationsPromise}},{key:"render",value:function(e){var t=this,r=e.canvasContext,n=e.viewport,o=e.intent,s=void 0===o?"display":o,u=e.enableWebGL,l=void 0!==u&&u,c=e.renderInteractiveForms,h=void 0!==c&&c,d=e.transform,f=void 0===d?null:d,v=e.imageLayer,m=void 0===v?null:v,g=e.canvasFactory,y=void 0===g?null:g,b=e.background,_=void 0===b?null:b,A=this._stats;A.time("Overall"),this.pendingCleanup=!1;var S="print"===s?"print":"display",w=y||new a.DOMCanvasFactory,k=new p.WebGLContext({enable:l});this.intentStates[S]||(this.intentStates[S]=Object.create(null));var x=this.intentStates[S];x.displayReadyCapability||(x.receivingOperatorList=!0,x.displayReadyCapability=(0,i.createPromiseCapability)(),x.operatorList={fnArray:[],argsArray:[],lastChunk:!1},A.time("Page Request"),this._transport.messageHandler.send("RenderPageRequest",{pageIndex:this.pageNumber-1,intent:S,renderInteractiveForms:!0===h}));var P=function(e){var r=x.renderTasks.indexOf(C);r>=0&&x.renderTasks.splice(r,1),(t.cleanupAfterRender||"print"===S)&&(t.pendingCleanup=!0),t._tryCleanup(),e?C.capability.reject(e):C.capability.resolve(),A.timeEnd("Rendering"),A.timeEnd("Overall")},C=new B({callback:P,params:{canvasContext:r,viewport:n,transform:f,imageLayer:m,background:_},objs:this.objs,commonObjs:this.commonObjs,operatorList:x.operatorList,pageNumber:this.pageNumber,canvasFactory:w,webGLContext:k,useRequestAnimationFrame:"print"!==S,pdfBug:this._pdfBug});x.renderTasks||(x.renderTasks=[]),x.renderTasks.push(C);var R=C.task;return x.displayReadyCapability.promise.then(function(e){t.pendingCleanup?P():(A.time("Rendering"),C.initializeGraphics(e),C.operatorListChanged())}).catch(P),R}},{key:"getOperatorList",value:function(){this.intentStates.oplist||(this.intentStates.oplist=Object.create(null));var e,t=this.intentStates.oplist;return t.opListReadCapability||((e={}).operatorListChanged=function(){if(t.operatorList.lastChunk){t.opListReadCapability.resolve(t.operatorList);var r=t.renderTasks.indexOf(e);r>=0&&t.renderTasks.splice(r,1)}},t.receivingOperatorList=!0,t.opListReadCapability=(0,i.createPromiseCapability)(),t.renderTasks=[],t.renderTasks.push(e),t.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats.time("Page Request"),this._transport.messageHandler.send("RenderPageRequest",{pageIndex:this.pageIndex,intent:"oplist"})),t.opListReadCapability.promise}},{key:"streamTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.normalizeWhitespace,r=void 0!==t&&t,n=e.disableCombineTextItems,i=void 0!==n&&n;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this.pageNumber-1,normalizeWhitespace:!0===r,combineTextItems:!0!==i},{highWaterMark:100,size:function(e){return e.items.length}})}},{key:"getTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.streamTextContent(e);return new Promise(function(e,r){var n=t.getReader(),i={items:[],styles:Object.create(null)};!function t(){n.read().then(function(r){var n,a=r.value;r.done?e(i):(Object.assign(i.styles,a.styles),(n=i.items).push.apply(n,y(a.items)),t())},r)}()})}},{key:"_destroy",value:function(){this.destroyed=!0,this._transport.pageCache[this.pageIndex]=null;var e=[];return Object.keys(this.intentStates).forEach(function(t){"oplist"!==t&&this.intentStates[t].renderTasks.forEach(function(t){var r=t.capability.promise.catch(function(){});e.push(r),t.cancel()})},this),this.objs.clear(),this.annotationsPromise=null,this.pendingCleanup=!1,Promise.all(e)}},{key:"cleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.pendingCleanup=!0,this._tryCleanup(e)}},{key:"_tryCleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.pendingCleanup&&!Object.keys(this.intentStates).some(function(e){var t=this.intentStates[e];return 0!==t.renderTasks.length||t.receivingOperatorList},this)&&(Object.keys(this.intentStates).forEach(function(e){delete this.intentStates[e]},this),this.objs.clear(),this.annotationsPromise=null,e&&this._stats instanceof a.StatTimer&&(this._stats=new a.StatTimer),this.pendingCleanup=!1)}},{key:"_startRenderPage",value:function(e,t){var r=this.intentStates[t];r.displayReadyCapability&&r.displayReadyCapability.resolve(e)}},{key:"_renderPageChunk",value:function(e,t){for(var r=this.intentStates[t],n=0,i=e.length;n<i;n++)r.operatorList.fnArray.push(e.fnArray[n]),r.operatorList.argsArray.push(e.argsArray[n]);r.operatorList.lastChunk=e.lastChunk;for(var a=0;a<r.renderTasks.length;a++)r.renderTasks[a].operatorListChanged();e.lastChunk&&(r.receivingOperatorList=!1,this._tryCleanup())}},{key:"pageNumber",get:function(){return this.pageIndex+1}},{key:"rotate",get:function(){return this._pageInfo.rotate}},{key:"ref",get:function(){return this._pageInfo.ref}},{key:"userUnit",get:function(){return this._pageInfo.userUnit}},{key:"view",get:function(){return this._pageInfo.view}},{key:"stats",get:function(){return this._stats instanceof a.StatTimer?this._stats:null}}]),e}();t.PDFPageProxy=M;var j=function(){function e(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];b(this,e),this._listeners=[],this._defer=t,this._deferred=Promise.resolve(void 0)}return A(e,[{key:"postMessage",value:function(e,t){var r=this;if(this._defer){var n=new WeakMap,a={data:function e(r){if("object"!==S(r)||null===r)return r;if(n.has(r))return n.get(r);var a,o;if((a=r.buffer)&&(0,i.isArrayBuffer)(a)){var s=t&&t.includes(a);return o=r===a?r:s?new r.constructor(a,r.byteOffset,r.byteLength):new r.constructor(r),n.set(r,o),o}for(var u in o=Array.isArray(r)?[]:{},n.set(r,o),r){for(var l=void 0,c=r;!(l=Object.getOwnPropertyDescriptor(c,u));)c=Object.getPrototypeOf(c);void 0!==l.value&&"function"!=typeof l.value&&(o[u]=e(l.value))}return o}(e)};this._deferred.then(function(){r._listeners.forEach(function(e){e.call(this,a)},r)})}else this._listeners.forEach(function(t){t.call(this,{data:e})},this)}},{key:"addEventListener",value:function(e,t){this._listeners.push(t)}},{key:"removeEventListener",value:function(e,t){var r=this._listeners.indexOf(t);this._listeners.splice(r,1)}},{key:"terminate",value:function(){this._listeners.length=0}}]),e}();t.LoopbackPort=j;var D=function(){var e,t=new WeakMap,r=0;function n(){if(c.GlobalWorkerOptions.workerSrc)return c.GlobalWorkerOptions.workerSrc;if(void 0!==w)return w;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}function o(){try{if("undefined"!=typeof window)return window.pdfjsWorker&&window.pdfjsWorker.WorkerMessageHandler}catch(e){}return null}return function(){function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.name,n=void 0===r?null:r,a=e.port,o=void 0===a?null:a,u=e.postMessageTransfers,l=void 0===u||u,c=e.verbosity,h=void 0===c?(0,i.getVerbosityLevel)():c;if(b(this,s),o&&t.has(o))throw new Error("Cannot use more than one PDFWorker per port");if(this.name=n,this.destroyed=!1,this.postMessageTransfers=!1!==l,this.verbosity=h,this._readyCapability=(0,i.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,o)return t.set(o,this),void this._initializeFromPort(o);this._initialize()}return A(s,[{key:"_initializeFromPort",value:function(e){this._port=e,this._messageHandler=new h.MessageHandler("main","worker",e),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve()}},{key:"_initialize",value:function(){var e,t,r=this;if("undefined"!=typeof Worker&&!x&&!o()){var a=n();try{(0,i.isSameOrigin)(window.location.href,a)||(e=new i.URL(a,window.location).href,t="importScripts('"+e+"');",a=i.URL.createObjectURL(new Blob([t])));var s=new Worker(a),u=new h.MessageHandler("main","worker",s),l=function(){s.removeEventListener("error",c),u.destroy(),s.terminate(),r.destroyed?r._readyCapability.reject(new Error("Worker was destroyed")):r._setupFakeWorker()},c=function(){r._webWorker||l()};s.addEventListener("error",c),u.on("test",function(e){s.removeEventListener("error",c),r.destroyed?l():e&&e.supportTypedArray?(r._messageHandler=u,r._port=s,r._webWorker=s,e.supportTransfers||(r.postMessageTransfers=!1),r._readyCapability.resolve(),u.send("configure",{verbosity:r.verbosity})):(r._setupFakeWorker(),u.destroy(),s.terminate())}),u.on("ready",function(e){if(s.removeEventListener("error",c),r.destroyed)l();else try{d()}catch(e){r._setupFakeWorker()}});var d=function(){var e=new Uint8Array([r.postMessageTransfers?255:0]);try{u.send("test",e,[e.buffer])}catch(t){(0,i.info)("Cannot use postMessage transfers"),e[0]=0,u.send("test",e)}};return void d()}catch(e){(0,i.info)("The worker has been disabled.")}}this._setupFakeWorker()}},{key:"_setupFakeWorker",value:function(){var t=this;x||((0,i.warn)("Setting up fake worker."),x=!0),function(){if(e)return e.promise;e=(0,i.createPromiseCapability)();var t=o();return t?(e.resolve(t),e.promise):((P||function(){return(0,a.loadScript)(n()).then(function(){return window.pdfjsWorker.WorkerMessageHandler})})().then(e.resolve,e.reject),e.promise)}().then(function(e){if(t.destroyed)t._readyCapability.reject(new Error("Worker was destroyed"));else{var n=new j;t._port=n;var i="fake"+r++,a=new h.MessageHandler(i+"_worker",i,n);e.setup(a,n);var o=new h.MessageHandler(i,i+"_worker",n);t._messageHandler=o,t._readyCapability.resolve()}}).catch(function(e){t._readyCapability.reject(new Error('Setting up fake worker failed: "'.concat(e.message,'".')))})}},{key:"destroy",value:function(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),t.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}},{key:"promise",get:function(){return this._readyCapability.promise}},{key:"port",get:function(){return this._port}},{key:"messageHandler",get:function(){return this._messageHandler}}],[{key:"fromPort",value:function(e){if(!e||!e.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return t.has(e.port)?t.get(e.port):new s(e)}},{key:"getWorkerSrc",value:function(){return n()}}]),s}()}();t.PDFWorker=D;var N,q=function(){function e(t,r,n,a){b(this,e),this.messageHandler=t,this.loadingTask=r,this.commonObjs=new W,this.fontLoader=new o.FontLoader({docId:r.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this)}),this._params=a,this.CMapReaderFactory=new a.CMapReaderFactory({baseUrl:a.cMapUrl,isCompressed:a.cMapPacked}),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=n,this._fullReader=null,this._lastProgress=null,this.pageCache=[],this.pagePromises=[],this.downloadInfoCapability=(0,i.createPromiseCapability)(),this.setupMessageHandler()}return A(e,[{key:"destroy",value:function(){var e=this;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=(0,i.createPromiseCapability)(),this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));var t=[];this.pageCache.forEach(function(e){e&&t.push(e._destroy())}),this.pageCache.length=0,this.pagePromises.length=0;var r=this.messageHandler.sendWithPromise("Terminate",null);return t.push(r),Promise.all(t).then(function(){e.fontLoader.clear(),e._networkStream&&e._networkStream.cancelAllRequests(),e.messageHandler&&(e.messageHandler.destroy(),e.messageHandler=null),e.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}},{key:"setupMessageHandler",value:function(){var e=this.messageHandler,t=this.loadingTask;e.on("GetReader",function(e,t){var r=this;(0,i.assert)(this._networkStream),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=function(e){r._lastProgress={loaded:e.loaded,total:e.total}},t.onPull=function(){r._fullReader.read().then(function(e){var r=e.value;e.done?t.close():((0,i.assert)((0,i.isArrayBuffer)(r)),t.enqueue(new Uint8Array(r),1,[r]))}).catch(function(e){t.error(e)})},t.onCancel=function(e){r._fullReader.cancel(e)}},this),e.on("ReaderHeadersReady",function(e){var r=this,n=(0,i.createPromiseCapability)(),a=this._fullReader;return a.headersReady.then(function(){a.isStreamingSupported&&a.isRangeSupported||(r._lastProgress&&t.onProgress&&t.onProgress(r._lastProgress),a.onProgress=function(e){t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})}),n.resolve({isStreamingSupported:a.isStreamingSupported,isRangeSupported:a.isRangeSupported,contentLength:a.contentLength})},n.reject),n.promise},this),e.on("GetRangeReader",function(e,t){(0,i.assert)(this._networkStream);var r=this._networkStream.getRangeReader(e.begin,e.end);r?(t.onPull=function(){r.read().then(function(e){var r=e.value;e.done?t.close():((0,i.assert)((0,i.isArrayBuffer)(r)),t.enqueue(new Uint8Array(r),1,[r]))}).catch(function(e){t.error(e)})},t.onCancel=function(e){r.cancel(e)}):t.close()},this),e.on("GetDoc",function(e){var r=e.pdfInfo;this._numPages=r.numPages,t._capability.resolve(new L(r,this))},this),e.on("PasswordRequest",function(e){var r=this;if(this._passwordCapability=(0,i.createPromiseCapability)(),t.onPassword){try{t.onPassword(function(e){r._passwordCapability.resolve({password:e})},e.code)}catch(e){this._passwordCapability.reject(e)}}else this._passwordCapability.reject(new i.PasswordException(e.message,e.code));return this._passwordCapability.promise},this),e.on("PasswordException",function(e){t._capability.reject(new i.PasswordException(e.message,e.code))},this),e.on("InvalidPDF",function(e){t._capability.reject(new i.InvalidPDFException(e.message))},this),e.on("MissingPDF",function(e){t._capability.reject(new i.MissingPDFException(e.message))},this),e.on("UnexpectedResponse",function(e){t._capability.reject(new i.UnexpectedResponseException(e.message,e.status))},this),e.on("UnknownError",function(e){t._capability.reject(new i.UnknownErrorException(e.message,e.details))},this),e.on("DataLoaded",function(e){t.onProgress&&t.onProgress({loaded:e.length,total:e.length}),this.downloadInfoCapability.resolve(e)},this),e.on("StartRenderPage",function(e){if(!this.destroyed){var t=this.pageCache[e.pageIndex];t._stats.timeEnd("Page Request"),t._startRenderPage(e.transparency,e.intent)}},this),e.on("RenderPageChunk",function(e){this.destroyed||this.pageCache[e.pageIndex]._renderPageChunk(e.operatorList,e.intent)},this),e.on("commonobj",function(t){var r=this;if(!this.destroyed){var n=g(t,3),a=n[0],s=n[1],u=n[2];if(!this.commonObjs.has(a))switch(s){case"Font":var c=this._params;if("error"in u){var h=u.error;(0,i.warn)("Error during font loading: ".concat(h)),this.commonObjs.resolve(a,h);break}var d=null;c.pdfBug&&l.default.FontInspector&&l.default.FontInspector.enabled&&(d={registerFont:function(e,t){l.default.FontInspector.fontAdded(e,t)}});var f=new o.FontFaceObject(u,{isEvalSupported:c.isEvalSupported,disableFontFace:c.disableFontFace,ignoreErrors:c.ignoreErrors,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),fontRegistry:d});this.fontLoader.bind(f).then(function(){r.commonObjs.resolve(a,f)},function(t){e.sendWithPromise("FontFallback",{id:a}).finally(function(){r.commonObjs.resolve(a,f)})});break;case"FontPath":case"FontType3Res":this.commonObjs.resolve(a,u);break;default:throw new Error("Got unknown common object type ".concat(s))}}},this),e.on("obj",function(e){if(!this.destroyed){var t=g(e,4),r=t[0],n=t[1],i=t[2],o=t[3],s=this.pageCache[n];if(!s.objs.has(r))switch(i){case"JpegStream":return new Promise(function(e,t){var r=new Image;r.onload=function(){e(r)},r.onerror=function(){t(new Error("Error during JPEG image loading")),(0,a.releaseImageResources)(r)},r.src=o}).then(function(e){s.objs.resolve(r,e)});case"Image":s.objs.resolve(r,o);o&&"data"in o&&o.data.length>8e6&&(s.cleanupAfterRender=!0);break;default:throw new Error("Got unknown object type ".concat(i))}}},this),e.on("DocProgress",function(e){this.destroyed||t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})},this),e.on("PageError",function(e){if(!this.destroyed){var t=this.pageCache[e.pageIndex].intentStates[e.intent];if(!t.displayReadyCapability)throw new Error(e.error);if(t.displayReadyCapability.reject(new Error(e.error)),t.operatorList){t.operatorList.lastChunk=!0;for(var r=0;r<t.renderTasks.length;r++)t.renderTasks[r].operatorListChanged()}}},this),e.on("UnsupportedFeature",this._onUnsupportedFeature,this),e.on("JpegDecode",function(e){if(this.destroyed)return Promise.reject(new Error("Worker was destroyed"));if("undefined"==typeof document)return Promise.reject(new Error('"document" is not defined.'));var t=g(e,2),r=t[0],n=t[1];return 3!==n&&1!==n?Promise.reject(new Error("Only 3 components or 1 component can be returned")):new Promise(function(e,t){var i=new Image;i.onload=function(){var t=i.width,r=i.height,o=t*r,s=4*o,u=new Uint8ClampedArray(o*n),l=document.createElement("canvas");l.width=t,l.height=r;var c=l.getContext("2d");c.drawImage(i,0,0);var h=c.getImageData(0,0,t,r).data;if(3===n)for(var d=0,f=0;d<s;d+=4,f+=3)u[f]=h[d],u[f+1]=h[d+1],u[f+2]=h[d+2];else if(1===n)for(var p=0,v=0;p<s;p+=4,v++)u[v]=h[p];e({data:u,width:t,height:r}),(0,a.releaseImageResources)(i),l.width=0,l.height=0,l=null,c=null},i.onerror=function(){t(new Error("JpegDecode failed to load image")),(0,a.releaseImageResources)(i)},i.src=r})},this),e.on("FetchBuiltInCMap",function(e){return this.destroyed?Promise.reject(new Error("Worker was destroyed")):this.CMapReaderFactory.fetch({name:e.name})},this)}},{key:"_onUnsupportedFeature",value:function(e){var t=e.featureId;this.destroyed||this.loadingTask.onUnsupportedFeature&&this.loadingTask.onUnsupportedFeature(t)}},{key:"getData",value:function(){return this.messageHandler.sendWithPromise("GetData",null)}},{key:"getPage",value:function(e){var t=this;if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request"));var r=e-1;if(r in this.pagePromises)return this.pagePromises[r];var n=this.messageHandler.sendWithPromise("GetPage",{pageIndex:r}).then(function(e){if(t.destroyed)throw new Error("Transport destroyed");var n=new M(r,e,t,t._params.pdfBug);return t.pageCache[r]=n,n});return this.pagePromises[r]=n,n}},{key:"getPageIndex",value:function(e){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:e}).catch(function(e){return Promise.reject(new Error(e))})}},{key:"getAnnotations",value:function(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}},{key:"getDestinations",value:function(){return this.messageHandler.sendWithPromise("GetDestinations",null)}},{key:"getDestination",value:function(e){return"string"!=typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}},{key:"getPageLabels",value:function(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}},{key:"getPageLayout",value:function(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}},{key:"getPageMode",value:function(){return this.messageHandler.sendWithPromise("GetPageMode",null)}},{key:"getViewerPreferences",value:function(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}},{key:"getOpenActionDestination",value:function(){return this.messageHandler.sendWithPromise("GetOpenActionDestination",null)}},{key:"getAttachments",value:function(){return this.messageHandler.sendWithPromise("GetAttachments",null)}},{key:"getJavaScript",value:function(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}},{key:"getOutline",value:function(){return this.messageHandler.sendWithPromise("GetOutline",null)}},{key:"getPermissions",value:function(){return this.messageHandler.sendWithPromise("GetPermissions",null)}},{key:"getMetadata",value:function(){var e=this;return this.messageHandler.sendWithPromise("GetMetadata",null).then(function(t){return{info:t[0],metadata:t[1]?new d.Metadata(t[1]):null,contentDispositionFilename:e._fullReader?e._fullReader.filename:null}})}},{key:"getStats",value:function(){return this.messageHandler.sendWithPromise("GetStats",null)}},{key:"startCleanup",value:function(){var e=this;this.messageHandler.sendWithPromise("Cleanup",null).then(function(){for(var t=0,r=e.pageCache.length;t<r;t++){var n=e.pageCache[t];n&&n.cleanup()}e.commonObjs.clear(),e.fontLoader.clear()})}},{key:"loadingParams",get:function(){var e=this._params;return(0,i.shadow)(this,"loadingParams",{disableAutoFetch:e.disableAutoFetch,disableCreateObjectURL:e.disableCreateObjectURL,disableFontFace:e.disableFontFace,nativeImageDecoderSupport:e.nativeImageDecoderSupport})}}]),e}(),W=function(){function e(){b(this,e),this._objs=Object.create(null)}return A(e,[{key:"_ensureObj",value:function(e){return this._objs[e]?this._objs[e]:this._objs[e]={capability:(0,i.createPromiseCapability)(),data:null,resolved:!1}}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return this._ensureObj(e).capability.promise.then(t),null;var r=this._objs[e];if(!r||!r.resolved)throw new Error("Requesting object that isn't resolved yet ".concat(e,"."));return r.data}},{key:"has",value:function(e){var t=this._objs[e];return!!t&&t.resolved}},{key:"resolve",value:function(e,t){var r=this._ensureObj(e);r.resolved=!0,r.data=t,r.capability.resolve(t)}},{key:"clear",value:function(){for(var e in this._objs){var t=this._objs[e].data;"undefined"!=typeof Image&&t instanceof Image&&(0,a.releaseImageResources)(t)}this._objs=Object.create(null)}}]),e}(),U=function(){function e(t){b(this,e),this._internalRenderTask=t,this.onContinue=null}return A(e,[{key:"cancel",value:function(){this._internalRenderTask.cancel()}},{key:"then",value:function(e,t){return(0,a.deprecated)("RenderTask.then method, use the `promise` getter instead."),this.promise.then.apply(this.promise,arguments)}},{key:"promise",get:function(){return this._internalRenderTask.capability.promise}}]),e}(),B=(N=new WeakSet,function(){function e(t){var r=t.callback,n=t.params,a=t.objs,o=t.commonObjs,s=t.operatorList,u=t.pageNumber,l=t.canvasFactory,c=t.webGLContext,h=t.useRequestAnimationFrame,d=void 0!==h&&h,f=t.pdfBug,p=void 0!==f&&f;b(this,e),this.callback=r,this.params=n,this.objs=a,this.commonObjs=o,this.operatorListIdx=null,this.operatorList=s,this.pageNumber=u,this.canvasFactory=l,this.webGLContext=c,this._pdfBug=p,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===d&&"undefined"!=typeof window,this.cancelled=!1,this.capability=(0,i.createPromiseCapability)(),this.task=new U(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=n.canvasContext.canvas}return A(e,[{key:"initializeGraphics",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.cancelled){if(this._canvas){if(N.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.");N.add(this._canvas)}this._pdfBug&&l.default.StepperManager&&l.default.StepperManager.enabled&&(this.stepper=l.default.StepperManager.create(this.pageNumber-1),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());var t=this.params,r=t.canvasContext,n=t.viewport,i=t.transform,a=t.imageLayer,o=t.background;this.gfx=new u.CanvasGraphics(r,this.commonObjs,this.objs,this.canvasFactory,this.webGLContext,a),this.gfx.beginDrawing({transform:i,viewport:n,transparency:e,background:o}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}}},{key:"cancel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.running=!1,this.cancelled=!0,this.gfx&&this.gfx.endDrawing(),this._canvas&&N.delete(this._canvas),this.callback(e||new a.RenderingCancelledException("Rendering cancelled, page ".concat(this.pageNumber),"canvas"))}},{key:"operatorListChanged",value:function(){this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}},{key:"_continue",value:function(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}},{key:"_scheduleNext",value:function(){var e=this;this._useRequestAnimationFrame?window.requestAnimationFrame(function(){e._nextBound().catch(e.cancel.bind(e))}):Promise.resolve().then(this._nextBound).catch(this.cancel.bind(this))}},{key:"_next",value:(t=n.default.mark(function e(){return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.cancelled){e.next=2;break}return e.abrupt("return");case 2: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&&N.delete(this._canvas),this.callback()));case 4:case"end":return e.stop()}},e,this)}),r=function(){var e=this,r=arguments;return new Promise(function(n,i){var a=t.apply(e,r);function o(e){m(a,n,i,o,s,"next",e)}function s(e){m(a,n,i,o,s,"throw",e)}o(void 0)})},function(){return r.apply(this,arguments)})}]),e;var t,r}());t.version="2.2.228";t.build="d7afb74a"},function(e,t,r){"use strict";e.exports=r(149)},function(e,t,r){"use strict";(function(e){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r=function(e){var r,n=Object.prototype,i=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),o=new R(n||[]);return a._invoke=function(e,t,r){var n=h;return function(i,a){if(n===f)throw new Error("Generator is already running");if(n===p){if("throw"===i)throw a;return E()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=x(o,r);if(s){if(s===v)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=f;var u=c(e,t,r);if("normal"===u.type){if(n=r.done?p:d,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=p,r.method="throw",r.arg=u.arg)}}}(e,r,o),a}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",f="executing",p="completed",v={};function m(){}function g(){}function y(){}var b={};b[o]=function(){return this};var _=Object.getPrototypeOf,A=_&&_(_(T([])));A&&A!==n&&i.call(A,o)&&(b=A);var S=y.prototype=m.prototype=Object.create(b);function w(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function k(e){var r;this._invoke=function(n,a){function o(){return new Promise(function(r,o){!function r(n,a,o,s){var u=c(e[n],e,a);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"===t(h)&&i.call(h,"__await")?Promise.resolve(h.__await).then(function(e){r("next",e,o,s)},function(e){r("throw",e,o,s)}):Promise.resolve(h).then(function(e){l.value=e,o(l)},function(e){return r("throw",e,o,s)})}s(u.arg)}(n,a,r,o)})}return r=r?r.then(o,o):o()}}function x(e,t){var n=e.iterator[t.method];if(n===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=r,x(e,t),"throw"===t.method))return v;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=c(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,v;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,v):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function P(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}return{next:E}}function E(){return{value:r,done:!0}}return g.prototype=S.constructor=y,y.constructor=g,y[u]=g.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,u in e||(e[u]="GeneratorFunction")),e.prototype=Object.create(S),e},e.awrap=function(e){return{__await:e}},w(k.prototype),k.prototype[s]=function(){return this},e.AsyncIterator=k,e.async=function(t,r,n,i){var a=new k(l(t,r,n,i));return e.isGeneratorFunction(r)?a:a.next().then(function(e){return e.done?e.value:a.next()})},w(S),S[u]="Generator",S[o]=function(){return this},S.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=T,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,i){return s.type="throw",s.arg=e,t.next=n,i&&(t.method="next",t.arg=r),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(u&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;C(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),v}},e}("object"===t(e)?e.exports:{});try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}}).call(this,r(150)(e))},function(e,t,r){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addLinkAttributes=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.url,n=t.target,i=t.rel;if(e.href=e.title=r?(0,a.removeNullCharacters)(r):"",r){var o=Object.values(y),s=o.includes(n)?n:y.NONE;e.target=b[s],e.rel="string"==typeof i?i:h}},t.getFilenameFromUrl=function(e){var t=e.indexOf("#"),r=e.indexOf("?"),n=Math.min(t>0?t:e.length,r>0?r:e.length);return e.substring(e.lastIndexOf("/",n)+1,n)},t.isFetchSupported=w,t.isValidFetchUrl=k,t.loadScript=function(e){return new Promise(function(t,r){var n=document.createElement("script");n.src=e,n.onload=t,n.onerror=function(){r(new Error("Cannot load script at: ".concat(n.src)))},(document.head||document.documentElement).appendChild(n)})},t.deprecated=function(e){console.log("Deprecated API usage: "+e)},t.releaseImageResources=function(e){(0,a.assert)(e instanceof Image,"Invalid `img` parameter.");var t=e.src;"string"==typeof t&&t.startsWith("blob:")&&a.URL.revokeObjectURL&&a.URL.revokeObjectURL(t);e.removeAttribute("src")},t.PDFDateString=t.DummyStatTimer=t.StatTimer=t.DOMSVGFactory=t.DOMCMapReaderFactory=t.DOMCanvasFactory=t.DEFAULT_LINK_REL=t.LinkTarget=t.RenderingCancelledException=t.PageViewport=void 0;var n,i=(n=r(148))&&n.__esModule?n:{default:n},a=r(1);function o(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function s(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,u,"next",e)}function u(e){o(a,n,i,s,u,"throw",e)}s(void 0)})}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),e}var h="noopener noreferrer nofollow";t.DEFAULT_LINK_REL=h;var d="http://www.w3.org/2000/svg",f=function(){function e(){u(this,e)}return c(e,[{key:"create",value:function(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");var r=document.createElement("canvas"),n=r.getContext("2d");return r.width=e,r.height=t,{canvas:r,context:n}}},{key:"reset",value:function(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}},{key:"destroy",value:function(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}}]),e}();t.DOMCanvasFactory=f;var p=function(){function e(t){var r=t.baseUrl,n=void 0===r?null:r,i=t.isCompressed,a=void 0!==i&&i;u(this,e),this.baseUrl=n,this.isCompressed=a}return c(e,[{key:"fetch",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=s(i.default.mark(function e(t){var r,n,o,u=this;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.name,this.baseUrl){e.next=3;break}throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');case 3:if(r){e.next=5;break}throw new Error("CMap name must be specified.");case 5:if(n=this.baseUrl+r+(this.isCompressed?".bcmap":""),o=this.isCompressed?a.CMapCompressionType.BINARY:a.CMapCompressionType.NONE,!w()||!k(n,document.baseURI)){e.next=9;break}return e.abrupt("return",fetch(n).then(function(){var e=s(i.default.mark(function e(t){var r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.ok){e.next=2;break}throw new Error(t.statusText);case 2:if(!u.isCompressed){e.next=10;break}return e.t0=Uint8Array,e.next=6,t.arrayBuffer();case 6:e.t1=e.sent,r=new e.t0(e.t1),e.next=15;break;case 10:return e.t2=a.stringToBytes,e.next=13,t.text();case 13:e.t3=e.sent,r=(0,e.t2)(e.t3);case 15:return e.abrupt("return",{cMapData:r,compressionType:o});case 16:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()).catch(function(e){throw new Error("Unable to load ".concat(u.isCompressed?"binary ":"")+"CMap at: ".concat(n))}));case 9:return e.abrupt("return",new Promise(function(e,t){var r=new XMLHttpRequest;r.open("GET",n,!0),u.isCompressed&&(r.responseType="arraybuffer"),r.onreadystatechange=function(){if(r.readyState===XMLHttpRequest.DONE){var n;if(200===r.status||0===r.status)if(u.isCompressed&&r.response?n=new Uint8Array(r.response):!u.isCompressed&&r.responseText&&(n=(0,a.stringToBytes)(r.responseText)),n)return void e({cMapData:n,compressionType:o});t(new Error(r.statusText))}},r.send(null)}).catch(function(e){throw new Error("Unable to load ".concat(u.isCompressed?"binary ":"")+"CMap at: ".concat(n))}));case 10:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}())}]),e}();t.DOMCMapReaderFactory=p;var v=function(){function e(){u(this,e)}return c(e,[{key:"create",value:function(e,t){(0,a.assert)(e>0&&t>0,"Invalid SVG dimensions");var r=document.createElementNS(d,"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}},{key:"createElement",value:function(e){return(0,a.assert)("string"==typeof e,"Invalid SVG element type"),document.createElementNS(d,e)}}]),e}();t.DOMSVGFactory=v;var m=function(){function e(t){var r=t.viewBox,n=t.scale,i=t.rotation,a=t.offsetX,o=void 0===a?0:a,s=t.offsetY,l=void 0===s?0:s,c=t.dontFlip,h=void 0!==c&&c;u(this,e),this.viewBox=r,this.scale=n,this.rotation=i,this.offsetX=o,this.offsetY=l;var d,f,p,v,m,g,y,b,_=(r[2]+r[0])/2,A=(r[3]+r[1])/2;switch(i=(i%=360)<0?i+360:i){case 180:d=-1,f=0,p=0,v=1;break;case 90:d=0,f=1,p=1,v=0;break;case 270:d=0,f=-1,p=-1,v=0;break;default:d=1,f=0,p=0,v=-1}h&&(p=-p,v=-v),0===d?(m=Math.abs(A-r[1])*n+o,g=Math.abs(_-r[0])*n+l,y=Math.abs(r[3]-r[1])*n,b=Math.abs(r[2]-r[0])*n):(m=Math.abs(_-r[0])*n+o,g=Math.abs(A-r[1])*n+l,y=Math.abs(r[2]-r[0])*n,b=Math.abs(r[3]-r[1])*n),this.transform=[d*n,f*n,p*n,v*n,m-d*n*_-p*n*A,g-f*n*_-v*n*A],this.width=y,this.height=b}return c(e,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.scale,n=void 0===r?this.scale:r,i=t.rotation,a=void 0===i?this.rotation:i,o=t.dontFlip,s=void 0!==o&&o;return new e({viewBox:this.viewBox.slice(),scale:n,rotation:a,offsetX:this.offsetX,offsetY:this.offsetY,dontFlip:s})}},{key:"convertToViewportPoint",value:function(e,t){return a.Util.applyTransform([e,t],this.transform)}},{key:"convertToViewportRectangle",value:function(e){var t=a.Util.applyTransform([e[0],e[1]],this.transform),r=a.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],r[0],r[1]]}},{key:"convertToPdfPoint",value:function(e,t){return a.Util.applyInverseTransform([e,t],this.transform)}}]),e}();t.PageViewport=m;var g=function(){function e(e,t){this.message=e,this.type=t}return e.prototype=new Error,e.prototype.name="RenderingCancelledException",e.constructor=e,e}();t.RenderingCancelledException=g;var y={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};t.LinkTarget=y;var b=["","_self","_blank","_parent","_top"];var _=function(){function e(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];u(this,e),this.enabled=!!t,this.started=Object.create(null),this.times=[]}return c(e,[{key:"time",value:function(e){this.enabled&&(e in this.started&&(0,a.warn)("Timer is already running for "+e),this.started[e]=Date.now())}},{key:"timeEnd",value:function(e){this.enabled&&(e in this.started||(0,a.warn)("Timer has not been started for "+e),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e])}},{key:"toString",value:function(){var e="",t=0,r=!0,n=!1,i=void 0;try{for(var a,o=this.times[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value.name;s.length>t&&(t=s.length)}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}var u=!0,l=!1,c=void 0;try{for(var h,d=this.times[Symbol.iterator]();!(u=(h=d.next()).done);u=!0){var f=h.value,p=f.end-f.start;e+="".concat(f.name.padEnd(t)," ").concat(p,"ms\n")}}catch(e){l=!0,c=e}finally{try{u||null==d.return||d.return()}finally{if(l)throw c}}return e}}]),e}();t.StatTimer=_;var A,S=function(){function e(){u(this,e),(0,a.unreachable)("Cannot initialize DummyStatTimer.")}return c(e,null,[{key:"time",value:function(e){}},{key:"timeEnd",value:function(e){}},{key:"toString",value:function(){return""}}]),e}();function w(){return"undefined"!=typeof fetch&&"undefined"!=typeof Response&&"body"in Response.prototype&&"undefined"!=typeof ReadableStream}function k(e,t){try{var r=(t?new a.URL(e,t):new a.URL(e)).protocol;return"http:"===r||"https:"===r}catch(e){return!1}}t.DummyStatTimer=S;var x=function(){function e(){u(this,e)}return c(e,null,[{key:"toDateObject",value:function(e){if(!e||!(0,a.isString)(e))return null;A||(A=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var t=A.exec(e);if(!t)return null;var r=parseInt(t[1],10),n=parseInt(t[2],10);n=n>=1&&n<=12?n-1:0;var i=parseInt(t[3],10);i=i>=1&&i<=31?i:1;var o=parseInt(t[4],10);o=o>=0&&o<=23?o:0;var s=parseInt(t[5],10);s=s>=0&&s<=59?s:0;var u=parseInt(t[6],10);u=u>=0&&u<=59?u:0;var l=t[7]||"Z",c=parseInt(t[8],10);c=c>=0&&c<=23?c:0;var h=parseInt(t[9],10)||0;return h=h>=0&&h<=59?h:0,"-"===l?(o+=c,s+=h):"+"===l&&(o-=c,s-=h),new Date(Date.UTC(r,n,i,o,s,u))}}]),e}();t.PDFDateString=x},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var n,i=(n=r(148))&&n.__esModule?n:{default:n},a=r(1);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),e}var p,v=function(){function e(t){var r=t.docId,n=t.onUnsupportedFeature;h(this,e),this.constructor===e&&(0,a.unreachable)("Cannot initialize BaseFontLoader."),this.docId=r,this._onUnsupportedFeature=n,this.nativeFontFaces=[],this.styleElement=null}return f(e,[{key:"addNativeFontFace",value:function(e){this.nativeFontFaces.push(e),document.fonts.add(e)}},{key:"insertRule",value:function(e){var t=this.styleElement;t||((t=this.styleElement=document.createElement("style")).id="PDFJS_FONT_STYLE_TAG_".concat(this.docId),document.documentElement.getElementsByTagName("head")[0].appendChild(t));var r=t.sheet;r.insertRule(e,r.cssRules.length)}},{key:"clear",value:function(){this.nativeFontFaces.forEach(function(e){document.fonts.delete(e)}),this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}},{key:"bind",value:function(){var e,t=(e=i.default.mark(function e(t){var r,n,o=this;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.attached&&!t.missingFile){e.next=2;break}return e.abrupt("return",void 0);case 2:if(t.attached=!0,!this.isFontLoadingAPISupported){e.next=19;break}if(!(r=t.createNativeFontFace())){e.next=18;break}return this.addNativeFontFace(r),e.prev=7,e.next=10,r.loaded;case 10:e.next=18;break;case 12:throw e.prev=12,e.t0=e.catch(7),this._onUnsupportedFeature({featureId:a.UNSUPPORTED_FEATURES.font}),(0,a.warn)("Failed to load font '".concat(r.family,"': '").concat(e.t0,"'.")),t.disableFontFace=!0,e.t0;case 18:return e.abrupt("return",void 0);case 19:if(!(n=t.createFontFaceRule())){e.next=25;break}if(this.insertRule(n),!this.isSyncFontLoadingSupported){e.next=24;break}return e.abrupt("return",void 0);case 24:return e.abrupt("return",new Promise(function(e){var r=o._queueLoadingCallback(e);o._prepareFontLoadEvent([n],[t],r)}));case 25:return e.abrupt("return",void 0);case 26:case"end":return e.stop()}},e,this,[[7,12]])}),function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(e){c(a,n,i,o,s,"next",e)}function s(e){c(a,n,i,o,s,"throw",e)}o(void 0)})});return function(e){return t.apply(this,arguments)}}()},{key:"_queueLoadingCallback",value:function(e){(0,a.unreachable)("Abstract method `_queueLoadingCallback`.")}},{key:"_prepareFontLoadEvent",value:function(e,t,r){(0,a.unreachable)("Abstract method `_prepareFontLoadEvent`.")}},{key:"isFontLoadingAPISupported",get:function(){(0,a.unreachable)("Abstract method `isFontLoadingAPISupported`.")}},{key:"isSyncFontLoadingSupported",get:function(){(0,a.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}},{key:"_loadTestFont",get:function(){(0,a.unreachable)("Abstract method `_loadTestFont`.")}}]),e}();t.FontLoader=p,t.FontLoader=p=function(e){function t(e){var r;return h(this,t),(r=s(this,u(t).call(this,e))).loadingContext={requests:[],nextRequestId:0},r.loadTestFontId=0,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(t,v),f(t,[{key:"_queueLoadingCallback",value:function(e){var t=this.loadingContext,r={id:"pdfjs-font-loading-".concat(t.nextRequestId++),done:!1,complete:function(){for((0,a.assert)(!r.done,"completeRequest() cannot be called twice."),r.done=!0;t.requests.length>0&&t.requests[0].done;){var e=t.requests.shift();setTimeout(e.callback,0)}},callback:e};return t.requests.push(r),r}},{key:"_prepareFontLoadEvent",value:function(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 i(e,t,r,n){return e.substring(0,t)+n+e.substring(t+r)}var o,s,u=document.createElement("canvas");u.width=1,u.height=1;var l=u.getContext("2d"),c=0;var h="lt".concat(Date.now()).concat(this.loadTestFontId++),d=this._loadTestFont,f=n(d=i(d,976,h.length,h),16);for(o=0,s=h.length-3;o<s;o+=4)f=f-1482184792+n(h,o)|0;o<h.length&&(f=f-1482184792+n(h+"XXX",o)|0),d=i(d,16,4,(0,a.string32)(f));var p="url(data:font/opentype;base64,".concat(btoa(d),");"),v='@font-face {font-family:"'.concat(h,'";src:').concat(p,"}");this.insertRule(v);var m=[];for(o=0,s=t.length;o<s;o++)m.push(t[o].loadedName);m.push(h);var g=document.createElement("div");for(g.setAttribute("style","visibility: hidden;width: 10px; height: 10px;position: absolute; top: 0px; left: 0px;"),o=0,s=m.length;o<s;++o){var y=document.createElement("span");y.textContent="Hi",y.style.fontFamily=m[o],g.appendChild(y)}document.body.appendChild(g),function e(t,r){if(++c>30)return(0,a.warn)("Load test font never loaded."),void r();l.font="30px "+t,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0?r():setTimeout(e.bind(null,t,r))}(h,function(){document.body.removeChild(g),r.complete()})}},{key:"isFontLoadingAPISupported",get:function(){var e="undefined"!=typeof document&&!!document.fonts;if(e&&"undefined"!=typeof navigator){var t=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);t&&t[1]<63&&(e=!1)}return(0,a.shadow)(this,"isFontLoadingAPISupported",e)}},{key:"isSyncFontLoadingSupported",get:function(){var e=!1;if("undefined"==typeof navigator)e=!0;else{var t=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);t&&t[1]>=14&&(e=!0)}return(0,a.shadow)(this,"isSyncFontLoadingSupported",e)}},{key:"_loadTestFont",get:function(){return(0,a.shadow)(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}}]),t}();var m={get value(){return(0,a.shadow)(this,"value",(0,a.isEvalSupported)())}},g=function(){function e(t,r){var n=r.isEvalSupported,i=void 0===n||n,a=r.disableFontFace,o=void 0!==a&&a,s=r.ignoreErrors,u=void 0!==s&&s,l=r.onUnsupportedFeature,c=void 0===l?null:l,d=r.fontRegistry,f=void 0===d?null:d;for(var p in h(this,e),this.compiledGlyphs=Object.create(null),t)this[p]=t[p];this.isEvalSupported=!1!==i,this.disableFontFace=!0===o,this.ignoreErrors=!0===u,this._onUnsupportedFeature=c,this.fontRegistry=f}return f(e,[{key:"createNativeFontFace",value:function(){if(!this.data||this.disableFontFace)return null;var e=new FontFace(this.loadedName,this.data,{});return this.fontRegistry&&this.fontRegistry.registerFont(this),e}},{key:"createFontFaceRule",value:function(){if(!this.data||this.disableFontFace)return null;var e=(0,a.bytesToString)(new Uint8Array(this.data)),t="url(data:".concat(this.mimetype,";base64,").concat(btoa(e),");"),r='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(t,"}");return this.fontRegistry&&this.fontRegistry.registerFont(this,t),r}},{key:"getPathGenerator",value:function(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];var r,n;try{r=e.get(this.loadedName+"_path_"+t)}catch(e){if(!this.ignoreErrors)throw e;return this._onUnsupportedFeature&&this._onUnsupportedFeature({featureId:a.UNSUPPORTED_FEATURES.font}),(0,a.warn)('getPathGenerator - ignoring character: "'.concat(e,'".')),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&m.value){for(var i,o="",s=0,u=r.length;s<u;s++)i=void 0!==(n=r[s]).args?n.args.join(","):"",o+="c."+n.cmd+"("+i+");\n";return this.compiledGlyphs[t]=new Function("c","size",o)}return this.compiledGlyphs[t]=function(e,t){for(var i=0,a=r.length;i<a;i++)"scale"===(n=r[i]).cmd&&(n.args=[t,-t]),e[n.cmd].apply(e,n.args)}}}]),e}();t.FontFaceObject=g},function(e,t,r){"use strict";var n=Object.create(null),i=r(4),a="undefined"!=typeof navigator&&navigator.userAgent||"",o=/Trident/.test(a),s=/CriOS/.test(a);(o||s)&&(n.disableCreateObjectURL=!0),i()&&(n.disableFontFace=!0,n.nativeImageDecoderSupport="none"),t.apiCompatibilityParams=Object.freeze(n)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var n=r(1),i=r(155),a=16,o={get value(){return(0,n.shadow)(o,"value",(0,n.isLittleEndian)())}};function s(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],n=e[2],i=e[3],a=e[4],o=e[5],s=t*i-r*n,u=r*n-t*i;return[i/s,r/u,n/u,t/s,(i*a-n*o)/u,(r*a-t*o)/s]}}),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,n,i,a,o){var s=this._transformMatrix;this._transformMatrix=[s[0]*t+s[2]*r,s[1]*t+s[3]*r,s[0]*n+s[2]*i,s[1]*n+s[3]*i,s[0]*a+s[2]*o+s[4],s[1]*a+s[3]*o+s[5]],e._originalTransform(t,r,n,i,a,o)},e.setTransform=function(t,r,n,i,a,o){this._transformMatrix=[t,r,n,i,a,o],e._originalSetTransform(t,r,n,i,a,o)},e.rotate=function(e){var t=Math.cos(e),r=Math.sin(e),n=this._transformMatrix;this._transformMatrix=[n[0]*t+n[2]*r,n[1]*t+n[3]*r,n[0]*-r+n[2]*t,n[1]*-r+n[3]*t,n[4],n[5]],this._originalRotate(e)})}var u=function(){function e(e){this.canvasFactory=e,this.cache=Object.create(null)}return e.prototype={getCanvas:function(e,t,r,n){var i;return void 0!==this.cache[e]?(i=this.cache[e],this.canvasFactory.reset(i,t,r),i.context.setTransform(1,0,0,1,0,0)):(i=this.canvasFactory.create(t,r),this.cache[e]=i),n&&s(i.context),i},clear:function(){for(var e in this.cache){var t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}},e}();var l=function(){function e(){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=n.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=n.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=n.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}(),c=function(){function e(e,t,r,n,i,a){this.ctx=e,this.current=new l,this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=r,this.canvasFactory=n,this.webGLContext=i,this.imageLayer=a,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.cachedCanvases=new u(this.canvasFactory),e&&s(e),this._cachedGetSinglePixelWidth=null}function t(e,t){if("undefined"!=typeof ImageData&&t instanceof ImageData)e.putImageData(t,0,0);else{var r,i,s,u,l,c=t.height,h=t.width,d=c%a,f=(c-d)/a,p=0===d?f:f+1,v=e.createImageData(h,a),m=0,g=t.data,y=v.data;if(t.kind===n.ImageKind.GRAYSCALE_1BPP){var b=g.byteLength,_=new Uint32Array(y.buffer,0,y.byteLength>>2),A=_.length,S=h+7>>3,w=4294967295,k=o.value?4278190080:255;for(i=0;i<p;i++){for(u=i<f?a:d,r=0,s=0;s<u;s++){for(var x=b-m,P=0,C=x>S?h:8*x-7,R=-8&C,T=0,E=0;P<R;P+=8)E=g[m++],_[r++]=128&E?w:k,_[r++]=64&E?w:k,_[r++]=32&E?w:k,_[r++]=16&E?w:k,_[r++]=8&E?w:k,_[r++]=4&E?w:k,_[r++]=2&E?w:k,_[r++]=1&E?w:k;for(;P<C;P++)0===T&&(E=g[m++],T=128),_[r++]=E&T?w:k,T>>=1}for(;r<A;)_[r++]=0;e.putImageData(v,0,i*a)}}else if(t.kind===n.ImageKind.RGBA_32BPP){for(s=0,l=h*a*4,i=0;i<f;i++)y.set(g.subarray(m,m+l)),m+=l,e.putImageData(v,0,s),s+=a;i<p&&(l=h*d*4,y.set(g.subarray(m,m+l)),e.putImageData(v,0,s))}else{if(t.kind!==n.ImageKind.RGB_24BPP)throw new Error("bad image kind: ".concat(t.kind));for(l=h*(u=a),i=0;i<p;i++){for(i>=f&&(l=h*(u=d)),r=0,s=l;s--;)y[r++]=g[m++],y[r++]=g[m++],y[r++]=g[m++],y[r++]=255;e.putImageData(v,0,i*a)}}}}function r(e,t){for(var r=t.height,n=t.width,i=r%a,o=(r-i)/a,s=0===i?o:o+1,u=e.createImageData(n,a),l=0,c=t.data,h=u.data,d=0;d<s;d++){for(var f=d<o?a:i,p=3,v=0;v<f;v++)for(var m=0,g=0;g<n;g++){if(!m){var y=c[l++];m=128}h[p]=y&m?0:255,p+=4,m>>=1}e.putImageData(u,0,d*a)}}function c(e,t){for(var r=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],n=0,i=r.length;n<i;n++){var a=r[n];void 0!==e[a]&&(t[a]=e[a])}void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function h(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 d(e,t,r,n){for(var i=e.length,a=3;a<i;a+=4){var o=e[a];if(0===o)e[a-3]=t,e[a-2]=r,e[a-1]=n;else if(o<255){var s=255-o;e[a-3]=e[a-3]*o+t*s>>8,e[a-2]=e[a-2]*o+r*s>>8,e[a-1]=e[a-1]*o+n*s>>8}}}function f(e,t,r){for(var n=e.length,i=3;i<n;i+=4){var a=r?r[e[i]]:e[i];t[i]=t[i]*a*(1/255)|0}}function p(e,t,r){for(var n=e.length,i=3;i<n;i+=4){var a=77*e[i-3]+152*e[i-2]+28*e[i-1];t[i]=r?t[i]*r[a>>8]>>8:t[i]*a>>16}}function v(e,t,r,n){var i=t.canvas,a=t.context;e.setTransform(t.scaleX,0,0,t.scaleY,t.offsetX,t.offsetY);var o=t.backdrop||null;if(!t.transferMap&&n.isEnabled){var s=n.composeSMask({layer:r.canvas,mask:i,properties:{subtype:t.subtype,backdrop:o}});return e.setTransform(1,0,0,1,0,0),void e.drawImage(s,t.offsetX,t.offsetY)}!function(e,t,r,n,i,a,o){var s,u=!!a,l=u?a[0]:0,c=u?a[1]:0,h=u?a[2]:0;s="Luminosity"===i?p:f;for(var v=Math.min(n,Math.ceil(1048576/r)),m=0;m<n;m+=v){var g=Math.min(v,n-m),y=e.getImageData(0,m,r,g),b=t.getImageData(0,m,r,g);u&&d(y.data,l,c,h),s(y.data,b.data,o),e.putImageData(b,0,m)}}(a,r,i.width,i.height,t.subtype,o,t.transferMap),e.drawImage(i,0,0)}var m=["butt","round","square"],g=["miter","round","bevel"],y={},b={};for(var _ in e.prototype={beginDrawing:function(e){var t=e.transform,r=e.viewport,n=e.transparency,i=void 0!==n&&n,a=e.background,o=void 0===a?null:a,s=this.ctx.canvas.width,u=this.ctx.canvas.height;if(this.ctx.save(),this.ctx.fillStyle=o||"rgb(255, 255, 255)",this.ctx.fillRect(0,0,s,u),this.ctx.restore(),i){var l=this.cachedCanvases.getCanvas("transparent",s,u,!0);this.compositeCtx=this.ctx,this.transparentCanvas=l.canvas,this.ctx=l.context,this.ctx.save(),this.ctx.transform.apply(this.ctx,this.compositeCtx.mozCurrentTransform)}this.ctx.save(),h(this.ctx),t&&this.ctx.transform.apply(this.ctx,t),this.ctx.transform.apply(this.ctx,r.transform),this.baseTransform=this.ctx.mozCurrentTransform.slice(),this.imageLayer&&this.imageLayer.beginLayout()},executeOperatorList:function(e,t,r,i){var a=e.argsArray,o=e.fnArray,s=t||0,u=a.length;if(u===s)return s;for(var l,c=u-s>10&&"function"==typeof r,h=c?Date.now()+15:0,d=0,f=this.commonObjs,p=this.objs;;){if(void 0!==i&&s===i.nextBreakPoint)return i.breakIt(s,r),s;if((l=o[s])!==n.OPS.dependency)this[l].apply(this,a[s]);else{var v=!0,m=!1,g=void 0;try{for(var y,b=a[s][Symbol.iterator]();!(v=(y=b.next()).done);v=!0){var _=y.value,A=_.startsWith("g_")?f:p;if(!A.has(_))return A.get(_,r),s}}catch(e){m=!0,g=e}finally{try{v||null==b.return||b.return()}finally{if(m)throw g}}}if(++s===u)return s;if(c&&++d>10){if(Date.now()>h)return r(),s;d=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=m[e]},setLineJoin:function(e){this.ctx.lineJoin=g[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:function(e){},setFlatness:function(e){},setGState:function(e){for(var t=0,r=e.length;t<r;t++){var n=e[t],i=n[0],a=n[1];switch(i){case"LW":this.setLineWidth(a);break;case"LC":this.setLineCap(a);break;case"LJ":this.setLineJoin(a);break;case"ML":this.setMiterLimit(a);break;case"D":this.setDash(a[0],a[1]);break;case"RI":this.setRenderingIntent(a);break;case"FL":this.setFlatness(a);break;case"Font":this.setFont(a[0],a[1]);break;case"CA":this.current.strokeAlpha=n[1];break;case"ca":this.current.fillAlpha=n[1],this.ctx.globalAlpha=n[1];break;case"BM":this.ctx.globalCompositeOperation=a;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=a?this.tempSMask:null,this.current.activeSMask&&this.beginSMaskGroup(),this.tempSMask=null}}},beginSMaskGroup:function(){var e=this.current.activeSMask,t=e.canvas.width,r=e.canvas.height,n="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(n,t,r,!0),a=this.ctx,o=a.mozCurrentTransform;this.ctx.save();var s=i.context;s.scale(1/e.scaleX,1/e.scaleY),s.translate(-e.offsetX,-e.offsetY),s.transform.apply(s,o),e.startTransformInverse=s.mozCurrentTransformInverse,c(a,s),this.ctx=s,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(a),this.groupLevel++},suspendSMaskGroup:function(){var e=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),v(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),this.ctx.save(),c(e,this.ctx),this.current.resumeSMaskCtx=e;var t=n.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(),v(this.ctx,this.current.activeSMask,e,this.webGLContext),this.ctx.restore(),c(e,this.ctx);var t=n.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,n,i,a){this.ctx.transform(e,t,r,n,i,a),this._cachedGetSinglePixelWidth=null},constructPath:function(e,t){for(var r=this.ctx,i=this.current,a=i.x,o=i.y,s=0,u=0,l=e.length;s<l;s++)switch(0|e[s]){case n.OPS.rectangle:a=t[u++],o=t[u++];var c=t[u++],h=t[u++];0===c&&(c=this.getSinglePixelWidth()),0===h&&(h=this.getSinglePixelWidth());var d=a+c,f=o+h;this.ctx.moveTo(a,o),this.ctx.lineTo(d,o),this.ctx.lineTo(d,f),this.ctx.lineTo(a,f),this.ctx.lineTo(a,o),this.ctx.closePath();break;case n.OPS.moveTo:a=t[u++],o=t[u++],r.moveTo(a,o);break;case n.OPS.lineTo:a=t[u++],o=t[u++],r.lineTo(a,o);break;case n.OPS.curveTo:a=t[u+4],o=t[u+5],r.bezierCurveTo(t[u],t[u+1],t[u+2],t[u+3],a,o),u+=6;break;case n.OPS.curveTo2:r.bezierCurveTo(a,o,t[u],t[u+1],t[u+2],t[u+3]),a=t[u+2],o=t[u+3],u+=4;break;case n.OPS.curveTo3:a=t[u+2],o=t[u+3],r.bezierCurveTo(t[u],t[u+1],a,o,a,o),u+=4;break;case n.OPS.closePath:r.closePath()}i.setCurrentPoint(a,o)},closePath:function(){this.ctx.closePath()},stroke:function(e){e=void 0===e||e;var t=this.ctx,r=this.current.strokeColor;t.lineWidth=Math.max(.65*this.getSinglePixelWidth(),this.current.lineWidth),t.globalAlpha=this.current.strokeAlpha,r&&r.hasOwnProperty("type")&&"Pattern"===r.type?(t.save(),t.strokeStyle=r.getPattern(t,this),t.stroke(),t.restore()):t.stroke(),e&&this.consumePath(),t.globalAlpha=this.current.fillAlpha},closeStroke:function(){this.closePath(),this.stroke()},fill:function(e){e=void 0===e||e;var t=this.ctx,r=this.current.fillColor,n=!1;this.current.patternFill&&(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=y},eoClip:function(){this.pendingClip=b},beginText:function(){this.current.textMatrix=n.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 n=e[r];t.setTransform.apply(t,n.transform),t.translate(n.x,n.y),n.addToPath(t,n.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),i=this.current;if(!r)throw new Error("Can't find font for ".concat(e));if(i.fontMatrix=r.fontMatrix?r.fontMatrix:n.FONT_IDENTITY_MATRIX,0!==i.fontMatrix[0]&&0!==i.fontMatrix[3]||(0,n.warn)("Invalid font matrix for font "+e),t<0?(t=-t,i.fontDirection=-1):i.fontDirection=1,this.current.font=r,this.current.fontSize=t,!r.isType3Font){var a=r.loadedName||"sans-serif",o=r.black?"900":r.bold?"bold":"normal",s=r.italic?"italic":"normal",u='"'.concat(a,'", ').concat(r.fallbackName),l=t<16?16:t>100?100:t;this.current.fontSizeScale=t/l,this.ctx.font="".concat(s," ").concat(o," ").concat(l,"px ").concat(u)}},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,n,i,a){this.current.textMatrix=[e,t,r,n,i,a],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:function(e,t,r,i){var a,o=this.ctx,s=this.current,u=s.font,l=s.textRenderingMode,c=s.fontSize/s.fontSizeScale,h=l&n.TextRenderingMode.FILL_STROKE_MASK,d=!!(l&n.TextRenderingMode.ADD_TO_PATH_FLAG),f=s.patternFill&&u.data;((u.disableFontFace||d||f)&&(a=u.getPathGenerator(this.commonObjs,e)),u.disableFontFace||f?(o.save(),o.translate(t,r),o.beginPath(),a(o,c),i&&o.setTransform.apply(o,i),h!==n.TextRenderingMode.FILL&&h!==n.TextRenderingMode.FILL_STROKE||o.fill(),h!==n.TextRenderingMode.STROKE&&h!==n.TextRenderingMode.FILL_STROKE||o.stroke(),o.restore()):(h!==n.TextRenderingMode.FILL&&h!==n.TextRenderingMode.FILL_STROKE||o.fillText(e,t,r),h!==n.TextRenderingMode.STROKE&&h!==n.TextRenderingMode.FILL_STROKE||o.strokeText(e,t,r)),d)&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:o.mozCurrentTransform,x:t,y:r,fontSize:c,addToPath:a})},get isFontSubpixelAAEnabled(){var e=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10).context;e.scale(1.5,1),e.fillText("I",0,10);for(var t=e.getImageData(0,0,10,10).data,r=!1,i=3;i<t.length;i+=4)if(t[i]>0&&t[i]<255){r=!0;break}return(0,n.shadow)(this,"isFontSubpixelAAEnabled",r)},showText:function(e){var t=this.current,r=t.font;if(r.isType3Font)return this.showType3Text(e);var i=t.fontSize;if(0!==i){var a,o=this.ctx,s=t.fontSizeScale,u=t.charSpacing,l=t.wordSpacing,c=t.fontDirection,h=t.textHScale*c,d=e.length,f=r.vertical,p=f?1:-1,v=r.defaultVMetrics,m=i*t.fontMatrix[0],g=t.textRenderingMode===n.TextRenderingMode.FILL&&!r.disableFontFace&&!t.patternFill;if(o.save(),t.patternFill){o.save();var y=t.fillColor.getPattern(o,this);a=o.mozCurrentTransform,o.restore(),o.fillStyle=y}o.transform.apply(o,t.textMatrix),o.translate(t.x,t.y+t.textRise),c>0?o.scale(h,-1):o.scale(h,1);var b=t.lineWidth,_=t.textMatrixScale;if(0===_||0===b){var A=t.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;A!==n.TextRenderingMode.STROKE&&A!==n.TextRenderingMode.FILL_STROKE||(this._cachedGetSinglePixelWidth=null,b=.65*this.getSinglePixelWidth())}else b/=_;1!==s&&(o.scale(s,s),b/=s),o.lineWidth=b;var S,w=0;for(S=0;S<d;++S){var k=e[S];if((0,n.isNum)(k))w+=p*k*i/1e3;else{var x,P,C,R,T,E,O,F=!1,I=(k.isSpace?l:0)+u,L=k.fontChar,M=k.accent,j=k.width;if(f)T=k.vmetric||v,E=-(E=k.vmetric?T[1]:.5*j)*m,O=T[2]*m,j=T?-T[0]:j,x=E/s,P=(w+O)/s;else x=w/s,P=0;if(r.remeasure&&j>0){var D=1e3*o.measureText(L).width/i*s;if(j<D&&this.isFontSubpixelAAEnabled){var N=j/D;F=!0,o.save(),o.scale(N,1),x/=N}else j!==D&&(x+=(j-D)/2e3*i/s)}(k.isInFont||r.missingFile)&&(g&&!M?o.fillText(L,x,P):(this.paintChar(L,x,P,a),M&&(C=x+M.offset.x/s,R=P-M.offset.y/s,this.paintChar(M.fontChar,C,R,a)))),w+=j*m+I*c,F&&o.restore()}}f?t.y-=w*h:t.x+=w*h,o.restore()}},showType3Text:function(e){var t,r,i,a,o=this.ctx,s=this.current,u=s.font,l=s.fontSize,c=s.fontDirection,h=u.vertical?1:-1,d=s.charSpacing,f=s.wordSpacing,p=s.textHScale*c,v=s.fontMatrix||n.FONT_IDENTITY_MATRIX,m=e.length;if(!(s.textRenderingMode===n.TextRenderingMode.INVISIBLE)&&0!==l){for(this._cachedGetSinglePixelWidth=null,o.save(),o.transform.apply(o,s.textMatrix),o.translate(s.x,s.y),o.scale(p,c),t=0;t<m;++t)if(r=e[t],(0,n.isNum)(r))a=h*r*l/1e3,this.ctx.translate(a,0),s.x+=a*p;else{var g=(r.isSpace?f:0)+d,y=u.charProcOperatorList[r.operatorListId];if(y)this.processingType3=r,this.save(),o.scale(l,l),o.transform.apply(o,v),this.executeOperatorList(y),this.restore(),i=n.Util.applyTransform([r.width,0],v)[0]*l+g,o.translate(i,0),s.x+=i*p;else(0,n.warn)('Type3 character "'.concat(r.operatorListId,'" is not available.'))}o.restore(),this.processingType3=null}},setCharWidth:function(e,t){},setCharWidthAndBounds:function(e,t,r,n,i,a){this.ctx.rect(r,n,i-r,a-n),this.clip(),this.endPath()},getColorN_Pattern:function(t){var r,n=this;if("TilingPattern"===t[0]){var a=t[1],o=this.baseTransform||this.ctx.mozCurrentTransform.slice(),s={createCanvasGraphics:function(t){return new e(t,n.commonObjs,n.objs,n.canvasFactory,n.webGLContext)}};r=new i.TilingPattern(t,a,this.ctx,s,o)}else r=(0,i.getShadingPatternFromIR)(t);return r},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 i=n.Util.makeCssRgb(e,t,r);this.ctx.strokeStyle=i,this.current.strokeColor=i},setFillRGBColor:function(e,t,r){var i=n.Util.makeCssRgb(e,t,r);this.ctx.fillStyle=i,this.current.fillColor=i,this.current.patternFill=!1},shadingFill:function(e){var t=this.ctx;this.save();var r=(0,i.getShadingPatternFromIR)(e);t.fillStyle=r.getPattern(t,this,!0);var a=t.mozCurrentTransformInverse;if(a){var o=t.canvas,s=o.width,u=o.height,l=n.Util.applyTransform([0,0],a),c=n.Util.applyTransform([0,u],a),h=n.Util.applyTransform([s,0],a),d=n.Util.applyTransform([s,u],a),f=Math.min(l[0],c[0],h[0],d[0]),p=Math.min(l[1],c[1],h[1],d[1]),v=Math.max(l[0],c[0],h[0],d[0]),m=Math.max(l[1],c[1],h[1],d[1]);this.ctx.fillRect(f,p,v-f,m-p)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.restore()},beginInlineImage:function(){(0,n.unreachable)("Should not call beginInlineImage")},beginImageData:function(){(0,n.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],n=t[3]-t[1];this.ctx.rect(t[0],t[1],r,n),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,n.info)("TODO: Support non-isolated groups."),e.knockout&&(0,n.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 i=n.Util.getAxialAlignedBoundingBox(e.bbox,t.mozCurrentTransform),a=[0,0,t.canvas.width,t.canvas.height];i=n.Util.intersect(i,a)||[0,0,0,0];var o=Math.floor(i[0]),s=Math.floor(i[1]),u=Math.max(Math.ceil(i[2])-o,1),l=Math.max(Math.ceil(i[3])-s,1),h=1,d=1;u>4096&&(h=u/4096,u=4096),l>4096&&(d=l/4096,l=4096);var f="groupAt"+this.groupLevel;e.smask&&(f+="_smask_"+this.smaskCounter++%2);var p=this.cachedCanvases.getCanvas(f,u,l,!0),v=p.context;v.scale(1/h,1/d),v.translate(-o,-s),v.transform.apply(v,r),e.smask?this.smaskStack.push({canvas:p.canvas,context:v,offsetX:o,offsetY:s,scaleX:h,scaleY:d,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(o,s),t.scale(h,d)),c(t,v),this.ctx=v,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(),h(this.ctx),this.current=new l,Array.isArray(e)&&4===e.length){var n=e[2]-e[0],i=e[3]-e[1];this.ctx.rect(e[0],e[1],n,i),this.clip(),this.endPath()}this.transform.apply(this,t),this.transform.apply(this,r)},endAnnotation:function(){this.restore()},paintJpegXObject:function(e,t,r){var i=this.processingType3?this.commonObjs.get(e):this.objs.get(e);if(i){this.save();var a=this.ctx;if(a.scale(1/t,-1/r),a.drawImage(i,0,0,i.width,i.height,0,-r,t,r),this.imageLayer){var o=a.mozCurrentTransformInverse,s=this.getCanvasPosition(0,0);this.imageLayer.appendImage({objId:e,left:s[0],top:s[1],width:t/o[0],height:r/o[3]})}this.restore()}else(0,n.warn)("Dependent image isn't ready yet")},paintImageMaskXObject:function(e){var t=this.ctx,n=e.width,i=e.height,a=this.current.fillColor,o=this.current.patternFill,s=this.processingType3;if(s&&void 0===s.compiled&&(s.compiled=n<=1e3&&i<=1e3?function(e){var t,r,n,i,a=e.width,o=e.height,s=a+1,u=new Uint8Array(s*(o+1)),l=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),c=a+7&-8,h=e.data,d=new Uint8Array(c*o),f=0;for(t=0,i=h.length;t<i;t++)for(var p=128,v=h[t];p>0;)d[f++]=v&p?0:255,p>>=1;var m=0;for(0!==d[f=0]&&(u[0]=1,++m),r=1;r<a;r++)d[f]!==d[f+1]&&(u[r]=d[f]?2:1,++m),f++;for(0!==d[f]&&(u[r]=2,++m),t=1;t<o;t++){n=t*s,d[(f=t*c)-c]!==d[f]&&(u[n]=d[f]?1:8,++m);var g=(d[f]?4:0)+(d[f-c]?8:0);for(r=1;r<a;r++)l[g=(g>>2)+(d[f+1]?4:0)+(d[f-c+1]?8:0)]&&(u[n+r]=l[g],++m),f++;if(d[f-c]!==d[f]&&(u[n+r]=d[f]?2:4,++m),m>1e3)return null}for(n=t*s,0!==d[f=c*(o-1)]&&(u[n]=8,++m),r=1;r<a;r++)d[f]!==d[f+1]&&(u[n+r]=d[f]?4:8,++m),f++;if(0!==d[f]&&(u[n+r]=4,++m),m>1e3)return null;var y=new Int32Array([0,s,-1,0,-s,0,0,0,1]),b=[];for(t=0;m&&t<=o;t++){for(var _=t*s,A=_+a;_<A&&!u[_];)_++;if(_!==A){var S,w=[_%s,t],k=u[_],x=_;do{var P=y[k];do{_+=P}while(!u[_]);5!==(S=u[_])&&10!==S?(k=S,u[_]=0):(k=S&51*k>>4,u[_]&=k>>2|k<<2),w.push(_%s),w.push(_/s|0),u[_]||--m}while(x!==_);b.push(w),--t}}return function(e){e.save(),e.scale(1/a,-1/o),e.translate(0,-o),e.beginPath();for(var t=0,r=b.length;t<r;t++){var n=b[t];e.moveTo(n[0],n[1]);for(var i=2,s=n.length;i<s;i+=2)e.lineTo(n[i],n[i+1])}e.fill(),e.beginPath(),e.restore()}}({data:e.data,width:n,height:i}):null),s&&s.compiled)s.compiled(t);else{var u=this.cachedCanvases.getCanvas("maskCanvas",n,i),l=u.context;l.save(),r(l,e),l.globalCompositeOperation="source-in",l.fillStyle=o?a.getPattern(l,this):a,l.fillRect(0,0,n,i),l.restore(),this.paintInlineImageXObject(u.canvas)}},paintImageMaskXObjectRepeat:function(e,t,n,i){var a=e.width,o=e.height,s=this.current.fillColor,u=this.current.patternFill,l=this.cachedCanvases.getCanvas("maskCanvas",a,o),c=l.context;c.save(),r(c,e),c.globalCompositeOperation="source-in",c.fillStyle=u?s.getPattern(c,this):s,c.fillRect(0,0,a,o),c.restore();for(var h=this.ctx,d=0,f=i.length;d<f;d+=2)h.save(),h.transform(t,0,0,n,i[d],i[d+1]),h.scale(1,-1),h.drawImage(l.canvas,0,0,a,o,0,-1,1,1),h.restore()},paintImageMaskXObjectGroup:function(e){for(var t=this.ctx,n=this.current.fillColor,i=this.current.patternFill,a=0,o=e.length;a<o;a++){var s=e[a],u=s.width,l=s.height,c=this.cachedCanvases.getCanvas("maskCanvas",u,l),h=c.context;h.save(),r(h,s),h.globalCompositeOperation="source-in",h.fillStyle=i?n.getPattern(h,this):n,h.fillRect(0,0,u,l),h.restore(),t.save(),t.transform.apply(t,s.transform),t.scale(1,-1),t.drawImage(c.canvas,0,0,u,l,0,-1,1,1),t.restore()}},paintImageXObject:function(e){var t=this.processingType3?this.commonObjs.get(e):this.objs.get(e);t?this.paintInlineImageXObject(t):(0,n.warn)("Dependent image isn't ready yet")},paintImageXObjectRepeat:function(e,t,r,i){var a=this.processingType3?this.commonObjs.get(e):this.objs.get(e);if(a){for(var o=a.width,s=a.height,u=[],l=0,c=i.length;l<c;l+=2)u.push({transform:[t,0,0,r,i[l],i[l+1]],x:0,y:0,w:o,h:s});this.paintInlineImageXObjectGroup(a,u)}else(0,n.warn)("Dependent image isn't ready yet")},paintInlineImageXObject:function(e){var r=e.width,n=e.height,i=this.ctx;this.save(),i.scale(1/r,-1/n);var a,o,s=i.mozCurrentTransformInverse,u=s[0],l=s[1],c=Math.max(Math.sqrt(u*u+l*l),1),h=s[2],d=s[3],f=Math.max(Math.sqrt(h*h+d*d),1);if("function"==typeof HTMLElement&&e instanceof HTMLElement||!e.data)a=e;else{var p=(o=this.cachedCanvases.getCanvas("inlineImage",r,n)).context;t(p,e),a=o.canvas}for(var v=r,m=n,g="prescale1";c>2&&v>1||f>2&&m>1;){var y=v,b=m;c>2&&v>1&&(c/=v/(y=Math.ceil(v/2))),f>2&&m>1&&(f/=m/(b=Math.ceil(m/2))),(p=(o=this.cachedCanvases.getCanvas(g,y,b)).context).clearRect(0,0,y,b),p.drawImage(a,0,0,v,m,0,0,y,b),a=o.canvas,v=y,m=b,g="prescale1"===g?"prescale2":"prescale1"}if(i.drawImage(a,0,0,v,m,0,-n,r,n),this.imageLayer){var _=this.getCanvasPosition(0,-n);this.imageLayer.appendImage({imgData:e,left:_[0],top:_[1],width:r/s[0],height:n/s[3]})}this.restore()},paintInlineImageXObjectGroup:function(e,r){var n=this.ctx,i=e.width,a=e.height,o=this.cachedCanvases.getCanvas("inlineImage",i,a);t(o.context,e);for(var s=0,u=r.length;s<u;s++){var l=r[s];if(n.save(),n.transform.apply(n,l.transform),n.scale(1,-1),n.drawImage(o.canvas,l.x,l.y,l.w,l.h,0,-1,1,1),this.imageLayer){var c=this.getCanvasPosition(l.x,l.y);this.imageLayer.appendImage({imgData:e,left:c[0],top:c[1],width:i,height:a})}n.restore()}},paintSolidColorImageMask:function(){this.ctx.fillRect(0,0,1,1)},paintXObject:function(){(0,n.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===b?e.clip("evenodd"):e.clip(),this.pendingClip=null),e.beginPath()},getSinglePixelWidth:function(e){if(null===this._cachedGetSinglePixelWidth){var t=this.ctx.mozCurrentTransformInverse;this._cachedGetSinglePixelWidth=Math.sqrt(Math.max(t[0]*t[0]+t[1]*t[1],t[2]*t[2]+t[3]*t[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]]}},n.OPS)e.prototype[n.OPS[_]]=e.prototype[_];return e}();t.CanvasGraphics=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getShadingPatternFromIR=function(e){var t=i[e[0]];if(!t)throw new Error("Unknown IR type: ".concat(e[0]));return t.fromIR(e)},t.TilingPattern=void 0;var n=r(1),i={RadialAxial:{fromIR:function(e){var t=e[1],r=e[2],n=e[3],i=e[4],a=e[5],o=e[6];return{type:"Pattern",getPattern:function(e){var s;"axial"===t?s=e.createLinearGradient(n[0],n[1],i[0],i[1]):"radial"===t&&(s=e.createRadialGradient(n[0],n[1],a,i[0],i[1],o));for(var u=0,l=r.length;u<l;++u){var c=r[u];s.addColorStop(c[0],c[1])}return s}}}}},a=function(){function e(e,t,r,n,i,a,o,s){var u,l=t.coords,c=t.colors,h=e.data,d=4*e.width;l[r+1]>l[n+1]&&(u=r,r=n,n=u,u=a,a=o,o=u),l[n+1]>l[i+1]&&(u=n,n=i,i=u,u=o,o=s,s=u),l[r+1]>l[n+1]&&(u=r,r=n,n=u,u=a,a=o,o=u);var f=(l[r]+t.offsetX)*t.scaleX,p=(l[r+1]+t.offsetY)*t.scaleY,v=(l[n]+t.offsetX)*t.scaleX,m=(l[n+1]+t.offsetY)*t.scaleY,g=(l[i]+t.offsetX)*t.scaleX,y=(l[i+1]+t.offsetY)*t.scaleY;if(!(p>=y))for(var b,_,A,S,w,k,x,P,C,R=c[a],T=c[a+1],E=c[a+2],O=c[o],F=c[o+1],I=c[o+2],L=c[s],M=c[s+1],j=c[s+2],D=Math.round(p),N=Math.round(y),q=D;q<=N;q++){q<m?(b=f-(f-v)*(C=q<p?0:p===m?1:(p-q)/(p-m)),_=R-(R-O)*C,A=T-(T-F)*C,S=E-(E-I)*C):(b=v-(v-g)*(C=q>y?1:m===y?0:(m-q)/(m-y)),_=O-(O-L)*C,A=F-(F-M)*C,S=I-(I-j)*C),w=f-(f-g)*(C=q<p?0:q>y?1:(p-q)/(p-y)),k=R-(R-L)*C,x=T-(T-M)*C,P=E-(E-j)*C;for(var W=Math.round(Math.min(b,w)),U=Math.round(Math.max(b,w)),B=d*q+4*W,z=W;z<=U;z++)C=(C=(b-z)/(b-w))<0?0:C>1?1:C,h[B++]=_-(_-k)*C|0,h[B++]=A-(A-x)*C|0,h[B++]=S-(S-P)*C|0,h[B++]=255}}function t(t,r,n){var i,a,o=r.coords,s=r.colors;switch(r.type){case"lattice":var u=r.verticesPerRow,l=Math.floor(o.length/u)-1,c=u-1;for(i=0;i<l;i++)for(var h=i*u,d=0;d<c;d++,h++)e(t,n,o[h],o[h+1],o[h+u],s[h],s[h+1],s[h+u]),e(t,n,o[h+u+1],o[h+1],o[h+u],s[h+u+1],s[h+1],s[h+u]);break;case"triangles":for(i=0,a=o.length;i<a;i+=3)e(t,n,o[i],o[i+1],o[i+2],s[i],s[i+1],s[i+2]);break;default:throw new Error("illegal figure")}}return function(e,r,n,i,a,o,s,u){var l,c,h,d,f=Math.floor(e[0]),p=Math.floor(e[1]),v=Math.ceil(e[2])-f,m=Math.ceil(e[3])-p,g=Math.min(Math.ceil(Math.abs(v*r[0]*1.1)),3e3),y=Math.min(Math.ceil(Math.abs(m*r[1]*1.1)),3e3),b=v/g,_=m/y,A={coords:n,colors:i,offsetX:-f,offsetY:-p,scaleX:1/b,scaleY:1/_},S=g+4,w=y+4;if(u.isEnabled)l=u.drawFigures({width:g,height:y,backgroundColor:o,figures:a,context:A}),(c=s.getCanvas("mesh",S,w,!1)).context.drawImage(l,2,2),l=c.canvas;else{var k=(c=s.getCanvas("mesh",S,w,!1)).context,x=k.createImageData(g,y);if(o){var P=x.data;for(h=0,d=P.length;h<d;h+=4)P[h]=o[0],P[h+1]=o[1],P[h+2]=o[2],P[h+3]=255}for(h=0;h<a.length;h++)t(x,a[h],A);k.putImageData(x,2,2),l=c.canvas}return{canvas:l,offsetX:f-2*b,offsetY:p-2*_,scaleX:b,scaleY:_}}}();i.Mesh={fromIR:function(e){var t=e[2],r=e[3],i=e[4],o=e[5],s=e[6],u=e[8];return{type:"Pattern",getPattern:function(e,l,c){var h;if(c)h=n.Util.singularValueDecompose2dScale(e.mozCurrentTransform);else if(h=n.Util.singularValueDecompose2dScale(l.baseTransform),s){var d=n.Util.singularValueDecompose2dScale(s);h=[h[0]*d[0],h[1]*d[1]]}var f=a(o,h,t,r,i,c?null:u,l.cachedCanvases,l.webGLContext);return c||(e.setTransform.apply(e,l.baseTransform),s&&e.transform.apply(e,s)),e.translate(f.offsetX,f.offsetY),e.scale(f.scaleX,f.scaleY),e.createPattern(f.canvas,"no-repeat")}}}},i.Dummy={fromIR:function(){return{type:"Pattern",getPattern:function(){return"hotpink"}}}};var o=function(){var e=1,t=2;function r(e,t,r,n,i){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=n,this.baseTransform=i,this.type="Pattern",this.ctx=r}return r.prototype={createPatternCanvas:function(e){var t=this.operatorList,r=this.bbox,i=this.xstep,a=this.ystep,o=this.paintType,s=this.tilingType,u=this.color,l=this.canvasGraphicsFactory;(0,n.info)("TilingType: "+s);var c=r[0],h=r[1],d=r[2],f=r[3],p=n.Util.singularValueDecompose2dScale(this.matrix),v=n.Util.singularValueDecompose2dScale(this.baseTransform),m=[p[0]*v[0],p[1]*v[1]],g=this.getSizeAndScale(i,this.ctx.canvas.width,m[0]),y=this.getSizeAndScale(a,this.ctx.canvas.height,m[1]),b=e.cachedCanvases.getCanvas("pattern",g.size,y.size,!0),_=b.context,A=l.createCanvasGraphics(_);return A.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(A,o,u),A.transform(g.scale,0,0,y.scale,0,0),A.transform(1,0,0,1,-c,-h),this.clipBbox(A,r,c,h,d,f),A.executeOperatorList(t),this.ctx.transform(1,0,0,1,c,h),this.ctx.scale(1/g.scale,1/y.scale),b.canvas},getSizeAndScale:function(e,t,r){e=Math.abs(e);var n=Math.max(3e3,t),i=Math.ceil(e*r);return i>=n?i=n:r=i/e,{scale:r,size:i}},clipBbox:function(e,t,r,n,i,a){if(Array.isArray(t)&&4===t.length){var o=i-r,s=a-n;e.ctx.rect(r,n,o,s),e.clip(),e.endPath()}},setFillAndStrokeStyleToContext:function(r,i,a){var o=r.ctx,s=r.current;switch(i){case e:var u=this.ctx;o.fillStyle=u.fillStyle,o.strokeStyle=u.strokeStyle,s.fillColor=u.fillStyle,s.strokeColor=u.strokeStyle;break;case t:var l=n.Util.makeCssRgb(a[0],a[1],a[2]);o.fillStyle=l,o.strokeStyle=l,s.fillColor=l,s.strokeColor=l;break;default:throw new n.FormatError("Unsupported paint type: ".concat(i))}},getPattern:function(e,t){(e=this.ctx).setTransform.apply(e,this.baseTransform),e.transform.apply(e,this.matrix);var r=this.createPatternCanvas(t);return e.createPattern(r,"repeat")}},r}();t.TilingPattern=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;var n=Object.create(null);t.GlobalWorkerOptions=n,n.workerPort=void 0===n.workerPort?null:n.workerPort,n.workerSrc=void 0===n.workerSrc?"":n.workerSrc},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=f;var n,i=(n=r(148))&&n.__esModule?n:{default:n},a=r(1);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function u(e,t){return l.apply(this,arguments)}function l(){var e;return e=i.default.mark(function e(t,r){var n,a=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=a.length>2&&void 0!==a[2]?a[2]:null,t){e.next=3;break}return e.abrupt("return",void 0);case 3:return e.abrupt("return",t.apply(n,r));case 4:case"end":return e.stop()}},e)}),(l=function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(e){s(a,n,i,o,u,"next",e)}function u(e){s(a,n,i,o,u,"throw",e)}o(void 0)})}).apply(this,arguments)}function c(e){if("object"!==o(e))return e;switch(e.name){case"AbortException":return new a.AbortException(e.message);case"MissingPDFException":return new a.MissingPDFException(e.message);case"UnexpectedResponseException":return new a.UnexpectedResponseException(e.message,e.status);default:return new a.UnknownErrorException(e.message,e.details)}}function h(e){return!(e instanceof Error)||e instanceof a.AbortException||e instanceof a.MissingPDFException||e instanceof a.UnexpectedResponseException||e instanceof a.UnknownErrorException?e:new a.UnknownErrorException(e.message,e.toString())}function d(e,t,r){t?e.resolve():e.reject(r)}function f(e,t,r){var n=this;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);var i=this.callbacksCapabilities=Object.create(null),a=this.actionHandler=Object.create(null);this._onComObjOnMessage=function(e){var t=e.data;if(t.targetName===n.sourceName)if(t.stream)n._processStreamMessage(t);else if(t.isReply){var o=t.callbackId;if(!(t.callbackId in i))throw new Error("Cannot resolve callback ".concat(o));var s=i[o];delete i[o],"error"in t?s.reject(c(t.error)):s.resolve(t.data)}else{if(!(t.action in a))throw new Error("Unknown action from worker: ".concat(t.action));var u=a[t.action];if(t.callbackId){var l=n.sourceName,d=t.sourceName;Promise.resolve().then(function(){return u[0].call(u[1],t.data)}).then(function(e){r.postMessage({sourceName:l,targetName:d,isReply:!0,callbackId:t.callbackId,data:e})},function(e){r.postMessage({sourceName:l,targetName:d,isReply:!0,callbackId:t.callbackId,error:h(e)})})}else t.streamId?n._createStreamSink(t):u[0].call(u[1],t.data)}},r.addEventListener("message",this._onComObjOnMessage)}f.prototype={on:function(e,t,r){var n=this.actionHandler;if(n[e])throw new Error('There is already an actionName called "'.concat(e,'"'));n[e]=[t,r]},send:function(e,t,r){var n={sourceName:this.sourceName,targetName:this.targetName,action:e,data:t};this.postMessage(n,r)},sendWithPromise:function(e,t,r){var n=this.callbackId++,i={sourceName:this.sourceName,targetName:this.targetName,action:e,data:t,callbackId:n},o=(0,a.createPromiseCapability)();this.callbacksCapabilities[n]=o;try{this.postMessage(i,r)}catch(e){o.reject(e)}return o.promise},sendWithStream:function(e,t,r,n){var i=this,o=this.streamId++,s=this.sourceName,u=this.targetName;return new a.ReadableStream({start:function(r){var n=(0,a.createPromiseCapability)();return i.streamControllers[o]={controller:r,startCall:n,isClosed:!1},i.postMessage({sourceName:s,targetName:u,action:e,streamId:o,data:t,desiredSize:r.desiredSize}),n.promise},pull:function(e){var t=(0,a.createPromiseCapability)();return i.streamControllers[o].pullCall=t,i.postMessage({sourceName:s,targetName:u,stream:"pull",streamId:o,desiredSize:e.desiredSize}),t.promise},cancel:function(e){var t=(0,a.createPromiseCapability)();return i.streamControllers[o].cancelCall=t,i.streamControllers[o].isClosed=!0,i.postMessage({sourceName:s,targetName:u,stream:"cancel",reason:e,streamId:o}),t.promise}},r)},_createStreamSink:function(e){var t=this,r=this,n=this.actionHandler[e.action],i=e.streamId,o=e.desiredSize,s=this.sourceName,l=e.sourceName,c=(0,a.createPromiseCapability)(),h=function(e){var r=e.stream,n=e.chunk,a=e.transfers,o=e.success,u=e.reason;t.postMessage({sourceName:s,targetName:l,stream:r,streamId:i,chunk:n,success:o,reason:u},a)},d={enqueue:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var n=this.desiredSize;this.desiredSize-=t,n>0&&this.desiredSize<=0&&(this.sinkCapability=(0,a.createPromiseCapability)(),this.ready=this.sinkCapability.promise),h({stream:"enqueue",chunk:e,transfers:r})}},close:function(){this.isCancelled||(this.isCancelled=!0,h({stream:"close"}),delete r.streamSinks[i])},error:function(e){this.isCancelled||(this.isCancelled=!0,h({stream:"error",reason:e}))},sinkCapability:c,onPull:null,onCancel:null,isCancelled:!1,desiredSize:o,ready:null};d.sinkCapability.resolve(),d.ready=d.sinkCapability.promise,this.streamSinks[i]=d,u(n[0],[e.data,d],n[1]).then(function(){h({stream:"start_complete",success:!0})},function(e){h({stream:"start_complete",success:!1,reason:e})})},_processStreamMessage:function(e){var t=this,r=this.sourceName,n=e.sourceName,i=e.streamId,o=function(e){var a=e.stream,o=e.success,s=e.reason;t.comObj.postMessage({sourceName:r,targetName:n,stream:a,success:o,streamId:i,reason:s})},s=function(){Promise.all([t.streamControllers[e.streamId].startCall,t.streamControllers[e.streamId].pullCall,t.streamControllers[e.streamId].cancelCall].map(function(e){return e&&(t=e.promise,Promise.resolve(t).catch(function(){}));var t})).then(function(){delete t.streamControllers[e.streamId]})};switch(e.stream){case"start_complete":d(this.streamControllers[e.streamId].startCall,e.success,c(e.reason));break;case"pull_complete":d(this.streamControllers[e.streamId].pullCall,e.success,c(e.reason));break;case"pull":if(!this.streamSinks[e.streamId]){o({stream:"pull_complete",success:!0});break}this.streamSinks[e.streamId].desiredSize<=0&&e.desiredSize>0&&this.streamSinks[e.streamId].sinkCapability.resolve(),this.streamSinks[e.streamId].desiredSize=e.desiredSize,u(this.streamSinks[e.streamId].onPull).then(function(){o({stream:"pull_complete",success:!0})},function(e){o({stream:"pull_complete",success:!1,reason:e})});break;case"enqueue":(0,a.assert)(this.streamControllers[e.streamId],"enqueue should have stream controller"),this.streamControllers[e.streamId].isClosed||this.streamControllers[e.streamId].controller.enqueue(e.chunk);break;case"close":if((0,a.assert)(this.streamControllers[e.streamId],"close should have stream controller"),this.streamControllers[e.streamId].isClosed)break;this.streamControllers[e.streamId].isClosed=!0,this.streamControllers[e.streamId].controller.close(),s();break;case"error":(0,a.assert)(this.streamControllers[e.streamId],"error should have stream controller"),this.streamControllers[e.streamId].controller.error(c(e.reason)),s();break;case"cancel_complete":d(this.streamControllers[e.streamId].cancelCall,e.success,c(e.reason)),s();break;case"cancel":if(!this.streamSinks[e.streamId])break;u(this.streamSinks[e.streamId].onCancel,[c(e.reason)]).then(function(){o({stream:"cancel_complete",success:!0})},function(e){o({stream:"cancel_complete",success:!1,reason:e})}),this.streamSinks[e.streamId].sinkCapability.reject(c(e.reason)),this.streamSinks[e.streamId].isCancelled=!0,delete this.streamSinks[e.streamId];break;default:throw new Error("Unexpected stream case")}},postMessage:function(e,t){t&&this.postMessageTransfers?this.comObj.postMessage(e,t):this.comObj.postMessage(e)},destroy:function(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var n=r(1),i=r(159);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),(0,n.assert)("string"==typeof t,"Metadata: input is not a string"),t=this._repair(t);var r=(new i.SimpleXMLParser).parseFromString(t);this._metadata=Object.create(null),r&&this._parse(r)}var t,r,o;return t=e,(r=[{key:"_repair",value:function(e){return e.replace(/^([^<]+)/,"").replace(/>\\376\\377([^<]+)/g,function(e,t){for(var r=t.replace(/\\([0-3])([0-7])([0-7])/g,function(e,t,r,n){return String.fromCharCode(64*t+8*r+1*n)}).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: ".concat(t," isn't defined."))}),n="",i=0,a=r.length;i<a;i+=2){var o=256*r.charCodeAt(i)+r.charCodeAt(i+1);n+=o>=32&&o<127&&60!==o&&62!==o&&38!==o?String.fromCharCode(o):"&#x"+(65536+o).toString(16).substring(1)+";"}return">"+n})}},{key:"_parse",value:function(e){var t=e.documentElement;if("rdf:rdf"!==t.nodeName.toLowerCase())for(t=t.firstChild;t&&"rdf:rdf"!==t.nodeName.toLowerCase();)t=t.nextSibling;var r=t?t.nodeName.toLowerCase():null;if(t&&"rdf:rdf"===r&&t.hasChildNodes())for(var n=t.childNodes,i=0,a=n.length;i<a;i++){var o=n[i];if("rdf:description"===o.nodeName.toLowerCase())for(var s=0,u=o.childNodes.length;s<u;s++)if("#text"!==o.childNodes[s].nodeName.toLowerCase()){var l=o.childNodes[s],c=l.nodeName.toLowerCase();this._metadata[c]=l.textContent.trim()}}}},{key:"get",value:function(e){var t=this._metadata[e];return void 0!==t?t:null}},{key:"getAll",value:function(){return this._metadata}},{key:"has",value:function(e){return void 0!==this._metadata[e]}}])&&a(t.prototype,r),o&&a(t,o),e}();t.Metadata=o},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(e,t,r){return(o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=s(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),e}Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleXMLParser=void 0;var d={NoError:0,EndOfDocument:-1,UnterminatedCdat:-2,UnterminatedXmlDeclaration:-3,UnterminatedDoctypeDeclaration:-4,UnterminatedComment:-5,MalformedElement:-6,OutOfMemory:-7,UnterminatedAttributeValue:-8,UnterminatedElement:-9,ElementNeverBegun:-10};function f(e,t){var r=e[t];return" "===r||"\n"===r||"\r"===r||"\t"===r}var p=function(){function e(){l(this,e)}return h(e,[{key:"_resolveEntities",value:function(e){var t=this;return e.replace(/&([^;]+);/g,function(e,r){if("#x"===r.substring(0,2))return String.fromCharCode(parseInt(r.substring(2),16));if("#"===r.substring(0,1))return String.fromCharCode(parseInt(r.substring(1),10));switch(r){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return'"'}return t.onResolveEntity(r)})}},{key:"_parseContent",value:function(e,t){var r,n=t,i=[];function a(){for(;n<e.length&&f(e,n);)++n}for(;n<e.length&&!f(e,n)&&">"!==e[n]&&"/"!==e[n];)++n;for(r=e.substring(t,n),a();n<e.length&&">"!==e[n]&&"/"!==e[n]&&"?"!==e[n];){a();for(var o,s="";n<e.length&&!f(e,n)&&"="!==e[n];)s+=e[n],++n;if(a(),"="!==e[n])return null;++n,a();var u=e[n];if('"'!==u&&"'"!==u)return null;var l=e.indexOf(u,++n);if(l<0)return null;o=e.substring(n,l),i.push({name:s,value:this._resolveEntities(o)}),n=l+1,a()}return{name:r,attributes:i,parsed:n-t}}},{key:"_parseProcessingInstruction",value:function(e,t){var r,n=t;for(;n<e.length&&!f(e,n)&&">"!==e[n]&&"/"!==e[n];)++n;r=e.substring(t,n),function(){for(;n<e.length&&f(e,n);)++n}();for(var i=n;n<e.length&&("?"!==e[n]||">"!==e[n+1]);)++n;return{name:r,value:e.substring(i,n),parsed:n-t}}},{key:"parseXml",value:function(e){for(var t=0;t<e.length;){var r=t;if("<"===e[t]){var n=void 0;switch(e[++r]){case"/":if(++r,(n=e.indexOf(">",r))<0)return void this.onError(d.UnterminatedElement);this.onEndElement(e.substring(r,n)),r=n+1;break;case"?":++r;var i=this._parseProcessingInstruction(e,r);if("?>"!==e.substring(r+i.parsed,r+i.parsed+2))return void this.onError(d.UnterminatedXmlDeclaration);this.onPi(i.name,i.value),r+=i.parsed+2;break;case"!":if("--"===e.substring(r+1,r+3)){if((n=e.indexOf("--\x3e",r+3))<0)return void this.onError(d.UnterminatedComment);this.onComment(e.substring(r+3,n)),r=n+3}else if("[CDATA["===e.substring(r+1,r+8)){if((n=e.indexOf("]]>",r+8))<0)return void this.onError(d.UnterminatedCdat);this.onCdata(e.substring(r+8,n)),r=n+3}else{if("DOCTYPE"!==e.substring(r+1,r+8))return void this.onError(d.MalformedElement);var a=e.indexOf("[",r+8),o=!1;if((n=e.indexOf(">",r+8))<0)return void this.onError(d.UnterminatedDoctypeDeclaration);if(a>0&&n>a){if((n=e.indexOf("]>",r+8))<0)return void this.onError(d.UnterminatedDoctypeDeclaration);o=!0}var s=e.substring(r+8,n+(o?1:0));this.onDoctype(s),r=n+(o?2:1)}break;default:var u=this._parseContent(e,r);if(null===u)return void this.onError(d.MalformedElement);var l=!1;if("/>"===e.substring(r+u.parsed,r+u.parsed+2))l=!0;else if(">"!==e.substring(r+u.parsed,r+u.parsed+1))return void this.onError(d.UnterminatedElement);this.onBeginElement(u.name,u.attributes,l),r+=u.parsed+(l?2:1)}}else{for(;r<e.length&&"<"!==e[r];)r++;var c=e.substring(t,r);this.onText(this._resolveEntities(c))}t=r}}},{key:"onResolveEntity",value:function(e){return"&".concat(e,";")}},{key:"onPi",value:function(e,t){}},{key:"onComment",value:function(e){}},{key:"onCdata",value:function(e){}},{key:"onDoctype",value:function(e){}},{key:"onText",value:function(e){}},{key:"onBeginElement",value:function(e,t,r){}},{key:"onEndElement",value:function(e){}},{key:"onError",value:function(e){}}]),e}(),v=function(){function e(t,r){l(this,e),this.nodeName=t,this.nodeValue=r,Object.defineProperty(this,"parentNode",{value:null,writable:!0})}return h(e,[{key:"hasChildNodes",value:function(){return this.childNodes&&this.childNodes.length>0}},{key:"firstChild",get:function(){return this.childNodes&&this.childNodes[0]}},{key:"nextSibling",get:function(){var e=this.parentNode.childNodes;if(e){var t=e.indexOf(this);if(-1!==t)return e[t+1]}}},{key:"textContent",get:function(){return this.childNodes?this.childNodes.map(function(e){return e.textContent}).join(""):this.nodeValue||""}}]),e}(),m=function(e){function t(){var e;return l(this,t),(e=a(this,s(t).call(this)))._currentFragment=null,e._stack=null,e._errorCode=d.NoError,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,p),h(t,[{key:"parseFromString",value:function(e){if(this._currentFragment=[],this._stack=[],this._errorCode=d.NoError,this.parseXml(e),this._errorCode===d.NoError){var t=i(this._currentFragment,1)[0];if(t)return{documentElement:t}}}},{key:"onResolveEntity",value:function(e){switch(e){case"apos":return"'"}return o(s(t.prototype),"onResolveEntity",this).call(this,e)}},{key:"onText",value:function(e){if(!function(e){for(var t=0,r=e.length;t<r;t++)if(!f(e,t))return!1;return!0}(e)){var t=new v("#text",e);this._currentFragment.push(t)}}},{key:"onCdata",value:function(e){var t=new v("#text",e);this._currentFragment.push(t)}},{key:"onBeginElement",value:function(e,t,r){var n=new v(e);n.childNodes=[],this._currentFragment.push(n),r||(this._stack.push(this._currentFragment),this._currentFragment=n.childNodes)}},{key:"onEndElement",value:function(e){this._currentFragment=this._stack.pop()||[];var t=this._currentFragment[this._currentFragment.length-1];if(t)for(var r=0,n=t.childNodes.length;r<n;r++)t.childNodes[r].parentNode=t}},{key:"onError",value:function(e){this._errorCode=e}}]),t}();t.SimpleXMLParser=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDataTransportStream=void 0;var n,i=(n=r(148))&&n.__esModule?n:{default:n},a=r(1);function o(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function s(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,u,"next",e)}function u(e){o(a,n,i,s,u,"throw",e)}s(void 0)})}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),e}var h=function(){function e(t,r){var n=this;u(this,e),(0,a.assert)(r),this._queuedChunks=[],this._progressiveDone=t.progressiveDone||!1;var i=t.initialData;if(i&&i.length>0){var o=new Uint8Array(i).buffer;this._queuedChunks.push(o)}this._pdfDataRangeTransport=r,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._contentLength=t.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener(function(e,t){n._onReceiveData({begin:e,chunk:t})}),this._pdfDataRangeTransport.addProgressListener(function(e,t){n._onProgress({loaded:e,total:t})}),this._pdfDataRangeTransport.addProgressiveReadListener(function(e){n._onReceiveData({chunk:e})}),this._pdfDataRangeTransport.addProgressiveDoneListener(function(){n._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}return c(e,[{key:"_onReceiveData",value:function(e){var t=new Uint8Array(e.chunk).buffer;if(void 0===e.begin)this._fullRequestReader?this._fullRequestReader._enqueue(t):this._queuedChunks.push(t);else{var r=this._rangeReaders.some(function(r){return r._begin===e.begin&&(r._enqueue(t),!0)});(0,a.assert)(r)}}},{key:"_onProgress",value:function(e){if(void 0===e.total){var t=this._rangeReaders[0];t&&t.onProgress&&t.onProgress({loaded:e.loaded})}else{var r=this._fullRequestReader;r&&r.onProgress&&r.onProgress({loaded:e.loaded,total:e.total})}}},{key:"_onProgressiveDone",value:function(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}},{key:"_removeRangeReader",value:function(e){var t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}},{key:"getFullReader",value:function(){(0,a.assert)(!this._fullRequestReader);var e=this._queuedChunks;return this._queuedChunks=null,new d(this,e,this._progressiveDone)}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=new f(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeReaders.slice(0).forEach(function(t){t.cancel(e)}),this._pdfDataRangeTransport.abort()}},{key:"_progressiveDataLength",get:function(){return this._fullRequestReader?this._fullRequestReader._loaded:0}}]),e}();t.PDFDataTransportStream=h;var d=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];u(this,e),this._stream=t,this._done=n||!1,this._filename=null,this._queuedChunks=r||[],this._loaded=0;var i=!0,a=!1,o=void 0;try{for(var s,l=this._queuedChunks[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var c=s.value;this._loaded+=c.byteLength}}catch(e){a=!0,o=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw o}}this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}return c(e,[{key:"_enqueue",value:function(e){if(!this._done){if(this._requests.length>0)this._requests.shift().resolve({value:e,done:!1});else this._queuedChunks.push(e);this._loaded+=e.byteLength}}},{key:"read",value:function(){var e=s(i.default.mark(function e(){var t,r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this._queuedChunks.length>0)){e.next=3;break}return t=this._queuedChunks.shift(),e.abrupt("return",{value:t,done:!1});case 3:if(!this._done){e.next=5;break}return e.abrupt("return",{value:void 0,done:!0});case 5:return r=(0,a.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 8:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._done=!0,this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[]}},{key:"progressiveDone",value:function(){this._done||(this._done=!0)}},{key:"headersReady",get:function(){return this._headersReady}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._stream._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._stream._isStreamingSupported}},{key:"contentLength",get:function(){return this._stream._contentLength}}]),e}(),f=function(){function e(t,r,n){u(this,e),this._stream=t,this._begin=r,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}return c(e,[{key:"_enqueue",value:function(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else this._requests.shift().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)}}},{key:"read",value:function(){var e=s(i.default.mark(function e(){var t,r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._queuedChunk){e.next=4;break}return t=this._queuedChunk,this._queuedChunk=null,e.abrupt("return",{value:t,done:!1});case 4:if(!this._done){e.next=6;break}return e.abrupt("return",{value:void 0,done:!0});case 6:return r=(0,a.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 9:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._done=!0,this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[],this._stream._removeRangeReader(this)}},{key:"isStreamingSupported",get:function(){return!1}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebGLContext=void 0;var n=r(1);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=function(){function e(t){var r=t.enable,n=void 0!==r&&r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._enabled=!0===n}var t,r,a;return t=e,(r=[{key:"composeSMask",value:function(e){var t=e.layer,r=e.mask,n=e.properties;return o.composeSMask(t,r,n)}},{key:"drawFigures",value:function(e){var t=e.width,r=e.height,n=e.backgroundColor,i=e.figures,a=e.context;return o.drawFigures(t,r,n,i,a)}},{key:"clear",value:function(){o.cleanup()}},{key:"isEnabled",get:function(){var e=this._enabled;return e&&(e=o.tryInitGL()),(0,n.shadow)(this,"isEnabled",e)}}])&&i(t.prototype,r),a&&i(t,a),e}();t.WebGLContext=a;var o=function(){function e(e,t,r){var n=e.createShader(r);if(e.shaderSource(n,t),e.compileShader(n),!e.getShaderParameter(n,e.COMPILE_STATUS)){var i=e.getShaderInfoLog(n);throw new Error("Error during shader compilation: "+i)}return n}function t(t,r){return e(t,r,t.VERTEX_SHADER)}function r(t,r){return e(t,r,t.FRAGMENT_SHADER)}function n(e,t){for(var r=e.createProgram(),n=0,i=t.length;n<i;++n)e.attachShader(r,t[n]);if(e.linkProgram(r),!e.getProgramParameter(r,e.LINK_STATUS)){var a=e.getProgramInfoLog(r);throw new Error("Error during program linking: "+a)}return r}function i(e,t,r){e.activeTexture(r);var n=e.createTexture();return e.bindTexture(e.TEXTURE_2D,n),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),n}var a,o;function s(){a||(o=document.createElement("canvas"),a=o.getContext("webgl",{premultipliedalpha:!1}))}var u=" 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; } ",l=" 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; } ",c=null;var h=" 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); } ",d=" precision mediump float; varying vec4 v_color; void main() { gl_FragColor = v_color; } ",f=null;return{tryInitGL:function(){try{return s(),!!a}catch(e){}return!1},composeSMask:function(e,h,d){var f=e.width,p=e.height;c||function(){var e,i;s(),e=o,o=null,i=a,a=null;var h=n(i,[t(i,u),r(i,l)]);i.useProgram(h);var d={};d.gl=i,d.canvas=e,d.resolutionLocation=i.getUniformLocation(h,"u_resolution"),d.positionLocation=i.getAttribLocation(h,"a_position"),d.backdropLocation=i.getUniformLocation(h,"u_backdrop"),d.subtypeLocation=i.getUniformLocation(h,"u_subtype");var f=i.getAttribLocation(h,"a_texCoord"),p=i.getUniformLocation(h,"u_image"),v=i.getUniformLocation(h,"u_mask"),m=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,m),i.bufferData(i.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),i.STATIC_DRAW),i.enableVertexAttribArray(f),i.vertexAttribPointer(f,2,i.FLOAT,!1,0,0),i.uniform1i(p,0),i.uniform1i(v,1),c=d}();var v=c,m=v.canvas,g=v.gl;m.width=f,m.height=p,g.viewport(0,0,g.drawingBufferWidth,g.drawingBufferHeight),g.uniform2f(v.resolutionLocation,f,p),d.backdrop?g.uniform4f(v.resolutionLocation,d.backdrop[0],d.backdrop[1],d.backdrop[2],1):g.uniform4f(v.resolutionLocation,0,0,0,0),g.uniform1i(v.subtypeLocation,"Luminosity"===d.subtype?1:0);var y=i(g,e,g.TEXTURE0),b=i(g,h,g.TEXTURE1),_=g.createBuffer();return g.bindBuffer(g.ARRAY_BUFFER,_),g.bufferData(g.ARRAY_BUFFER,new Float32Array([0,0,f,0,0,p,0,p,f,0,f,p]),g.STATIC_DRAW),g.enableVertexAttribArray(v.positionLocation),g.vertexAttribPointer(v.positionLocation,2,g.FLOAT,!1,0,0),g.clearColor(0,0,0,0),g.enable(g.BLEND),g.blendFunc(g.ONE,g.ONE_MINUS_SRC_ALPHA),g.clear(g.COLOR_BUFFER_BIT),g.drawArrays(g.TRIANGLES,0,6),g.flush(),g.deleteTexture(y),g.deleteTexture(b),g.deleteBuffer(_),m},drawFigures:function(e,i,u,l,c){f||function(){var e,i;s(),e=o,o=null,i=a,a=null;var u=n(i,[t(i,h),r(i,d)]);i.useProgram(u);var l={};l.gl=i,l.canvas=e,l.resolutionLocation=i.getUniformLocation(u,"u_resolution"),l.scaleLocation=i.getUniformLocation(u,"u_scale"),l.offsetLocation=i.getUniformLocation(u,"u_offset"),l.positionLocation=i.getAttribLocation(u,"a_position"),l.colorLocation=i.getAttribLocation(u,"a_color"),f=l}();var p=f,v=p.canvas,m=p.gl;v.width=e,v.height=i,m.viewport(0,0,m.drawingBufferWidth,m.drawingBufferHeight),m.uniform2f(p.resolutionLocation,e,i);var g,y,b,_=0;for(g=0,y=l.length;g<y;g++)switch(l[g].type){case"lattice":_+=((b=l[g].coords.length/l[g].verticesPerRow|0)-1)*(l[g].verticesPerRow-1)*6;break;case"triangles":_+=l[g].coords.length}var A=new Float32Array(2*_),S=new Uint8Array(3*_),w=c.coords,k=c.colors,x=0,P=0;for(g=0,y=l.length;g<y;g++){var C=l[g],R=C.coords,T=C.colors;switch(C.type){case"lattice":var E=C.verticesPerRow;b=R.length/E|0;for(var O=1;O<b;O++)for(var F=O*E+1,I=1;I<E;I++,F++)A[x]=w[R[F-E-1]],A[x+1]=w[R[F-E-1]+1],A[x+2]=w[R[F-E]],A[x+3]=w[R[F-E]+1],A[x+4]=w[R[F-1]],A[x+5]=w[R[F-1]+1],S[P]=k[T[F-E-1]],S[P+1]=k[T[F-E-1]+1],S[P+2]=k[T[F-E-1]+2],S[P+3]=k[T[F-E]],S[P+4]=k[T[F-E]+1],S[P+5]=k[T[F-E]+2],S[P+6]=k[T[F-1]],S[P+7]=k[T[F-1]+1],S[P+8]=k[T[F-1]+2],A[x+6]=A[x+2],A[x+7]=A[x+3],A[x+8]=A[x+4],A[x+9]=A[x+5],A[x+10]=w[R[F]],A[x+11]=w[R[F]+1],S[P+9]=S[P+3],S[P+10]=S[P+4],S[P+11]=S[P+5],S[P+12]=S[P+6],S[P+13]=S[P+7],S[P+14]=S[P+8],S[P+15]=k[T[F]],S[P+16]=k[T[F]+1],S[P+17]=k[T[F]+2],x+=12,P+=18;break;case"triangles":for(var L=0,M=R.length;L<M;L++)A[x]=w[R[L]],A[x+1]=w[R[L]+1],S[P]=k[T[L]],S[P+1]=k[T[L]+1],S[P+2]=k[T[L]+2],x+=2,P+=3}}u?m.clearColor(u[0]/255,u[1]/255,u[2]/255,1):m.clearColor(0,0,0,0),m.clear(m.COLOR_BUFFER_BIT);var j=m.createBuffer();m.bindBuffer(m.ARRAY_BUFFER,j),m.bufferData(m.ARRAY_BUFFER,A,m.STATIC_DRAW),m.enableVertexAttribArray(p.positionLocation),m.vertexAttribPointer(p.positionLocation,2,m.FLOAT,!1,0,0);var D=m.createBuffer();return m.bindBuffer(m.ARRAY_BUFFER,D),m.bufferData(m.ARRAY_BUFFER,S,m.STATIC_DRAW),m.enableVertexAttribArray(p.colorLocation),m.vertexAttribPointer(p.colorLocation,3,m.UNSIGNED_BYTE,!1,0,0),m.uniform2f(p.scaleLocation,c.scaleX,c.scaleY),m.uniform2f(p.offsetLocation,c.offsetX,c.offsetY),m.drawArrays(m.TRIANGLES,0,_),m.flush(),m.deleteBuffer(j),m.deleteBuffer(D),v},cleanup:function(){c&&c.canvas&&(c.canvas.width=0,c.canvas.height=0),f&&f.canvas&&(f.canvas.width=0,f.canvas.height=0),c=null,f=null}}}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderTextLayer=void 0;var n,i=r(1),a=(n=r(3))&&n.__esModule?n:{default:n};var o=function(){var e=1e5,t=/\S/;var r=["left: ",0,"px; top: ",0,"px; font-size: ",0,"px; font-family: ","",";"];function n(e,n,a){var o,s=document.createElement("span"),u={style:null,angle:0,canvasWidth:0,isWhitespace:!1,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1};if(e._textDivs.push(s),o=n.str,!t.test(o))return u.isWhitespace=!0,void e._textDivProperties.set(s,u);var l=i.Util.transform(e._viewport.transform,n.transform),c=Math.atan2(l[1],l[0]),h=a[n.fontName];h.vertical&&(c+=Math.PI/2);var d,f,p=Math.sqrt(l[2]*l[2]+l[3]*l[3]),v=p;if(h.ascent?v=h.ascent*v:h.descent&&(v=(1+h.descent)*v),0===c?(d=l[4],f=l[5]-v):(d=l[4]+v*Math.sin(c),f=l[5]-v*Math.cos(c)),r[1]=d,r[3]=f,r[5]=p,r[7]=h.fontFamily,u.style=r.join(""),s.setAttribute("style",u.style),s.textContent=n.str,e._fontInspectorEnabled&&(s.dataset.fontName=n.fontName),0!==c&&(u.angle=c*(180/Math.PI)),n.str.length>1&&(h.vertical?u.canvasWidth=n.height*e._viewport.scale:u.canvasWidth=n.width*e._viewport.scale),e._textDivProperties.set(s,u),e._textContentStream&&e._layoutText(s),e._enhanceTextSelection){var m=1,g=0;0!==c&&(m=Math.cos(c),g=Math.sin(c));var y,b,_=(h.vertical?n.height:n.width)*e._viewport.scale,A=p;0!==c?(y=[m,g,-g,m,d,f],b=i.Util.getAxialAlignedBoundingBox([0,0,_,A],y)):b=[d,f,d+_,f+A],e._bounds.push({left:b[0],top:b[1],right:b[2],bottom:b[3],div:s,size:[_,A],m:y})}}function o(t){if(!t._canceled){var r=t._textDivs,n=t._capability,i=r.length;if(i>e)return t._renderingDone=!0,void n.resolve();if(!t._textContentStream)for(var a=0;a<i;a++)t._layoutText(r[a]);t._renderingDone=!0,n.resolve()}}function s(e){for(var t=e._bounds,r=e._viewport,n=function(e,t,r){var n=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}});u(e,n);var i=new Array(r.length);return n.forEach(function(e){var t=e.index;i[t]={left:e.x1New,top:0,right:e.x2New,bottom:0}}),r.map(function(t,r){var a=i[r],o=n[r];o.x1=t.top,o.y1=e-a.right,o.x2=t.bottom,o.y2=e-a.left,o.index=r,o.x1New=void 0,o.x2New=void 0}),u(t,n),n.forEach(function(e){var t=e.index;i[t].top=e.x1New,i[t].bottom=e.x2New}),i}(r.width,r.height,t),a=0;a<n.length;a++){var o=t[a].div,s=e._textDivProperties.get(o);if(0!==s.angle){var l=n[a],c=t[a],h=c.m,d=h[0],f=h[1],p=[[0,0],[0,c.size[1]],[c.size[0],0],c.size],v=new Float64Array(64);p.forEach(function(e,t){var r=i.Util.applyTransform(e,h);v[t+0]=d&&(l.left-r[0])/d,v[t+4]=f&&(l.top-r[1])/f,v[t+8]=d&&(l.right-r[0])/d,v[t+12]=f&&(l.bottom-r[1])/f,v[t+16]=f&&(l.left-r[0])/-f,v[t+20]=d&&(l.top-r[1])/d,v[t+24]=f&&(l.right-r[0])/-f,v[t+28]=d&&(l.bottom-r[1])/d,v[t+32]=d&&(l.left-r[0])/-d,v[t+36]=f&&(l.top-r[1])/-f,v[t+40]=d&&(l.right-r[0])/-d,v[t+44]=f&&(l.bottom-r[1])/-f,v[t+48]=f&&(l.left-r[0])/f,v[t+52]=d&&(l.top-r[1])/-d,v[t+56]=f&&(l.right-r[0])/f,v[t+60]=d&&(l.bottom-r[1])/-d});var m=function(e,t,r){for(var n=0,i=0;i<r;i++){var a=e[t++];a>0&&(n=n?Math.min(a,n):a)}return n},g=1+Math.min(Math.abs(d),Math.abs(f));s.paddingLeft=m(v,32,16)/g,s.paddingTop=m(v,48,16)/g,s.paddingRight=m(v,0,16)/g,s.paddingBottom=m(v,16,16)/g,e._textDivProperties.set(o,s)}else s.paddingLeft=t[a].left-n[a].left,s.paddingTop=t[a].top-n[a].top,s.paddingRight=n[a].right-t[a].right,s.paddingBottom=n[a].bottom-t[a].bottom,e._textDivProperties.set(o,s)}}function u(e,t){t.sort(function(e,t){return e.x1-t.x1||e.index-t.index});var r=[{start:-1/0,end:1/0,boundary:{x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0}}];t.forEach(function(e){for(var t=0;t<r.length&&r[t].end<=e.y1;)t++;for(var n,i,a=r.length-1;a>=0&&r[a].start>=e.y2;)a--;var o,s,u=-1/0;for(o=t;o<=a;o++){var l;(l=(i=(n=r[o]).boundary).x2>e.x1?i.index>e.index?i.x1New:e.x1:void 0===i.x2New?(i.x2+e.x1)/2:i.x2New)>u&&(u=l)}for(e.x1New=u,o=t;o<=a;o++)void 0===(i=(n=r[o]).boundary).x2New?i.x2>e.x1?i.index>e.index&&(i.x2New=i.x2):i.x2New=u:i.x2New>u&&(i.x2New=Math.max(u,i.x2));var c=[],h=null;for(o=t;o<=a;o++){var d=(i=(n=r[o]).boundary).x2>e.x2?i:e;h===d?c[c.length-1].end=n.end:(c.push({start:n.start,end:n.end,boundary:d}),h=d)}for(r[t].start<e.y1&&(c[0].start=e.y1,c.unshift({start:r[t].start,end:e.y1,boundary:r[t].boundary})),e.y2<r[a].end&&(c[c.length-1].end=e.y2,c.push({start:e.y2,end:r[a].end,boundary:r[a].boundary})),o=t;o<=a;o++)if(void 0===(i=(n=r[o]).boundary).x2New){var f=!1;for(s=t-1;!f&&s>=0&&r[s].start>=i.y1;s--)f=r[s].boundary===i;for(s=a+1;!f&&s<r.length&&r[s].end<=i.y2;s++)f=r[s].boundary===i;for(s=0;!f&&s<c.length;s++)f=c[s].boundary===i;f||(i.x2New=u)}Array.prototype.splice.apply(r,[t,a-t+1].concat(c))}),r.forEach(function(t){var r=t.boundary;void 0===r.x2New&&(r.x2New=Math.max(e,r.x2))})}function l(e){var t=this,r=e.textContent,n=e.textContentStream,o=e.container,s=e.viewport,u=e.textDivs,l=e.textContentItemsStr,c=e.enhanceTextSelection;this._textContent=r,this._textContentStream=n,this._container=o,this._viewport=s,this._textDivs=u||[],this._textContentItemsStr=l||[],this._enhanceTextSelection=!!c,this._fontInspectorEnabled=!(!a.default.FontInspector||!a.default.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(function(){t._layoutTextCtx&&(t._layoutTextCtx.canvas.width=0,t._layoutTextCtx.canvas.height=0,t._layoutTextCtx=null)})}return l.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:function(e,t){for(var r=0,i=e.length;r<i;r++)this._textContentItemsStr.push(e[r].str),n(this,e[r],t)},_layoutText:function(e){var t=this._container,r=this._textDivProperties.get(e);if(!r.isWhitespace){var n=e.style.fontSize,i=e.style.fontFamily;n===this._layoutTextLastFontSize&&i===this._layoutTextLastFontFamily||(this._layoutTextCtx.font=n+" "+i,this._layoutTextLastFontSize=n,this._layoutTextLastFontFamily=i);var a=this._layoutTextCtx.measureText(e.textContent).width,o="";0!==r.canvasWidth&&a>0&&(r.scale=r.canvasWidth/a,o="scaleX(".concat(r.scale,")")),0!==r.angle&&(o="rotate(".concat(r.angle,"deg) ").concat(o)),o.length>0&&(r.originalTransform=o,e.style.transform=o),this._textDivProperties.set(e,r),t.appendChild(e)}},_render:function(e){var t=this,r=(0,i.createPromiseCapability)(),n=Object.create(null),a=document.createElement("canvas");if(a.mozOpaque=!0,this._layoutTextCtx=a.getContext("2d",{alpha:!1}),this._textContent){var s=this._textContent.items,u=this._textContent.styles;this._processItems(s,u),r.resolve()}else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');this._reader=this._textContentStream.getReader(),function e(){t._reader.read().then(function(i){var a=i.value;i.done?r.resolve():(Object.assign(n,a.styles),t._processItems(a.items,n),e())},r.reject)}()}r.promise.then(function(){n=null,e?t._renderTimer=setTimeout(function(){o(t),t._renderTimer=null},e):o(t)},this._capability.reject)},expandTextDivs:function(e){if(this._enhanceTextSelection&&this._renderingDone){null!==this._bounds&&(s(this),this._bounds=null);for(var t=0,r=this._textDivs.length;t<r;t++){var n=this._textDivs[t],i=this._textDivProperties.get(n);if(!i.isWhitespace)if(e){var a="",o="";1!==i.scale&&(a="scaleX("+i.scale+")"),0!==i.angle&&(a="rotate("+i.angle+"deg) "+a),0!==i.paddingLeft&&(o+=" padding-left: "+i.paddingLeft/i.scale+"px;",a+=" translateX("+-i.paddingLeft/i.scale+"px)"),0!==i.paddingTop&&(o+=" padding-top: "+i.paddingTop+"px;",a+=" translateY("+-i.paddingTop+"px)"),0!==i.paddingRight&&(o+=" padding-right: "+i.paddingRight/i.scale+"px;"),0!==i.paddingBottom&&(o+=" padding-bottom: "+i.paddingBottom+"px;"),""!==o&&n.setAttribute("style",i.style+o),""!==a&&(n.style.transform=a)}else n.style.padding=0,n.style.transform=i.originalTransform||""}}}},function(e){var t=new l({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}}();t.renderTextLayer=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationLayer=void 0;var n=r(151),i=r(1);function a(e,t,r){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?u(e):t}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),e}var v=function(){function e(){d(this,e)}return p(e,null,[{key:"create",value:function(e){switch(e.data.annotationType){case i.AnnotationType.LINK:return new g(e);case i.AnnotationType.TEXT:return new y(e);case i.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new _(e);case"Btn":return e.data.radioButton?new S(e):e.data.checkBox?new A(e):new w(e);case"Ch":return new k(e)}return new b(e);case i.AnnotationType.POPUP:return new x(e);case i.AnnotationType.FREETEXT:return new C(e);case i.AnnotationType.LINE:return new R(e);case i.AnnotationType.SQUARE:return new T(e);case i.AnnotationType.CIRCLE:return new E(e);case i.AnnotationType.POLYLINE:return new O(e);case i.AnnotationType.CARET:return new I(e);case i.AnnotationType.INK:return new L(e);case i.AnnotationType.POLYGON:return new F(e);case i.AnnotationType.HIGHLIGHT:return new M(e);case i.AnnotationType.UNDERLINE:return new j(e);case i.AnnotationType.SQUIGGLY:return new D(e);case i.AnnotationType.STRIKEOUT:return new N(e);case i.AnnotationType.STAMP:return new q(e);case i.AnnotationType.FILEATTACHMENT:return new W(e);default:return new m(e)}}}]),e}(),m=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];d(this,e),this.isRenderable=r,this.data=t.data,this.layer=t.layer,this.page=t.page,this.viewport=t.viewport,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderInteractiveForms=t.renderInteractiveForms,this.svgFactory=t.svgFactory,r&&(this.container=this._createContainer(n))}return p(e,[{key:"_createContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.data,r=this.page,n=this.viewport,a=document.createElement("section"),o=t.rect[2]-t.rect[0],s=t.rect[3]-t.rect[1];a.setAttribute("data-annotation-id",t.id);var u=i.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(a.style.transform="matrix("+n.transform.join(",")+")",a.style.transformOrigin=-u[0]+"px "+-u[1]+"px",!e&&t.borderStyle.width>0){a.style.borderWidth=t.borderStyle.width+"px",t.borderStyle.style!==i.AnnotationBorderStyleType.UNDERLINE&&(o-=2*t.borderStyle.width,s-=2*t.borderStyle.width);var l=t.borderStyle.horizontalCornerRadius,c=t.borderStyle.verticalCornerRadius;if(l>0||c>0){var h=l+"px / "+c+"px";a.style.borderRadius=h}switch(t.borderStyle.style){case i.AnnotationBorderStyleType.SOLID:a.style.borderStyle="solid";break;case i.AnnotationBorderStyleType.DASHED:a.style.borderStyle="dashed";break;case i.AnnotationBorderStyleType.BEVELED:(0,i.warn)("Unimplemented border style: beveled");break;case i.AnnotationBorderStyleType.INSET:(0,i.warn)("Unimplemented border style: inset");break;case i.AnnotationBorderStyleType.UNDERLINE:a.style.borderBottomStyle="solid"}t.color?a.style.borderColor=i.Util.makeCssRgb(0|t.color[0],0|t.color[1],0|t.color[2]):a.style.borderWidth=0}return a.style.left=u[0]+"px",a.style.top=u[1]+"px",a.style.width=o+"px",a.style.height=s+"px",a}},{key:"_createPopup",value:function(e,t,r){t||((t=document.createElement("div")).style.height=e.style.height,t.style.width=e.style.width,e.appendChild(t));var n=new P({container:e,trigger:t,color:r.color,title:r.title,modificationDate:r.modificationDate,contents:r.contents,hideWrapper:!0}).render();n.style.left=e.style.width,e.appendChild(n)}},{key:"render",value:function(){(0,i.unreachable)("Abstract method `AnnotationElement.render` called")}}]),e}(),g=function(e){function t(e){d(this,t);var r=!!(e.data.url||e.data.dest||e.data.action);return s(this,l(t).call(this,e,r))}return c(t,m),p(t,[{key:"render",value:function(){this.container.className="linkAnnotation";var e=this.data,t=this.linkService,r=document.createElement("a");return(0,n.addLinkAttributes)(r,{url:e.url,target:e.newWindow?n.LinkTarget.BLANK:t.externalLinkTarget,rel:t.externalLinkRel}),e.url||(e.action?this._bindNamedAction(r,e.action):this._bindLink(r,e.dest)),this.container.appendChild(r),this.container}},{key:"_bindLink",value:function(e,t){var r=this;e.href=this.linkService.getDestinationHash(t),e.onclick=function(){return t&&r.linkService.navigateTo(t),!1},t&&(e.className="internalLink")}},{key:"_bindNamedAction",value:function(e,t){var r=this;e.href=this.linkService.getAnchorUrl(""),e.onclick=function(){return r.linkService.executeNamedAction(t),!1},e.className="internalLink"}}]),t}(),y=function(e){function t(e){d(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return s(this,l(t).call(this,e,r))}return c(t,m),p(t,[{key:"render",value:function(){this.container.className="textAnnotation";var 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}}]),t}(),b=function(e){function t(){return d(this,t),s(this,l(t).apply(this,arguments))}return c(t,m),p(t,[{key:"render",value:function(){return this.container}}]),t}(),_=function(e){function t(e){d(this,t);var r=e.renderInteractiveForms||!e.data.hasAppearance&&!!e.data.fieldValue;return s(this,l(t).call(this,e,r))}return c(t,b),p(t,[{key:"render",value:function(){this.container.className="textWidgetAnnotation";var e=null;if(this.renderInteractiveForms){if(this.data.multiLine?(e=document.createElement("textarea")).textContent=this.data.fieldValue:((e=document.createElement("input")).type="text",e.setAttribute("value",this.data.fieldValue)),e.disabled=this.data.readOnly,null!==this.data.maxLen&&(e.maxLength=this.data.maxLen),this.data.comb){var t=(this.data.rect[2]-this.data.rect[0])/this.data.maxLen;e.classList.add("comb"),e.style.letterSpacing="calc("+t+"px - 1ch)"}}else{(e=document.createElement("div")).textContent=this.data.fieldValue,e.style.verticalAlign="middle",e.style.display="table-cell";var r=null;this.data.fontRefName&&this.page.commonObjs.has(this.data.fontRefName)&&(r=this.page.commonObjs.get(this.data.fontRefName)),this._setTextStyle(e,r)}return null!==this.data.textAlignment&&(e.style.textAlign=["left","center","right"][this.data.textAlignment]),this.container.appendChild(e),this.container}},{key:"_setTextStyle",value:function(e,t){var r=e.style;if(r.fontSize=this.data.fontSize+"px",r.direction=this.data.fontDirection<0?"rtl":"ltr",t){r.fontWeight=t.black?t.bold?"900":"bold":t.bold?"bold":"normal",r.fontStyle=t.italic?"italic":"normal";var n=t.loadedName?'"'+t.loadedName+'", ':"",i=t.fallbackName||"Helvetica, sans-serif";r.fontFamily=n+i}}}]),t}(),A=function(e){function t(e){return d(this,t),s(this,l(t).call(this,e,e.renderInteractiveForms))}return c(t,b),p(t,[{key:"render",value:function(){this.container.className="buttonWidgetAnnotation checkBox";var e=document.createElement("input");return e.disabled=this.data.readOnly,e.type="checkbox",this.data.fieldValue&&"Off"!==this.data.fieldValue&&e.setAttribute("checked",!0),this.container.appendChild(e),this.container}}]),t}(),S=function(e){function t(e){return d(this,t),s(this,l(t).call(this,e,e.renderInteractiveForms))}return c(t,b),p(t,[{key:"render",value:function(){this.container.className="buttonWidgetAnnotation radioButton";var 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}}]),t}(),w=function(e){function t(){return d(this,t),s(this,l(t).apply(this,arguments))}return c(t,g),p(t,[{key:"render",value:function(){var e=a(l(t.prototype),"render",this).call(this);return e.className="buttonWidgetAnnotation pushButton",e}}]),t}(),k=function(e){function t(e){return d(this,t),s(this,l(t).call(this,e,e.renderInteractiveForms))}return c(t,b),p(t,[{key:"render",value:function(){this.container.className="choiceWidgetAnnotation";var e=document.createElement("select");e.disabled=this.data.readOnly,this.data.combo||(e.size=this.data.options.length,this.data.multiSelect&&(e.multiple=!0));for(var t=0,r=this.data.options.length;t<r;t++){var n=this.data.options[t],i=document.createElement("option");i.textContent=n.displayValue,i.value=n.exportValue,this.data.fieldValue.includes(n.displayValue)&&i.setAttribute("selected",!0),e.appendChild(i)}return this.container.appendChild(e),this.container}}]),t}(),x=function(e){function t(e){d(this,t);var r=!(!e.data.title&&!e.data.contents);return s(this,l(t).call(this,e,r))}return c(t,m),p(t,[{key:"render",value:function(){if(this.container.className="popupAnnotation",["Line","Square","Circle","PolyLine","Polygon","Ink"].includes(this.data.parentType))return this.container;var e='[data-annotation-id="'+this.data.parentId+'"]',t=this.layer.querySelector(e);if(!t)return this.container;var r=new P({container:this.container,trigger:t,color:this.data.color,title:this.data.title,modificationDate:this.data.modificationDate,contents:this.data.contents}),n=parseFloat(t.style.left),i=parseFloat(t.style.width);return this.container.style.transformOrigin=-(n+i)+"px -"+t.style.top,this.container.style.left=n+i+"px",this.container.appendChild(r.render()),this.container}}]),t}(),P=function(){function e(t){d(this,e),this.container=t.container,this.trigger=t.trigger,this.color=t.color,this.title=t.title,this.modificationDate=t.modificationDate,this.contents=t.contents,this.hideWrapper=t.hideWrapper||!1,this.pinned=!1}return p(e,[{key:"render",value:function(){var e=document.createElement("div");e.className="popupWrapper",this.hideElement=this.hideWrapper?e:this.container,this.hideElement.setAttribute("hidden",!0);var t=document.createElement("div");t.className="popup";var r=this.color;if(r){var a=.7*(255-r[0])+r[0],o=.7*(255-r[1])+r[1],s=.7*(255-r[2])+r[2];t.style.backgroundColor=i.Util.makeCssRgb(0|a,0|o,0|s)}var u=document.createElement("h1");u.textContent=this.title,t.appendChild(u);var l=n.PDFDateString.toDateObject(this.modificationDate);if(l){var c=document.createElement("span");c.textContent="{{date}}, {{time}}",c.dataset.l10nId="annotation_date_string",c.dataset.l10nArgs=JSON.stringify({date:l.toLocaleDateString(),time:l.toLocaleTimeString()}),t.appendChild(c)}var h=this._formatContents(this.contents);return t.appendChild(h),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)),t.addEventListener("click",this._hide.bind(this,!0)),e.appendChild(t),e}},{key:"_formatContents",value:function(e){for(var t=document.createElement("p"),r=e.split(/(?:\r\n?|\n)/),n=0,i=r.length;n<i;++n){var a=r[n];t.appendChild(document.createTextNode(a)),n<i-1&&t.appendChild(document.createElement("br"))}return t}},{key:"_toggle",value:function(){this.pinned?this._hide(!0):this._show(!0)}},{key:"_show",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(this.pinned=!0),this.hideElement.hasAttribute("hidden")&&(this.hideElement.removeAttribute("hidden"),this.container.style.zIndex+=1)}},{key:"_hide",value:function(){(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.pinned=!1),this.hideElement.hasAttribute("hidden")||this.pinned||(this.hideElement.setAttribute("hidden",!0),this.container.style.zIndex-=1)}}]),e}(),C=function(e){function t(e){d(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return s(this,l(t).call(this,e,r,!0))}return c(t,m),p(t,[{key:"render",value:function(){return this.container.className="freeTextAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),t}(),R=function(e){function t(e){d(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return s(this,l(t).call(this,e,r,!0))}return c(t,m),p(t,[{key:"render",value:function(){this.container.className="lineAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],n=this.svgFactory.create(t,r),i=this.svgFactory.createElement("svg:line");return i.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),i.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),i.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),i.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),i.setAttribute("stroke-width",e.borderStyle.width),i.setAttribute("stroke","transparent"),n.appendChild(i),this.container.append(n),this._createPopup(this.container,i,e),this.container}}]),t}(),T=function(e){function t(e){d(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return s(this,l(t).call(this,e,r,!0))}return c(t,m),p(t,[{key:"render",value:function(){this.container.className="squareAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],n=this.svgFactory.create(t,r),i=e.borderStyle.width,a=this.svgFactory.createElement("svg:rect");return a.setAttribute("x",i/2),a.setAttribute("y",i/2),a.setAttribute("width",t-i),a.setAttribute("height",r-i),a.setAttribute("stroke-width",i),a.setAttribute("stroke","transparent"),a.setAttribute("fill","none"),n.appendChild(a),this.container.append(n),this._createPopup(this.container,a,e),this.container}}]),t}(),E=function(e){function t(e){d(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return s(this,l(t).call(this,e,r,!0))}return c(t,m),p(t,[{key:"render",value:function(){this.container.className="circleAnnotation";var e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],n=this.svgFactory.create(t,r),i=e.borderStyle.width,a=this.svgFactory.createElement("svg:ellipse");return a.setAttribute("cx",t/2),a.setAttribute("cy",r/2),a.setAttribute("rx",t/2-i/2),a.setAttribute("ry",r/2-i/2),a.setAttribute("stroke-width",i),a.setAttribute("stroke","transparent"),a.setAttribute("fill","none"),n.appendChild(a),this.container.append(n),this._createPopup(this.container,a,e),this.container}}]),t}(),O=function(e){function t(e){var r;d(this,t);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return(r=s(this,l(t).call(this,e,n,!0))).containerClassName="polylineAnnotation",r.svgElementName="svg:polyline",r}return c(t,m),p(t,[{key:"render",value:function(){this.container.className=this.containerClassName;for(var e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],n=this.svgFactory.create(t,r),i=e.vertices,a=[],o=0,s=i.length;o<s;o++){var u=i[o].x-e.rect[0],l=e.rect[3]-i[o].y;a.push(u+","+l)}a=a.join(" ");var c=e.borderStyle.width,h=this.svgFactory.createElement(this.svgElementName);return h.setAttribute("points",a),h.setAttribute("stroke-width",c),h.setAttribute("stroke","transparent"),h.setAttribute("fill","none"),n.appendChild(h),this.container.append(n),this._createPopup(this.container,h,e),this.container}}]),t}(),F=function(e){function t(e){var r;return d(this,t),(r=s(this,l(t).call(this,e))).containerClassName="polygonAnnotation",r.svgElementName="svg:polygon",r}return c(t,O),t}(),I=function(e){function t(e){d(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return s(this,l(t).call(this,e,r,!0))}return c(t,m),p(t,[{key:"render",value:function(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),t}(),L=function(e){function t(e){var r;d(this,t);var n=!!(e.data.hasPopup||e.data.title||e.data.contents);return(r=s(this,l(t).call(this,e,n,!0))).containerClassName="inkAnnotation",r.svgElementName="svg:polyline",r}return c(t,m),p(t,[{key:"render",value:function(){this.container.className=this.containerClassName;for(var e=this.data,t=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1],n=this.svgFactory.create(t,r),i=e.inkLists,a=0,o=i.length;a<o;a++){for(var s=i[a],u=[],l=0,c=s.length;l<c;l++){var h=s[l].x-e.rect[0],d=e.rect[3]-s[l].y;u.push(h+","+d)}u=u.join(" ");var f=e.borderStyle.width,p=this.svgFactory.createElement(this.svgElementName);p.setAttribute("points",u),p.setAttribute("stroke-width",f),p.setAttribute("stroke","transparent"),p.setAttribute("fill","none"),this._createPopup(this.container,p,e),n.appendChild(p)}return this.container.append(n),this.container}}]),t}(),M=function(e){function t(e){d(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return s(this,l(t).call(this,e,r,!0))}return c(t,m),p(t,[{key:"render",value:function(){return this.container.className="highlightAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),t}(),j=function(e){function t(e){d(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return s(this,l(t).call(this,e,r,!0))}return c(t,m),p(t,[{key:"render",value:function(){return this.container.className="underlineAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),t}(),D=function(e){function t(e){d(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return s(this,l(t).call(this,e,r,!0))}return c(t,m),p(t,[{key:"render",value:function(){return this.container.className="squigglyAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),t}(),N=function(e){function t(e){d(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return s(this,l(t).call(this,e,r,!0))}return c(t,m),p(t,[{key:"render",value:function(){return this.container.className="strikeoutAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),t}(),q=function(e){function t(e){d(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return s(this,l(t).call(this,e,r,!0))}return c(t,m),p(t,[{key:"render",value:function(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),t}(),W=function(e){function t(e){var r;d(this,t);var a=(r=s(this,l(t).call(this,e,!0))).data.file,o=a.filename,c=a.content;return r.filename=(0,n.getFilenameFromUrl)(o),r.content=c,r.linkService.eventBus&&r.linkService.eventBus.dispatch("fileattachmentannotation",{source:u(r),id:(0,i.stringToPDFString)(o),filename:o,content:c}),r}return c(t,m),p(t,[{key:"render",value:function(){this.container.className="fileAttachmentAnnotation";var 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}},{key:"_download",value:function(){this.downloadManager?this.downloadManager.downloadData(this.content,this.filename,""):(0,i.warn)("Download cannot be started due to unavailable download manager")}}]),t}(),U=function(){function e(){d(this,e)}return p(e,null,[{key:"render",value:function(e){for(var t=0,r=e.annotations.length;t<r;t++){var i=e.annotations[t];if(i){var a=v.create({data:i,layer:e.div,page:e.page,viewport:e.viewport,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderInteractiveForms:e.renderInteractiveForms||!1,svgFactory:new n.DOMSVGFactory});a.isRenderable&&e.div.appendChild(a.render())}}}},{key:"update",value:function(e){for(var t=0,r=e.annotations.length;t<r;t++){var n=e.annotations[t],i=e.div.querySelector('[data-annotation-id="'+n.id+'"]');i&&(i.style.transform="matrix("+e.viewport.transform.join(",")+")")}e.div.removeAttribute("hidden")}}]),e}();t.AnnotationLayer=U},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var n,i=r(1),a=r(151),o=(n=r(4))&&n.__esModule?n:{default:n};function s(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),e}var d=function(){throw new Error("Not implemented: SVGGraphics")};t.SVGGraphics=d;var f=function(e){if(Number.isInteger(e))return e.toString();var t=e.toFixed(10),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)},p=function(e){if(0===e[4]&&0===e[5]){if(0===e[1]&&0===e[2])return 1===e[0]&&1===e[3]?"":"scale(".concat(f(e[0])," ").concat(f(e[3]),")");if(e[0]===e[3]&&e[1]===-e[2]){var t=180*Math.acos(e[0])/Math.PI;return"rotate(".concat(f(t),")")}}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return"translate(".concat(f(e[4])," ").concat(f(e[5]),")");return"matrix(".concat(f(e[0])," ").concat(f(e[1])," ").concat(f(e[2])," ").concat(f(e[3])," ").concat(f(e[4])," ")+"".concat(f(e[5]),")")},v={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},m="http://www.w3.org/1999/xlink",g=["butt","round","square"],y=["miter","round","bevel"],b=function(){for(var e=new Uint8Array([137,80,78,71,13,10,26,10]),t=12,r=new Int32Array(256),n=0;n<256;n++){for(var a=n,s=0;s<8;s++)a=1&a?3988292384^a>>1&2147483647:a>>1&2147483647;r[n]=a}function u(e,t,n,i){var a=i,o=t.length;n[a]=o>>24&255,n[a+1]=o>>16&255,n[a+2]=o>>8&255,n[a+3]=255&o,n[a+=4]=255&e.charCodeAt(0),n[a+1]=255&e.charCodeAt(1),n[a+2]=255&e.charCodeAt(2),n[a+3]=255&e.charCodeAt(3),a+=4,n.set(t,a);var s=function(e,t,n){for(var i=-1,a=t;a<n;a++){var o=255&(i^e[a]);i=i>>>8^r[o]}return-1^i}(n,i+4,a+=t.length);n[a]=s>>24&255,n[a+1]=s>>16&255,n[a+2]=s>>8&255,n[a+3]=255&s}function l(e){var t=e.length,r=Math.ceil(t/65535),n=new Uint8Array(2+t+5*r+4),i=0;n[i++]=120,n[i++]=156;for(var a=0;t>65535;)n[i++]=0,n[i++]=255,n[i++]=255,n[i++]=0,n[i++]=0,n.set(e.subarray(a,a+65535),i),i+=65535,a+=65535,t-=65535;n[i++]=1,n[i++]=255&t,n[i++]=t>>8&255,n[i++]=255&~t,n[i++]=(65535&~t)>>8&255,n.set(e.subarray(a),i),i+=e.length-a;var o=function(e,t,r){for(var n=1,i=0,a=t;a<r;++a)i=(i+(n=(n+(255&e[a]))%65521))%65521;return i<<16|n}(e,0,e.length);return n[i++]=o>>24&255,n[i++]=o>>16&255,n[i++]=o>>8&255,n[i++]=255&o,n}function c(r,n,a,s){var c,h,d,f=r.width,p=r.height,v=r.data;switch(n){case i.ImageKind.GRAYSCALE_1BPP:h=0,c=1,d=f+7>>3;break;case i.ImageKind.RGB_24BPP:h=2,c=8,d=3*f;break;case i.ImageKind.RGBA_32BPP:h=6,c=8,d=4*f;break;default:throw new Error("invalid format")}for(var m=new Uint8Array((1+d)*p),g=0,y=0,b=0;b<p;++b)m[g++]=0,m.set(v.subarray(y,y+d),g),y+=d,g+=d;if(n===i.ImageKind.GRAYSCALE_1BPP&&s){g=0;for(var _=0;_<p;_++){g++;for(var A=0;A<d;A++)m[g++]^=255}}var S=new Uint8Array([f>>24&255,f>>16&255,f>>8&255,255&f,p>>24&255,p>>16&255,p>>8&255,255&p,c,h,0,0,0]),w=function(e){if(!(0,o.default)())return l(e);try{var t;t=parseInt(process.versions.node)>=8?e:new Buffer(e);var r=require("zlib").deflateSync(t,{level:9});return r instanceof Uint8Array?r:new Uint8Array(r)}catch(e){(0,i.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+e)}return l(e)}(m),k=e.length+3*t+S.length+w.length,x=new Uint8Array(k),P=0;return x.set(e,P),u("IHDR",S,x,P+=e.length),u("IDATA",w,x,P+=t+S.length),P+=t+w.length,u("IEND",new Uint8Array(0),x,P),(0,i.createObjectURL)(x,"image/png",a)}return function(e,t,r){return c(e,void 0===e.kind?i.ImageKind.GRAYSCALE_1BPP:e.kind,t,r)}}(),_=function(){function e(){l(this,e),this.fontSizeScale=1,this.fontWeight=v.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=v.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=""}return h(e,[{key:"clone",value:function(){return Object.create(this)}},{key:"setCurrentPoint",value:function(e,t){this.x=e,this.y=t}}]),e}(),A=0,S=0,w=0;t.SVGGraphics=d=function(){function e(t,r,n){for(var o in l(this,e),this.svgFactory=new a.DOMSVGFactory,this.current=new _,this.transformMatrix=i.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=t,this.objs=r,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!n,this._operatorIdMapping=[],i.OPS)this._operatorIdMapping[i.OPS[o]]=o}return h(e,[{key:"save",value:function(){this.transformStack.push(this.transformMatrix);var e=this.current;this.extraStack.push(e),this.current=e.clone()}},{key:"restore",value:function(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}},{key:"group",value:function(e){this.save(),this.executeOpTree(e),this.restore()}},{key:"loadDependencies",value:function(e){for(var t=this,r=e.fnArray,n=e.argsArray,a=0,o=r.length;a<o;a++)if(r[a]===i.OPS.dependency){var s=!0,u=!1,l=void 0;try{for(var c,h=function(){var e=c.value,r=e.startsWith("g_")?t.commonObjs:t.objs,n=new Promise(function(t){r.get(e,t)});t.current.dependencies.push(n)},d=n[a][Symbol.iterator]();!(s=(c=d.next()).done);s=!0)h()}catch(e){u=!0,l=e}finally{try{s||null==d.return||d.return()}finally{if(u)throw l}}}return Promise.all(this.current.dependencies)}},{key:"transform",value:function(e,t,r,n,a,o){var s=[e,t,r,n,a,o];this.transformMatrix=i.Util.transform(this.transformMatrix,s),this.tgrp=null}},{key:"getSVG",value:function(e,t){var r=this;this.viewport=t;var n=this._initialize(t);return this.loadDependencies(e).then(function(){return r.transformMatrix=i.IDENTITY_MATRIX,r.executeOpTree(r.convertOpList(e)),n})}},{key:"convertOpList",value:function(e){for(var t=this._operatorIdMapping,r=e.argsArray,n=e.fnArray,i=[],a=0,o=n.length;a<o;a++){var s=n[a];i.push({fnId:s,fn:t[s],args:r[a]})}return function(e){var t=[],r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;"save"!==u.fn?"restore"===u.fn?t=r.pop():t.push(u):(t.push({fnId:92,fn:"group",items:[]}),r.push(t),t=t[t.length-1].items)}}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return t}(i)}},{key:"executeOpTree",value:function(e){var t=!0,r=!1,n=void 0;try{for(var a,o=e[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var s=a.value,u=s.fn,l=s.fnId,c=s.args;switch(0|l){case i.OPS.beginText:this.beginText();break;case i.OPS.dependency:break;case i.OPS.setLeading:this.setLeading(c);break;case i.OPS.setLeadingMoveText:this.setLeadingMoveText(c[0],c[1]);break;case i.OPS.setFont:this.setFont(c);break;case i.OPS.showText:case i.OPS.showSpacedText:this.showText(c[0]);break;case i.OPS.endText:this.endText();break;case i.OPS.moveText:this.moveText(c[0],c[1]);break;case i.OPS.setCharSpacing:this.setCharSpacing(c[0]);break;case i.OPS.setWordSpacing:this.setWordSpacing(c[0]);break;case i.OPS.setHScale:this.setHScale(c[0]);break;case i.OPS.setTextMatrix:this.setTextMatrix(c[0],c[1],c[2],c[3],c[4],c[5]);break;case i.OPS.setTextRise:this.setTextRise(c[0]);break;case i.OPS.setTextRenderingMode:this.setTextRenderingMode(c[0]);break;case i.OPS.setLineWidth:this.setLineWidth(c[0]);break;case i.OPS.setLineJoin:this.setLineJoin(c[0]);break;case i.OPS.setLineCap:this.setLineCap(c[0]);break;case i.OPS.setMiterLimit:this.setMiterLimit(c[0]);break;case i.OPS.setFillRGBColor:this.setFillRGBColor(c[0],c[1],c[2]);break;case i.OPS.setStrokeRGBColor:this.setStrokeRGBColor(c[0],c[1],c[2]);break;case i.OPS.setStrokeColorN:this.setStrokeColorN(c);break;case i.OPS.setFillColorN:this.setFillColorN(c);break;case i.OPS.shadingFill:this.shadingFill(c[0]);break;case i.OPS.setDash:this.setDash(c[0],c[1]);break;case i.OPS.setRenderingIntent:this.setRenderingIntent(c[0]);break;case i.OPS.setFlatness:this.setFlatness(c[0]);break;case i.OPS.setGState:this.setGState(c[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.paintJpegXObject:this.paintJpegXObject(c[0],c[1],c[2]);break;case i.OPS.paintImageXObject:this.paintImageXObject(c[0]);break;case i.OPS.paintInlineImageXObject:this.paintInlineImageXObject(c[0]);break;case i.OPS.paintImageMaskXObject:this.paintImageMaskXObject(c[0]);break;case i.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(c[0],c[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(c[0],c[1],c[2],c[3],c[4],c[5]);break;case i.OPS.constructPath:this.constructPath(c[0],c[1]);break;case i.OPS.endPath:this.endPath();break;case 92:this.group(s.items);break;default:(0,i.warn)("Unimplemented operator ".concat(u))}}}catch(e){r=!0,n=e}finally{try{t||null==o.return||o.return()}finally{if(r)throw n}}}},{key:"setWordSpacing",value:function(e){this.current.wordSpacing=e}},{key:"setCharSpacing",value:function(e){this.current.charSpacing=e}},{key:"nextLine",value:function(){this.moveText(0,this.current.leading)}},{key:"setTextMatrix",value:function(e,t,r,n,i,a){var o=this.current;o.textMatrix=o.lineMatrix=[e,t,r,n,i,a],o.textMatrixScale=Math.sqrt(e*e+t*t),o.x=o.lineX=0,o.y=o.lineY=0,o.xcoords=[],o.tspan=this.svgFactory.createElement("svg:tspan"),o.tspan.setAttributeNS(null,"font-family",o.fontFamily),o.tspan.setAttributeNS(null,"font-size","".concat(f(o.fontSize),"px")),o.tspan.setAttributeNS(null,"y",f(-o.y)),o.txtElement=this.svgFactory.createElement("svg:text"),o.txtElement.appendChild(o.tspan)}},{key:"beginText",value:function(){var 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=[]}},{key:"moveText",value:function(e,t){var r=this.current;r.x=r.lineX+=e,r.y=r.lineY+=t,r.xcoords=[],r.tspan=this.svgFactory.createElement("svg:tspan"),r.tspan.setAttributeNS(null,"font-family",r.fontFamily),r.tspan.setAttributeNS(null,"font-size","".concat(f(r.fontSize),"px")),r.tspan.setAttributeNS(null,"y",f(-r.y))}},{key:"showText",value:function(e){var t=this.current,r=t.font,n=t.fontSize;if(0!==n){var a=t.charSpacing,o=t.wordSpacing,s=t.fontDirection,u=t.textHScale*s,l=r.vertical,c=n*t.fontMatrix[0],h=0,d=!0,m=!1,g=void 0;try{for(var y,b=e[Symbol.iterator]();!(d=(y=b.next()).done);d=!0){var _=y.value;if(null!==_)if((0,i.isNum)(_))h+=-_*n*.001;else{var A=_.width,S=_.fontChar,w=A*c+((_.isSpace?o:0)+a)*s;_.isInFont||r.missingFile?(t.xcoords.push(t.x+h*u),t.tspan.textContent+=S,h+=w):h+=w}else h+=s*o}}catch(e){m=!0,g=e}finally{try{d||null==b.return||b.return()}finally{if(m)throw g}}l?t.y-=h*u:t.x+=h*u,t.tspan.setAttributeNS(null,"x",t.xcoords.map(f).join(" ")),t.tspan.setAttributeNS(null,"y",f(-t.y)),t.tspan.setAttributeNS(null,"font-family",t.fontFamily),t.tspan.setAttributeNS(null,"font-size","".concat(f(t.fontSize),"px")),t.fontStyle!==v.fontStyle&&t.tspan.setAttributeNS(null,"font-style",t.fontStyle),t.fontWeight!==v.fontWeight&&t.tspan.setAttributeNS(null,"font-weight",t.fontWeight);var k=t.textRenderingMode&i.TextRenderingMode.FILL_STROKE_MASK;if(k===i.TextRenderingMode.FILL||k===i.TextRenderingMode.FILL_STROKE?(t.fillColor!==v.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"),k===i.TextRenderingMode.STROKE||k===i.TextRenderingMode.FILL_STROKE){var x=1/(t.textMatrixScale||1);this._setStrokeAttributes(t.tspan,x)}var P=t.textMatrix;0!==t.textRise&&((P=P.slice())[5]+=t.textRise),t.txtElement.setAttributeNS(null,"transform","".concat(p(P)," scale(1, -1)")),t.txtElement.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.txtElement.appendChild(t.tspan),t.txtgrp.appendChild(t.txtElement),this._ensureTransformGroup().appendChild(t.txtElement)}}},{key:"setLeadingMoveText",value:function(e,t){this.setLeading(-t),this.moveText(e,t)}},{key:"addFontStyle",value:function(e){this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.appendChild(this.cssStyle));var t=(0,i.createObjectURL)(e.data,e.mimetype,this.forceDataSchema);this.cssStyle.textContent+='@font-face { font-family: "'.concat(e.loadedName,'";')+" src: url(".concat(t,"); }\n")}},{key:"setFont",value:function(e){var t=this.current,r=this.commonObjs.get(e[0]),n=e[1];t.font=r,this.embedFonts&&r.data&&!this.embeddedFonts[r.loadedName]&&(this.addFontStyle(r),this.embeddedFonts[r.loadedName]=r),t.fontMatrix=r.fontMatrix?r.fontMatrix:i.FONT_IDENTITY_MATRIX;var a=r.black?r.bold?"bolder":"bold":r.bold?"bold":"normal",o=r.italic?"italic":"normal";n<0?(n=-n,t.fontDirection=-1):t.fontDirection=1,t.fontSize=n,t.fontFamily=r.loadedName,t.fontWeight=a,t.fontStyle=o,t.tspan=this.svgFactory.createElement("svg:tspan"),t.tspan.setAttributeNS(null,"y",f(-t.y)),t.xcoords=[]}},{key:"endText",value:function(){var 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())}},{key:"setLineWidth",value:function(e){e>0&&(this.current.lineWidth=e)}},{key:"setLineCap",value:function(e){this.current.lineCap=g[e]}},{key:"setLineJoin",value:function(e){this.current.lineJoin=y[e]}},{key:"setMiterLimit",value:function(e){this.current.miterLimit=e}},{key:"setStrokeAlpha",value:function(e){this.current.strokeAlpha=e}},{key:"setStrokeRGBColor",value:function(e,t,r){this.current.strokeColor=i.Util.makeCssRgb(e,t,r)}},{key:"setFillAlpha",value:function(e){this.current.fillAlpha=e}},{key:"setFillRGBColor",value:function(e,t,r){this.current.fillColor=i.Util.makeCssRgb(e,t,r),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[]}},{key:"setStrokeColorN",value:function(e){this.current.strokeColor=this._makeColorN_Pattern(e)}},{key:"setFillColorN",value:function(e){this.current.fillColor=this._makeColorN_Pattern(e)}},{key:"shadingFill",value:function(e){var t=this.viewport.width,r=this.viewport.height,n=i.Util.inverseTransform(this.transformMatrix),a=i.Util.applyTransform([0,0],n),o=i.Util.applyTransform([0,r],n),s=i.Util.applyTransform([t,0],n),u=i.Util.applyTransform([t,r],n),l=Math.min(a[0],o[0],s[0],u[0]),c=Math.min(a[1],o[1],s[1],u[1]),h=Math.max(a[0],o[0],s[0],u[0]),d=Math.max(a[1],o[1],s[1],u[1]),f=this.svgFactory.createElement("svg:rect");f.setAttributeNS(null,"x",l),f.setAttributeNS(null,"y",c),f.setAttributeNS(null,"width",h-l),f.setAttributeNS(null,"height",d-c),f.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this._ensureTransformGroup().appendChild(f)}},{key:"_makeColorN_Pattern",value:function(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}},{key:"_makeTilingPattern",value:function(e){var t=e[1],r=e[2],n=e[3]||i.IDENTITY_MATRIX,a=u(e[4],4),o=a[0],l=a[1],c=a[2],h=a[3],d=e[5],f=e[6],p=e[7],v="shading".concat(w++),m=u(i.Util.applyTransform([o,l],n),2),g=m[0],y=m[1],b=u(i.Util.applyTransform([c,h],n),2),_=b[0],A=b[1],S=u(i.Util.singularValueDecompose2dScale(n),2),k=d*S[0],x=f*S[1],P=this.svgFactory.createElement("svg:pattern");P.setAttributeNS(null,"id",v),P.setAttributeNS(null,"patternUnits","userSpaceOnUse"),P.setAttributeNS(null,"width",k),P.setAttributeNS(null,"height",x),P.setAttributeNS(null,"x","".concat(g)),P.setAttributeNS(null,"y","".concat(y));var C=this.svg,R=this.transformMatrix,T=this.current.fillColor,E=this.current.strokeColor,O=this.svgFactory.create(_-g,A-y);if(this.svg=O,this.transformMatrix=n,2===p){var F=i.Util.makeCssRgb.apply(i.Util,s(t));this.current.fillColor=F,this.current.strokeColor=F}return this.executeOpTree(this.convertOpList(r)),this.svg=C,this.transformMatrix=R,this.current.fillColor=T,this.current.strokeColor=E,P.appendChild(O.childNodes[0]),this.defs.appendChild(P),"url(#".concat(v,")")}},{key:"_makeShadingPattern",value:function(e){switch(e[0]){case"RadialAxial":var t,r="shading".concat(w++),n=e[2];switch(e[1]){case"axial":var a=e[3],o=e[4];(t=this.svgFactory.createElement("svg:linearGradient")).setAttributeNS(null,"id",r),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"x1",a[0]),t.setAttributeNS(null,"y1",a[1]),t.setAttributeNS(null,"x2",o[0]),t.setAttributeNS(null,"y2",o[1]);break;case"radial":var s=e[3],u=e[4],l=e[5],c=e[6];(t=this.svgFactory.createElement("svg:radialGradient")).setAttributeNS(null,"id",r),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"cx",u[0]),t.setAttributeNS(null,"cy",u[1]),t.setAttributeNS(null,"r",c),t.setAttributeNS(null,"fx",s[0]),t.setAttributeNS(null,"fy",s[1]),t.setAttributeNS(null,"fr",l);break;default:throw new Error("Unknown RadialAxial type: ".concat(e[1]))}var h=!0,d=!1,f=void 0;try{for(var p,v=n[Symbol.iterator]();!(h=(p=v.next()).done);h=!0){var m=p.value,g=this.svgFactory.createElement("svg:stop");g.setAttributeNS(null,"offset",m[0]),g.setAttributeNS(null,"stop-color",m[1]),t.appendChild(g)}}catch(e){d=!0,f=e}finally{try{h||null==v.return||v.return()}finally{if(d)throw f}}return this.defs.appendChild(t),"url(#".concat(r,")");case"Mesh":return(0,i.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: ".concat(e[0]))}}},{key:"setDash",value:function(e,t){this.current.dashArray=e,this.current.dashPhase=t}},{key:"constructPath",value:function(e,t){var r=this.current,n=r.x,a=r.y,o=[],s=0,u=!0,l=!1,c=void 0;try{for(var h,d=e[Symbol.iterator]();!(u=(h=d.next()).done);u=!0){switch(0|h.value){case i.OPS.rectangle:n=t[s++],a=t[s++];var p=t[s++],v=t[s++],m=n+p,g=a+v;o.push("M",f(n),f(a),"L",f(m),f(a),"L",f(m),f(g),"L",f(n),f(g),"Z");break;case i.OPS.moveTo:n=t[s++],a=t[s++],o.push("M",f(n),f(a));break;case i.OPS.lineTo:n=t[s++],a=t[s++],o.push("L",f(n),f(a));break;case i.OPS.curveTo:n=t[s+4],a=t[s+5],o.push("C",f(t[s]),f(t[s+1]),f(t[s+2]),f(t[s+3]),f(n),f(a)),s+=6;break;case i.OPS.curveTo2:n=t[s+2],a=t[s+3],o.push("C",f(n),f(a),f(t[s]),f(t[s+1]),f(t[s+2]),f(t[s+3])),s+=4;break;case i.OPS.curveTo3:n=t[s+2],a=t[s+3],o.push("C",f(t[s]),f(t[s+1]),f(n),f(a),f(n),f(a)),s+=4;break;case i.OPS.closePath:o.push("Z")}}}catch(e){l=!0,c=e}finally{try{u||null==d.return||d.return()}finally{if(l)throw c}}o=o.join(" "),r.path&&e.length>0&&e[0]!==i.OPS.rectangle&&e[0]!==i.OPS.moveTo?o=r.path.getAttributeNS(null,"d")+o:(r.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().appendChild(r.path)),r.path.setAttributeNS(null,"d",o),r.path.setAttributeNS(null,"fill","none"),r.element=r.path,r.setCurrentPoint(n,a)}},{key:"endPath",value:function(){var e=this.current;if(e.path=null,this.pendingClip)if(e.element){var t="clippath".concat(A++),r=this.svgFactory.createElement("svg:clipPath");r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"transform",p(this.transformMatrix));var n=e.element.cloneNode(!0);"evenodd"===this.pendingClip?n.setAttributeNS(null,"clip-rule","evenodd"):n.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,r.appendChild(n),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(#".concat(t,")"),this.tgrp=null}else this.pendingClip=null}},{key:"clip",value:function(e){this.pendingClip=e}},{key:"closePath",value:function(){var e=this.current;if(e.path){var t="".concat(e.path.getAttributeNS(null,"d"),"Z");e.path.setAttributeNS(null,"d",t)}}},{key:"setLeading",value:function(e){this.current.leading=-e}},{key:"setTextRise",value:function(e){this.current.textRise=e}},{key:"setTextRenderingMode",value:function(e){this.current.textRenderingMode=e}},{key:"setHScale",value:function(e){this.current.textHScale=e/100}},{key:"setRenderingIntent",value:function(e){}},{key:"setFlatness",value:function(e){}},{key:"setGState",value:function(e){var t=!0,r=!1,n=void 0;try{for(var a,o=e[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var s=u(a.value,2),l=s[0],c=s[1];switch(l){case"LW":this.setLineWidth(c);break;case"LC":this.setLineCap(c);break;case"LJ":this.setLineJoin(c);break;case"ML":this.setMiterLimit(c);break;case"D":this.setDash(c[0],c[1]);break;case"RI":this.setRenderingIntent(c);break;case"FL":this.setFlatness(c);break;case"Font":this.setFont(c);break;case"CA":this.setStrokeAlpha(c);break;case"ca":this.setFillAlpha(c);break;default:(0,i.warn)("Unimplemented graphic state operator ".concat(l))}}}catch(e){r=!0,n=e}finally{try{t||null==o.return||o.return()}finally{if(r)throw n}}}},{key:"fill",value:function(){var e=this.current;e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}},{key:"stroke",value:function(){var e=this.current;e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}},{key:"_setStrokeAttributes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=this.current,n=r.dashArray;1!==t&&n.length>0&&(n=n.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",n.map(f).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",f(t*r.dashPhase)+"px")}},{key:"eoFill",value:function(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}},{key:"fillStroke",value:function(){this.stroke(),this.fill()}},{key:"eoFillStroke",value:function(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}},{key:"closeStroke",value:function(){this.closePath(),this.stroke()}},{key:"closeFillStroke",value:function(){this.closePath(),this.fillStroke()}},{key:"closeEOFillStroke",value:function(){this.closePath(),this.eoFillStroke()}},{key:"paintSolidColorImageMask",value:function(){var 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)}},{key:"paintJpegXObject",value:function(e,t,r){var n=this.objs.get(e),i=this.svgFactory.createElement("svg:image");i.setAttributeNS(m,"xlink:href",n.src),i.setAttributeNS(null,"width",f(t)),i.setAttributeNS(null,"height",f(r)),i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y",f(-r)),i.setAttributeNS(null,"transform","scale(".concat(f(1/t)," ").concat(f(-1/r),")")),this._ensureTransformGroup().appendChild(i)}},{key:"paintImageXObject",value:function(e){var t=this.objs.get(e);t?this.paintInlineImageXObject(t):(0,i.warn)("Dependent image with object ID ".concat(e," is not ready yet"))}},{key:"paintInlineImageXObject",value:function(e,t){var r=e.width,n=e.height,i=b(e,this.forceDataSchema,!!t),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(n)),this.current.element=a,this.clip("nonzero");var o=this.svgFactory.createElement("svg:image");o.setAttributeNS(m,"xlink:href",i),o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y",f(-n)),o.setAttributeNS(null,"width",f(r)+"px"),o.setAttributeNS(null,"height",f(n)+"px"),o.setAttributeNS(null,"transform","scale(".concat(f(1/r)," ").concat(f(-1/n),")")),t?t.appendChild(o):this._ensureTransformGroup().appendChild(o)}},{key:"paintImageMaskXObject",value:function(e){var t=this.current,r=e.width,n=e.height,i=t.fillColor;t.maskId="mask".concat(S++);var a=this.svgFactory.createElement("svg:mask");a.setAttributeNS(null,"id",t.maskId);var o=this.svgFactory.createElement("svg:rect");o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y","0"),o.setAttributeNS(null,"width",f(r)),o.setAttributeNS(null,"height",f(n)),o.setAttributeNS(null,"fill",i),o.setAttributeNS(null,"mask","url(#".concat(t.maskId,")")),this.defs.appendChild(a),this._ensureTransformGroup().appendChild(o),this.paintInlineImageXObject(e,a)}},{key:"paintFormXObjectBegin",value:function(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){var r=t[2]-t[0],n=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(r)),i.setAttributeNS(null,"height",f(n)),this.current.element=i,this.clip("nonzero"),this.endPath()}}},{key:"paintFormXObjectEnd",value:function(){}},{key:"_initialize",value:function(e){var t=this.svgFactory.create(e.width,e.height),r=this.svgFactory.createElement("svg:defs");t.appendChild(r),this.defs=r;var n=this.svgFactory.createElement("svg:g");return n.setAttributeNS(null,"transform",p(e.transform)),t.appendChild(n),this.svg=n,t}},{key:"_ensureClipGroup",value:function(){if(!this.current.clipGroup){var 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}},{key:"_ensureTransformGroup",value:function(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",p(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var n,i=(n=r(148))&&n.__esModule?n:{default:n},a=r(1),o=r(166);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(e){d(a,n,i,o,s,"next",e)}function s(e){d(a,n,i,o,s,"throw",e)}o(void 0)})}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function m(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),e}var g=require("fs"),y=require("http"),b=require("https"),_=require("url"),A=/^file:\/\/\/[a-zA-Z]:\//;var S=function(){function e(t){var r,n;p(this,e),this.source=t,this.url=(r=t.url,"file:"===(n=_.parse(r)).protocol||n.host?n:/^[a-z]:[\/\\]/i.test(r)?_.parse("file:///".concat(r)):(n.host||(n.protocol="file:"),n)),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}return m(e,[{key:"getFullReader",value:function(){return(0,a.assert)(!this._fullRequestReader),this._fullRequestReader=this.isFsUrl?new R(this):new P(this),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=this.isFsUrl?new T(this,e,t):new C(this,e,t);return this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach(function(t){t.cancel(e)})}},{key:"_progressiveDataLength",get:function(){return this._fullRequestReader?this._fullRequestReader._loaded:0}}]),e}();t.PDFNodeStream=S;var w=function(){function e(t){p(this,e),this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;var r=t.source;this._contentLength=r.length,this._loaded=0,this._filename=null,this._disableRange=r.disableRange||!1,this._rangeChunkSize=r.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!r.disableStream,this._isRangeSupported=!r.disableRange,this._readableStream=null,this._readCapability=(0,a.createPromiseCapability)(),this._headersCapability=(0,a.createPromiseCapability)()}return m(e,[{key:"read",value:function(){var e=f(i.default.mark(function e(){var t,r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:if(!this._done){e.next=4;break}return e.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){e.next=6;break}throw this._storedError;case 6:if(null!==(t=this._readableStream.read())){e.next=10;break}return this._readCapability=(0,a.createPromiseCapability)(),e.abrupt("return",this.read());case 10:return this._loaded+=t.length,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),r=new Uint8Array(t).buffer,e.abrupt("return",{value:r,done:!1});case 14:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}},{key:"_error",value:function(e){this._storedError=e,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(e){var t=this;this._readableStream=e,e.on("readable",function(){t._readCapability.resolve()}),e.on("end",function(){e.destroy(),t._done=!0,t._readCapability.resolve()}),e.on("error",function(e){t._error(e)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new a.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}},{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}}]),e}(),k=function(){function e(t){p(this,e),this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,a.createPromiseCapability)();var r=t.source;this._isStreamingSupported=!r.disableStream}return m(e,[{key:"read",value:function(){var e=f(i.default.mark(function e(){var t,r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:if(!this._done){e.next=4;break}return e.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){e.next=6;break}throw this._storedError;case 6:if(null!==(t=this._readableStream.read())){e.next=10;break}return this._readCapability=(0,a.createPromiseCapability)(),e.abrupt("return",this.read());case 10:return this._loaded+=t.length,this.onProgress&&this.onProgress({loaded:this._loaded}),r=new Uint8Array(t).buffer,e.abrupt("return",{value:r,done:!1});case 14:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}},{key:"_error",value:function(e){this._storedError=e,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(e){var t=this;this._readableStream=e,e.on("readable",function(){t._readCapability.resolve()}),e.on("end",function(){e.destroy(),t._done=!0,t._readCapability.resolve()}),e.on("error",function(e){t._error(e)}),this._storedError&&this._readableStream.destroy(this._storedError)}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}}]),e}();function x(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}var P=function(e){function t(e){var r;p(this,t);var n=function(t){if(404===t.statusCode){var n=new a.MissingPDFException('Missing PDF "'.concat(r._url,'".'));return r._storedError=n,void r._headersCapability.reject(n)}r._headersCapability.resolve(),r._setReadableStream(t);var i=function(e){return r._readableStream.headers[e.toLowerCase()]},s=(0,o.validateRangeRequestCapabilities)({getResponseHeader:i,isHttp:e.isHttp,rangeChunkSize:r._rangeChunkSize,disableRange:r._disableRange}),u=s.allowRangeRequests,l=s.suggestedLength;r._isRangeSupported=u,r._contentLength=l||r._contentLength,r._filename=(0,o.extractFilenameFromHeader)(i)};return(r=u(this,l(t).call(this,e)))._request=null,"http:"===r._url.protocol?r._request=y.request(x(r._url,e.httpHeaders),n):r._request=b.request(x(r._url,e.httpHeaders),n),r._request.on("error",function(e){r._storedError=e,r._headersCapability.reject(e)}),r._request.end(),r}return c(t,w),t}(),C=function(e){function t(e,r,n){var i;for(var o in p(this,t),(i=u(this,l(t).call(this,e)))._httpHeaders={},e.httpHeaders){var s=e.httpHeaders[o];void 0!==s&&(i._httpHeaders[o]=s)}i._httpHeaders.Range="bytes=".concat(r,"-").concat(n-1);var c=function(e){if(404!==e.statusCode)i._setReadableStream(e);else{var t=new a.MissingPDFException('Missing PDF "'.concat(i._url,'".'));i._storedError=t}};return i._request=null,"http:"===i._url.protocol?i._request=y.request(x(i._url,i._httpHeaders),c):i._request=b.request(x(i._url,i._httpHeaders),c),i._request.on("error",function(e){i._storedError=e}),i._request.end(),i}return c(t,k),t}(),R=function(e){function t(e){var r;p(this,t),r=u(this,l(t).call(this,e));var n=decodeURIComponent(r._url.path);return A.test(r._url.href)&&(n=n.replace(/^\//,"")),g.lstat(n,function(e,t){if(e)return"ENOENT"===e.code&&(e=new a.MissingPDFException('Missing PDF "'.concat(n,'".'))),r._storedError=e,void r._headersCapability.reject(e);r._contentLength=t.size,r._setReadableStream(g.createReadStream(n)),r._headersCapability.resolve()}),r}return c(t,w),t}(),T=function(e){function t(e,r,n){var i;p(this,t),i=u(this,l(t).call(this,e));var a=decodeURIComponent(i._url.path);return A.test(i._url.href)&&(a=a.replace(/^\//,"")),i._setReadableStream(g.createReadStream(a,{start:r,end:n-1})),i}return c(t,k),t}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createResponseStatusError=function(e,t){if(404===e||0===e&&/^file:/.test(t))return new n.MissingPDFException('Missing PDF "'+t+'".');return new n.UnexpectedResponseException("Unexpected server response ("+e+') while retrieving PDF "'+t+'".',e)},t.extractFilenameFromHeader=function(e){var t=e("Content-Disposition");if(t){var r=(0,i.getFilenameFromContentDispositionHeader)(t);if(/\.pdf$/i.test(r))return r}return null},t.validateRangeRequestCapabilities=function(e){var t=e.getResponseHeader,r=e.isHttp,i=e.rangeChunkSize,a=e.disableRange;(0,n.assert)(i>0,"Range chunk size must be larger than zero");var o={allowRangeRequests:!1,suggestedLength:void 0},s=parseInt(t("Content-Length"),10);if(!Number.isInteger(s))return o;if(o.suggestedLength=s,s<=2*i)return o;if(a||!r)return o;if("bytes"!==t("Accept-Ranges"))return o;if("identity"!==(t("Content-Encoding")||"identity"))return o;return o.allowRangeRequests=!0,o},t.validateResponseStatus=function(e){return 200===e||206===e};var n=r(1),i=r(167)},function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=function(e){var t=!0,r=s("filename\\*","i").exec(e);if(r){var i=c(r=r[1]);return l(i=d(i=h(i=unescape(i))))}if(r=function(e){for(var t,r=[],i=s("filename\\*((?!0\\d)\\d+)(\\*?)","ig");null!==(t=i.exec(e));){var a=t,o=n(a,4),u=o[1],l=o[2],d=o[3];if((u=parseInt(u,10))in r){if(0===u)break}else r[u]=[l,d]}for(var f=[],u=0;u<r.length&&u in r;++u){var p=n(r[u],2),l=p[0],d=p[1];d=c(d),l&&(d=unescape(d),0===u&&(d=h(d))),f.push(d)}return f.join("")}(e)){var a=d(r);return l(a)}if(r=s("filename","i").exec(e)){var o=c(r=r[1]);return l(o=d(o))}function s(e,t){return new RegExp("(?:^|;)\\s*"+e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',t)}function u(e,r){if(e){if(!/^[\x00-\xFF]+$/.test(r))return r;try{var n=new TextDecoder(e,{fatal:!0}),i=Array.from(r,function(e){return 255&e.charCodeAt(0)});r=n.decode(new Uint8Array(i)),t=!1}catch(n){if(/^utf-?8$/i.test(e))try{r=decodeURIComponent(escape(r)),t=!1}catch(e){}}}return r}function l(e){return t&&/[\x80-\xff]/.test(e)&&(e=u("utf-8",e),t&&(e=u("iso-8859-1",e))),e}function c(e){if(e.startsWith('"')){for(var t=e.slice(1).split('\\"'),r=0;r<t.length;++r){var n=t[r].indexOf('"');-1!==n&&(t[r]=t[r].slice(0,n),t.length=r+1),t[r]=t[r].replace(/\\(.)/g,"$1")}e=t.join('"')}return e}function h(e){var t=e.indexOf("'");if(-1===t)return e;var r=e.slice(0,t),n=e.slice(t+1),i=n.replace(/^[^']*'/,"");return u(r,i)}function d(e){return!e.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(e)?e:e.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(e,t,r,n){if("q"===r||"Q"===r)return n=(n=n.replace(/_/g," ")).replace(/=([0-9a-fA-F]{2})/g,function(e,t){return String.fromCharCode(parseInt(t,16))}),u(t,n);try{n=atob(n)}catch(e){}return u(t,n)})}return""}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNetworkStream=void 0;var n,i=(n=r(148))&&n.__esModule?n:{default:n},a=r(1),o=r(166);function s(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function u(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(e){s(a,n,i,o,u,"next",e)}function u(e){s(a,n,i,o,u,"throw",e)}o(void 0)})}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),e}var d=function(){function e(t,r){l(this,e),this.url=t,r=r||{},this.isHttp=/^https?:/i.test(t),this.httpHeaders=this.isHttp&&r.httpHeaders||{},this.withCredentials=r.withCredentials||!1,this.getXhr=r.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}return h(e,[{key:"requestRange",value:function(e,t,r){var n={begin:e,end:t};for(var i in r)n[i]=r[i];return this.request(n)}},{key:"requestFull",value:function(e){return this.request(e)}},{key:"request",value:function(e){var t=this.getXhr(),r=this.currXhrId++,n=this.pendingRequests[r]={xhr:t};for(var i in t.open("GET",this.url),t.withCredentials=this.withCredentials,this.httpHeaders){var a=this.httpHeaders[i];void 0!==a&&t.setRequestHeader(i,a)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range","bytes=".concat(e.begin,"-").concat(e.end-1)),n.expectedStatus=206):n.expectedStatus=200,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),n.onHeadersReceived=e.onHeadersReceived,n.onDone=e.onDone,n.onError=e.onError,n.onProgress=e.onProgress,t.send(null),r}},{key:"onProgress",value:function(e,t){var r=this.pendingRequests[e];r&&r.onProgress&&r.onProgress(t)}},{key:"onStateChange",value:function(e,t){var r=this.pendingRequests[e];if(r){var n=r.xhr;if(n.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),4===n.readyState&&e in this.pendingRequests)if(delete this.pendingRequests[e],0===n.status&&this.isHttp)r.onError&&r.onError(n.status);else{var i=n.status||200;if(200===i&&206===r.expectedStatus||i===r.expectedStatus){var o=function(e){var t=e.response;return"string"!=typeof t?t:(0,a.stringToBytes)(t).buffer}(n);if(206===i){var s=n.getResponseHeader("Content-Range"),u=/bytes (\d+)-(\d+)\/(\d+)/.exec(s);r.onDone({begin:parseInt(u[1],10),chunk:o})}else o?r.onDone({begin:0,chunk:o}):r.onError&&r.onError(n.status)}else r.onError&&r.onError(n.status)}}}},{key:"hasPendingRequests",value:function(){for(var e in this.pendingRequests)return!0;return!1}},{key:"getRequestXhr",value:function(e){return this.pendingRequests[e].xhr}},{key:"isPendingRequest",value:function(e){return e in this.pendingRequests}},{key:"abortAllRequests",value:function(){for(var e in this.pendingRequests)this.abortRequest(0|e)}},{key:"abortRequest",value:function(e){var t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}]),e}(),f=function(){function e(t){l(this,e),this._source=t,this._manager=new d(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials}),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}return h(e,[{key:"_onRangeRequestReaderClosed",value:function(e){var t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}},{key:"getFullReader",value:function(){return(0,a.assert)(!this._fullRequestReader),this._fullRequestReader=new p(this._manager,this._source),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){var r=new v(this._manager,e,t);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach(function(t){t.cancel(e)})}}]),e}();t.PDFNetworkStream=f;var p=function(){function e(t,r){l(this,e),this._manager=t;var n={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=r.url,this._fullRequestId=t.requestFull(n),this._headersReceivedCapability=(0,a.createPromiseCapability)(),this._disableRange=r.disableRange||!1,this._contentLength=r.length,this._rangeChunkSize=r.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}return h(e,[{key:"_onHeadersReceived",value:function(){var e=this._fullRequestId,t=this._manager.getRequestXhr(e),r=function(e){return t.getResponseHeader(e)},n=(0,o.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),i=n.allowRangeRequests,a=n.suggestedLength;i&&(this._isRangeSupported=!0),this._contentLength=a||this._contentLength,this._filename=(0,o.extractFilenameFromHeader)(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}},{key:"_onDone",value:function(e){e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):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=[])}},{key:"_onError",value:function(e){var t=this._url,r=(0,o.createResponseStatusError)(e,t);this._storedError=r,this._headersReceivedCapability.reject(r),this._requests.forEach(function(e){e.reject(r)}),this._requests=[],this._cachedChunks=[]}},{key:"_onProgress",value:function(e){this.onProgress&&this.onProgress({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}},{key:"read",value:function(){var e=u(i.default.mark(function e(){var t,r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._storedError){e.next=2;break}throw this._storedError;case 2:if(!(this._cachedChunks.length>0)){e.next=5;break}return t=this._cachedChunks.shift(),e.abrupt("return",{value:t,done:!1});case 5:if(!this._done){e.next=7;break}return e.abrupt("return",{value:void 0,done:!0});case 7:return r=(0,a.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 10:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(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}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"contentLength",get:function(){return this._contentLength}},{key:"headersReady",get:function(){return this._headersReceivedCapability.promise}}]),e}(),v=function(){function e(t,r,n){l(this,e),this._manager=t;var i={onDone:this._onDone.bind(this),onProgress:this._onProgress.bind(this)};this._requestId=t.requestRange(r,n,i),this._requests=[],this._queuedChunk=null,this._done=!1,this.onProgress=null,this.onClosed=null}return h(e,[{key:"_close",value:function(){this.onClosed&&this.onClosed(this)}},{key:"_onDone",value:function(e){var t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t;this._done=!0,this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[],this._close()}},{key:"_onProgress",value:function(e){!this.isStreamingSupported&&this.onProgress&&this.onProgress({loaded:e.loaded})}},{key:"read",value:function(){var e=u(i.default.mark(function e(){var t,r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null===this._queuedChunk){e.next=4;break}return t=this._queuedChunk,this._queuedChunk=null,e.abrupt("return",{value:t,done:!1});case 4:if(!this._done){e.next=6;break}return e.abrupt("return",{value:void 0,done:!0});case 6:return r=(0,a.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 9:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(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()}},{key:"isStreamingSupported",get:function(){return!1}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var n,i=(n=r(148))&&n.__esModule?n:{default:n},a=r(1),o=r(166);function s(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function u(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(e){s(a,n,i,o,u,"next",e)}function u(e){s(a,n,i,o,u,"throw",e)}o(void 0)})}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),e}function d(e,t,r){return{method:"GET",headers:e,signal:r&&r.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}var f=function(){function e(t){l(this,e),this.source=t,this.isHttp=/^https?:/i.test(t.url),this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}return h(e,[{key:"getFullReader",value:function(){return(0,a.assert)(!this._fullRequestReader),this._fullRequestReader=new p(this),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=new v(this,e,t);return this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach(function(t){t.cancel(e)})}},{key:"_progressiveDataLength",get:function(){return this._fullRequestReader?this._fullRequestReader._loaded:0}}]),e}();t.PDFFetchStream=f;var p=function(){function e(t){var r=this;l(this,e),this._stream=t,this._reader=null,this._loaded=0,this._filename=null;var n=t.source;for(var i in this._withCredentials=n.withCredentials||!1,this._contentLength=n.length,this._headersCapability=(0,a.createPromiseCapability)(),this._disableRange=n.disableRange||!1,this._rangeChunkSize=n.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),"undefined"!=typeof AbortController&&(this._abortController=new AbortController),this._isStreamingSupported=!n.disableStream,this._isRangeSupported=!n.disableRange,this._headers=new Headers,this._stream.httpHeaders){var s=this._stream.httpHeaders[i];void 0!==s&&this._headers.append(i,s)}var u=n.url;fetch(u,d(this._headers,this._withCredentials,this._abortController)).then(function(e){if(!(0,o.validateResponseStatus)(e.status))throw(0,o.createResponseStatusError)(e.status,u);r._reader=e.body.getReader(),r._headersCapability.resolve();var t=function(t){return e.headers.get(t)},n=(0,o.validateRangeRequestCapabilities)({getResponseHeader:t,isHttp:r._stream.isHttp,rangeChunkSize:r._rangeChunkSize,disableRange:r._disableRange}),i=n.allowRangeRequests,s=n.suggestedLength;r._isRangeSupported=i,r._contentLength=s||r._contentLength,r._filename=(0,o.extractFilenameFromHeader)(t),!r._isStreamingSupported&&r._isRangeSupported&&r.cancel(new a.AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}return h(e,[{key:"read",value:function(){var e=u(i.default.mark(function e(){var t,r,n,a;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._headersCapability.promise;case 2:return e.next=4,this._reader.read();case 4:if(t=e.sent,r=t.value,!(n=t.done)){e.next=9;break}return e.abrupt("return",{value:r,done:n});case 9:return this._loaded+=r.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),a=new Uint8Array(r).buffer,e.abrupt("return",{value:a,done:!1});case 13:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}},{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}}]),e}(),v=function(){function e(t,r,n){var i=this;l(this,e),this._stream=t,this._reader=null,this._loaded=0;var s=t.source;for(var u in this._withCredentials=s.withCredentials||!1,this._readCapability=(0,a.createPromiseCapability)(),this._isStreamingSupported=!s.disableStream,"undefined"!=typeof AbortController&&(this._abortController=new AbortController),this._headers=new Headers,this._stream.httpHeaders){var c=this._stream.httpHeaders[u];void 0!==c&&this._headers.append(u,c)}this._headers.append("Range","bytes=".concat(r,"-").concat(n-1));var h=s.url;fetch(h,d(this._headers,this._withCredentials,this._abortController)).then(function(e){if(!(0,o.validateResponseStatus)(e.status))throw(0,o.createResponseStatusError)(e.status,h);i._readCapability.resolve(),i._reader=e.body.getReader()}),this.onProgress=null}return h(e,[{key:"read",value:function(){var e=u(i.default.mark(function e(){var t,r,n,a;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:return e.next=4,this._reader.read();case 4:if(t=e.sent,r=t.value,!(n=t.done)){e.next=9;break}return e.abrupt("return",{value:r,done:n});case 9:return this._loaded+=r.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded}),a=new Uint8Array(r).buffer,e.abrupt("return",{value:a,done:!1});case 13:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"cancel",value:function(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}}]),e}()}])});
|
|
lang/pdf-embedder-it_IT.mo
ADDED
Binary file
|
lang/pdf-embedder-it_IT.po
ADDED
@@ -0,0 +1,779 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2017
|
2 |
+
# This file is distributed under the same license as the package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: \n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/PDFEmbedder\n"
|
7 |
+
"POT-Creation-Date: 2017-03-21 13:34:46+00:00\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2020-12-03 00:28+0100\n"
|
12 |
+
"Language-Team: \n"
|
13 |
+
"X-Generator: Poedit 2.2.1\n"
|
14 |
+
"Last-Translator: \n"
|
15 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
+
"Language: it_IT\n"
|
17 |
+
|
18 |
+
#: basic_pdf_embedder.php:76
|
19 |
+
msgid "Options only available in Premium versions"
|
20 |
+
msgstr "Opzioni disponibili solo con la versione Premium"
|
21 |
+
|
22 |
+
#: basic_pdf_embedder.php:78 core/commercial_pdf_embedder.php:108
|
23 |
+
msgid "Download Button"
|
24 |
+
msgstr "Pulsante per scaricare"
|
25 |
+
|
26 |
+
#: basic_pdf_embedder.php:80
|
27 |
+
msgid "Provide PDF download button on toolbar"
|
28 |
+
msgstr "Metti un pulsante per il download dei PDF nella barra degli strumenti"
|
29 |
+
|
30 |
+
#: basic_pdf_embedder.php:85 core/commercial_pdf_embedder.php:126
|
31 |
+
msgid "External Links"
|
32 |
+
msgstr "Links esterni"
|
33 |
+
|
34 |
+
#: basic_pdf_embedder.php:87 core/commercial_pdf_embedder.php:129
|
35 |
+
msgid "Open links in a new browser tab/window"
|
36 |
+
msgstr "Apri i links in un nuovo pannello/finestra"
|
37 |
+
|
38 |
+
#: basic_pdf_embedder.php:93 core/commercial_pdf_embedder.php:117
|
39 |
+
msgid "Track Views/Downloads"
|
40 |
+
msgstr "Traccia le Visualizzazioni/Download"
|
41 |
+
|
42 |
+
#: basic_pdf_embedder.php:95
|
43 |
+
msgid "Count number of views and downloads"
|
44 |
+
msgstr "Conta il numero delle visualizzazioni e dei download"
|
45 |
+
|
46 |
+
#: basic_pdf_embedder.php:100 core/commercial_pdf_embedder.php:99
|
47 |
+
msgid "Continous Page Scrolling"
|
48 |
+
msgstr "Scorrimento della pagina continua"
|
49 |
+
|
50 |
+
#: basic_pdf_embedder.php:102
|
51 |
+
msgid "Allow user to scroll up/down between all pages in the PDF"
|
52 |
+
msgstr "Permetti all'utente di scorrere su/giù nelle pagine nel PDF"
|
53 |
+
|
54 |
+
#: basic_pdf_embedder.php:106
|
55 |
+
msgid ""
|
56 |
+
"Find out more about <a href=\"%s\" target=\"_blank\">Premium Versions of the "
|
57 |
+
"plugin on our website</a>."
|
58 |
+
msgstr ""
|
59 |
+
"Scopri di più circa <a href=\"%s\" target=\"_blank\"> La versione Premium "
|
60 |
+
"sul nostro sito </a>."
|
61 |
+
|
62 |
+
#: basic_pdf_embedder.php:116
|
63 |
+
msgid "Mobile-friendly embedding using PDF Embedder Premium"
|
64 |
+
msgstr "Per la versione Mobile usa la versione Premium di PDF Embedder"
|
65 |
+
|
66 |
+
#: basic_pdf_embedder.php:117
|
67 |
+
msgid ""
|
68 |
+
"This free version of the plugin should work on most mobile browsers, but it "
|
69 |
+
"will be cumbersome for users with small screens - it is difficult to "
|
70 |
+
"position\n"
|
71 |
+
" the document entirely within the screen, and your users' fingers "
|
72 |
+
"may catch the entire browser page when\n"
|
73 |
+
" they're trying only to move about the document..."
|
74 |
+
msgstr ""
|
75 |
+
"Questa versione gratuita del plugin dovrebbe funzionare sulla maggior parte "
|
76 |
+
"dei browser mobili, ma sarà scomoda per gli utenti con schermi piccoli: è "
|
77 |
+
"difficile da posizionare il documento interamente all'interno dello schermo "
|
78 |
+
"e le dita degli utenti potrebbero catturare l'intera pagina del browser "
|
79 |
+
"quando cercano solo di spostarsi nel documento ..."
|
80 |
+
|
81 |
+
#: basic_pdf_embedder.php:121
|
82 |
+
msgid ""
|
83 |
+
"Our <b>PDF Embedder Premium</b> plugin solves this problem with an "
|
84 |
+
"intelligent 'full screen' mode.\n"
|
85 |
+
" When the document is smaller than a certain width, the document "
|
86 |
+
"displays only as a 'thumbnail' with a large\n"
|
87 |
+
" 'View in Full Screen' button for the\n"
|
88 |
+
" user to click when they want to study your document.\n"
|
89 |
+
" This opens up the document so it has the full focus of the "
|
90 |
+
"mobile browser, and the user can move about the\n"
|
91 |
+
" document without hitting other parts of\n"
|
92 |
+
" the web page by mistake. Click Exit to return to the regular web "
|
93 |
+
"page."
|
94 |
+
msgstr ""
|
95 |
+
"Il nostro plugin <b> PDF Embedder Premium </b> risolve questo problema con "
|
96 |
+
"una modalità \"a schermo intero\" intelligente. Quando il documento è più "
|
97 |
+
"piccolo di una certa larghezza, il documento viene visualizzato solo come "
|
98 |
+
"una \"miniatura\" con un grande Pulsante \"Visualizza a schermo intero\" "
|
99 |
+
"permette all'utente di fare clic quando desidera esaminare il documento. "
|
100 |
+
"Questo apre il documento in modo che abbia il focus completo del browser "
|
101 |
+
"mobile e l'utente possa spostarsi sul file documento senza toccare altre "
|
102 |
+
"parti della pagina web per errore. Fare clic su Esci per tornare alla pagina "
|
103 |
+
"Web normale."
|
104 |
+
|
105 |
+
#: basic_pdf_embedder.php:130
|
106 |
+
msgid ""
|
107 |
+
"The user can also touch and scroll continuously between all pages of the PDF "
|
108 |
+
"which is much easier than clicking the next/prev buttons to navigate."
|
109 |
+
msgstr ""
|
110 |
+
"L'utente può anche toccare e scorrere continuamente tra tutte le pagine del "
|
111 |
+
"PDF, il che è molto più semplice che fare clic sui pulsanti Avanti / "
|
112 |
+
"Indietro per navigare."
|
113 |
+
|
114 |
+
#: basic_pdf_embedder.php:133 core/core_pdf_embedder.php:382
|
115 |
+
msgid ""
|
116 |
+
"See our website <a href=\"%s\">wp-pdf.com</a> for more details and purchase "
|
117 |
+
"options."
|
118 |
+
msgstr ""
|
119 |
+
"Visita il nostro sito<a href=\"%s\">wp-pdf.com</a> per maggiori dettagli e "
|
120 |
+
"le opzioni di acquisto."
|
121 |
+
|
122 |
+
#: basic_pdf_embedder.php:193
|
123 |
+
msgid ""
|
124 |
+
"Track downloads and views with <a href=\"%s\" target=\"_blank\">PDF Embedder "
|
125 |
+
"Premium</a>"
|
126 |
+
msgstr ""
|
127 |
+
"Traccia i download e le visualizzazioni con <a href=\"%s\" target=\"_blank"
|
128 |
+
"\">PDF Embedder Premium</a>"
|
129 |
+
|
130 |
+
#: basic_pdf_embedder.php:195
|
131 |
+
msgid "Downloads/Views"
|
132 |
+
msgstr "Download/Visualizzazioni"
|
133 |
+
|
134 |
+
#: core/EDD_SL_Plugin_Updater.php:252
|
135 |
+
msgid ""
|
136 |
+
"There is a new version of %1$s available. <a target=\"_blank\" class="
|
137 |
+
"\"thickbox\" href=\"%2$s\">View version %3$s details</a>."
|
138 |
+
msgstr ""
|
139 |
+
"È disponibile una nuova versione di %1$s. <a target=\"_blank\" class="
|
140 |
+
"\"thickbox\" href=\"%2$s\">Vedi i dettagli della versione %3$s</a>."
|
141 |
+
|
142 |
+
#: core/EDD_SL_Plugin_Updater.php:259
|
143 |
+
msgid ""
|
144 |
+
"There is a new version of %1$s available. <a target=\"_blank\" class="
|
145 |
+
"\"thickbox\" href=\"%2$s\">View version %3$s details</a> or <a href=\"%4$s"
|
146 |
+
"\">update now</a>."
|
147 |
+
msgstr ""
|
148 |
+
"È disponibile una nuova versione di %1$s. <a target=\"_blank\" class="
|
149 |
+
"\"thickbox\" href=\"%2$s\">Vedi i dettagli della versione %3$s </a> o <a "
|
150 |
+
"href=\"%4$s\">aggiorna ora</a>."
|
151 |
+
|
152 |
+
#: core/EDD_SL_Plugin_Updater.php:517
|
153 |
+
msgid "You do not have permission to install plugin updates"
|
154 |
+
msgstr "Non hai il permesso per installare gli aggiornamenti del plugin"
|
155 |
+
|
156 |
+
#: core/EDD_SL_Plugin_Updater.php:517
|
157 |
+
msgid "Error"
|
158 |
+
msgstr "Errore"
|
159 |
+
|
160 |
+
#: core/commercial_pdf_embedder.php:71
|
161 |
+
msgid "License"
|
162 |
+
msgstr "Licenza"
|
163 |
+
|
164 |
+
#: core/commercial_pdf_embedder.php:82
|
165 |
+
msgid "Display Scrollbars"
|
166 |
+
msgstr "Visualizza le barre di scorrimento"
|
167 |
+
|
168 |
+
#: core/commercial_pdf_embedder.php:86
|
169 |
+
msgid "None"
|
170 |
+
msgstr "Nessuna"
|
171 |
+
|
172 |
+
#: core/commercial_pdf_embedder.php:87
|
173 |
+
msgid "Vertical"
|
174 |
+
msgstr "Verticale"
|
175 |
+
|
176 |
+
#: core/commercial_pdf_embedder.php:88
|
177 |
+
msgid "Horizontal"
|
178 |
+
msgstr "Orizzontale"
|
179 |
+
|
180 |
+
#: core/commercial_pdf_embedder.php:89 core/core_pdf_embedder.php:324
|
181 |
+
msgid "Both"
|
182 |
+
msgstr "Entrambe"
|
183 |
+
|
184 |
+
#: core/commercial_pdf_embedder.php:94
|
185 |
+
msgid "User can still use mouse if scrollbars not visible"
|
186 |
+
msgstr ""
|
187 |
+
"L'utente può comunque utilizzare il mouse se le barre di scorrimento non "
|
188 |
+
"sono visibili"
|
189 |
+
|
190 |
+
#: core/commercial_pdf_embedder.php:102
|
191 |
+
msgid ""
|
192 |
+
"Allow user to scroll up/down between all pages in the PDF (if unchecked, "
|
193 |
+
"user must click next/prev buttons to change page)"
|
194 |
+
msgstr ""
|
195 |
+
"Consenti all'utente di scorrere su / giù tra tutte le pagine del PDF (se "
|
196 |
+
"deselezionato, l'utente deve fare clic sui pulsanti Avanti / Indietro per "
|
197 |
+
"cambiare pagina)"
|
198 |
+
|
199 |
+
#: core/commercial_pdf_embedder.php:111
|
200 |
+
msgid "Provide PDF download button in toolbar"
|
201 |
+
msgstr ""
|
202 |
+
"Fornisci il pulsante per il download del PDF nella barra degli strumenti"
|
203 |
+
|
204 |
+
#: core/commercial_pdf_embedder.php:120
|
205 |
+
msgid ""
|
206 |
+
"Count number of views and downloads (figures will be shown in <a href=\"%s"
|
207 |
+
"\">Media Library</a>)"
|
208 |
+
msgstr ""
|
209 |
+
"Contare il numero di visualizzazioni e download (le cifre verranno mostrate "
|
210 |
+
"in formato <a href=\"%s\">Media Library</a>)"
|
211 |
+
|
212 |
+
#: core/commercial_pdf_embedder.php:135
|
213 |
+
msgid "Scroll to Top"
|
214 |
+
msgstr "Scorri in alto"
|
215 |
+
|
216 |
+
#: core/commercial_pdf_embedder.php:138
|
217 |
+
msgid "Scroll to top of page when user clicks next/prev"
|
218 |
+
msgstr ""
|
219 |
+
"Scorri fino all'inizio della pagina quando l'utente fa clic su Avanti / "
|
220 |
+
"Indietro"
|
221 |
+
|
222 |
+
#: core/commercial_pdf_embedder.php:146
|
223 |
+
msgid "No Toolbar"
|
224 |
+
msgstr "Nessuna barra degli strumenti"
|
225 |
+
|
226 |
+
#: core/commercial_pdf_embedder.php:154
|
227 |
+
msgid "Default Mobile Settings"
|
228 |
+
msgstr "Impostazioni predefinite per i cellulari"
|
229 |
+
|
230 |
+
#: core/commercial_pdf_embedder.php:156
|
231 |
+
msgid ""
|
232 |
+
"When the document is smaller than the width specified below, the document "
|
233 |
+
"displays only as a 'thumbnail' with a large 'View in Full Screen' button for "
|
234 |
+
"the user to click to open."
|
235 |
+
msgstr ""
|
236 |
+
"Quando il documento è più piccolo della larghezza specificata di seguito, il "
|
237 |
+
"documento viene visualizzato solo come una \"miniatura\" con un grande "
|
238 |
+
"pulsante \"Visualizza a schermo intero\" su cui l'utente può fare clic per "
|
239 |
+
"aprirlo."
|
240 |
+
|
241 |
+
#: core/commercial_pdf_embedder.php:158
|
242 |
+
msgid "Mobile Width"
|
243 |
+
msgstr "Larghezza del cellulare"
|
244 |
+
|
245 |
+
#: core/commercial_pdf_embedder.php:162
|
246 |
+
msgid ""
|
247 |
+
"Enter an integer number of pixels, or 0 to disable automatic full-screen"
|
248 |
+
msgstr ""
|
249 |
+
"Immettere un numero intero di pixel o 0 per disabilitare lo schermo intero "
|
250 |
+
"automatico"
|
251 |
+
|
252 |
+
#: core/commercial_pdf_embedder.php:166
|
253 |
+
msgid "Disable Device Zoom"
|
254 |
+
msgstr "Disabilita lo zoom del dispositivo"
|
255 |
+
|
256 |
+
#: core/commercial_pdf_embedder.php:169
|
257 |
+
msgid "Enable if you are experiencing quality issues on mobiles"
|
258 |
+
msgstr "Abilita se riscontri problemi di qualità sui cellulari"
|
259 |
+
|
260 |
+
#: core/commercial_pdf_embedder.php:174
|
261 |
+
msgid ""
|
262 |
+
"Some mobile browsers will use their own zoom, causing the PDF Embedder to "
|
263 |
+
"render at a lower resolution than it should, or lose the toolbar off screen."
|
264 |
+
msgstr ""
|
265 |
+
"Alcuni browser mobili useranno il proprio zoom, causando il rendering di PDF "
|
266 |
+
"Embedder a una risoluzione inferiore a quella prevista o la perdita della "
|
267 |
+
"barra degli strumenti fuori dallo schermo."
|
268 |
+
|
269 |
+
#: core/commercial_pdf_embedder.php:175
|
270 |
+
msgid ""
|
271 |
+
"Enabling this option may help, but could potentially affect appearance in "
|
272 |
+
"the rest of your site."
|
273 |
+
msgstr ""
|
274 |
+
"L'attivazione di questa opzione può aiutare, ma potrebbe potenzialmente "
|
275 |
+
"influire sull'aspetto nel resto del tuo sito."
|
276 |
+
|
277 |
+
#: core/commercial_pdf_embedder.php:176
|
278 |
+
msgid "See <a href=\"%s\" target=\"_blank\">documentation</a> for details."
|
279 |
+
msgstr ""
|
280 |
+
"Guarda <a href=\"%s\" target=\"_blank\">la documentazione</a> per i "
|
281 |
+
"particolari."
|
282 |
+
|
283 |
+
#: core/commercial_pdf_embedder.php:187
|
284 |
+
msgid ""
|
285 |
+
"You should have received a license key when you purchased this premium "
|
286 |
+
"version of PDF Embedder."
|
287 |
+
msgstr ""
|
288 |
+
"Dovresti aver ricevuto una chiave di licenza quando hai acquistato questa "
|
289 |
+
"versione premium di PDF Embedder."
|
290 |
+
|
291 |
+
#: core/commercial_pdf_embedder.php:188
|
292 |
+
msgid ""
|
293 |
+
"Please enter it below to enable automatic updates, or <a href=\"%s\">email "
|
294 |
+
"us</a> if you do not have one."
|
295 |
+
msgstr ""
|
296 |
+
"Inseriscilo di seguito per abilitare gli aggiornamenti automatici, o <a href="
|
297 |
+
"\"%s\">inviaci una email</a> se non ne hai uno."
|
298 |
+
|
299 |
+
#: core/commercial_pdf_embedder.php:190
|
300 |
+
msgid "License Key"
|
301 |
+
msgstr "Chiave di licenza"
|
302 |
+
|
303 |
+
#: core/commercial_pdf_embedder.php:203
|
304 |
+
msgid "Current License"
|
305 |
+
msgstr "Licenza corrente"
|
306 |
+
|
307 |
+
#: core/commercial_pdf_embedder.php:206
|
308 |
+
msgid "Status"
|
309 |
+
msgstr "Stato"
|
310 |
+
|
311 |
+
#: core/commercial_pdf_embedder.php:210
|
312 |
+
msgid "Last Checked"
|
313 |
+
msgstr "Ultimo controllo"
|
314 |
+
|
315 |
+
#: core/commercial_pdf_embedder.php:218
|
316 |
+
msgid "License Expires"
|
317 |
+
msgstr "Licenza scaduta"
|
318 |
+
|
319 |
+
#: core/commercial_pdf_embedder.php:230
|
320 |
+
msgid ""
|
321 |
+
"To renew your license, please <a href=\"%s\" target=\"_blank\">click here</"
|
322 |
+
"a>."
|
323 |
+
msgstr ""
|
324 |
+
"Per rinnovare la tua licenza, per favore <a href=\"%s\" target=\"_blank"
|
325 |
+
"\">clicca qui</a>."
|
326 |
+
|
327 |
+
#: core/commercial_pdf_embedder.php:233
|
328 |
+
msgid ""
|
329 |
+
"You will receive a 50% discount if you renew before your license expires."
|
330 |
+
msgstr ""
|
331 |
+
"Riceverai uno sconto del 50% se rinnovi prima della scadenza della licenza."
|
332 |
+
|
333 |
+
#: core/commercial_pdf_embedder.php:242
|
334 |
+
msgid "Participate in future beta releases of the plugin"
|
335 |
+
msgstr "Partecipa alle future versioni beta del plugin"
|
336 |
+
|
337 |
+
#: core/commercial_pdf_embedder.php:384
|
338 |
+
msgid "Mobile width should be an integer number of pixels, or 0 to turn off"
|
339 |
+
msgstr ""
|
340 |
+
"La larghezza del dispositivo mobile deve essere un numero intero di pixel, o "
|
341 |
+
"0 per disattivarla"
|
342 |
+
|
343 |
+
#: core/commercial_pdf_embedder.php:385
|
344 |
+
msgid "License key is too short"
|
345 |
+
msgstr "La chiave della licenza è troppo corta"
|
346 |
+
|
347 |
+
#: core/commercial_pdf_embedder.php:387
|
348 |
+
msgid "License key failed to activate"
|
349 |
+
msgstr "Attivazione della chiave di licenza non riuscita"
|
350 |
+
|
351 |
+
#: core/commercial_pdf_embedder.php:388
|
352 |
+
msgid "License key does not exist in our system at all"
|
353 |
+
msgstr "La chiave di licenza non esiste affatto nel nostro sistema"
|
354 |
+
|
355 |
+
#: core/commercial_pdf_embedder.php:389
|
356 |
+
msgid "License key entered is for the wrong product"
|
357 |
+
msgstr "La chiave di licenza inserita è per il prodotto sbagliato"
|
358 |
+
|
359 |
+
#: core/commercial_pdf_embedder.php:390
|
360 |
+
msgid "License key has expired"
|
361 |
+
msgstr "La chiave di licenza è scaduta"
|
362 |
+
|
363 |
+
#: core/commercial_pdf_embedder.php:391
|
364 |
+
msgid "License key is not permitted for this website"
|
365 |
+
msgstr "La chiave di licenza non è consentita per questo sito web"
|
366 |
+
|
367 |
+
#: core/commercial_pdf_embedder.php:392
|
368 |
+
msgid "License key is not active for this website"
|
369 |
+
msgstr "La chiave di licenza non è attiva per questo sito"
|
370 |
+
|
371 |
+
#: core/commercial_pdf_embedder.php:393
|
372 |
+
msgid "License key has been disabled"
|
373 |
+
msgstr "La chiave di licenza è stata disabilitata"
|
374 |
+
|
375 |
+
#: core/commercial_pdf_embedder.php:394
|
376 |
+
msgid "License key was not provided"
|
377 |
+
msgstr "La chiave di licenza non è stata fornita"
|
378 |
+
|
379 |
+
#: core/commercial_pdf_embedder.php:441
|
380 |
+
msgid "Downloads"
|
381 |
+
msgstr "Downloads"
|
382 |
+
|
383 |
+
#: core/commercial_pdf_embedder.php:445
|
384 |
+
msgid "Views"
|
385 |
+
msgstr "Visualizzazioni"
|
386 |
+
|
387 |
+
#: core/core_pdf_embedder.php:37
|
388 |
+
msgid "Loading..."
|
389 |
+
msgstr "Sto caricando..."
|
390 |
+
|
391 |
+
#: core/core_pdf_embedder.php:38
|
392 |
+
msgid "Page"
|
393 |
+
msgstr "Pagina"
|
394 |
+
|
395 |
+
#: core/core_pdf_embedder.php:39
|
396 |
+
msgid "Zoom"
|
397 |
+
msgstr "Zoom"
|
398 |
+
|
399 |
+
#: core/core_pdf_embedder.php:40
|
400 |
+
msgid "Previous page"
|
401 |
+
msgstr "Pagina precedente"
|
402 |
+
|
403 |
+
#: core/core_pdf_embedder.php:41
|
404 |
+
msgid "Next page"
|
405 |
+
msgstr "Pagina successiva"
|
406 |
+
|
407 |
+
#: core/core_pdf_embedder.php:42
|
408 |
+
msgid "Zoom In"
|
409 |
+
msgstr "Aumenta zoom"
|
410 |
+
|
411 |
+
#: core/core_pdf_embedder.php:43
|
412 |
+
msgid "Zoom Out"
|
413 |
+
msgstr "Diminuisci zoom"
|
414 |
+
|
415 |
+
#: core/core_pdf_embedder.php:44 core/core_pdf_embedder.php:251
|
416 |
+
msgid "Secure"
|
417 |
+
msgstr "Sicuro"
|
418 |
+
|
419 |
+
#: core/core_pdf_embedder.php:45
|
420 |
+
msgid "Download PDF"
|
421 |
+
msgstr "Download PDF"
|
422 |
+
|
423 |
+
#: core/core_pdf_embedder.php:46
|
424 |
+
msgid "Full Screen"
|
425 |
+
msgstr "Schermo intero"
|
426 |
+
|
427 |
+
#: core/core_pdf_embedder.php:47
|
428 |
+
msgid ""
|
429 |
+
"Error: URL to the PDF file must be on exactly the same domain as the current "
|
430 |
+
"web page."
|
431 |
+
msgstr ""
|
432 |
+
"Errore: l'URL del file PDF deve essere esattamente nello stesso dominio "
|
433 |
+
"della pagina Web corrente."
|
434 |
+
|
435 |
+
#: core/core_pdf_embedder.php:48
|
436 |
+
msgid "Click here for more info"
|
437 |
+
msgstr "Clicca qua per maggiori informazioni"
|
438 |
+
|
439 |
+
#: core/core_pdf_embedder.php:49
|
440 |
+
msgid "PDF page width or height are invalid"
|
441 |
+
msgstr "La larghezza o l'altezza della pagina PDF non sono valide"
|
442 |
+
|
443 |
+
#: core/core_pdf_embedder.php:50
|
444 |
+
msgid "View in Full Screen"
|
445 |
+
msgstr "Visualizza a schermo intero"
|
446 |
+
|
447 |
+
#: core/core_pdf_embedder.php:68
|
448 |
+
msgid "PDFs"
|
449 |
+
msgstr "PDFs"
|
450 |
+
|
451 |
+
#: core/core_pdf_embedder.php:68
|
452 |
+
msgid "Manage PDFs"
|
453 |
+
msgstr "Gestisci i PDFs"
|
454 |
+
|
455 |
+
#: core/core_pdf_embedder.php:68
|
456 |
+
msgid "PDF <span class=\"count\">(%s)</span>"
|
457 |
+
msgid_plural "PDFs <span class=\"count\">(%s)</span>"
|
458 |
+
msgstr[0] "PDF <span class=\"count\">(%s)</span>"
|
459 |
+
msgstr[1] "PDFs <span class=\"count\">(%s)</span>"
|
460 |
+
|
461 |
+
#: core/core_pdf_embedder.php:212 core/core_pdf_embedder.php:217
|
462 |
+
msgid "PDF Embedder settings"
|
463 |
+
msgstr "Impostazioni PDF Embedder"
|
464 |
+
|
465 |
+
#: core/core_pdf_embedder.php:212 core/core_pdf_embedder.php:217
|
466 |
+
msgid "PDF Embedder"
|
467 |
+
msgstr "PDF Embedder"
|
468 |
+
|
469 |
+
#: core/core_pdf_embedder.php:237
|
470 |
+
msgid "PDF Embedder setup"
|
471 |
+
msgstr "Configurazione di PDF Embedder"
|
472 |
+
|
473 |
+
#: core/core_pdf_embedder.php:239
|
474 |
+
msgid ""
|
475 |
+
"To use the plugin, just embed PDFs in the same way as you would normally "
|
476 |
+
"embed images in your posts/pages - but try with a PDF file instead."
|
477 |
+
msgstr ""
|
478 |
+
"Per utilizzare il plugin, è sufficiente incorporare i PDF nello stesso modo "
|
479 |
+
"in cui incorporeresti normalmente le immagini nei tuoi post / pagine, ma "
|
480 |
+
"prova invece con un file PDF."
|
481 |
+
|
482 |
+
#: core/core_pdf_embedder.php:240
|
483 |
+
msgid ""
|
484 |
+
"From the post editor, click Add Media, and then drag-and-drop your PDF file "
|
485 |
+
"into the media library.\n"
|
486 |
+
" When you insert the PDF into your post, it will "
|
487 |
+
"automatically embed using the plugin's viewer."
|
488 |
+
msgstr ""
|
489 |
+
"Dall'editor dei post, fai clic su Aggiungi media, quindi trascina il tuo "
|
490 |
+
"file PDF nel catalogo multimediale.\n"
|
491 |
+
" Quando inserisci il PDF nel tuo post, verrà incorporato "
|
492 |
+
"automaticamente utilizzando il visualizzatore del plugin."
|
493 |
+
|
494 |
+
#: core/core_pdf_embedder.php:249
|
495 |
+
msgid "Main Settings"
|
496 |
+
msgstr "Impostazioni principali"
|
497 |
+
|
498 |
+
#: core/core_pdf_embedder.php:250
|
499 |
+
msgid "Mobile"
|
500 |
+
msgstr "Cellulare"
|
501 |
+
|
502 |
+
#: core/core_pdf_embedder.php:278
|
503 |
+
msgid "Save Changes"
|
504 |
+
msgstr "Salva i cambiamenti"
|
505 |
+
|
506 |
+
#: core/core_pdf_embedder.php:306
|
507 |
+
msgid "Default Viewer Settings"
|
508 |
+
msgstr "Impostazioni visualizzatore predefinite"
|
509 |
+
|
510 |
+
#: core/core_pdf_embedder.php:308
|
511 |
+
msgid "Width"
|
512 |
+
msgstr "Larghezza"
|
513 |
+
|
514 |
+
#: core/core_pdf_embedder.php:312
|
515 |
+
msgid "Height"
|
516 |
+
msgstr "Altezza"
|
517 |
+
|
518 |
+
#: core/core_pdf_embedder.php:316
|
519 |
+
msgid "Enter <b>max</b> or an integer number of pixels"
|
520 |
+
msgstr "Inserisci <b>max</b> o un numero intero di pixel"
|
521 |
+
|
522 |
+
#: core/core_pdf_embedder.php:320
|
523 |
+
msgid "Toolbar Location"
|
524 |
+
msgstr "Posizione della barra degli strumenti"
|
525 |
+
|
526 |
+
#: core/core_pdf_embedder.php:322
|
527 |
+
msgid "Top"
|
528 |
+
msgstr "In alto"
|
529 |
+
|
530 |
+
#: core/core_pdf_embedder.php:323
|
531 |
+
msgid "Bottom"
|
532 |
+
msgstr "In basso"
|
533 |
+
|
534 |
+
#: core/core_pdf_embedder.php:330
|
535 |
+
msgid "Toolbar Hover"
|
536 |
+
msgstr "Passaggio del mouse sulla barra degli strumenti"
|
537 |
+
|
538 |
+
#: core/core_pdf_embedder.php:333
|
539 |
+
msgid "Toolbar appears only on hover over document"
|
540 |
+
msgstr ""
|
541 |
+
"La barra degli strumenti viene visualizzata solo al passaggio del mouse sul "
|
542 |
+
"documento"
|
543 |
+
|
544 |
+
#: core/core_pdf_embedder.php:338
|
545 |
+
msgid "Toolbar always visible"
|
546 |
+
msgstr "Barra degli strumenti sempre visibile"
|
547 |
+
|
548 |
+
#: core/core_pdf_embedder.php:350
|
549 |
+
msgid ""
|
550 |
+
"You can override these defaults for specific embeds by modifying the "
|
551 |
+
"shortcodes - see <a href=\"%s\" target=\"_blank\">instructions</a>."
|
552 |
+
msgstr ""
|
553 |
+
"È possibile sovrascrivere queste impostazioni predefinite per incorporamenti "
|
554 |
+
"specifici modificando gli shortcode - vedi <a href=\"%s\" target=\"_blank"
|
555 |
+
"\">le istruzioni</a>."
|
556 |
+
|
557 |
+
#: core/core_pdf_embedder.php:374
|
558 |
+
msgid "Protect your PDFs using PDF Embedder Secure"
|
559 |
+
msgstr "Proteggi i tuoi PDF utilizzando PDF Embedder Secure"
|
560 |
+
|
561 |
+
#: core/core_pdf_embedder.php:375
|
562 |
+
msgid ""
|
563 |
+
"Our <b>PDF Embedder Premium Secure</b> plugin provides the same simple but "
|
564 |
+
"elegant viewer for your website visitors, with the added protection that\n"
|
565 |
+
" it is difficult for users to download or print the original PDF "
|
566 |
+
"document."
|
567 |
+
msgstr ""
|
568 |
+
"Il nostro plugin <b> PDF Embedder Premium Secure </b> fornisce lo stesso "
|
569 |
+
"visualizzatore semplice ma elegante per i visitatori del tuo sito Web, con "
|
570 |
+
"la protezione aggiuntiva che\n"
|
571 |
+
" rende difficile agli utenti scaricare o stampare il documento "
|
572 |
+
"PDF originale."
|
573 |
+
|
574 |
+
#: core/core_pdf_embedder.php:378
|
575 |
+
msgid ""
|
576 |
+
"This means that your PDF is unlikely to be shared outside your site where "
|
577 |
+
"you have no control over who views, prints, or shares it."
|
578 |
+
msgstr ""
|
579 |
+
"Ciò significa che è improbabile che il tuo PDF venga condiviso al di fuori "
|
580 |
+
"del tuo sito dove non hai il controllo su chi lo visualizza, lo stampa o lo "
|
581 |
+
"condivide."
|
582 |
+
|
583 |
+
#: core/core_pdf_embedder.php:380
|
584 |
+
msgid ""
|
585 |
+
"Optionally add a watermark containing the user's name or email address to "
|
586 |
+
"discourage sharing of screenshots."
|
587 |
+
msgstr ""
|
588 |
+
"Facoltativamente, aggiungi una filigrana contenente il nome o l'indirizzo e-"
|
589 |
+
"mail dell'utente per scoraggiare la condivisione di screenshot."
|
590 |
+
|
591 |
+
#: core/core_pdf_embedder.php:428
|
592 |
+
msgid "Width must be \"max\" or an integer (number of pixels)"
|
593 |
+
msgstr "La larghezza deve essere \"max\" o un numero intero (numero di pixel)"
|
594 |
+
|
595 |
+
#: core/core_pdf_embedder.php:429
|
596 |
+
msgid "Height must be \"max\" or an integer (number of pixels)"
|
597 |
+
msgstr "L'altezza deve essere \"max\" o un numero intero (numero di pixel)"
|
598 |
+
|
599 |
+
#: core/core_pdf_embedder.php:435
|
600 |
+
msgid "Unspecified error"
|
601 |
+
msgstr "Errore non specificato"
|
602 |
+
|
603 |
+
#: core/core_pdf_embedder.php:481
|
604 |
+
msgid "Settings saved"
|
605 |
+
msgstr "Impostazioni salvate"
|
606 |
+
|
607 |
+
#: core/core_pdf_embedder.php:587
|
608 |
+
msgid "Settings"
|
609 |
+
msgstr "Ipostazioni"
|
610 |
+
|
611 |
+
#: premium_secure_pdf_embedder.php:85
|
612 |
+
msgid "Not logged in"
|
613 |
+
msgstr "Non hai fatto l'accesso"
|
614 |
+
|
615 |
+
#: premium_secure_pdf_embedder.php:229 premium_secure_pdf_embedder.php:231
|
616 |
+
msgid "Secure PDFs"
|
617 |
+
msgstr "Secure PDFs"
|
618 |
+
|
619 |
+
#: premium_secure_pdf_embedder.php:234
|
620 |
+
msgid "Send new PDF media uploads to 'securepdfs' folder"
|
621 |
+
msgstr "Invia nuovi caricamenti multimediali PDF alla cartella \"securepdfs\""
|
622 |
+
|
623 |
+
#: premium_secure_pdf_embedder.php:240
|
624 |
+
msgid "Disable Right Click"
|
625 |
+
msgstr "Disabilita click destro"
|
626 |
+
|
627 |
+
#: premium_secure_pdf_embedder.php:243
|
628 |
+
msgid "Disable right-click mouse menu (affects secure PDFs only)"
|
629 |
+
msgstr ""
|
630 |
+
"Disabilita il menu del tasto destro del mouse (influisce solo sui PDF "
|
631 |
+
"protetti)"
|
632 |
+
|
633 |
+
#: premium_secure_pdf_embedder.php:249
|
634 |
+
msgid "Cache Encrypted PDFs"
|
635 |
+
msgstr "PDF crittografati nella cache"
|
636 |
+
|
637 |
+
#: premium_secure_pdf_embedder.php:252
|
638 |
+
msgid ""
|
639 |
+
"Cache encrypted versions of secure PDFs on the server (increase download "
|
640 |
+
"speed)"
|
641 |
+
msgstr ""
|
642 |
+
"Memorizza nella cache le versioni crittografate dei PDF protetti sul server "
|
643 |
+
"(aumenta la velocità di download)"
|
644 |
+
|
645 |
+
#: premium_secure_pdf_embedder.php:258
|
646 |
+
msgid "Watermark"
|
647 |
+
msgstr "Filigrana"
|
648 |
+
|
649 |
+
#: premium_secure_pdf_embedder.php:260
|
650 |
+
msgid "Text to display on secure PDFs"
|
651 |
+
msgstr "Testo da visualizzare su PDF protetti"
|
652 |
+
|
653 |
+
#: premium_secure_pdf_embedder.php:268
|
654 |
+
msgid "Horizontal alignment"
|
655 |
+
msgstr "Allineamento orizzontale"
|
656 |
+
|
657 |
+
#: premium_secure_pdf_embedder.php:270
|
658 |
+
msgid "Left"
|
659 |
+
msgstr "Sinistra"
|
660 |
+
|
661 |
+
#: premium_secure_pdf_embedder.php:271
|
662 |
+
msgid "Center"
|
663 |
+
msgstr "Centro"
|
664 |
+
|
665 |
+
#: premium_secure_pdf_embedder.php:272
|
666 |
+
msgid "Right"
|
667 |
+
msgstr "Destra"
|
668 |
+
|
669 |
+
#: premium_secure_pdf_embedder.php:277
|
670 |
+
msgid "Vertical offset (%)"
|
671 |
+
msgstr "Offset verticale (%)"
|
672 |
+
|
673 |
+
#: premium_secure_pdf_embedder.php:282
|
674 |
+
msgid "Font Size (pt)"
|
675 |
+
msgstr "Dimensione font (pt)"
|
676 |
+
|
677 |
+
#: premium_secure_pdf_embedder.php:287
|
678 |
+
msgid "Opacity (%)"
|
679 |
+
msgstr "Opacità (%)"
|
680 |
+
|
681 |
+
#: premium_secure_pdf_embedder.php:292
|
682 |
+
msgid "Rotation (degrees)"
|
683 |
+
msgstr "Rotazione (gradi)"
|
684 |
+
|
685 |
+
#: premium_secure_pdf_embedder.php:297
|
686 |
+
msgid "Page Display"
|
687 |
+
msgstr "Visualizzazione della pagina"
|
688 |
+
|
689 |
+
#: premium_secure_pdf_embedder.php:300
|
690 |
+
msgid "Show only on even page numbers"
|
691 |
+
msgstr "Mostra solo sui numeri di pagina pari"
|
692 |
+
|
693 |
+
#: premium_secure_pdf_embedder.php:308
|
694 |
+
msgid ""
|
695 |
+
"If 'Secure PDFs' is checked above, your PDF uploads will be 'secure' by "
|
696 |
+
"default.\n"
|
697 |
+
" That is, they should be uploaded to a 'securepdfs' sub-folder of "
|
698 |
+
"your uploads area. These files should not be accessible directly,\n"
|
699 |
+
" and the plugin provides a backdoor method for the embedded "
|
700 |
+
"viewer to obtain the file contents."
|
701 |
+
msgstr ""
|
702 |
+
"Se \"Secure PDF \" è selezionato sopra, i tuoi caricamenti PDF saranno "
|
703 |
+
"\"protetti\" per impostazione predefinita.\n"
|
704 |
+
" Cioè, dovrebbero essere caricati in una sottocartella "
|
705 |
+
"\"securepdfs\" dell'area dei caricamenti. Questi file non dovrebbero essere "
|
706 |
+
"accessibili direttamente,\n"
|
707 |
+
" e il plugin fornisce un metodo backdoor per il visualizzatore "
|
708 |
+
"incorporato per ottenere il contenuto del file."
|
709 |
+
|
710 |
+
#: premium_secure_pdf_embedder.php:312
|
711 |
+
msgid ""
|
712 |
+
"This means that your PDF is unlikely to be shared outside your site where "
|
713 |
+
"you have no control over who views, prints, or shares it.\n"
|
714 |
+
" Please note that it is still always possible for a determined "
|
715 |
+
"user to obtain the original file. Sensitive information should never be "
|
716 |
+
"presented to viewers in any form."
|
717 |
+
msgstr ""
|
718 |
+
"Ciò significa che è improbabile che il tuo PDF venga condiviso al di fuori "
|
719 |
+
"del tuo sito dove non hai il controllo su chi lo visualizza, lo stampa o lo "
|
720 |
+
"condivide.\n"
|
721 |
+
" Si noti che è sempre possibile per un determinato utente "
|
722 |
+
"ottenere il file originale. Le informazioni sensibili non dovrebbero mai "
|
723 |
+
"essere presentate agli spettatori in nessuna forma."
|
724 |
+
|
725 |
+
#: premium_secure_pdf_embedder.php:315
|
726 |
+
msgid ""
|
727 |
+
"See <a href=\"http://wp-pdf.com/premium-instructions/?utm_source=PDF"
|
728 |
+
"%20Settings%20Secure&utm_medium=premium&utm_campaign=Premium\" target="
|
729 |
+
"\"_blank\">Instructions</a> for more details."
|
730 |
+
msgstr ""
|
731 |
+
"Vedi<a href=\"http://wp-pdf.com/premium-instructions/?utm_source=PDF"
|
732 |
+
"%20Settings%20Secure&utm_medium=premium&utm_campaign=Premium\" target="
|
733 |
+
"\"_blank\">le istruzioni</a> per maggiori dettagli."
|
734 |
+
|
735 |
+
#: premium_secure_pdf_embedder.php:407
|
736 |
+
msgid "Watermark Vertical offset should be a numerical value between 0 and 100"
|
737 |
+
msgstr ""
|
738 |
+
"L'offset verticale della filigrana deve essere un valore numerico compreso "
|
739 |
+
"tra 0 e 100"
|
740 |
+
|
741 |
+
#: premium_secure_pdf_embedder.php:408
|
742 |
+
msgid "Font Size should be a numerical value"
|
743 |
+
msgstr "La dimensione del carattere dovrebbe essere un valore numerico"
|
744 |
+
|
745 |
+
#: premium_secure_pdf_embedder.php:409
|
746 |
+
msgid "Watermark Opacity should be a numerical value between 0 and 100"
|
747 |
+
msgstr ""
|
748 |
+
"L'opacità della filigrana dovrebbe essere un valore numerico tra 0 e 100"
|
749 |
+
|
750 |
+
#: premium_secure_pdf_embedder.php:410
|
751 |
+
msgid "Watermark Rotation should be a numerical value in degrees (0 to 360)"
|
752 |
+
msgstr ""
|
753 |
+
"La rotazione della filigrana dovrebbe essere un valore numerico in gradi (da "
|
754 |
+
"0 a 360)"
|
755 |
+
|
756 |
+
# wordpress plugin description
|
757 |
+
msgid ""
|
758 |
+
"Embed PDFs straight into your posts and pages, with flexible width and "
|
759 |
+
"height. No third-party services required."
|
760 |
+
msgstr ""
|
761 |
+
"Incorpora PDF direttamente nei tuoi post e pagine, con larghezza e altezza "
|
762 |
+
"flessibili. Nessun servizio di terze parti richiesto."
|
763 |
+
|
764 |
+
# readme description
|
765 |
+
msgid ""
|
766 |
+
"Embed PDFs straight into your posts and pages, with intelligent resizing of "
|
767 |
+
"width and height. No third-party services or iframes required."
|
768 |
+
msgstr ""
|
769 |
+
"Incorpora PDF direttamente nei tuoi post e pagine, con ridimensionamento "
|
770 |
+
"intelligente di larghezza e altezza. Non sono richiesti servizi di terze "
|
771 |
+
"parti o iframe."
|
772 |
+
|
773 |
+
# wordpress plugin description
|
774 |
+
msgid "PDF Embedder Premium"
|
775 |
+
msgstr "PDF Embedder Premium"
|
776 |
+
|
777 |
+
# wordpress plugin description
|
778 |
+
msgid "PDF Embedder Premium Secure"
|
779 |
+
msgstr "PDF Embedder Premium Secure"
|
pdf_embedder.php
CHANGED
@@ -1,231 +1,231 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Plugin Name: PDF Embedder
|
5 |
-
* Plugin URI: http://wp-pdf.com/
|
6 |
-
* Description: Embed PDFs straight into your posts and pages, with flexible width and height. No third-party services required. Compatible with Gutenberg Editor WordPress
|
7 |
-
* Version: 4.
|
8 |
-
* Author:
|
9 |
-
* Author URI: http://wp-pdf.com/
|
10 |
-
* License: GPL3
|
11 |
-
* Text Domain: pdf-embedder
|
12 |
-
*/
|
13 |
-
|
14 |
-
require_once( plugin_dir_path(__FILE__).'/core/core_pdf_embedder.php' );
|
15 |
-
|
16 |
-
class pdfemb_basic_pdf_embedder extends core_pdf_embedder {
|
17 |
-
|
18 |
-
protected $PLUGIN_VERSION = '4.
|
19 |
-
|
20 |
-
// Singleton
|
21 |
-
private static $instance = null;
|
22 |
-
|
23 |
-
public static function get_instance() {
|
24 |
-
if (null == self::$instance) {
|
25 |
-
self::$instance = new self;
|
26 |
-
}
|
27 |
-
return self::$instance;
|
28 |
-
}
|
29 |
-
|
30 |
-
// Basic specific
|
31 |
-
|
32 |
-
protected static $poweredby_optionname='poweredby';
|
33 |
-
|
34 |
-
public function pdfemb_activation_hook($network_wide) {
|
35 |
-
parent::pdfemb_activation_hook($network_wide);
|
36 |
-
|
37 |
-
// If installed previously, keep 'poweredby' to off since they were used to that
|
38 |
-
$old_options = get_site_option($this->get_options_name());
|
39 |
-
|
40 |
-
if (!$old_options) {
|
41 |
-
update_site_option(self::$poweredby_optionname, 'off');
|
42 |
-
}
|
43 |
-
}
|
44 |
-
|
45 |
-
public function pdfemb_wp_enqueue_scripts() {
|
46 |
-
|
47 |
-
if (!$this->useminified()) {
|
48 |
-
wp_register_script( 'pdfemb_grabtopan_js', $this->my_plugin_url().'js/grabtopan-basic.js', array('jquery'), $this->PLUGIN_VERSION);
|
49 |
-
wp_register_script( 'pdfemb_pv_core_js', $this->my_plugin_url().'js/pdfemb-pv-core.js',
|
50 |
-
array('pdfemb_grabtopan_js', 'jquery'), $this->PLUGIN_VERSION );
|
51 |
-
wp_register_script( 'pdfemb_versionspecific_pdf_js', $this->my_plugin_url().'js/pdfemb-basic.js',
|
52 |
-
array('jquery', 'pdfemb_pv_core_js'), $this->PLUGIN_VERSION);
|
53 |
-
wp_register_script( 'pdfemb_embed_pdf_js', $this->my_plugin_url().'js/pdfemb-embed-pdf.js',
|
54 |
-
array('pdfemb_pv_core_js', 'pdfemb_versionspecific_pdf_js'), $this->PLUGIN_VERSION );
|
55 |
-
}
|
56 |
-
else {
|
57 |
-
wp_register_script( 'pdfemb_embed_pdf_js', $this->my_plugin_url().'js/all-pdfemb-basic.min.js', array('jquery'),
|
58 |
-
}
|
59 |
-
|
60 |
-
wp_localize_script( 'pdfemb_embed_pdf_js', 'pdfemb_trans', $this->get_translation_array() );
|
61 |
-
|
62 |
-
wp_register_script( 'pdfemb_pdf_js', $this->my_plugin_url().'js/pdfjs/pdf'.($this->useminified() ? '.min' : '').'.js', array(), $this->PLUGIN_VERSION);
|
63 |
-
|
64 |
-
}
|
65 |
-
|
66 |
-
protected function get_extra_js_name() {
|
67 |
-
return 'basic';
|
68 |
-
}
|
69 |
-
|
70 |
-
// ADMIN
|
71 |
-
|
72 |
-
protected function pdfemb_mainsection_extra() {
|
73 |
-
?>
|
74 |
-
<br class="clear" />
|
75 |
-
<br class="clear" />
|
76 |
-
|
77 |
-
<h2><?php _e('Options only available in Premium versions', 'pdf-embedder'); ?></h2>
|
78 |
-
|
79 |
-
<label for="pdfemb_download" class="textinput"><?php esc_html_e('Download Button', 'pdf-embedder'); ?></label>
|
80 |
-
<span>
|
81 |
-
<label for="pdfemb_download" class="checkbox plain"><?php esc_html_e('Provide PDF download button on toolbar', 'pdf-embedder'); ?></label>
|
82 |
-
</span>
|
83 |
-
|
84 |
-
<br class="clear" />
|
85 |
-
|
86 |
-
<label for="pdfemb_newwindow" class="textinput"><?php esc_html_e('External Links', 'pdf-embedder'); ?></label>
|
87 |
-
<span>
|
88 |
-
<label for="pdfemb_newwindow" class="checkbox plain"><?php esc_html_e('Open links in a new browser tab/window', 'pdf-embedder'); ?></label>
|
89 |
-
</span>
|
90 |
-
|
91 |
-
|
92 |
-
<br class="clear" />
|
93 |
-
|
94 |
-
<label for="pdfemb_tracking" class="textinput"><?php esc_html_e('Track Views/Downloads', 'pdf-embedder'); ?></label>
|
95 |
-
<span>
|
96 |
-
<label for="pdfemb_tracking" class="checkbox plain"><?php esc_html_e('Count number of views and downloads', 'pdf-embedder'); ?></label>
|
97 |
-
</span>
|
98 |
-
|
99 |
-
<br class="clear" />
|
100 |
-
|
101 |
-
<label for="pdfemb_continousscroll" class="textinput"><?php esc_html_e('Continous Page Scrolling', 'pdf-embedder'); ?></label>
|
102 |
-
<span>
|
103 |
-
<label for="pdfemb_continousscroll" class="checkbox plain"><?php esc_html_e('Allow user to scroll up/down between all pages in the PDF', 'pdf-embedder'); ?></label>
|
104 |
-
</span>
|
105 |
-
|
106 |
-
<br class="clear" />
|
107 |
-
<p><?php printf(__('Find out more about <a href="%s" target="_blank">Premium Versions of the plugin on our website</a>.', 'pdf-embedder'),
|
108 |
-
'http://wp-pdf.com/premium/?utm_source=PDF%20Settings%20PremiumFindOut&utm_medium=freemium&utm_campaign=Freemium'); ?></p>
|
109 |
-
|
110 |
-
<?php
|
111 |
-
}
|
112 |
-
|
113 |
-
protected function pdfemb_mobilesection_text()
|
114 |
-
{
|
115 |
-
?>
|
116 |
-
|
117 |
-
<h2><?php esc_html_e('Mobile-friendly embedding using PDF Embedder Premium', 'pdf-embedder'); ?></h2>
|
118 |
-
<p><?php esc_html_e("This free version of the plugin should work on most mobile browsers, but it will be cumbersome for users with small screens - it is difficult to position
|
119 |
-
the document entirely within the screen, and your users' fingers may catch the entire browser page when
|
120 |
-
they're trying only to move about the document...", 'pdf-embedder'); ?></p>
|
121 |
-
|
122 |
-
<p><?php _e("Our <b>PDF Embedder Premium</b> plugin solves this problem with an intelligent 'full screen' mode.
|
123 |
-
When the document is smaller than a certain width, the document displays only as a 'thumbnail' with a large
|
124 |
-
'View in Full Screen' button for the
|
125 |
-
user to click when they want to study your document.
|
126 |
-
This opens up the document so it has the full focus of the mobile browser, and the user can move about the
|
127 |
-
document without hitting other parts of
|
128 |
-
the web page by mistake. Click Exit to return to the regular web page.", 'pdf-embedder'); ?>
|
129 |
-
</p>
|
130 |
-
|
131 |
-
<p><?php _e("The user can also touch and scroll continuously between all pages of the PDF which is much easier than clicking the next/prev buttons to navigate.", 'pdf-embedder'); ?>
|
132 |
-
</p>
|
133 |
-
|
134 |
-
<p><?php printf( __('See our website <a href="%s">wp-pdf.com</a> for more details and purchase options.', 'pdf-embedder'), 'http://wp-pdf.com/premium/?utm_source=PDF%20Settings%20Premium&utm_medium=freemium&utm_campaign=Freemium'); ?>
|
135 |
-
</p>
|
136 |
-
|
137 |
-
<?php
|
138 |
-
}
|
139 |
-
|
140 |
-
protected function options_do_sidebar() {
|
141 |
-
?><div id="pdfemb-tableright" class="pdfemb-tablecell">
|
142 |
-
<div>
|
143 |
-
<h3>Premium Versions</h3>
|
144 |
-
<p>Visit <a href="https://wp-pdf.com/?utm_source=Premium%20Sidebar&utm_medium=freemium&utm_campaign=Freemium" target="_blank">wp-pdf.com</a> for premium PDF Embedder features:</p>
|
145 |
-
<ul>
|
146 |
-
<li>Mobile Friendly</li>
|
147 |
-
<li>Continuous page scrolling</li>
|
148 |
-
<li>Download Button</li>
|
149 |
-
<li>Full screen button</li>
|
150 |
-
<li>Working Hyperlinks</li>
|
151 |
-
<li>Jump to page number</li>
|
152 |
-
<li>Track views and downloads</li>
|
153 |
-
<li>Remove link to wp-pdf.com</li>
|
154 |
-
<li><i>Secure version</i> - prevent downloads and add watermark</li>
|
155 |
-
</ul>
|
156 |
-
<p>More details and demos are <br/> on <a href="https://wp-pdf.com/?utm_source=Premium%20Sidebar&utm_medium=freemium&utm_campaign=Freemium" target="_blank">our website</a>!</p>
|
157 |
-
</div>
|
158 |
-
|
159 |
-
<div>
|
160 |
-
<h3>Thumbnails</h3>
|
161 |
-
<p>Buy our <a href="https://wp-pdf.com/thumbnails/?utm_source=Thumbnails%20Sidebar&utm_medium=freemium&utm_campaign=Freemium" target="_blank">PDF Thumbnails</a> plugin:</p>
|
162 |
-
<ul>
|
163 |
-
<li>Generates fixed image versions of PDFs</li>
|
164 |
-
<li>Use thumbnails as featured images in your posts</li>
|
165 |
-
<li>Embed thumbnails as link to full PDF</li>
|
166 |
-
<li>Easier to find your PDFs in the Media Library</li>
|
167 |
-
</ul>
|
168 |
-
<p>PDF Thumbnails is the perfect companion to any of our PDF Embedder plugins, or can be used standalone!</p>
|
169 |
-
<p>More details on <a href="https://wp-pdf.com/thumbnails/?utm_source=Thumbnails%20Sidebar&utm_medium=freemium&utm_campaign=Freemium" target="_blank">our website</a></p>
|
170 |
-
</div>
|
171 |
-
</div>
|
172 |
-
<?php
|
173 |
-
}
|
174 |
-
|
175 |
-
protected function extra_plugin_action_links( $links ) {
|
176 |
-
$secure_link = '<a href="http://wp-pdf.com/secure/?utm_source=Plugins%20Secure&utm_medium=freemium&utm_campaign=Freemium" target="_blank">Secure</a>';
|
177 |
-
$mobile_link = '<a href="http://wp-pdf.com/premium/?utm_source=Plugins%20Premium&utm_medium=freemium&utm_campaign=Freemium" target="_blank">Mobile</a>';
|
178 |
-
|
179 |
-
array_unshift( $links, $secure_link );
|
180 |
-
array_unshift( $links, $mobile_link );
|
181 |
-
|
182 |
-
return $links;
|
183 |
-
}
|
184 |
-
|
185 |
-
protected function get_translation_array() {
|
186 |
-
return array_merge(parent::get_translation_array()
|
187 |
-
// ,Array('poweredby' => get_site_option(self::$poweredby_optionname, false))
|
188 |
-
);
|
189 |
-
}
|
190 |
-
|
191 |
-
public function pdfemb_attachment_fields_to_edit($form_fields, $post) {
|
192 |
-
if ($post->post_mime_type == 'application/pdf') {
|
193 |
-
$form_fields['pdfemb-upgrade'] = array(
|
194 |
-
'input' => 'html',
|
195 |
-
'html' => sprintf(__('Track downloads and views with <a href="%s" target="_blank">PDF Embedder Premium</a>','pdf-embedder'),
|
196 |
-
'http://wp-pdf.com/premium/?utm_source=Media%20Library&utm_medium=freemium&utm_campaign=Freemium'),
|
197 |
-
'label' => __( 'Downloads/Views', 'pdf-embedder' ));
|
198 |
-
}
|
199 |
-
return $form_fields;
|
200 |
-
}
|
201 |
-
|
202 |
-
// AUX
|
203 |
-
|
204 |
-
protected function my_plugin_basename() {
|
205 |
-
$basename = plugin_basename(__FILE__);
|
206 |
-
if ('/'.$basename == __FILE__) { // Maybe due to symlink
|
207 |
-
$basename = basename(dirname(__FILE__)).'/'.basename(__FILE__);
|
208 |
-
}
|
209 |
-
return $basename;
|
210 |
-
}
|
211 |
-
|
212 |
-
protected function my_plugin_url() {
|
213 |
-
$basename = plugin_basename(__FILE__);
|
214 |
-
if ('/'.$basename == __FILE__) { // Maybe due to symlink
|
215 |
-
return plugins_url().'/'.basename(dirname(__FILE__)).'/';
|
216 |
-
}
|
217 |
-
// Normal case (non symlink)
|
218 |
-
return plugin_dir_url( __FILE__ );
|
219 |
-
}
|
220 |
-
|
221 |
-
}
|
222 |
-
|
223 |
-
// Global accessor function to singleton
|
224 |
-
function pdfembPDFEmbedder() {
|
225 |
-
return pdfemb_basic_pdf_embedder::get_instance();
|
226 |
-
}
|
227 |
-
|
228 |
-
// Initialise at least once
|
229 |
-
pdfembPDFEmbedder();
|
230 |
-
|
231 |
-
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Plugin Name: PDF Embedder
|
5 |
+
* Plugin URI: http://wp-pdf.com/
|
6 |
+
* Description: Embed PDFs straight into your posts and pages, with flexible width and height. No third-party services required. Compatible with Gutenberg Editor WordPress
|
7 |
+
* Version: 4.6.2
|
8 |
+
* Author: WP PDF Team
|
9 |
+
* Author URI: http://wp-pdf.com/
|
10 |
+
* License: GPL3
|
11 |
+
* Text Domain: pdf-embedder
|
12 |
+
*/
|
13 |
+
|
14 |
+
require_once( plugin_dir_path(__FILE__).'/core/core_pdf_embedder.php' );
|
15 |
+
|
16 |
+
class pdfemb_basic_pdf_embedder extends core_pdf_embedder {
|
17 |
+
|
18 |
+
protected $PLUGIN_VERSION = '4.6.2';
|
19 |
+
|
20 |
+
// Singleton
|
21 |
+
private static $instance = null;
|
22 |
+
|
23 |
+
public static function get_instance() {
|
24 |
+
if (null == self::$instance) {
|
25 |
+
self::$instance = new self;
|
26 |
+
}
|
27 |
+
return self::$instance;
|
28 |
+
}
|
29 |
+
|
30 |
+
// Basic specific
|
31 |
+
|
32 |
+
protected static $poweredby_optionname='poweredby';
|
33 |
+
|
34 |
+
public function pdfemb_activation_hook($network_wide) {
|
35 |
+
parent::pdfemb_activation_hook($network_wide);
|
36 |
+
|
37 |
+
// If installed previously, keep 'poweredby' to off since they were used to that
|
38 |
+
$old_options = get_site_option($this->get_options_name());
|
39 |
+
|
40 |
+
if (!$old_options) {
|
41 |
+
update_site_option(self::$poweredby_optionname, 'off');
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
public function pdfemb_wp_enqueue_scripts() {
|
46 |
+
|
47 |
+
if (!$this->useminified()) {
|
48 |
+
wp_register_script( 'pdfemb_grabtopan_js', $this->my_plugin_url().'js/grabtopan-basic-'.$this->PLUGIN_VERSION.'.js', array('jquery'), $this->PLUGIN_VERSION);
|
49 |
+
wp_register_script( 'pdfemb_pv_core_js', $this->my_plugin_url().'js/pdfemb-pv-core-'.$this->PLUGIN_VERSION.'.js',
|
50 |
+
array('pdfemb_grabtopan_js', 'jquery'), $this->PLUGIN_VERSION );
|
51 |
+
wp_register_script( 'pdfemb_versionspecific_pdf_js', $this->my_plugin_url().'js/pdfemb-basic-'.$this->PLUGIN_VERSION.'.js',
|
52 |
+
array('jquery', 'pdfemb_pv_core_js'), $this->PLUGIN_VERSION);
|
53 |
+
wp_register_script( 'pdfemb_embed_pdf_js', $this->my_plugin_url().'js/pdfemb-embed-pdf-'.$this->PLUGIN_VERSION.'.js',
|
54 |
+
array('pdfemb_pv_core_js', 'pdfemb_versionspecific_pdf_js'), $this->PLUGIN_VERSION );
|
55 |
+
}
|
56 |
+
else {
|
57 |
+
wp_register_script( 'pdfemb_embed_pdf_js', $this->my_plugin_url().'js/all-pdfemb-basic-'.$this->PLUGIN_VERSION.'.min.js', array('jquery'), false);
|
58 |
+
}
|
59 |
+
|
60 |
+
wp_localize_script( 'pdfemb_embed_pdf_js', 'pdfemb_trans', $this->get_translation_array() );
|
61 |
+
|
62 |
+
wp_register_script( 'pdfemb_pdf_js', $this->my_plugin_url().'js/pdfjs/pdf-'.$this->PLUGIN_VERSION.''.($this->useminified() ? '.min' : '').'.js', array('jquery'), $this->PLUGIN_VERSION);
|
63 |
+
|
64 |
+
}
|
65 |
+
|
66 |
+
protected function get_extra_js_name() {
|
67 |
+
return 'basic';
|
68 |
+
}
|
69 |
+
|
70 |
+
// ADMIN
|
71 |
+
|
72 |
+
protected function pdfemb_mainsection_extra() {
|
73 |
+
?>
|
74 |
+
<br class="clear" />
|
75 |
+
<br class="clear" />
|
76 |
+
|
77 |
+
<h2><?php _e('Options only available in Premium versions', 'pdf-embedder'); ?></h2>
|
78 |
+
|
79 |
+
<label for="pdfemb_download" class="textinput"><?php esc_html_e('Download Button', 'pdf-embedder'); ?></label>
|
80 |
+
<span>
|
81 |
+
<label for="pdfemb_download" class="checkbox plain"><?php esc_html_e('Provide PDF download button on toolbar', 'pdf-embedder'); ?></label>
|
82 |
+
</span>
|
83 |
+
|
84 |
+
<br class="clear" />
|
85 |
+
|
86 |
+
<label for="pdfemb_newwindow" class="textinput"><?php esc_html_e('External Links', 'pdf-embedder'); ?></label>
|
87 |
+
<span>
|
88 |
+
<label for="pdfemb_newwindow" class="checkbox plain"><?php esc_html_e('Open links in a new browser tab/window', 'pdf-embedder'); ?></label>
|
89 |
+
</span>
|
90 |
+
|
91 |
+
|
92 |
+
<br class="clear" />
|
93 |
+
|
94 |
+
<label for="pdfemb_tracking" class="textinput"><?php esc_html_e('Track Views/Downloads', 'pdf-embedder'); ?></label>
|
95 |
+
<span>
|
96 |
+
<label for="pdfemb_tracking" class="checkbox plain"><?php esc_html_e('Count number of views and downloads', 'pdf-embedder'); ?></label>
|
97 |
+
</span>
|
98 |
+
|
99 |
+
<br class="clear" />
|
100 |
+
|
101 |
+
<label for="pdfemb_continousscroll" class="textinput"><?php esc_html_e('Continous Page Scrolling', 'pdf-embedder'); ?></label>
|
102 |
+
<span>
|
103 |
+
<label for="pdfemb_continousscroll" class="checkbox plain"><?php esc_html_e('Allow user to scroll up/down between all pages in the PDF', 'pdf-embedder'); ?></label>
|
104 |
+
</span>
|
105 |
+
|
106 |
+
<br class="clear" />
|
107 |
+
<p><?php printf(__('Find out more about <a href="%s" target="_blank">Premium Versions of the plugin on our website</a>.', 'pdf-embedder'),
|
108 |
+
'http://wp-pdf.com/premium/?utm_source=PDF%20Settings%20PremiumFindOut&utm_medium=freemium&utm_campaign=Freemium'); ?></p>
|
109 |
+
|
110 |
+
<?php
|
111 |
+
}
|
112 |
+
|
113 |
+
protected function pdfemb_mobilesection_text()
|
114 |
+
{
|
115 |
+
?>
|
116 |
+
|
117 |
+
<h2><?php esc_html_e('Mobile-friendly embedding using PDF Embedder Premium', 'pdf-embedder'); ?></h2>
|
118 |
+
<p><?php esc_html_e("This free version of the plugin should work on most mobile browsers, but it will be cumbersome for users with small screens - it is difficult to position
|
119 |
+
the document entirely within the screen, and your users' fingers may catch the entire browser page when
|
120 |
+
they're trying only to move about the document...", 'pdf-embedder'); ?></p>
|
121 |
+
|
122 |
+
<p><?php _e("Our <b>PDF Embedder Premium</b> plugin solves this problem with an intelligent 'full screen' mode.
|
123 |
+
When the document is smaller than a certain width, the document displays only as a 'thumbnail' with a large
|
124 |
+
'View in Full Screen' button for the
|
125 |
+
user to click when they want to study your document.
|
126 |
+
This opens up the document so it has the full focus of the mobile browser, and the user can move about the
|
127 |
+
document without hitting other parts of
|
128 |
+
the web page by mistake. Click Exit to return to the regular web page.", 'pdf-embedder'); ?>
|
129 |
+
</p>
|
130 |
+
|
131 |
+
<p><?php _e("The user can also touch and scroll continuously between all pages of the PDF which is much easier than clicking the next/prev buttons to navigate.", 'pdf-embedder'); ?>
|
132 |
+
</p>
|
133 |
+
|
134 |
+
<p><?php printf( __('See our website <a href="%s">wp-pdf.com</a> for more details and purchase options.', 'pdf-embedder'), 'http://wp-pdf.com/premium/?utm_source=PDF%20Settings%20Premium&utm_medium=freemium&utm_campaign=Freemium'); ?>
|
135 |
+
</p>
|
136 |
+
|
137 |
+
<?php
|
138 |
+
}
|
139 |
+
|
140 |
+
protected function options_do_sidebar() {
|
141 |
+
?><div id="pdfemb-tableright" class="pdfemb-tablecell">
|
142 |
+
<div>
|
143 |
+
<h3>Premium Versions</h3>
|
144 |
+
<p>Visit <a href="https://wp-pdf.com/?utm_source=Premium%20Sidebar&utm_medium=freemium&utm_campaign=Freemium" target="_blank">wp-pdf.com</a> for premium PDF Embedder features:</p>
|
145 |
+
<ul>
|
146 |
+
<li>Mobile Friendly</li>
|
147 |
+
<li>Continuous page scrolling</li>
|
148 |
+
<li>Download Button</li>
|
149 |
+
<li>Full screen button</li>
|
150 |
+
<li>Working Hyperlinks</li>
|
151 |
+
<li>Jump to page number</li>
|
152 |
+
<li>Track views and downloads</li>
|
153 |
+
<li>Remove link to wp-pdf.com</li>
|
154 |
+
<li><i>Secure version</i> - prevent downloads and add watermark</li>
|
155 |
+
</ul>
|
156 |
+
<p>More details and demos are <br/> on <a href="https://wp-pdf.com/?utm_source=Premium%20Sidebar&utm_medium=freemium&utm_campaign=Freemium" target="_blank">our website</a>!</p>
|
157 |
+
</div>
|
158 |
+
|
159 |
+
<div>
|
160 |
+
<h3>Thumbnails</h3>
|
161 |
+
<p>Buy our <a href="https://wp-pdf.com/thumbnails/?utm_source=Thumbnails%20Sidebar&utm_medium=freemium&utm_campaign=Freemium" target="_blank">PDF Thumbnails</a> plugin:</p>
|
162 |
+
<ul>
|
163 |
+
<li>Generates fixed image versions of PDFs</li>
|
164 |
+
<li>Use thumbnails as featured images in your posts</li>
|
165 |
+
<li>Embed thumbnails as link to full PDF</li>
|
166 |
+
<li>Easier to find your PDFs in the Media Library</li>
|
167 |
+
</ul>
|
168 |
+
<p>PDF Thumbnails is the perfect companion to any of our PDF Embedder plugins, or can be used standalone!</p>
|
169 |
+
<p>More details on <a href="https://wp-pdf.com/thumbnails/?utm_source=Thumbnails%20Sidebar&utm_medium=freemium&utm_campaign=Freemium" target="_blank">our website</a></p>
|
170 |
+
</div>
|
171 |
+
</div>
|
172 |
+
<?php
|
173 |
+
}
|
174 |
+
|
175 |
+
protected function extra_plugin_action_links( $links ) {
|
176 |
+
$secure_link = '<a href="http://wp-pdf.com/secure/?utm_source=Plugins%20Secure&utm_medium=freemium&utm_campaign=Freemium" target="_blank">Secure</a>';
|
177 |
+
$mobile_link = '<a href="http://wp-pdf.com/premium/?utm_source=Plugins%20Premium&utm_medium=freemium&utm_campaign=Freemium" target="_blank">Mobile</a>';
|
178 |
+
|
179 |
+
array_unshift( $links, $secure_link );
|
180 |
+
array_unshift( $links, $mobile_link );
|
181 |
+
|
182 |
+
return $links;
|
183 |
+
}
|
184 |
+
|
185 |
+
protected function get_translation_array() {
|
186 |
+
return array_merge(parent::get_translation_array()
|
187 |
+
// ,Array('poweredby' => get_site_option(self::$poweredby_optionname, false))
|
188 |
+
);
|
189 |
+
}
|
190 |
+
|
191 |
+
public function pdfemb_attachment_fields_to_edit($form_fields, $post) {
|
192 |
+
if ($post->post_mime_type == 'application/pdf') {
|
193 |
+
$form_fields['pdfemb-upgrade'] = array(
|
194 |
+
'input' => 'html',
|
195 |
+
'html' => sprintf(__('Track downloads and views with <a href="%s" target="_blank">PDF Embedder Premium</a>','pdf-embedder'),
|
196 |
+
'http://wp-pdf.com/premium/?utm_source=Media%20Library&utm_medium=freemium&utm_campaign=Freemium'),
|
197 |
+
'label' => __( 'Downloads/Views', 'pdf-embedder' ));
|
198 |
+
}
|
199 |
+
return $form_fields;
|
200 |
+
}
|
201 |
+
|
202 |
+
// AUX
|
203 |
+
|
204 |
+
protected function my_plugin_basename() {
|
205 |
+
$basename = plugin_basename(__FILE__);
|
206 |
+
if ('/'.$basename == __FILE__) { // Maybe due to symlink
|
207 |
+
$basename = basename(dirname(__FILE__)).'/'.basename(__FILE__);
|
208 |
+
}
|
209 |
+
return $basename;
|
210 |
+
}
|
211 |
+
|
212 |
+
protected function my_plugin_url() {
|
213 |
+
$basename = plugin_basename(__FILE__);
|
214 |
+
if ('/'.$basename == __FILE__) { // Maybe due to symlink
|
215 |
+
return plugins_url().'/'.basename(dirname(__FILE__)).'/';
|
216 |
+
}
|
217 |
+
// Normal case (non symlink)
|
218 |
+
return plugin_dir_url( __FILE__ );
|
219 |
+
}
|
220 |
+
|
221 |
+
}
|
222 |
+
|
223 |
+
// Global accessor function to singleton
|
224 |
+
function pdfembPDFEmbedder() {
|
225 |
+
return pdfemb_basic_pdf_embedder::get_instance();
|
226 |
+
}
|
227 |
+
|
228 |
+
// Initialise at least once
|
229 |
+
pdfembPDFEmbedder();
|
230 |
+
|
231 |
+
?>
|
readme.txt
CHANGED
@@ -1,103 +1,103 @@
|
|
1 |
-
|
2 |
-
Contributors:
|
3 |
-
Tags: doc, pdf
|
4 |
Requires at least: 3.5
|
5 |
-
Tested up to:
|
6 |
-
Stable tag: 4.
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
10 |
-
Embed
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
Upload
|
15 |
|
16 |
-
The plugin has a unique method for embedding
|
17 |
|
18 |
-
The
|
19 |
|
20 |
-
|
21 |
|
22 |
-
|
23 |
|
24 |
-
|
25 |
-
|
|
|
26 |
|
27 |
|
28 |
= Usage =
|
29 |
|
30 |
-
Once installed and Activated, click Add Media from any page or post, just like adding an image, but drag and drop a PDF file instead.
|
31 |
|
32 |
-
When you insert into your post, it will appear in the editor as a 'shortcode' as follows:
|
33 |
|
34 |
-
[pdf-embedder url='https://mysite.com/wp-content/uploads/2015/01/Plan-Summary.pdf']
|
35 |
|
36 |
-
You can change the default appearance - e.g. width, and toolbar position/appearance through **Settings -> PDF Embedder**.
|
37 |
|
38 |
To override your site-wide defaults on an individual embed, see the [Plugin Instructions](http://wp-pdf.com/free-instructions/?utm_source=PDF%20Readme%20Instructions&utm_medium=freemium&utm_campaign=Freemium) for information about sizing options plus other ways to customize the shortcodes.
|
39 |
|
40 |
-
=
|
41 |
|
42 |
-
Features available in the Premium versions:
|
43 |
|
44 |
-
*
|
45 |
-
*
|
46 |
-
*
|
47 |
-
*
|
48 |
-
*
|
49 |
-
*
|
50 |
-
*
|
51 |
-
*
|
52 |
-
*
|
53 |
|
54 |
**See [wp-pdf.com](http://wp-pdf.com/?utm_source=PDF%20Readme%20Box&utm_medium=freemium&utm_campaign=Freemium) for details!**
|
55 |
|
56 |
= Mobile-friendly embedding using PDF Embedder Premium =
|
57 |
|
58 |
-
The free version
|
59 |
|
60 |
-
Our **PDF Embedder Premium** plugin solves this problem with an intelligent 'full screen' mode.
|
61 |
-
|
62 |
-
|
63 |
|
64 |
-
|
65 |
|
66 |
-
|
67 |
|
68 |
-
|
69 |
|
70 |
-
|
71 |
-
|
|
|
72 |
|
73 |
This means that your PDF is unlikely to be shared outside your site where you have no control over who views, prints, or shares it.
|
74 |
|
75 |
-
Optionally add a watermark containing the user's name or email address to discourage sharing of screenshots.
|
76 |
|
77 |
-
See our
|
78 |
|
79 |
= PDF Thumbnails =
|
80 |
|
81 |
-
Our **PDF Thumbnails** plugin
|
82 |
|
83 |
You can use them as featured images in posts containing an embedded version of the PDF, or as a visual clickable link to download the PDF directly.
|
84 |
It also displays the thumbnail as the ‘icon’ for the PDF in the Media Library, making it easy for authors to locate the PDFs they need to insert in a post.
|
85 |
|
86 |
-
See our
|
87 |
|
88 |
|
89 |
= Now translation-ready! =
|
90 |
|
91 |
Please contribute your translations.
|
92 |
|
93 |
-
Persian translation by Mostafa Safarian i of [سئو](http://www.greenseo.ir/)
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
Spanish translation by Armando Landois of [LANDOIS Diseño](https://landois.com/)
|
98 |
|
99 |
|
100 |
-
With thanks to the Mozilla team for developing the underlying [pdf.js](https://github.com/mozilla/pdf.js) technology used by this plugin.
|
101 |
|
102 |
== Screenshots ==
|
103 |
|
@@ -134,7 +134,7 @@ The Next/Prev toolbar can appear at the top or bottom of the document (or both),
|
|
134 |
|
135 |
See the [Plugin Instructions](http://wp-pdf.com/free-instructions/?utm_source=PDF%20Readme%20FAQ&utm_medium=freemium&utm_campaign=Freemium) for more details about sizing and toolbar options.
|
136 |
|
137 |
-
= Premium feature list =
|
138 |
|
139 |
Features available in the premium versions of the plugin:
|
140 |
|
@@ -162,7 +162,7 @@ See our website [wp-pdf.com](http://wp-pdf.com/premium/?utm_source=PDF%20Readme%
|
|
162 |
|
163 |
= Can I protect my PDFs so they are difficult for viewers to download directly? =
|
164 |
|
165 |
-
Not with the free or (regular) premium versions - it is relatively easy to find the link to download the file directly.
|
166 |
|
167 |
A **secure premium** version is available that encrypts the PDF during transmission, so it is difficult for a casual user to save or print the file for use outside your site.
|
168 |
|
@@ -170,7 +170,7 @@ See our website [wp-pdf.com](http://wp-pdf.com/secure/?utm_source=PDF%20Readme%2
|
|
170 |
|
171 |
= Can I add a Download button to the toolbar? =
|
172 |
|
173 |
-
This is possible only in the Premium version. As a workaround in the free version, you could add a direct link to the PDF beneath the embedded version.
|
174 |
|
175 |
To do this, copy the URL from the pdf-embedder shortcode and insert it into a link using HTML such as this:
|
176 |
<a href="(url of PDF)">Download Here</a>
|
@@ -184,7 +184,7 @@ The Premium versions allow functioning hyperlinks - both internal links within t
|
|
184 |
The easiest way is to upgrade to our Premium version, but if you know how to add entries to your database then you can add a line to the wp_options table
|
185 |
with option_name 'pdfemb_poweredby' and option_value '1'.
|
186 |
|
187 |
-
For more information on Premium versions visit [wp-pdf.com](http://wp-pdf.com/?utm_source=PDF%20Readme%20FAQ%20Bottom&utm_medium=freemium&utm_campaign=Freemium).
|
188 |
|
189 |
== Installation ==
|
190 |
|
@@ -203,6 +203,23 @@ the Plugins section of your Wordpress admin
|
|
203 |
|
204 |
== Changelog ==
|
205 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
= 4.5 =
|
207 |
|
208 |
Added compatibility for Wordpress 5.3
|
1 |
+
=== PDF Embedder ===
|
2 |
+
Contributors: lionsher, nathansingh, chrisakelley
|
3 |
+
Tags: doc, pdf viewer, office, embed, document, intranet
|
4 |
Requires at least: 3.5
|
5 |
+
Tested up to: 6.0.0
|
6 |
+
Stable tag: 4.6.2
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
10 |
+
Embed PDF files directly into your posts and pages, with intelligent responsive resizing, and no third-party services or iframes.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
Upload PDF files and embed them directly into your site's posts and pages. It works as simple as adding images! Your PDF files will be automatically sized to their natural size and shape. You can also specify a width and the correct height will be calculated automatically. Our PDF Embedder plugin is fully responsive, so the embedded PDF will also look perfect, on any device. Additionally, the pdf embedder will automatically resize whenever the browser dimensions change.
|
15 |
|
16 |
+
The plugin has a unique method for embedding PDF files, using Javascript only, and _not_ iframes or third-party services. This offers immense flexibility over the appearance of your document.
|
17 |
|
18 |
+
The PDF viewer has Next and Previous buttons to navigate the document, and zoom buttons if some areas of a PDF file are too small for your screen.
|
19 |
|
20 |
+
Your PDF files are embedded within your existing WordPress pages so we have full control over appearance, and all Javascript and other files are served by your own server (not by Google or any other third-party who may not be able to guarantee their own reliability). This means your PDF files will load fast, without any speed penalty.
|
21 |
|
22 |
+
Other PDF embedder plugins insert the PDF into an 'iframe' which means they do not get the flexibility over sizing. Ours does not and that is a incredible benefit to the overall viewing experience across all devices.
|
23 |
|
24 |
+
In the free plugin, there is no button for users to download the PDF, but download options are available in the Premium versions along with other awesome features.
|
25 |
+
|
26 |
+
Another Premium feature are Hyperlinks in your PDF being clickable. Links in the free plugin cannot be clicked.
|
27 |
|
28 |
|
29 |
= Usage =
|
30 |
|
31 |
+
1. Once installed and Activated, click Add Media from any page or post, just like adding an image, but drag and drop a PDF file instead.
|
32 |
|
33 |
+
1. When you insert into your post, it will appear in the editor as a 'shortcode' as follows:
|
34 |
|
35 |
+
1. [pdf-embedder url='https://mysite.com/wp-content/uploads/2015/01/Plan-Summary.pdf']
|
36 |
|
37 |
+
1. You can change the default appearance - e.g. width, and toolbar position/appearance through **Settings -> PDF Embedder**.
|
38 |
|
39 |
To override your site-wide defaults on an individual embed, see the [Plugin Instructions](http://wp-pdf.com/free-instructions/?utm_source=PDF%20Readme%20Instructions&utm_medium=freemium&utm_campaign=Freemium) for information about sizing options plus other ways to customize the shortcodes.
|
40 |
|
41 |
+
= Premium Features =
|
42 |
|
43 |
+
Features available in the PDF Embedder Premium versions:
|
44 |
|
45 |
+
* Download button in the toolbar
|
46 |
+
* Continuous scroll between pages
|
47 |
+
* Hyperlinks are fully functional
|
48 |
+
* Full screen mode
|
49 |
+
* Edit page number to jump straight to page
|
50 |
+
* Track number of downloads and views
|
51 |
+
* Mobile-friendly
|
52 |
+
* Secure option - difficult to download original PDF
|
53 |
+
* Removes wp-pdf.com branding
|
54 |
|
55 |
**See [wp-pdf.com](http://wp-pdf.com/?utm_source=PDF%20Readme%20Box&utm_medium=freemium&utm_campaign=Freemium) for details!**
|
56 |
|
57 |
= Mobile-friendly embedding using PDF Embedder Premium =
|
58 |
|
59 |
+
The free version will work on most mobile browsers, but cannot position the document entirely within the screen.
|
60 |
|
61 |
+
Our **PDF Embedder Premium** plugin solves this problem with an intelligent 'full screen' mode.
|
62 |
+
|
63 |
+
When the document is smaller than a certain width, the document displays only as a 'thumbnail' with a large 'View in Full Screen' button for the user to click when they want to study your document.
|
64 |
|
65 |
+
This opens up the document so it has the full focus of the mobile browser, and the user can move about the document without hitting other parts of the web page by mistake. Viewers can then Click Exit to return to the regular page.
|
66 |
|
67 |
+
The user can also swipe continuously between all pages of the PDF which is more natural than clicking the navigation buttons to navigate.
|
68 |
|
69 |
+
See our site [wp-pdf.com](http://wp-pdf.com/premium/?utm_source=PDF%20Readme%20Premium&utm_medium=freemium&utm_campaign=Freemium) for more details and purchase options.
|
70 |
|
71 |
+
= Protect your PDFs with our secure premium pdf embedder version =
|
72 |
+
|
73 |
+
Our **PDF Embedder Premium Secure** plugin provides the same simple but elegant viewer as the premium version, with the added protection that it is difficult for users to download or print the original PDF document.
|
74 |
|
75 |
This means that your PDF is unlikely to be shared outside your site where you have no control over who views, prints, or shares it.
|
76 |
|
77 |
+
Optionally, add a watermark containing the user's name or email address to discourage sharing of screenshots.
|
78 |
|
79 |
+
See our site [wp-pdf.com](http://wp-pdf.com/secure/?utm_source=PDF%20Readme%20Secure&utm_medium=freemium&utm_campaign=Freemium) for more details and purchase options.
|
80 |
|
81 |
= PDF Thumbnails =
|
82 |
|
83 |
+
Our **PDF Thumbnails** plugin automatically generates fixed image versions of all PDF files in your Media Library, to use on your site as you wish.
|
84 |
|
85 |
You can use them as featured images in posts containing an embedded version of the PDF, or as a visual clickable link to download the PDF directly.
|
86 |
It also displays the thumbnail as the ‘icon’ for the PDF in the Media Library, making it easy for authors to locate the PDFs they need to insert in a post.
|
87 |
|
88 |
+
See our site [wp-pdf.com/thumbnails/](http://wp-pdf.com/thumbnails/?utm_source=PDF%20Readme%20Thumbnails&utm_medium=freemium&utm_campaign=Freemium) for more details and purchase options.
|
89 |
|
90 |
|
91 |
= Now translation-ready! =
|
92 |
|
93 |
Please contribute your translations.
|
94 |
|
95 |
+
* Persian translation by Mostafa Safarian i of [سئو](http://www.greenseo.ir/)
|
96 |
+
* French translation by Thierry Gaillou of [JDFitForme](http://www.jdfitforme.fr/)
|
97 |
+
* Spanish translation by Armando Landois of [LANDOIS Diseño](https://landois.com/)
|
|
|
|
|
98 |
|
99 |
|
100 |
+
With thanks to the Mozilla team for developing the underlying [pdf.js](https://github.com/mozilla/pdf.js) technology used by this pdf embedder plugin.
|
101 |
|
102 |
== Screenshots ==
|
103 |
|
134 |
|
135 |
See the [Plugin Instructions](http://wp-pdf.com/free-instructions/?utm_source=PDF%20Readme%20FAQ&utm_medium=freemium&utm_campaign=Freemium) for more details about sizing and toolbar options.
|
136 |
|
137 |
+
= PDF Embedder Premium feature list =
|
138 |
|
139 |
Features available in the premium versions of the plugin:
|
140 |
|
162 |
|
163 |
= Can I protect my PDFs so they are difficult for viewers to download directly? =
|
164 |
|
165 |
+
Not with the free or (regular) pdf embedder premium versions - it is relatively easy to find the link to download the file directly.
|
166 |
|
167 |
A **secure premium** version is available that encrypts the PDF during transmission, so it is difficult for a casual user to save or print the file for use outside your site.
|
168 |
|
170 |
|
171 |
= Can I add a Download button to the toolbar? =
|
172 |
|
173 |
+
This is possible only in the PDF Embedder Premium version. As a workaround in the free version, you could add a direct link to the PDF beneath the embedded version.
|
174 |
|
175 |
To do this, copy the URL from the pdf-embedder shortcode and insert it into a link using HTML such as this:
|
176 |
<a href="(url of PDF)">Download Here</a>
|
184 |
The easiest way is to upgrade to our Premium version, but if you know how to add entries to your database then you can add a line to the wp_options table
|
185 |
with option_name 'pdfemb_poweredby' and option_value '1'.
|
186 |
|
187 |
+
For more information on PDF Embedder Premium versions visit [wp-pdf.com](http://wp-pdf.com/?utm_source=PDF%20Readme%20FAQ%20Bottom&utm_medium=freemium&utm_campaign=Freemium).
|
188 |
|
189 |
== Installation ==
|
190 |
|
203 |
|
204 |
== Changelog ==
|
205 |
|
206 |
+
= 4.6.2 =
|
207 |
+
|
208 |
+
Added support for Italian language
|
209 |
+
Security & Bug fixes
|
210 |
+
Updated compatibility for Wordpress 5.7
|
211 |
+
|
212 |
+
= 4.6.1 =
|
213 |
+
|
214 |
+
PDF Zoom increase upto 800%
|
215 |
+
Added compatibility for Wordpress 5.7
|
216 |
+
|
217 |
+
= 4.6 =
|
218 |
+
|
219 |
+
Fix language compatibility issue in viewer
|
220 |
+
Fixes js and css files cache issue
|
221 |
+
Added compatibility for Wordpress 5.3.2
|
222 |
+
|
223 |
= 4.5 =
|
224 |
|
225 |
Added compatibility for Wordpress 5.3
|