parser_x.js 1.0.76 → 1.0.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/parser_x.js CHANGED
@@ -1,5 +1,5 @@
1
- !function(A,I){"object"==typeof exports&&"object"==typeof module?module.exports=I(require("axios")):"function"==typeof define&&define.amd?define(["axios"],I):"object"==typeof exports?exports.parser_x=I(require("axios")):A.parser_x=I(A.axios)}(window,(function(A){return function(A){var I={};function g(B){if(I[B])return I[B].exports;var C=I[B]={i:B,l:!1,exports:{}};return A[B].call(C.exports,C,C.exports,g),C.l=!0,C.exports}return g.m=A,g.c=I,g.d=function(A,I,B){g.o(A,I)||Object.defineProperty(A,I,{enumerable:!0,get:B})},g.r=function(A){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})},g.t=function(A,I){if(1&I&&(A=g(A)),8&I)return A;if(4&I&&"object"==typeof A&&A&&A.__esModule)return A;var B=Object.create(null);if(g.r(B),Object.defineProperty(B,"default",{enumerable:!0,value:A}),2&I&&"string"!=typeof A)for(var C in A)g.d(B,C,function(I){return A[I]}.bind(null,C));return B},g.n=function(A){var I=A&&A.__esModule?function(){return A.default}:function(){return A};return g.d(I,"a",I),I},g.o=function(A,I){return Object.prototype.hasOwnProperty.call(A,I)},g.p="",g(g.s=0)}([function(A,I,g){"use strict";g.r(I),g.d(I,"OFDPrintApi",(function(){return V})),g.d(I,"ajaxUtils",(function(){return j})),g.d(I,"hashOfdDocument",(function(){return O})),g.d(I,"parseOfdDocument",(function(){return P})),g.d(I,"parseOfdDocumentFromBase64",(function(){return _})),g.d(I,"getOFDPageCount",(function(){return $})),g.d(I,"getAllAttachments",(function(){return AA})),g.d(I,"getAttachmentById",(function(){return IA})),g.d(I,"getAttachmentArrayBuffer",(function(){return gA})),g.d(I,"pageSize",(function(){return BA})),g.d(I,"getCustomTag",(function(){return CA})),g.d(I,"getTextObjects",(function(){return QA})),g.d(I,"renderOfd",(function(){return EA})),g.d(I,"renderOfdByIndex",(function(){return iA})),g.d(I,"getFileStream",(function(){return DA})),g.d(I,"openMetaBaseViewer",(function(){return tA})),g.d(I,"openOFDBaseViewer",(function(){return hA})),g.d(I,"openOFDBaseViewerByBase64",(function(){return wA})),g.d(I,"verifySignature",(function(){return sA})),g.d(I,"getEventBus",(function(){return aA})),g.d(I,"initOFDViewer",(function(){return eA})),g.d(I,"openOFDViewer",(function(){return cA})),g.d(I,"openFile",(function(){return GA})),g.d(I,"openOFD",(function(){return yA}));var B=g(1),C=g.n(B),Q=g(2),E=g.n(Q),i=g(3),o=g.n(i),D=g(4),t=g.n(D),h=g(7),w=g(10),s=g(18),a=g(36),e=g(37),c=g(38),G=g(39),y=g(40),F=g(41),n=g(42),R=g(44),r=g(33),N=g(45),M=g(30),U=g(28),S=g(34),k=g(46),Y=g(47),d=g.n(Y),H=g(256),K=g(257),J=g(258),L=g(259),l=g(29),f=g(260),u=g.n(f),p=g(261),m=g.n(p),b=g(262),Z=g.n(b),q=g(285);function W(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return x(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return x(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function x(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var V=N.Print_api,v=window.Module,X=g(263),T={ofdCore:null,viewer:null,eventBus:null,waterText:null,fileName:null,ofdRender:null},j=m.a,O=function(A){if(A.ofd instanceof File){var I=new FileReader;I.readAsArrayBuffer(A.ofd),I.onload=function(){A.success&&A.success(Object(M.JSBase64ByHashFile)(I.result,A.list,A.method))}}else A.ofd instanceof ArrayBuffer?A.success&&A.success(Object(M.JSBase64ByHashFile)(A.ofd,A.list,A.method)):u()({url:A.ofd,method:"GET",responseType:"arraybuffer",headers:A.headers}).then((function(I){var g=Object(M.readOFD)(I.data,A.secret,A.digest);z(g,A)})).catch((function(I){A.fail&&A.fail(I)}))},z=function(A,I){0===A.code?(T.ofdCore=new r.Ofd_Core(A.data.ofd,A.data.ofdParserPtr),I.waterText&&(T.waterText=I.waterText),I.digest||(T.waterText="demotest"),I.signatureClickCallback&&(T.eventBus=new w.EventBus,T.eventBus._on("signatureclick",I.signatureClickCallback)),I.signaturesCallback&&I.signaturesCallback(T.ofdCore.getAllSignature(0)),I.success&&I.success(T.ofdCore)):I.fail&&I.fail(A.msg)},P=function(A){oA((function(){if(T.ofdCore&&(Object(M.freeOFD)(T.ofdCore),T.ofdCore=null,T.ofdRender=null),Object(M.CreateLibrary)(),A.ofd instanceof File){var I=new FileReader;I.readAsArrayBuffer(A.ofd),I.onload=function(){var g=Object(M.readOFD)(I.result,A.secret,A.digest);z(g,A)}}else if(A.ofd instanceof ArrayBuffer){var g=Object(M.readOFD)(A.ofd,A.secret,A.digest);z(g,A)}else u()({url:A.ofd,method:"GET",responseType:"arraybuffer",headers:A.headers}).then((function(I){if(A.ofd&&A.ofd.split("/")){var g=A.ofd.split("/");T.fileName=g[g.length-1]}var B=Object(M.readOFD)(I.data,A.secret,A.digest);z(B,A)})).catch((function(I){A.fail&&A.fail(I)}))}))},_=function(A){oA((function(){T.ofdCore&&(Object(M.freeOFD)(T.ofdCore),T.ofdCore=null),Object(M.CreateLibrary)();var I=Object(M.readOFDByBase64)(A.ofd,A.secret,A.digest);z(I,A)}))},$=function(A){return T.ofdCore.getOFDPageCount(A)},AA=function(A){return T.ofdCore.getAllAttachment(A)},IA=function(A,I){return T.ofdCore.getAttachmentByID(A,I)},gA=function(A,I){return new Promise((function(g,B){var C=T.ofdCore.getAttachmentByID(A,I);C?TA(C.FileLocAbs).then((function(A){g(A)})).catch((function(A){B(A)})):B("attachmentId error")}))},BA=function(A,I,g){var B=96;g&&(B=g/T.ofdCore.pageWidth(A,I)*25.4);var C=new S.Ofd_Core_Helper(B);return{width:T.ofdCore.pageWidth(A,I),height:T.ofdCore.pageHeight(A,I),renderWidth:C.pageRenderWidth(A,I,T.ofdCore),renderHeight:C.pageRenderHeight(A,I,T.ofdCore)}},CA=function(A){return T.ofdCore.getCustomTag(A)},QA=function(A){return T.ofdCore.getAllTextObject(A)},EA=function(){var A=o()(t.a.mark((function A(I,g){var B,C,Q,E,i,o,D,h,w,s=arguments;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(B=s.length>2&&void 0!==s[2]?s[2]:{},C=96,g&&"number"==typeof g&&!isNaN(g)&&(C=g/T.ofdCore.pageWidth(I,0)*25.4),Q=new S.Ofd_Core_Helper(C),B.waterText?Q.setWaterText(B.waterText):T.waterText&&Q.setWaterText(T.waterText),T.ofdRender||(T.ofdRender=new U.Ofd_Render(T.ofdCore,Q)),B.mixBlendMode&&T.ofdRender.setMixBlendMode(B.mixBlendMode),E=[],T.ofdCore.readOfdDocument(I)){A.next=11;break}return A.abrupt("return",E);case 11:i=T.ofdCore.getOFDPageCount(I),B.frontPages>0&&B.frontPages<i&&(i=B.frontPages),o=0;case 14:if(!(o<i)){A.next=25;break}return D=document.createElement("div"),h=Q.pageRenderWidth(0,o,T.ofdCore),w=Q.pageRenderHeight(0,o,T.ofdCore),D.setAttribute("style","margin-bottom: 20px;position: relative;width:".concat(h,"px;height:").concat(w,"px;background: white;overflow: hidden")),A.next=21,T.ofdRender.renderPage(D,0,o);case 21:E.push(D);case 22:o++,A.next=14;break;case 25:return A.abrupt("return",E);case 26:case"end":return A.stop()}}),A)})));return function(I,g){return A.apply(this,arguments)}}(),iA=function(){var A=o()(t.a.mark((function A(I,g,B){var C,Q,E,i,o,D,h=arguments;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return C=h.length>3&&void 0!==h[3]?h[3]:{},Q=96,B&&"number"==typeof B&&!isNaN(B)&&(Q=B/T.ofdCore.pageWidth(I,g)*25.4),E=new S.Ofd_Core_Helper(Q),C.waterText?E.setWaterText(C.waterText):T.waterText&&E.setWaterText(T.waterText),T.ofdRender||(T.ofdRender=new U.Ofd_Render(T.ofdCore,E)),C.mixBlendMode&&T.ofdRender.setMixBlendMode(C.mixBlendMode),i=document.createElement("div"),o=E.pageRenderWidth(0,g,T.ofdCore),D=E.pageRenderHeight(0,g,T.ofdCore),i.setAttribute("style","position: relative;width:".concat(o,"px;height:").concat(D,"px;overflow: hidden")),A.next=13,T.ofdRender.renderPage(i,0,g);case 13:return A.abrupt("return",i);case 14:case"end":return A.stop()}}),A)})));return function(I,g,B){return A.apply(this,arguments)}}(),oA=function(A){v?(Object(M.setYYDS)(v),A&&A()):(Object(M.needInitAgain)()||A&&(A(),A=null),d()({locateFile:function(){return H.wsdsb}}).then((function(I){Object(M.setYYDS)(I),A&&A()})))},DA=function(){return Object(M.getStreamData)()},tA=function(A){if(A.loadingContainer){if(A.container)for(;A.container.firstChild;)A.container.removeChild(A.container.firstChild);A.container.appendChild(A.loadingContainer)}T.ofdCore&&(T.eventBus=new w.EventBus,T.eventBus._on("pageFinishRender",A.pageFinishRenderCallback),new L.OfdBaseViewer(A.container,A.width,T.eventBus,T.waterText).setOfdCore(T.ofdCore))},hA=function(A){setTimeout((function(){if(A.loadingContainer){if(A.container)for(;A.container.firstChild;)A.container.removeChild(A.container.firstChild);A.container.appendChild(A.loadingContainer)}P({ofd:A.ofd,secret:A.secret,digest:A.digest,headers:A.headers,signatureClickCallback:A.signatureClickCallback,signaturesCallback:A.signaturesCallback,waterText:A.waterText,success:function(I){A.parserOFDSuccess&&A.parserOFDSuccess(I.ofd),new L.OfdBaseViewer(A.container,A.width,T.eventBus,T.waterText).setOfdCore(I),A.renderOFDCallback&&A.renderOFDCallback()},fail:function(I){if(A.parserOFDFail&&A.parserOFDFail(I),A.container)for(;A.container.firstChild;)A.container.removeChild(A.container.firstChild);var g=document.createElement("div");g.classList.add("error"),g.textContent=I,A.container.appendChild(g)}})}),200)},wA=function(A){if(A.loadingContainer){if(A.container)for(;A.container.firstChild;)A.container.removeChild(A.container.firstChild);A.container.appendChild(A.loadingContainer)}_({ofd:A.ofd,secret:A.secret,digest:A.digest,signatureClickCallback:A.signatureClickCallback,signaturesCallback:A.signaturesCallback,waterText:A.waterText,success:function(I){A.parserOFDSuccess&&A.parserOFDSuccess(I.ofd),new L.OfdBaseViewer(A.container,A.width,T.eventBus,T.waterText).setOfdCore(I)},fail:function(I){if(A.parserOFDFail&&A.parserOFDFail(I),A.container)for(;A.container.firstChild;)A.container.removeChild(A.container.firstChild);var g=document.createElement("div");g.textContent=I,A.container.appendChild(g)}})},sA=function(A){var I=T.ofdCore.findSignature(0,A.pageRef,A.signatureId),g={signer:I.SignCert.subject,provider:I.SignedInfo.Provider.ProviderName,hashedValue:I.HashHex,HashValid:I.HashValid,signedValue:I.signatureHex,signMethod:I.SignedInfo.SignatureMethod,signVersion:I.SignedInfo.Seal.esVersion,signatureVerify:I.SignatureValid,sealID:I.SignedInfo.Seal.esID,sealName:I.SignedInfo.Seal.Property.name,sealType:I.SignedInfo.Seal.Property.type,sealAuthTime:"".concat(I.SignedInfo.Seal.Property.validStart," 至 ").concat(I.SignedInfo.Seal.Property.validEnd),sealMakeTime:I.SignedInfo.Seal.Property.createDate,sealVersion:I.SignedInfo.Seal.Header.version};A.signatureCallback&&A.signatureCallback(g),setTimeout((function(){var g,B="",C=W(I.SignedInfo.References);try{for(C.s();!(g=C.n()).done;){var Q=g.value;B+="".concat(Object(l.replaceFirstSlash)(Q.FileRef),"|")}}catch(A){C.e(A)}finally{C.f()}var E,i=Object(M.hashPath)(T.ofdCore.ofdParserPtr,B,I.SignedInfo.ReferencesCheckMethod.toLowerCase()),o=!0,D=W(I.SignedInfo.References);try{for(D.s();!(E=D.n()).done;){var t=E.value,h=t.CheckValue,w=i["".concat(Object(l.replaceFirstSlash)(t.FileRef))];o&=h===w}}catch(A){D.e(A)}finally{D.f()}A.hashFileCallback&&A.hashFileCallback(1===o)}),200)},aA=function(){return T.viewer.eventBus},eA=function(A){cA(A)},cA=function(A){var I;T.viewer&&((I=T.viewer.eventBus)._off("resize",rA),I._off("fileinputchange",NA),I._off("openfile",nA),I._off("nextpage",SA),I._off("previouspage",kA),I._off("pagenumberchanged",YA),I._off("pagechanging",dA),I._off("print",HA),I._off("firstpage",MA),I._off("lastpage",UA),I._off("zoomin",KA),I._off("zoomout",JA),I._off("scalechanging",LA),I._off("scalechanged",fA),I._off("viewportchanging",lA),I._off("switchspreadmode",uA),I._off("scrollmodechanged",pA),I._off("switchscrollmode",mA),I._off("rotatecw",bA),I._off("rotateccw",ZA),I._off("documentproperties",qA),I._off("signatureclick",xA),I._off("attachmentclick",VA),I._off("customtagclick",XA),I._off("download",RA),I._off("pageViewerClick",vA)),T.viewer=new FA(A)},GA=function(A){yA(A)},yA=function(A){T.viewer&&(A?(T.viewer.config.openFileTip&&(T.viewer.config.openFileTip.hidden=!0),T.viewer.ofdViewer.freeDocument(),T.viewer.config.loadingContainer&&T.viewer.ofdViewer.viewer.appendChild(T.viewer.config.loadingContainer),P({ofd:A,secret:T.viewer.config.secret,digest:T.viewer.config.digest,waterText:T.viewer.config.waterText,success:function(A){T.viewer.config.parserOFDSuccess&&T.viewer.config.parserOFDSuccess(A.ofd),T.ofdCore=A,T.viewer.ofdViewer.setWaterText(T.waterText),T.viewer.ofdViewer.setOfdCore(A),T.viewer.ofdThumbnailViewer&&T.viewer.ofdThumbnailViewer.setOfdCore(A),T.viewer.ofdSignatureViewer.setOfdCore(A,T.viewer.config.signatureViewerForceCheck),T.viewer.ofdAttachmentViewer.setOfdCore(A),T.viewer.ofdCustomTagViewer.setOfdCore(A),T.viewer.toolbar.setPagesCount(A.getOFDPageCount(0),!1),T.viewer.secondaryToolbar.setPagesCount(A.getOFDPageCount(0)),T.viewer.config.sidebarForceOpen&&A.getSignatureCount(0)>0&&setTimeout((function(){T.viewer.pdfSidebar.open()}),500)},fail:function(A){T.viewer.config.parserOFDFail&&T.viewer.config.parserOFDFail(A),T.viewer.ofdViewer.freeDocument(),T.viewer.config.errorWrapper.moreInfoButton.hidden=!0,T.viewer.config.errorWrapper.container.hidden=!1,T.viewer.config.errorWrapper.errorMessage.textContent=A}})):T.viewer.config.parserOFDFail&&T.viewer.config.parserOFDFail("file undefined"))},FA=C()((function A(I){var g=this;E()(this,A),this.config=I,this.l10n=new h.GenericL10n("zh-CN"),this.eventBus=new w.EventBus,this.ofdViewer=new s.OfdViewer(I.mainContainer,I.viewerContainer,this.eventBus,I.mixBlendMode),I.sidebar.thumbnailView&&(this.ofdThumbnailViewer=new a.OfdThumbnailViewer(I.sidebar.thumbnailView,this.eventBus)),this.ofdSignatureViewer=new K.OfdSignatureViewer(I.sidebar.signaturesView,this.eventBus),this.ofdAttachmentViewer=new J.OfdAttachmentViewer(I.sidebar.attachmentsView,this.eventBus),this.ofdCustomTagViewer=new q.OfdCustomTagViewer(I.sidebar.outlineView,this.eventBus),this.pdfSidebar=new e.PDFSidebar({elements:I.sidebar,ofdViewer:this.ofdViewer,ofdThumbnailViewer:this.ofdThumbnailViewer,eventBus:this.eventBus,l10n:this.l10n}),this.overlayManager=new c.OverlayManager,I.signatureProperties&&(this.signatureProperties=new k.OFDSignatureProperties(I.signatureProperties,this.overlayManager,this.eventBus,this.l10n)),this.ofdDocumentProperties=new G.PDFDocumentProperties(I.documentProperties,this.overlayManager,this.eventBus,this.l10n),this.toolbar=new y.Toolbar(I.toolbar,this.eventBus,this.l10n),this.secondaryToolbar=new F.SecondaryToolbar(I.secondaryToolbar,I.mainContainer,this.eventBus);var B=document.createElement("input");B.id="fileInput",B.className="fileInput",B.setAttribute("type","file"),B.setAttribute("accept",".ofd"),document.body.appendChild(B);var C=this;B.addEventListener("change",(function(A){var I=A.target.files;I&&0!==I.length&&C.eventBus.dispatch("fileinputchange",{source:this,fileInput:A.target,eventBus:C.eventBus})})),new n.PDFCursorTools({container:I.mainContainer,eventBus:this.eventBus}),this.ofdPrint=new R.Print(document.getElementById("printServiceDialog"),this.overlayManager,this.l10n);var Q=I.appContainer||document.documentElement;this.l10n.translate(Q).then((function(){g.eventBus.dispatch("localized",{})})),this.eventBus._on("resize",rA),this.eventBus._on("fileinputchange",NA),this.eventBus._on("openfile",nA),this.eventBus._on("nextpage",SA),this.eventBus._on("previouspage",kA),this.eventBus._on("pagenumberchanged",YA),this.eventBus._on("pagechanging",dA),this.eventBus._on("print",HA),this.eventBus._on("firstpage",MA),this.eventBus._on("lastpage",UA),this.eventBus._on("zoomin",KA),this.eventBus._on("zoomout",JA),this.eventBus._on("scalechanging",LA),this.eventBus._on("viewportchanging",lA),this.eventBus._on("scalechanged",fA),this.eventBus._on("switchspreadmode",uA),this.eventBus._on("scrollmodechanged",pA),this.eventBus._on("switchscrollmode",mA),this.eventBus._on("rotatecw",bA),this.eventBus._on("rotateccw",ZA),this.eventBus._on("documentproperties",qA),this.eventBus._on("signatureclick",xA),this.eventBus._on("attachmentclick",VA),this.eventBus._on("customtagclick",XA),this.eventBus._on("download",RA),this.eventBus._on("pageViewerClick",vA),window.addEventListener("click",WA),window.addEventListener("resize",(function(){g.eventBus.dispatch("resize",{source:window})})),I.errorWrapper.closeButton.onclick=function(){I.errorWrapper.container.hidden=!0},I.toolbar.presentationModeButton&&(I.toolbar.presentationModeButton.hidden=!0),I.toolbar.viewBookmark&&(I.toolbar.viewBookmark.hidden=!0),I.secondaryToolbar.presentationModeButton&&(I.secondaryToolbar.presentationModeButton.hidden=!0),I.secondaryToolbar.viewBookmarkButton&&(I.secondaryToolbar.viewBookmarkButton.hidden=!0),I.secondaryToolbar.viewBookmarkButton&&(I.secondaryToolbar.viewBookmarkButton.hidden=!0);var i=document.getElementById("printServiceDialog");"function"!=typeof i.showModal&&(i&&(i.hidden=!0),I.documentProperties&&I.documentProperties.dialog&&(I.documentProperties.dialog.hidden=!0),I.signatureProperties&&I.signatureProperties.dialog&&(I.signatureProperties.dialog.hidden=!0))}));function nA(){document.getElementById("fileInput").click()}function RA(){var A=Object(M.getStreamData)();if(A)if(T.viewer.config.downloadCallback)T.viewer.config.downloadCallback(new Blob([A]));else{var I=window.URL.createObjectURL(new Blob([A])),g=document.createElement("a");g.style.display="none",g.href=I,g.setAttribute("download",T.fileName),document.body.append(g),g.click()}}function rA(){var A=T.ofdCore,I=T.viewer;if(A){var g=I.ofdViewer.currentScaleValue;"auto"!==g&&"page-fit"!==g&&"page-width"!==g||(I.ofdViewer.currentScaleValue=g),T.viewer.eventBus.dispatch("stampResize",{source:null})}}function NA(A){T.viewer.config.openFileTip&&(T.viewer.config.openFileTip.hidden=!0),T.viewer.pdfSidebar.isOpen&&T.viewer.pdfSidebar.close();var I=A.fileInput.files[0];T.fileName=I.name,T.viewer.ofdViewer.freeDocument(),T.viewer.config.loadingContainer&&T.viewer.ofdViewer.viewer.appendChild(T.viewer.config.loadingContainer);(new Date).getTime();P({ofd:I,secret:T.viewer.config.secret,digest:T.viewer.config.digest,waterText:T.viewer.config.waterText,success:function(A){(new Date).getTime();T.viewer.config.parserOFDSuccess&&T.viewer.config.parserOFDSuccess(A.ofd),T.ofdCore=A,T.viewer.ofdViewer.setWaterText(T.waterText),T.viewer.ofdViewer.setOfdCore(A),T.viewer.ofdThumbnailViewer&&T.viewer.ofdThumbnailViewer.setOfdCore(A),T.viewer.ofdSignatureViewer.setOfdCore(A,T.viewer.config.signatureViewerForceCheck),T.viewer.ofdAttachmentViewer.setOfdCore(A),T.viewer.ofdCustomTagViewer.setOfdCore(A),T.viewer.toolbar.setPagesCount(A.getOFDPageCount(0),!1),T.viewer.secondaryToolbar.setPagesCount(A.getOFDPageCount(0)),T.viewer.config.sidebarForceOpen&&A.getSignatureCount(0)>0&&setTimeout((function(){T.viewer.pdfSidebar.open()}),500)},fail:function(A){T.viewer.config.parserOFDFail&&T.viewer.config.parserOFDFail(A),T.viewer.ofdViewer.freeDocument(),T.viewer.config.errorWrapper.moreInfoButton.hidden=!0,T.viewer.config.errorWrapper.container.hidden=!1,T.viewer.config.errorWrapper.errorMessage.textContent=A}})}function MA(){T.viewer.ofdViewer.firstPage()}function UA(){T.viewer.ofdViewer.lastPage()}function SA(){T.viewer.ofdViewer.nextPage()}function kA(){T.viewer.ofdViewer.previousPage()}function YA(A){""!==A.value&&A.source.eventBus.dispatch("jumpPage",{source:A.source,pageIndex:A.value}),T.viewer.toolbar.setPageNumber(A.value,null),T.viewer.secondaryToolbar.setPageNumber(A.value,null)}function dA(A){var I=A.pageNumber;T.viewer.toolbar.setPageNumber(I,null),T.viewer.secondaryToolbar.setPageNumber(I,null),T.viewer.pdfSidebar.isThumbnailViewVisible&&T.viewer.ofdThumbnailViewer.scrollThumbnailIntoView(I),T.viewer.config.onPageChanging&&T.viewer.config.onPageChanging(I)}function HA(){T.viewer.ofdPrint.setOfdCore(T.ofdCore),T.viewer.ofdPrint.open()}function KA(){T.viewer.ofdViewer.increaseScale()}function JA(){T.viewer.ofdViewer.decreaseScale()}function LA(A){T.viewer.toolbar.setPageScale(A.presetValue,A.scale),T.viewer.config.onPageScale&&T.viewer.config.onPageScale(A.scale)}function lA(A){T.viewer.config.onViewportChange&&T.viewer.config.onViewportChange(T.viewer.ofdViewer)}function fA(A){T.viewer.ofdViewer.zoom(A.value)}function uA(A){T.viewer.ofdViewer.setSpreadMode(A.mode)}function pA(A){}function mA(A){T.viewer.ofdViewer.setScrollMode(A.mode)}function bA(){T.viewer.ofdViewer.setRotation(90)}function ZA(){T.viewer.ofdViewer.setRotation(-90)}function qA(){T.viewer.ofdDocumentProperties.setOfdCore(T.ofdCore),T.viewer.ofdDocumentProperties.open()}function WA(A){T.viewer.secondaryToolbar.isOpen&&(T.viewer.config.mainContainer.contains(A.target)||T.viewer.config.toolbar.container.contains(A.target)&&A.target!==T.viewer.config.secondaryToolbar.toggleButton)&&T.viewer.secondaryToolbar.close()}function xA(A){if(T.viewer.signatureProperties)if(T.viewer.signatureProperties.setOfdCore(T.ofdCore),A.pageRef||A.signatureId){var I=T.ofdCore.findSignature(0,A.pageRef,A.signatureId);T.viewer.signatureProperties.open(I)}else T.viewer.signatureProperties.open(A.sign.Signature)}function VA(A){var I=A.attachment.FileLocAbs.split("/");TA(A.attachment.FileLocAbs).then((function(A){var g=window.URL.createObjectURL(new Blob([A])),B=document.createElement("a");B.style.display="none",B.href=g,B.setAttribute("download",I[I.length-1]),document.body.append(B),B.click()})).catch((function(A){}))}function vA(A){T.viewer.ofdViewer&&T.viewer.ofdViewer.removeHighLight()}function XA(A){A.source.eventBus.dispatch("jumpPage",{source:A.source,pageIndex:A.pageIndex+1,eleIdArray:A.eleIdArray}),T.viewer.toolbar.setPageNumber(A.pageIndex+1,null),T.viewer.secondaryToolbar.setPageNumber(A.pageIndex+1,null)}function TA(A){return new Promise((function(I,g){var B=Object(M.getStreamData)();if(B){var C=Object(M.JSGetPathEncode)(T.ofdCore.ofdParserPtr,A);Z.a.loadAsync(B,{decodeFileName:function(A){return X.decode(A,C)}}).then((function(B){B.files[A].async("uint8array").then((function(A){I(A)}),(function(A){g(A)}))})).catch((function(A){g(A)}))}}))}},function(A,I){function g(A,I){for(var g=0;g<I.length;g++){var B=I[g];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(A,B.key,B)}}A.exports=function(A,I,B){return I&&g(A.prototype,I),B&&g(A,B),Object.defineProperty(A,"prototype",{writable:!1}),A},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I){A.exports=function(A,I){if(!(A instanceof I))throw new TypeError("Cannot call a class as a function")},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I){function g(A,I,g,B,C,Q,E){try{var i=A[Q](E),o=i.value}catch(A){return void g(A)}i.done?I(o):Promise.resolve(o).then(B,C)}A.exports=function(A){return function(){var I=this,B=arguments;return new Promise((function(C,Q){var E=A.apply(I,B);function i(A){g(E,C,Q,i,o,"next",A)}function o(A){g(E,C,Q,i,o,"throw",A)}i(void 0)}))}},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I,g){var B=g(5)();A.exports=B;try{regeneratorRuntime=B}catch(A){"object"==typeof globalThis?globalThis.regeneratorRuntime=B:Function("r","regeneratorRuntime = r")(B)}},function(A,I,g){var B=g(6).default;function C(){"use strict";
2
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */A.exports=C=function(){return I},A.exports.__esModule=!0,A.exports.default=A.exports;var I={},g=Object.prototype,Q=g.hasOwnProperty,E="function"==typeof Symbol?Symbol:{},i=E.iterator||"@@iterator",o=E.asyncIterator||"@@asyncIterator",D=E.toStringTag||"@@toStringTag";function t(A,I,g){return Object.defineProperty(A,I,{value:g,enumerable:!0,configurable:!0,writable:!0}),A[I]}try{t({},"")}catch(A){t=function(A,I,g){return A[I]=g}}function h(A,I,g,B){var C=I&&I.prototype instanceof a?I:a,Q=Object.create(C.prototype),E=new S(B||[]);return Q._invoke=function(A,I,g){var B="suspendedStart";return function(C,Q){if("executing"===B)throw new Error("Generator is already running");if("completed"===B){if("throw"===C)throw Q;return Y()}for(g.method=C,g.arg=Q;;){var E=g.delegate;if(E){var i=N(E,g);if(i){if(i===s)continue;return i}}if("next"===g.method)g.sent=g._sent=g.arg;else if("throw"===g.method){if("suspendedStart"===B)throw B="completed",g.arg;g.dispatchException(g.arg)}else"return"===g.method&&g.abrupt("return",g.arg);B="executing";var o=w(A,I,g);if("normal"===o.type){if(B=g.done?"completed":"suspendedYield",o.arg===s)continue;return{value:o.arg,done:g.done}}"throw"===o.type&&(B="completed",g.method="throw",g.arg=o.arg)}}}(A,g,E),Q}function w(A,I,g){try{return{type:"normal",arg:A.call(I,g)}}catch(A){return{type:"throw",arg:A}}}I.wrap=h;var s={};function a(){}function e(){}function c(){}var G={};t(G,i,(function(){return this}));var y=Object.getPrototypeOf,F=y&&y(y(k([])));F&&F!==g&&Q.call(F,i)&&(G=F);var n=c.prototype=a.prototype=Object.create(G);function R(A){["next","throw","return"].forEach((function(I){t(A,I,(function(A){return this._invoke(I,A)}))}))}function r(A,I){function g(C,E,i,o){var D=w(A[C],A,E);if("throw"!==D.type){var t=D.arg,h=t.value;return h&&"object"==B(h)&&Q.call(h,"__await")?I.resolve(h.__await).then((function(A){g("next",A,i,o)}),(function(A){g("throw",A,i,o)})):I.resolve(h).then((function(A){t.value=A,i(t)}),(function(A){return g("throw",A,i,o)}))}o(D.arg)}var C;this._invoke=function(A,B){function Q(){return new I((function(I,C){g(A,B,I,C)}))}return C=C?C.then(Q,Q):Q()}}function N(A,I){var g=A.iterator[I.method];if(void 0===g){if(I.delegate=null,"throw"===I.method){if(A.iterator.return&&(I.method="return",I.arg=void 0,N(A,I),"throw"===I.method))return s;I.method="throw",I.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var B=w(g,A.iterator,I.arg);if("throw"===B.type)return I.method="throw",I.arg=B.arg,I.delegate=null,s;var C=B.arg;return C?C.done?(I[A.resultName]=C.value,I.next=A.nextLoc,"return"!==I.method&&(I.method="next",I.arg=void 0),I.delegate=null,s):C:(I.method="throw",I.arg=new TypeError("iterator result is not an object"),I.delegate=null,s)}function M(A){var I={tryLoc:A[0]};1 in A&&(I.catchLoc=A[1]),2 in A&&(I.finallyLoc=A[2],I.afterLoc=A[3]),this.tryEntries.push(I)}function U(A){var I=A.completion||{};I.type="normal",delete I.arg,A.completion=I}function S(A){this.tryEntries=[{tryLoc:"root"}],A.forEach(M,this),this.reset(!0)}function k(A){if(A){var I=A[i];if(I)return I.call(A);if("function"==typeof A.next)return A;if(!isNaN(A.length)){var g=-1,B=function I(){for(;++g<A.length;)if(Q.call(A,g))return I.value=A[g],I.done=!1,I;return I.value=void 0,I.done=!0,I};return B.next=B}}return{next:Y}}function Y(){return{value:void 0,done:!0}}return e.prototype=c,t(n,"constructor",c),t(c,"constructor",e),e.displayName=t(c,D,"GeneratorFunction"),I.isGeneratorFunction=function(A){var I="function"==typeof A&&A.constructor;return!!I&&(I===e||"GeneratorFunction"===(I.displayName||I.name))},I.mark=function(A){return Object.setPrototypeOf?Object.setPrototypeOf(A,c):(A.__proto__=c,t(A,D,"GeneratorFunction")),A.prototype=Object.create(n),A},I.awrap=function(A){return{__await:A}},R(r.prototype),t(r.prototype,o,(function(){return this})),I.AsyncIterator=r,I.async=function(A,g,B,C,Q){void 0===Q&&(Q=Promise);var E=new r(h(A,g,B,C),Q);return I.isGeneratorFunction(g)?E:E.next().then((function(A){return A.done?A.value:E.next()}))},R(n),t(n,D,"Generator"),t(n,i,(function(){return this})),t(n,"toString",(function(){return"[object Generator]"})),I.keys=function(A){var I=[];for(var g in A)I.push(g);return I.reverse(),function g(){for(;I.length;){var B=I.pop();if(B in A)return g.value=B,g.done=!1,g}return g.done=!0,g}},I.values=k,S.prototype={constructor:S,reset:function(A){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(U),!A)for(var I in this)"t"===I.charAt(0)&&Q.call(this,I)&&!isNaN(+I.slice(1))&&(this[I]=void 0)},stop:function(){this.done=!0;var A=this.tryEntries[0].completion;if("throw"===A.type)throw A.arg;return this.rval},dispatchException:function(A){if(this.done)throw A;var I=this;function g(g,B){return E.type="throw",E.arg=A,I.next=g,B&&(I.method="next",I.arg=void 0),!!B}for(var B=this.tryEntries.length-1;B>=0;--B){var C=this.tryEntries[B],E=C.completion;if("root"===C.tryLoc)return g("end");if(C.tryLoc<=this.prev){var i=Q.call(C,"catchLoc"),o=Q.call(C,"finallyLoc");if(i&&o){if(this.prev<C.catchLoc)return g(C.catchLoc,!0);if(this.prev<C.finallyLoc)return g(C.finallyLoc)}else if(i){if(this.prev<C.catchLoc)return g(C.catchLoc,!0)}else{if(!o)throw new Error("try statement without catch or finally");if(this.prev<C.finallyLoc)return g(C.finallyLoc)}}}},abrupt:function(A,I){for(var g=this.tryEntries.length-1;g>=0;--g){var B=this.tryEntries[g];if(B.tryLoc<=this.prev&&Q.call(B,"finallyLoc")&&this.prev<B.finallyLoc){var C=B;break}}C&&("break"===A||"continue"===A)&&C.tryLoc<=I&&I<=C.finallyLoc&&(C=null);var E=C?C.completion:{};return E.type=A,E.arg=I,C?(this.method="next",this.next=C.finallyLoc,s):this.complete(E)},complete:function(A,I){if("throw"===A.type)throw A.arg;return"break"===A.type||"continue"===A.type?this.next=A.arg:"return"===A.type?(this.rval=this.arg=A.arg,this.method="return",this.next="end"):"normal"===A.type&&I&&(this.next=I),s},finish:function(A){for(var I=this.tryEntries.length-1;I>=0;--I){var g=this.tryEntries[I];if(g.finallyLoc===A)return this.complete(g.completion,g.afterLoc),U(g),s}},catch:function(A){for(var I=this.tryEntries.length-1;I>=0;--I){var g=this.tryEntries[I];if(g.tryLoc===A){var B=g.completion;if("throw"===B.type){var C=B.arg;U(g)}return C}}throw new Error("illegal catch attempt")},delegateYield:function(A,I,g){return this.delegate={iterator:k(A),resultName:I,nextLoc:g},"next"===this.method&&(this.arg=void 0),s}},I}A.exports=C,A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I){function g(I){return A.exports=g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},A.exports.__esModule=!0,A.exports.default=A.exports,g(I)}A.exports=g,A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I,g){"use strict";g.r(I),g.d(I,"GenericL10n",(function(){return s}));var B=g(3),C=g.n(B),Q=g(2),E=g.n(Q),i=g(1),o=g.n(i),D=g(4),t=g.n(D),h=(g(8),g(9)),w=document.webL10n,s=function(){function A(I){E()(this,A),this._lang=I,this._ready=new Promise((function(A,g){w.setLanguage(Object(h.fixupLangCode)(I),(function(){A(w)}))}))}var I,g,B,Q;return o()(A,[{key:"getLanguage",value:(Q=C()(t.a.mark((function A(){var I;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,this._ready;case 2:return I=A.sent,A.abrupt("return",I.getLanguage());case 4:case"end":return A.stop()}}),A,this)}))),function(){return Q.apply(this,arguments)})},{key:"getDirection",value:(B=C()(t.a.mark((function A(){var I;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,this._ready;case 2:return I=A.sent,A.abrupt("return",I.getDirection());case 4:case"end":return A.stop()}}),A,this)}))),function(){return B.apply(this,arguments)})},{key:"get",value:(g=C()(t.a.mark((function A(I){var g,B,C,Q=arguments;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return g=Q.length>1&&void 0!==Q[1]?Q[1]:null,B=Q.length>2&&void 0!==Q[2]?Q[2]:Object(h.getL10nFallback)(I,g),A.next=4,this._ready;case 4:return C=A.sent,A.abrupt("return",C.get(I,g,B));case 6:case"end":return A.stop()}}),A,this)}))),function(A){return g.apply(this,arguments)})},{key:"translate",value:(I=C()(t.a.mark((function A(I){var g;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,this._ready;case 2:return g=A.sent,A.abrupt("return",g.translate(I));case 4:case"end":return A.stop()}}),A,this)}))),function(A){return I.apply(this,arguments)})}]),A}()},function(A,I,g){"use strict";document.webL10n=function(A,I,g){var B={},C="",Q="textContent",E="",i={},o="loading";function D(A,I,g){I=I||function(A){},g=g||function(){};var B=new XMLHttpRequest;B.open("GET",A,true),B.overrideMimeType&&B.overrideMimeType("text/plain; charset=utf-8"),B.onreadystatechange=function(){4==B.readyState&&(200==B.status||0===B.status?I(B.responseText):g())},B.onerror=g,B.ontimeout=g;try{B.send(null)}catch(A){g()}}function t(A,I,g,E){var i=A.replace(/[^\/]*$/,"")||"./";function o(A){return A.lastIndexOf("\\")<0?A:A.replace(/\\\\/g,"\\").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\{/g,"{").replace(/\\}/g,"}").replace(/\\"/g,'"').replace(/\\'/g,"'")}D(A,(function(A){C+=A,function(A,g){var B={},C=/^\s*|\s*$/,Q=/^\s*#|^\s*$/,E=/^\s*\[(.*)\]\s*$/,t=/^\s*@import\s+url\((.*)\)\s*$/i,h=/^([^=\s]*)\s*=\s*(.+)$/;function w(A,g,D){var w=A.replace(C,"").split(/[\r\n]+/),a="*",e=I.split("-",1)[0],c=!1,G="";!function A(){for(;;){if(!w.length)return void D();var C=w.shift();if(!Q.test(C)){if(g){if(G=E.exec(C)){a=G[1].toLowerCase(),c="*"!==a&&a!==I&&a!==e;continue}if(c)continue;if(G=t.exec(C))return void s(i+G[1],A)}var y=C.match(h);y&&3==y.length&&(B[y[1]]=o(y[2]))}}}()}function s(A,I){D(A,(function(A){w(A,!1,I)}),(function(){I()}))}w(A,!0,(function(){g(B)}))}(A,(function(A){for(var I in A){var C,E,i=I.lastIndexOf(".");i>0?(C=I.substring(0,i),E=I.substring(i+1)):(C=I,E=Q),B[C]||(B[C]={}),B[C][E]=A[I]}g&&g()}))}),E)}function h(A,g){A&&(A=A.toLowerCase()),g=g||function(){},B={},C="",E="",E=A;var Q=I.querySelectorAll('link[type="application/l10n"]'),i=Q.length;if(0!==i){var D,h,w=0;h=function(){++w>=i&&(g(),o="complete")};for(var s=0;s<i;s++){new G(Q[s]).load(A,h)}}else{var a=(D=I.querySelector('script[type="application/l10n"]'))?JSON.parse(D.innerHTML):null;if(a&&a.locales&&a.default_locale){if(!(B=a.locales[A])){var e=a.default_locale.toLowerCase();for(var c in a.locales){if((c=c.toLowerCase())===A){B=a.locales[A];break}c===e&&(B=a.locales[e])}}g()}o="complete"}function G(A){var I=A.href;this.load=function(A,g){t(I,A,g,(function(){E="",g()}))}}}function w(A,I,g){var C=B[A];if(!C){if(!g)return null;C=g}var Q={};for(var E in C){var i=C[E];i=a(i=s(i,I,A,E),I,A),Q[E]=i}return Q}function s(A,I,g,C){var Q=/\{\[\s*([a-zA-Z]+)\(([a-zA-Z]+)\)\s*\]\}/.exec(A);if(!Q||!Q.length)return A;var E,o=Q[1],D=Q[2];(I&&D in I?E=I[D]:D in B&&(E=B[D]),o in i)&&(A=(0,i[o])(A,E,g,C));return A}function a(A,I,g){return A.replace(/\{\{\s*(.+?)\s*\}\}/g,(function(A,g){return I&&g in I?I[g]:g in B?B[g]:A}))}function e(A){var g=function(A){if(!A)return{};var I=A.getAttribute("data-l10n-id"),g=A.getAttribute("data-l10n-args"),B={};if(g)try{B=JSON.parse(g)}catch(A){}return{id:I,args:B}}(A);if(g.id){var B=w(g.id,g.args);if(B){if(B[Q]){if(0===function(A){if(A.children)return A.children.length;if(void 0!==A.childElementCount)return A.childElementCount;for(var I=0,g=0;g<A.childNodes.length;g++)I+=1===A.nodeType?1:0;return I}(A))A[Q]=B[Q];else{for(var C=A.childNodes,E=!1,i=0,o=C.length;i<o;i++)3===C[i].nodeType&&/\S/.test(C[i].nodeValue)&&(E?C[i].nodeValue="":(C[i].nodeValue=B[Q],E=!0));if(!E){var D=I.createTextNode(B[Q]);A.insertBefore(D,A.firstChild)}}delete B[Q]}for(var t in B)A[t]=B[t]}}}return i.plural=function(A,I,g,C){var o=parseFloat(I);if(isNaN(o))return A;if(C!=Q)return A;i._pluralRules||(i._pluralRules=function(A){function I(A,I){return-1!==I.indexOf(A)}function g(A,I,g){return I<=A&&A<=g}var B={0:function(A){return"other"},1:function(A){return g(A%100,3,10)?"few":0===A?"zero":g(A%100,11,99)?"many":2==A?"two":1==A?"one":"other"},2:function(A){return 0!==A&&A%10==0?"many":2==A?"two":1==A?"one":"other"},3:function(A){return 1==A?"one":"other"},4:function(A){return g(A,0,1)?"one":"other"},5:function(A){return g(A,0,2)&&2!=A?"one":"other"},6:function(A){return 0===A?"zero":A%10==1&&A%100!=11?"one":"other"},7:function(A){return 2==A?"two":1==A?"one":"other"},8:function(A){return g(A,3,6)?"few":g(A,7,10)?"many":2==A?"two":1==A?"one":"other"},9:function(A){return 0===A||1!=A&&g(A%100,1,19)?"few":1==A?"one":"other"},10:function(A){return g(A%10,2,9)&&!g(A%100,11,19)?"few":A%10!=1||g(A%100,11,19)?"other":"one"},11:function(A){return g(A%10,2,4)&&!g(A%100,12,14)?"few":A%10==0||g(A%10,5,9)||g(A%100,11,14)?"many":A%10==1&&A%100!=11?"one":"other"},12:function(A){return g(A,2,4)?"few":1==A?"one":"other"},13:function(A){return g(A%10,2,4)&&!g(A%100,12,14)?"few":1!=A&&g(A%10,0,1)||g(A%10,5,9)||g(A%100,12,14)?"many":1==A?"one":"other"},14:function(A){return g(A%100,3,4)?"few":A%100==2?"two":A%100==1?"one":"other"},15:function(A){return 0===A||g(A%100,2,10)?"few":g(A%100,11,19)?"many":1==A?"one":"other"},16:function(A){return A%10==1&&11!=A?"one":"other"},17:function(A){return 3==A?"few":0===A?"zero":6==A?"many":2==A?"two":1==A?"one":"other"},18:function(A){return 0===A?"zero":g(A,0,2)&&0!==A&&2!=A?"one":"other"},19:function(A){return g(A,2,10)?"few":g(A,0,1)?"one":"other"},20:function(A){return!g(A%10,3,4)&&A%10!=9||g(A%100,10,19)||g(A%100,70,79)||g(A%100,90,99)?A%1e6==0&&0!==A?"many":A%10!=2||I(A%100,[12,72,92])?A%10!=1||I(A%100,[11,71,91])?"other":"one":"two":"few"},21:function(A){return 0===A?"zero":1==A?"one":"other"},22:function(A){return g(A,0,1)||g(A,11,99)?"one":"other"},23:function(A){return g(A%10,1,2)||A%20==0?"one":"other"},24:function(A){return g(A,3,10)||g(A,13,19)?"few":I(A,[2,12])?"two":I(A,[1,11])?"one":"other"}},C={af:3,ak:4,am:4,ar:1,asa:3,az:0,be:11,bem:3,bez:3,bg:3,bh:4,bm:0,bn:3,bo:0,br:20,brx:3,bs:11,ca:3,cgg:3,chr:3,cs:12,cy:17,da:3,de:3,dv:3,dz:0,ee:3,el:3,en:3,eo:3,es:3,et:3,eu:3,fa:0,ff:5,fi:3,fil:4,fo:3,fr:5,fur:3,fy:3,ga:8,gd:24,gl:3,gsw:3,gu:3,guw:4,gv:23,ha:3,haw:3,he:2,hi:4,hr:11,hu:0,id:0,ig:0,ii:0,is:3,it:3,iu:7,ja:0,jmc:3,jv:0,ka:0,kab:5,kaj:3,kcg:3,kde:0,kea:0,kk:3,kl:3,km:0,kn:0,ko:0,ksb:3,ksh:21,ku:3,kw:7,lag:18,lb:3,lg:3,ln:4,lo:0,lt:10,lv:6,mas:3,mg:4,mk:16,ml:3,mn:3,mo:9,mr:3,ms:0,mt:15,my:0,nah:3,naq:7,nb:3,nd:3,ne:3,nl:3,nn:3,no:3,nr:3,nso:4,ny:3,nyn:3,om:3,or:3,pa:3,pap:3,pl:13,ps:3,pt:3,rm:3,ro:9,rof:3,ru:11,rwk:3,sah:0,saq:3,se:7,seh:3,ses:0,sg:0,sh:11,shi:19,sk:12,sl:14,sma:7,smi:7,smj:7,smn:7,sms:7,sn:3,so:3,sq:3,sr:11,ss:3,ssy:3,st:3,sv:3,sw:3,syr:3,ta:3,te:3,teo:3,th:0,ti:4,tig:3,tk:3,tl:4,tn:3,to:0,tr:0,ts:3,tzm:22,uk:11,ur:3,ve:3,vi:0,vun:3,wa:4,wae:3,wo:0,xh:3,xog:3,yo:0,zh:0,zu:3}[A.replace(/-.*$/,"")];return C in B?B[C]:function(){return"other"}}(E));var D="["+i._pluralRules(o)+"]";return 0===o&&g+"[zero]"in B?A=B[g+"[zero]"][C]:1==o&&g+"[one]"in B?A=B[g+"[one]"][C]:2==o&&g+"[two]"in B?A=B[g+"[two]"][C]:g+D in B?A=B[g+D][C]:g+"[other]"in B&&(A=B[g+"[other]"][C]),A},{get:function(A,I,g){var B,C=A.lastIndexOf("."),E=Q;C>0&&(E=A.substring(C+1),A=A.substring(0,C)),g&&((B={})[E]=g);var i=w(A,I,B);return i&&E in i?i[E]:"{{"+A+"}}"},getData:function(){return B},getText:function(){return C},getLanguage:function(){return E},setLanguage:function(A,I){h(A,(function(){I&&I()}))},getDirection:function(){var A=E.split("-",1)[0];return["ar","he","fa","ps","ur"].indexOf(A)>=0?"rtl":"ltr"},translate:function(A){for(var g=function(A){return A?A.querySelectorAll("*[data-l10n-id]"):[]}(A=A||I.documentElement),B=g.length,C=0;C<B;C++)e(g[C]);e(A)},getReadyState:function(){return o},ready:function(g){g&&("complete"==o||"interactive"==o?A.setTimeout((function(){g()})):I.addEventListener&&I.addEventListener("localized",(function A(){I.removeEventListener("localized",A),g()})))}}}(window,document)},function(A,I,g){"use strict";g.r(I),g.d(I,"fixupLangCode",(function(){return t})),g.d(I,"getL10nFallback",(function(){return o})),g.d(I,"NullL10n",(function(){return w}));var B=g(3),C=g.n(B),Q=g(4),E=g.n(Q),i={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} × {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",print_progress_percent:"{{progress}}%","toggle_sidebar.title":"Toggle Sidebar","toggle_sidebar_notification2.title":"Toggle Sidebar (document contains outline/attachments/layers)",additional_layers:"Additional Layers",page_landmark:"Page {{page}}",thumb_page_title:"Page {{page}}",thumb_page_canvas:"Thumbnail of Page {{page}}",find_reached_top:"Reached top of document, continued from bottom",find_reached_bottom:"Reached end of document, continued from top","find_match_count[one]":"{{current}} of {{total}} match","find_match_count[other]":"{{current}} of {{total}} matches","find_match_count_limit[one]":"More than {{limit}} match","find_match_count_limit[other]":"More than {{limit}} matches",find_not_found:"Phrase not found",error_version_info:"PDF.js v{{version}} (build: {{build}})",error_message:"Message: {{message}}",error_stack:"Stack: {{stack}}",error_file:"File: {{file}}",error_line:"Line: {{line}}",rendering_error:"An error occurred while rendering the page.",page_scale_width:"Page Width",page_scale_fit:"Page Fit",page_scale_auto:"Automatic Zoom",page_scale_actual:"Actual Size",page_scale_percent:"{{scale}}%",loading:"Loading…",loading_error:"An error occurred while loading the PDF.",invalid_file_error:"Invalid or corrupted PDF file.",missing_file_error:"Missing PDF file.",unexpected_response_error:"Unexpected server response.",printing_not_supported:"Warning: Printing is not fully supported by this browser.",printing_not_ready:"Warning: The PDF is not fully loaded for printing.",web_fonts_disabled:"Web fonts are disabled: unable to use embedded PDF fonts."};function o(A,I){switch(A){case"find_match_count":A="find_match_count[".concat(1===I.total?"one":"other","]");break;case"find_match_count_limit":A="find_match_count_limit[".concat(1===I.limit?"one":"other","]")}return i[A]||""}var D={en:"en-US",es:"es-ES",fy:"fy-NL",ga:"ga-IE",gu:"gu-IN",hi:"hi-IN",hy:"hy-AM",nb:"nb-NO",ne:"ne-NP",nn:"nn-NO",pa:"pa-IN",pt:"pt-PT",sv:"sv-SE",zh:"zh-CN"};function t(A){return D[!!A&&A.toLowerCase()]||A}function h(A,I){return I?A.replace(/\{\{\s*(\w+)\s*\}\}/g,(function(A,g){return g in I?I[g]:"{{"+g+"}}"})):A}var w={getLanguage:function(){return C()(E.a.mark((function A(){return E.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return","en-us");case 1:case"end":return A.stop()}}),A)})))()},getDirection:function(){return C()(E.a.mark((function A(){return E.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return","ltr");case 1:case"end":return A.stop()}}),A)})))()},get:function(A){var I=arguments;return C()(E.a.mark((function g(){var B,C;return E.a.wrap((function(g){for(;;)switch(g.prev=g.next){case 0:return B=I.length>1&&void 0!==I[1]?I[1]:null,C=I.length>2&&void 0!==I[2]?I[2]:o(A,B),g.abrupt("return",h(C,B));case 3:case"end":return g.stop()}}),g)})))()},translate:function(A){return C()(E.a.mark((function A(){return E.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:case"end":return A.stop()}}),A)})))()}}},function(A,I,g){"use strict";g.r(I),g.d(I,"AutomationEventBus",(function(){return R})),g.d(I,"EventBus",(function(){return n})),g.d(I,"waitOnEventOrTimeout",(function(){return F})),g.d(I,"WaitOnType",(function(){return y}));var B=g(11),C=g.n(B),Q=g(14),E=g.n(Q),i=g(16),o=g.n(i),D=g(13),t=g.n(D),h=g(2),w=g.n(h),s=g(1),a=g.n(s);function e(A){var I=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(A){return!1}}();return function(){var g,B=t()(A);if(I){var C=t()(this).constructor;g=Reflect.construct(B,arguments,C)}else g=B.apply(this,arguments);return o()(this,g)}}function c(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return G(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return G(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function G(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var y={EVENT:"event",TIMEOUT:"timeout"};function F(A){var I=A.target,g=A.name,B=A.delay,C=void 0===B?0:B;return new Promise((function(A,B){if("object"!=typeof I||!g||"string"!=typeof g||!(Number.isInteger(C)&&C>=0))throw new Error("waitOnEventOrTimeout - invalid parameters.");function Q(B){I instanceof n?I._off(g,E):I.removeEventListener(g,E),o&&clearTimeout(o),A(B)}var E=Q.bind(null,y.EVENT);I instanceof n?I._on(g,E):I.addEventListener(g,E);var i=Q.bind(null,y.TIMEOUT),o=setTimeout(i,C)}))}var n=function(){function A(){w()(this,A),this._listeners=Object.create(null)}return a()(A,[{key:"on",value:function(A,I){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._on(A,I,{external:!0,once:g&&g.once})}},{key:"off",value:function(A,I){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._off(A,I,{external:!0,once:g&&g.once})}},{key:"dispatch",value:function(A,I){var g=this._listeners[A];if(g&&0!==g.length){var B,C,Q=c(g.slice(0));try{for(Q.s();!(C=Q.n()).done;){var E=C.value,i=E.listener,o=E.external;E.once&&this._off(A,i),o?(B||(B=[]),B.push(i)):i(I)}}catch(A){Q.e(A)}finally{Q.f()}if(B){var D,t=c(B);try{for(t.s();!(D=t.n()).done;){(0,D.value)(I)}}catch(A){t.e(A)}finally{t.f()}B=null}}}},{key:"_on",value:function(A,I){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._listeners[A]||(this._listeners[A]=[]);var B=this._listeners[A];B.push({listener:I,external:g&&!0===g.external,once:g&&!0===g.once})}},{key:"_off",value:function(A,I){var g=this._listeners[A];if(g)for(var B=0,C=g.length;B<C;B++)if(g[B].listener===I)return void g.splice(B,1)}}]),A}(),R=function(A){E()(g,A);var I=e(g);function g(){return w()(this,g),I.apply(this,arguments)}return a()(g,[{key:"dispatch",value:function(A,I){if("undefined"!=typeof PDFJSDev&&!PDFJSDev.test("MOZCENTRAL"))throw new Error("Not implemented: AutomationEventBus.dispatch");C()(t()(g.prototype),"dispatch",this).call(this,A,I);var B=Object.create(null);if(I)for(var Q in I){var E=I[Q];if("source"!==Q)B[Q]=E;else if(E===window||E===document)return}var i=document.createEvent("CustomEvent");i.initCustomEvent(A,!0,!0,B),document.dispatchEvent(i)}}]),g}(n)},function(A,I,g){var B=g(12);function C(){return"undefined"!=typeof Reflect&&Reflect.get?(A.exports=C=Reflect.get.bind(),A.exports.__esModule=!0,A.exports.default=A.exports):(A.exports=C=function(A,I,g){var C=B(A,I);if(C){var Q=Object.getOwnPropertyDescriptor(C,I);return Q.get?Q.get.call(arguments.length<3?A:g):Q.value}},A.exports.__esModule=!0,A.exports.default=A.exports),C.apply(this,arguments)}A.exports=C,A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I,g){var B=g(13);A.exports=function(A,I){for(;!Object.prototype.hasOwnProperty.call(A,I)&&null!==(A=B(A)););return A},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I){function g(I){return A.exports=g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(A){return A.__proto__||Object.getPrototypeOf(A)},A.exports.__esModule=!0,A.exports.default=A.exports,g(I)}A.exports=g,A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I,g){var B=g(15);A.exports=function(A,I){if("function"!=typeof I&&null!==I)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(I&&I.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),Object.defineProperty(A,"prototype",{writable:!1}),I&&B(A,I)},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I){function g(I,B){return A.exports=g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(A,I){return A.__proto__=I,A},A.exports.__esModule=!0,A.exports.default=A.exports,g(I,B)}A.exports=g,A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I,g){var B=g(6).default,C=g(17);A.exports=function(A,I){if(I&&("object"===B(I)||"function"==typeof I))return I;if(void 0!==I)throw new TypeError("Derived constructors may only return object or undefined");return C(A)},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I){A.exports=function(A){if(void 0===A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I,g){"use strict";g.r(I),g.d(I,"OfdViewer",(function(){return n}));var B=g(3),C=g.n(B),Q=g(2),E=g.n(Q),i=g(1),o=g.n(i),D=g(19),t=g.n(D),h=g(4),w=g.n(h),s=g(20),a=g(27),e=g(28),c=g(35),G=g(34);function y(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return F(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return F(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function F(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var n=function(){function A(I,g,B,C){E()(this,A),t()(this,"scrollModePageState",null),this.jumpPageEvt=null,this.coreHelper=new G.Ofd_Core_Helper,this.ofdRender=new e.Ofd_Render(null,new G.Ofd_Core_Helper),C&&this.ofdRender.setMixBlendMode(C),this.ofdCanvasRender=new c.OfdCanvasRender(null,this.coreHelper),this.eventBus=B,this.container=I,this.viewer=g,this._currentScaleValue=s.DEFAULT_SCALE_VALUE,this._pages=[],this._currentScale=1,this._spreadMode=s.SpreadMode.NONE,this._scrollMode=s.ScrollMode.VERTICAL,this._pagesRotation=0,this.currentPage=1,this.scroll=Object(s.watchScroll)(this.container,this._scrollUpdate.bind(this)),this.eventBus.dispatch("pagechanging",{source:this,pageNumber:1,pageLabel:null,previous:1}),this.eventBus._on("jumpPage",this.jumpPage.bind(this)),this.scrollModePageState={previousPageNumber:1,scrollDown:!0,pages:[]},this._location=null,this.lastViewerHeight=0,this.lastViewerContainerScrollTop=0,this.lastViewerWidth=0,this.lastViewerContainerScrollLeft=0}var I;return o()(A,[{key:"getPages",value:function(){return this._pages}},{key:"currentScaleValue",get:function(){return this._currentScaleValue},set:function(A){this.core&&this._setScale(A,!1)}},{key:"getOfdCore",value:function(){return this.core}},{key:"emptyNode",value:function(A){if(A)for(;A.firstChild;)A.removeChild(A.firstChild)}},{key:"_scrollUpdate",value:function(){0!==this.pageCount&&this.updateView()}},{key:"_getVisiblePages",value:function(){var A=this._pages;return Object(s.getVisibleElements)({scrollEl:this.container,views:A,sortByVisibility:!0,horizontal:false,rtl:false})}},{key:"renderHighestPriority",value:function(A){this.forceRendering(A)}},{key:"getScrollAhead",value:function(A){if(A.first&&1===A.first.id)return!0;if(A.last&&A.last.id===this.pageCount)return!1;switch(this._scrollMode){case s.ScrollMode.PAGE:return this.scrollModePageState.scrollDown;case s.ScrollMode.HORIZONTAL:return this.scroll.right}return this.scroll.down}},{key:"forceRendering",value:(I=C()(w.a.mark((function A(I){var g,B,C,Q,E=this;return w.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(this._scrollMode!==s.ScrollMode.PAGE?(B=I||this._getVisiblePages(),C=this.getScrollAhead(B),this._spreadMode!==s.SpreadMode.NONE&&(this._scrollMode,s.ScrollMode.HORIZONTAL),g=Object(a.getHighestPriority)(B,this._pages,C)):g=I,!g||g.renderingState!==s.RenderingStates.INITIAL){A.next=6;break}return A.delegateYield(w.a.mark((function A(){var I,B,C,Q,i,o;return w.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return E.emptyNode(g.div.firstChild),A.next=3,E.ofdRender.renderPage(g.div.firstChild,0,g.id-1);case 3:E.highLightEle(),I=E,B=y(document.getElementsByName("seal_img_div_".concat(g.id-1)));try{for(Q=function(){var A=C.value;A.addEventListener("click",(function(){I.eventBus.dispatch("signatureclick",{source:I,pageRef:A.dataset.pageRef,signatureId:A.dataset.signatureId})}))},B.s();!(C=B.n()).done;)Q()}catch(A){B.e(A)}finally{B.f()}for(g.renderingState=s.RenderingStates.FINISHED,E.renderHighestPriority(),i=0;i<g.id-10;i++)(o=E._pages[i]).renderingState===s.RenderingStates.FINISHED&&(E.emptyNode(o.div.firstChild),o.renderingState=s.RenderingStates.INITIAL);return A.abrupt("return",{v:!0});case 11:case"end":return A.stop()}}),A)}))(),"t0",3);case 3:if("object"!=typeof(Q=A.t0)){A.next=6;break}return A.abrupt("return",Q.v);case 6:return A.abrupt("return",!1);case 7:case"end":return A.stop()}}),A,this)}))),function(A){return I.apply(this,arguments)})},{key:"highLightEle",value:function(){if(this.removeHighLight(),this.jumpPageEvt&&this.jumpPageEvt.eleIdArray){document.getElementById(this.jumpPageEvt.eleIdArray[0].eleId);this.jumpPageEvt.eleIdArray.forEach((function(A){var I=document.getElementById("page_".concat(A.pageIndex));if(I.firstElementChild&&I.firstElementChild.childElementCount>0){var g=document.getElementById(A.eleId),B=document.createElement("div");B.className="highLight",B.setAttribute("style","position:absolute;left:".concat(g.style.left,";top:").concat(g.style.top,";width:").concat(g.style.width,";height:").concat(g.style.height)),I.firstElementChild.appendChild(B)}})),this.jumpPageEvt=null}}},{key:"removeHighLight",value:function(){var A=document.getElementsByClassName("highLight");if(A)for(var I=A.length-1;I>=0;I--){var g=A[I];g&&g.parentNode.removeChild(g)}}},{key:"updateView",value:function(){var A=this._getVisiblePages(),I=A.views;if(0!==I.length){this.renderHighestPriority(A);var g,B=this.currentPage,C=!1,Q=y(I);try{for(Q.s();!(g=Q.n()).done;){var E=g.value;if(E.percent<100)break;if(E.id===B){C=!0;break}}}catch(A){Q.e(A)}finally{Q.f()}C||(B=I[0].id),this._setCurrentPageNumber(B)}}},{key:"logError",value:function(A,I){}},{key:"showDocumentError",value:function(A,I){this.logError(A,I);var g=document.createElement("div");g.classList.add("error"),g.textContent=I,this.emptyNode(this.viewer),this.viewer.appendChild(g)}},{key:"resetPageScale",value:function(){this.core&&(this.coreHelper.setDpi(96*this._currentScale),this.reformDiv(this._pagesRotation))}},{key:"reformDiv",value:function(A){for(var I=0;I<this._pages.length;++I){var g=this._pages[I].div,B=this.coreHelper.pageRenderWidth(0,I,this.core),C=this.coreHelper.pageRenderHeight(0,I,this.core),Q=g.firstChild,E=new G.Ofd_Core_Helper,i=E.pageRenderWidth(0,I,this.core),o=E.pageRenderHeight(0,I,this.core);switch(A){case 0:g.style.width=B+"px",g.style.height=C+"px",0,this._pages[I].width=B,this._pages[I].height=C,Q.setAttribute("style","width:".concat(i,"px;height:").concat(o,"px;transform:rotate(",0,"deg) translate(").concat((B-i)/2,"px, ").concat((C-o)/2,"px) scale(").concat(this._currentScale,")"));break;case 90:g.style.width=C+"px",g.style.height=B+"px",(B-C)/2,this._pages[I].width=C,this._pages[I].height=B,Q.setAttribute("style","width:".concat(i,"px;height:").concat(o,"px;transform: translate(").concat((C-i)/2,"px, ").concat((B-o)/2,"px) rotate(").concat(A,"deg) scale(").concat(this._currentScale,")"));break;case 180:g.style.width=B+"px",g.style.height=C+"px",0,this._pages[I].width=B,this._pages[I].height=C,Q.setAttribute("style","width:".concat(i,"px;height:").concat(o,"px;transform:rotate(",180,"deg) translate(").concat(-(B-i)/2,"px, ").concat(-(C-o)/2,"px) scale(").concat(this._currentScale,")"));break;case 270:g.style.width=C+"px",g.style.height=B+"px",-(B-C)/2,this._pages[I].width=C,this._pages[I].height=B,Q.setAttribute("style","width:".concat(i,"px;height:").concat(o,"px;transform: translate(").concat((C-i)/2,"px, ").concat((B-o)/2,"px) rotate(",270,"deg) scale(").concat(this._currentScale,")"))}this._pages[I].scale=this._currentScale;var D={width:this._pages[I].width,height:this._pages[I].height,scale:this._currentScale};this._pages[I].viewport=D}if(0!==this.lastViewerHeight&&0!==this.lastViewerContainerScrollTop){var t=document.getElementById("viewer").scrollHeight;document.getElementById("viewerContainer").scrollTo({top:this.lastViewerContainerScrollTop/this.lastViewerHeight*t})}if(0!==this.lastViewerWidth&&0!==this.lastViewerContainerScrollLeft){var h=document.getElementById("viewer").scrollWidth;document.getElementById("viewerContainer").scrollTo({left:this.lastViewerContainerScrollLeft/this.lastViewerWidth*h})}this.eventBus.dispatch("viewportchanging",{source:this})}},{key:"initDiv",value:function(){var A=this.viewer;this._pages=[],this.emptyNode(A);var I=this;A.addEventListener("click",(function(){I.eventBus.dispatch("pageViewerClick",{source:I})}));for(var g=0;g<this.pageCount;++g){var B=document.createElement("div");B.classList.add("page"),B.id="page_"+g;var C=this.coreHelper.pageRenderWidth(0,g,this.core),Q=this.coreHelper.pageRenderHeight(0,g,this.core);B.style.width=C+"px",B.style.height=Q+"px",B.style.overflow="hidden",B.style.position="relative";var E=document.createElement("div");B.style.width=C+"px",B.style.height=Q+"px",0;var i=new G.Ofd_Core_Helper,o=i.pageRenderWidth(0,g,this.core),D=i.pageRenderHeight(0,g,this.core);E.style.width=o+"px",E.style.height=D+"px",E.style.overflow="hidden",E.style.transform="translate(".concat((C-o)/2,"px, ").concat((Q-D)/2,"px) scale(").concat(this._currentScale,")"),B.appendChild(E),A.appendChild(B),0===g&&E.appendChild(this.initLoadingImg());var t={width:C,height:Q,scale:this._currentScale};this._pages.push({div:B,viewport:t,id:g+1,renderingState:s.RenderingStates.INITIAL,scale:this._currentScale,width:C,height:Q})}this.jumpPage({pageIndex:this.currentPage})}},{key:"currentPageNumber",get:function(){return this.currentPage}},{key:"_setCurrentPageNumber",value:function(A){if(this.currentPage===A)return!0;if(!(0<A&&A<=this.pageCount))return!1;var I=this.currentPage;return this.currentPage=A,this.eventBus.dispatch("pagechanging",{source:this,pageNumber:A,pageLabel:null,previous:I}),!0}},{key:"setRotation",value:function(A){A+=this._pagesRotation,Object(s.isValidRotation)(A),(A%=360)<0&&(A+=360),this._pagesRotation!==A&&this.core&&(this._pagesRotation=A,this.reformDiv(this._pagesRotation,!0),this.updateView())}},{key:"increaseScale",value:function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,I=this._currentScale;do{I=(I*s.DEFAULT_SCALE_DELTA).toFixed(2),I=Math.ceil(10*I)/10,I=Math.min(s.MAX_SCALE,I)}while(--A>0&&I<s.MAX_SCALE);this._setScale(I)}},{key:"decreaseScale",value:function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,I=this._currentScale;do{I=(I/s.DEFAULT_SCALE_DELTA).toFixed(2),I=Math.floor(10*I)/10,I=Math.max(s.MIN_SCALE,I)}while(--A>0&&I>s.MIN_SCALE);this._setScale(I)}},{key:"zoom",value:function(A){this._setScale(A)}},{key:"_setScale",value:function(A){var I=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.lastViewerHeight=document.getElementById("viewer").scrollHeight,this.lastViewerWidth=document.getElementById("viewer").scrollWidth,this.lastViewerContainerScrollTop=document.getElementById("viewerContainer").scrollTop,this.lastViewerContainerScrollLeft=document.getElementById("viewerContainer").scrollLeft;var g=parseFloat(A);if(g>0)this._setScaleUpdatePages(g,A,I,!1);else{var B=this._pages[0];if(!B)return;var C=s.SCROLLBAR_PADDING,Q=s.VERTICAL_PADDING,E=(this.container.clientWidth-C)/B.width*B.scale/1,i=(this.container.clientHeight-Q)/B.height*B.scale;switch(A){case"page-actual":g=1;break;case"page-width":g=E;break;case"page-height":g=i;break;case"page-fit":g=Math.min(E,i);break;case"auto":var o=Object(s.isPortraitOrientation)(B)?E:Math.min(i,E);g=Math.min(s.MAX_AUTO_SCALE,o);break;default:return}this._setScaleUpdatePages(g,A,I,!0)}}},{key:"isSameScale",value:function(A){return A===this._currentScale||Math.abs(A-this._currentScale)<1e-15}},{key:"ensurePageViewVisible",value:function(){if(this._scrollMode!==s.ScrollMode.PAGE)throw new Error("#ensurePageViewVisible: Invalid scrollMode value.");var A=this.currentPageNumber,I=this.scrollModePageState,g=this.viewer;if(g.textContent="",I.pages.length=0,this._spreadMode===s.SpreadMode.NONE){var B=this._pages[A-1];B.renderingState===s.RenderingStates.INITIAL&&this.forceRendering(B),g.appendChild(B.div)}else{var C=new Set,Q=this._spreadMode-1;A%2!==Q?(C.add(A-1),C.add(A)):(C.add(A-2),C.add(A-1));var E,i=null,o=y(C);try{for(o.s();!(E=o.n()).done;){var D=E.value,t=this._pages[D];t&&(null===i?((i=document.createElement("div")).className="spread",g.appendChild(i)):D%2===Q&&(i=i.cloneNode(!1),g.appendChild(i)),i.appendChild(t.div))}}catch(A){o.e(A)}finally{o.f()}}I.scrollDown=A>=I.previousPageNumber,I.previousPageNumber=A}},{key:"_setScaleUpdatePages",value:function(A,I){var g=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this._currentScaleValue=I.toString(),this.isSameScale(A)?g&&this.eventBus.dispatch("scalechanging",{source:this,scale:A,presetValue:I}):(this._currentScale=A,this.resetPageScale(),this.eventBus.dispatch("scalechanging",{source:this,scale:A,presetValue:g?I:void 0}))}},{key:"setSpreadMode",value:function(A){if(this._spreadMode!==A){if(!Object(s.isValidSpreadMode)(A))throw new Error("Invalid spread mode: ".concat(A));this._spreadMode=A,this.eventBus.dispatch("spreadmodechanged",{source:this,mode:A}),this._updateSpreadMode(this.currentPage)}}},{key:"_updateSpreadMode",value:function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,I=this._pages;if(this._scrollMode===s.ScrollMode.PAGE)this.ensurePageViewVisible();else if(this._spreadMode===s.SpreadMode.NONE){this.viewer.textContent="";for(var g=0,B=I.length;g<B;++g)this.viewer.appendChild(I[g].div)}else{this.viewer.textContent="";for(var C=this._spreadMode-1,Q=null,E=0,i=I.length;E<i;++E)null===Q?((Q=document.createElement("div")).className="spread",this.viewer.appendChild(Q)):E%2===C&&(Q=Q.cloneNode(!1),this.viewer.appendChild(Q)),Q.appendChild(I[E].div)}A&&(this._currentScale&&isNaN(this._currentScale)&&this._setScale(this._currentScale,!0),this._setCurrentPageNumber(A,!0),this.updateView())}},{key:"setScrollMode",value:function(A){if(this._scrollMode!==A){if(!Object(s.isValidScrollMode)(A))throw new Error("Invalid scroll mode: ".concat(A));this.pageCount>15e3||(this._previousScrollMode=this._scrollMode,this._scrollMode=A,this.eventBus.dispatch("scrollmodechanged",{source:this,mode:A}),this._updateScrollMode(this.currentPage))}}},{key:"_updateScrollMode",value:function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,I=this._scrollMode;this.viewer.classList.toggle("scrollHorizontal",I===s.ScrollMode.HORIZONTAL),this.viewer.classList.toggle("scrollWrapped",I===s.ScrollMode.WRAPPED),this.core&&(I===s.ScrollMode.PAGE?this.ensurePageViewVisible():this._previousScrollMode===s.ScrollMode.PAGE&&this._updateSpreadMode(),this._currentScale&&isNaN(this._currentScale)&&this._setScale(this._currentScale,!0),this._setCurrentPageNumber(A,!0),this.updateView())}},{key:"firstPage",value:function(){this._scrollMode===s.ScrollMode.PAGE?(this._setCurrentPageNumber(1),this.ensurePageViewVisible()):this.viewer.children.item(0).scrollIntoView(!0);return!0}},{key:"lastPage",value:function(){this._scrollMode===s.ScrollMode.PAGE?(this._setCurrentPageNumber(this.pageCount),this.ensurePageViewVisible()):this.viewer.children.item(this.pageCount-1).scrollIntoView(!0);return!0}},{key:"nextPage",value:function(){var A=this.currentPage;if(A>=this.pageCount)return!1;this._scrollMode===s.ScrollMode.PAGE?(this._setCurrentPageNumber(A+1),this.ensurePageViewVisible()):this.viewer.children.item(A).scrollIntoView(!0);return!0}},{key:"previousPage",value:function(){var A=this.currentPage;if(A<=1)return!1;this._scrollMode===s.ScrollMode.PAGE?(this._setCurrentPageNumber(A-1),this.ensurePageViewVisible()):this.viewer.children.item(A-2).scrollIntoView(!0);return!0}},{key:"jumpPage",value:function(A){(this.jumpPageEvt=A,this._scrollMode===s.ScrollMode.PAGE)?(A.pageIndex&&this._setCurrentPageNumber(A.pageIndex),this.ensurePageViewVisible()):(this.viewer.children.item(A.pageIndex-1).scrollIntoView(!0),this.highLightEle())}},{key:"freeDocument",value:function(){this.currentPage=1,this.pageCount=0,this._pages=[],this.emptyNode(this.viewer)}},{key:"initLoadingImg",value:function(){var A=new Image;return A.style.position="absolute",A.style.left=0,A.style.right=0,A.style.margin="auto",A.style.top=0,A.style.bottom=0,A.src="data:image/gif;base64,R0lGODlhNgA3APMAAP///zAyOJKTlkdJTzw+RN/g4XV2euPj5M/Q0WtscaChpDAyODAyODAyODAyODAyOCH5BAkKAAAAIf4aQ3JlYXRlZCB3aXRoIGFqYXhsb2FkLmluZm8AIf8LTkVUU0NBUEUyLjADAQAAACwAAAAANgA3AAAEzBDISau9OOvNu/9gKI5kaZ4lkhBEgqCnws6EApMITb93uOqsRC8EpA1Bxdnx8wMKl51ckXcsGFiGAkamsy0LA9pAe1EFqRbBYCAYXXUGk4DWJhZN4dlAlMSLRW80cSVzM3UgB3ksAwcnamwkB28GjVCWl5iZmpucnZ4cj4eWoRqFLKJHpgSoFIoEe5ausBeyl7UYqqw9uaVrukOkn8LDxMXGx8ibwY6+JLxydCO3JdMg1dJ/Is+E0SPLcs3Jnt/F28XXw+jC5uXh4u89EQAh+QQJCgAAACwAAAAANgA3AAAEzhDISau9OOvNu/9gKI5kaZ5oqhYGQRiFWhaD6w6xLLa2a+iiXg8YEtqIIF7vh/QcarbB4YJIuBKIpuTAM0wtCqNiJBgMBCaE0ZUFCXpoknWdCEFvpfURdCcM8noEIW82cSNzRnWDZoYjamttWhphQmOSHFVXkZecnZ6foKFujJdlZxqELo1AqQSrFH1/TbEZtLM9shetrzK7qKSSpryixMXGx8jJyifCKc1kcMzRIrYl1Xy4J9cfvibdIs/MwMue4cffxtvE6qLoxubk8ScRACH5BAkKAAAALAAAAAA2ADcAAATOEMhJq7046827/2AojmRpnmiqrqwwDAJbCkRNxLI42MSQ6zzfD0Sz4YYfFwyZKxhqhgJJeSQVdraBNFSsVUVPHsEAzJrEtnJNSELXRN2bKcwjw19f0QG7PjA7B2EGfn+FhoeIiYoSCAk1CQiLFQpoChlUQwhuBJEWcXkpjm4JF3w9P5tvFqZsLKkEF58/omiksXiZm52SlGKWkhONj7vAxcbHyMkTmCjMcDygRNAjrCfVaqcm11zTJrIjzt64yojhxd/G28XqwOjG5uTxJhEAIfkECQoAAAAsAAAAADYANwAABM0QyEmrvTjrzbv/YCiOZGmeaKqurDAMAlsKRE3EsjjYxJDrPN8PRLPhhh8XDMk0KY/OF5TIm4qKNWtnZxOWuDUvCNw7kcXJ6gl7Iz1T76Z8Tq/b7/i8qmCoGQoacT8FZ4AXbFopfTwEBhhnQ4w2j0GRkgQYiEOLPI6ZUkgHZwd6EweLBqSlq6ytricICTUJCKwKkgojgiMIlwS1VEYlspcJIZAkvjXHlcnKIZokxJLG0KAlvZfAebeMuUi7FbGz2z/Rq8jozavn7Nev8CsRACH5BAkKAAAALAAAAAA2ADcAAATLEMhJq7046827/2AojmRpnmiqrqwwDAJbCkRNxLI42MSQ6zzfD0Sz4YYfFwzJNCmPzheUyJuKijVrZ2cTlrg1LwjcO5HFyeoJeyM9U++mfE6v2+/4PD6O5F/YWiqAGWdIhRiHP4kWg0ONGH4/kXqUlZaXmJlMBQY1BgVuUicFZ6AhjyOdPAQGQF0mqzauYbCxBFdqJao8rVeiGQgJNQkIFwdnB0MKsQrGqgbJPwi2BMV5wrYJetQ129x62LHaedO21nnLq82VwcPnIhEAIfkECQoAAAAsAAAAADYANwAABMwQyEmrvTjrzbv/YCiOZGmeaKqurDAMAlsKRE3EsjjYxJDrPN8PRLPhhh8XDMk0KY/OF5TIm4qKNWtnZxOWuDUvCNw7kcXJ6gl7Iz1T76Z8Tq/b7/g8Po7kX9haKoAZZ0iFGIc/iRaDQ40Yfj+RepSVlpeYAAgJNQkIlgo8NQqUCKI2nzNSIpynBAkzaiCuNl9BIbQ1tl0hraewbrIfpq6pbqsioaKkFwUGNQYFSJudxhUFZ9KUz6IGlbTfrpXcPN6UB2cHlgfcBuqZKBEAIfkECQoAAAAsAAAAADYANwAABMwQyEmrvTjrzbv/YCiOZGmeaKqurDAMAlsKRE3EsjjYxJDrPN8PRLPhhh8XDMk0KY/OF5TIm4qKNWtnZxOWuDUvCNw7kcXJ6gl7Iz1T76Z8Tq/b7yJEopZA4CsKPDUKfxIIgjZ+P3EWe4gECYtqFo82P2cXlTWXQReOiJE5bFqHj4qiUhmBgoSFho59rrKztLVMBQY1BgWzBWe8UUsiuYIGTpMglSaYIcpfnSHEPMYzyB8HZwdrqSMHxAbath2MsqO0zLLorua05OLvJxEAIfkECQoAAAAsAAAAADYANwAABMwQyEmrvTjrzbv/YCiOZGmeaKqurDAMAlsKRE3EsjjYxJDrPN8PRLPhfohELYHQuGBDgIJXU0Q5CKqtOXsdP0otITHjfTtiW2lnE37StXUwFNaSScXaGZvm4r0jU1RWV1hhTIWJiouMjVcFBjUGBY4WBWw1A5RDT3sTkVQGnGYYaUOYPaVip3MXoDyiP3k3GAeoAwdRnRoHoAa5lcHCw8TFxscduyjKIrOeRKRAbSe3I9Um1yHOJ9sjzCbfyInhwt3E2cPo5dHF5OLvJREAOw==",A.draggable=!1,A}},{key:"setWaterText",value:function(A){this.ofdRender.coreHelper.setWaterText(A)}},{key:"setOfdCore",value:function(A){this.core=A,this.ofdRender.setOfdCore(this.core),this.ofdCanvasRender.setOfdCore(this.core),this._spreadMode=s.SpreadMode.NONE,this._scrollMode=s.ScrollMode.VERTICAL,this._pagesRotation=0,this.pageCount=this.core.getOFDPageCount(0),this.eventBus.dispatch("pagechanging",{source:this,pageNumber:1,pageLabel:null,previous:1}),this.viewer.scrollTo(0,0);var I=s.SCROLLBAR_PADDING,g=(s.VERTICAL_PADDING,this.container.clientWidth,new G.Ofd_Core_Helper(96)),B=(this.container.clientWidth-I)/g.pageRenderWidth(0,0,this.core)*1/1,C=Math.min(s.MAX_AUTO_SCALE,B);this._currentScale=C,this.coreHelper.setDpi(96*C),this.initDiv(0),this.updateView(),this.eventBus.dispatch("scalechanging",{source:this,scale:C,presetValue:"auto"}),this.eventBus.dispatch("viewportchanging",{source:this}),this.scrollModePageState={previousPageNumber:1,scrollDown:!0,pages:[]}}}]),A}()},function(A,I){A.exports=function(A,I,g){return I in A?Object.defineProperty(A,I,{value:g,enumerable:!0,configurable:!0,writable:!0}):A[I]=g,A},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I,g){"use strict";g.r(I),g.d(I,"animationStarted",(function(){return j})),g.d(I,"apiPageLayoutToViewerModes",(function(){return P})),g.d(I,"apiPageModeToSidebarView",(function(){return _})),g.d(I,"approximateFraction",(function(){return u})),g.d(I,"AutoPrintRegExp",(function(){return k})),g.d(I,"backtrackBeforeAllVisibleElements",(function(){return b})),g.d(I,"binarySearchFirstItem",(function(){return f})),g.d(I,"DEFAULT_SCALE",(function(){return w})),g.d(I,"DEFAULT_SCALE_DELTA",(function(){return s})),g.d(I,"DEFAULT_SCALE_VALUE",(function(){return h})),g.d(I,"getActiveOrFocusedElement",(function(){return z})),g.d(I,"getPageSizeInches",(function(){return m})),g.d(I,"getVisibleElements",(function(){return Z})),g.d(I,"isPortraitOrientation",(function(){return T})),g.d(I,"isValidRotation",(function(){return V})),g.d(I,"isValidScrollMode",(function(){return v})),g.d(I,"isValidSpreadMode",(function(){return X})),g.d(I,"MAX_AUTO_SCALE",(function(){return G})),g.d(I,"MAX_SCALE",(function(){return e})),g.d(I,"MIN_SCALE",(function(){return a})),g.d(I,"noContextMenuHandler",(function(){return q})),g.d(I,"normalizeWheelEventDelta",(function(){return x})),g.d(I,"normalizeWheelEventDirection",(function(){return W})),g.d(I,"OutputScale",(function(){return Y})),g.d(I,"parseQueryString",(function(){return K})),g.d(I,"PresentationModeState",(function(){return R})),g.d(I,"ProgressBar",(function(){return O})),g.d(I,"removeNullCharacters",(function(){return l})),g.d(I,"RendererType",(function(){return N})),g.d(I,"RenderingStates",(function(){return n})),g.d(I,"roundToDivide",(function(){return p})),g.d(I,"SCROLLBAR_PADDING",(function(){return y})),g.d(I,"scrollIntoView",(function(){return d})),g.d(I,"ScrollMode",(function(){return U})),g.d(I,"SidebarView",(function(){return r})),g.d(I,"SpreadMode",(function(){return S})),g.d(I,"TextLayerMode",(function(){return M})),g.d(I,"UNKNOWN_SCALE",(function(){return c})),g.d(I,"VERTICAL_PADDING",(function(){return F})),g.d(I,"watchScroll",(function(){return H}));var B=g(21),C=g.n(B),Q=g(2),E=g.n(Q),i=g(1),o=g.n(i);function D(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return t(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return t(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function t(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var h="auto",w=1,s=1.1,a=.1,e=10,c=0,G=1.25,y=40,F=5,n={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3},R={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3},r={UNKNOWN:-1,NONE:0,THUMBS:1,OUTLINE:2,ATTACHMENTS:3,LAYERS:4,SIGNATURES:5},N={CANVAS:"canvas",SVG:"svg"},M={DISABLE:0,ENABLE:1,ENABLE_ENHANCE:2},U={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2,PAGE:3},S={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2},k=/\bprint\s*\(/,Y=function(){function A(){E()(this,A);var I=window.devicePixelRatio||1;this.sx=I,this.sy=I}return o()(A,[{key:"scaled",get:function(){return 1!==this.sx||1!==this.sy}}]),A}();function d(A,I){var g=arguments.length>2&&void 0!==arguments[2]&&arguments[2],B=A.offsetParent;if(B){for(var C=A.offsetTop+A.clientTop,Q=A.offsetLeft+A.clientLeft;B.clientHeight===B.scrollHeight&&B.clientWidth===B.scrollWidth||g&&(B.classList.contains("markedContent")||"hidden"===getComputedStyle(B).overflow);)if(C+=B.offsetTop,Q+=B.offsetLeft,!(B=B.offsetParent))return;I&&(void 0!==I.top&&(C+=I.top),void 0!==I.left&&(Q+=I.left,B.scrollLeft=Q)),B.scrollTop=C}}function H(A,I){var g=function(g){C||(C=window.requestAnimationFrame((function(){C=null;var g=A.scrollLeft,Q=B.lastX;g!==Q&&(B.right=g>Q),B.lastX=g;var E=A.scrollTop,i=B.lastY;E!==i&&(B.down=E>i),B.lastY=E,I(B)})))},B={right:!0,down:!0,lastX:A.scrollLeft,lastY:A.scrollTop,_eventHandler:g},C=null;return A.addEventListener("scroll",g,!0),B}function K(A){var I,g=new Map,B=D(new URLSearchParams(A));try{for(B.s();!(I=B.n()).done;){var Q=C()(I.value,2),E=Q[0],i=Q[1];g.set(E.toLowerCase(),i)}}catch(A){B.e(A)}finally{B.f()}return g}var J=/\x00/g,L=/[\x01-\x1F]/g;function l(A){var I=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"string"!=typeof A?A:(I&&(A=A.replace(L," ")),A.replace(J,""))}function f(A,I){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,B=g,C=A.length-1;if(C<0||!I(A[C]))return A.length;if(I(A[B]))return B;for(;B<C;){var Q=B+C>>1,E=A[Q];I(E)?C=Q:B=Q+1}return B}function u(A){if(Math.floor(A)===A)return[A,1];var I=1/A;if(I>8)return[1,8];if(Math.floor(I)===I)return[1,I];for(var g=A>1?I:A,B=0,C=1,Q=1,E=1;;){var i=B+Q,o=C+E;if(o>8)break;g<=i/o?(Q=i,E=o):(B=i,C=o)}return g-B/C<Q/E-g?g===A?[B,C]:[C,B]:g===A?[Q,E]:[E,Q]}function p(A,I){var g=A%I;return 0===g?A:Math.round(A-g+I)}function m(A){var I=A.view,g=A.userUnit,B=A.rotate,Q=C()(I,4),E=Q[0],i=Q[1],o=B%180!=0,D=(Q[2]-E)/72*g,t=(Q[3]-i)/72*g;return{width:o?t:D,height:o?D:t}}function b(A,I,g){if(A<2)return A;var B=I[A].div,C=B.offsetTop+B.clientTop;C>=g&&(C=(B=I[A-1].div).offsetTop+B.clientTop);for(var Q=A-2;Q>=0&&!((B=I[Q].div).offsetTop+B.clientTop+B.clientHeight<=C);--Q)A=Q;return A}function Z(A){var I=A.scrollEl,g=A.views,B=A.sortByVisibility,C=void 0!==B&&B,Q=A.horizontal,E=void 0!==Q&&Q,i=A.rtl,o=void 0!==i&&i,D=I.scrollTop,t=D+I.clientHeight,h=I.scrollLeft,w=h+I.clientWidth;var s=[],a=new Set,e=g.length,c=f(g,E?function(A){var I=A.div,g=I.offsetLeft+I.clientLeft,B=g+I.clientWidth;return o?g<w:B>h}:function(A){var I=A.div;return I.offsetTop+I.clientTop+I.clientHeight>D});c>0&&c<e&&!E&&(c=b(c,g,D));for(var G=E?w:-1,y=c;y<e;y++){var F=g[y],n=F.div,R=n.offsetLeft+n.clientLeft,r=n.offsetTop+n.clientTop,N=n.clientWidth,M=n.clientHeight,U=R+N,S=r+M;if(-1===G)S>=t&&(G=S);else if((E?R:r)>G)break;if(!(S<=D||r>=t||U<=h||R>=w)){var k=Math.max(0,D-r)+Math.max(0,S-t),Y=(N-(Math.max(0,h-R)+Math.max(0,U-w)))/N,d=(M-k)/M*Y*100|0;s.push({id:F.id,x:R,y:r,view:F,percent:d,widthPercent:100*Y|0}),a.add(F.id)}}var H=s[0],K=s[s.length-1];return C&&s.sort((function(A,I){var g=A.percent-I.percent;return Math.abs(g)>.001?-g:A.id-I.id})),{first:H,last:K,views:s,ids:a}}function q(A){A.preventDefault()}function W(A){var I=Math.hypot(A.deltaX,A.deltaY),g=Math.atan2(A.deltaY,A.deltaX);return-.25*Math.PI<g&&g<.75*Math.PI&&(I=-I),I}function x(A){var I=W(A);return 0===A.deltaMode?I/=900:1===A.deltaMode&&(I/=30),I}function V(A){return Number.isInteger(A)&&A%90==0}function v(A){return Number.isInteger(A)&&Object.values(U).includes(A)&&A!==U.UNKNOWN}function X(A){return Number.isInteger(A)&&Object.values(S).includes(A)&&A!==S.UNKNOWN}function T(A){return A.width<=A.height}var j=new Promise((function(A){"undefined"!=typeof PDFJSDev&&PDFJSDev.test("LIB")&&"undefined"==typeof window?setTimeout(A,20):window.requestAnimationFrame(A)}));var O=function(){function A(I){var g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},B=g.height,C=g.width,Q=g.units;E()(this,A),this.visible=!0,this.div=document.querySelector(I+" .progress"),this.bar=this.div.parentNode,this.height=B||100,this.width=C||100,this.units=Q||"%",this.div.style.height=this.height+this.units,this.percent=0}return o()(A,[{key:"_updateBar",value:function(){if(this._indeterminate)return this.div.classList.add("indeterminate"),void(this.div.style.width=this.width+this.units);this.div.classList.remove("indeterminate");var A=this.width*this._percent/100;this.div.style.width=A+this.units}},{key:"percent",get:function(){return this._percent},set:function(A){var I,g,B;this._indeterminate=isNaN(A),this._percent=(I=A,g=0,B=100,Math.min(Math.max(I,g),B)),this._updateBar()}},{key:"setWidth",value:function(A){if(A){var I=A.parentNode.offsetWidth-A.offsetWidth;if(I>0)document.documentElement.style.setProperty("--loadingBar-end-offset","".concat(I,"px"))}}},{key:"hide",value:function(){this.visible&&(this.visible=!1,this.bar.classList.add("hidden"))}},{key:"show",value:function(){this.visible||(this.visible=!0,this.bar.classList.remove("hidden"))}}]),A}();function z(){for(var A=document,I=A.activeElement||A.querySelector(":focus");I&&I.shadowRoot;)I=(A=I.shadowRoot).activeElement||A.querySelector(":focus");return I}function P(A){var I=U.VERTICAL,g=S.NONE;switch(A){case"SinglePage":I=U.PAGE;break;case"OneColumn":break;case"TwoPageLeft":I=U.PAGE;case"TwoColumnLeft":g=S.ODD;break;case"TwoPageRight":I=U.PAGE;case"TwoColumnRight":g=S.EVEN}return{scrollMode:I,spreadMode:g}}function _(A){switch(A){case"UseNone":return r.NONE;case"UseThumbs":return r.THUMBS;case"UseOutlines":return r.OUTLINE;case"UseAttachments":return r.ATTACHMENTS;case"UseOC":return r.LAYERS}return r.NONE}},function(A,I,g){var B=g(22),C=g(23),Q=g(24),E=g(26);A.exports=function(A,I){return B(A)||C(A,I)||Q(A,I)||E()},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I){A.exports=function(A){if(Array.isArray(A))return A},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I){A.exports=function(A,I){var g=null==A?null:"undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(null!=g){var B,C,Q=[],E=!0,i=!1;try{for(g=g.call(A);!(E=(B=g.next()).done)&&(Q.push(B.value),!I||Q.length!==I);E=!0);}catch(A){i=!0,C=A}finally{try{E||null==g.return||g.return()}finally{if(i)throw C}}return Q}},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I,g){var B=g(25);A.exports=function(A,I){if(A){if("string"==typeof A)return B(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);return"Object"===g&&A.constructor&&(g=A.constructor.name),"Map"===g||"Set"===g?Array.from(A):"Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?B(A,I):void 0}},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I){A.exports=function(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I){A.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I,g){"use strict";g.r(I),g.d(I,"getHighestPriority",(function(){return C}));var B=g(20);function C(A,I,g){var B=arguments.length>3&&void 0!==arguments[3]&&arguments[3],C=A.views,E=C.length;if(0===E)return null;for(var i=0;i<E;i++){var o=C[i].view;if(!Q(o))return o}var D=A.first.id,t=A.last.id;if(t-D+1>E)for(var h=A.ids,w=1,s=t-D;w<s;w++){var a=g?D+w:t-w;if(!h.has(a)){var e=I[a-1];if(!Q(e))return e}}var c=g?t:D-2,G=I[c];return G&&!Q(G)||B&&(G=I[c+=g?1:-1])&&!Q(G)?G:null}function Q(A){return A.renderingState===B.RenderingStates.FINISHED}},function(A,I,g){"use strict";g.r(I),g.d(I,"Ofd_Render",(function(){return c}));var B=g(3),C=g.n(B),Q=g(2),E=g.n(Q),i=g(1),o=g.n(i),D=g(4),t=g.n(D),h=g(29),w=g(30),s=g(33);g(34);function a(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return e(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return e(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function e(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var c=function(){function A(I,g){E()(this,A),this.core=I,this.coreHelper=g,this.mixBlendMode="darken"}var I,g,B;return o()(A,[{key:"setDpi",value:function(A){this.coreHelper.setDpi(A)}},{key:"setOfdCore",value:function(A){this.core=A}},{key:"setMixBlendMode",value:function(A){this.mixBlendMode=A}},{key:"renderPage",value:(B=C()(t.a.mark((function A(I,g,B,C){var Q,E,i,o,D,w,e,c,G,y,F,n,R,r,N,M,U,S,k,Y,d,H,K,J,L,l,f,u,p,m,b,Z,q,W,x,V,v,X,T,j,O,z,P,_,$,AA,IA,gA,BA;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(Q=C?C.readOfdDocument(g):this.core.readOfdDocument(g),E=C?C.readOfdPage(g,B):this.core.readOfdPage(g,B),this.coreHelper.waterText&&I.appendChild(this.watermark({watermark_txt:this.coreHelper.waterText})),i=E.Page.Template,o=Q.Annotations?Q.Annotations:[],D=C?C.readOfdTemplatePage(g):this.core.readOfdTemplatePage(g),w=Q.Signatures?Q.Signatures.Signature:[],e=Q.CommonData.Res.Fonts,c=Q.CommonData.Res.DrawParams,Q.CommonData.Res.ColorSpaces,G=Q.CommonData.Res.CompositeGraphicUnits,y=Q.CommonData.Res.MultiMedias,!i){A.next=47;break}F=a(i),A.prev=14,F.s();case 16:if((n=F.n()).done){A.next=39;break}R=n.value,r=a(D),A.prev=19,r.s();case 21:if((N=r.n()).done){A.next=29;break}if((M=N.value).ID!=R.TemplateID){A.next=27;break}if((M=C?C.readPageFromTemplate(M):this.core.readPageFromTemplate(M)).Page.Content){U=M.Page.Content.Layer,S=a(U);try{for(S.s();!(k=S.n()).done;)Y=k.value,this.renderLayer(B,I,e,c,y,G,Y,!1)}catch(A){S.e(A)}finally{S.f()}}return A.abrupt("break",29);case 27:A.next=21;break;case 29:A.next=34;break;case 31:A.prev=31,A.t0=A.catch(19),r.e(A.t0);case 34:return A.prev=34,r.f(),A.finish(34);case 37:A.next=16;break;case 39:A.next=44;break;case 41:A.prev=41,A.t1=A.catch(14),F.e(A.t1);case 44:return A.prev=44,F.f(),A.finish(44);case 47:if(E.Page.Content){d=E.Page.Content.Layer,H=a(d);try{for(H.s();!(K=H.n()).done;)J=K.value,this.renderLayer(B,I,e,c,y,G,J,!1)}catch(A){H.e(A)}finally{H.f()}}L=a(o),A.prev=49,L.s();case 51:if((l=L.n()).done){A.next=59;break}if(f=l.value,E.ID!=f.PageID){A.next=57;break}u=a(f.PageAnnot.Annot);try{for(u.s();!(p=u.n()).done;)m=p.value,this.renderAnnotation(I,m,e,c,y,G,B)}catch(A){u.e(A)}finally{u.f()}return A.abrupt("break",59);case 57:A.next=51;break;case 59:A.next=64;break;case 61:A.prev=61,A.t2=A.catch(49),L.e(A.t2);case 64:return A.prev=64,L.f(),A.finish(64);case 67:b=a(w),A.prev=68,b.s();case 70:if((Z=b.n()).done){A.next=105;break}q=Z.value,W=a(q.Signature.SignedInfo.StampAnnot),A.prev=73,W.s();case 75:if((x=W.n()).done){A.next=95;break}if(V=x.value,v=V.PageRef,E.ID!=v){A.next=93;break}if(X=V.Boundary,!(q.Signature.PicType&&q.Signature.PicType.length>0)){A.next=93;break}if("ofd"!==q.Signature.PicType){A.next=92;break}T=new s.Ofd_Core(q.Signature.ofd),j=0;case 84:if(!(j<T.getOFDPageCount(0))){A.next=90;break}return A.next=87,this.renderSealPage(I,j,T,!0,X,v,V.ID,B);case 87:j++,A.next=84;break;case 90:A.next=93;break;case 92:"svg"===q.Signature.PicType?(O=Object(h.converterBox)(X,this.coreHelper.dpi),(z=document.createElement("div")).innerHTML=q.Signature.svg,P=void 0,_=z.children[0].width.baseVal.value,$=z.children[0].height.baseVal.value,_!==O.w&&(P="transform-origin: 0px 0px; transform: scale(".concat(O.h/$<O.w/_?O.h/$:O.w/_,")")),z.setAttribute("style","".concat(P,"; position:absolute; left: ",0,"px; top: ",0,"px; width: ").concat(O.w,"px; height: ").concat(O.h,"px;")),(AA=document.createElement("div")).setAttribute("style","mix-blend-mode:".concat(this.mixBlendMode,";cursor: pointer;position:absolute; left: ").concat(O.x,"px; top: ").concat(O.y,"px; width: ").concat(O.w,"px; height: ").concat(O.h,"px;overflow:hidden")),AA.setAttribute("name","seal_img_div_".concat(B)),AA.setAttribute("data-signature-id",V.ID),AA.setAttribute("data-page-ref",v),AA.appendChild(z),I.appendChild(AA)):(IA=Object(h.converterBox)(X,this.coreHelper.dpi),gA="data:image/".concat(q.Signature.PicType,";base64,").concat(q.Signature.PicValue),(BA=this.renderImageOnDiv(B,I.style.width,I.style.height,gA,IA.w,IA.h,IA,V.Clip,!0,v,V.ID)).svg.setAttribute("style","".concat(BA.style,"left:").concat(BA.left,"px;top:").concat(BA.top,"px;mix-blend-mode:").concat(this.mixBlendMode)),q.Signature.PicType||BA.svg.removeChild(BA.svg.children[0]),I.appendChild(BA.svg));case 93:A.next=75;break;case 95:A.next=100;break;case 97:A.prev=97,A.t3=A.catch(73),W.e(A.t3);case 100:return A.prev=100,W.f(),A.finish(100);case 103:A.next=70;break;case 105:A.next=110;break;case 107:A.prev=107,A.t4=A.catch(68),b.e(A.t4);case 110:return A.prev=110,b.f(),A.finish(110);case 113:case"end":return A.stop()}}),A,this,[[14,41,44,47],[19,31,34,37],[49,61,64,67],[68,107,110,113],[73,97,100,103]])}))),function(A,I,g,C){return B.apply(this,arguments)})},{key:"throwWhite",value:(g=C()(t.a.mark((function A(I){return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",new Promise((function(A,g){var B=new Image;B.onload=function(){var I=B.width,g=B.height,C=document.createElement("canvas");C.style.width="".concat(I,"px"),C.style.height="".concat(g,"px"),C.width=I,C.height=g;var Q=C.getContext("2d");Q.drawImage(B,0,0,I,g);for(var E=Q.getImageData(0,0,I,g),i=E.data,o=0;o<i.length;o+=4)[i[o],i[o+1],i[o+2]].every((function(A){return A<256&&A>245}))&&(i[o+3]=0);Q.putImageData(E,0,0),A(C.toDataURL())},B.src=I})));case 1:case"end":return A.stop()}}),A)}))),function(A){return g.apply(this,arguments)})},{key:"renderAnnotation",value:function(A,I,g,B,C,Q,E){var i=document.createElement("div");i.setAttribute("style","overflow: hidden;;position:relative;");var o=I.Appearance.Boundary;if(o){var D=Object(h.converterBox)(o,this.coreHelper.dpi);i.setAttribute("style","mix-blend-mode:".concat(this.mixBlendMode,";overflow: visible;position:absolute; left: ").concat(D.x,"px; top: ").concat(D.y,"px; width: ").concat(D.w,"px; height: ").concat(D.h,"px"))}else i.setAttribute("style","mix-blend-mode:".concat(this.mixBlendMode,";overflow: visible;position:absolute; left: 0px; top: 0px; width: 1px; height: 1px"));var t=I.Appearance;this.renderLayer(E,i,g,B,C,Q,t,!1),A.appendChild(i)}},{key:"renderSealPage",value:(I=C()(t.a.mark((function A(I,g,B,C,Q,E,i,o){var D,w,s,a,e,c;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return D=Q,(s={x:0,y:0,w:B.pageWidth(0,g),h:B.pageHeight(0,g)}).w!==D.w&&(w="transform-origin: 0px 0px; transform: scale(".concat(D.h/s.h<D.w/s.w?D.h/s.h:D.w/s.w,")")),a=Object(h.converterBox)(D,this.coreHelper.dpi),(e=document.createElement("div")).setAttribute("name","seal_img_div_".concat(o)),e.setAttribute("style","".concat(w,";cursor: pointer; position:absolute; left: ",0,"px; top: ",0,"px; width: ").concat(a.w,"px; height: ").concat(a.h,"px;")),e.setAttribute("data-signature-id",i),e.setAttribute("data-page-ref",E),A.next=12,this.renderPage(e,0,g,B);case 12:(c=document.createElement("div")).setAttribute("style","mix-blend-mode:".concat(this.mixBlendMode,";position:absolute; left: ").concat(a.x,"px; top: ").concat(a.y,"px; width: ").concat(a.w,"px; height: ").concat(a.h,"px;overflow:hidden")),c.appendChild(e),I.appendChild(c);case 16:case"end":return A.stop()}}),A,this)}))),function(A,g,B,C,Q,E,i,o){return I.apply(this,arguments)})},{key:"renderLayer",value:function(A,I,g,B,C,Q,E,i,o,D,t){var w=null,s=null,e=Object(h.converterDpi)(.353,this.coreHelper.dpi),c=E.DrawParam;if(c&&Object(h.getDrawParam)(B,c)){var G=Object(h.getDrawParam)(B,c);Object(h.getDrawParam)(B,G.Relative)&&(G=Object(h.getDrawParam)(B,G.Relative)),G.FillColor&&(w=Object(h.parseColor)(G.FillColor.Value)),G.StrokeColor&&(s=Object(h.parseColor)(G.StrokeColor.Value)),G.LineWidth&&(e=Object(h.converterDpi)(G.LineWidth,this.coreHelper.dpi))}var y=E.PageBlock;if(y){var F,n=a(y);try{for(n.s();!(F=n.n()).done;){var R=F.value;if("ImageObject"==R.Type){var r=this.renderImageObject(A,I.style.width,I.style.height,C,R,i,D,t);r&&(r.svg.setAttribute("style","".concat(r.style,"left:").concat(r.left,"px;top:").concat(r.top,"px;")),I.appendChild(r.svg))}else if("PathObject"==R.Type){var N=this.renderPathObject(A,B,R,w,s,e,i,o,D,t,C,g);N.style&&(N.svg.setAttribute("style","".concat(N.style,"left:").concat(N.left,"px;top:").concat(N.top,"px;")),I.appendChild(N.svg))}else if("TextObject"==R.Type){var M=this.renderTextObject(I,g,R,w,s,B,o,D,t);M.childElementCount>0&&I.appendChild(M)}else if("CompositeObject"==R.Type){var U,S=a(Q);try{for(S.s();!(U=S.n()).done;){var k=U.value;if(k.ID===R.ResourceID){var Y=R.Alpha,d=R.Boundary,H=R.CTM;this.renderLayer(A,I,g,B,C,Q,k,!1,Y,d,H);break}}}catch(A){S.e(A)}finally{S.f()}}}}catch(A){n.e(A)}finally{n.f()}}}},{key:"renderImageObject",value:function(A,I,g,B,C,Q,E,i){var o=C.Boundary;o=Object(h.converterBox)(o,this.coreHelper.dpi);var D=C.ResourceID;if(!D)return null;var t=Object(h.getMultiMedia)(B,D);if(!t.MediaFile)return null;if(!(t.width>0||t.height>0)&&t.MediaFile){var s=Object(w.JSGetImageInfoByPath)(this.core.ofdParserPtr,t.MediaFile,t.MediaFileResPln,this.core.getDocPln(0));if("other"===s.ext)return null;t.width=s.width,t.height=s.height,t.FileBase64=s.fileBase64}var a=C.CTM,e=C.Clips,c=C.BlendMode,G=C.Alpha;return this.renderImageOnDiv(A,I,g,t.FileBase64,t.width,t.height,o,!1,Q,null,null,a,E,i,e,C.ID,c,G)}},{key:"renderImageOnDiv",value:function(A,I,g,B,C,Q,E,i,o,D,t,w,s,e,c,G,y,F){var n=parseFloat(I.replace("px","")),R=parseFloat(g.replace("px","")),r=E.w>n?n:E.w,N=E.h>R?R:E.h,M=document.createElementNS("http://www.w3.org/2000/svg","svg"),U=document.createElementNS("http://www.w3.org/2000/svg","image"),S="";o&&(S="cursor: pointer;",M.setAttribute("viewbox","0 0 ".concat(r," ").concat(N)),M.setAttribute("name","seal_img_div_".concat(A)),M.setAttribute("data-signature-id",t),M.setAttribute("data-page-ref",D),U.setAttribute("preserveAspectRatio","none slice"));var k=C,Y=Q;U.setAttribute("xlink:href",B),U.href.baseVal=B,U.setAttribute("width","".concat(k,"px")),U.setAttribute("height","".concat(Y,"px")),F&&U.setAttribute("opacity","".concat(F/255));var d="";w&&(d="matrix(".concat(w.a/k/Object(h.ctmImageScale)(this.coreHelper.dpi)," ").concat(w.b/k/Object(h.ctmImageScale)(this.coreHelper.dpi)," ").concat(w.c/Y/Object(h.ctmImageScale)(this.coreHelper.dpi)," ").concat(w.d/Y/Object(h.ctmImageScale)(this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(w.e,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(w.f,this.coreHelper.dpi),")")),e&&(d="".concat(d," matrix(").concat(e.a," ").concat(e.b," ").concat(e.c," ").concat(e.d," ").concat(Object(h.converterDpi)(e.e,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(e.f,this.coreHelper.dpi),")")),U.setAttribute("transform",d);var H="";i&&(i=Object(h.converterBox)(i,this.coreHelper.dpi),H="clip: rect(".concat(i.y,"px, ").concat(i.w+i.x,"px, ").concat(i.h+i.y,"px, ").concat(i.x,"px)"));var K=!1;if(c&&c.length>0)for(var J=0;J<c.length;J++){var L=document.createElementNS("http://www.w3.org/2000/svg","clipPath");L.setAttribute("id","image-clip-path-".concat(G,"-").concat(J));for(var l=c[J].Clip,f=0;f<l.length;f++){var u=l[f].Area;K=!0;var p=0,m=0;u.Path.Boundary&&(p=u.Path.Boundary.x,m=u.Path.Boundary.y);var b=document.createElementNS("http://www.w3.org/2000/svg","path");if(u.CTM)w=u.CTM;else if(w&&0==w.b&&0==w.c){var Z="matrix(".concat(w.a," ").concat(w.b," ").concat(w.c," ").concat(w.d," ").concat(Object(h.converterDpi)(w.e,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(w.f,this.coreHelper.dpi),")");b.setAttribute("transform",Z)}var q,W="",x=a(u.Path.AbbreviatedData);try{for(x.s();!(q=x.n()).done;){var V=q.value;"M"===V.cmd||"S"===V.cmd?W+="M ".concat(Object(h.converterDpi)(V.crds[0]+p,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[1]+m,this.coreHelper.dpi)," "):"L"===V.cmd?W+="L ".concat(Object(h.converterDpi)(V.crds[0]+p,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[1]+m,this.coreHelper.dpi)," "):"B"===V.cmd?W+="C ".concat(Object(h.converterDpi)(V.crds[0]+p,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[1]+m,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[2]+p,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[3]+m,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[4]+p,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[5]+m,this.coreHelper.dpi)," "):"Q"===V.cmd?W+="Q ".concat(Object(h.converterDpi)(V.crds[0]+p,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[1]+m,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[2]+p,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[3]+m,this.coreHelper.dpi)," "):"A"===V.cmd?W+="A ".concat(Object(h.converterDpi)(V.crds[0],this.coreHelper.dpi),",").concat(Object(h.converterDpi)(V.crds[1],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[2],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[3],this.coreHelper.dpi),",").concat(Object(h.converterDpi)(V.crds[4],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[5],this.coreHelper.dpi),",").concat(Object(h.converterDpi)(V.crds[6],this.coreHelper.dpi)):"C"===V.cmd&&(W+="Z")}}catch(A){x.e(A)}finally{x.f()}b.setAttribute("d",W),L.appendChild(b)}M.appendChild(L)}M.appendChild(U);var v,X=E.x,T=E.y;if(e){var j=e.a,O=e.b,z=e.c,P=e.d,_=j>0?Math.sign(j)*Math.sqrt(j*j+z*z):Math.sqrt(j*j+z*z),$=P>0?Math.sign(P)*Math.sqrt(O*O+P*P):Math.sqrt(O*O+P*P);0==Math.atan2(-O,P)&&0!=j&&1==P||(T*=$,X*=_)}return K&&M.setAttribute("clip-path","url(#image-clip-path-".concat(G,"-0)")),y&&(v="mix-blend-mode: ".concat(y)),{svg:M,style:"".concat(S,"overflow: visible; position: absolute; width: ").concat(r,"px; height: ").concat(N,"px; ").concat(H,";").concat(v,";"),left:X,top:T}}},{key:"renderTextObject",value:function(A,I,g,B,C,Q,E,i,o){var D=1,t=g.Boundary;t=Object(h.converterBox)(t,this.coreHelper.dpi);var s=g.CTM,e=g.HScale,c=g.Font,G=g.Weight,y=g.Alpha/255,F=g.Size>0;s&&!F&&(s={a:-s.a,b:s.b,c:s.c,d:-s.d,e:-s.e,f:-s.f});var n=Object(h.converterDpi)(Math.abs(parseFloat(g.Size)),this.coreHelper.dpi),R=Object(h.calTextPoint)(this.coreHelper.dpi,g.TextCode,g.CGTransform,s,g.Boundary,i,o,F),r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("version","1.1"),r.setAttribute("id",g.ID);var N,M,U,S=g.FillColor,k=!1,Y=g.DrawParam;if(Y){var d=Object(h.getDrawParam)(Q,Y);d.FillColor&&(S&&S.Value||(S=d.FillColor))}if(S){S.Value&&(B=Object(h.parseColor)(S.Value)),D=S.alpha/255;var H=S.axialShd;if(H){k=!0;var K=document.createElementNS("http://www.w3.org/2000/svg","linearGradient");K.setAttribute("id","".concat(g.ID)),K.setAttribute("x1","0%"),K.setAttribute("y1","0%"),K.setAttribute("x2","100%"),K.setAttribute("y2","100%");var J,L=a(H.Segment);try{for(L.s();!(J=L.n()).done;){var l=J.value;if(l){var f=document.createElement("stop");f.setAttribute("offset","".concat(100*l.position,"%")),f.setAttribute("style","stop-color:".concat(Object(h.parseColor)(l.color.Value),";stop-opacity:1")),K.appendChild(f),B=Object(h.parseColor)(l.color.Value)}}}catch(A){L.e(A)}finally{L.f()}r.appendChild(K)}}g.Stroke&&(N=Object(h.parseColor)(g.StrokeColor.Value),M=g.LineWidth,U=g.LineWidth),g.Fill||(D=0);var u=t.w,p=t.h,m=t.x,b=t.y,Z=n,q=n,W=0;if(s){var x=s.a,V=s.b,v=s.c,X=s.d,T=x>0?Math.sign(x)*Math.sqrt(x*x+v*v):Math.sqrt(x*x+v*v),j=X>0?Math.sign(X)*Math.sqrt(V*V+X*X):Math.sqrt(V*V+X*X);0==(W=Math.atan2(-V,X))&&0!=x&&1==X||(Z*=T,q*=j,U*=T),0==W&&0!=x&&1==X&&(Z*=T,q*=j,U*=T),0==W&&e-0==1&&(e=x/X)>0&&(Z*=e)}if(o){var O=o.a,z=o.b,P=o.c,_=o.d,$=O>0?Math.sign(O)*Math.sqrt(O*O+P*P):Math.sqrt(O*O+P*P),AA=_>0?Math.sign(_)*Math.sqrt(z*z+_*_):Math.sqrt(z*z+_*_);0==(W=Math.atan2(-z,_))&&0!=O&&1==_||(Z*=$,q*=AA,b*=AA,m*=$,u*=$,p*=AA)}var IA=null,gA=g.Clips;if(gA&&gA.length>0)for(var BA=0;BA<gA.length;BA++){(IA=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-".concat(g.ID,"-").concat(BA));for(var CA=gA[BA].Clip,QA=0;QA<CA.length;QA++){var EA=CA[QA].Area,iA=document.createElementNS("http://www.w3.org/2000/svg","path"),oA="",DA=0,tA=0;EA.Path.Boundary&&(DA=EA.Path.Boundary.x,tA=EA.Path.Boundary.y);var hA,wA=a(EA.Path.AbbreviatedData);try{for(wA.s();!(hA=wA.n()).done;){var sA=hA.value;"M"===sA.cmd||"S"===sA.cmd?oA+="M ".concat(Object(h.converterDpi)(sA.crds[0]+DA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[1]+tA,this.coreHelper.dpi)," "):"L"===sA.cmd?oA+="L ".concat(Object(h.converterDpi)(sA.crds[0]+DA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[1]+tA,this.coreHelper.dpi)," "):"B"===sA.cmd?oA+="C ".concat(Object(h.converterDpi)(sA.crds[0]+DA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[1]+tA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[2]+DA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[3]+tA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[4]+DA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[5]+tA,this.coreHelper.dpi)," "):"Q"===sA.cmd?oA+="Q ".concat(Object(h.converterDpi)(sA.crds[0]+DA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[1]+tA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[2]+DA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[3]+tA,this.coreHelper.dpi)," "):"A"===sA.cmd?oA+="A ".concat(Object(h.converterDpi)(sA.crds[0],this.coreHelper.dpi),",").concat(Object(h.converterDpi)(sA.crds[1],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[2],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[3],this.coreHelper.dpi),",").concat(Object(h.converterDpi)(sA.crds[4],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[5],this.coreHelper.dpi),",").concat(Object(h.converterDpi)(sA.crds[6],this.coreHelper.dpi)):"C"===sA.cmd&&(oA+="Z")}}catch(A){wA.e(A)}finally{wA.f()}iA.setAttribute("d",oA),IA.appendChild(iA)}}var aA=Object(h.getFont)(I,c),eA="",cA="",GA="",yA="";s&&(yA="matrix(".concat(s.a," ").concat(s.b," ").concat(s.c," ").concat(s.d," ").concat(Object(h.converterDpi)(s.e,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(s.f,this.coreHelper.dpi),")")),o&&(yA="".concat(yA," matrix(").concat(o.a," ").concat(o.b," ").concat(o.c," ").concat(o.d," ").concat(Object(h.converterDpi)(o.e,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(o.f,this.coreHelper.dpi),")")),e&&(yA="".concat(yA," scale(").concat(e,", 1)"));var FA,nA=!1,RA=a(R);try{for(RA.s();!(FA=RA.n()).done;){var rA=FA.value;if(rA&&!isNaN(rA.x)){if(rA.glyph&&aA&&aA.face){nA=!0;var NA=Object(w.loadFaceInfo)(aA.face),MA=Object(w.FT_Glyph_Get_Measure)(aA.face,rA.glyph),UA=this.drawGlyph(MA.glyphPath,MA.horiUnderlinePosition,NA.units_per_EM,Z,q,C||B,D,N,U,g.ID);if(0===W)UA.img.setAttribute("style","position:absolute; left: ".concat(Math.ceil(rA.cx),"px; top: ").concat(rA.cy-UA.yScale*MA.horiUnderlinePosition-q,"px;width: ").concat(Math.ceil(Z),"px; height:").concat(Math.ceil(q),"px")),A.appendChild(UA.img);else{var SA=document.createElement("div");SA.setAttribute("style","transform-origin: center;transform: rotate(".concat(-W,"rad);position:absolute; left: ").concat(rA.cx,"px; top: ").concat(rA.cy-UA.yScale*MA.horiUnderlinePosition-q,"px;width: ").concat(Math.ceil(Z),"px; height:").concat(Math.ceil(q),"px")),UA.img.setAttribute("style","position: absolute;left: 0px;top:0px;width: ".concat(Math.ceil(Z),"px; height:").concat(Math.ceil(q),"px")),SA.appendChild(UA.img),A.appendChild(SA)}}eA=e?"".concat(eA).concat(rA.x+e*rA.x," "):"".concat(eA).concat(rA.x," "),cA="".concat(cA).concat(rA.y," "),GA=" "==rA.text?"".concat(GA," "):"".concat(GA).concat(rA.text)}}}catch(A){RA.e(A)}finally{RA.f()}var kA=document.createElementNS("http://www.w3.org/2000/svg","text");return kA.setAttribute("x",eA),kA.setAttribute("y",cA),kA.textContent=GA,kA.setAttribute("transform",yA),k?kA.setAttribute("fill",B):(kA.setAttribute("fill",C),kA.setAttribute("fill",B),kA.setAttribute("fill-opacity",nA?0:D<y?D:y)),nA||(IA&&r.appendChild(IA),kA.setAttribute("clip-path","url(#clip-path-".concat(g.ID,"-0)"))),N&&M>0&&(kA.setAttribute("stroke",N),kA.setAttribute("stroke-width",Object(h.converterDpi)(M,this.coreHelper.dpi))),kA.setAttribute("style","font-weight: ".concat(G,";font-size:").concat(n,"px;font-family: ").concat(Object(h.getFontFamily)(aA),";")),nA||r.appendChild(kA),r.setAttribute("style","overflow:visible;position:absolute;width:".concat(u,"px;height:").concat(p,"px;left:").concat(m,"px;top:").concat(b,"px;")),r}},{key:"renderPathObject",value:function(A,I,g,B,C,Q,E,i,o,D,t,w){var s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("version","1.1"),s.setAttribute("xmlns","http://www.w3.org/2000/svg");var e=g.Boundary;if(!e)return{svg:s,style:""};e=Object(h.converterBox)(e,this.coreHelper.dpi);var c=g.LineWidth,G=g.AbbreviatedData,y=g.StrokeColor,F=g.FillColor,n=g.CTM,R=document.createElementNS("http://www.w3.org/2000/svg","path");R.setAttribute("xmlns","http://www.w3.org/2000/svg"),R.setAttribute("ID",g.ID),c&&(Q=Object(h.converterDpi)(c,this.coreHelper.dpi));var r=g.DrawParam;if(r){var N=Object(h.getDrawParam)(I,r);(c=N.LineWidth)&&(Q=Object(h.converterDpi)(c,this.coreHelper.dpi)),N.FillColor&&(F&&F.Value||(F=N.FillColor)),N.StrokeColor&&(y&&y.Value||(y=N.StrokeColor))}n&&R.setAttribute("transform","matrix(".concat(n.a," ").concat(n.b," ").concat(n.c," ").concat(n.d," ").concat(Object(h.converterDpi)(n.e,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(n.f,this.coreHelper.dpi),")"));if(y){y.Value&&(C=Object(h.parseColor)(y.Value));var M=y.axialShd;if(M){!0;var U=document.createElementNS("http://www.w3.org/2000/svg","linearGradient");U.setAttribute("id","".concat(g.ID)),U.setAttribute("x1","0%"),U.setAttribute("y1","0%"),U.setAttribute("x2","100%"),U.setAttribute("y2","100%");var S,k=a(M.Segment);try{for(k.s();!(S=k.n()).done;){var Y=S.value;if(Y){var d=document.createElement("stop");d.setAttribute("offset","".concat(100*Y.position,"%")),d.setAttribute("style","stop-color:".concat(Object(h.parseColor)(Y.color.Value),";stop-opacity:1")),U.appendChild(d),C=Object(h.parseColor)(Y.color.Value)}}}catch(A){k.e(A)}finally{k.f()}s.appendChild(U)}}if(F){F.Value&&(B=Object(h.parseColor)(F.Value)),F.Alpha&&0==F.Alpha&&(B="none");var H=F.axialShd;if(H){!0;var K=document.createElement("linearGradient");K.setAttribute("id","".concat(g.ID)),K.setAttribute("x1","0%"),K.setAttribute("y1","0%"),K.setAttribute("x2","100%"),K.setAttribute("y2","100%");var J,L=a(H.Segment);try{for(L.s();!(J=L.n()).done;){var l=J.value;if(l){var f=document.createElement("stop");f.setAttribute("offset","".concat(100*l.position,"%")),f.setAttribute("style","stop-color:".concat(Object(h.parseColor)(l.color.Value),";stop-opacity:1")),K.appendChild(f),B=Object(h.parseColor)(l.color.Value)}}}catch(A){L.e(A)}finally{L.f()}s.appendChild(K)}}if(Q>0&&!C&&(C="rgb(0, 0, 0)"),i&&R.setAttribute("fill-opacity","".concat(i/255)),g.Stroke&&(R.setAttribute("stroke","".concat(C)),R.setAttribute("stroke-width","".concat(Q,"px"))),g.Fill?(R.setAttribute("fill-rule",g.Rule),R.setAttribute("fill","".concat(E?"none":B||"none"))):R.setAttribute("fill","none"),g.Join&&R.setAttribute("stroke-linejoin","".concat(g["@_Join"])),g.Cap&&R.setAttribute("stroke-linecap","".concat(g["@_Cap"])),g.DashPattern){var u=g.DashPattern,p=Object(h.parseCtm)(u),m=0;g.DashOffset&&(m=g.DashOffset),R.setAttribute("stroke-dasharray","".concat(Object(h.converterDpi)(p[0],this.coreHelper.dpi),",").concat(Object(h.converterDpi)(p[1],this.coreHelper.dpi))),R.setAttribute("stroke-dashoffset","".concat(Object(h.converterDpi)(m,this.coreHelper.dpi),"px"))}var b,Z="",q=a(G);try{for(q.s();!(b=q.n()).done;){var W=b.value;"M"===W.cmd||"S"===W.cmd?Z+="M ".concat(Object(h.converterDpi)(W.crds[0],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(W.crds[1],this.coreHelper.dpi)," "):"L"===W.cmd?Z+="L ".concat(Object(h.converterDpi)(W.crds[0],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(W.crds[1],this.coreHelper.dpi)," "):"B"===W.cmd?Z+="C ".concat(Object(h.converterDpi)(W.crds[0],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(W.crds[1],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(W.crds[2],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(W.crds[3],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(W.crds[4],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(W.crds[5],this.coreHelper.dpi)," "):"Q"===W.cmd?Z+="Q ".concat(Object(h.converterDpi)(W.crds[0],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(W.crds[1],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(W.crds[2],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(W.crds[3],this.coreHelper.dpi)," "):"A"===W.cmd?Z+="A ".concat(Object(h.converterDpi)(W.crds[0],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(W.crds[1],this.coreHelper.dpi)," ").concat(W.crds[2]," ").concat(W.crds[3],",").concat(W.crds[4]," ").concat(Object(h.converterDpi)(W.crds[5],this.coreHelper.dpi),",").concat(Object(h.converterDpi)(W.crds[6],this.coreHelper.dpi)," "):"C"===W.cmd&&(Z+="Z")}}catch(A){q.e(A)}finally{q.f()}R.setAttribute("d",Z),s.appendChild(R);var x=e.w,V=e.h,v=e.x,X=e.y,T=F.pattern;if(T){var j=document.createElementNS("http://www.w3.org/2000/svg","defs"),O=document.createElementNS("http://www.w3.org/2000/svg","pattern");O.setAttribute("width",Object(h.converterDpi)(T.width,this.coreHelper.dpi)),O.setAttribute("height",Object(h.converterDpi)(T.height,this.coreHelper.dpi)),O.setAttribute("id","pattern1"),O.setAttribute("patternUnits","userSpaceOnUse"),this.renderLayer(A,O,w,I,t,null,T,!1,null,null,null),j.appendChild(O),s.appendChild(j);var z=document.createElementNS("http://www.w3.org/2000/svg","rect");z.setAttribute("width",x),z.setAttribute("height",V),z.setAttribute("style","fill:url(#pattern1)"),s.appendChild(z)}var P=g.Clips;if(P&&P.length>0)for(var _=0;_<P.length;_++){var $=document.createElementNS("http://www.w3.org/2000/svg","clipPath");$.setAttribute("id","clip-path-".concat(g.ID,"-").concat(_));for(var AA=P[_].Clip,IA=0;IA<AA.length;IA++){var gA=AA[IA].Area,BA=document.createElementNS("http://www.w3.org/2000/svg","path"),CA="",QA=0,EA=0;if(gA.Path.Boundary&&(QA=gA.Path.Boundary.x,EA=gA.Path.Boundary.y),!gA.TransFlag&&gA.Path.CTM){var iA=gA.Path.CTM,oA="matrix(".concat(iA.a," ").concat(iA.b," ").concat(iA.c," ").concat(iA.d," ").concat(Object(h.converterDpi)(iA.e-n.e,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(iA.f-n.f,this.coreHelper.dpi),")");if(n){var DA=[[n.a,n.c,0],[n.b,n.d,0],[0,0,1]],tA=Object(h.inv)(DA);isNaN(tA[0][0])||tA[0][0]===1/0||(oA="".concat(oA," matrix(").concat(tA[0][0]," ").concat(tA[1][0]," ").concat(tA[0][1]," ").concat(tA[1][1]," 0 0)"))}BA.setAttribute("transform",oA)}var hA,wA=a(gA.Path.AbbreviatedData);try{for(wA.s();!(hA=wA.n()).done;){var sA=hA.value;"M"===sA.cmd||"S"===sA.cmd?CA+="M ".concat(Object(h.converterDpi)(sA.crds[0]+QA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[1]+EA,this.coreHelper.dpi)," "):"L"===sA.cmd?CA+="L ".concat(Object(h.converterDpi)(sA.crds[0]+QA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[1]+EA,this.coreHelper.dpi)," "):"B"===sA.cmd?CA+="C ".concat(Object(h.converterDpi)(sA.crds[0]+QA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[1]+EA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[2]+QA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[3]+EA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[4]+QA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[5]+EA,this.coreHelper.dpi)," "):"Q"===sA.cmd?CA+="Q ".concat(Object(h.converterDpi)(sA.crds[0]+QA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[1]+EA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[2]+QA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[3]+EA,this.coreHelper.dpi)," "):"A"===sA.cmd?CA+="A ".concat(Object(h.converterDpi)(sA.crds[0],this.coreHelper.dpi),",").concat(Object(h.converterDpi)(sA.crds[1],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[2],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[3],this.coreHelper.dpi),",").concat(Object(h.converterDpi)(sA.crds[4],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[5],this.coreHelper.dpi),",").concat(Object(h.converterDpi)(sA.crds[6],this.coreHelper.dpi)):"C"===sA.cmd&&(CA+="Z")}}catch(A){wA.e(A)}finally{wA.f()}BA.setAttribute("d",CA),$.appendChild(BA),s.appendChild($),R.setAttribute("clip-path","url(#clip-path-".concat(g.ID,"-0)"))}}var aA="overflow:hidden;position:absolute;width:".concat(Math.ceil(x),"px;height:").concat(Math.ceil(V),"px;");if(o){var eA=document.createElementNS("http://www.w3.org/2000/svg","svg");eA.setAttribute("version","1.1");var cA=Object(h.converterBox)(o,this.coreHelper.dpi),GA=Math.ceil(cA.w),yA=Math.ceil(cA.h),FA=cA.x,nA=cA.y;return aA="overflow:hidden;position:absolute;width:".concat(GA,"px;height:").concat(yA,"px;"),D&&s.setAttribute("transform","matrix(".concat(D.a," ").concat(D.b," ").concat(D.c," ").concat(D.d," ").concat(Object(h.converterDpi)(D.e,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(D.f,this.coreHelper.dpi),")")),eA.appendChild(s),{svg:eA,style:aA,left:FA,top:nA}}return{svg:s,style:aA,left:v,top:X}}},{key:"drawGlyph",value:function(A,I,g,B,C,Q,E,i,o,D){var t=B/g,w=C/g,s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("version","1.1"),s.setAttribute("xmlns","http://www.w3.org/2000/svg");var a=document.createElementNS("http://www.w3.org/2000/svg","path");return a.setAttribute("transform","translate(0, ".concat(C,") scale(").concat(t,", ").concat(-w,") translate(0, ").concat(-I,")")),a.setAttribute("d",A),Q&&a.setAttribute("fill",Q),a.setAttribute("fill-opacity",E),i&&(a.setAttribute("stroke","".concat(i)),a.setAttribute("stroke-width","".concat(Object(h.converterDpi)(o,this.coreHelper.dpi),"px"))),a.setAttribute("clip-path","url(#clip-path-".concat(D,"-0)")),s.appendChild(a),{img:s,yScale:w}}},{key:"watermark",value:function(A){var I={watermark_txt:"text",watermark_x:20,watermark_y:20,watermark_rows:20,watermark_cols:20,watermark_x_space:100,watermark_y_space:50,watermark_color:"#aaa",watermark_alpha:.4,watermark_fontsize:"15px",watermark_font:"微软雅黑",watermark_width:210,watermark_height:80,watermark_angle:20};if(1===arguments.length&&"object"==typeof arguments[0]){var g=arguments[0]||{};for(var B in g)g[B]&&I[B]&&g[B]===I[B]||g[B]&&(I[B]=g[B])}var C,Q,E=document.createDocumentFragment(),i=.015*(o=Math.max(document.body.scrollWidth,document.body.clientWidth)),o=o-i,D=Math.max(document.body.scrollHeight,document.body.clientHeight)+450;D=Math.max(D,window.innerHeight-30),(0==I.watermark_cols||parseInt(I.watermark_x+I.watermark_width*I.watermark_cols+I.watermark_x_space*(I.watermark_cols-1))>o)&&(I.watermark_cols=parseInt((o-I.watermark_x+I.watermark_x_space)/(I.watermark_width+I.watermark_x_space)),I.watermark_x_space=parseInt((o-I.watermark_x-I.watermark_width*I.watermark_cols)/(I.watermark_cols-1))),(0==I.watermark_rows||parseInt(I.watermark_y+I.watermark_height*I.watermark_rows+I.watermark_y_space*(I.watermark_rows-1))>D)&&(I.watermark_rows=parseInt((I.watermark_y_space+D-I.watermark_y)/(I.watermark_height+I.watermark_y_space)),I.watermark_y_space=parseInt((D-I.watermark_y-I.watermark_height*I.watermark_rows)/(I.watermark_rows-1)));for(var t=0;t<I.watermark_rows;t++){Q=I.watermark_y+(I.watermark_y_space+I.watermark_height)*t;for(var h=0;h<I.watermark_cols;h++){C=I.watermark_x+(I.watermark_width+I.watermark_x_space)*h;var w=document.createElement("div");w.id="mask_div"+t+h,w.className="mask_div",w.innerHTML=I.watermark_txt,w.style.webkitTransform="rotate(-"+I.watermark_angle+"deg)",w.style.MozTransform="rotate(-"+I.watermark_angle+"deg)",w.style.msTransform="rotate(-"+I.watermark_angle+"deg)",w.style.OTransform="rotate(-"+I.watermark_angle+"deg)",w.style.transform="rotate(-"+I.watermark_angle+"deg)",w.style.visibility="",w.style.position="absolute",w.style.left=C+"px",w.style.top=Q+"px",w.style.overflow="hidden",w.style.zIndex="9999",w.style.pointerEvents="none",w.style.opacity=I.watermark_alpha,w.style.fontSize=I.watermark_fontsize,w.style.fontFamily=I.watermark_font,w.style.color=I.watermark_color,w.style.textAlign="center",w.style.width=I.watermark_width+"px",w.style.height=I.watermark_height+"px",w.style.display="block",E.appendChild(w)}}return E}}]),A}()},function(A,I,g){"use strict";function B(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return C(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return C(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,Q=function(){};return{s:Q,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:Q}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var E,i=!0,o=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return i=A.done,A},e:function(A){o=!0,E=A},f:function(){try{i||null==g.return||g.return()}finally{if(o)throw E}}}}function C(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}g.r(I),g.d(I,"converterDpi",(function(){return Q})),g.d(I,"ctmImageScale",(function(){return E})),g.d(I,"calTextPoint",(function(){return t})),g.d(I,"decodeHtml",(function(){return s})),g.d(I,"getFontFamily",(function(){return e})),g.d(I,"parseStBox",(function(){return c})),g.d(I,"parseCtm",(function(){return G})),g.d(I,"parseColor",(function(){return y})),g.d(I,"converterBox",(function(){return n})),g.d(I,"Uint8ArrayToHexString",(function(){return R})),g.d(I,"replaceFirstSlash",(function(){return r})),g.d(I,"replaceFirstTarget",(function(){return N})),g.d(I,"readUTF",(function(){return M})),g.d(I,"getMultiMedia",(function(){return U})),g.d(I,"getDrawParam",(function(){return S})),g.d(I,"getFont",(function(){return k})),g.d(I,"inv",(function(){return H}));var Q=function(A,I){return function(A,I){return A*I/25.4}(A,I)},E=function(A){return 25.4/A},i=function(A,I,g){return{cx:A*g.a+I*g.c+1*g.e,cy:A*g.b+I*g.d+1*g.f}},o=function(A,I,g){return{ctmX:A*g.a+I*g.c,ctmY:A*g.b+I*g.d}},D=function(A,I,g){return{cx:g.x+A,cy:g.y+I}},t=function(A,I,g,C,E,t,h,w){var a=0,e=0,c=0,G=0,y=[];if(!I)return y;var F,n=B(I);try{for(n.s();!(F=n.n()).done;){var R=F.value;if(R){if(a=w?parseFloat(R.X):-parseFloat(R.X),e=w?parseFloat(R.Y):-parseFloat(R.Y),isNaN(a)&&(a=0),isNaN(e)&&(e=0),c=a,G=e,C){var r=i(c,G,C);c=r.cx,G=r.cy}var N=[],M=[];R.DeltaX&&R.DeltaX.length>0&&(N=R.DeltaX),R.DeltaY&&R.DeltaY.length>0&&(M=R.DeltaY);var U=R.text;if(U){U=(U=s(U+="")).replace(/&#x20;/g," ");for(var S=0;S<U.length;S++){if(S>0&&N.length>0){var k=S-1;if(k>=N.length&&(k=N.length-1),a+=w?N[k]:-N[k],C)c+=o(w?N[S-1]:-N[S-1],0,C).ctmX;else c=a}if(S>0&&M.length>0){var Y=S-1;if(Y>=M.length&&(Y=M.length-1),e+=w?M[Y]:-M[Y],C)G+=o(0,w?M[S-1]:-M[S-1],C).ctmY;else G=e}var d=U.substring(S,S+1),H=D(c,G,E);h&&(H=i(H.cx,H.cy,h));var K={x:Q(a,A),y:Q(e,A),text:d,cx:Q(H.cx,A),cy:Q(H.cy,A)};y.push(K)}}}}}catch(A){n.e(A)}finally{n.f()}if(y.length>0){var J,L=B(g);try{for(L.s();!(J=L.n()).done;)for(var l=J.value,f=l.CodePosition,u=l.GlyphCount,p=f;p<u+f;p++)if(y.length<=p){var m="".concat(y[y.length-1].glyph," ").concat(l.Glyphs[p-f]);y[y.length-1].glyph=m}else y[p].glyph=l.Glyphs[p-f]}catch(A){L.e(A)}finally{L.f()}}return y},h=/&\w+;|&#(\d+);/g,w={"&lt;":"<","&gt;":">","&amp;":"&","&nbsp;":" ","&quot;":'"',"&copy;":"","&apos;":"'"},s=function(A){return"string"!=typeof(A=null!=A?A:this.toString())?A:A.replace(h,(function(A,I){var g=w[A];return null==g&&(g=isNaN(I)?A:String.fromCharCode(160==I?32:I)),g}))},a={"楷体":"楷体, KaiTi, Kai, simkai",kaiti:"楷体, KaiTi, Kai, simkai",Kai:"楷体, KaiTi, Kai",simsun:"SimSun, simsun, Songti SC","宋体":"SimSun, simsun, Songti SC","黑体":"SimHei, STHeiti, simhei","仿宋":"FangSong, STFangsong, simfang","小标宋体":"小标宋体","方正小标宋_gbk":"方正小标宋_gbk, FZXiaoBiaoSong-B05S","方正小标宋简体":"方正小标宋_gbk, FZXiaoBiaoSong-B05S","仿宋_gb2312":"FangSong, STFangsong, simfang","楷体_gb2312":"楷体, KaiTi, Kai, simkai",couriernew:"Courier New","courier new":"Courier New"},e=function(A){if(!A)return a["宋体"];var I=A.FamilyName;I||(I=A.FontName),a[I.toLowerCase()]&&(I=a[I.toLowerCase()]);for(var g=0,B=Object.keys(a);g<B.length;g++){var C=B[g];if(-1!=I.toLowerCase().indexOf(C.toLowerCase()))return a[C]}return I},c=function(A){if(A){var I=A.split(" ");return{x:parseFloat(I[0]),y:parseFloat(I[1]),w:parseFloat(I[2]),h:parseFloat(I[3])}}return null},G=function(A){return A.split(" ")},y=function(A){if(!(A&&A.length>0))return"rgb(0, 0, 0)";if(-1!==A.indexOf("#"))return A="#"+(A=(A=A.replace(/#/g,"")).replace(/ /g,"")).toString();var I=A.split(" ");if(3===I.length)return"rgb(".concat(I[0],", ").concat(I[1],", ").concat(I[2],")");if(4===I.length){var g=F(I[0],I[1],I[2],I[3]);return"rgb(".concat(g.r,", ").concat(g.g,", ").concat(g.b,")")}},F=function(A,I,g,B,C){var Q=1-(A=(A/=100)*(1-(B/=100))+B),E=1-(I=(I/=100)*(1-B)+B),i=1-(g=(g/=100)*(1-B)+B);return C||(Q=Math.round(255*Q),E=Math.round(255*E),i=Math.round(255*i)),{r:Q,g:E,b:i}},n=function(A,I){return{x:Q(A.x,I),y:Q(A.y,I),w:Q(A.w,I),h:Q(A.h,I)}},R=function(A){for(var I=[],g=0,B=0;B<2*A.length;B+=2)I[B>>>3]|=parseInt(A[g],10)<<24-B%8*4,g++;for(var C=[],Q=0;Q<A.length;Q++){var E=I[Q>>>2]>>>24-Q%4*8&255;C.push((E>>>4).toString(16)),C.push((15&E).toString(16))}return C.join("")},r=function(A){return A&&0===A.indexOf("/")&&(A=A.replace("/","")),A},N=function(A,I){return A&&0===A.indexOf(I)&&(A=A.replace(I,"")),A},M=function(A){if("string"==typeof A)return A;for(var I="",g=A,B=0;B<g.length;B++){var C=g[B].toString(2),Q=C.match(/^1+?(?=0)/);if(Q&&8==C.length){for(var E=Q[0].length,i=g[B].toString(2).slice(7-E),o=1;o<E;o++)i+=g[o+B].toString(2).slice(2);I="".concat(I).concat(String.fromCharCode(parseInt(i,2))),B+=E-1}}return I},U=function(A,I){var g,C=B(A);try{for(C.s();!(g=C.n()).done;){var Q=g.value;if(Q.ID==I)return Q}}catch(A){C.e(A)}finally{C.f()}},S=function(A,I){var g,C=B(A);try{for(C.s();!(g=C.n()).done;){var Q=g.value;if(Q.ID==I)return Q}}catch(A){C.e(A)}finally{C.f()}},k=function(A,I){var g,C=B(A);try{for(C.s();!(g=C.n()).done;){var Q=g.value;if(Q.ID==I)return Q}}catch(A){C.e(A)}finally{C.f()}};function Y(A){if(A.length!==A[0].length)throw new Error;var I=A.length,g=0;if(I>3)for(var B=0;B<I;B++){for(var C=new Array(I-1).fill(0).map((function(A){return new Array(I-1).fill(0)})),Q=0;Q<I-1;Q++)for(var E=0;E<I-1;E++)C[Q][E]=E<B?A[Q+1][E]:A[Q+1][E+1];g+=A[0][B]*Math.pow(-1,0+B)*Y(C)}else 3===I?g=A[0][0]*A[1][1]*A[2][2]+A[0][1]*A[1][2]*A[2][0]+A[0][2]*A[1][0]*A[2][1]-A[0][2]*A[1][1]*A[2][0]-A[0][1]*A[1][0]*A[2][2]-A[0][0]*A[1][2]*A[2][1]:2===I?g=A[0][0]*A[1][1]-A[0][1]*A[1][0]:1===I&&(g=A[0][0]);return g}function d(A){if(A[0].length!==A.length)throw new Error;for(var I=A.length,g=new Array(I).fill(0).map((function(A){return new Array(I).fill(0)})),B=0;B<I;B++)for(var C=0;C<I;C++){for(var Q=[],E=0;E<A.length;E++)if(E!==B){for(var i=[],o=0;o<A.length;o++)o!==C&&i.push(A[E][o]);Q.push(i)}g[B][C]=Math.pow(-1,B+C)*Y(Q)}return function(A){for(var I=new Array(A.length).fill(0).map((function(I){return new Array(A[0].length).fill(0)})),g=0;g<I.length;g++)for(var B=0;B<I[0].length;B++)I[g][B]=A[B][g];return I}(g)}function H(A){if(A[0].length!==A.length)throw new Error;for(var I=Y(A),g=d(A),B=0;B<g.length;B++)for(var C=0;C<g.length;C++)g[B][C]/=I;return g}},function(A,I,g){"use strict";g.r(I),g.d(I,"needInitAgain",(function(){return D})),g.d(I,"setYYDS",(function(){return t})),g.d(I,"freeMemory",(function(){return h})),g.d(I,"getStreamData",(function(){return w})),g.d(I,"CreateLibrary",(function(){return s})),g.d(I,"CreateNativeStream",(function(){return a})),g.d(I,"FT_Open_Face",(function(){return e})),g.d(I,"loadFaceInfo",(function(){return c})),g.d(I,"FT_Glyph_Get_Measure",(function(){return G})),g.d(I,"freeOFD",(function(){return y})),g.d(I,"readOFD",(function(){return F})),g.d(I,"readOFDByBase64",(function(){return n})),g.d(I,"hashPath",(function(){return R})),g.d(I,"MD5",(function(){return r})),g.d(I,"SHA1",(function(){return N})),g.d(I,"SM3",(function(){return M})),g.d(I,"base64EncodeByByte",(function(){return U})),g.d(I,"base64Encode",(function(){return S})),g.d(I,"base64DecodeToUint8Array",(function(){return k})),g.d(I,"JSBase64ByHashFile",(function(){return Y})),g.d(I,"JSGetImageInfoByBase64",(function(){return d})),g.d(I,"JSGetImageInfoByPath",(function(){return H})),g.d(I,"JSReadPageInfo",(function(){return K})),g.d(I,"JSGetPathEncode",(function(){return J}));var B,C,Q,E,i=g(31),o=g(32),D=function(){return!B},t=function(A){B=A},h=function(A){B._ASC_FT_Free(A.data),A.data=0},w=function(){return E},s=function(){C=B._ASC_FT_Init()},a=function(A){var I=new Uint8Array(A),g=B._malloc(A.byteLength);return B.HEAPU8.set(I,g),{data:g,length:A.byteLength}},e=function(A){return B._ASC_FT_Open_Face(C,A.data,A.length,0)},c=function(A){var I=B._ASC_FT_GetFaceInfo(A);if(I){var g=new i.CFaceInfo,C=Math.min(B.HEAP8.length-I>>2,250),Q=new Int32Array(B.HEAP8.buffer,I,C),E=0;g.units_per_EM=Math.abs(Q[E++]),g.ascender=Q[E++],g.descender=Q[E++],g.height=Q[E++],g.face_flags=Q[E++],g.num_faces=Q[E++],g.num_glyphs=Q[E++],g.num_charmaps=Q[E++],g.style_flags=Q[E++],g.face_index=Q[E++];for(var o=Q[E++];o;)g.family_name+=String.fromCharCode(o),o=Q[E++];for(o=Q[E++];o;)g.style_name+=String.fromCharCode(o),o=Q[E++];g.os2_version=Q[E++],g.os2_usWeightClass=Q[E++],g.os2_fsSelection=Q[E++],g.os2_usWinAscent=Q[E++],g.os2_usWinDescent=Q[E++],g.os2_usDefaultChar=Q[E++],g.os2_sTypoAscender=Q[E++],g.os2_sTypoDescender=Q[E++],g.os2_sTypoLineGap=Q[E++],g.os2_ulUnicodeRange1=L(Q[E++]),g.os2_ulUnicodeRange2=L(Q[E++]),g.os2_ulUnicodeRange3=L(Q[E++]),g.os2_ulUnicodeRange4=L(Q[E++]),g.os2_ulCodePageRange1=L(Q[E++]),g.os2_ulCodePageRange2=L(Q[E++]),g.os2_nSymbolic=Q[E++],g.header_yMin=Q[E++],g.header_yMax=Q[E++];for(var D=Q[E++],t=0;t<D;t++)g.monochromeSizes.push(Q[E++]);return B._ASC_FT_Free(I),I=null,g}},G=function(A,I){if(B._AST_FT_Load_Glyph(A,I,1)>0)return" ";var g=B._ASC_FT_Get_Glyph_Measure_Params(A,1);if(!g)return null;var C=B.HEAP32[g>>2],Q=new Int32Array(B.HEAP8.buffer,g,C),E=new o.CGlyphMetrics;E.bbox_xMin=Q[1],E.bbox_yMin=Q[2],E.bbox_xMax=Q[3],E.bbox_yMax=Q[4],E.width=Q[5],E.height=Q[6],E.horiAdvance=Q[7],E.horiBearingX=Q[8],E.horiBearingY=Q[9],E.vertAdvance=Q[10],E.vertBearingX=Q[11],E.vertBearingY=Q[12],E.linearHoriAdvance=Q[13],E.linearVertAdvance=Q[14],E.horiUnderlinePosition=E.horiBearingY-E.height;for(var i=15,D="";i<C;)switch(Q[i++]){case 0:D+=" M ".concat(Q[i++]," ").concat(Q[i++]);break;case 1:D+=" L ".concat(Q[i++]," ").concat(Q[i++]);break;case 2:D+=" Q ".concat(Q[i++]," ").concat(Q[i++]," ").concat(Q[i++]," ").concat(Q[i++]);break;case 3:D+=" C ".concat(Q[i++]," ").concat(Q[i++]," ").concat(Q[i++]," ").concat(Q[i++]," ").concat(Q[i++]," ").concat(Q[i++])}return E.glyphPath=D,B._ASC_FT_Free(g),Q=null,E},y=function(A){if(h(Q),A.ofdParserPtr>0)B.JSFreeOFD(A.ofdParserPtr);var I=A.getFontRes(0);I&&I.forEach((function(A){A.face&&B._ASC_FT_Free(A.face)}))},F=function(A,I,g){E=A,Q=a(A);var i=B.JSReadOFD(C,Q.data,Q.length,I||"kgNVVbdUZ31C6mps",g?g.toLowerCase():"");return i.data&&i.data.ofd&&(i.data.ofd.size=Q.length),i},n=function(A,I,g){return B.JSReadOFDByBase64(C,A,I,g?g.toLowerCase():"")},R=function(A,I,g){return B.JSHashPath(A,I,g)},r=function(A){return B.JSMD5(A)},N=function(A){return B.JSSHA1(A)},M=function(A){return B.JSSM3(A)},U=function(A){var I=a(A),g=B.JSBase64EncodeByByte(I.data,I.length);return h(I),g},S=function(A){return B.JSBase64Encode(A)},k=function(A){var I=B.JSBase64Decode(A);return new Uint8Array(B.HEAPU8.buffer,I.ptr,I.len).slice(0,I.len)},Y=function(A,I,g){var C=a(A);return B.JSBase64ByHashFile(C.data,C.length,I,g)},d=function(A){var I=B.JSGetImageInfoByBase64(A);return"jb2"!==I.ext&&"jp2"!==I.ext&&"tif"!==I.ext&&"gif"!==I.ext&&"bmp"!==I.ext||(I.ext="png"),0===I.fileBase64.length&&(I.fileBase64=A),0!==I.fileBase64.indexOf("data:image")&&(I.fileBase64="data:image/".concat(I.ext,";base64,").concat(I.fileBase64)),I},H=function(A,I,g,C){var Q=B.JSGetImageInfoByPath(A,I,g,C);return"jb2"!==Q.ext&&"jp2"!==Q.ext&&"tif"!==Q.ext&&"gif"!==Q.ext&&"bmp"!==Q.ext&&"webp"!==Q.ext||(Q.ext="png"),0!==Q.fileBase64.indexOf("data:image")&&(Q.fileBase64="data:image/".concat(Q.ext,";base64,").concat(Q.fileBase64)),Q},K=function(A,I,g,C,Q){return B.JSReadPageInfo(A,I,g,C,Q)},J=function(A,I){return B.JSGetPathEncode(A,I).encode},L=function(A){return A<0?A+4294967296:A}},function(A,I,g){"use strict";g.r(I),g.d(I,"CFaceInfo",(function(){return i}));var B=g(1),C=g.n(B),Q=g(2),E=g.n(Q),i=C()((function A(){E()(this,A),this.units_per_EM=0,this.ascender=0,this.descender=0,this.height=0,this.face_flags=0,this.num_faces=0,this.num_glyphs=0,this.num_charmaps=0,this.style_flags=0,this.face_index=0,this.family_name="",this.style_name="",this.os2_version=0,this.os2_usWeightClass=0,this.os2_fsSelection=0,this.os2_usWinAscent=0,this.os2_usWinDescent=0,this.os2_usDefaultChar=0,this.os2_sTypoAscender=0,this.os2_sTypoDescender=0,this.os2_sTypoLineGap=0,this.os2_ulUnicodeRange1=0,this.os2_ulUnicodeRange2=0,this.os2_ulUnicodeRange3=0,this.os2_ulUnicodeRange4=0,this.os2_ulCodePageRange1=0,this.os2_ulCodePageRange2=0,this.os2_nSymbolic=0,this.header_yMin=0,this.header_yMax=0,this.monochromeSizes=[]}))},function(A,I,g){"use strict";g.r(I),g.d(I,"CGlyphMetrics",(function(){return i}));var B=g(1),C=g.n(B),Q=g(2),E=g.n(Q),i=C()((function A(){E()(this,A),this.bbox_xMin=0,this.bbox_yMin=0,this.bbox_xMax=0,this.bbox_yMax=0,this.width=0,this.height=0,this.horiAdvance=0,this.horiBearingX=0,this.horiBearingY=0,this.vertAdvance=0,this.vertBearingX=0,this.vertBearingY=0,this.linearHoriAdvance=0,this.linearVertAdvance=0,this.horiUnderlinePosition=0,this.glyphPath=null}))},function(A,I,g){"use strict";g.r(I),g.d(I,"Ofd_Core",(function(){return t}));var B=g(2),C=g.n(B),Q=g(1),E=g.n(Q),i=(g(29),g(30));function o(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return D(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return D(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function D(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var t=function(){function A(I,g){C()(this,A),this.ofd=I,this.ofdParserPtr=g}return E()(A,[{key:"getMetadata",value:function(A){return A?A>this.ofd.DocBody.length&&(A=this.ofd.DocBody.length-1):A=0,{Title:this.ofd.DocBody[A].DocInfo.Title,Author:this.ofd.DocBody[A].DocInfo.Author,Subject:this.ofd.DocBody[A].DocInfo.Subject,Creator:this.ofd.DocBody[A].DocInfo.Creator,CreationDate:this.ofd.DocBody[A].DocInfo.CreationDate,CreatorVersion:this.ofd.DocBody[A].DocInfo.CreatorVersion,ModificationDate:this.ofd.DocBody[A].DocInfo.ModDate,Keywords:this.ofd.DocBody[A].DocInfo.Keywords,numPages:this.getOFDPageCount(A),pageSize:"".concat(this.pageWidth(A,0),"毫米 X ").concat(this.pageHeight(A,0),"毫米")}}},{key:"readOfdDocBody",value:function(A){return this.ofd?(A?A>this.ofd.DocBody.length&&(A=this.ofd.DocBody.length-1):A=0,this.ofd.DocBody[A]):null}},{key:"readOfdDocument",value:function(A){return this.ofd?(A?A>this.ofd.Document.length&&(A=this.ofd.Document.length-1):A=0,this.ofd.Document[A]):null}},{key:"readOfdPage",value:function(A,I){if(!this.ofd)return null;A?A>this.ofd.Document.length&&(A=this.ofd.Document.length-1):A=0;var g=this.ofd.Document[A],B=g.Pages[I];if(B.Page.onlyReadArea){var C=Object(i.JSReadPageInfo)(this.ofdParserPtr,B.BasePln,B.BaseAbs,B.pln,B.abs);g.Pages[I].Page=C.Page}return g.Pages[I]}},{key:"readOfdTemplatePage",value:function(A){return this.ofd?(A?A>this.ofd.Document.length&&(A=this.ofd.Document.length-1):A=0,this.ofd.Document[A].CommonData.TemplatePage):null}},{key:"readPageFromTemplate",value:function(A){if(A.Page.onlyReadArea){var I=Object(i.JSReadPageInfo)(this.ofdParserPtr,A.BasePln,A.BaseAbs,"","");A.Page=I.Page}return A}},{key:"getOFDPageCount",value:function(A){var I=this.readOfdDocument(A);return I?I.Pages.length:0}},{key:"pageWidth",value:function(A,I){var g=this.readOfdDocument(A);if(!g)return 0;var B=g.Pages[I];return this.calPageBox(g,B).w}},{key:"pageHeight",value:function(A,I){var g=this.readOfdDocument(A);if(!g)return 0;var B=g.Pages[I];return this.calPageBox(g,B).h}},{key:"calPageBox",value:function(A,I){var g,B=I.Page.Area;if(B&&Object.keys(B).length>0){var C=B.PhysicalBox;if(C)g=C;else{var Q=B.ApplicationBox;if(Q)g=Q;else{var E=B.ContentBox;E&&(g=E)}}}else{var i=A.CommonData.PageArea,o=i.PhysicalBox;if(o)g=o;else{var D=i.ApplicationBox;if(D)g=D;else{var t=i.ContentBox;t&&(g=t)}}}return g}},{key:"getSignatureCount",value:function(A){var I=this.readOfdDocument(A);return I&&I.Signatures&&I.Signatures.Signature?I.Signatures.Signature.length:0}},{key:"getAllSignature",value:function(A){var I=this.readOfdDocument(A);return I&&I.Signatures?I.Signatures.Signature:0}},{key:"getSignatureByIndex",value:function(A,I){var g=this.readOfdDocument(A);return g?g.Signatures.Signature[I]:null}},{key:"findSignature",value:function(A,I,g){var B=null,C=this.readOfdDocument(A);if(C)for(var Q=0;Q<C.Signatures.Signature.length;Q++){var E,i=o(C.Signatures.Signature);try{for(i.s();!(E=i.n()).done;){var D,t=E.value,h=o(t.Signature.SignedInfo.StampAnnot);try{for(h.s();!(D=h.n()).done;){var w=D.value;if(w.ID==g&&w.PageRef==I){B=t.Signature;break}}}catch(A){h.e(A)}finally{h.f()}}}catch(A){i.e(A)}finally{i.f()}}return B}},{key:"getFontRes",value:function(A){var I,g,B=this.readOfdDocument(A);if(B)return null==B||null===(I=B.CommonData)||void 0===I||null===(g=I.Res)||void 0===g?void 0:g.Fonts}},{key:"getDocPln",value:function(A){var I=this.readOfdDocBody(A);if(I)return null==I?void 0:I.DocPln}},{key:"getAttachmentCount",value:function(A){var I=this.readOfdDocument(A);return I&&I.Attachments?I.Attachments.length:0}},{key:"getCustomTag",value:function(A){var I=this.readOfdDocument(A);return I&&I.CustomTags?I.CustomTags:null}},{key:"getPageIndexByPageId",value:function(A,I){if(!this.ofd)return 0;A?A>this.ofd.Document.length&&(A=this.ofd.Document.length-1):A=0;for(var g=this.ofd.Document[A],B=0;B<g.Pages.length;B++){if(g.Pages[B].ID==I)return B}}},{key:"getAllAttachment",value:function(A){var I=this.readOfdDocument(A);return I&&I.Attachments?I.Attachments:[]}},{key:"getAttachmentByIndex",value:function(A,I){var g=this.readOfdDocument(A);return g?g.Attachments[I]:null}},{key:"getAttachmentByID",value:function(A,I){var g=this.readOfdDocument(A);if(g){var B,C=o(g.Attachments);try{for(C.s();!(B=C.n()).done;){var Q=B.value;if(Q.ID==I)return Q}}catch(A){C.e(A)}finally{C.f()}}return null}},{key:"getTextObject",value:function(A,I){var g=[],B=this.readOfdPage(A,I);if(B){var C,Q=o(B.Page.Content.Layer);try{for(Q.s();!(C=Q.n()).done;){var E,i=o(C.value.PageBlock);try{for(i.s();!(E=i.n()).done;){var D=E.value;if("TextObject"==D.Type){var t,h="",w=o(D.TextCode);try{for(w.s();!(t=w.n()).done;){var s=t.value;h="".concat(h).concat(s.text)}}catch(A){w.e(A)}finally{w.f()}if(h.length>0){var a={id:D.ID,pageId:B.ID};a.text=h,g.push(a)}}}}catch(A){i.e(A)}finally{i.f()}}}catch(A){Q.e(A)}finally{Q.f()}}return g}},{key:"getAllTextObject",value:function(A){for(var I=[],g=this.readOfdDocument(A),B=0;B<g.Pages.length;B++){var C=g.Pages[B];if(C.Page.onlyReadArea){var Q=Object(i.JSReadPageInfo)(this.ofdParserPtr,C.BasePln,C.BaseAbs,C.pln,C.abs);C.Page=Q.Page}if(C){var E,D=o(C.Page.Content.Layer);try{for(D.s();!(E=D.n()).done;){var t,h=o(E.value.PageBlock);try{for(h.s();!(t=h.n()).done;){var w=t.value;if("TextObject"==w.Type){var s,a="",e=o(w.TextCode);try{for(e.s();!(s=e.n()).done;){var c=s.value;a="".concat(a).concat(c.text)}}catch(A){e.e(A)}finally{e.f()}if(a.length>0){var G={id:w.ID,pageId:C.ID,pageIndex:B+1};G.text=a,I.push(G)}}}}catch(A){h.e(A)}finally{h.f()}}}catch(A){D.e(A)}finally{D.f()}}}return I}}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"Ofd_Core_Helper",(function(){return o}));var B=g(2),C=g.n(B),Q=g(1),E=g.n(Q),i=g(29),o=function(){function A(){var I=arguments.length>0&&void 0!==arguments[0]?arguments[0]:96,g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";C()(this,A),this.dpi=I,this.waterText=g}return E()(A,[{key:"setWaterText",value:function(A){this.waterText=A}},{key:"setDpi",value:function(A){this.dpi=A}},{key:"pageRenderWidth",value:function(A,I,g){var B=g.pageWidth(A,I);return B=Object(i.converterDpi)(B,this.dpi)}},{key:"pageRenderHeight",value:function(A,I,g){var B=g.pageHeight(A,I);return B=Object(i.converterDpi)(B,this.dpi)}}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"OfdCanvasRender",(function(){return G}));var B=g(3),C=g.n(B),Q=g(2),E=g.n(Q),i=g(1),o=g.n(i),D=g(4),t=g.n(D),h=g(29),w=g(30),s=g(33),a=g(28);function e(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return c(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return c(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function c(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var G=function(){function A(I,g){E()(this,A),this.core=I,this.coreHelper=g,this.render=new a.Ofd_Render(this.core,this.coreHelper)}var I,g,B,Q,i,D,c,G,y,F;return o()(A,[{key:"setOfdCore",value:function(A){this.core=A,this.render.setOfdCore(this.core)}},{key:"renderPageByCanvas",value:(F=C()(t.a.mark((function A(I,g,B,C,Q){var E,i,o,D,a,c,G,y,F,n,R,r,N,M,U,S,k,Y,d,H,K,J,L,l,f,u,p,m,b,Z,q,W,x,V,v,X,T,j,O,z;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(E=Q?Q.readOfdDocument(B):this.core.readOfdDocument(B),i=Q?Q.readOfdPage(B,C):this.core.readOfdPage(B,C),o=i.Page.Template,E.Annotations,D=Q?Q.readOfdTemplatePage(B):this.core.readOfdTemplatePage(B),a=E.Signatures?E.Signatures.Signature:[],c=E.CommonData.Res.Fonts,G=E.CommonData.Res.DrawParams,E.CommonData.Res.ColorSpaces,y=E.CommonData.Res.CompositeGraphicUnits,F=E.CommonData.Res.MultiMedias,!o){A.next=64;break}n=e(o),A.prev=13,n.s();case 15:if((R=n.n()).done){A.next=56;break}r=R.value,N=e(D),A.prev=18,N.s();case 20:if((M=N.n()).done){A.next=46;break}if((U=M.value).ID!=r.TemplateID){A.next=44;break}if(!(U=Q?Q.readPageFromTemplate(U):this.core.readPageFromTemplate(U)).Page.Content){A.next=43;break}S=U.Page.Content.Layer,k=e(S),A.prev=27,k.s();case 29:if((Y=k.n()).done){A.next=35;break}return d=Y.value,A.next=33,this.renderLayerByCanvas(I,g,c,G,F,y,d,!1);case 33:A.next=29;break;case 35:A.next=40;break;case 37:A.prev=37,A.t0=A.catch(27),k.e(A.t0);case 40:return A.prev=40,k.f(),A.finish(40);case 43:return A.abrupt("break",46);case 44:A.next=20;break;case 46:A.next=51;break;case 48:A.prev=48,A.t1=A.catch(18),N.e(A.t1);case 51:return A.prev=51,N.f(),A.finish(51);case 54:A.next=15;break;case 56:A.next=61;break;case 58:A.prev=58,A.t2=A.catch(13),n.e(A.t2);case 61:return A.prev=61,n.f(),A.finish(61);case 64:if(!i.Page.Content){A.next=83;break}H=i.Page.Content.Layer,K=e(H),A.prev=67,K.s();case 69:if((J=K.n()).done){A.next=75;break}return L=J.value,A.next=73,this.renderLayerByCanvas(I,g,c,G,F,y,L,!1);case 73:A.next=69;break;case 75:A.next=80;break;case 77:A.prev=77,A.t3=A.catch(67),K.e(A.t3);case 80:return A.prev=80,K.f(),A.finish(80);case 83:l=e(a),A.prev=84,l.s();case 86:if((f=l.n()).done){A.next=134;break}u=f.value,p=e(u.Signature.SignedInfo.StampAnnot),A.prev=89,p.s();case 91:if((m=p.n()).done){A.next=124;break}if(b=m.value,Z=b.PageRef,i.ID!=Z){A.next=122;break}if(q=b.Boundary,!(u.Signature.PicType&&u.Signature.PicType.length>0)){A.next=122;break}if("ofd"!==u.Signature.PicType){A.next=108;break}W=new s.Ofd_Core(u.Signature.ofd,this.coreHelper.dpi),x=0;case 100:if(!(x<W.getOFDPageCount(0))){A.next=106;break}return A.next=103,this.renderSealPageOnCanvas(I,g,x,W,!0,q,Z,b.ID);case 103:x++,A.next=100;break;case 106:A.next=122;break;case 108:if("svg"!==u.Signature.PicType){A.next=114;break}return V="data:image/svg+xml;base64,".concat(u.Signature.PicValue),A.next=112,this.renderSealSvgOnCanvas(I,g,V,q);case 112:A.next=122;break;case 114:return v=q.w,X=q.h,T=Object(h.converterBox)(q,this.coreHelper.dpi),j=Object(w.JSGetImageInfoByBase64)(u.Signature.PicValue),O=j.fileBase64,z={a:v,b:0,c:0,d:X,e:0,f:0},A.next=122,this.renderImageOnCanvas(I,g,O,j.width,j.height,T,b.Clip,!0,Z,b.ID,z);case 122:A.next=91;break;case 124:A.next=129;break;case 126:A.prev=126,A.t4=A.catch(89),p.e(A.t4);case 129:return A.prev=129,p.f(),A.finish(129);case 132:A.next=86;break;case 134:A.next=139;break;case 136:A.prev=136,A.t5=A.catch(84),l.e(A.t5);case 139:return A.prev=139,l.f(),A.finish(139);case 142:case"end":return A.stop()}}),A,this,[[13,58,61,64],[18,48,51,54],[27,37,40,43],[67,77,80,83],[84,136,139,142],[89,126,129,132]])}))),function(A,I,g,B,C){return F.apply(this,arguments)})},{key:"renderAnnotationOnCanvas",value:(y=C()(t.a.mark((function A(I,g,B,C,Q,E,i){var o,D,w,s,a;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(o=B.Appearance,!(D=B.Appearance.Boundary)){A.next=15;break}if(0!==D.w&&0!==D.h){A.next=5;break}return A.abrupt("return");case 5:return w=Object(h.converterBox)(D,this.coreHelper.dpi),(s=document.createElement("canvas")).style.height="".concat(w.w,"px"),s.style.width="".concat(w.h,"px"),s.width=w.w,s.height=w.h,a=s.getContext("2d"),A.next=14,this.renderLayerByCanvas(s,a,C,Q,E,i,o,!1);case 14:g.drawImage(s,w.x,w.y);case 15:case"end":return A.stop()}}),A,this)}))),function(A,I,g,B,C,Q,E){return y.apply(this,arguments)})},{key:"renderSealSvgOnCanvas",value:(G=C()(t.a.mark((function A(I,g,B,C,Q,E){var i;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return i=Object(h.converterBox)(C,this.coreHelper.dpi),A.abrupt("return",new Promise((function(A,I){var C=new Image;C.src=B,C.onload=function(){var I=C.width,B=C.height,Q=document.createElement("canvas");if(Q.style.height="".concat(I,"px"),Q.style.width="".concat(B,"px"),Q.width=I,Q.height=B,Q.getContext("2d").drawImage(C,0,0),I!==i.w){var E=i.h/B<i.w/I?i.h/B:i.w/I,o=document.createElement("canvas");o.style.height="".concat(i.w,"px"),o.style.width="".concat(i.h,"px"),o.width=i.w,o.height=i.h;var D=o.getContext("2d");D.scale(E,E),D.drawImage(Q,0,0),g.drawImage(o,i.x,i.y)}else g.drawImage(Q,i.x,i.y);A()}})));case 2:case"end":return A.stop()}}),A,this)}))),function(A,I,g,B,C,Q){return G.apply(this,arguments)})},{key:"renderSealPageOnCanvas",value:(c=C()(t.a.mark((function A(I,g,B,C,Q,E,i,o){var D,w,s,a,e,c,G,y,F,n;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return D={x:0,y:0,w:0,h:0},D=E,w={x:E.x,y:E.y,w:C.pageWidth(0,B),h:C.pageHeight(0,B)},s=Object(h.converterBox)(w,this.coreHelper.dpi),a=1,(e=document.createElement("canvas")).style.height="".concat(s.w,"px"),e.style.width="".concat(s.h,"px"),e.width=s.w,e.height=s.h,c=e.getContext("2d"),A.next=13,this.renderPageByCanvas(e,c,0,B,C);case 13:c.scale(a,a),w.w!==D.w?(G=D.h/w.h<D.w/w.w?D.h/w.h:D.w/w.w,y=document.createElement("canvas"),F=Object(h.converterBox)(D,this.coreHelper.dpi),y.style.height="".concat(F.w,"px"),y.style.width="".concat(F.h,"px"),y.width=F.w,y.height=F.h,(n=y.getContext("2d")).scale(G,G),n.drawImage(e,0,0),g.drawImage(y,s.x,s.y)):g.drawImage(e,s.x,s.y);case 15:case"end":return A.stop()}}),A,this)}))),function(A,I,g,B,C,Q,E,i){return c.apply(this,arguments)})},{key:"renderLayerByCanvas",value:(D=C()(t.a.mark((function A(I,g,B,C,Q,E,i,o,D,w,s){var a,c,G,y,F,n,R,r,N,M,U,S,k,Y,d;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(a=null,c=null,G=Object(h.converterDpi)(.353,this.coreHelper.dpi),(y=i.DrawParam)&&Object(h.getDrawParam)(C,y)&&(F=Object(h.getDrawParam)(C,y),Object(h.getDrawParam)(C,F.Relative)&&(F=Object(h.getDrawParam)(C,F.Relative)),F.FillColor&&(a=Object(h.parseColor)(F.FillColor.Value)),F.StrokeColor&&(a=Object(h.parseColor)(F.StrokeColor.Value)),F.LineWidth&&(G=Object(h.converterDpi)(F.LineWidth,this.coreHelper.dpi))),!(n=i.PageBlock)){A.next=60;break}R=e(n),A.prev=8,R.s();case 10:if((r=R.n()).done){A.next=52;break}if("ImageObject"!=(N=r.value).Type){A.next=17;break}return A.next=15,this.renderImageObject(I,g,Q,N,o,w,s);case 15:A.next=50;break;case 17:if("PathObject"!=N.Type){A.next=22;break}return A.next=20,this.renderPathObject(I,g,C,N,a,c,G,o,D,w,s,Q,B);case 20:A.next=50;break;case 22:if("TextObject"!=N.Type){A.next=27;break}return A.next=25,this.renderTextObject(I,g,B,N,a,c,C,D,w,s);case 25:A.next=50;break;case 27:if("CompositeObject"!=N.Type){A.next=50;break}M=e(E),A.prev=29,M.s();case 31:if((U=M.n()).done){A.next=42;break}if((S=U.value).ID!==N.ResourceID){A.next=40;break}return k=N.Alpha,Y=N.Boundary,d=N.CTM,A.next=39,this.renderLayerByCanvas(I,g,B,C,Q,E,S,!1,k,Y,d);case 39:return A.abrupt("break",42);case 40:A.next=31;break;case 42:A.next=47;break;case 44:A.prev=44,A.t0=A.catch(29),M.e(A.t0);case 47:return A.prev=47,M.f(),A.finish(47);case 50:A.next=10;break;case 52:A.next=57;break;case 54:A.prev=54,A.t1=A.catch(8),R.e(A.t1);case 57:return A.prev=57,R.f(),A.finish(57);case 60:case"end":return A.stop()}}),A,this,[[8,54,57,60],[29,44,47,50]])}))),function(A,I,g,B,C,Q,E,i,o,t,h){return D.apply(this,arguments)})},{key:"renderImageObject",value:(i=C()(t.a.mark((function A(I,g,B,C,Q,E,i){var o,D,s,a,e,c;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(o=C.Boundary,o=Object(h.converterBox)(o,this.coreHelper.dpi),D=C.ResourceID){A.next=5;break}return A.abrupt("return");case 5:return(s=Object(h.getMultiMedia)(B,D)).width>0||s.height>0||(a=Object(w.JSGetImageInfoByBase64)(s.FileBase64),s.width=a.width,s.height=a.height,s.FileBase64=a.fileBase64),e=C.CTM,c=C.Clips,A.next=11,this.renderImageOnCanvas(I,g,s.FileBase64,s.width,s.height,o,!1,Q,null,null,e,E,i,c);case 11:case"end":return A.stop()}}),A,this)}))),function(A,I,g,B,C,Q,E){return i.apply(this,arguments)})},{key:"renderImageOnCanvas",value:(Q=C()(t.a.mark((function A(I,g,B,C,Q,E,i,o,D,w,s,a,c,G){var y=this;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(!o){A.next=4;break}return A.next=3,this.render.throwWhite(B);case 3:B=A.sent;case 4:return A.abrupt("return",new Promise((function(A,I){var i=E.x,o=E.y,D=new Image;D.src=B,D.width=C,D.height=Q;var t=y;D.onload=function(){if(a){var I=document.createElement("canvas");I.width=E.w,I.height=E.h,I.style.width="".concat(E.w,"px"),I.style.height="".concat(E.h,"px");var B=I.getContext("2d");s&&B.transform(s.a/C/Object(h.ctmImageScale)(t.coreHelper.dpi),s.b/C/Object(h.ctmImageScale)(t.coreHelper.dpi),s.c/Q/Object(h.ctmImageScale)(t.coreHelper.dpi),s.d/Q/Object(h.ctmImageScale)(t.coreHelper.dpi),Object(h.converterDpi)(s.e,t.coreHelper.dpi),Object(h.converterDpi)(s.f,t.coreHelper.dpi)),B.drawImage(D,0,0);var w=document.createElement("canvas"),y=Object(h.converterBox)(a,t.coreHelper.dpi),F=y.w,n=y.h,R=y.x,r=y.y;w.width=F,w.height=n,w.style.width="".concat(F,"px"),w.style.height="".concat(n,"px");var N=w.getContext("2d");c&&N.transform(c.a,c.b,c.c,c.d,Object(h.converterDpi)(c.e,t.coreHelper.dpi),Object(h.converterDpi)(c.f,t.coreHelper.dpi)),N.drawImage(I,i,o),g.drawImage(w,R,r)}else{var M=document.createElement("canvas");M.width=Math.ceil(E.w),M.height=Math.ceil(E.h),M.style.width="".concat(Math.ceil(E.w),"px"),M.style.height="".concat(Math.ceil(E.h),"px");var U=M.getContext("2d");if(G&&G.length>0)for(var S=0;S<G.length;S++)for(var k=G[S].Clip,Y=0;Y<k.length;Y++){var d=k[Y].Area,H=void 0;d.CTM?H=d.CTM:s&&(H=s),U.beginPath();var K,J=e(d.Path.AbbreviatedData);try{for(J.s();!(K=J.n()).done;){var L=K.value;if("M"===L.cmd||"S"===L.cmd){var l=L.crds[0],f=L.crds[1];if(H){var u=t.ctmCalPoint(l,f,H);l=u.ctmX,f=u.ctmY}U.moveTo(Object(h.converterDpi)(l,t.coreHelper.dpi),Object(h.converterDpi)(f,t.coreHelper.dpi))}else if("L"===L.cmd){var p=L.crds[0],m=L.crds[1];if(H){var b=t.ctmCalPoint(p,m,H);p=b.ctmX,m=b.ctmY}U.lineTo(Object(h.converterDpi)(p,t.coreHelper.dpi),Object(h.converterDpi)(m,t.coreHelper.dpi))}else if("B"===L.cmd){var Z=L.crds[0],q=L.crds[1],W=L.crds[2],x=L.crds[3],V=L.crds[4],v=L.crds[5];if(H){var X=t.ctmCalPoint(Z,q,H);Z=X.ctmX,q=X.ctmY;var T=t.ctmCalPoint(W,x,H);W=T.ctmX,x=T.ctmY;var j=t.ctmCalPoint(V,v,H);V=j.ctmX,v=j.ctmY}U.bezierCurveTo(Object(h.converterDpi)(Z,t.coreHelper.dpi),Object(h.converterDpi)(q,t.coreHelper.dpi),Object(h.converterDpi)(W,t.coreHelper.dpi),Object(h.converterDpi)(x,t.coreHelper.dpi),Object(h.converterDpi)(V,t.coreHelper.dpi),Object(h.converterDpi)(v,t.coreHelper.dpi))}else if("Q"===L.cmd){var O=L.crds[0],z=L.crds[1],P=L.crds[2],_=L.crds[3];if(H){var $=t.ctmCalPoint(O,z,H);O=$.ctmX,z=$.ctmY;var AA=t.ctmCalPoint(P,_,H);P=AA.ctmX,_=AA.ctmY}U.quadraticCurveTo(Object(h.converterDpi)(O,t.coreHelper.dpi),Object(h.converterDpi)(z,t.coreHelper.dpi),Object(h.converterDpi)(P,t.coreHelper.dpi),Object(h.converterDpi)(_,t.coreHelper.dpi))}else"A"===L.cmd||"C"===L.cmd&&U.closePath()}}catch(A){J.e(A)}finally{J.f()}U.clip()}s&&U.transform(s.a/C/Object(h.ctmImageScale)(t.coreHelper.dpi),s.b/C/Object(h.ctmImageScale)(t.coreHelper.dpi),s.c/Q/Object(h.ctmImageScale)(t.coreHelper.dpi),s.d/Q/Object(h.ctmImageScale)(t.coreHelper.dpi),Object(h.converterDpi)(s.e,t.coreHelper.dpi),Object(h.converterDpi)(s.f,t.coreHelper.dpi)),U.drawImage(D,0,0),g.drawImage(M,i,o)}A()}})));case 5:case"end":return A.stop()}}),A,this)}))),function(A,I,g,B,C,E,i,o,D,t,h,w,s,a){return Q.apply(this,arguments)})},{key:"ctmCalPoint",value:function(A,I,g){return{ctmX:A*g.a+I*g.c+1*g.e,ctmY:A*g.b+I*g.d+1*g.f}}},{key:"renderPathObject",value:(B=C()(t.a.mark((function A(I,g,B,C,Q,E,i,o,D,w,s,a,c){var G,y,F,n,R,r,N,M,U,S,k,Y,d,H,K,J,L,l,f,u,p,m,b,Z,q,W,x,V,v,X,T,j,O,z,P,_,$,AA,IA,gA,BA,CA,QA,EA,iA,oA,DA;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(G=C.Boundary){A.next=3;break}return A.abrupt("return");case 3:if(y=1,G=Object(h.converterBox)(G,this.coreHelper.dpi),F=Math.ceil(G.w),n=Math.ceil(G.h),R=G.x,r=G.y,F-0!=0&&n-0!=0){A.next=11;break}return A.abrupt("return");case 11:if(N=document.createElement("canvas"),M=N.getContext("2d"),N.width=F*y,N.height=n*y,N.style.width="".concat(F,"px"),N.style.height="".concat(n,"px"),U=C.LineWidth,S=C.AbbreviatedData,k=C.CTM,Y=C.StrokeColor,d=C.FillColor,U&&(i=Object(h.converterDpi)(U,this.coreHelper.dpi)),(H=C.DrawParam)&&(K=Object(h.getDrawParam)(B,H),(U=K.LineWidth)&&(i=Object(h.converterDpi)(U,this.coreHelper.dpi)),K.FillColor&&(d&&d.Value||(d=K.FillColor)),K.StrokeColor&&(Y&&Y.Value||(Y=K.StrokeColor))),k&&M.transform(k.a,k.b,k.c,k.d,Object(h.converterDpi)(k.e,this.coreHelper.dpi),Object(h.converterDpi)(k.f,this.coreHelper.dpi)),J=!1,Y&&(Y.Value&&(E=Object(h.parseColor)(Y.Value)),L=Y.axialShd)){J=!0,l=Object(h.parseCtm)(L.StartPoint),f=Object(h.parseCtm)(L.EndPoint),u=M.createLinearGradient(l[0],l[1],f[0],f[1]),p=e(L.Segment);try{for(p.s();!(m=p.n()).done;)(b=m.value)&&u.addColorStop(b.position,Object(h.parseColor)(b.color.Value))}catch(A){p.e(A)}finally{p.f()}M.lineWidth=i,M.strokeStyle=u}if(Z=!1,d&&(d.Value&&(Q=Object(h.parseColor)(d.Value)),d.Alpha&&0===d.Alpha&&(M.globalAlpha=0),q=d.AxialShd)){Z=!0,W=Object(h.parseCtm)(q.StartPoint),x=Object(h.parseCtm)(q.EndPoint),V=M.createLinearGradient(W[0],W[1],x[0],x[1]),v=e(q.Segment);try{for(v.s();!(X=v.n()).done;)(T=X.value)&&V.addColorStop(T.position,Object(h.parseColor)(T.color.Value))}catch(A){v.e(A)}finally{v.f()}M.fillStyle=V}i>0&&!E&&((E=Q)||(E="rgb(0, 0, 0)")),C.Join&&M.setLineJoin(C["@_Join"]),C.Cap&&M.setLineCap(C["@_Cap"]),C.DashPattern&&(j=C.DashPattern,O=Object(h.parseCtm)(j),C.DashOffset&&C.DashOffset,M.setLineDash([Object(h.converterDpi)(O[0],this.coreHelper.dpi),Object(h.converterDpi)(O[1],this.coreHelper.dpi)])),M.beginPath(),z=e(S);try{for(z.s();!(P=z.n()).done;)"M"===(_=P.value).cmd||"S"===_.cmd?M.moveTo(Object(h.converterDpi)(_.crds[0],this.coreHelper.dpi),Object(h.converterDpi)(_.crds[1],this.coreHelper.dpi)):"L"===_.cmd?M.lineTo(Object(h.converterDpi)(_.crds[0],this.coreHelper.dpi),Object(h.converterDpi)(_.crds[1],this.coreHelper.dpi)):"B"===_.cmd?M.bezierCurveTo(Object(h.converterDpi)(_.crds[0],this.coreHelper.dpi),Object(h.converterDpi)(_.crds[1],this.coreHelper.dpi),Object(h.converterDpi)(_.crds[2],this.coreHelper.dpi),Object(h.converterDpi)(_.crds[3],this.coreHelper.dpi),Object(h.converterDpi)(_.crds[4],this.coreHelper.dpi),Object(h.converterDpi)(_.crds[5],this.coreHelper.dpi)):"Q"===_.cmd?M.quadraticCurveTo(Object(h.converterDpi)(_.crds[0],this.coreHelper.dpi),Object(h.converterDpi)(_.crds[1],this.coreHelper.dpi),Object(h.converterDpi)(_.crds[2],this.coreHelper.dpi),Object(h.converterDpi)(_.crds[3],this.coreHelper.dpi)):"A"===_.cmd||"C"===_.cmd&&M.closePath()}catch(A){z.e(A)}finally{z.f()}if(C.Stroke&&(J||(M.strokeStyle=E,M.lineWidth=i),M.stroke()),$=d.pattern,!C.Fill||$?M.fillStyle="none":(Z||(M.fillStyle=Q),M.fill(C.Rule)),!$){A.next=52;break}return M.save(),AA=document.createElement("canvas"),IA=AA.getContext("2d"),AA.width=Object(h.converterDpi)($.width,this.coreHelper.dpi),AA.height=Object(h.converterDpi)($.height,this.coreHelper.dpi),A.next=48,this.renderLayerByCanvas(AA,IA,c,B,a,null,$,!1,null,null,null);case 48:gA=M.createPattern(AA,"repeat"),M.fillStyle=gA,M.fillRect(0,0,F,n),M.restore();case 52:w?(BA=document.createElement("canvas"),CA=Object(h.converterBox)(w,this.coreHelper.dpi),QA=CA.w,EA=CA.h,iA=CA.x,oA=CA.y,BA.width=QA*y,BA.height=EA*y,BA.style.width="".concat(QA,"px"),BA.style.height="".concat(EA,"px"),DA=BA.getContext("2d"),s&&DA.transform(s.a,s.b,s.c,s.d,Object(h.converterDpi)(s.e,this.coreHelper.dpi),Object(h.converterDpi)(s.f,this.coreHelper.dpi)),D&&(DA.globalAlpha=D/255),DA.drawImage(N,R,r),g.drawImage(BA,iA,oA)):g.drawImage(N,R,r);case 53:case"end":return A.stop()}}),A,this)}))),function(A,I,g,C,Q,E,i,o,D,t,h,w,s){return B.apply(this,arguments)})},{key:"renderTextObject",value:(g=C()(t.a.mark((function A(I,g,B,C,Q,E,i,o,D,s){var a,c,G,y,F,n,R,r,N,M,U,S,k,Y,d,H,K,J,L,l,f,u,p,m,b,Z,q,W,x,V,v,X,T,j,O,z,P,_,$,AA,IA,gA,BA,CA,QA,EA,iA,oA,DA,tA,hA,wA,sA;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(a=1,c=C.Boundary,c=Object(h.converterBox)(c,this.coreHelper.dpi),G=C.CTM,y=C.HScale,F=C.Font,n=C.Weight,R=C.Size>0,G&&!R&&(G={a:-G.a,b:G.b,c:G.c,d:-G.d,e:-G.e,f:-G.f}),r=Object(h.converterDpi)(Math.abs(parseFloat(C.Size)),this.coreHelper.dpi),N=Object(h.calTextPoint)(this.coreHelper.dpi,C.TextCode,C.CGTransform,G,C.Boundary,D,s,R),(M=document.createElementNS("http://www.w3.org/2000/svg","svg")).setAttribute("xmlns","http://www.w3.org/2000/svg"),M.setAttribute("version","1.1"),U=C.FillColor,S=!1,(k=C.DrawParam)&&(Y=Object(h.getDrawParam)(i,k)).FillColor&&(U&&U.Value||(U=Y.FillColor)),U&&(U.Value&&(Q=Object(h.parseColor)(U.Value)),d=U.alpha,a=d/255,H=U.axialShd)){S=!0,(K=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id","".concat(C.ID)),K.setAttribute("x1","0%"),K.setAttribute("y1","0%"),K.setAttribute("x2","100%"),K.setAttribute("y2","100%"),J=e(H.Segment);try{for(J.s();!(L=J.n()).done;)(l=L.value)&&((f=document.createElement("stop")).setAttribute("offset","".concat(100*l.position,"%")),f.setAttribute("style","stop-color:".concat(Object(h.parseColor)(l.color.Value),";stop-opacity:1")),K.appendChild(f),Q=Object(h.parseColor)(l.color.Value))}catch(A){J.e(A)}finally{J.f()}M.appendChild(K)}C.Fill||(a=0),u=c.w,p=c.h,m=c.x,b=c.y,Z=r,q=r,W=0,G&&(x=G.a,V=G.b,v=G.c,X=G.d,T=x>0?Math.sign(x)*Math.sqrt(x*x+v*v):Math.sqrt(x*x+v*v),j=X>0?Math.sign(X)*Math.sqrt(V*V+X*X):Math.sqrt(V*V+X*X),0==(W=Math.atan2(-V,X))&&0!=x&&1==X||(Z*=T,q*=j),0==W&&y-0==1&&(y=x/X)>0&&(Z*=y)),s&&(O=s.a,z=s.b,P=s.c,_=s.d,$=O>0?Math.sign(O)*Math.sqrt(O*O+P*P):Math.sqrt(O*O+P*P),AA=_>0?Math.sign(_)*Math.sqrt(z*z+_*_):Math.sqrt(z*z+_*_),0==(W=Math.atan2(-z,_))&&0!=O&&1==_||(Z*=$,q*=AA,b*=AA,m*=$,u*=$,p*=AA)),IA=Object(h.getFont)(B,F),gA=e(N),A.prev=31,gA.s();case 33:if((BA=gA.n()).done){A.next=73;break}if(!(CA=BA.value)||isNaN(CA.x)){A.next=71;break}if(!CA.glyph){A.next=59;break}if(!IA||!IA.face){A.next=57;break}if(QA=Object(w.loadFaceInfo)(IA.face),EA=Object(w.FT_Glyph_Get_Measure)(IA.face,CA.glyph),(iA=this.render.drawGlyph(EA.glyphPath,EA.horiUnderlinePosition,QA.units_per_EM,Z,q,E||Q,a)).img.setAttribute("style","width: ".concat(Math.ceil(Z),"px; height:").concat(Math.ceil(q),"px")),oA="data:image/svg+xml;base64,".concat(Object(w.base64Encode)(iA.img.outerHTML)),0!==W){A.next=48;break}return A.next=46,this.drawTextFromSvg(I,g,oA,Math.ceil(CA.cx),CA.cy-iA.yScale*EA.horiUnderlinePosition-q);case 46:A.next=57;break;case 48:return(DA=document.createElement("canvas")).style.width="".concat(Math.ceil(Z),"px"),DA.style.height="".concat(Math.ceil(q),"px"),DA.width=Math.ceil(Z),DA.height=Math.ceil(q),tA=DA.getContext("2d"),A.next=56,this.drawTextFromSvg(DA,tA,oA,0,0,W,Math.ceil(Z)/2,Math.ceil(q)/2);case 56:g.drawImage(DA,Math.ceil(CA.cx),CA.cy-iA.yScale*EA.horiUnderlinePosition-q);case 57:A.next=71;break;case 59:(hA=document.createElementNS("http://www.w3.org/2000/svg","text")).setAttribute("x",CA.x),hA.setAttribute("y",CA.y),hA.innerHTML=CA.text,wA="",G&&(wA="matrix(".concat(G.a," ").concat(G.b," ").concat(G.c," ").concat(G.d," ").concat(Object(h.converterDpi)(G.e,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(G.f,this.coreHelper.dpi),")")),s&&(wA="".concat(wA," matrix(").concat(s.a," ").concat(s.b," ").concat(s.c," ").concat(s.d," ").concat(Object(h.converterDpi)(s.e,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(s.f,this.coreHelper.dpi),")")),y&&(wA="".concat(wA," matrix(").concat(y,", 0, 0, 1, ").concat((1-y)*CA.x,", 0)")),hA.setAttribute("transform",wA),S?hA.setAttribute("fill",Q):(hA.setAttribute("fill",E),hA.setAttribute("fill",Q),hA.setAttribute("fill-opacity",a)),hA.setAttribute("style","font-weight: ".concat(n,";font-size:").concat(r,"px;font-family: ").concat(Object(h.getFontFamily)(IA),";")),M.appendChild(hA);case 71:A.next=33;break;case 73:A.next=78;break;case 75:A.prev=75,A.t0=A.catch(31),gA.e(A.t0);case 78:return A.prev=78,gA.f(),A.finish(78);case 81:return M.setAttribute("style","overflow:visible;width:".concat(u,"px;height:").concat(p,"px")),sA="data:image/svg+xml;base64,".concat(Object(w.base64Encode)(M.outerHTML)),A.next=85,this.drawTextFromSvg(I,g,sA,m,b);case 85:case"end":return A.stop()}}),A,this,[[31,75,78,81]])}))),function(A,I,B,C,Q,E,i,o,D,t){return g.apply(this,arguments)})},{key:"drawTextFromSvg",value:(I=C()(t.a.mark((function A(I,g,B,C,Q,E,i,o){return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",new Promise((function(A,I){var D=new Image;D.src=B,D.onload=function(){0!=E&&i&&o&&(g.translate(i,o),g.rotate(-E),g.translate(-i,-o)),g.drawImage(D,C,Q),A()}})));case 1:case"end":return A.stop()}}),A)}))),function(A,g,B,C,Q,E,i,o){return I.apply(this,arguments)})}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"OfdThumbnailViewer",(function(){return a}));var B=g(2),C=g.n(B),Q=g(1),E=g.n(Q),i=g(20),o=g(27),D=g(35),t=g(34);function h(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return w(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return w(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function w(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var s="selected",a=function(){function A(I,g){C()(this,A),this.core=null,this.coreHelper=new t.Ofd_Core_Helper(96),this.ofdCanvasRender=new D.OfdCanvasRender(null,this.coreHelper),this.eventBus=g,this.container=I,this.pageDIV=[],this.currentPage=1,this.container&&(this.scroll=Object(i.watchScroll)(this.container,this._scrollUpdate.bind(this)))}return E()(A,[{key:"emptyNode",value:function(A){if(A)for(;A.firstChild;)A.removeChild(A.firstChild)}},{key:"freeThumbnailDocument",value:function(){this.pageDIV=[];var A=this.container;this.emptyNode(A)}},{key:"getScrollAhead",value:function(A){return!(!A.first||1!==A.first.id)||(!A.last||A.last.id!==this.pageDIV.length)&&scroll.down}},{key:"_scrollUpdate",value:function(){0!==this.core.getOFDPageCount(0)&&this.updateThumbnailView()}},{key:"_getVisibleThumbs",value:function(){return Object(i.getVisibleElements)({scrollEl:this.container,views:this.pageDIV})}},{key:"updateThumbnailView",value:function(){var A=this,I=this._getVisibleThumbs();if(0!==I.views.length){var g=this.getScrollAhead(I),B=Object(o.getHighestPriority)(I,this.pageDIV,g);if(B&&B.renderingState===i.RenderingStates.INITIAL){B.renderingState=i.RenderingStates.RUNNING;var C=B.ring,Q=document.createElement("canvas"),E=Q.getContext("2d");Q.style.height=C.style.height,Q.style.width=C.style.width,Q.width=1*this.coreHelper.pageRenderWidth(0,B.id-1,this.core),Q.height=1*this.coreHelper.pageRenderHeight(0,B.id-1,this.core);var D=Q.width/Q.height,t=document.createElement("img");t.className="thumbnailImage",t.style.width="98px",t.style.height=98/D+"px",this.ofdCanvasRender.renderPageByCanvas(Q,E,0,B.id-1).then((function(I){var g=Q.toDataURL();t.src=g,B.renderingState=i.RenderingStates.FINISHED,A.updateThumbnailView()})),C.appendChild(t)}}}},{key:"scrollThumbnailIntoView",value:function(A){if(A){var I=this.pageDIV[A-1];if(I){if(A!==this.currentPage)this.pageDIV[this.currentPage-1].div.classList.remove(s),I.div.classList.add(s);var g=this._getVisibleThumbs(),B=g.first,C=g.last,Q=g.views;if(Q.length>0){var E=!1;if(A<=B.id||A>=C.id)E=!0;else{var o,D=h(Q);try{for(D.s();!(o=D.n()).done;){var t=o.value,w=t.id,a=t.percent;if(w===A){E=a<100;break}}}catch(A){D.e(A)}finally{D.f()}}E&&Object(i.scrollIntoView)(I.div,{top:-19})}this.currentPage=A}}}},{key:"setOfdCore",value:function(A){var I=this;if(this.container){this.core&&this.freeThumbnailDocument(),this.core=A,this.ofdCanvasRender.setOfdCore(this.core);for(var g=this.container,B=this,C=function(A){var C=I.coreHelper.pageRenderWidth(0,A,I.core)/I.coreHelper.pageRenderHeight(0,A,I.core),Q=document.createElement("a");Q.onclick=function(){return B.eventBus.dispatch("jumpPage",{source:this,pageIndex:A+1}),!1};var E=document.createElement("div");E.className="thumbnail",E.setAttribute("data-page-number","".concat(A+1));var o=document.createElement("div");o.className="thumbnailSelectionRing";o.style.width="100px",o.style.height=98/C+2+"px",E.appendChild(o),Q.appendChild(E),I.pageDIV[A]={ring:o,div:E,anchor:Q,id:A+1,renderingState:i.RenderingStates.INITIAL},g.appendChild(Q)},Q=0;Q<this.core.getOFDPageCount(0);++Q)C(Q);this.updateThumbnailView()}}}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"PDFSidebar",(function(){return D}));var B=g(2),C=g.n(B),Q=g(1),E=g.n(Q),i=g(20),o="pdfSidebarNotification",D=function(){function A(I){var g=I.elements,B=I.ofdViewer,Q=I.ofdThumbnailViewer,E=I.eventBus,o=I.l10n;C()(this,A),this.isOpen=!1,this.active=i.SidebarView.THUMBS,this.isInitialViewSet=!1,this.onToggled=null,this.ofdViewer=B,this.ofdThumbnailViewer=Q,this.outerContainer=g.outerContainer,this.viewerContainer=g.viewerContainer,this.toggleButton=g.toggleButton,this.thumbnailButton=g.thumbnailButton,this.outlineButton=g.outlineButton,this.attachmentsButton=g.attachmentsButton,this.layersButton=g.layersButton,this.signaturesButton=g.signaturesButton,this.thumbnailView=g.thumbnailView,this.outlineView=g.outlineView,this.attachmentsView=g.attachmentsView,this.layersView=g.layersView,this.signaturesView=g.signaturesView,this._outlineOptionsContainer=g.outlineOptionsContainer,this._currentOutlineItemButton=g.currentOutlineItemButton,this.eventBus=E,this.l10n=o,this._addEventListeners()}return E()(A,[{key:"reset",value:function(){this.isInitialViewSet=!1,this._hideUINotification(!0),this.switchView(i.SidebarView.OUTLINE),this.outlineButton.disabled=!1,this.attachmentsButton.disabled=!1,this.layersButton.disabled=!1,this._currentOutlineItemButton.disabled=!0}},{key:"visibleView",get:function(){return this.isOpen?this.active:i.SidebarView.NONE}},{key:"isThumbnailViewVisible",get:function(){return this.isOpen&&this.active===i.SidebarView.THUMBS}},{key:"isOutlineViewVisible",get:function(){return this.isOpen&&this.active===i.SidebarView.OUTLINE}},{key:"isAttachmentsViewVisible",get:function(){return this.isOpen&&this.active===i.SidebarView.ATTACHMENTS}},{key:"isLayersViewVisible",get:function(){return this.isOpen&&this.active===i.SidebarView.LAYERS}},{key:"isSignatureViewVisible",get:function(){return this.isOpen&&this.active===i.SidebarView.SIGNATURES}},{key:"setInitialView",value:function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.SidebarView.NONE;this.isInitialViewSet||(this.isInitialViewSet=!0,A!==i.SidebarView.NONE&&A!==i.SidebarView.UNKNOWN&&this._switchView(A,!0)||this._dispatchEvent())}},{key:"switchView",value:function(A){var I=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._switchView(A,I)}},{key:"_switchView",value:function(A){var I=arguments.length>1&&void 0!==arguments[1]&&arguments[1],g=A!==this.active,B=!1;switch(A){case i.SidebarView.NONE:return!!this.isOpen&&(this.close(),!0);case i.SidebarView.THUMBS:this.isOpen&&g&&(B=!0);break;case i.SidebarView.OUTLINE:if(this.outlineButton.disabled)return!1;break;case i.SidebarView.ATTACHMENTS:if(this.attachmentsButton.disabled)return!1;break;case i.SidebarView.LAYERS:if(this.layersButton.disabled)return!1;break;case i.SidebarView.SIGNATURES:if(this.signaturesButton.disabled)return!1;break;default:return!1}this.active=A;var C=A===i.SidebarView.THUMBS,Q=A===i.SidebarView.OUTLINE,E=A===i.SidebarView.ATTACHMENTS,o=A===i.SidebarView.LAYERS,D=A===i.SidebarView.SIGNATURES;return this.thumbnailButton&&this.thumbnailButton.classList.toggle("toggled",C),this.outlineButton&&this.outlineButton.classList.toggle("toggled",Q),this.attachmentsButton&&this.attachmentsButton.classList.toggle("toggled",E),this.layersButton&&this.layersButton.classList.toggle("toggled",o),this.signaturesButton&&this.signaturesButton.classList.toggle("toggled",D),this.thumbnailButton&&this.thumbnailButton.setAttribute("aria-checked",C),this.outlineButton&&this.outlineButton.setAttribute("aria-checked",Q),this.attachmentsButton&&this.attachmentsButton.setAttribute("aria-checked",E),this.layersButton&&this.layersButton.setAttribute("aria-checked",o),this.signaturesButton&&this.signaturesButton.setAttribute("aria-checked",D),this.thumbnailView&&this.thumbnailView.classList.toggle("hidden",!C),this.outlineView&&this.outlineView.classList.toggle("hidden",!Q),this.attachmentsView&&this.attachmentsView.classList.toggle("hidden",!E),this.layersView&&this.layersView.classList.toggle("hidden",!o),this.signaturesView&&this.signaturesView.classList.toggle("hidden",!D),this._outlineOptionsContainer&&this._outlineOptionsContainer.classList.toggle("hidden",!Q),I&&!this.isOpen?(this.open(),!0):(B&&(this._updateThumbnailViewer(),this._forceRendering()),g&&this._dispatchEvent(),g)}},{key:"open",value:function(){this.isOpen||(this.isOpen=!0,this.toggleButton.classList.add("toggled"),this.toggleButton.setAttribute("aria-expanded","true"),this.outerContainer.classList.add("sidebarMoving","sidebarOpen"),this.active===i.SidebarView.THUMBS&&this._updateThumbnailViewer(),this._forceRendering(),this._dispatchEvent(),this._hideUINotification())}},{key:"close",value:function(){this.isOpen&&(this.isOpen=!1,this.toggleButton.classList.remove("toggled"),this.toggleButton.setAttribute("aria-expanded","false"),this.outerContainer.classList.add("sidebarMoving"),this.outerContainer.classList.remove("sidebarOpen"),this._forceRendering(),this._dispatchEvent())}},{key:"toggle",value:function(){this.isOpen?this.close():this.open()}},{key:"_dispatchEvent",value:function(){this.eventBus.dispatch("sidebarviewchanged",{source:this,view:this.isOutlineViewVisible})}},{key:"_forceRendering",value:function(){this.onToggled?this.onToggled():(this.ofdViewer.forceRendering(),this.ofdThumbnailViewer&&this.ofdThumbnailViewer.updateThumbnailView())}},{key:"_updateThumbnailViewer",value:function(){var A=this.ofdViewer;this.ofdThumbnailViewer.scrollThumbnailIntoView(A.currentPageNumber)}},{key:"_showUINotification",value:function(){var A=this;this.l10n.get("toggle_sidebar_notification2.title").then((function(I){A.toggleButton.title=I})),this.isOpen||this.toggleButton.classList.add(o)}},{key:"_hideUINotification",value:function(){var A=this,I=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(this.isOpen||I)&&this.toggleButton.classList.remove(o),I&&this.l10n.get("toggle_sidebar.title").then((function(I){A.toggleButton.title=I}))}},{key:"_addEventListeners",value:function(){var A,I,g,B,C,Q,E,o,D,t,h=this;null===(A=this.viewerContainer)||void 0===A||A.addEventListener("transitionend",(function(A){A.target===h.viewerContainer&&h.outerContainer.classList.remove("sidebarMoving")})),null===(I=this.toggleButton)||void 0===I||I.addEventListener("click",(function(){h.toggle()})),null===(g=this.thumbnailButton)||void 0===g||g.addEventListener("click",(function(){h.switchView(i.SidebarView.THUMBS)})),null===(B=this.outlineButton)||void 0===B||B.addEventListener("click",(function(){h.switchView(i.SidebarView.OUTLINE)})),null===(C=this.outlineButton)||void 0===C||C.addEventListener("dblclick",(function(){h.eventBus.dispatch("toggleoutlinetree",{source:h})})),null===(Q=this.attachmentsButton)||void 0===Q||Q.addEventListener("click",(function(){h.switchView(i.SidebarView.ATTACHMENTS)})),null===(E=this.layersButton)||void 0===E||E.addEventListener("click",(function(){h.switchView(i.SidebarView.LAYERS)})),null===(o=this.layersButton)||void 0===o||o.addEventListener("dblclick",(function(){h.eventBus.dispatch("resetlayers",{source:h})})),null===(D=this.signaturesButton)||void 0===D||D.addEventListener("click",(function(){h.switchView(i.SidebarView.SIGNATURES)})),null===(t=this._currentOutlineItemButton)||void 0===t||t.addEventListener("click",(function(){h.eventBus.dispatch("currentoutlineitem",{source:h})}));var w=function(A,I,g){I.disabled=!A,A?h._showUINotification():h.active===g&&h.switchView(i.SidebarView.THUMBS)};this.eventBus._on("outlineloaded",(function(A){w(A.outlineCount,h.outlineButton,i.SidebarView.OUTLINE),A.currentOutlineItemPromise.then((function(A){h.isInitialViewSet&&(h._currentOutlineItemButton.disabled=!A)}))})),this.eventBus._on("attachmentsloaded",(function(A){w(A.attachmentsCount,h.attachmentsButton,i.SidebarView.ATTACHMENTS)})),this.eventBus._on("layersloaded",(function(A){w(A.layersCount,h.layersButton,i.SidebarView.LAYERS)})),this.eventBus._on("presentationmodechanged",(function(A){A.state===i.PresentationModeState.NORMAL&&h.isThumbnailViewVisible&&h._updateThumbnailViewer()}))}}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"OverlayManager",(function(){return h}));var B=g(3),C=g.n(B),Q=g(2),E=g.n(Q),i=g(1),o=g.n(i),D=g(4),t=g.n(D),h=function(){function A(){E()(this,A),this.overlays=new WeakMap}var I,g,B,Q;return o()(A,[{key:"register",value:(Q=C()(t.a.mark((function A(I){var g,B=this,C=arguments;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(g=C.length>1&&void 0!==C[1]&&C[1],"object"==typeof I){A.next=5;break}throw new Error("Not enough parameters.");case 5:if(!this.overlays.has(I)){A.next=7;break}throw new Error("The overlay is already registered.");case 7:this.overlays.set(I,{canForceClose:g}),"undefined"!=typeof PDFJSDev&&PDFJSDev.test("GENERIC && !SKIP_BABEL")&&I.showModal,I.addEventListener("cancel",(function(A){B.active=null}));case 10:case"end":return A.stop()}}),A,this)}))),function(A){return Q.apply(this,arguments)})},{key:"unregister",value:(B=C()(t.a.mark((function A(I){return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(this.overlays.has(I)){A.next=4;break}throw new Error("The overlay does not exist.");case 4:if(this.active!==I){A.next=6;break}throw new Error("The overlay cannot be removed while it is active.");case 6:this.overlays.delete(I);case 7:case"end":return A.stop()}}),A,this)}))),function(A){return B.apply(this,arguments)})},{key:"open",value:(g=C()(t.a.mark((function A(I){return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(this.overlays.has(I)){A.next=4;break}throw new Error("The overlay does not exist.");case 4:if(!this.active){A.next=15;break}if(this.active!==I){A.next=9;break}throw new Error("The overlay is already active.");case 9:if(!this.overlays.get(I).canForceClose){A.next=14;break}return A.next=12,this.close();case 12:A.next=15;break;case 14:throw new Error("Another overlay is currently active.");case 15:this.active=I,"function"==typeof I.showModal&&I.showModal();case 17:case"end":return A.stop()}}),A,this)}))),function(A){return g.apply(this,arguments)})},{key:"close",value:(I=C()(t.a.mark((function A(){var I,g=arguments;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(I=g.length>0&&void 0!==g[0]?g[0]:this.active,this.overlays.has(I)){A.next=5;break}throw new Error("The overlay does not exist.");case 5:if(this.active){A.next=9;break}throw new Error("The overlay is currently not active.");case 9:if(this.active===I){A.next=11;break}throw new Error("Another overlay is currently active.");case 11:I.close(),this.active=null;case 13:case"end":return A.stop()}}),A,this)}))),function(){return I.apply(this,arguments)})}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"PDFDocumentProperties",(function(){return w}));var B=g(3),C=g.n(B),Q=g(2),E=g.n(Q),i=g(1),o=g.n(i),D=g(4),t=g.n(D),h=(g(20),"-"),w=function(){function A(I,g,B,C){var Q=this,i=I.dialog,o=I.fields,D=I.closeButton;E()(this,A),this.dialog=i,this.fields=o,this.overlayManager=g,this.l10n=C,this.fieldData=null,this.reset(),D.addEventListener("click",this.close.bind(this)),this.overlayManager.register(this.dialog),B._on("pagechanging",(function(A){Q._currentPageNumber=A.pageNumber})),B._on("rotationchanging",(function(A){Q._pagesRotation=A.pagesRotation})),this._isNonMetricLocale=!0}var I,g;return o()(A,[{key:"open",value:(g=C()(t.a.mark((function A(){var I,g,B,C,Q,E;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(this.dialog.hidden=!1,this.ofdCore){A.next=3;break}return A.abrupt("return");case 3:if(this.overlayManager.open(this.dialog),I=this._currentPageNumber,g=this._pagesRotation,!this.fieldData||I!==this.fieldData._currentPageNumber||g!==this.fieldData._pagesRotation){A.next=9;break}return this.updateUI(),A.abrupt("return");case 9:B=this.getMetadata(),C=B.info,B.contentDispositionFilename,Q=B.contentLength,E=this.parseFileSize(Q),this.fieldData=Object.freeze({fileSize:E,title:C.Title,author:C.Author,subject:C.Subject,keywords:C.Keywords,creationDate:C.CreationDate,modificationDate:C.ModificationDate,creator:C.Creator,producer:C.Producer,version:C.CreatorVersion,pageCount:C.numPages,pageSize:C.pageSize,_currentPageNumber:I,_pagesRotation:g}),this.updateUI();case 13:case"end":return A.stop()}}),A,this)}))),function(){return g.apply(this,arguments)})},{key:"close",value:(I=C()(t.a.mark((function A(){return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:this.overlayManager.close(this.dialog);case 1:case"end":return A.stop()}}),A,this)}))),function(){return I.apply(this,arguments)})},{key:"setOfdCore",value:function(A){var I=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.ofdCore&&(this.reset(),this.updateUI(!0)),A&&(this.ofdCore=A,this.url=I)}},{key:"getMetadata",value:function(){if(this.ofdCore)return{info:this.ofdCore.getMetadata(0),contentLength:this.ofdCore.ofd.size}}},{key:"reset",value:function(){this.ofdCore=null,this.url=null,this.fieldData=null,this._currentPageNumber=1,this._pagesRotation=0}},{key:"updateUI",value:function(){var A=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!A&&this.fieldData){if(this.overlayManager.active===this.dialog)for(var I in this.fields){var g=this.fieldData[I];this.fields[I].textContent=g||0===g?g:h}}else for(var B in this.fields)this.fields[B].textContent=h}},{key:"parseFileSize",value:function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,I=A/1024,g=I/1024;if(I)return g>=1?"".concat(g>=1&&(+g.toPrecision(3)).toLocaleString(),"mb(").concat(A.toLocaleString(),"字节)"):"".concat(g<1&&(+I.toPrecision(3)).toLocaleString(),"kb(").concat(A.toLocaleString(),"字节)")}},{key:"parseLinearization",value:function(A){return this.l10n.get("document_properties_linearized_".concat(A?"yes":"no"))}}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"Toolbar",(function(){return h}));var B=g(2),C=g.n(B),Q=g(1),E=g.n(Q),i=g(20);function o(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return D(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return D(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function D(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var t="visiblePageIsLoading",h=function(){function A(I,g,B){C()(this,A),this.toolbar=I.container,this.eventBus=g,this.l10n=B,this.buttons=[{element:I.previous,eventName:"previouspage"},{element:I.next,eventName:"nextpage"},{element:I.zoomIn,eventName:"zoomin"},{element:I.zoomOut,eventName:"zoomout"},{element:I.openFile,eventName:"openfile"},{element:I.print,eventName:"print"},{element:I.presentationModeButton,eventName:"presentationmode"},{element:I.download,eventName:"download"},{element:I.viewBookmark,eventName:null}],this.items={numPages:I.numPages,pageNumber:I.pageNumber,scaleSelect:I.scaleSelect,customScaleOption:I.customScaleOption,previous:I.previous,next:I.next,zoomIn:I.zoomIn,zoomOut:I.zoomOut},this._wasLocalized=!1,this.reset(),this._bindListeners()}return E()(A,[{key:"setPageNumber",value:function(A,I){this.pageNumber=A,this.pageLabel=I,this._updateUIState(!1)}},{key:"setPagesCount",value:function(A,I){this.pagesCount=A,this.hasPageLabels=I,this._updateUIState(!0)}},{key:"setPageScale",value:function(A,I){this.pageScaleValue=(A||I).toString(),this.pageScale=I,this._updateUIState(!1)}},{key:"reset",value:function(){this.pageNumber=0,this.pageLabel=null,this.hasPageLabels=!1,this.pagesCount=0,this.pageScaleValue=i.DEFAULT_SCALE_VALUE,this.pageScale=i.DEFAULT_SCALE,this._updateUIState(!0),this.updateLoadingIndicatorState()}},{key:"_bindListeners",value:function(){var A,I=this,g=this.items,B=g.pageNumber,C=g.scaleSelect,Q=this,E=o(this.buttons);try{var D=function(){var g=A.value,B=g.element,C=g.eventName;null==B||B.addEventListener("click",(function(A){null!==C&&I.eventBus.dispatch(C,{source:I})}))};for(E.s();!(A=E.n()).done;)D()}catch(A){E.e(A)}finally{E.f()}B.addEventListener("click",(function(){this.select()})),B.addEventListener("change",(function(){Q.eventBus.dispatch("pagenumberchanged",{source:Q,value:this.value})})),C.addEventListener("change",(function(){"custom"!==this.value&&Q.eventBus.dispatch("scalechanged",{source:Q,value:this.value})})),C.addEventListener("click",(function(A){var I=A.target;this.value===Q.pageScaleValue&&"OPTION"===I.tagName.toUpperCase()&&this.blur()})),C.oncontextmenu=i.noContextMenuHandler,this.eventBus._on("localized",(function(){I._wasLocalized=!0,I._updateUIState(!0)}))}},{key:"_updateUIState",value:function(){var A=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._wasLocalized){var I=this.pageNumber,g=this.pagesCount,B=this.pageScaleValue,C=this.pageScale,Q=this.items;A&&(this.hasPageLabels?Q.pageNumber.type="text":(Q.pageNumber.type="number",this.l10n.get("of_pages",{pagesCount:g}).then((function(A){Q.numPages.textContent=A}))),Q.pageNumber.max=g),this.hasPageLabels?(Q.pageNumber.value=this.pageLabel,this.l10n.get("page_of_pages",{pageNumber:I,pagesCount:g}).then((function(A){Q.numPages.textContent=A}))):Q.pageNumber.value=I,Q.previous.disabled=I<=1,Q.next.disabled=I>=g,Q.zoomOut.disabled=C<=i.MIN_SCALE,Q.zoomIn.disabled=C>=i.MAX_SCALE;var E,D=!1,t=o(Q.scaleSelect.options);try{for(t.s();!(E=t.n()).done;){var h=E.value;h.value===B?(h.selected=!0,D=!0):h.selected=!1}}catch(A){t.e(A)}finally{t.f()}D||(Q.customScaleOption.textContent="".concat(1e4*C/100,"%"),Q.customScaleOption.selected=!0)}}},{key:"updateLoadingIndicatorState",value:function(){var A=arguments.length>0&&void 0!==arguments[0]&&arguments[0],I=this.items.pageNumber;I.classList.toggle(t,A)}}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"SecondaryToolbar",(function(){return h}));var B=g(2),C=g.n(B),Q=g(1),E=g.n(Q),i=g(20),o=g(42);function D(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return t(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return t(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function t(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var h=function(){function A(I,g,B){C()(this,A),this.toolbar=I.toolbar,this.toggleButton=I.toggleButton,this.toolbarButtonContainer=I.toolbarButtonContainer,this.buttons=[{element:I.presentationModeButton,eventName:"presentationmode",close:!0},{element:I.openFileButton,eventName:"openfile",close:!0},{element:I.printButton,eventName:"print",close:!0},{element:I.downloadButton,eventName:"download",close:!0},{element:I.viewBookmarkButton,eventName:null,close:!0},{element:I.firstPageButton,eventName:"firstpage",close:!0},{element:I.lastPageButton,eventName:"lastpage",close:!0},{element:I.pageRotateCwButton,eventName:"rotatecw",close:!1},{element:I.pageRotateCcwButton,eventName:"rotateccw",close:!1},{element:I.cursorSelectToolButton,eventName:"switchcursortool",eventDetails:{tool:o.CursorTool.SELECT},close:!0},{element:I.cursorHandToolButton,eventName:"switchcursortool",eventDetails:{tool:o.CursorTool.HAND},close:!0},{element:I.scrollPageButton,eventName:"switchscrollmode",eventDetails:{mode:i.ScrollMode.PAGE},close:!0},{element:I.scrollVerticalButton,eventName:"switchscrollmode",eventDetails:{mode:i.ScrollMode.VERTICAL},close:!0},{element:I.scrollHorizontalButton,eventName:"switchscrollmode",eventDetails:{mode:i.ScrollMode.HORIZONTAL},close:!0},{element:I.scrollWrappedButton,eventName:"switchscrollmode",eventDetails:{mode:i.ScrollMode.WRAPPED},close:!0},{element:I.spreadNoneButton,eventName:"switchspreadmode",eventDetails:{mode:i.SpreadMode.NONE},close:!0},{element:I.spreadOddButton,eventName:"switchspreadmode",eventDetails:{mode:i.SpreadMode.ODD},close:!0},{element:I.spreadEvenButton,eventName:"switchspreadmode",eventDetails:{mode:i.SpreadMode.EVEN},close:!0},{element:I.documentPropertiesButton,eventName:"documentproperties",close:!0}],this.items={firstPage:I.firstPageButton,lastPage:I.lastPageButton,pageRotateCw:I.pageRotateCwButton,pageRotateCcw:I.pageRotateCcwButton},this.mainContainer=g,this.eventBus=B,this.opened=!1,this.containerHeight=null,this.previousContainerHeight=null,this.reset(),this.bindClickListeners(),this.bindCursorToolsListener(I),this.bindScrollModeListener(I),this.bindSpreadModeListener(I),this.eventBus._on("resize",this.setMaxHeight.bind(this))}return E()(A,[{key:"isOpen",get:function(){return this.opened}},{key:"setPageNumber",value:function(A){this.pageNumber=A,this.updateUIState()}},{key:"setPagesCount",value:function(A){this.pagesCount=A,this.updateUIState()}},{key:"reset",value:function(){this.pageNumber=0,this.pagesCount=0,this.updateUIState(),this.eventBus.dispatch("secondarytoolbarreset",{source:this})}},{key:"updateUIState",value:function(){this.items.firstPage&&(this.items.firstPage.disabled=this.pageNumber<=1),this.items.lastPage&&(this.items.lastPage.disabled=this.pageNumber>=this.pagesCount),this.items.pageRotateCw&&(this.items.pageRotateCw.disabled=0===this.pagesCount),this.items.pageRotateCcw&&(this.items.pageRotateCcw.disabled=0===this.pagesCount)}},{key:"bindClickListeners",value:function(){var A,I=this;null===(A=this.toggleButton)||void 0===A||A.addEventListener("click",this.toggle.bind(this));var g,B=D(this.buttons);try{var C=function(){var A=g.value,B=A.element,C=A.eventName,Q=A.close,E=A.eventDetails;null==B||B.addEventListener("click",(function(A){if(null!==C){var g={source:I};for(var B in E)g[B]=E[B];I.eventBus.dispatch(C,g)}Q&&I.close()}))};for(B.s();!(g=B.n()).done;)C()}catch(A){B.e(A)}finally{B.f()}}},{key:"bindCursorToolsListener",value:function(A){var I=A.cursorSelectToolButton,g=A.cursorHandToolButton;this.eventBus._on("cursortoolchanged",(function(A){var B=A.tool,C=B===o.CursorTool.SELECT,Q=B===o.CursorTool.HAND;I.classList.toggle("toggled",C),g.classList.toggle("toggled",Q),I.setAttribute("aria-checked",C),g.setAttribute("aria-checked",Q)}))}},{key:"bindScrollModeListener",value:function(A){var I=this,g=A.scrollPageButton,B=A.scrollVerticalButton,C=A.scrollHorizontalButton,Q=A.scrollWrappedButton,E=A.spreadNoneButton,o=A.spreadOddButton,D=A.spreadEvenButton,t=function(A){var t=A.mode,h=t===i.ScrollMode.PAGE,w=t===i.ScrollMode.VERTICAL,s=t===i.ScrollMode.HORIZONTAL,a=t===i.ScrollMode.WRAPPED;g.classList.toggle("toggled",h),B.classList.toggle("toggled",w),C.classList.toggle("toggled",s),Q.classList.toggle("toggled",a),g.setAttribute("aria-checked",h),B.setAttribute("aria-checked",w),C.setAttribute("aria-checked",s),Q.setAttribute("aria-checked",a);var e=I.pagesCount>15e3;g.disabled=e,B.disabled=e,C.disabled=e,Q.disabled=e,E.disabled=s,o.disabled=s,D.disabled=s};this.eventBus._on("scrollmodechanged",t),this.eventBus._on("secondarytoolbarreset",(function(A){A.source===I&&t({mode:i.ScrollMode.VERTICAL})}))}},{key:"bindSpreadModeListener",value:function(A){var I=this,g=A.spreadNoneButton,B=A.spreadOddButton,C=A.spreadEvenButton;function Q(A){var I=A.mode,Q=I===i.SpreadMode.NONE,E=I===i.SpreadMode.ODD,o=I===i.SpreadMode.EVEN;g.classList.toggle("toggled",Q),B.classList.toggle("toggled",E),C.classList.toggle("toggled",o),g.setAttribute("aria-checked",Q),B.setAttribute("aria-checked",E),C.setAttribute("aria-checked",o)}this.eventBus._on("spreadmodechanged",Q),this.eventBus._on("secondarytoolbarreset",(function(A){A.source===I&&Q({mode:i.SpreadMode.NONE})}))}},{key:"open",value:function(){this.opened||(this.opened=!0,this.setMaxHeight(),this.toggleButton.classList.add("toggled"),this.toggleButton.setAttribute("aria-expanded","true"),this.toolbar.classList.remove("hidden"))}},{key:"close",value:function(){this.opened&&(this.opened=!1,this.toolbar.classList.add("hidden"),this.toggleButton.classList.remove("toggled"),this.toggleButton.setAttribute("aria-expanded","false"))}},{key:"toggle",value:function(){this.opened?this.close():this.open()}},{key:"setMaxHeight",value:function(){this.opened&&(this.containerHeight=this.mainContainer.clientHeight,this.containerHeight!==this.previousContainerHeight&&(this.toolbarButtonContainer.style.maxHeight="".concat(this.containerHeight-i.SCROLLBAR_PADDING,"px"),this.previousContainerHeight=this.containerHeight))}}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"CursorTool",(function(){return D})),g.d(I,"PDFCursorTools",(function(){return t}));var B=g(2),C=g.n(B),Q=g(1),E=g.n(Q),i=g(43),o=g(20),D={SELECT:0,HAND:1,ZOOM:2},t=function(){function A(I){var g=this,B=I.container,Q=I.eventBus,E=I.cursorToolOnLoad,o=void 0===E?D.SELECT:E;C()(this,A),this.container=B,this.eventBus=Q,this.active=D.SELECT,this.activeBeforePresentationMode=null,this.handTool=new i.GrabToPan({element:this.container}),this.addEventListeners(),Promise.resolve().then((function(){g.switchTool(o)}))}return E()(A,[{key:"activeTool",get:function(){return this.active}},{key:"switchTool",value:function(A){var I=this;if(null===this.activeBeforePresentationMode&&A!==this.active){var g=function(){switch(I.active){case D.SELECT:break;case D.HAND:I.handTool.deactivate();case D.ZOOM:}};switch(A){case D.SELECT:g();break;case D.HAND:g(),this.handTool.activate();break;case D.ZOOM:default:return}this.active=A,this.dispatchEvent()}}},{key:"dispatchEvent",value:function(){this.eventBus.dispatch("cursortoolchanged",{source:this,tool:this.active})}},{key:"addEventListeners",value:function(){var A=this;this.eventBus._on("switchcursortool",(function(I){A.switchTool(I.tool)})),this.eventBus._on("presentationmodechanged",(function(I){switch(I.state){case o.PresentationModeState.FULLSCREEN:var g=A.active;A.switchTool(D.SELECT),A.activeBeforePresentationMode=g;break;case o.PresentationModeState.NORMAL:var B=A.activeBeforePresentationMode;A.activeBeforePresentationMode=null,A.switchTool(B)}}))}}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"GrabToPan",(function(){return o}));var B=g(2),C=g.n(B),Q=g(1),E=g.n(Q),i="grab-to-pan-grab",o=function(){function A(I){C()(this,A),this.element=I.element,this.document=I.element.ownerDocument,"function"==typeof I.ignoreTarget&&(this.ignoreTarget=I.ignoreTarget),this.onActiveChanged=I.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._endPan=this.endPan.bind(this),(this.overlay=document.createElement("div")).className="grab-to-pan-grabbing"}return E()(A,[{key:"activate",value:function(){this.active||(this.active=!0,this.element.addEventListener("mousedown",this._onMouseDown,!0),this.element.classList.add(i),this.onActiveChanged&&this.onActiveChanged(!0))}},{key:"deactivate",value:function(){this.active&&(this.active=!1,this.element.removeEventListener("mousedown",this._onMouseDown,!0),this._endPan(),this.element.classList.remove(i),this.onActiveChanged&&this.onActiveChanged(!1))}},{key:"toggle",value:function(){this.active?this.deactivate():this.activate()}},{key:"ignoreTarget",value:function(A){return A.matches("a[href], a[href] *, input, textarea, button, button *, select, option")}},{key:"onMouseDown",value:function(A){if(0===A.button&&!this.ignoreTarget(A.target)){if(A.originalTarget)try{A.originalTarget.tagName}catch(A){return}this.scrollLeftStart=this.element.scrollLeft,this.scrollTopStart=this.element.scrollTop,this.clientXStart=A.clientX,this.clientYStart=A.clientY,this.document.addEventListener("mousemove",this._onMouseMove,!0),this.document.addEventListener("mouseup",this._endPan,!0),this.element.addEventListener("scroll",this._endPan,!0),A.preventDefault(),A.stopPropagation();var I=document.activeElement;I&&!I.contains(A.target)&&I.blur()}}},{key:"onMouseMove",value:function(A){if(this.element.removeEventListener("scroll",this._endPan,!0),1&A.buttons){var I=A.clientX-this.clientXStart,g=A.clientY-this.clientYStart,B=this.scrollTopStart-g,C=this.scrollLeftStart-I;this.element.scrollTo?this.element.scrollTo({top:B,left:C,behavior:"instant"}):(this.element.scrollTop=B,this.element.scrollLeft=C),this.overlay.parentNode||document.body.appendChild(this.overlay)}else this._endPan()}},{key:"endPan",value:function(){this.element.removeEventListener("scroll",this._endPan,!0),this.document.removeEventListener("mousemove",this._onMouseMove,!0),this.document.removeEventListener("mouseup",this._endPan,!0),this.overlay.remove()}}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"Print",(function(){return e}));var B=g(3),C=g.n(B),Q=g(2),E=g.n(Q),i=g(1),o=g.n(i),D=g(4),t=g.n(D),h=(g(35),g(28)),w=g(34);function s(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return a(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return a(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function a(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var e=function(){function A(I,g,B){E()(this,A),this.coreHelper=new w.Ofd_Core_Helper(40),this.dialog=I||document.getElementById("printServiceDialog"),this.overlayManager=g,this.l10n=B,this.ofdRender=new h.Ofd_Render(null,this.coreHelper),document.getElementById("printCancel").addEventListener("click",this.close.bind(this)),this.overlayManager.register(this.dialog),this.progressBar=this.dialog.querySelector("progress"),this.progressPerc=this.dialog.querySelector(".relative-progress"),this.abort=!1}var I,g,B;return o()(A,[{key:"setOfdCore",value:function(A){this.core=A,this.ofdRender.setOfdCore(this.core)}},{key:"close",value:(B=C()(t.a.mark((function A(){return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:this.abort=!0,this.overlayManager.close(this.dialog);case 2:case"end":return A.stop()}}),A,this)}))),function(){return B.apply(this,arguments)})},{key:"open",value:(g=C()(t.a.mark((function A(){var I=this;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(this.core){A.next=2;break}return A.abrupt("return");case 2:return this.abort=!1,this.overlayManager.open(this.dialog),A.next=6,this.renderProgress(0);case 6:setTimeout((function(){I.prepare().then((function(A){if(A&&A.length>0){I.close();var g,B=window.open("打印窗口","_blank"),C=B.document.body,Q=s(A);try{for(Q.s();!(g=Q.n()).done;){var E=g.value;C.appendChild(E)}}catch(A){Q.e(A)}finally{Q.f()}B.focus(),B.print(),B.close()}}))}),100);case 7:case"end":return A.stop()}}),A,this)}))),function(){return g.apply(this,arguments)})},{key:"prepare",value:(I=C()(t.a.mark((function A(){var I=this;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",new Promise(function(){var A=C()(t.a.mark((function A(g,B){var C,Q,E,i,o;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:C=[],Q=0;case 2:if(!(Q<I.core.getOFDPageCount(0))||I.abort){A.next=21;break}return E=785/I.core.pageWidth(0,Q)*25.4,I.ofdRender.setDpi(E),(i=document.createElement("canvas")).style.width="794px",i.style.height="1123px",(o=document.createElement("div")).style.width="794px",o.style.height="1123px",o.style.position="relative",o.appendChild(i),A.next=15,I.ofdRender.renderPage(o,0,Q);case 15:return C.push(o),A.next=18,I.renderProgress(Q+1);case 18:Q++,A.next=2;break;case 21:I.abort&&g(),g(C);case 23:case"end":return A.stop()}}),A)})));return function(I,g){return A.apply(this,arguments)}}()));case 1:case"end":return A.stop()}}),A)}))),function(){return I.apply(this,arguments)})},{key:"renderProgress",value:function(A){var I=this;return new Promise((function(g,B){var C=Math.round(100*A/I.core.getOFDPageCount(0));I.progressBar.value=C,I.l10n.get("print_progress_percent",{progress:C}).then((function(A){I.progressPerc.textContent=A})),setTimeout((function(){g()}),100)}))}}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"Print_api",(function(){return e}));var B=g(3),C=g.n(B),Q=g(2),E=g.n(Q),i=g(1),o=g.n(i),D=g(4),t=g.n(D),h=g(28),w=g(34);function s(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return a(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return a(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function a(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var e=function(){function A(I){E()(this,A),this.coreHelper=new w.Ofd_Core_Helper(96),this.onProgress=I,this.abort=!1,this.ofdRender=new h.Ofd_Render(null,this.coreHelper)}var I,g,B;return o()(A,[{key:"setOfdCore",value:function(A){this.core=A,this.ofdRender.setOfdCore(this.core)}},{key:"closePrint",value:(B=C()(t.a.mark((function A(){return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:this.abort=!0;case 1:case"end":return A.stop()}}),A,this)}))),function(){return B.apply(this,arguments)})},{key:"startPrint",value:(g=C()(t.a.mark((function A(){var I=this;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(this.core){A.next=2;break}return A.abrupt("return");case 2:return this.abort=!1,A.next=5,this.renderProgress(0);case 5:setTimeout((function(){I.prepare().then((function(A){if(A&&A.length>0){I.abort=!0;var g,B=window.open("打印窗口","_blank"),C=B.document.body,Q=s(A);try{for(Q.s();!(g=Q.n()).done;){var E=g.value;C.appendChild(E)}}catch(A){Q.e(A)}finally{Q.f()}B.focus(),B.print(),B.close()}}))}),100);case 6:case"end":return A.stop()}}),A,this)}))),function(){return g.apply(this,arguments)})},{key:"prepare",value:(I=C()(t.a.mark((function A(){var I=this;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",new Promise(function(){var A=C()(t.a.mark((function A(g,B){var C,Q,E,i,o;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:C=[],Q=0;case 2:if(!(Q<I.core.getOFDPageCount(0))||I.abort){A.next=23;break}return E=785/I.core.pageWidth(0,Q)*25.4,I.ofdRender.setDpi(E),(i=document.createElement("canvas")).style.width="794px",i.style.height="1123px",(o=document.createElement("div")).style.width="794px",o.style.height="1123px",o.style.position="relative",o.appendChild(i),A.next=16,I.ofdRender.renderPage(o,0,Q);case 16:return C.push(o),A.next=20,I.renderProgress(Q+1);case 20:Q++,A.next=2;break;case 23:I.abort&&g(),g(C);case 25:case"end":return A.stop()}}),A)})));return function(I,g){return A.apply(this,arguments)}}()));case 1:case"end":return A.stop()}}),A)}))),function(){return I.apply(this,arguments)})},{key:"renderProgress",value:function(A){var I=this;return new Promise((function(g,B){var C=Math.round(100*A/I.core.getOFDPageCount(0));I.onProgress(C),setTimeout((function(){g()}),100)}))}}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"OFDSignatureProperties",(function(){return c}));var B=g(3),C=g.n(B),Q=g(2),E=g.n(Q),i=g(1),o=g.n(i),D=g(4),t=g.n(D),h=g(30);function w(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return s(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return s(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function s(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var a=g(29).replaceFirstSlash,e="-",c=function(){function A(I,g,B,C){var Q=I.dialog,i=I.fields,o=I.closeButton;E()(this,A),this.dialog=Q,this.fields=i,this.overlayManager=g,this.l10n=C,this.fieldData=null,o.addEventListener("click",this.close.bind(this)),this.overlayManager.register(this.dialog)}var I,g;return o()(A,[{key:"close",value:(g=C()(t.a.mark((function A(){return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:this.overlayManager.close(this.dialog);case 1:case"end":return A.stop()}}),A,this)}))),function(){return g.apply(this,arguments)})},{key:"setOfdCore",value:function(A){this.ofdCore,A&&(this.ofdCore=A)}},{key:"open",value:(I=C()(t.a.mark((function A(I){var g=this;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(I){A.next=2;break}return A.abrupt("return");case 2:this.overlayManager.open(this.dialog),I&&(this.fieldData={signer:I.SignCert.subject,provider:I.SignedInfo.Provider.ProviderName,hashedValue:I.HashHex,signedValue:I.signatureHex,signMethod:I.SignedInfo.SignatureMethod,signVersion:I.SignedInfo.Seal.esVersion,verify:I.verifyContent?I.verifyContent:"文件摘要值后台验证中,请稍等...",sealID:I.SignedInfo.Seal.esID,sealName:I.SignedInfo.Seal.Property.name,sealType:I.SignedInfo.Seal.Property.type,sealAuthTime:"".concat(I.SignedInfo.Seal.Property.validStart," 至 ").concat(I.SignedInfo.Seal.Property.validEnd),sealMakeTime:I.SignedInfo.Seal.Property.createDate,sealVersion:I.SignedInfo.Seal.Header.version},this.updateUI(),I.verifyContent||setTimeout((function(){g.checkHash(I)}),200));case 4:case"end":return A.stop()}}),A,this)}))),function(A){return I.apply(this,arguments)})},{key:"updateUI",value:function(){var A=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!A&&this.fieldData){if(this.overlayManager.active===this.dialog)for(var I in this.fields){var g=this.fieldData[I];this.fields[I].textContent=g||0===g?g:e}}else for(var B in this.fields)this.fields[B].textContent=e}},{key:"checkHash",value:function(A){var I,g="",B=w(A.SignedInfo.References);try{for(B.s();!(I=B.n()).done;){var C=I.value;g+="".concat(a(C.FileRef),"|")}}catch(A){B.e(A)}finally{B.f()}var Q,E=Object(h.hashPath)(this.ofdCore.ofdParserPtr,g,A.SignedInfo.ReferencesCheckMethod.toLowerCase()),i=!0,o=w(A.SignedInfo.References);try{for(o.s();!(Q=o.n()).done;){var D=Q.value,t=D.CheckValue,s=E["".concat(a(D.FileRef))];i&=t===s}}catch(A){o.e(A)}finally{o.f()}i?!A.HashValid&&A.HashHex?this.fieldData.verify="摘要属性错误":A.SignatureValid?this.fieldData.verify="签章有效":this.fieldData.verify="签名值验证错误":this.fieldData.verify="受该签章保护的内容有变更",A.verifyContent=this.fieldData.verify,this.updateUI()}}]),A}()},function(A,I,g){(function(I,B,C,Q){var E,i=(E=(E="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||I,function(A){var I,i;(A=void 0!==(A=A||{})?A:{}).ready=new Promise((function(A,g){I=A,i=g})),"object"!=typeof WebAssembly&&"undefined"!=typeof WXWebAssembly&&(WXWebAssembly.RuntimeError=WXWebAssembly.RuntimeError||function(){class A extends Error{constructor(I){if(super(I),!(this instanceof A)){const I=Object.setPrototypeOf;"function"==typeof I?I.call(Object,this,A.prototype):this.__proto__=A.prototype,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,A)}}}return Object.defineProperty(A.prototype,"name",{configurable:!0,writable:!0,value:"RuntimeError"}),A}(),(function(){if("undefined"!=typeof globalThis)return globalThis;var A=function(){return this}(),I=function(){var A;try{A=new Function}catch(A){return!1}return"function"==typeof A}();if(!A&&I)try{A=new Function("return this")()}catch(A){}if(!A){if("undefined"!=typeof window)return window;if("undefined"!=typeof self)return self}return A}()).WebAssembly=WXWebAssembly);var o,D={};for(o in A)A.hasOwnProperty(o)&&(D[o]=A[o]);var t,h,w,s,a,e=[],c="./this.program",G=function(A,I){throw I},y="object"==typeof window,F="function"==typeof importScripts,n="object"==typeof B&&"object"==typeof B.versions&&"string"==typeof B.versions.node,R="";n?(R=F?g(54).dirname(R)+"/":C+"/",t=function(A,I){return s||(s=g(!function(){var A=new Error("Cannot find module 'fs'");throw A.code="MODULE_NOT_FOUND",A}())),a||(a=g(54)),A=a.normalize(A),s.readFileSync(A,I?null:"utf8")},w=function(A){var I=t(A,!0);return I.buffer||(I=new Uint8Array(I)),d(I.buffer),I},h=function(A,I,B){s||(s=g(!function(){var A=new Error("Cannot find module 'fs'");throw A.code="MODULE_NOT_FOUND",A}())),a||(a=g(54)),A=a.normalize(A),s.readFile(A,(function(A,g){A?B(A):I(g.buffer)}))},B.argv.length>1&&(c=B.argv[1].replace(/\\/g,"/")),e=B.argv.slice(2),B.on("uncaughtException",(function(A){if(!(A instanceof xI))throw A})),B.on("unhandledRejection",(function(A){throw A})),G=function(A,I){if(CA())throw B.exitCode=A,I;var g;(g=I)instanceof xI||N("exiting due to exception: "+g),B.exit(A)},A.inspect=function(){return"[Emscripten Module object]"}):(y||F)&&(F?R=self.location.href:"undefined"!=typeof document&&document.currentScript&&(R=document.currentScript.src),E&&(R=E),R=0!==R.indexOf("blob:")?R.substr(0,R.replace(/[?#].*/,"").lastIndexOf("/")+1):"",t=function(A){var I=new XMLHttpRequest;return I.open("GET",A,!1),I.send(null),I.responseText},F&&(w=function(A){var I=new XMLHttpRequest;return I.open("GET",A,!1),I.responseType="arraybuffer",I.send(null),new Uint8Array(I.response)}),h=function(A,I,g){var B=new XMLHttpRequest;B.open("GET",A,!0),B.responseType="arraybuffer",B.onload=function(){200==B.status||0==B.status&&B.response?I(B.response):g()},B.onerror=g,B.send(null)});var r=A.print||void 0,N=A.printErr||void 0;for(o in D)D.hasOwnProperty(o)&&(A[o]=D[o]);D=null,A.arguments&&(e=A.arguments),A.thisProgram&&(c=A.thisProgram),A.quit&&(G=A.quit);var M,U=0;A.wasmBinary&&(M=A.wasmBinary);var S,k=A.noExitRuntime||!0;"object"!=typeof WebAssembly&&aA("no native wasm support detected");var Y=!1;function d(A,I){A||aA("Assertion failed: "+I)}var H="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function K(A,I,g){for(var B=I+g,C=I;A[C]&&!(C>=B);)++C;if(C-I>16&&A.subarray&&H)return H.decode(A.subarray(I,C));for(var Q="";I<C;){var E=A[I++];if(128&E){var i=63&A[I++];if(192!=(224&E)){var o=63&A[I++];if((E=224==(240&E)?(15&E)<<12|i<<6|o:(7&E)<<18|i<<12|o<<6|63&A[I++])<65536)Q+=String.fromCharCode(E);else{var D=E-65536;Q+=String.fromCharCode(55296|D>>10,56320|1023&D)}}else Q+=String.fromCharCode((31&E)<<6|i)}else Q+=String.fromCharCode(E)}return Q}function J(A,I){return A?K(m,A,I):""}function L(A,I,g,B){if(!(B>0))return 0;for(var C=g,Q=g+B-1,E=0;E<A.length;++E){var i=A.charCodeAt(E);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&A.charCodeAt(++E)),i<=127){if(g>=Q)break;I[g++]=i}else if(i<=2047){if(g+1>=Q)break;I[g++]=192|i>>6,I[g++]=128|63&i}else if(i<=65535){if(g+2>=Q)break;I[g++]=224|i>>12,I[g++]=128|i>>6&63,I[g++]=128|63&i}else{if(g+3>=Q)break;I[g++]=240|i>>18,I[g++]=128|i>>12&63,I[g++]=128|i>>6&63,I[g++]=128|63&i}}return I[g]=0,g-C}function l(A,I,g){return L(A,m,I,g)}function f(A){for(var I=0,g=0;g<A.length;++g){var B=A.charCodeAt(g);B>=55296&&B<=57343&&(B=65536+((1023&B)<<10)|1023&A.charCodeAt(++g)),B<=127?++I:I+=B<=2047?2:B<=65535?3:4}return I}var u,p,m,b,Z,q,W,x,V,v="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function X(A,I){for(var g=A,B=g>>1,C=B+I/2;!(B>=C)&&Z[B];)++B;if((g=B<<1)-A>32&&v)return v.decode(m.subarray(A,g));for(var Q="",E=0;!(E>=I/2);++E){var i=b[A+2*E>>1];if(0==i)break;Q+=String.fromCharCode(i)}return Q}function T(A,I,g){if(void 0===g&&(g=2147483647),g<2)return 0;for(var B=I,C=(g-=2)<2*A.length?g/2:A.length,Q=0;Q<C;++Q){var E=A.charCodeAt(Q);b[I>>1]=E,I+=2}return b[I>>1]=0,I-B}function j(A){return 2*A.length}function O(A,I){for(var g=0,B="";!(g>=I/4);){var C=q[A+4*g>>2];if(0==C)break;if(++g,C>=65536){var Q=C-65536;B+=String.fromCharCode(55296|Q>>10,56320|1023&Q)}else B+=String.fromCharCode(C)}return B}function z(A,I,g){if(void 0===g&&(g=2147483647),g<4)return 0;for(var B=I,C=B+g-4,Q=0;Q<A.length;++Q){var E=A.charCodeAt(Q);if(E>=55296&&E<=57343&&(E=65536+((1023&E)<<10)|1023&A.charCodeAt(++Q)),q[I>>2]=E,(I+=4)+4>C)break}return q[I>>2]=0,I-B}function P(A){for(var I=0,g=0;g<A.length;++g){var B=A.charCodeAt(g);B>=55296&&B<=57343&&++g,I+=4}return I}function _(A){var I=f(A)+1,g=JI(I);return g&&L(A,p,g,I),g}function $(I){u=I,A.HEAP8=p=new Int8Array(I),A.HEAP16=b=new Int16Array(I),A.HEAP32=q=new Int32Array(I),A.HEAPU8=m=new Uint8Array(I),A.HEAPU16=Z=new Uint16Array(I),A.HEAPU32=W=new Uint32Array(I),A.HEAPF32=x=new Float32Array(I),A.HEAPF64=V=new Float64Array(I)}A.INITIAL_MEMORY;var AA,IA=[],gA=[],BA=[];function CA(){return k||!1}var QA,EA,iA,oA,DA=0,tA=null,hA=null;function wA(I){DA++,A.monitorRunDependencies&&A.monitorRunDependencies(DA)}function sA(I){if(DA--,A.monitorRunDependencies&&A.monitorRunDependencies(DA),0==DA&&(null!==tA&&(clearInterval(tA),tA=null),hA)){var g=hA;hA=null,g()}}function aA(I){A.onAbort&&A.onAbort(I),N(I="Aborted("+I+")"),Y=!0,I+=". Build with -s ASSERTIONS=1 for more info.";var g=new WebAssembly.RuntimeError(I);throw i(g),g}function eA(A){return A.startsWith("data:application/octet-stream;base64,")}function cA(A){return A.startsWith("file://")}function GA(A){try{if(A==QA&&M)return new Uint8Array(M);if(w)return w(A);throw"both async and sync fetching of the wasm failed"}catch(A){aA(A)}}function yA(I){for(;I.length>0;){var g=I.shift();if("function"!=typeof g){var B=g.func;"number"==typeof B?void 0===g.arg?nA(B)():nA(B)(g.arg):B(void 0===g.arg?null:g.arg)}else g(A)}}A.preloadedImages={},A.preloadedAudios={},eA(QA="parser_helper_x.wasm")||(EA=QA,QA=A.locateFile?A.locateFile(EA,R):R+EA);var FA=[];function nA(A){var I=FA[A];return I||(A>=FA.length&&(FA.length=A+1),FA[A]=I=AA.get(A)),I}function RA(A){this.excPtr=A,this.ptr=A-16,this.set_type=function(A){q[this.ptr+4>>2]=A},this.get_type=function(){return q[this.ptr+4>>2]},this.set_destructor=function(A){q[this.ptr+8>>2]=A},this.get_destructor=function(){return q[this.ptr+8>>2]},this.set_refcount=function(A){q[this.ptr>>2]=A},this.set_caught=function(A){A=A?1:0,p[this.ptr+12>>0]=A},this.get_caught=function(){return 0!=p[this.ptr+12>>0]},this.set_rethrown=function(A){A=A?1:0,p[this.ptr+13>>0]=A},this.get_rethrown=function(){return 0!=p[this.ptr+13>>0]},this.init=function(A,I){this.set_type(A),this.set_destructor(I),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var A=q[this.ptr>>2];q[this.ptr>>2]=A+1},this.release_ref=function(){var A=q[this.ptr>>2];return q[this.ptr>>2]=A-1,1===A}}function rA(A){return q[lI()>>2]=A,A}var NA={splitPath:function(A){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(A).slice(1)},normalizeArray:function(A,I){for(var g=0,B=A.length-1;B>=0;B--){var C=A[B];"."===C?A.splice(B,1):".."===C?(A.splice(B,1),g++):g&&(A.splice(B,1),g--)}if(I)for(;g;g--)A.unshift("..");return A},normalize:function(A){var I="/"===A.charAt(0),g="/"===A.substr(-1);return(A=NA.normalizeArray(A.split("/").filter((function(A){return!!A})),!I).join("/"))||I||(A="."),A&&g&&(A+="/"),(I?"/":"")+A},dirname:function(A){var I=NA.splitPath(A),g=I[0],B=I[1];return g||B?(B&&(B=B.substr(0,B.length-1)),g+B):"."},basename:function(A){if("/"===A)return"/";var I=(A=(A=NA.normalize(A)).replace(/\/$/,"")).lastIndexOf("/");return-1===I?A:A.substr(I+1)},extname:function(A){return NA.splitPath(A)[3]},join:function(){var A=Array.prototype.slice.call(arguments,0);return NA.normalize(A.join("/"))},join2:function(A,I){return NA.normalize(A+"/"+I)}},MA={resolve:function(){for(var A="",I=!1,g=arguments.length-1;g>=-1&&!I;g--){var B=g>=0?arguments[g]:YA.cwd();if("string"!=typeof B)throw new TypeError("Arguments to path.resolve must be strings");if(!B)return"";A=B+"/"+A,I="/"===B.charAt(0)}return(I?"/":"")+(A=NA.normalizeArray(A.split("/").filter((function(A){return!!A})),!I).join("/"))||"."},relative:function(A,I){function g(A){for(var I=0;I<A.length&&""===A[I];I++);for(var g=A.length-1;g>=0&&""===A[g];g--);return I>g?[]:A.slice(I,g-I+1)}A=MA.resolve(A).substr(1),I=MA.resolve(I).substr(1);for(var B=g(A.split("/")),C=g(I.split("/")),Q=Math.min(B.length,C.length),E=Q,i=0;i<Q;i++)if(B[i]!==C[i]){E=i;break}var o=[];for(i=E;i<B.length;i++)o.push("..");return(o=o.concat(C.slice(E))).join("/")}},UA={ttys:[],init:function(){},shutdown:function(){},register:function(A,I){UA.ttys[A]={input:[],output:[],ops:I},YA.registerDevice(A,UA.stream_ops)},stream_ops:{open:function(A){var I=UA.ttys[A.node.rdev];if(!I)throw new YA.ErrnoError(43);A.tty=I,A.seekable=!1},close:function(A){A.tty.ops.flush(A.tty)},flush:function(A){A.tty.ops.flush(A.tty)},read:function(A,I,g,B,C){if(!A.tty||!A.tty.ops.get_char)throw new YA.ErrnoError(60);for(var Q=0,E=0;E<B;E++){var i;try{i=A.tty.ops.get_char(A.tty)}catch(A){throw new YA.ErrnoError(29)}if(void 0===i&&0===Q)throw new YA.ErrnoError(6);if(null==i)break;Q++,I[g+E]=i}return Q&&(A.node.timestamp=Date.now()),Q},write:function(A,I,g,B,C){if(!A.tty||!A.tty.ops.put_char)throw new YA.ErrnoError(60);try{for(var Q=0;Q<B;Q++)A.tty.ops.put_char(A.tty,I[g+Q])}catch(A){throw new YA.ErrnoError(29)}return B&&(A.node.timestamp=Date.now()),Q}},default_tty_ops:{get_char:function(A){if(!A.input.length){var I=null;if(n){var g=Q.alloc(256),C=0;try{C=s.readSync(B.stdin.fd,g,0,256,null)}catch(A){if(!A.toString().includes("EOF"))throw A;C=0}I=C>0?g.slice(0,C).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(I=window.prompt("Input: "))&&(I+="\n"):"function"==typeof readline&&null!==(I=readline())&&(I+="\n");if(!I)return null;A.input=dI(I,!0)}return A.input.shift()},put_char:function(A,I){null===I||10===I?(r(K(A.output,0)),A.output=[]):0!=I&&A.output.push(I)},flush:function(A){A.output&&A.output.length>0&&(r(K(A.output,0)),A.output=[])}},default_tty1_ops:{put_char:function(A,I){null===I||10===I?(N(K(A.output,0)),A.output=[]):0!=I&&A.output.push(I)},flush:function(A){A.output&&A.output.length>0&&(N(K(A.output,0)),A.output=[])}}};function SA(A){A=function(A,I){return Math.ceil(A/I)*I}(A,65536);var I=WI(65536,A);return I?(function(A,I){m.fill(0,A,A+I)}(I,A),I):0}var kA={ops_table:null,mount:function(A){return kA.createNode(null,"/",16895,0)},createNode:function(A,I,g,B){if(YA.isBlkdev(g)||YA.isFIFO(g))throw new YA.ErrnoError(63);kA.ops_table||(kA.ops_table={dir:{node:{getattr:kA.node_ops.getattr,setattr:kA.node_ops.setattr,lookup:kA.node_ops.lookup,mknod:kA.node_ops.mknod,rename:kA.node_ops.rename,unlink:kA.node_ops.unlink,rmdir:kA.node_ops.rmdir,readdir:kA.node_ops.readdir,symlink:kA.node_ops.symlink},stream:{llseek:kA.stream_ops.llseek}},file:{node:{getattr:kA.node_ops.getattr,setattr:kA.node_ops.setattr},stream:{llseek:kA.stream_ops.llseek,read:kA.stream_ops.read,write:kA.stream_ops.write,allocate:kA.stream_ops.allocate,mmap:kA.stream_ops.mmap,msync:kA.stream_ops.msync}},link:{node:{getattr:kA.node_ops.getattr,setattr:kA.node_ops.setattr,readlink:kA.node_ops.readlink},stream:{}},chrdev:{node:{getattr:kA.node_ops.getattr,setattr:kA.node_ops.setattr},stream:YA.chrdev_stream_ops}});var C=YA.createNode(A,I,g,B);return YA.isDir(C.mode)?(C.node_ops=kA.ops_table.dir.node,C.stream_ops=kA.ops_table.dir.stream,C.contents={}):YA.isFile(C.mode)?(C.node_ops=kA.ops_table.file.node,C.stream_ops=kA.ops_table.file.stream,C.usedBytes=0,C.contents=null):YA.isLink(C.mode)?(C.node_ops=kA.ops_table.link.node,C.stream_ops=kA.ops_table.link.stream):YA.isChrdev(C.mode)&&(C.node_ops=kA.ops_table.chrdev.node,C.stream_ops=kA.ops_table.chrdev.stream),C.timestamp=Date.now(),A&&(A.contents[I]=C,A.timestamp=C.timestamp),C},getFileDataAsTypedArray:function(A){return A.contents?A.contents.subarray?A.contents.subarray(0,A.usedBytes):new Uint8Array(A.contents):new Uint8Array(0)},expandFileStorage:function(A,I){var g=A.contents?A.contents.length:0;if(!(g>=I)){I=Math.max(I,g*(g<1048576?2:1.125)>>>0),0!=g&&(I=Math.max(I,256));var B=A.contents;A.contents=new Uint8Array(I),A.usedBytes>0&&A.contents.set(B.subarray(0,A.usedBytes),0)}},resizeFileStorage:function(A,I){if(A.usedBytes!=I)if(0==I)A.contents=null,A.usedBytes=0;else{var g=A.contents;A.contents=new Uint8Array(I),g&&A.contents.set(g.subarray(0,Math.min(I,A.usedBytes))),A.usedBytes=I}},node_ops:{getattr:function(A){var I={};return I.dev=YA.isChrdev(A.mode)?A.id:1,I.ino=A.id,I.mode=A.mode,I.nlink=1,I.uid=0,I.gid=0,I.rdev=A.rdev,YA.isDir(A.mode)?I.size=4096:YA.isFile(A.mode)?I.size=A.usedBytes:YA.isLink(A.mode)?I.size=A.link.length:I.size=0,I.atime=new Date(A.timestamp),I.mtime=new Date(A.timestamp),I.ctime=new Date(A.timestamp),I.blksize=4096,I.blocks=Math.ceil(I.size/I.blksize),I},setattr:function(A,I){void 0!==I.mode&&(A.mode=I.mode),void 0!==I.timestamp&&(A.timestamp=I.timestamp),void 0!==I.size&&kA.resizeFileStorage(A,I.size)},lookup:function(A,I){throw YA.genericErrors[44]},mknod:function(A,I,g,B){return kA.createNode(A,I,g,B)},rename:function(A,I,g){if(YA.isDir(A.mode)){var B;try{B=YA.lookupNode(I,g)}catch(A){}if(B)for(var C in B.contents)throw new YA.ErrnoError(55)}delete A.parent.contents[A.name],A.parent.timestamp=Date.now(),A.name=g,I.contents[g]=A,I.timestamp=A.parent.timestamp,A.parent=I},unlink:function(A,I){delete A.contents[I],A.timestamp=Date.now()},rmdir:function(A,I){var g=YA.lookupNode(A,I);for(var B in g.contents)throw new YA.ErrnoError(55);delete A.contents[I],A.timestamp=Date.now()},readdir:function(A){var I=[".",".."];for(var g in A.contents)A.contents.hasOwnProperty(g)&&I.push(g);return I},symlink:function(A,I,g){var B=kA.createNode(A,I,41471,0);return B.link=g,B},readlink:function(A){if(!YA.isLink(A.mode))throw new YA.ErrnoError(28);return A.link}},stream_ops:{read:function(A,I,g,B,C){var Q=A.node.contents;if(C>=A.node.usedBytes)return 0;var E=Math.min(A.node.usedBytes-C,B);if(E>8&&Q.subarray)I.set(Q.subarray(C,C+E),g);else for(var i=0;i<E;i++)I[g+i]=Q[C+i];return E},write:function(A,I,g,B,C,Q){if(I.buffer===p.buffer&&(Q=!1),!B)return 0;var E=A.node;if(E.timestamp=Date.now(),I.subarray&&(!E.contents||E.contents.subarray)){if(Q)return E.contents=I.subarray(g,g+B),E.usedBytes=B,B;if(0===E.usedBytes&&0===C)return E.contents=I.slice(g,g+B),E.usedBytes=B,B;if(C+B<=E.usedBytes)return E.contents.set(I.subarray(g,g+B),C),B}if(kA.expandFileStorage(E,C+B),E.contents.subarray&&I.subarray)E.contents.set(I.subarray(g,g+B),C);else for(var i=0;i<B;i++)E.contents[C+i]=I[g+i];return E.usedBytes=Math.max(E.usedBytes,C+B),B},llseek:function(A,I,g){var B=I;if(1===g?B+=A.position:2===g&&YA.isFile(A.node.mode)&&(B+=A.node.usedBytes),B<0)throw new YA.ErrnoError(28);return B},allocate:function(A,I,g){kA.expandFileStorage(A.node,I+g),A.node.usedBytes=Math.max(A.node.usedBytes,I+g)},mmap:function(A,I,g,B,C,Q){if(0!==I)throw new YA.ErrnoError(28);if(!YA.isFile(A.node.mode))throw new YA.ErrnoError(43);var E,i,o=A.node.contents;if(2&Q||o.buffer!==u){if((B>0||B+g<o.length)&&(o=o.subarray?o.subarray(B,B+g):Array.prototype.slice.call(o,B,B+g)),i=!0,!(E=SA(g)))throw new YA.ErrnoError(48);p.set(o,E)}else i=!1,E=o.byteOffset;return{ptr:E,allocated:i}},msync:function(A,I,g,B,C){if(!YA.isFile(A.node.mode))throw new YA.ErrnoError(43);return 2&C||kA.stream_ops.write(A,I,0,B,g,!1),0}}},YA={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(A,I){if(I=I||{},!(A=MA.resolve(YA.cwd(),A)))return{path:"",node:null};var g={follow_mount:!0,recurse_count:0};for(var B in g)void 0===I[B]&&(I[B]=g[B]);if(I.recurse_count>8)throw new YA.ErrnoError(32);for(var C=NA.normalizeArray(A.split("/").filter((function(A){return!!A})),!1),Q=YA.root,E="/",i=0;i<C.length;i++){var o=i===C.length-1;if(o&&I.parent)break;if(Q=YA.lookupNode(Q,C[i]),E=NA.join2(E,C[i]),YA.isMountpoint(Q)&&(!o||o&&I.follow_mount)&&(Q=Q.mounted.root),!o||I.follow)for(var D=0;YA.isLink(Q.mode);){var t=YA.readlink(E);if(E=MA.resolve(NA.dirname(E),t),Q=YA.lookupPath(E,{recurse_count:I.recurse_count}).node,D++>40)throw new YA.ErrnoError(32)}}return{path:E,node:Q}},getPath:function(A){for(var I;;){if(YA.isRoot(A)){var g=A.mount.mountpoint;return I?"/"!==g[g.length-1]?g+"/"+I:g+I:g}I=I?A.name+"/"+I:A.name,A=A.parent}},hashName:function(A,I){for(var g=0,B=0;B<I.length;B++)g=(g<<5)-g+I.charCodeAt(B)|0;return(A+g>>>0)%YA.nameTable.length},hashAddNode:function(A){var I=YA.hashName(A.parent.id,A.name);A.name_next=YA.nameTable[I],YA.nameTable[I]=A},hashRemoveNode:function(A){var I=YA.hashName(A.parent.id,A.name);if(YA.nameTable[I]===A)YA.nameTable[I]=A.name_next;else for(var g=YA.nameTable[I];g;){if(g.name_next===A){g.name_next=A.name_next;break}g=g.name_next}},lookupNode:function(A,I){var g=YA.mayLookup(A);if(g)throw new YA.ErrnoError(g,A);for(var B=YA.hashName(A.id,I),C=YA.nameTable[B];C;C=C.name_next){var Q=C.name;if(C.parent.id===A.id&&Q===I)return C}return YA.lookup(A,I)},createNode:function(A,I,g,B){var C=new YA.FSNode(A,I,g,B);return YA.hashAddNode(C),C},destroyNode:function(A){YA.hashRemoveNode(A)},isRoot:function(A){return A===A.parent},isMountpoint:function(A){return!!A.mounted},isFile:function(A){return 32768==(61440&A)},isDir:function(A){return 16384==(61440&A)},isLink:function(A){return 40960==(61440&A)},isChrdev:function(A){return 8192==(61440&A)},isBlkdev:function(A){return 24576==(61440&A)},isFIFO:function(A){return 4096==(61440&A)},isSocket:function(A){return 49152==(49152&A)},flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(A){var I=YA.flagModes[A];if(void 0===I)throw new Error("Unknown file open mode: "+A);return I},flagsToPermissionString:function(A){var I=["r","w","rw"][3&A];return 512&A&&(I+="w"),I},nodePermissions:function(A,I){return YA.ignorePermissions||(!I.includes("r")||292&A.mode)&&(!I.includes("w")||146&A.mode)&&(!I.includes("x")||73&A.mode)?0:2},mayLookup:function(A){var I=YA.nodePermissions(A,"x");return I||(A.node_ops.lookup?0:2)},mayCreate:function(A,I){try{return YA.lookupNode(A,I),20}catch(A){}return YA.nodePermissions(A,"wx")},mayDelete:function(A,I,g){var B;try{B=YA.lookupNode(A,I)}catch(A){return A.errno}var C=YA.nodePermissions(A,"wx");if(C)return C;if(g){if(!YA.isDir(B.mode))return 54;if(YA.isRoot(B)||YA.getPath(B)===YA.cwd())return 10}else if(YA.isDir(B.mode))return 31;return 0},mayOpen:function(A,I){return A?YA.isLink(A.mode)?32:YA.isDir(A.mode)&&("r"!==YA.flagsToPermissionString(I)||512&I)?31:YA.nodePermissions(A,YA.flagsToPermissionString(I)):44},MAX_OPEN_FDS:4096,nextfd:function(A,I){A=A||0,I=I||YA.MAX_OPEN_FDS;for(var g=A;g<=I;g++)if(!YA.streams[g])return g;throw new YA.ErrnoError(33)},getStream:function(A){return YA.streams[A]},createStream:function(A,I,g){YA.FSStream||(YA.FSStream=function(){},YA.FSStream.prototype={object:{get:function(){return this.node},set:function(A){this.node=A}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}});var B=new YA.FSStream;for(var C in A)B[C]=A[C];A=B;var Q=YA.nextfd(I,g);return A.fd=Q,YA.streams[Q]=A,A},closeStream:function(A){YA.streams[A]=null},chrdev_stream_ops:{open:function(A){var I=YA.getDevice(A.node.rdev);A.stream_ops=I.stream_ops,A.stream_ops.open&&A.stream_ops.open(A)},llseek:function(){throw new YA.ErrnoError(70)}},major:function(A){return A>>8},minor:function(A){return 255&A},makedev:function(A,I){return A<<8|I},registerDevice:function(A,I){YA.devices[A]={stream_ops:I}},getDevice:function(A){return YA.devices[A]},getMounts:function(A){for(var I=[],g=[A];g.length;){var B=g.pop();I.push(B),g.push.apply(g,B.mounts)}return I},syncfs:function(A,I){"function"==typeof A&&(I=A,A=!1),YA.syncFSRequests++,YA.syncFSRequests>1&&N("warning: "+YA.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var g=YA.getMounts(YA.root.mount),B=0;function C(A){return YA.syncFSRequests--,I(A)}function Q(A){if(A)return Q.errored?void 0:(Q.errored=!0,C(A));++B>=g.length&&C(null)}g.forEach((function(I){if(!I.type.syncfs)return Q(null);I.type.syncfs(I,A,Q)}))},mount:function(A,I,g){var B,C="/"===g,Q=!g;if(C&&YA.root)throw new YA.ErrnoError(10);if(!C&&!Q){var E=YA.lookupPath(g,{follow_mount:!1});if(g=E.path,B=E.node,YA.isMountpoint(B))throw new YA.ErrnoError(10);if(!YA.isDir(B.mode))throw new YA.ErrnoError(54)}var i={type:A,opts:I,mountpoint:g,mounts:[]},o=A.mount(i);return o.mount=i,i.root=o,C?YA.root=o:B&&(B.mounted=i,B.mount&&B.mount.mounts.push(i)),o},unmount:function(A){var I=YA.lookupPath(A,{follow_mount:!1});if(!YA.isMountpoint(I.node))throw new YA.ErrnoError(28);var g=I.node,B=g.mounted,C=YA.getMounts(B);Object.keys(YA.nameTable).forEach((function(A){for(var I=YA.nameTable[A];I;){var g=I.name_next;C.includes(I.mount)&&YA.destroyNode(I),I=g}})),g.mounted=null;var Q=g.mount.mounts.indexOf(B);g.mount.mounts.splice(Q,1)},lookup:function(A,I){return A.node_ops.lookup(A,I)},mknod:function(A,I,g){var B=YA.lookupPath(A,{parent:!0}).node,C=NA.basename(A);if(!C||"."===C||".."===C)throw new YA.ErrnoError(28);var Q=YA.mayCreate(B,C);if(Q)throw new YA.ErrnoError(Q);if(!B.node_ops.mknod)throw new YA.ErrnoError(63);return B.node_ops.mknod(B,C,I,g)},create:function(A,I){return I=void 0!==I?I:438,I&=4095,I|=32768,YA.mknod(A,I,0)},mkdir:function(A,I){return I=void 0!==I?I:511,I&=1023,I|=16384,YA.mknod(A,I,0)},mkdirTree:function(A,I){for(var g=A.split("/"),B="",C=0;C<g.length;++C)if(g[C]){B+="/"+g[C];try{YA.mkdir(B,I)}catch(A){if(20!=A.errno)throw A}}},mkdev:function(A,I,g){return void 0===g&&(g=I,I=438),I|=8192,YA.mknod(A,I,g)},symlink:function(A,I){if(!MA.resolve(A))throw new YA.ErrnoError(44);var g=YA.lookupPath(I,{parent:!0}).node;if(!g)throw new YA.ErrnoError(44);var B=NA.basename(I),C=YA.mayCreate(g,B);if(C)throw new YA.ErrnoError(C);if(!g.node_ops.symlink)throw new YA.ErrnoError(63);return g.node_ops.symlink(g,B,A)},rename:function(A,I){var g,B,C=NA.dirname(A),Q=NA.dirname(I),E=NA.basename(A),i=NA.basename(I);if(g=YA.lookupPath(A,{parent:!0}).node,B=YA.lookupPath(I,{parent:!0}).node,!g||!B)throw new YA.ErrnoError(44);if(g.mount!==B.mount)throw new YA.ErrnoError(75);var o,D=YA.lookupNode(g,E),t=MA.relative(A,Q);if("."!==t.charAt(0))throw new YA.ErrnoError(28);if("."!==(t=MA.relative(I,C)).charAt(0))throw new YA.ErrnoError(55);try{o=YA.lookupNode(B,i)}catch(A){}if(D!==o){var h=YA.isDir(D.mode),w=YA.mayDelete(g,E,h);if(w)throw new YA.ErrnoError(w);if(w=o?YA.mayDelete(B,i,h):YA.mayCreate(B,i))throw new YA.ErrnoError(w);if(!g.node_ops.rename)throw new YA.ErrnoError(63);if(YA.isMountpoint(D)||o&&YA.isMountpoint(o))throw new YA.ErrnoError(10);if(B!==g&&(w=YA.nodePermissions(g,"w")))throw new YA.ErrnoError(w);YA.hashRemoveNode(D);try{g.node_ops.rename(D,B,i)}catch(A){throw A}finally{YA.hashAddNode(D)}}},rmdir:function(A){var I=YA.lookupPath(A,{parent:!0}).node,g=NA.basename(A),B=YA.lookupNode(I,g),C=YA.mayDelete(I,g,!0);if(C)throw new YA.ErrnoError(C);if(!I.node_ops.rmdir)throw new YA.ErrnoError(63);if(YA.isMountpoint(B))throw new YA.ErrnoError(10);I.node_ops.rmdir(I,g),YA.destroyNode(B)},readdir:function(A){var I=YA.lookupPath(A,{follow:!0}).node;if(!I.node_ops.readdir)throw new YA.ErrnoError(54);return I.node_ops.readdir(I)},unlink:function(A){var I=YA.lookupPath(A,{parent:!0}).node,g=NA.basename(A),B=YA.lookupNode(I,g),C=YA.mayDelete(I,g,!1);if(C)throw new YA.ErrnoError(C);if(!I.node_ops.unlink)throw new YA.ErrnoError(63);if(YA.isMountpoint(B))throw new YA.ErrnoError(10);I.node_ops.unlink(I,g),YA.destroyNode(B)},readlink:function(A){var I=YA.lookupPath(A).node;if(!I)throw new YA.ErrnoError(44);if(!I.node_ops.readlink)throw new YA.ErrnoError(28);return MA.resolve(YA.getPath(I.parent),I.node_ops.readlink(I))},stat:function(A,I){var g=YA.lookupPath(A,{follow:!I}).node;if(!g)throw new YA.ErrnoError(44);if(!g.node_ops.getattr)throw new YA.ErrnoError(63);return g.node_ops.getattr(g)},lstat:function(A){return YA.stat(A,!0)},chmod:function(A,I,g){var B;if(!(B="string"==typeof A?YA.lookupPath(A,{follow:!g}).node:A).node_ops.setattr)throw new YA.ErrnoError(63);B.node_ops.setattr(B,{mode:4095&I|-4096&B.mode,timestamp:Date.now()})},lchmod:function(A,I){YA.chmod(A,I,!0)},fchmod:function(A,I){var g=YA.getStream(A);if(!g)throw new YA.ErrnoError(8);YA.chmod(g.node,I)},chown:function(A,I,g,B){var C;if(!(C="string"==typeof A?YA.lookupPath(A,{follow:!B}).node:A).node_ops.setattr)throw new YA.ErrnoError(63);C.node_ops.setattr(C,{timestamp:Date.now()})},lchown:function(A,I,g){YA.chown(A,I,g,!0)},fchown:function(A,I,g){var B=YA.getStream(A);if(!B)throw new YA.ErrnoError(8);YA.chown(B.node,I,g)},truncate:function(A,I){if(I<0)throw new YA.ErrnoError(28);var g;if(!(g="string"==typeof A?YA.lookupPath(A,{follow:!0}).node:A).node_ops.setattr)throw new YA.ErrnoError(63);if(YA.isDir(g.mode))throw new YA.ErrnoError(31);if(!YA.isFile(g.mode))throw new YA.ErrnoError(28);var B=YA.nodePermissions(g,"w");if(B)throw new YA.ErrnoError(B);g.node_ops.setattr(g,{size:I,timestamp:Date.now()})},ftruncate:function(A,I){var g=YA.getStream(A);if(!g)throw new YA.ErrnoError(8);if(0==(2097155&g.flags))throw new YA.ErrnoError(28);YA.truncate(g.node,I)},utime:function(A,I,g){var B=YA.lookupPath(A,{follow:!0}).node;B.node_ops.setattr(B,{timestamp:Math.max(I,g)})},open:function(I,g,B,C,Q){if(""===I)throw new YA.ErrnoError(44);var E;if(B=void 0===B?438:B,B=64&(g="string"==typeof g?YA.modeStringToFlags(g):g)?4095&B|32768:0,"object"==typeof I)E=I;else{I=NA.normalize(I);try{E=YA.lookupPath(I,{follow:!(131072&g)}).node}catch(A){}}var i=!1;if(64&g)if(E){if(128&g)throw new YA.ErrnoError(20)}else E=YA.mknod(I,B,0),i=!0;if(!E)throw new YA.ErrnoError(44);if(YA.isChrdev(E.mode)&&(g&=-513),65536&g&&!YA.isDir(E.mode))throw new YA.ErrnoError(54);if(!i){var o=YA.mayOpen(E,g);if(o)throw new YA.ErrnoError(o)}512&g&&YA.truncate(E,0),g&=-131713;var D=YA.createStream({node:E,path:YA.getPath(E),id:E.id,flags:g,mode:E.mode,seekable:!0,position:0,stream_ops:E.stream_ops,node_ops:E.node_ops,ungotten:[],error:!1},C,Q);return D.stream_ops.open&&D.stream_ops.open(D),!A.logReadFiles||1&g||(YA.readFiles||(YA.readFiles={}),I in YA.readFiles||(YA.readFiles[I]=1)),D},close:function(A){if(YA.isClosed(A))throw new YA.ErrnoError(8);A.getdents&&(A.getdents=null);try{A.stream_ops.close&&A.stream_ops.close(A)}catch(A){throw A}finally{YA.closeStream(A.fd)}A.fd=null},isClosed:function(A){return null===A.fd},llseek:function(A,I,g){if(YA.isClosed(A))throw new YA.ErrnoError(8);if(!A.seekable||!A.stream_ops.llseek)throw new YA.ErrnoError(70);if(0!=g&&1!=g&&2!=g)throw new YA.ErrnoError(28);return A.position=A.stream_ops.llseek(A,I,g),A.ungotten=[],A.position},read:function(A,I,g,B,C){if(B<0||C<0)throw new YA.ErrnoError(28);if(YA.isClosed(A))throw new YA.ErrnoError(8);if(1==(2097155&A.flags))throw new YA.ErrnoError(8);if(YA.isDir(A.node.mode))throw new YA.ErrnoError(31);if(!A.stream_ops.read)throw new YA.ErrnoError(28);var Q=void 0!==C;if(Q){if(!A.seekable)throw new YA.ErrnoError(70)}else C=A.position;var E=A.stream_ops.read(A,I,g,B,C);return Q||(A.position+=E),E},write:function(A,I,g,B,C,Q){if(B<0||C<0)throw new YA.ErrnoError(28);if(YA.isClosed(A))throw new YA.ErrnoError(8);if(0==(2097155&A.flags))throw new YA.ErrnoError(8);if(YA.isDir(A.node.mode))throw new YA.ErrnoError(31);if(!A.stream_ops.write)throw new YA.ErrnoError(28);A.seekable&&1024&A.flags&&YA.llseek(A,0,2);var E=void 0!==C;if(E){if(!A.seekable)throw new YA.ErrnoError(70)}else C=A.position;var i=A.stream_ops.write(A,I,g,B,C,Q);return E||(A.position+=i),i},allocate:function(A,I,g){if(YA.isClosed(A))throw new YA.ErrnoError(8);if(I<0||g<=0)throw new YA.ErrnoError(28);if(0==(2097155&A.flags))throw new YA.ErrnoError(8);if(!YA.isFile(A.node.mode)&&!YA.isDir(A.node.mode))throw new YA.ErrnoError(43);if(!A.stream_ops.allocate)throw new YA.ErrnoError(138);A.stream_ops.allocate(A,I,g)},mmap:function(A,I,g,B,C,Q){if(0!=(2&C)&&0==(2&Q)&&2!=(2097155&A.flags))throw new YA.ErrnoError(2);if(1==(2097155&A.flags))throw new YA.ErrnoError(2);if(!A.stream_ops.mmap)throw new YA.ErrnoError(43);return A.stream_ops.mmap(A,I,g,B,C,Q)},msync:function(A,I,g,B,C){return A&&A.stream_ops.msync?A.stream_ops.msync(A,I,g,B,C):0},munmap:function(A){return 0},ioctl:function(A,I,g){if(!A.stream_ops.ioctl)throw new YA.ErrnoError(59);return A.stream_ops.ioctl(A,I,g)},readFile:function(A,I){if((I=I||{}).flags=I.flags||0,I.encoding=I.encoding||"binary","utf8"!==I.encoding&&"binary"!==I.encoding)throw new Error('Invalid encoding type "'+I.encoding+'"');var g,B=YA.open(A,I.flags),C=YA.stat(A).size,Q=new Uint8Array(C);return YA.read(B,Q,0,C,0),"utf8"===I.encoding?g=K(Q,0):"binary"===I.encoding&&(g=Q),YA.close(B),g},writeFile:function(A,I,g){(g=g||{}).flags=g.flags||577;var B=YA.open(A,g.flags,g.mode);if("string"==typeof I){var C=new Uint8Array(f(I)+1),Q=L(I,C,0,C.length);YA.write(B,C,0,Q,void 0,g.canOwn)}else{if(!ArrayBuffer.isView(I))throw new Error("Unsupported data type");YA.write(B,I,0,I.byteLength,void 0,g.canOwn)}YA.close(B)},cwd:function(){return YA.currentPath},chdir:function(A){var I=YA.lookupPath(A,{follow:!0});if(null===I.node)throw new YA.ErrnoError(44);if(!YA.isDir(I.node.mode))throw new YA.ErrnoError(54);var g=YA.nodePermissions(I.node,"x");if(g)throw new YA.ErrnoError(g);YA.currentPath=I.path},createDefaultDirectories:function(){YA.mkdir("/tmp"),YA.mkdir("/home"),YA.mkdir("/home/web_user")},createDefaultDevices:function(){YA.mkdir("/dev"),YA.registerDevice(YA.makedev(1,3),{read:function(){return 0},write:function(A,I,g,B,C){return B}}),YA.mkdev("/dev/null",YA.makedev(1,3)),UA.register(YA.makedev(5,0),UA.default_tty_ops),UA.register(YA.makedev(6,0),UA.default_tty1_ops),YA.mkdev("/dev/tty",YA.makedev(5,0)),YA.mkdev("/dev/tty1",YA.makedev(6,0));var A=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var A=new Uint8Array(1);return function(){return crypto.getRandomValues(A),A[0]}}if(n)try{var I=g(55);return function(){return I.randomBytes(1)[0]}}catch(A){}return function(){aA("randomDevice")}}();YA.createDevice("/dev","random",A),YA.createDevice("/dev","urandom",A),YA.mkdir("/dev/shm"),YA.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){YA.mkdir("/proc");var A=YA.mkdir("/proc/self");YA.mkdir("/proc/self/fd"),YA.mount({mount:function(){var I=YA.createNode(A,"fd",16895,73);return I.node_ops={lookup:function(A,I){var g=+I,B=YA.getStream(g);if(!B)throw new YA.ErrnoError(8);var C={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return B.path}}};return C.parent=C,C}},I}},{},"/proc/self/fd")},createStandardStreams:function(){A.stdin?YA.createDevice("/dev","stdin",A.stdin):YA.symlink("/dev/tty","/dev/stdin"),A.stdout?YA.createDevice("/dev","stdout",null,A.stdout):YA.symlink("/dev/tty","/dev/stdout"),A.stderr?YA.createDevice("/dev","stderr",null,A.stderr):YA.symlink("/dev/tty1","/dev/stderr"),YA.open("/dev/stdin",0),YA.open("/dev/stdout",1),YA.open("/dev/stderr",1)},ensureErrnoError:function(){YA.ErrnoError||(YA.ErrnoError=function(A,I){this.node=I,this.setErrno=function(A){this.errno=A},this.setErrno(A),this.message="FS error"},YA.ErrnoError.prototype=new Error,YA.ErrnoError.prototype.constructor=YA.ErrnoError,[44].forEach((function(A){YA.genericErrors[A]=new YA.ErrnoError(A),YA.genericErrors[A].stack="<generic error, no stack>"})))},staticInit:function(){YA.ensureErrnoError(),YA.nameTable=new Array(4096),YA.mount(kA,{},"/"),YA.createDefaultDirectories(),YA.createDefaultDevices(),YA.createSpecialDirectories(),YA.filesystems={MEMFS:kA}},init:function(I,g,B){YA.init.initialized=!0,YA.ensureErrnoError(),A.stdin=I||A.stdin,A.stdout=g||A.stdout,A.stderr=B||A.stderr,YA.createStandardStreams()},quit:function(){YA.init.initialized=!1;var I=A._fflush;I&&I(0);for(var g=0;g<YA.streams.length;g++){var B=YA.streams[g];B&&YA.close(B)}},getMode:function(A,I){var g=0;return A&&(g|=365),I&&(g|=146),g},findObject:function(A,I){var g=YA.analyzePath(A,I);return g.exists?g.object:null},analyzePath:function(A,I){try{A=(B=YA.lookupPath(A,{follow:!I})).path}catch(A){}var g={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var B=YA.lookupPath(A,{parent:!0});g.parentExists=!0,g.parentPath=B.path,g.parentObject=B.node,g.name=NA.basename(A),B=YA.lookupPath(A,{follow:!I}),g.exists=!0,g.path=B.path,g.object=B.node,g.name=B.node.name,g.isRoot="/"===B.path}catch(A){g.error=A.errno}return g},createPath:function(A,I,g,B){A="string"==typeof A?A:YA.getPath(A);for(var C=I.split("/").reverse();C.length;){var Q=C.pop();if(Q){var E=NA.join2(A,Q);try{YA.mkdir(E)}catch(A){}A=E}}return E},createFile:function(A,I,g,B,C){var Q=NA.join2("string"==typeof A?A:YA.getPath(A),I),E=YA.getMode(B,C);return YA.create(Q,E)},createDataFile:function(A,I,g,B,C,Q){var E=I?NA.join2("string"==typeof A?A:YA.getPath(A),I):A,i=YA.getMode(B,C),o=YA.create(E,i);if(g){if("string"==typeof g){for(var D=new Array(g.length),t=0,h=g.length;t<h;++t)D[t]=g.charCodeAt(t);g=D}YA.chmod(o,146|i);var w=YA.open(o,577);YA.write(w,g,0,g.length,0,Q),YA.close(w),YA.chmod(o,i)}return o},createDevice:function(A,I,g,B){var C=NA.join2("string"==typeof A?A:YA.getPath(A),I),Q=YA.getMode(!!g,!!B);YA.createDevice.major||(YA.createDevice.major=64);var E=YA.makedev(YA.createDevice.major++,0);return YA.registerDevice(E,{open:function(A){A.seekable=!1},close:function(A){B&&B.buffer&&B.buffer.length&&B(10)},read:function(A,I,B,C,Q){for(var E=0,i=0;i<C;i++){var o;try{o=g()}catch(A){throw new YA.ErrnoError(29)}if(void 0===o&&0===E)throw new YA.ErrnoError(6);if(null==o)break;E++,I[B+i]=o}return E&&(A.node.timestamp=Date.now()),E},write:function(A,I,g,C,Q){for(var E=0;E<C;E++)try{B(I[g+E])}catch(A){throw new YA.ErrnoError(29)}return C&&(A.node.timestamp=Date.now()),E}}),YA.mkdev(C,Q,E)},forceLoadFile:function(A){if(A.isDevice||A.isFolder||A.link||A.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!t)throw new Error("Cannot load without read() or XMLHttpRequest.");try{A.contents=dI(t(A.url),!0),A.usedBytes=A.contents.length}catch(A){throw new YA.ErrnoError(29)}},createLazyFile:function(A,I,g,B,C){function Q(){this.lengthKnown=!1,this.chunks=[]}if(Q.prototype.get=function(A){if(!(A>this.length-1||A<0)){var I=A%this.chunkSize,g=A/this.chunkSize|0;return this.getter(g)[I]}},Q.prototype.setDataGetter=function(A){this.getter=A},Q.prototype.cacheLength=function(){var A=new XMLHttpRequest;if(A.open("HEAD",g,!1),A.send(null),!(A.status>=200&&A.status<300||304===A.status))throw new Error("Couldn't load "+g+". Status: "+A.status);var I,B=Number(A.getResponseHeader("Content-length")),C=(I=A.getResponseHeader("Accept-Ranges"))&&"bytes"===I,Q=(I=A.getResponseHeader("Content-Encoding"))&&"gzip"===I,E=1048576;C||(E=B);var i=this;i.setDataGetter((function(A){var I=A*E,C=(A+1)*E-1;if(C=Math.min(C,B-1),void 0===i.chunks[A]&&(i.chunks[A]=function(A,I){if(A>I)throw new Error("invalid range ("+A+", "+I+") or no bytes requested!");if(I>B-1)throw new Error("only "+B+" bytes available! programmer error!");var C=new XMLHttpRequest;if(C.open("GET",g,!1),B!==E&&C.setRequestHeader("Range","bytes="+A+"-"+I),"undefined"!=typeof Uint8Array&&(C.responseType="arraybuffer"),C.overrideMimeType&&C.overrideMimeType("text/plain; charset=x-user-defined"),C.send(null),!(C.status>=200&&C.status<300||304===C.status))throw new Error("Couldn't load "+g+". Status: "+C.status);return void 0!==C.response?new Uint8Array(C.response||[]):dI(C.responseText||"",!0)}(I,C)),void 0===i.chunks[A])throw new Error("doXHR failed!");return i.chunks[A]})),!Q&&B||(E=B=1,B=this.getter(0).length,E=B,r("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=B,this._chunkSize=E,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!F)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var E=new Q;Object.defineProperties(E,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var i={isDevice:!1,contents:E}}else i={isDevice:!1,url:g};var o=YA.createFile(A,I,i,B,C);i.contents?o.contents=i.contents:i.url&&(o.contents=null,o.url=i.url),Object.defineProperties(o,{usedBytes:{get:function(){return this.contents.length}}});var D={};return Object.keys(o.stream_ops).forEach((function(A){var I=o.stream_ops[A];D[A]=function(){return YA.forceLoadFile(o),I.apply(null,arguments)}})),D.read=function(A,I,g,B,C){YA.forceLoadFile(o);var Q=A.node.contents;if(C>=Q.length)return 0;var E=Math.min(Q.length-C,B);if(Q.slice)for(var i=0;i<E;i++)I[g+i]=Q[C+i];else for(i=0;i<E;i++)I[g+i]=Q.get(C+i);return E},o.stream_ops=D,o},createPreloadedFile:function(I,g,B,C,Q,E,i,o,D,t){Browser.init();var w=g?MA.resolve(NA.join2(I,g)):I;function s(B){function h(A){t&&t(),o||YA.createDataFile(I,g,A,C,Q,D),E&&E(),sA()}var s=!1;A.preloadPlugins.forEach((function(A){s||A.canHandle(w)&&(A.handle(B,w,h,(function(){i&&i(),sA()})),s=!0)})),s||h(B)}wA(),"string"==typeof B?function(A,I,g,B){var C=B?"":"al "+A;h(A,(function(g){d(g,'Loading data file "'+A+'" failed (no arrayBuffer).'),I(new Uint8Array(g)),C&&sA()}),(function(I){if(!g)throw'Loading data file "'+A+'" failed.';g()})),C&&wA()}(B,(function(A){s(A)}),i):s(B)},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(A,I,g){I=I||function(){},g=g||function(){};var B=YA.indexedDB();try{var C=B.open(YA.DB_NAME(),YA.DB_VERSION)}catch(A){return g(A)}C.onupgradeneeded=function(){r("creating db"),C.result.createObjectStore(YA.DB_STORE_NAME)},C.onsuccess=function(){var B=C.result.transaction([YA.DB_STORE_NAME],"readwrite"),Q=B.objectStore(YA.DB_STORE_NAME),E=0,i=0,o=A.length;function D(){0==i?I():g()}A.forEach((function(A){var I=Q.put(YA.analyzePath(A).object.contents,A);I.onsuccess=function(){++E+i==o&&D()},I.onerror=function(){i++,E+i==o&&D()}})),B.onerror=g},C.onerror=g},loadFilesFromDB:function(A,I,g){I=I||function(){},g=g||function(){};var B=YA.indexedDB();try{var C=B.open(YA.DB_NAME(),YA.DB_VERSION)}catch(A){return g(A)}C.onupgradeneeded=g,C.onsuccess=function(){var B=C.result;try{var Q=B.transaction([YA.DB_STORE_NAME],"readonly")}catch(A){return void g(A)}var E=Q.objectStore(YA.DB_STORE_NAME),i=0,o=0,D=A.length;function t(){0==o?I():g()}A.forEach((function(A){var I=E.get(A);I.onsuccess=function(){YA.analyzePath(A).exists&&YA.unlink(A),YA.createDataFile(NA.dirname(A),NA.basename(A),I.result,!0,!0,!0),++i+o==D&&t()},I.onerror=function(){o++,i+o==D&&t()}})),Q.onerror=g},C.onerror=g}},dA={mappings:{},DEFAULT_POLLMASK:5,calculateAt:function(A,I,g){if("/"===I[0])return I;var B;if(-100===A)B=YA.cwd();else{var C=YA.getStream(A);if(!C)throw new YA.ErrnoError(8);B=C.path}if(0==I.length){if(!g)throw new YA.ErrnoError(44);return B}return NA.join2(B,I)},doStat:function(A,I,g){try{var B=A(I)}catch(A){if(A&&A.node&&NA.normalize(I)!==NA.normalize(YA.getPath(A.node)))return-54;throw A}return q[g>>2]=B.dev,q[g+4>>2]=0,q[g+8>>2]=B.ino,q[g+12>>2]=B.mode,q[g+16>>2]=B.nlink,q[g+20>>2]=B.uid,q[g+24>>2]=B.gid,q[g+28>>2]=B.rdev,q[g+32>>2]=0,oA=[B.size>>>0,(iA=B.size,+Math.abs(iA)>=1?iA>0?(0|Math.min(+Math.floor(iA/4294967296),4294967295))>>>0:~~+Math.ceil((iA-+(~~iA>>>0))/4294967296)>>>0:0)],q[g+40>>2]=oA[0],q[g+44>>2]=oA[1],q[g+48>>2]=4096,q[g+52>>2]=B.blocks,q[g+56>>2]=B.atime.getTime()/1e3|0,q[g+60>>2]=0,q[g+64>>2]=B.mtime.getTime()/1e3|0,q[g+68>>2]=0,q[g+72>>2]=B.ctime.getTime()/1e3|0,q[g+76>>2]=0,oA=[B.ino>>>0,(iA=B.ino,+Math.abs(iA)>=1?iA>0?(0|Math.min(+Math.floor(iA/4294967296),4294967295))>>>0:~~+Math.ceil((iA-+(~~iA>>>0))/4294967296)>>>0:0)],q[g+80>>2]=oA[0],q[g+84>>2]=oA[1],0},doMsync:function(A,I,g,B,C){var Q=m.slice(A,A+g);YA.msync(I,Q,C,g,B)},doMkdir:function(A,I){return"/"===(A=NA.normalize(A))[A.length-1]&&(A=A.substr(0,A.length-1)),YA.mkdir(A,I,0),0},doMknod:function(A,I,g){switch(61440&I){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return YA.mknod(A,I,g),0},doReadlink:function(A,I,g){if(g<=0)return-28;var B=YA.readlink(A),C=Math.min(g,f(B)),Q=p[I+C];return l(B,I,g+1),p[I+C]=Q,C},doAccess:function(A,I){if(-8&I)return-28;var g;if(!(g=YA.lookupPath(A,{follow:!0}).node))return-44;var B="";return 4&I&&(B+="r"),2&I&&(B+="w"),1&I&&(B+="x"),B&&YA.nodePermissions(g,B)?-2:0},doDup:function(A,I,g){var B=YA.getStream(g);return B&&YA.close(B),YA.open(A,I,0,g,g).fd},doReadv:function(A,I,g,B){for(var C=0,Q=0;Q<g;Q++){var E=q[I+8*Q>>2],i=q[I+(8*Q+4)>>2],o=YA.read(A,p,E,i,B);if(o<0)return-1;if(C+=o,o<i)break}return C},doWritev:function(A,I,g,B){for(var C=0,Q=0;Q<g;Q++){var E=q[I+8*Q>>2],i=q[I+(8*Q+4)>>2],o=YA.write(A,p,E,i,B);if(o<0)return-1;C+=o}return C},varargs:void 0,get:function(){return dA.varargs+=4,q[dA.varargs-4>>2]},getStr:function(A){return J(A)},getStreamFromFD:function(A){var I=YA.getStream(A);if(!I)throw new YA.ErrnoError(8);return I},get64:function(A,I){return A}};function HA(){return 0}function KA(A){switch(A){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+A)}}var JA=void 0;function LA(A){for(var I="",g=A;m[g];)I+=JA[m[g++]];return I}var lA={},fA={},uA={};function pA(A){if(void 0===A)return"_unknown";var I=(A=A.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return I>=48&&I<=57?"_"+A:A}function mA(A,I){return A=pA(A),new Function("body","return function "+A+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(I)}function bA(A,I){var g=mA(I,(function(A){this.name=I,this.message=A;var g=new Error(A).stack;void 0!==g&&(this.stack=this.toString()+"\n"+g.replace(/^Error(:[^\n]*)?\n/,""))}));return g.prototype=Object.create(A.prototype),g.prototype.constructor=g,g.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},g}var ZA=void 0;function qA(A){throw new ZA(A)}var WA=void 0;function xA(A){throw new WA(A)}function VA(A,I,g){if(g=g||{},!("argPackAdvance"in I))throw new TypeError("registerType registeredInstance requires argPackAdvance");var B=I.name;if(A||qA('type "'+B+'" must have a positive integer typeid pointer'),fA.hasOwnProperty(A)){if(g.ignoreDuplicateRegistrations)return;qA("Cannot register type '"+B+"' twice")}if(fA[A]=I,delete uA[A],lA.hasOwnProperty(A)){var C=lA[A];delete lA[A],C.forEach((function(A){A()}))}}var vA=[],XA=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function TA(A){A>4&&0==--XA[A].refcount&&(XA[A]=void 0,vA.push(A))}function jA(){for(var A=0,I=5;I<XA.length;++I)void 0!==XA[I]&&++A;return A}function OA(){for(var A=5;A<XA.length;++A)if(void 0!==XA[A])return XA[A];return null}var zA=function(A){return A||qA("Cannot use deleted val. handle = "+A),XA[A].value},PA=function(A){switch(A){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var I=vA.length?vA.pop():XA.length;return XA[I]={refcount:1,value:A},I}};function _A(A){return this.fromWireType(W[A>>2])}function $A(A){if(null===A)return"null";var I=typeof A;return"object"===I||"array"===I||"function"===I?A.toString():""+A}function AI(A,I){switch(I){case 2:return function(A){return this.fromWireType(x[A>>2])};case 3:return function(A){return this.fromWireType(V[A>>3])};default:throw new TypeError("Unknown float type: "+A)}}function II(A,I){if(!(A instanceof Function))throw new TypeError("new_ called with constructor type "+typeof A+" which is not a function");var g=mA(A.name||"unknownFunctionName",(function(){}));g.prototype=A.prototype;var B=new g,C=A.apply(B,I);return C instanceof Object?C:B}function gI(A){for(;A.length;){var I=A.pop();A.pop()(I)}}function BI(I,g,B){A.hasOwnProperty(I)?((void 0===B||void 0!==A[I].overloadTable&&void 0!==A[I].overloadTable[B])&&qA("Cannot register public name '"+I+"' twice"),function(A,I,g){if(void 0===A[I].overloadTable){var B=A[I];A[I]=function(){return A[I].overloadTable.hasOwnProperty(arguments.length)||qA("Function '"+g+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+A[I].overloadTable+")!"),A[I].overloadTable[arguments.length].apply(this,arguments)},A[I].overloadTable=[],A[I].overloadTable[B.argCount]=B}}(A,I,I),A.hasOwnProperty(B)&&qA("Cannot register multiple overloads of a function with the same number of arguments ("+B+")!"),A[I].overloadTable[B]=g):(A[I]=g,void 0!==B&&(A[I].numArguments=B))}function CI(I,g,B){return I.includes("j")?function(I,g,B){var C=A["dynCall_"+I];return B&&B.length?C.apply(null,[g].concat(B)):C.call(null,g)}(I,g,B):nA(g).apply(null,B)}function QI(A,I){var g,B,C,Q=(A=LA(A)).includes("j")?(g=A,B=I,C=[],function(){C.length=arguments.length;for(var A=0;A<arguments.length;A++)C[A]=arguments[A];return CI(g,B,C)}):nA(I);return"function"!=typeof Q&&qA("unknown function pointer with signature "+A+": "+I),Q}var EI=void 0;function iI(A){var I=fI(A),g=LA(I);return LI(I),g}function oI(A,I,g){switch(I){case 0:return g?function(A){return p[A]}:function(A){return m[A]};case 1:return g?function(A){return b[A>>1]}:function(A){return Z[A>>1]};case 2:return g?function(A){return q[A>>2]}:function(A){return W[A>>2]};default:throw new TypeError("Unknown integer type: "+A)}}function DI(A,I){var g=fA[A];return void 0===g&&qA(I+" has unknown type "+iI(A)),g}var tI={};function hI(A){var I=tI[A];return void 0===I?LA(A):I}var wI,sI=[];function aI(){return"object"==typeof globalThis?globalThis:Function("return this")()}function eI(A){try{return S.grow(A-u.byteLength+65535>>>16),$(S.buffer),1}catch(A){}}wI=n?function(){var A=B.hrtime();return 1e3*A[0]+A[1]/1e6}:function(){return performance.now()};var cI={};function GI(){if(!GI.strings){var A={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:c||"./this.program"};for(var I in cI)void 0===cI[I]?delete A[I]:A[I]=cI[I];var g=[];for(var I in A)g.push(I+"="+A[I]);GI.strings=g}return GI.strings}function yI(){yI.called||(yI.called=!0,function(){var A=(new Date).getFullYear(),I=new Date(A,0,1),g=new Date(A,6,1),B=I.getTimezoneOffset(),C=g.getTimezoneOffset(),Q=Math.max(B,C);function E(A){var I=A.toTimeString().match(/\(([A-Za-z ]+)\)$/);return I?I[1]:"GMT"}q[mI()>>2]=60*Q,q[pI()>>2]=Number(B!=C);var i=E(I),o=E(g),D=_(i),t=_(o);C<B?(q[uI()>>2]=D,q[uI()+4>>2]=t):(q[uI()>>2]=t,q[uI()+4>>2]=D)}())}function FI(A){return A%4==0&&(A%100!=0||A%400==0)}function nI(A,I){for(var g=0,B=0;B<=I;g+=A[B++]);return g}var RI=[31,29,31,30,31,30,31,31,30,31,30,31],rI=[31,28,31,30,31,30,31,31,30,31,30,31];function NI(A,I){for(var g=new Date(A.getTime());I>0;){var B=FI(g.getFullYear()),C=g.getMonth(),Q=(B?RI:rI)[C];if(!(I>Q-g.getDate()))return g.setDate(g.getDate()+I),g;I-=Q-g.getDate()+1,g.setDate(1),C<11?g.setMonth(C+1):(g.setMonth(0),g.setFullYear(g.getFullYear()+1))}return g}function MI(A,I,g,B){var C=q[B+40>>2],Q={tm_sec:q[B>>2],tm_min:q[B+4>>2],tm_hour:q[B+8>>2],tm_mday:q[B+12>>2],tm_mon:q[B+16>>2],tm_year:q[B+20>>2],tm_wday:q[B+24>>2],tm_yday:q[B+28>>2],tm_isdst:q[B+32>>2],tm_gmtoff:q[B+36>>2],tm_zone:C?J(C):""},E=J(g),i={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var o in i)E=E.replace(new RegExp(o,"g"),i[o]);var D=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],t=["January","February","March","April","May","June","July","August","September","October","November","December"];function h(A,I,g){for(var B="number"==typeof A?A.toString():A||"";B.length<I;)B=g[0]+B;return B}function w(A,I){return h(A,I,"0")}function s(A,I){function g(A){return A<0?-1:A>0?1:0}var B;return 0===(B=g(A.getFullYear()-I.getFullYear()))&&0===(B=g(A.getMonth()-I.getMonth()))&&(B=g(A.getDate()-I.getDate())),B}function a(A){switch(A.getDay()){case 0:return new Date(A.getFullYear()-1,11,29);case 1:return A;case 2:return new Date(A.getFullYear(),0,3);case 3:return new Date(A.getFullYear(),0,2);case 4:return new Date(A.getFullYear(),0,1);case 5:return new Date(A.getFullYear()-1,11,31);case 6:return new Date(A.getFullYear()-1,11,30)}}function e(A){var I=NI(new Date(A.tm_year+1900,0,1),A.tm_yday),g=new Date(I.getFullYear(),0,4),B=new Date(I.getFullYear()+1,0,4),C=a(g),Q=a(B);return s(C,I)<=0?s(Q,I)<=0?I.getFullYear()+1:I.getFullYear():I.getFullYear()-1}var c={"%a":function(A){return D[A.tm_wday].substring(0,3)},"%A":function(A){return D[A.tm_wday]},"%b":function(A){return t[A.tm_mon].substring(0,3)},"%B":function(A){return t[A.tm_mon]},"%C":function(A){return w((A.tm_year+1900)/100|0,2)},"%d":function(A){return w(A.tm_mday,2)},"%e":function(A){return h(A.tm_mday,2," ")},"%g":function(A){return e(A).toString().substring(2)},"%G":function(A){return e(A)},"%H":function(A){return w(A.tm_hour,2)},"%I":function(A){var I=A.tm_hour;return 0==I?I=12:I>12&&(I-=12),w(I,2)},"%j":function(A){return w(A.tm_mday+nI(FI(A.tm_year+1900)?RI:rI,A.tm_mon-1),3)},"%m":function(A){return w(A.tm_mon+1,2)},"%M":function(A){return w(A.tm_min,2)},"%n":function(){return"\n"},"%p":function(A){return A.tm_hour>=0&&A.tm_hour<12?"AM":"PM"},"%S":function(A){return w(A.tm_sec,2)},"%t":function(){return"\t"},"%u":function(A){return A.tm_wday||7},"%U":function(A){var I=new Date(A.tm_year+1900,0,1),g=0===I.getDay()?I:NI(I,7-I.getDay()),B=new Date(A.tm_year+1900,A.tm_mon,A.tm_mday);if(s(g,B)<0){var C=nI(FI(B.getFullYear())?RI:rI,B.getMonth()-1)-31,Q=31-g.getDate()+C+B.getDate();return w(Math.ceil(Q/7),2)}return 0===s(g,I)?"01":"00"},"%V":function(A){var I,g=new Date(A.tm_year+1900,0,4),B=new Date(A.tm_year+1901,0,4),C=a(g),Q=a(B),E=NI(new Date(A.tm_year+1900,0,1),A.tm_yday);return s(E,C)<0?"53":s(Q,E)<=0?"01":(I=C.getFullYear()<A.tm_year+1900?A.tm_yday+32-C.getDate():A.tm_yday+1-C.getDate(),w(Math.ceil(I/7),2))},"%w":function(A){return A.tm_wday},"%W":function(A){var I=new Date(A.tm_year,0,1),g=1===I.getDay()?I:NI(I,0===I.getDay()?1:7-I.getDay()+1),B=new Date(A.tm_year+1900,A.tm_mon,A.tm_mday);if(s(g,B)<0){var C=nI(FI(B.getFullYear())?RI:rI,B.getMonth()-1)-31,Q=31-g.getDate()+C+B.getDate();return w(Math.ceil(Q/7),2)}return 0===s(g,I)?"01":"00"},"%y":function(A){return(A.tm_year+1900).toString().substring(2)},"%Y":function(A){return A.tm_year+1900},"%z":function(A){var I=A.tm_gmtoff,g=I>=0;return I=(I=Math.abs(I)/60)/60*100+I%60,(g?"+":"-")+String("0000"+I).slice(-4)},"%Z":function(A){return A.tm_zone},"%%":function(){return"%"}};for(var o in c)E.includes(o)&&(E=E.replace(new RegExp(o,"g"),c[o](Q)));var G=dI(E,!1);return G.length>I?0:(function(A,I){p.set(A,I)}(G,A),G.length-1)}function UI(A){return parseInt(A)}var SI=function(A,I,g,B){A||(A=this),this.parent=A,this.mount=A.mount,this.mounted=null,this.id=YA.nextInode++,this.name=I,this.mode=g,this.node_ops={},this.stream_ops={},this.rdev=B},kI=365,YI=146;function dI(A,I,g){var B=g>0?g:f(A)+1,C=new Array(B),Q=L(A,C,0,C.length);return I&&(C.length=Q),C}Object.defineProperties(SI.prototype,{read:{get:function(){return(this.mode&kI)===kI},set:function(A){A?this.mode|=kI:this.mode&=-366}},write:{get:function(){return(this.mode&YI)===YI},set:function(A){A?this.mode|=YI:this.mode&=-147}},isFolder:{get:function(){return YA.isDir(this.mode)}},isDevice:{get:function(){return YA.isChrdev(this.mode)}}}),YA.FSNode=SI,YA.staticInit(),function(){for(var A=new Array(256),I=0;I<256;++I)A[I]=String.fromCharCode(I);JA=A}(),ZA=A.BindingError=bA(Error,"BindingError"),WA=A.InternalError=bA(Error,"InternalError"),A.count_emval_handles=jA,A.get_first_emval=OA,EI=A.UnboundTypeError=bA(Error,"UnboundTypeError");var HI,KI={d:function(A,I,g,B){aA("Assertion failed: "+J(A)+", at: "+[I?J(I):"unknown filename",g,B?J(B):"unknown function"])},U:function(A){return JI(A+16)+16},T:function(A,I,g){throw new RA(A).init(I,g),A},C:function(A,I,g){dA.varargs=g;try{var B=dA.getStreamFromFD(A);switch(I){case 0:return(C=dA.get())<0?-28:YA.open(B.path,B.flags,0,C).fd;case 1:case 2:case 13:case 14:return 0;case 3:return B.flags;case 4:var C=dA.get();return B.flags|=C,0;case 12:return C=dA.get(),b[C+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return rA(28),-1}}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),-A.errno}},fa:function(A,I){try{var g=dA.getStreamFromFD(A);return dA.doStat(YA.stat,g.path,I)}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),-A.errno}},ka:function(A,I,g){try{var B=dA.getStreamFromFD(A);B.getdents||(B.getdents=YA.readdir(B.path));for(var C=280,Q=0,E=YA.llseek(B,0,1),i=Math.floor(E/C);i<B.getdents.length&&Q+C<=g;){var o,D,t=B.getdents[i];if("."===t)o=B.id,D=4;else if(".."===t)o=YA.lookupPath(B.path,{parent:!0}).id,D=4;else{var h=YA.lookupNode(B,t);o=h.id,D=YA.isChrdev(h.mode)?2:YA.isDir(h.mode)?4:YA.isLink(h.mode)?10:8}oA=[o>>>0,(iA=o,+Math.abs(iA)>=1?iA>0?(0|Math.min(+Math.floor(iA/4294967296),4294967295))>>>0:~~+Math.ceil((iA-+(~~iA>>>0))/4294967296)>>>0:0)],q[I+Q>>2]=oA[0],q[I+Q+4>>2]=oA[1],oA=[(i+1)*C>>>0,(iA=(i+1)*C,+Math.abs(iA)>=1?iA>0?(0|Math.min(+Math.floor(iA/4294967296),4294967295))>>>0:~~+Math.ceil((iA-+(~~iA>>>0))/4294967296)>>>0:0)],q[I+Q+8>>2]=oA[0],q[I+Q+12>>2]=oA[1],b[I+Q+16>>1]=280,p[I+Q+18>>0]=D,l(t,I+Q+19,256),Q+=C,i+=1}return YA.llseek(B,i*C,0),Q}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),-A.errno}},ia:HA,ga:function(){return 0},ha:function(){return 0},ja:function(){return 0},L:function(A,I,g){dA.varargs=g;try{var B=dA.getStreamFromFD(A);switch(I){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return B.tty?0:-59;case 21519:if(!B.tty)return-59;var C=dA.get();return q[C>>2]=0,0;case 21520:return B.tty?-28:-59;case 21531:return C=dA.get(),YA.ioctl(B,I,C);default:aA("bad ioctl syscall "+I)}}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),-A.errno}},da:function(A,I,g,B,C,Q){try{return function(A,I,g,B,C,Q){var E;Q<<=12;var i=!1;if(0!=(16&B)&&A%65536!=0)return-28;if(0!=(32&B)){if(!(E=SA(I)))return-48;i=!0}else{var o=YA.getStream(C);if(!o)return-8;var D=YA.mmap(o,A,I,Q,g,B);E=D.ptr,i=D.allocated}return dA.mappings[E]={malloc:E,len:I,allocated:i,fd:C,prot:g,flags:B,offset:Q},E}(A,I,g,B,C,Q)}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),-A.errno}},ca:function(A,I){try{return function(A,I){var g=dA.mappings[A];if(0===I||!g)return-28;if(I===g.len){var B=YA.getStream(g.fd);B&&(2&g.prot&&dA.doMsync(A,B,I,g.flags,g.offset),YA.munmap(B)),dA.mappings[A]=null,g.allocated&&LI(g.malloc)}return 0}(A,I)}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),-A.errno}},I:function(A,I,g){dA.varargs=g;try{var B=dA.getStr(A),C=g?dA.get():0;return YA.open(B,I,C).fd}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),-A.errno}},ea:function(A,I){try{return A=dA.getStr(A),dA.doStat(YA.stat,A,I)}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),-A.errno}},X:function(A,I,g,B,C){},ma:function(A,I,g,B,C){var Q=KA(g);VA(A,{name:I=LA(I),fromWireType:function(A){return!!A},toWireType:function(A,I){return I?B:C},argPackAdvance:8,readValueFromPointer:function(A){var B;if(1===g)B=p;else if(2===g)B=b;else{if(4!==g)throw new TypeError("Unknown boolean type size: "+I);B=q}return this.fromWireType(B[A>>Q])},destructorFunction:null})},la:function(A,I){VA(A,{name:I=LA(I),fromWireType:function(A){var I=zA(A);return TA(A),I},toWireType:function(A,I){return PA(I)},argPackAdvance:8,readValueFromPointer:_A,destructorFunction:null})},M:function(A,I,g){var B=KA(g);VA(A,{name:I=LA(I),fromWireType:function(A){return A},toWireType:function(A,I){if("number"!=typeof I&&"boolean"!=typeof I)throw new TypeError('Cannot convert "'+$A(I)+'" to '+this.name);return I},argPackAdvance:8,readValueFromPointer:AI(I,B),destructorFunction:null})},s:function(I,g,B,C,Q,E){var i=function(A,I){for(var g=[],B=0;B<A;B++)g.push(q[(I>>2)+B]);return g}(g,B);I=LA(I),Q=QI(C,Q),BI(I,(function(){!function(A,I){var g=[],B={};throw I.forEach((function A(I){B[I]||fA[I]||(uA[I]?uA[I].forEach(A):(g.push(I),B[I]=!0))})),new EI(A+": "+g.map(iI).join([", "]))}("Cannot call "+I+" due to unbound types",i)}),g-1),function(A,I,g){function B(I){var B=g(I);B.length!==A.length&&xA("Mismatched type converter count");for(var C=0;C<A.length;++C)VA(A[C],B[C])}A.forEach((function(A){uA[A]=I}));var C=new Array(I.length),Q=[],E=0;I.forEach((function(A,I){fA.hasOwnProperty(A)?C[I]=fA[A]:(Q.push(A),lA.hasOwnProperty(A)||(lA[A]=[]),lA[A].push((function(){C[I]=fA[A],++E===Q.length&&B(C)})))})),0===Q.length&&B(C)}([],i,(function(B){var C=[B[0],null].concat(B.slice(1));return function(I,g,B){A.hasOwnProperty(I)||xA("Replacing nonexistant public symbol"),void 0!==A[I].overloadTable&&void 0!==B?A[I].overloadTable[B]=g:(A[I]=g,A[I].argCount=B)}(I,function(A,I,g,B,C){var Q=I.length;Q<2&&qA("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var E=null!==I[1]&&null!==g,i=!1,o=1;o<I.length;++o)if(null!==I[o]&&void 0===I[o].destructorFunction){i=!0;break}var D="void"!==I[0].name,t="",h="";for(o=0;o<Q-2;++o)t+=(0!==o?", ":"")+"arg"+o,h+=(0!==o?", ":"")+"arg"+o+"Wired";var w="return function "+pA(A)+"("+t+") {\nif (arguments.length !== "+(Q-2)+") {\nthrowBindingError('function "+A+" called with ' + arguments.length + ' arguments, expected "+(Q-2)+" args!');\n}\n";i&&(w+="var destructors = [];\n");var s=i?"destructors":"null",a=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],e=[qA,B,C,gI,I[0],I[1]];for(E&&(w+="var thisWired = classParam.toWireType("+s+", this);\n"),o=0;o<Q-2;++o)w+="var arg"+o+"Wired = argType"+o+".toWireType("+s+", arg"+o+"); // "+I[o+2].name+"\n",a.push("argType"+o),e.push(I[o+2]);if(E&&(h="thisWired"+(h.length>0?", ":"")+h),w+=(D?"var rv = ":"")+"invoker(fn"+(h.length>0?", ":"")+h+");\n",i)w+="runDestructors(destructors);\n";else for(o=E?1:2;o<I.length;++o){var c=1===o?"thisWired":"arg"+(o-2)+"Wired";null!==I[o].destructorFunction&&(w+=c+"_dtor("+c+"); // "+I[o].name+"\n",a.push(c+"_dtor"),e.push(I[o].destructorFunction))}return D&&(w+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),w+="}\n",a.push(w),II(Function,a).apply(null,e)}(I,C,null,Q,E),g-1),[]}))},v:function(A,I,g,B,C){I=LA(I),-1===C&&(C=4294967295);var Q=KA(g),E=function(A){return A};if(0===B){var i=32-8*g;E=function(A){return A<<i>>>i}}var o=I.includes("unsigned");VA(A,{name:I,fromWireType:E,toWireType:function(A,g){if("number"!=typeof g&&"boolean"!=typeof g)throw new TypeError('Cannot convert "'+$A(g)+'" to '+this.name);if(g<B||g>C)throw new TypeError('Passing a number "'+$A(g)+'" from JS side to C/C++ side to an argument of type "'+I+'", which is outside the valid range ['+B+", "+C+"]!");return o?g>>>0:0|g},argPackAdvance:8,readValueFromPointer:oI(I,Q,0!==B),destructorFunction:null})},u:function(A,I,g){var B=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][I];function C(A){var I=W,g=I[A>>=2],C=I[A+1];return new B(u,C,g)}VA(A,{name:g=LA(g),fromWireType:C,argPackAdvance:8,readValueFromPointer:C},{ignoreDuplicateRegistrations:!0})},N:function(A,I){var g="std::string"===(I=LA(I));VA(A,{name:I,fromWireType:function(A){var I,B=W[A>>2];if(g)for(var C=A+4,Q=0;Q<=B;++Q){var E=A+4+Q;if(Q==B||0==m[E]){var i=J(C,E-C);void 0===I?I=i:(I+=String.fromCharCode(0),I+=i),C=E+1}}else{var o=new Array(B);for(Q=0;Q<B;++Q)o[Q]=String.fromCharCode(m[A+4+Q]);I=o.join("")}return LI(A),I},toWireType:function(A,I){I instanceof ArrayBuffer&&(I=new Uint8Array(I));var B="string"==typeof I;B||I instanceof Uint8Array||I instanceof Uint8ClampedArray||I instanceof Int8Array||qA("Cannot pass non-string to std::string");var C=(g&&B?function(){return f(I)}:function(){return I.length})(),Q=JI(4+C+1);if(W[Q>>2]=C,g&&B)l(I,Q+4,C+1);else if(B)for(var E=0;E<C;++E){var i=I.charCodeAt(E);i>255&&(LI(Q),qA("String has UTF-16 code units that do not fit in 8 bits")),m[Q+4+E]=i}else for(E=0;E<C;++E)m[Q+4+E]=I[E];return null!==A&&A.push(LI,Q),Q},argPackAdvance:8,readValueFromPointer:_A,destructorFunction:function(A){LI(A)}})},D:function(A,I,g){var B,C,Q,E,i;g=LA(g),2===I?(B=X,C=T,E=j,Q=function(){return Z},i=1):4===I&&(B=O,C=z,E=P,Q=function(){return W},i=2),VA(A,{name:g,fromWireType:function(A){for(var g,C=W[A>>2],E=Q(),o=A+4,D=0;D<=C;++D){var t=A+4+D*I;if(D==C||0==E[t>>i]){var h=B(o,t-o);void 0===g?g=h:(g+=String.fromCharCode(0),g+=h),o=t+I}}return LI(A),g},toWireType:function(A,B){"string"!=typeof B&&qA("Cannot pass non-string to C++ string type "+g);var Q=E(B),o=JI(4+Q+I);return W[o>>2]=Q>>i,C(B,o+4,Q+I),null!==A&&A.push(LI,o),o},argPackAdvance:8,readValueFromPointer:_A,destructorFunction:function(A){LI(A)}})},na:function(A,I){VA(A,{isVoid:!0,name:I=LA(I),argPackAdvance:0,fromWireType:function(){},toWireType:function(A,I){}})},$:function(){throw"longjmp"},V:function(A,I,g){A=zA(A),I=DI(I,"emval::as");var B=[],C=PA(B);return q[g>>2]=C,I.toWireType(B,A)},q:function(A,I,g,B,C){return(A=sI[A])(I=zA(I),g=hI(g),function(A){var I=[];return q[A>>2]=PA(I),I}(B),C)},a:TA,H:function(A){return 0===A?PA(aI()):(A=hI(A),PA(aI()[A]))},r:function(A,I){for(var g=function(A,I){for(var g=new Array(A),B=0;B<A;++B)g[B]=DI(q[(I>>2)+B],"parameter "+B);return g}(A,I),B=g[0],C=B.name+"_$"+g.slice(1).map((function(A){return A.name})).join("_")+"$",Q=["retType"],E=[B],i="",o=0;o<A-1;++o)i+=(0!==o?", ":"")+"arg"+o,Q.push("argType"+o),E.push(g[1+o]);var D="return function "+pA("methodCaller_"+C)+"(handle, name, destructors, args) {\n",t=0;for(o=0;o<A-1;++o)D+=" var arg"+o+" = argType"+o+".readValueFromPointer(args"+(t?"+"+t:"")+");\n",t+=g[o+1].argPackAdvance;for(D+=" var rv = handle[name]("+i+");\n",o=0;o<A-1;++o)g[o+1].deleteObject&&(D+=" argType"+o+".deleteObject(arg"+o+");\n");B.isVoid||(D+=" return retType.toWireType(destructors, rv);\n"),D+="};\n",Q.push(D);var h,w,s=II(Function,Q).apply(null,E);return h=s,w=sI.length,sI.push(h),w},l:function(A){A>4&&(XA[A].refcount+=1)},i:function(){return PA([])},b:function(A){return PA(hI(A))},h:function(){return PA({})},p:function(A){gI(zA(A)),TA(A)},c:function(A,I,g){A=zA(A),I=zA(I),g=zA(g),A[I]=g},f:function(A,I){var g=(A=DI(A,"_emval_take_value")).readValueFromPointer(I);return PA(g)},y:function(){aA("")},P:function(A,I){var g;if(0===A)g=Date.now();else{if(1!==A&&4!==A)return rA(28),-1;g=wI()}return q[I>>2]=g/1e3|0,q[I+4>>2]=g%1e3*1e3*1e3|0,0},Y:function(A,I,g){m.copyWithin(A,I,I+g)},Z:function(A){var I,g,B=m.length,C=2147483648;if((A>>>=0)>C)return!1;for(var Q=1;Q<=4;Q*=2){var E=B*(1+.2/Q);if(E=Math.min(E,A+100663296),eI(Math.min(C,((I=Math.max(A,E))%(g=65536)>0&&(I+=g-I%g),I))))return!0}return!1},aa:function(A,I){var g=0;return GI().forEach((function(B,C){var Q=I+g;q[A+4*C>>2]=Q,function(A,I,g){for(var B=0;B<A.length;++B)p[I++>>0]=A.charCodeAt(B);g||(p[I>>0]=0)}(B,Q),g+=B.length+1})),0},ba:function(A,I){var g=GI();q[A>>2]=g.length;var B=0;return g.forEach((function(A){B+=A.length+1})),q[I>>2]=B,0},G:function(I){!function(I,g){var B;CA(),B=I,CA()||(A.onExit&&A.onExit(B),Y=!0),G(B,new xI(B))}(I)},A:function(A){try{var I=dA.getStreamFromFD(A);return YA.close(I),0}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),A.errno}},K:function(A,I,g,B){try{var C=dA.getStreamFromFD(A),Q=dA.doReadv(C,I,g);return q[B>>2]=Q,0}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),A.errno}},W:function(A,I,g,B,C){try{var Q=dA.getStreamFromFD(A),E=4294967296*g+(I>>>0),i=9007199254740992;return E<=-i||E>=i?-61:(YA.llseek(Q,E,B),oA=[Q.position>>>0,(iA=Q.position,+Math.abs(iA)>=1?iA>0?(0|Math.min(+Math.floor(iA/4294967296),4294967295))>>>0:~~+Math.ceil((iA-+(~~iA>>>0))/4294967296)>>>0:0)],q[C>>2]=oA[0],q[C+4>>2]=oA[1],Q.getdents&&0===E&&0===B&&(Q.getdents=null),0)}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),A.errno}},J:function(A,I,g,B){try{var C=dA.getStreamFromFD(A),Q=dA.doWritev(C,I,g);return q[B>>2]=Q,0}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),A.errno}},e:function(){return U},O:function(A){var I=Date.now();return q[A>>2]=I/1e3|0,q[A+4>>2]=I%1e3*1e3|0,0},m:function(A,I){var g=bI();try{return nA(A)(I)}catch(A){if(ZI(g),A!==A+0&&"longjmp"!==A)throw A;qI(1,0)}},t:function(A,I,g){var B=bI();try{return nA(A)(I,g)}catch(A){if(ZI(B),A!==A+0&&"longjmp"!==A)throw A;qI(1,0)}},k:function(A,I,g,B){var C=bI();try{return nA(A)(I,g,B)}catch(A){if(ZI(C),A!==A+0&&"longjmp"!==A)throw A;qI(1,0)}},o:function(A,I,g,B,C){var Q=bI();try{return nA(A)(I,g,B,C)}catch(A){if(ZI(Q),A!==A+0&&"longjmp"!==A)throw A;qI(1,0)}},oa:function(A,I,g,B,C,Q,E,i){var o=bI();try{return nA(A)(I,g,B,C,Q,E,i)}catch(A){if(ZI(o),A!==A+0&&"longjmp"!==A)throw A;qI(1,0)}},pa:function(A,I,g,B,C,Q,E,i,o,D){var t=bI();try{return nA(A)(I,g,B,C,Q,E,i,o,D)}catch(A){if(ZI(t),A!==A+0&&"longjmp"!==A)throw A;qI(1,0)}},n:function(A,I){var g=bI();try{nA(A)(I)}catch(A){if(ZI(g),A!==A+0&&"longjmp"!==A)throw A;qI(1,0)}},j:function(A,I,g){var B=bI();try{nA(A)(I,g)}catch(A){if(ZI(B),A!==A+0&&"longjmp"!==A)throw A;qI(1,0)}},w:function(A,I,g,B){var C=bI();try{nA(A)(I,g,B)}catch(A){if(ZI(C),A!==A+0&&"longjmp"!==A)throw A;qI(1,0)}},x:function(A,I,g,B,C){var Q=bI();try{nA(A)(I,g,B,C)}catch(A){if(ZI(Q),A!==A+0&&"longjmp"!==A)throw A;qI(1,0)}},B:function(A,I,g,B,C,Q,E,i,o,D){var t=bI();try{nA(A)(I,g,B,C,Q,E,i,o,D)}catch(A){if(ZI(t),A!==A+0&&"longjmp"!==A)throw A;qI(1,0)}},F:function(A,I){yI();var g=new Date(1e3*q[A>>2]);q[I>>2]=g.getSeconds(),q[I+4>>2]=g.getMinutes(),q[I+8>>2]=g.getHours(),q[I+12>>2]=g.getDate(),q[I+16>>2]=g.getMonth(),q[I+20>>2]=g.getFullYear()-1900,q[I+24>>2]=g.getDay();var B=new Date(g.getFullYear(),0,1),C=(g.getTime()-B.getTime())/864e5|0;q[I+28>>2]=C,q[I+36>>2]=-60*g.getTimezoneOffset();var Q=new Date(g.getFullYear(),6,1).getTimezoneOffset(),E=B.getTimezoneOffset(),i=0|(Q!=E&&g.getTimezoneOffset()==Math.min(E,Q));q[I+32>>2]=i;var o=q[uI()+(i?4:0)>>2];return q[I+40>>2]=o,I},S:function(A){yI();var I=new Date(q[A+20>>2]+1900,q[A+16>>2],q[A+12>>2],q[A+8>>2],q[A+4>>2],q[A>>2],0),g=q[A+32>>2],B=I.getTimezoneOffset(),C=new Date(I.getFullYear(),0,1),Q=new Date(I.getFullYear(),6,1).getTimezoneOffset(),E=C.getTimezoneOffset(),i=Math.min(E,Q);if(g<0)q[A+32>>2]=Number(Q!=E&&i==B);else if(g>0!=(i==B)){var o=Math.max(E,Q),D=g>0?i:o;I.setTime(I.getTime()+6e4*(D-B))}q[A+24>>2]=I.getDay();var t=(I.getTime()-C.getTime())/864e5|0;return q[A+28>>2]=t,q[A>>2]=I.getSeconds(),q[A+4>>2]=I.getMinutes(),q[A+8>>2]=I.getHours(),q[A+12>>2]=I.getDate(),q[A+16>>2]=I.getMonth(),I.getTime()/1e3|0},g:function(A){U=A},E:MI,_:function(A,I,g,B){return MI(A,I,g,B)},R:function(A,I,g){for(var B=J(I),C="\\!@#$^&*()+=-[]/{}|:<>?,.",Q=0,E=C.length;Q<E;++Q)B=B.replace(new RegExp("\\"+C[Q],"g"),"\\"+C[Q]);var i={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var o in i)B=B.replace(o,i[o]);var D={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"};for(var t in D)B=B.replace(t,"("+t+D[t]+")");var h=[];for(Q=B.indexOf("%");Q>=0;Q=B.indexOf("%"))h.push(B[Q+1]),B=B.replace(new RegExp("\\%"+B[Q+1],"g"),"");var w=new RegExp("^"+B,"i").exec(J(A));if(w){var s,a=function(){function A(A,I,g){return"number"!=typeof A||isNaN(A)?I:A>=I?A<=g?A:g:I}return{year:A(q[g+20>>2]+1900,1970,9999),month:A(q[g+16>>2],0,11),day:A(q[g+12>>2],1,31),hour:A(q[g+8>>2],0,23),min:A(q[g+4>>2],0,59),sec:A(q[g>>2],0,59)}}(),e=function(A){var I=h.indexOf(A);if(I>=0)return w[I+1]};if((s=e("S"))&&(a.sec=UI(s)),(s=e("M"))&&(a.min=UI(s)),s=e("H"))a.hour=UI(s);else if(s=e("I")){var c=UI(s);(s=e("p"))&&(c+="P"===s.toUpperCase()[0]?12:0),a.hour=c}if(s=e("Y"))a.year=UI(s);else if(s=e("y")){var G=UI(s);(s=e("C"))?G+=100*UI(s):G+=G<69?2e3:1900,a.year=G}if((s=e("m"))?a.month=UI(s)-1:(s=e("b"))&&(a.month={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11}[s.substring(0,3).toUpperCase()]||0),s=e("d"))a.day=UI(s);else if(s=e("j"))for(var y=UI(s),F=FI(a.year),n=0;n<12;++n){var R=nI(F?RI:rI,n-1);y<=R+(F?RI:rI)[n]&&(a.day=y-R)}else if(s=e("a")){var r=s.substring(0,3).toUpperCase();if(s=e("U")){var N={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6}[r],M=UI(s);S=0===(U=new Date(a.year,0,1)).getDay()?NI(U,N+7*(M-1)):NI(U,7-U.getDay()+N+7*(M-1)),a.day=S.getDate(),a.month=S.getMonth()}else if(s=e("W")){var U,S;N={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6}[r],M=UI(s),S=1===(U=new Date(a.year,0,1)).getDay()?NI(U,N+7*(M-1)):NI(U,7-U.getDay()+1+N+7*(M-1)),a.day=S.getDate(),a.month=S.getMonth()}}var k=new Date(a.year,a.month,a.day,a.hour,a.min,a.sec,0);return q[g>>2]=k.getSeconds(),q[g+4>>2]=k.getMinutes(),q[g+8>>2]=k.getHours(),q[g+12>>2]=k.getDate(),q[g+16>>2]=k.getMonth(),q[g+20>>2]=k.getFullYear()-1900,q[g+24>>2]=k.getDay(),q[g+28>>2]=nI(FI(k.getFullYear())?RI:rI,k.getMonth()-1)+k.getDate()-1,q[g+32>>2]=0,A+dI(w[0]).length-1}return 0},z:function(A){var I=Date.now()/1e3|0;return A&&(q[A>>2]=I),I},Q:function(A){yI();var I=Date.UTC(q[A+20>>2]+1900,q[A+16>>2],q[A+12>>2],q[A+8>>2],q[A+4>>2],q[A>>2],0),g=new Date(I);q[A+24>>2]=g.getUTCDay();var B=Date.UTC(g.getUTCFullYear(),0,1,0,0,0,0),C=(g.getTime()-B)/864e5|0;return q[A+28>>2]=C,g.getTime()/1e3|0}},JI=(function(){var I={a:KI};function g(I,g){var B,C=I.exports;A.asm=C,$((S=A.asm.qa).buffer),AA=A.asm.va,B=A.asm.ra,gA.unshift(B),sA()}function B(A){g(A.instance)}function C(A){return function(){if(!M&&(y||F)){if("function"==typeof fetch&&!cA(QA))return fetch(QA,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+QA+"'";return A.arrayBuffer()})).catch((function(){return GA(QA)}));if(h)return new Promise((function(A,I){h(QA,(function(I){A(new Uint8Array(I))}),I)}))}return Promise.resolve().then((function(){return GA(QA)}))}().then((function(A){return WebAssembly.instantiate(A,I)})).then((function(A){return A})).then(A,(function(A){N("failed to asynchronously prepare wasm: "+A),aA(A)}))}if(wA(),A.instantiateWasm)try{return A.instantiateWasm(I,g)}catch(A){return N("Module.instantiateWasm callback failed with error: "+A),!1}(M||"function"!=typeof WebAssembly.instantiateStreaming||eA(QA)||cA(QA)||"function"!=typeof fetch?C(B):fetch(QA,{credentials:"same-origin"}).then((function(A){return WebAssembly.instantiateStreaming(A,I).then(B,(function(A){return N("wasm streaming compile failed: "+A),N("falling back to ArrayBuffer instantiation"),C(B)}))}))).catch(i)}(),A.___wasm_call_ctors=function(){return(A.___wasm_call_ctors=A.asm.ra).apply(null,arguments)},A._malloc=function(){return(JI=A._malloc=A.asm.sa).apply(null,arguments)}),LI=A._free=function(){return(LI=A._free=A.asm.ta).apply(null,arguments)},lI=(A._ASC_FT_Open_Face=function(){return(A._ASC_FT_Open_Face=A.asm.ua).apply(null,arguments)},A._ASC_FT_Malloc=function(){return(A._ASC_FT_Malloc=A.asm.wa).apply(null,arguments)},A._ASC_FT_Free=function(){return(A._ASC_FT_Free=A.asm.xa).apply(null,arguments)},A._ASC_FT_Init=function(){return(A._ASC_FT_Init=A.asm.ya).apply(null,arguments)},A._ASC_FT_Open_Face_Path=function(){return(A._ASC_FT_Open_Face_Path=A.asm.za).apply(null,arguments)},A._ASC_FT_SetCMapForCharCode=function(){return(A._ASC_FT_SetCMapForCharCode=A.asm.Aa).apply(null,arguments)},A._ASC_FT_GetFaceInfo=function(){return(A._ASC_FT_GetFaceInfo=A.asm.Ba).apply(null,arguments)},A._ASC_FT_GetFaceMaxAdvanceX=function(){return(A._ASC_FT_GetFaceMaxAdvanceX=A.asm.Ca).apply(null,arguments)},A._ASC_FT_GetKerningX=function(){return(A._ASC_FT_GetKerningX=A.asm.Da).apply(null,arguments)},A._ASC_FT_Glyph_Get_CBox=function(){return(A._ASC_FT_Glyph_Get_CBox=A.asm.Ea).apply(null,arguments)},A._FT_Decompose_Outline_Buffer_Init=function(){return(A._FT_Decompose_Outline_Buffer_Init=A.asm.Fa).apply(null,arguments)},A._FT_Decompose_Outline_Buffer_Check=function(){return(A._FT_Decompose_Outline_Buffer_Check=A.asm.Ga).apply(null,arguments)},A._GlyphPathMoveTo=function(){return(A._GlyphPathMoveTo=A.asm.Ha).apply(null,arguments)},A._GlyphPathLineTo=function(){return(A._GlyphPathLineTo=A.asm.Ia).apply(null,arguments)},A._GlyphPathConicTo=function(){return(A._GlyphPathConicTo=A.asm.Ja).apply(null,arguments)},A._GlyphPathCubicTo=function(){return(A._GlyphPathCubicTo=A.asm.Ka).apply(null,arguments)},A._AST_FT_Load_Glyph=function(){return(A._AST_FT_Load_Glyph=A.asm.La).apply(null,arguments)},A._ASC_FT_Get_Glyph_Measure_Params=function(){return(A._ASC_FT_Get_Glyph_Measure_Params=A.asm.Ma).apply(null,arguments)},A._ASC_FT_Get_Glyph_Render_Params=function(){return(A._ASC_FT_Get_Glyph_Render_Params=A.asm.Na).apply(null,arguments)},A._ASC_FT_Get_Glyph_Render_Buffer=function(){return(A._ASC_FT_Get_Glyph_Render_Buffer=A.asm.Oa).apply(null,arguments)},A._ASC_FT_Set_Transform=function(){return(A._ASC_FT_Set_Transform=A.asm.Pa).apply(null,arguments)},A._ASC_FT_Set_TrueType_HintProp=function(){return(A._ASC_FT_Set_TrueType_HintProp=A.asm.Qa).apply(null,arguments)},A.___errno_location=function(){return(lI=A.___errno_location=A.asm.Ra).apply(null,arguments)}),fI=A.___getTypeName=function(){return(fI=A.___getTypeName=A.asm.Sa).apply(null,arguments)},uI=(A.___embind_register_native_and_builtin_types=function(){return(A.___embind_register_native_and_builtin_types=A.asm.Ta).apply(null,arguments)},A.__get_tzname=function(){return(uI=A.__get_tzname=A.asm.Ua).apply(null,arguments)}),pI=A.__get_daylight=function(){return(pI=A.__get_daylight=A.asm.Va).apply(null,arguments)},mI=A.__get_timezone=function(){return(mI=A.__get_timezone=A.asm.Wa).apply(null,arguments)},bI=A.stackSave=function(){return(bI=A.stackSave=A.asm.Xa).apply(null,arguments)},ZI=A.stackRestore=function(){return(ZI=A.stackRestore=A.asm.Ya).apply(null,arguments)},qI=A._setThrew=function(){return(qI=A._setThrew=A.asm.Za).apply(null,arguments)},WI=A._memalign=function(){return(WI=A._memalign=A.asm._a).apply(null,arguments)};function xI(A){this.name="ExitStatus",this.message="Program terminated with exit("+A+")",this.status=A}function VI(g){function B(){HI||(HI=!0,A.calledRun=!0,Y||(A.noFSInit||YA.init.initialized||YA.init(),YA.ignorePermissions=!1,UA.init(),yA(gA),I(A),A.onRuntimeInitialized&&A.onRuntimeInitialized(),function(){if(A.postRun)for("function"==typeof A.postRun&&(A.postRun=[A.postRun]);A.postRun.length;)I=A.postRun.shift(),BA.unshift(I);var I;yA(BA)}()))}g=g||e,DA>0||(function(){if(A.preRun)for("function"==typeof A.preRun&&(A.preRun=[A.preRun]);A.preRun.length;)I=A.preRun.shift(),IA.unshift(I);var I;yA(IA)}(),DA>0||(A.setStatus?(A.setStatus("Running..."),setTimeout((function(){setTimeout((function(){A.setStatus("")}),1),B()}),1)):B()))}if(A.dynCall_jji=function(){return(A.dynCall_jji=A.asm.$a).apply(null,arguments)},A.dynCall_iji=function(){return(A.dynCall_iji=A.asm.ab).apply(null,arguments)},A.dynCall_iiiji=function(){return(A.dynCall_iiiji=A.asm.bb).apply(null,arguments)},A.dynCall_jii=function(){return(A.dynCall_jii=A.asm.cb).apply(null,arguments)},A.dynCall_viij=function(){return(A.dynCall_viij=A.asm.db).apply(null,arguments)},A.dynCall_jiji=function(){return(A.dynCall_jiji=A.asm.eb).apply(null,arguments)},A.dynCall_ji=function(){return(A.dynCall_ji=A.asm.fb).apply(null,arguments)},A.dynCall_iiji=function(){return(A.dynCall_iiji=A.asm.gb).apply(null,arguments)},A.dynCall_iiiiij=function(){return(A.dynCall_iiiiij=A.asm.hb).apply(null,arguments)},A.dynCall_iiiiijj=function(){return(A.dynCall_iiiiijj=A.asm.ib).apply(null,arguments)},A.dynCall_iiiiiijj=function(){return(A.dynCall_iiiiiijj=A.asm.jb).apply(null,arguments)},A.dynCall_viijii=function(){return(A.dynCall_viijii=A.asm.kb).apply(null,arguments)},hA=function A(){HI||VI(),HI||(hA=A)},A.run=VI,A.preInit)for("function"==typeof A.preInit&&(A.preInit=[A.preInit]);A.preInit.length>0;)A.preInit.pop()();return VI(),A.ready});A.exports=i}).call(this,"/index.js",g(48),"/",g(49).Buffer)},function(A,I){var g,B,C=A.exports={};function Q(){throw new Error("setTimeout has not been defined")}function E(){throw new Error("clearTimeout has not been defined")}function i(A){if(g===setTimeout)return setTimeout(A,0);if((g===Q||!g)&&setTimeout)return g=setTimeout,setTimeout(A,0);try{return g(A,0)}catch(I){try{return g.call(null,A,0)}catch(I){return g.call(this,A,0)}}}!function(){try{g="function"==typeof setTimeout?setTimeout:Q}catch(A){g=Q}try{B="function"==typeof clearTimeout?clearTimeout:E}catch(A){B=E}}();var o,D=[],t=!1,h=-1;function w(){t&&o&&(t=!1,o.length?D=o.concat(D):h=-1,D.length&&s())}function s(){if(!t){var A=i(w);t=!0;for(var I=D.length;I;){for(o=D,D=[];++h<I;)o&&o[h].run();h=-1,I=D.length}o=null,t=!1,function(A){if(B===clearTimeout)return clearTimeout(A);if((B===E||!B)&&clearTimeout)return B=clearTimeout,clearTimeout(A);try{B(A)}catch(I){try{return B.call(null,A)}catch(I){return B.call(this,A)}}}(A)}}function a(A,I){this.fun=A,this.array=I}function e(){}C.nextTick=function(A){var I=new Array(arguments.length-1);if(arguments.length>1)for(var g=1;g<arguments.length;g++)I[g-1]=arguments[g];D.push(new a(A,I)),1!==D.length||t||i(s)},a.prototype.run=function(){this.fun.apply(null,this.array)},C.title="browser",C.browser=!0,C.env={},C.argv=[],C.version="",C.versions={},C.on=e,C.addListener=e,C.once=e,C.off=e,C.removeListener=e,C.removeAllListeners=e,C.emit=e,C.prependListener=e,C.prependOnceListener=e,C.listeners=function(A){return[]},C.binding=function(A){throw new Error("process.binding is not supported")},C.cwd=function(){return"/"},C.chdir=function(A){throw new Error("process.chdir is not supported")},C.umask=function(){return 0}},function(A,I,g){"use strict";(function(A){
1
+ !function(A,I){"object"==typeof exports&&"object"==typeof module?module.exports=I(require("axios")):"function"==typeof define&&define.amd?define(["axios"],I):"object"==typeof exports?exports.parser_x=I(require("axios")):A.parser_x=I(A.axios)}(window,(function(A){return function(A){var I={};function g(B){if(I[B])return I[B].exports;var C=I[B]={i:B,l:!1,exports:{}};return A[B].call(C.exports,C,C.exports,g),C.l=!0,C.exports}return g.m=A,g.c=I,g.d=function(A,I,B){g.o(A,I)||Object.defineProperty(A,I,{enumerable:!0,get:B})},g.r=function(A){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})},g.t=function(A,I){if(1&I&&(A=g(A)),8&I)return A;if(4&I&&"object"==typeof A&&A&&A.__esModule)return A;var B=Object.create(null);if(g.r(B),Object.defineProperty(B,"default",{enumerable:!0,value:A}),2&I&&"string"!=typeof A)for(var C in A)g.d(B,C,function(I){return A[I]}.bind(null,C));return B},g.n=function(A){var I=A&&A.__esModule?function(){return A.default}:function(){return A};return g.d(I,"a",I),I},g.o=function(A,I){return Object.prototype.hasOwnProperty.call(A,I)},g.p="",g(g.s=0)}([function(A,I,g){"use strict";g.r(I),g.d(I,"OFDPrintApi",(function(){return V})),g.d(I,"ajaxUtils",(function(){return j})),g.d(I,"hashOfdDocument",(function(){return O})),g.d(I,"parseOfdDocument",(function(){return P})),g.d(I,"parseOfdDocumentFromBase64",(function(){return _})),g.d(I,"getOFDPageCount",(function(){return $})),g.d(I,"getAllAttachments",(function(){return AA})),g.d(I,"getAttachmentById",(function(){return IA})),g.d(I,"getAttachmentArrayBuffer",(function(){return gA})),g.d(I,"pageSize",(function(){return BA})),g.d(I,"getCustomTag",(function(){return CA})),g.d(I,"getTextObjects",(function(){return QA})),g.d(I,"renderOfd",(function(){return EA})),g.d(I,"renderOfdByIndex",(function(){return iA})),g.d(I,"getFileStream",(function(){return DA})),g.d(I,"openMetaBaseViewer",(function(){return tA})),g.d(I,"openOFDBaseViewer",(function(){return hA})),g.d(I,"openOFDBaseViewerByBase64",(function(){return wA})),g.d(I,"verifySignature",(function(){return sA})),g.d(I,"getEventBus",(function(){return aA})),g.d(I,"initOFDViewer",(function(){return eA})),g.d(I,"openOFDViewer",(function(){return cA})),g.d(I,"openFile",(function(){return GA})),g.d(I,"openOFD",(function(){return yA}));var B=g(1),C=g.n(B),Q=g(2),E=g.n(Q),i=g(3),o=g.n(i),D=g(4),t=g.n(D),h=g(7),w=g(10),s=g(18),a=g(36),e=g(37),c=g(38),G=g(39),y=g(40),F=g(41),n=g(42),R=g(44),r=g(33),N=g(45),M=g(30),U=g(28),S=g(34),k=g(46),Y=g(47),d=g.n(Y),H=g(256),K=g(257),J=g(258),L=g(259),l=g(29),f=g(260),u=g.n(f),p=g(261),m=g.n(p),b=g(262),Z=g.n(b),q=g(285);function W(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return x(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return x(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function x(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var V=N.Print_api,v=window.Module,X=g(263),T={ofdCore:null,viewer:null,eventBus:null,waterText:null,fileName:null,ofdRender:null},j=m.a,O=function(A){if(A.ofd instanceof File){var I=new FileReader;I.readAsArrayBuffer(A.ofd),I.onload=function(){A.success&&A.success(Object(M.JSBase64ByHashFile)(I.result,A.list,A.method))}}else A.ofd instanceof ArrayBuffer?A.success&&A.success(Object(M.JSBase64ByHashFile)(A.ofd,A.list,A.method)):u()({url:A.ofd,method:"GET",responseType:"arraybuffer",headers:A.headers}).then((function(I){var g=Object(M.readOFD)(I.data,A.secret,A.digest);z(g,A)})).catch((function(I){A.fail&&A.fail(I)}))},z=function(A,I){0===A.code?(T.ofdCore=new r.Ofd_Core(A.data.ofd,A.data.ofdParserPtr),I.waterText&&(T.waterText=I.waterText),I.digest||(T.waterText="demotest"),I.signatureClickCallback&&(T.eventBus=new w.EventBus,T.eventBus._on("signatureclick",I.signatureClickCallback)),I.signaturesCallback&&I.signaturesCallback(T.ofdCore.getAllSignature(0)),I.success&&I.success(T.ofdCore)):I.fail&&I.fail(A.msg)},P=function(A){oA((function(){if(T.ofdCore&&(Object(M.freeOFD)(T.ofdCore),T.ofdCore=null,T.ofdRender=null),Object(M.CreateLibrary)(),A.ofd instanceof File){var I=new FileReader;I.readAsArrayBuffer(A.ofd),I.onload=function(){var g=Object(M.readOFD)(I.result,A.secret,A.digest);z(g,A)}}else if(A.ofd instanceof ArrayBuffer){var g=Object(M.readOFD)(A.ofd,A.secret,A.digest);z(g,A)}else u()({url:A.ofd,method:"GET",responseType:"arraybuffer",headers:A.headers}).then((function(I){if(A.ofd&&A.ofd.split("/")){var g=A.ofd.split("/");T.fileName=g[g.length-1]}var B=Object(M.readOFD)(I.data,A.secret,A.digest);z(B,A)})).catch((function(I){A.fail&&A.fail(I)}))}))},_=function(A){oA((function(){T.ofdCore&&(Object(M.freeOFD)(T.ofdCore),T.ofdCore=null),Object(M.CreateLibrary)();var I=Object(M.readOFDByBase64)(A.ofd,A.secret,A.digest);z(I,A)}))},$=function(A){return T.ofdCore.getOFDPageCount(A)},AA=function(A){return T.ofdCore.getAllAttachment(A)},IA=function(A,I){return T.ofdCore.getAttachmentByID(A,I)},gA=function(A,I){return new Promise((function(g,B){var C=T.ofdCore.getAttachmentByID(A,I);C?TA(C.FileLocAbs).then((function(A){g(A)})).catch((function(A){B(A)})):B("attachmentId error")}))},BA=function(A,I,g){var B=96;g&&(B=g/T.ofdCore.pageWidth(A,I)*25.4);var C=new S.Ofd_Core_Helper(B);return{width:T.ofdCore.pageWidth(A,I),height:T.ofdCore.pageHeight(A,I),renderWidth:C.pageRenderWidth(A,I,T.ofdCore),renderHeight:C.pageRenderHeight(A,I,T.ofdCore)}},CA=function(A){return T.ofdCore.getCustomTag(A)},QA=function(A){return T.ofdCore.getAllTextObject(A)},EA=function(){var A=o()(t.a.mark((function A(I,g){var B,C,Q,E,i,o,D,h,w,s=arguments;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(B=s.length>2&&void 0!==s[2]?s[2]:{},C=96,g&&"number"==typeof g&&!isNaN(g)&&(C=g/T.ofdCore.pageWidth(I,0)*25.4),Q=new S.Ofd_Core_Helper(C),B.waterText?Q.setWaterText(B.waterText):T.waterText&&Q.setWaterText(T.waterText),T.ofdRender||(T.ofdRender=new U.Ofd_Render(T.ofdCore,Q)),B.mixBlendMode&&T.ofdRender.setMixBlendMode(B.mixBlendMode),E=[],T.ofdCore.readOfdDocument(I)){A.next=11;break}return A.abrupt("return",E);case 11:i=T.ofdCore.getOFDPageCount(I),B.frontPages>0&&B.frontPages<i&&(i=B.frontPages),o=0;case 14:if(!(o<i)){A.next=25;break}return D=document.createElement("div"),h=Q.pageRenderWidth(0,o,T.ofdCore),w=Q.pageRenderHeight(0,o,T.ofdCore),D.setAttribute("style","margin-bottom: 20px;position: relative;width:".concat(h,"px;height:").concat(w,"px;background: white;overflow: hidden")),A.next=21,T.ofdRender.renderPage(D,0,o);case 21:E.push(D);case 22:o++,A.next=14;break;case 25:return A.abrupt("return",E);case 26:case"end":return A.stop()}}),A)})));return function(I,g){return A.apply(this,arguments)}}(),iA=function(){var A=o()(t.a.mark((function A(I,g,B){var C,Q,E,i,o,D,h=arguments;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return C=h.length>3&&void 0!==h[3]?h[3]:{},Q=96,B&&"number"==typeof B&&!isNaN(B)&&(Q=B/T.ofdCore.pageWidth(I,g)*25.4),E=new S.Ofd_Core_Helper(Q),C.waterText?E.setWaterText(C.waterText):T.waterText&&E.setWaterText(T.waterText),T.ofdRender||(T.ofdRender=new U.Ofd_Render(T.ofdCore,E)),C.mixBlendMode&&T.ofdRender.setMixBlendMode(C.mixBlendMode),i=document.createElement("div"),o=E.pageRenderWidth(0,g,T.ofdCore),D=E.pageRenderHeight(0,g,T.ofdCore),i.setAttribute("style","position: relative;width:".concat(o,"px;height:").concat(D,"px;overflow: hidden")),A.next=13,T.ofdRender.renderPage(i,0,g);case 13:return A.abrupt("return",i);case 14:case"end":return A.stop()}}),A)})));return function(I,g,B){return A.apply(this,arguments)}}(),oA=function(A){v?(Object(M.setYYDS)(v),A&&A()):(Object(M.needInitAgain)()||A&&(A(),A=null),d()({locateFile:function(){return H.wsdsb}}).then((function(I){Object(M.setYYDS)(I),A&&A()})))},DA=function(){return Object(M.getStreamData)()},tA=function(A){if(A.loadingContainer){if(A.container)for(;A.container.firstChild;)A.container.removeChild(A.container.firstChild);A.container.appendChild(A.loadingContainer)}T.ofdCore&&(T.eventBus=new w.EventBus,T.eventBus._on("pageFinishRender",A.pageFinishRenderCallback),new L.OfdBaseViewer(A.container,A.width,T.eventBus,T.waterText).setOfdCore(T.ofdCore))},hA=function(A){setTimeout((function(){if(A.loadingContainer){if(A.container)for(;A.container.firstChild;)A.container.removeChild(A.container.firstChild);A.container.appendChild(A.loadingContainer)}P({ofd:A.ofd,secret:A.secret,digest:A.digest,headers:A.headers,signatureClickCallback:A.signatureClickCallback,signaturesCallback:A.signaturesCallback,waterText:A.waterText,success:function(I){A.parserOFDSuccess&&A.parserOFDSuccess(I.ofd),new L.OfdBaseViewer(A.container,A.width,T.eventBus,T.waterText).setOfdCore(I),A.renderOFDCallback&&A.renderOFDCallback()},fail:function(I){if(A.parserOFDFail&&A.parserOFDFail(I),A.container)for(;A.container.firstChild;)A.container.removeChild(A.container.firstChild);var g=document.createElement("div");g.classList.add("error"),g.textContent=I,A.container.appendChild(g)}})}),200)},wA=function(A){if(A.loadingContainer){if(A.container)for(;A.container.firstChild;)A.container.removeChild(A.container.firstChild);A.container.appendChild(A.loadingContainer)}_({ofd:A.ofd,secret:A.secret,digest:A.digest,signatureClickCallback:A.signatureClickCallback,signaturesCallback:A.signaturesCallback,waterText:A.waterText,success:function(I){A.parserOFDSuccess&&A.parserOFDSuccess(I.ofd),new L.OfdBaseViewer(A.container,A.width,T.eventBus,T.waterText).setOfdCore(I)},fail:function(I){if(A.parserOFDFail&&A.parserOFDFail(I),A.container)for(;A.container.firstChild;)A.container.removeChild(A.container.firstChild);var g=document.createElement("div");g.textContent=I,A.container.appendChild(g)}})},sA=function(A){var I=T.ofdCore.findSignature(0,A.pageRef,A.signatureId),g={signer:I.SignCert.subject,provider:I.SignedInfo.Provider.ProviderName,hashedValue:I.HashHex,HashValid:I.HashValid,signedValue:I.signatureHex,signMethod:I.SignedInfo.SignatureMethod,signVersion:I.SignedInfo.Seal.esVersion,signatureVerify:I.SignatureValid,sealID:I.SignedInfo.Seal.esID,sealName:I.SignedInfo.Seal.Property.name,sealType:I.SignedInfo.Seal.Property.type,sealAuthTime:"".concat(I.SignedInfo.Seal.Property.validStart," 至 ").concat(I.SignedInfo.Seal.Property.validEnd),sealMakeTime:I.SignedInfo.Seal.Property.createDate,sealVersion:I.SignedInfo.Seal.Header.version};A.signatureCallback&&A.signatureCallback(g),setTimeout((function(){var g,B="",C=W(I.SignedInfo.References);try{for(C.s();!(g=C.n()).done;){var Q=g.value;B+="".concat(Object(l.replaceFirstSlash)(Q.FileRef),"|")}}catch(A){C.e(A)}finally{C.f()}var E,i=Object(M.hashPath)(T.ofdCore.ofdParserPtr,B,I.SignedInfo.ReferencesCheckMethod.toLowerCase()),o=!0,D=W(I.SignedInfo.References);try{for(D.s();!(E=D.n()).done;){var t=E.value,h=t.CheckValue,w=i["".concat(Object(l.replaceFirstSlash)(t.FileRef))];o&=h===w}}catch(A){D.e(A)}finally{D.f()}A.hashFileCallback&&A.hashFileCallback(1===o)}),200)},aA=function(){return T.viewer.eventBus},eA=function(A){cA(A)},cA=function(A){var I;T.viewer&&((I=T.viewer.eventBus)._off("resize",rA),I._off("fileinputchange",NA),I._off("openfile",nA),I._off("nextpage",SA),I._off("previouspage",kA),I._off("pagenumberchanged",YA),I._off("pagechanging",dA),I._off("print",HA),I._off("firstpage",MA),I._off("lastpage",UA),I._off("zoomin",KA),I._off("zoomout",JA),I._off("scalechanging",LA),I._off("scalechanged",fA),I._off("viewportchanging",lA),I._off("switchspreadmode",uA),I._off("scrollmodechanged",pA),I._off("switchscrollmode",mA),I._off("rotatecw",bA),I._off("rotateccw",ZA),I._off("documentproperties",qA),I._off("signatureclick",xA),I._off("attachmentclick",VA),I._off("customtagclick",XA),I._off("download",RA),I._off("pageViewerClick",vA)),T.viewer=new FA(A)},GA=function(A){yA(A)},yA=function(A){T.viewer&&(A?(T.viewer.config.openFileTip&&(T.viewer.config.openFileTip.hidden=!0),T.viewer.ofdViewer.freeDocument(),T.viewer.config.loadingContainer&&T.viewer.ofdViewer.viewer.appendChild(T.viewer.config.loadingContainer),P({ofd:A,secret:T.viewer.config.secret,digest:T.viewer.config.digest,waterText:T.viewer.config.waterText,success:function(A){T.viewer.config.parserOFDSuccess&&T.viewer.config.parserOFDSuccess(A.ofd),T.ofdCore=A,T.viewer.ofdViewer.setWaterText(T.waterText),T.viewer.ofdViewer.setOfdCore(A),T.viewer.ofdThumbnailViewer&&T.viewer.ofdThumbnailViewer.setOfdCore(A),T.viewer.ofdSignatureViewer.setOfdCore(A,T.viewer.config.signatureViewerForceCheck),T.viewer.ofdAttachmentViewer.setOfdCore(A),T.viewer.ofdCustomTagViewer.setOfdCore(A),T.viewer.toolbar.setPagesCount(A.getOFDPageCount(0),!1),T.viewer.secondaryToolbar.setPagesCount(A.getOFDPageCount(0)),T.viewer.config.sidebarForceOpen&&A.getSignatureCount(0)>0&&setTimeout((function(){T.viewer.pdfSidebar.open()}),500)},fail:function(A){T.viewer.config.parserOFDFail&&T.viewer.config.parserOFDFail(A),T.viewer.ofdViewer.freeDocument(),T.viewer.config.errorWrapper.moreInfoButton.hidden=!0,T.viewer.config.errorWrapper.container.hidden=!1,T.viewer.config.errorWrapper.errorMessage.textContent=A}})):T.viewer.config.parserOFDFail&&T.viewer.config.parserOFDFail("file undefined"))},FA=C()((function A(I){var g=this;E()(this,A),this.config=I,this.l10n=new h.GenericL10n("zh-CN"),this.eventBus=new w.EventBus,this.ofdViewer=new s.OfdViewer(I.mainContainer,I.viewerContainer,this.eventBus,I.mixBlendMode,I.defaultScale),I.sidebar.thumbnailView&&(this.ofdThumbnailViewer=new a.OfdThumbnailViewer(I.sidebar.thumbnailView,this.eventBus)),this.ofdSignatureViewer=new K.OfdSignatureViewer(I.sidebar.signaturesView,this.eventBus),this.ofdAttachmentViewer=new J.OfdAttachmentViewer(I.sidebar.attachmentsView,this.eventBus),this.ofdCustomTagViewer=new q.OfdCustomTagViewer(I.sidebar.outlineView,this.eventBus),this.pdfSidebar=new e.PDFSidebar({elements:I.sidebar,ofdViewer:this.ofdViewer,ofdThumbnailViewer:this.ofdThumbnailViewer,eventBus:this.eventBus,l10n:this.l10n}),this.overlayManager=new c.OverlayManager,I.signatureProperties&&(this.signatureProperties=new k.OFDSignatureProperties(I.signatureProperties,this.overlayManager,this.eventBus,this.l10n)),this.ofdDocumentProperties=new G.PDFDocumentProperties(I.documentProperties,this.overlayManager,this.eventBus,this.l10n),this.toolbar=new y.Toolbar(I.toolbar,this.eventBus,this.l10n),this.secondaryToolbar=new F.SecondaryToolbar(I.secondaryToolbar,I.mainContainer,this.eventBus);var B=document.createElement("input");B.id="fileInput",B.className="fileInput",B.setAttribute("type","file"),B.setAttribute("accept",".ofd"),document.body.appendChild(B);var C=this;B.addEventListener("change",(function(A){var I=A.target.files;I&&0!==I.length&&C.eventBus.dispatch("fileinputchange",{source:this,fileInput:A.target,eventBus:C.eventBus})})),new n.PDFCursorTools({container:I.mainContainer,eventBus:this.eventBus}),this.ofdPrint=new R.Print(document.getElementById("printServiceDialog"),this.overlayManager,this.l10n);var Q=I.appContainer||document.documentElement;this.l10n.translate(Q).then((function(){g.eventBus.dispatch("localized",{})})),this.eventBus._on("resize",rA),this.eventBus._on("fileinputchange",NA),this.eventBus._on("openfile",nA),this.eventBus._on("nextpage",SA),this.eventBus._on("previouspage",kA),this.eventBus._on("pagenumberchanged",YA),this.eventBus._on("pagechanging",dA),this.eventBus._on("print",HA),this.eventBus._on("firstpage",MA),this.eventBus._on("lastpage",UA),this.eventBus._on("zoomin",KA),this.eventBus._on("zoomout",JA),this.eventBus._on("scalechanging",LA),this.eventBus._on("viewportchanging",lA),this.eventBus._on("scalechanged",fA),this.eventBus._on("switchspreadmode",uA),this.eventBus._on("scrollmodechanged",pA),this.eventBus._on("switchscrollmode",mA),this.eventBus._on("rotatecw",bA),this.eventBus._on("rotateccw",ZA),this.eventBus._on("documentproperties",qA),this.eventBus._on("signatureclick",xA),this.eventBus._on("attachmentclick",VA),this.eventBus._on("customtagclick",XA),this.eventBus._on("download",RA),this.eventBus._on("pageViewerClick",vA),window.addEventListener("click",WA),window.addEventListener("resize",(function(){g.eventBus.dispatch("resize",{source:window})})),I.errorWrapper.closeButton.onclick=function(){I.errorWrapper.container.hidden=!0},I.toolbar.presentationModeButton&&(I.toolbar.presentationModeButton.hidden=!0),I.toolbar.viewBookmark&&(I.toolbar.viewBookmark.hidden=!0),I.secondaryToolbar.presentationModeButton&&(I.secondaryToolbar.presentationModeButton.hidden=!0),I.secondaryToolbar.viewBookmarkButton&&(I.secondaryToolbar.viewBookmarkButton.hidden=!0),I.secondaryToolbar.viewBookmarkButton&&(I.secondaryToolbar.viewBookmarkButton.hidden=!0);var i=document.getElementById("printServiceDialog");"function"!=typeof i.showModal&&(i&&(i.hidden=!0),I.documentProperties&&I.documentProperties.dialog&&(I.documentProperties.dialog.hidden=!0),I.signatureProperties&&I.signatureProperties.dialog&&(I.signatureProperties.dialog.hidden=!0))}));function nA(){document.getElementById("fileInput").click()}function RA(){var A=Object(M.getStreamData)();if(A)if(T.viewer.config.downloadCallback)T.viewer.config.downloadCallback(new Blob([A]));else{var I=window.URL.createObjectURL(new Blob([A])),g=document.createElement("a");g.style.display="none",g.href=I,g.setAttribute("download",T.fileName),document.body.append(g),g.click()}}function rA(){var A=T.ofdCore,I=T.viewer;if(A){var g=I.ofdViewer.currentScaleValue;"auto"!==g&&"page-fit"!==g&&"page-width"!==g||(I.ofdViewer.currentScaleValue=g),T.viewer.eventBus.dispatch("stampResize",{source:null})}}function NA(A){T.viewer.config.openFileTip&&(T.viewer.config.openFileTip.hidden=!0),T.viewer.pdfSidebar.isOpen&&T.viewer.pdfSidebar.close();var I=A.fileInput.files[0];T.fileName=I.name,T.viewer.ofdViewer.freeDocument(),T.viewer.config.loadingContainer&&T.viewer.ofdViewer.viewer.appendChild(T.viewer.config.loadingContainer);(new Date).getTime();P({ofd:I,secret:T.viewer.config.secret,digest:T.viewer.config.digest,waterText:T.viewer.config.waterText,success:function(A){(new Date).getTime();T.viewer.config.parserOFDSuccess&&T.viewer.config.parserOFDSuccess(A.ofd),T.ofdCore=A,T.viewer.ofdViewer.setWaterText(T.waterText),T.viewer.ofdViewer.setOfdCore(A),T.viewer.ofdThumbnailViewer&&T.viewer.ofdThumbnailViewer.setOfdCore(A),T.viewer.ofdSignatureViewer.setOfdCore(A,T.viewer.config.signatureViewerForceCheck),T.viewer.ofdAttachmentViewer.setOfdCore(A),T.viewer.ofdCustomTagViewer.setOfdCore(A),T.viewer.toolbar.setPagesCount(A.getOFDPageCount(0),!1),T.viewer.secondaryToolbar.setPagesCount(A.getOFDPageCount(0)),T.viewer.config.sidebarForceOpen&&A.getSignatureCount(0)>0&&setTimeout((function(){T.viewer.pdfSidebar.open()}),500)},fail:function(A){T.viewer.config.parserOFDFail&&T.viewer.config.parserOFDFail(A),T.viewer.ofdViewer.freeDocument(),T.viewer.config.errorWrapper.moreInfoButton.hidden=!0,T.viewer.config.errorWrapper.container.hidden=!1,T.viewer.config.errorWrapper.errorMessage.textContent=A}})}function MA(){T.viewer.ofdViewer.firstPage()}function UA(){T.viewer.ofdViewer.lastPage()}function SA(){T.viewer.ofdViewer.nextPage()}function kA(){T.viewer.ofdViewer.previousPage()}function YA(A){""!==A.value&&A.source.eventBus.dispatch("jumpPage",{source:A.source,pageIndex:A.value}),T.viewer.toolbar.setPageNumber(A.value,null),T.viewer.secondaryToolbar.setPageNumber(A.value,null)}function dA(A){var I=A.pageNumber;T.viewer.toolbar.setPageNumber(I,null),T.viewer.secondaryToolbar.setPageNumber(I,null),T.viewer.pdfSidebar.isThumbnailViewVisible&&T.viewer.ofdThumbnailViewer.scrollThumbnailIntoView(I),T.viewer.config.onPageChanging&&T.viewer.config.onPageChanging(I)}function HA(){T.viewer.ofdPrint.setOfdCore(T.ofdCore),T.viewer.ofdPrint.open()}function KA(){T.viewer.ofdViewer.increaseScale()}function JA(){T.viewer.ofdViewer.decreaseScale()}function LA(A){T.viewer.toolbar.setPageScale(A.presetValue,A.scale),T.viewer.config.onPageScale&&T.viewer.config.onPageScale(A.scale)}function lA(A){T.viewer.config.onViewportChange&&T.viewer.config.onViewportChange(T.viewer.ofdViewer)}function fA(A){T.viewer.ofdViewer.zoom(A.value)}function uA(A){T.viewer.ofdViewer.setSpreadMode(A.mode)}function pA(A){}function mA(A){T.viewer.ofdViewer.setScrollMode(A.mode)}function bA(){T.viewer.ofdViewer.setRotation(90)}function ZA(){T.viewer.ofdViewer.setRotation(-90)}function qA(){T.viewer.ofdDocumentProperties.setOfdCore(T.ofdCore),T.viewer.ofdDocumentProperties.open()}function WA(A){T.viewer.secondaryToolbar.isOpen&&(T.viewer.config.mainContainer.contains(A.target)||T.viewer.config.toolbar.container.contains(A.target)&&A.target!==T.viewer.config.secondaryToolbar.toggleButton)&&T.viewer.secondaryToolbar.close()}function xA(A){if(T.viewer.signatureProperties)if(T.viewer.signatureProperties.setOfdCore(T.ofdCore),A.pageRef||A.signatureId){var I=T.ofdCore.findSignature(0,A.pageRef,A.signatureId);T.viewer.signatureProperties.open(I)}else T.viewer.signatureProperties.open(A.sign.Signature)}function VA(A){var I=A.attachment.FileLocAbs.split("/");TA(A.attachment.FileLocAbs).then((function(A){var g=window.URL.createObjectURL(new Blob([A])),B=document.createElement("a");B.style.display="none",B.href=g,B.setAttribute("download",I[I.length-1]),document.body.append(B),B.click()})).catch((function(A){}))}function vA(A){T.viewer.ofdViewer&&T.viewer.ofdViewer.removeHighLight()}function XA(A){A.source.eventBus.dispatch("jumpPage",{source:A.source,pageIndex:A.pageIndex+1,eleIdArray:A.eleIdArray}),T.viewer.toolbar.setPageNumber(A.pageIndex+1,null),T.viewer.secondaryToolbar.setPageNumber(A.pageIndex+1,null)}function TA(A){return new Promise((function(I,g){var B=Object(M.getStreamData)();if(B){var C=Object(M.JSGetPathEncode)(T.ofdCore.ofdParserPtr,A);Z.a.loadAsync(B,{decodeFileName:function(A){return X.decode(A,C)}}).then((function(B){B.files[A].async("uint8array").then((function(A){I(A)}),(function(A){g(A)}))})).catch((function(A){g(A)}))}}))}},function(A,I){function g(A,I){for(var g=0;g<I.length;g++){var B=I[g];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(A,B.key,B)}}A.exports=function(A,I,B){return I&&g(A.prototype,I),B&&g(A,B),Object.defineProperty(A,"prototype",{writable:!1}),A},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I){A.exports=function(A,I){if(!(A instanceof I))throw new TypeError("Cannot call a class as a function")},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I){function g(A,I,g,B,C,Q,E){try{var i=A[Q](E),o=i.value}catch(A){return void g(A)}i.done?I(o):Promise.resolve(o).then(B,C)}A.exports=function(A){return function(){var I=this,B=arguments;return new Promise((function(C,Q){var E=A.apply(I,B);function i(A){g(E,C,Q,i,o,"next",A)}function o(A){g(E,C,Q,i,o,"throw",A)}i(void 0)}))}},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I,g){var B=g(5)();A.exports=B;try{regeneratorRuntime=B}catch(A){"object"==typeof globalThis?globalThis.regeneratorRuntime=B:Function("r","regeneratorRuntime = r")(B)}},function(A,I,g){var B=g(6).default;function C(){"use strict";
2
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */A.exports=C=function(){return I},A.exports.__esModule=!0,A.exports.default=A.exports;var I={},g=Object.prototype,Q=g.hasOwnProperty,E="function"==typeof Symbol?Symbol:{},i=E.iterator||"@@iterator",o=E.asyncIterator||"@@asyncIterator",D=E.toStringTag||"@@toStringTag";function t(A,I,g){return Object.defineProperty(A,I,{value:g,enumerable:!0,configurable:!0,writable:!0}),A[I]}try{t({},"")}catch(A){t=function(A,I,g){return A[I]=g}}function h(A,I,g,B){var C=I&&I.prototype instanceof a?I:a,Q=Object.create(C.prototype),E=new S(B||[]);return Q._invoke=function(A,I,g){var B="suspendedStart";return function(C,Q){if("executing"===B)throw new Error("Generator is already running");if("completed"===B){if("throw"===C)throw Q;return Y()}for(g.method=C,g.arg=Q;;){var E=g.delegate;if(E){var i=N(E,g);if(i){if(i===s)continue;return i}}if("next"===g.method)g.sent=g._sent=g.arg;else if("throw"===g.method){if("suspendedStart"===B)throw B="completed",g.arg;g.dispatchException(g.arg)}else"return"===g.method&&g.abrupt("return",g.arg);B="executing";var o=w(A,I,g);if("normal"===o.type){if(B=g.done?"completed":"suspendedYield",o.arg===s)continue;return{value:o.arg,done:g.done}}"throw"===o.type&&(B="completed",g.method="throw",g.arg=o.arg)}}}(A,g,E),Q}function w(A,I,g){try{return{type:"normal",arg:A.call(I,g)}}catch(A){return{type:"throw",arg:A}}}I.wrap=h;var s={};function a(){}function e(){}function c(){}var G={};t(G,i,(function(){return this}));var y=Object.getPrototypeOf,F=y&&y(y(k([])));F&&F!==g&&Q.call(F,i)&&(G=F);var n=c.prototype=a.prototype=Object.create(G);function R(A){["next","throw","return"].forEach((function(I){t(A,I,(function(A){return this._invoke(I,A)}))}))}function r(A,I){function g(C,E,i,o){var D=w(A[C],A,E);if("throw"!==D.type){var t=D.arg,h=t.value;return h&&"object"==B(h)&&Q.call(h,"__await")?I.resolve(h.__await).then((function(A){g("next",A,i,o)}),(function(A){g("throw",A,i,o)})):I.resolve(h).then((function(A){t.value=A,i(t)}),(function(A){return g("throw",A,i,o)}))}o(D.arg)}var C;this._invoke=function(A,B){function Q(){return new I((function(I,C){g(A,B,I,C)}))}return C=C?C.then(Q,Q):Q()}}function N(A,I){var g=A.iterator[I.method];if(void 0===g){if(I.delegate=null,"throw"===I.method){if(A.iterator.return&&(I.method="return",I.arg=void 0,N(A,I),"throw"===I.method))return s;I.method="throw",I.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var B=w(g,A.iterator,I.arg);if("throw"===B.type)return I.method="throw",I.arg=B.arg,I.delegate=null,s;var C=B.arg;return C?C.done?(I[A.resultName]=C.value,I.next=A.nextLoc,"return"!==I.method&&(I.method="next",I.arg=void 0),I.delegate=null,s):C:(I.method="throw",I.arg=new TypeError("iterator result is not an object"),I.delegate=null,s)}function M(A){var I={tryLoc:A[0]};1 in A&&(I.catchLoc=A[1]),2 in A&&(I.finallyLoc=A[2],I.afterLoc=A[3]),this.tryEntries.push(I)}function U(A){var I=A.completion||{};I.type="normal",delete I.arg,A.completion=I}function S(A){this.tryEntries=[{tryLoc:"root"}],A.forEach(M,this),this.reset(!0)}function k(A){if(A){var I=A[i];if(I)return I.call(A);if("function"==typeof A.next)return A;if(!isNaN(A.length)){var g=-1,B=function I(){for(;++g<A.length;)if(Q.call(A,g))return I.value=A[g],I.done=!1,I;return I.value=void 0,I.done=!0,I};return B.next=B}}return{next:Y}}function Y(){return{value:void 0,done:!0}}return e.prototype=c,t(n,"constructor",c),t(c,"constructor",e),e.displayName=t(c,D,"GeneratorFunction"),I.isGeneratorFunction=function(A){var I="function"==typeof A&&A.constructor;return!!I&&(I===e||"GeneratorFunction"===(I.displayName||I.name))},I.mark=function(A){return Object.setPrototypeOf?Object.setPrototypeOf(A,c):(A.__proto__=c,t(A,D,"GeneratorFunction")),A.prototype=Object.create(n),A},I.awrap=function(A){return{__await:A}},R(r.prototype),t(r.prototype,o,(function(){return this})),I.AsyncIterator=r,I.async=function(A,g,B,C,Q){void 0===Q&&(Q=Promise);var E=new r(h(A,g,B,C),Q);return I.isGeneratorFunction(g)?E:E.next().then((function(A){return A.done?A.value:E.next()}))},R(n),t(n,D,"Generator"),t(n,i,(function(){return this})),t(n,"toString",(function(){return"[object Generator]"})),I.keys=function(A){var I=[];for(var g in A)I.push(g);return I.reverse(),function g(){for(;I.length;){var B=I.pop();if(B in A)return g.value=B,g.done=!1,g}return g.done=!0,g}},I.values=k,S.prototype={constructor:S,reset:function(A){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(U),!A)for(var I in this)"t"===I.charAt(0)&&Q.call(this,I)&&!isNaN(+I.slice(1))&&(this[I]=void 0)},stop:function(){this.done=!0;var A=this.tryEntries[0].completion;if("throw"===A.type)throw A.arg;return this.rval},dispatchException:function(A){if(this.done)throw A;var I=this;function g(g,B){return E.type="throw",E.arg=A,I.next=g,B&&(I.method="next",I.arg=void 0),!!B}for(var B=this.tryEntries.length-1;B>=0;--B){var C=this.tryEntries[B],E=C.completion;if("root"===C.tryLoc)return g("end");if(C.tryLoc<=this.prev){var i=Q.call(C,"catchLoc"),o=Q.call(C,"finallyLoc");if(i&&o){if(this.prev<C.catchLoc)return g(C.catchLoc,!0);if(this.prev<C.finallyLoc)return g(C.finallyLoc)}else if(i){if(this.prev<C.catchLoc)return g(C.catchLoc,!0)}else{if(!o)throw new Error("try statement without catch or finally");if(this.prev<C.finallyLoc)return g(C.finallyLoc)}}}},abrupt:function(A,I){for(var g=this.tryEntries.length-1;g>=0;--g){var B=this.tryEntries[g];if(B.tryLoc<=this.prev&&Q.call(B,"finallyLoc")&&this.prev<B.finallyLoc){var C=B;break}}C&&("break"===A||"continue"===A)&&C.tryLoc<=I&&I<=C.finallyLoc&&(C=null);var E=C?C.completion:{};return E.type=A,E.arg=I,C?(this.method="next",this.next=C.finallyLoc,s):this.complete(E)},complete:function(A,I){if("throw"===A.type)throw A.arg;return"break"===A.type||"continue"===A.type?this.next=A.arg:"return"===A.type?(this.rval=this.arg=A.arg,this.method="return",this.next="end"):"normal"===A.type&&I&&(this.next=I),s},finish:function(A){for(var I=this.tryEntries.length-1;I>=0;--I){var g=this.tryEntries[I];if(g.finallyLoc===A)return this.complete(g.completion,g.afterLoc),U(g),s}},catch:function(A){for(var I=this.tryEntries.length-1;I>=0;--I){var g=this.tryEntries[I];if(g.tryLoc===A){var B=g.completion;if("throw"===B.type){var C=B.arg;U(g)}return C}}throw new Error("illegal catch attempt")},delegateYield:function(A,I,g){return this.delegate={iterator:k(A),resultName:I,nextLoc:g},"next"===this.method&&(this.arg=void 0),s}},I}A.exports=C,A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I){function g(I){return A.exports=g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},A.exports.__esModule=!0,A.exports.default=A.exports,g(I)}A.exports=g,A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I,g){"use strict";g.r(I),g.d(I,"GenericL10n",(function(){return s}));var B=g(3),C=g.n(B),Q=g(2),E=g.n(Q),i=g(1),o=g.n(i),D=g(4),t=g.n(D),h=(g(8),g(9)),w=document.webL10n,s=function(){function A(I){E()(this,A),this._lang=I,this._ready=new Promise((function(A,g){w.setLanguage(Object(h.fixupLangCode)(I),(function(){A(w)}))}))}var I,g,B,Q;return o()(A,[{key:"getLanguage",value:(Q=C()(t.a.mark((function A(){var I;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,this._ready;case 2:return I=A.sent,A.abrupt("return",I.getLanguage());case 4:case"end":return A.stop()}}),A,this)}))),function(){return Q.apply(this,arguments)})},{key:"getDirection",value:(B=C()(t.a.mark((function A(){var I;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,this._ready;case 2:return I=A.sent,A.abrupt("return",I.getDirection());case 4:case"end":return A.stop()}}),A,this)}))),function(){return B.apply(this,arguments)})},{key:"get",value:(g=C()(t.a.mark((function A(I){var g,B,C,Q=arguments;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return g=Q.length>1&&void 0!==Q[1]?Q[1]:null,B=Q.length>2&&void 0!==Q[2]?Q[2]:Object(h.getL10nFallback)(I,g),A.next=4,this._ready;case 4:return C=A.sent,A.abrupt("return",C.get(I,g,B));case 6:case"end":return A.stop()}}),A,this)}))),function(A){return g.apply(this,arguments)})},{key:"translate",value:(I=C()(t.a.mark((function A(I){var g;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,this._ready;case 2:return g=A.sent,A.abrupt("return",g.translate(I));case 4:case"end":return A.stop()}}),A,this)}))),function(A){return I.apply(this,arguments)})}]),A}()},function(A,I,g){"use strict";document.webL10n=function(A,I,g){var B={},C="",Q="textContent",E="",i={},o="loading";function D(A,I,g){I=I||function(A){},g=g||function(){};var B=new XMLHttpRequest;B.open("GET",A,true),B.overrideMimeType&&B.overrideMimeType("text/plain; charset=utf-8"),B.onreadystatechange=function(){4==B.readyState&&(200==B.status||0===B.status?I(B.responseText):g())},B.onerror=g,B.ontimeout=g;try{B.send(null)}catch(A){g()}}function t(A,I,g,E){var i=A.replace(/[^\/]*$/,"")||"./";function o(A){return A.lastIndexOf("\\")<0?A:A.replace(/\\\\/g,"\\").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\{/g,"{").replace(/\\}/g,"}").replace(/\\"/g,'"').replace(/\\'/g,"'")}D(A,(function(A){C+=A,function(A,g){var B={},C=/^\s*|\s*$/,Q=/^\s*#|^\s*$/,E=/^\s*\[(.*)\]\s*$/,t=/^\s*@import\s+url\((.*)\)\s*$/i,h=/^([^=\s]*)\s*=\s*(.+)$/;function w(A,g,D){var w=A.replace(C,"").split(/[\r\n]+/),a="*",e=I.split("-",1)[0],c=!1,G="";!function A(){for(;;){if(!w.length)return void D();var C=w.shift();if(!Q.test(C)){if(g){if(G=E.exec(C)){a=G[1].toLowerCase(),c="*"!==a&&a!==I&&a!==e;continue}if(c)continue;if(G=t.exec(C))return void s(i+G[1],A)}var y=C.match(h);y&&3==y.length&&(B[y[1]]=o(y[2]))}}}()}function s(A,I){D(A,(function(A){w(A,!1,I)}),(function(){I()}))}w(A,!0,(function(){g(B)}))}(A,(function(A){for(var I in A){var C,E,i=I.lastIndexOf(".");i>0?(C=I.substring(0,i),E=I.substring(i+1)):(C=I,E=Q),B[C]||(B[C]={}),B[C][E]=A[I]}g&&g()}))}),E)}function h(A,g){A&&(A=A.toLowerCase()),g=g||function(){},B={},C="",E="",E=A;var Q=I.querySelectorAll('link[type="application/l10n"]'),i=Q.length;if(0!==i){var D,h,w=0;h=function(){++w>=i&&(g(),o="complete")};for(var s=0;s<i;s++){new G(Q[s]).load(A,h)}}else{var a=(D=I.querySelector('script[type="application/l10n"]'))?JSON.parse(D.innerHTML):null;if(a&&a.locales&&a.default_locale){if(!(B=a.locales[A])){var e=a.default_locale.toLowerCase();for(var c in a.locales){if((c=c.toLowerCase())===A){B=a.locales[A];break}c===e&&(B=a.locales[e])}}g()}o="complete"}function G(A){var I=A.href;this.load=function(A,g){t(I,A,g,(function(){E="",g()}))}}}function w(A,I,g){var C=B[A];if(!C){if(!g)return null;C=g}var Q={};for(var E in C){var i=C[E];i=a(i=s(i,I,A,E),I,A),Q[E]=i}return Q}function s(A,I,g,C){var Q=/\{\[\s*([a-zA-Z]+)\(([a-zA-Z]+)\)\s*\]\}/.exec(A);if(!Q||!Q.length)return A;var E,o=Q[1],D=Q[2];(I&&D in I?E=I[D]:D in B&&(E=B[D]),o in i)&&(A=(0,i[o])(A,E,g,C));return A}function a(A,I,g){return A.replace(/\{\{\s*(.+?)\s*\}\}/g,(function(A,g){return I&&g in I?I[g]:g in B?B[g]:A}))}function e(A){var g=function(A){if(!A)return{};var I=A.getAttribute("data-l10n-id"),g=A.getAttribute("data-l10n-args"),B={};if(g)try{B=JSON.parse(g)}catch(A){}return{id:I,args:B}}(A);if(g.id){var B=w(g.id,g.args);if(B){if(B[Q]){if(0===function(A){if(A.children)return A.children.length;if(void 0!==A.childElementCount)return A.childElementCount;for(var I=0,g=0;g<A.childNodes.length;g++)I+=1===A.nodeType?1:0;return I}(A))A[Q]=B[Q];else{for(var C=A.childNodes,E=!1,i=0,o=C.length;i<o;i++)3===C[i].nodeType&&/\S/.test(C[i].nodeValue)&&(E?C[i].nodeValue="":(C[i].nodeValue=B[Q],E=!0));if(!E){var D=I.createTextNode(B[Q]);A.insertBefore(D,A.firstChild)}}delete B[Q]}for(var t in B)A[t]=B[t]}}}return i.plural=function(A,I,g,C){var o=parseFloat(I);if(isNaN(o))return A;if(C!=Q)return A;i._pluralRules||(i._pluralRules=function(A){function I(A,I){return-1!==I.indexOf(A)}function g(A,I,g){return I<=A&&A<=g}var B={0:function(A){return"other"},1:function(A){return g(A%100,3,10)?"few":0===A?"zero":g(A%100,11,99)?"many":2==A?"two":1==A?"one":"other"},2:function(A){return 0!==A&&A%10==0?"many":2==A?"two":1==A?"one":"other"},3:function(A){return 1==A?"one":"other"},4:function(A){return g(A,0,1)?"one":"other"},5:function(A){return g(A,0,2)&&2!=A?"one":"other"},6:function(A){return 0===A?"zero":A%10==1&&A%100!=11?"one":"other"},7:function(A){return 2==A?"two":1==A?"one":"other"},8:function(A){return g(A,3,6)?"few":g(A,7,10)?"many":2==A?"two":1==A?"one":"other"},9:function(A){return 0===A||1!=A&&g(A%100,1,19)?"few":1==A?"one":"other"},10:function(A){return g(A%10,2,9)&&!g(A%100,11,19)?"few":A%10!=1||g(A%100,11,19)?"other":"one"},11:function(A){return g(A%10,2,4)&&!g(A%100,12,14)?"few":A%10==0||g(A%10,5,9)||g(A%100,11,14)?"many":A%10==1&&A%100!=11?"one":"other"},12:function(A){return g(A,2,4)?"few":1==A?"one":"other"},13:function(A){return g(A%10,2,4)&&!g(A%100,12,14)?"few":1!=A&&g(A%10,0,1)||g(A%10,5,9)||g(A%100,12,14)?"many":1==A?"one":"other"},14:function(A){return g(A%100,3,4)?"few":A%100==2?"two":A%100==1?"one":"other"},15:function(A){return 0===A||g(A%100,2,10)?"few":g(A%100,11,19)?"many":1==A?"one":"other"},16:function(A){return A%10==1&&11!=A?"one":"other"},17:function(A){return 3==A?"few":0===A?"zero":6==A?"many":2==A?"two":1==A?"one":"other"},18:function(A){return 0===A?"zero":g(A,0,2)&&0!==A&&2!=A?"one":"other"},19:function(A){return g(A,2,10)?"few":g(A,0,1)?"one":"other"},20:function(A){return!g(A%10,3,4)&&A%10!=9||g(A%100,10,19)||g(A%100,70,79)||g(A%100,90,99)?A%1e6==0&&0!==A?"many":A%10!=2||I(A%100,[12,72,92])?A%10!=1||I(A%100,[11,71,91])?"other":"one":"two":"few"},21:function(A){return 0===A?"zero":1==A?"one":"other"},22:function(A){return g(A,0,1)||g(A,11,99)?"one":"other"},23:function(A){return g(A%10,1,2)||A%20==0?"one":"other"},24:function(A){return g(A,3,10)||g(A,13,19)?"few":I(A,[2,12])?"two":I(A,[1,11])?"one":"other"}},C={af:3,ak:4,am:4,ar:1,asa:3,az:0,be:11,bem:3,bez:3,bg:3,bh:4,bm:0,bn:3,bo:0,br:20,brx:3,bs:11,ca:3,cgg:3,chr:3,cs:12,cy:17,da:3,de:3,dv:3,dz:0,ee:3,el:3,en:3,eo:3,es:3,et:3,eu:3,fa:0,ff:5,fi:3,fil:4,fo:3,fr:5,fur:3,fy:3,ga:8,gd:24,gl:3,gsw:3,gu:3,guw:4,gv:23,ha:3,haw:3,he:2,hi:4,hr:11,hu:0,id:0,ig:0,ii:0,is:3,it:3,iu:7,ja:0,jmc:3,jv:0,ka:0,kab:5,kaj:3,kcg:3,kde:0,kea:0,kk:3,kl:3,km:0,kn:0,ko:0,ksb:3,ksh:21,ku:3,kw:7,lag:18,lb:3,lg:3,ln:4,lo:0,lt:10,lv:6,mas:3,mg:4,mk:16,ml:3,mn:3,mo:9,mr:3,ms:0,mt:15,my:0,nah:3,naq:7,nb:3,nd:3,ne:3,nl:3,nn:3,no:3,nr:3,nso:4,ny:3,nyn:3,om:3,or:3,pa:3,pap:3,pl:13,ps:3,pt:3,rm:3,ro:9,rof:3,ru:11,rwk:3,sah:0,saq:3,se:7,seh:3,ses:0,sg:0,sh:11,shi:19,sk:12,sl:14,sma:7,smi:7,smj:7,smn:7,sms:7,sn:3,so:3,sq:3,sr:11,ss:3,ssy:3,st:3,sv:3,sw:3,syr:3,ta:3,te:3,teo:3,th:0,ti:4,tig:3,tk:3,tl:4,tn:3,to:0,tr:0,ts:3,tzm:22,uk:11,ur:3,ve:3,vi:0,vun:3,wa:4,wae:3,wo:0,xh:3,xog:3,yo:0,zh:0,zu:3}[A.replace(/-.*$/,"")];return C in B?B[C]:function(){return"other"}}(E));var D="["+i._pluralRules(o)+"]";return 0===o&&g+"[zero]"in B?A=B[g+"[zero]"][C]:1==o&&g+"[one]"in B?A=B[g+"[one]"][C]:2==o&&g+"[two]"in B?A=B[g+"[two]"][C]:g+D in B?A=B[g+D][C]:g+"[other]"in B&&(A=B[g+"[other]"][C]),A},{get:function(A,I,g){var B,C=A.lastIndexOf("."),E=Q;C>0&&(E=A.substring(C+1),A=A.substring(0,C)),g&&((B={})[E]=g);var i=w(A,I,B);return i&&E in i?i[E]:"{{"+A+"}}"},getData:function(){return B},getText:function(){return C},getLanguage:function(){return E},setLanguage:function(A,I){h(A,(function(){I&&I()}))},getDirection:function(){var A=E.split("-",1)[0];return["ar","he","fa","ps","ur"].indexOf(A)>=0?"rtl":"ltr"},translate:function(A){for(var g=function(A){return A?A.querySelectorAll("*[data-l10n-id]"):[]}(A=A||I.documentElement),B=g.length,C=0;C<B;C++)e(g[C]);e(A)},getReadyState:function(){return o},ready:function(g){g&&("complete"==o||"interactive"==o?A.setTimeout((function(){g()})):I.addEventListener&&I.addEventListener("localized",(function A(){I.removeEventListener("localized",A),g()})))}}}(window,document)},function(A,I,g){"use strict";g.r(I),g.d(I,"fixupLangCode",(function(){return t})),g.d(I,"getL10nFallback",(function(){return o})),g.d(I,"NullL10n",(function(){return w}));var B=g(3),C=g.n(B),Q=g(4),E=g.n(Q),i={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} × {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",print_progress_percent:"{{progress}}%","toggle_sidebar.title":"Toggle Sidebar","toggle_sidebar_notification2.title":"Toggle Sidebar (document contains outline/attachments/layers)",additional_layers:"Additional Layers",page_landmark:"Page {{page}}",thumb_page_title:"Page {{page}}",thumb_page_canvas:"Thumbnail of Page {{page}}",find_reached_top:"Reached top of document, continued from bottom",find_reached_bottom:"Reached end of document, continued from top","find_match_count[one]":"{{current}} of {{total}} match","find_match_count[other]":"{{current}} of {{total}} matches","find_match_count_limit[one]":"More than {{limit}} match","find_match_count_limit[other]":"More than {{limit}} matches",find_not_found:"Phrase not found",error_version_info:"PDF.js v{{version}} (build: {{build}})",error_message:"Message: {{message}}",error_stack:"Stack: {{stack}}",error_file:"File: {{file}}",error_line:"Line: {{line}}",rendering_error:"An error occurred while rendering the page.",page_scale_width:"Page Width",page_scale_fit:"Page Fit",page_scale_auto:"Automatic Zoom",page_scale_actual:"Actual Size",page_scale_percent:"{{scale}}%",loading:"Loading…",loading_error:"An error occurred while loading the PDF.",invalid_file_error:"Invalid or corrupted PDF file.",missing_file_error:"Missing PDF file.",unexpected_response_error:"Unexpected server response.",printing_not_supported:"Warning: Printing is not fully supported by this browser.",printing_not_ready:"Warning: The PDF is not fully loaded for printing.",web_fonts_disabled:"Web fonts are disabled: unable to use embedded PDF fonts."};function o(A,I){switch(A){case"find_match_count":A="find_match_count[".concat(1===I.total?"one":"other","]");break;case"find_match_count_limit":A="find_match_count_limit[".concat(1===I.limit?"one":"other","]")}return i[A]||""}var D={en:"en-US",es:"es-ES",fy:"fy-NL",ga:"ga-IE",gu:"gu-IN",hi:"hi-IN",hy:"hy-AM",nb:"nb-NO",ne:"ne-NP",nn:"nn-NO",pa:"pa-IN",pt:"pt-PT",sv:"sv-SE",zh:"zh-CN"};function t(A){return D[!!A&&A.toLowerCase()]||A}function h(A,I){return I?A.replace(/\{\{\s*(\w+)\s*\}\}/g,(function(A,g){return g in I?I[g]:"{{"+g+"}}"})):A}var w={getLanguage:function(){return C()(E.a.mark((function A(){return E.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return","en-us");case 1:case"end":return A.stop()}}),A)})))()},getDirection:function(){return C()(E.a.mark((function A(){return E.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return","ltr");case 1:case"end":return A.stop()}}),A)})))()},get:function(A){var I=arguments;return C()(E.a.mark((function g(){var B,C;return E.a.wrap((function(g){for(;;)switch(g.prev=g.next){case 0:return B=I.length>1&&void 0!==I[1]?I[1]:null,C=I.length>2&&void 0!==I[2]?I[2]:o(A,B),g.abrupt("return",h(C,B));case 3:case"end":return g.stop()}}),g)})))()},translate:function(A){return C()(E.a.mark((function A(){return E.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:case"end":return A.stop()}}),A)})))()}}},function(A,I,g){"use strict";g.r(I),g.d(I,"AutomationEventBus",(function(){return R})),g.d(I,"EventBus",(function(){return n})),g.d(I,"waitOnEventOrTimeout",(function(){return F})),g.d(I,"WaitOnType",(function(){return y}));var B=g(11),C=g.n(B),Q=g(14),E=g.n(Q),i=g(16),o=g.n(i),D=g(13),t=g.n(D),h=g(2),w=g.n(h),s=g(1),a=g.n(s);function e(A){var I=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(A){return!1}}();return function(){var g,B=t()(A);if(I){var C=t()(this).constructor;g=Reflect.construct(B,arguments,C)}else g=B.apply(this,arguments);return o()(this,g)}}function c(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return G(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return G(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function G(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var y={EVENT:"event",TIMEOUT:"timeout"};function F(A){var I=A.target,g=A.name,B=A.delay,C=void 0===B?0:B;return new Promise((function(A,B){if("object"!=typeof I||!g||"string"!=typeof g||!(Number.isInteger(C)&&C>=0))throw new Error("waitOnEventOrTimeout - invalid parameters.");function Q(B){I instanceof n?I._off(g,E):I.removeEventListener(g,E),o&&clearTimeout(o),A(B)}var E=Q.bind(null,y.EVENT);I instanceof n?I._on(g,E):I.addEventListener(g,E);var i=Q.bind(null,y.TIMEOUT),o=setTimeout(i,C)}))}var n=function(){function A(){w()(this,A),this._listeners=Object.create(null)}return a()(A,[{key:"on",value:function(A,I){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._on(A,I,{external:!0,once:g&&g.once})}},{key:"off",value:function(A,I){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._off(A,I,{external:!0,once:g&&g.once})}},{key:"dispatch",value:function(A,I){var g=this._listeners[A];if(g&&0!==g.length){var B,C,Q=c(g.slice(0));try{for(Q.s();!(C=Q.n()).done;){var E=C.value,i=E.listener,o=E.external;E.once&&this._off(A,i),o?(B||(B=[]),B.push(i)):i(I)}}catch(A){Q.e(A)}finally{Q.f()}if(B){var D,t=c(B);try{for(t.s();!(D=t.n()).done;){(0,D.value)(I)}}catch(A){t.e(A)}finally{t.f()}B=null}}}},{key:"_on",value:function(A,I){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._listeners[A]||(this._listeners[A]=[]);var B=this._listeners[A];B.push({listener:I,external:g&&!0===g.external,once:g&&!0===g.once})}},{key:"_off",value:function(A,I){var g=this._listeners[A];if(g)for(var B=0,C=g.length;B<C;B++)if(g[B].listener===I)return void g.splice(B,1)}}]),A}(),R=function(A){E()(g,A);var I=e(g);function g(){return w()(this,g),I.apply(this,arguments)}return a()(g,[{key:"dispatch",value:function(A,I){if("undefined"!=typeof PDFJSDev&&!PDFJSDev.test("MOZCENTRAL"))throw new Error("Not implemented: AutomationEventBus.dispatch");C()(t()(g.prototype),"dispatch",this).call(this,A,I);var B=Object.create(null);if(I)for(var Q in I){var E=I[Q];if("source"!==Q)B[Q]=E;else if(E===window||E===document)return}var i=document.createEvent("CustomEvent");i.initCustomEvent(A,!0,!0,B),document.dispatchEvent(i)}}]),g}(n)},function(A,I,g){var B=g(12);function C(){return"undefined"!=typeof Reflect&&Reflect.get?(A.exports=C=Reflect.get.bind(),A.exports.__esModule=!0,A.exports.default=A.exports):(A.exports=C=function(A,I,g){var C=B(A,I);if(C){var Q=Object.getOwnPropertyDescriptor(C,I);return Q.get?Q.get.call(arguments.length<3?A:g):Q.value}},A.exports.__esModule=!0,A.exports.default=A.exports),C.apply(this,arguments)}A.exports=C,A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I,g){var B=g(13);A.exports=function(A,I){for(;!Object.prototype.hasOwnProperty.call(A,I)&&null!==(A=B(A)););return A},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I){function g(I){return A.exports=g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(A){return A.__proto__||Object.getPrototypeOf(A)},A.exports.__esModule=!0,A.exports.default=A.exports,g(I)}A.exports=g,A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I,g){var B=g(15);A.exports=function(A,I){if("function"!=typeof I&&null!==I)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(I&&I.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),Object.defineProperty(A,"prototype",{writable:!1}),I&&B(A,I)},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I){function g(I,B){return A.exports=g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(A,I){return A.__proto__=I,A},A.exports.__esModule=!0,A.exports.default=A.exports,g(I,B)}A.exports=g,A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I,g){var B=g(6).default,C=g(17);A.exports=function(A,I){if(I&&("object"===B(I)||"function"==typeof I))return I;if(void 0!==I)throw new TypeError("Derived constructors may only return object or undefined");return C(A)},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I){A.exports=function(A){if(void 0===A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I,g){"use strict";g.r(I),g.d(I,"OfdViewer",(function(){return n}));var B=g(3),C=g.n(B),Q=g(2),E=g.n(Q),i=g(1),o=g.n(i),D=g(19),t=g.n(D),h=g(4),w=g.n(h),s=g(20),a=g(27),e=g(28),c=g(35),G=g(34);function y(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return F(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return F(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function F(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var n=function(){function A(I,g,B,C,Q){E()(this,A),t()(this,"scrollModePageState",null),this.jumpPageEvt=null,this.coreHelper=new G.Ofd_Core_Helper,this.ofdRender=new e.Ofd_Render(null,new G.Ofd_Core_Helper),C&&this.ofdRender.setMixBlendMode(C),this.defaultScale=Q||s.DEFAULT_SCALE_VALUE,this.ofdCanvasRender=new c.OfdCanvasRender(null,this.coreHelper),this.eventBus=B,this.container=I,this.viewer=g,this._currentScaleValue=this.defaultScale,this._pages=[],this._currentScale=1,this._spreadMode=s.SpreadMode.NONE,this._scrollMode=s.ScrollMode.VERTICAL,this._pagesRotation=0,this.currentPage=1,this.scroll=Object(s.watchScroll)(this.container,this._scrollUpdate.bind(this)),this.eventBus.dispatch("pagechanging",{source:this,pageNumber:1,pageLabel:null,previous:1}),this.eventBus._on("jumpPage",this.jumpPage.bind(this)),this.scrollModePageState={previousPageNumber:1,scrollDown:!0,pages:[]},this._location=null,this.lastViewerHeight=0,this.lastViewerContainerScrollTop=0,this.lastViewerWidth=0,this.lastViewerContainerScrollLeft=0}var I;return o()(A,[{key:"getPages",value:function(){return this._pages}},{key:"currentScaleValue",get:function(){return this._currentScaleValue},set:function(A){this.core&&this._setScale(A,!1)}},{key:"getOfdCore",value:function(){return this.core}},{key:"emptyNode",value:function(A){if(A)for(;A.firstChild;)A.removeChild(A.firstChild)}},{key:"_scrollUpdate",value:function(){0!==this.pageCount&&this.updateView()}},{key:"_getVisiblePages",value:function(){var A=this._pages;return Object(s.getVisibleElements)({scrollEl:this.container,views:A,sortByVisibility:!0,horizontal:false,rtl:false})}},{key:"renderHighestPriority",value:function(A){this.forceRendering(A)}},{key:"getScrollAhead",value:function(A){if(A.first&&1===A.first.id)return!0;if(A.last&&A.last.id===this.pageCount)return!1;switch(this._scrollMode){case s.ScrollMode.PAGE:return this.scrollModePageState.scrollDown;case s.ScrollMode.HORIZONTAL:return this.scroll.right}return this.scroll.down}},{key:"forceRendering",value:(I=C()(w.a.mark((function A(I){var g,B,C,Q,E=this;return w.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(this._scrollMode!==s.ScrollMode.PAGE?(B=I||this._getVisiblePages(),C=this.getScrollAhead(B),this._spreadMode!==s.SpreadMode.NONE&&(this._scrollMode,s.ScrollMode.HORIZONTAL),g=Object(a.getHighestPriority)(B,this._pages,C)):g=I,!g||g.renderingState!==s.RenderingStates.INITIAL){A.next=6;break}return A.delegateYield(w.a.mark((function A(){var I,B,C,Q,i,o;return w.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return E.emptyNode(g.div.firstChild),A.next=3,E.ofdRender.renderPage(g.div.firstChild,0,g.id-1);case 3:E.highLightEle(),I=E,B=y(document.getElementsByName("seal_img_div_".concat(g.id-1)));try{for(Q=function(){var A=C.value;A.addEventListener("click",(function(){I.eventBus.dispatch("signatureclick",{source:I,pageRef:A.dataset.pageRef,signatureId:A.dataset.signatureId})}))},B.s();!(C=B.n()).done;)Q()}catch(A){B.e(A)}finally{B.f()}for(g.renderingState=s.RenderingStates.FINISHED,E.renderHighestPriority(),i=0;i<g.id-10;i++)(o=E._pages[i]).renderingState===s.RenderingStates.FINISHED&&(E.emptyNode(o.div.firstChild),o.renderingState=s.RenderingStates.INITIAL);return A.abrupt("return",{v:!0});case 11:case"end":return A.stop()}}),A)}))(),"t0",3);case 3:if("object"!=typeof(Q=A.t0)){A.next=6;break}return A.abrupt("return",Q.v);case 6:return A.abrupt("return",!1);case 7:case"end":return A.stop()}}),A,this)}))),function(A){return I.apply(this,arguments)})},{key:"highLightEle",value:function(){if(this.removeHighLight(),this.jumpPageEvt&&this.jumpPageEvt.eleIdArray){document.getElementById(this.jumpPageEvt.eleIdArray[0].eleId);this.jumpPageEvt.eleIdArray.forEach((function(A){var I=document.getElementById("page_".concat(A.pageIndex));if(I.firstElementChild&&I.firstElementChild.childElementCount>0){var g=document.getElementById(A.eleId),B=document.createElement("div");B.className="highLight",B.setAttribute("style","position:absolute;left:".concat(g.style.left,";top:").concat(g.style.top,";width:").concat(g.style.width,";height:").concat(g.style.height)),I.firstElementChild.appendChild(B)}})),this.jumpPageEvt=null}}},{key:"removeHighLight",value:function(){var A=document.getElementsByClassName("highLight");if(A)for(var I=A.length-1;I>=0;I--){var g=A[I];g&&g.parentNode.removeChild(g)}}},{key:"updateView",value:function(){var A=this._getVisiblePages(),I=A.views;if(0!==I.length){this.renderHighestPriority(A);var g,B=this.currentPage,C=!1,Q=y(I);try{for(Q.s();!(g=Q.n()).done;){var E=g.value;if(E.percent<100)break;if(E.id===B){C=!0;break}}}catch(A){Q.e(A)}finally{Q.f()}C||(B=I[0].id),this._setCurrentPageNumber(B)}}},{key:"logError",value:function(A,I){}},{key:"showDocumentError",value:function(A,I){this.logError(A,I);var g=document.createElement("div");g.classList.add("error"),g.textContent=I,this.emptyNode(this.viewer),this.viewer.appendChild(g)}},{key:"resetPageScale",value:function(){this.core&&(this.coreHelper.setDpi(96*this._currentScale),this.reformDiv(this._pagesRotation))}},{key:"reformDiv",value:function(A){for(var I=0;I<this._pages.length;++I){var g=this._pages[I].div,B=this.coreHelper.pageRenderWidth(0,I,this.core),C=this.coreHelper.pageRenderHeight(0,I,this.core),Q=g.firstChild,E=new G.Ofd_Core_Helper,i=E.pageRenderWidth(0,I,this.core),o=E.pageRenderHeight(0,I,this.core);switch(A){case 0:g.style.width=B+"px",g.style.height=C+"px",0,this._pages[I].width=B,this._pages[I].height=C,Q.setAttribute("style","width:".concat(i,"px;height:").concat(o,"px;transform:rotate(",0,"deg) translate(").concat((B-i)/2,"px, ").concat((C-o)/2,"px) scale(").concat(this._currentScale,")"));break;case 90:g.style.width=C+"px",g.style.height=B+"px",(B-C)/2,this._pages[I].width=C,this._pages[I].height=B,Q.setAttribute("style","width:".concat(i,"px;height:").concat(o,"px;transform: translate(").concat((C-i)/2,"px, ").concat((B-o)/2,"px) rotate(").concat(A,"deg) scale(").concat(this._currentScale,")"));break;case 180:g.style.width=B+"px",g.style.height=C+"px",0,this._pages[I].width=B,this._pages[I].height=C,Q.setAttribute("style","width:".concat(i,"px;height:").concat(o,"px;transform:rotate(",180,"deg) translate(").concat(-(B-i)/2,"px, ").concat(-(C-o)/2,"px) scale(").concat(this._currentScale,")"));break;case 270:g.style.width=C+"px",g.style.height=B+"px",-(B-C)/2,this._pages[I].width=C,this._pages[I].height=B,Q.setAttribute("style","width:".concat(i,"px;height:").concat(o,"px;transform: translate(").concat((C-i)/2,"px, ").concat((B-o)/2,"px) rotate(",270,"deg) scale(").concat(this._currentScale,")"))}this._pages[I].scale=this._currentScale;var D={width:this._pages[I].width,height:this._pages[I].height,scale:this._currentScale};this._pages[I].viewport=D}if(0!==this.lastViewerHeight&&0!==this.lastViewerContainerScrollTop){var t=document.getElementById("viewer").scrollHeight;document.getElementById("viewerContainer").scrollTo({top:this.lastViewerContainerScrollTop/this.lastViewerHeight*t})}if(0!==this.lastViewerWidth&&0!==this.lastViewerContainerScrollLeft){var h=document.getElementById("viewer").scrollWidth;document.getElementById("viewerContainer").scrollTo({left:this.lastViewerContainerScrollLeft/this.lastViewerWidth*h})}this.eventBus.dispatch("viewportchanging",{source:this})}},{key:"initDiv",value:function(){var A=this.viewer;this._pages=[],this.emptyNode(A);var I=this;A.addEventListener("click",(function(){I.eventBus.dispatch("pageViewerClick",{source:I})}));for(var g=0;g<this.pageCount;++g){var B=document.createElement("div");B.classList.add("page"),B.id="page_"+g;var C=this.coreHelper.pageRenderWidth(0,g,this.core),Q=this.coreHelper.pageRenderHeight(0,g,this.core);B.style.width=C+"px",B.style.height=Q+"px",B.style.overflow="hidden",B.style.position="relative";var E=document.createElement("div");B.style.width=C+"px",B.style.height=Q+"px",0;var i=new G.Ofd_Core_Helper,o=i.pageRenderWidth(0,g,this.core),D=i.pageRenderHeight(0,g,this.core);E.style.width=o+"px",E.style.height=D+"px",E.style.overflow="hidden",E.style.transform="translate(".concat((C-o)/2,"px, ").concat((Q-D)/2,"px) scale(").concat(this._currentScale,")"),B.appendChild(E),A.appendChild(B),0===g&&E.appendChild(this.initLoadingImg());var t={width:C,height:Q,scale:this._currentScale};this._pages.push({div:B,viewport:t,id:g+1,renderingState:s.RenderingStates.INITIAL,scale:this._currentScale,width:C,height:Q})}this.jumpPage({pageIndex:this.currentPage})}},{key:"currentPageNumber",get:function(){return this.currentPage}},{key:"_setCurrentPageNumber",value:function(A){if(this.currentPage===A)return!0;if(!(0<A&&A<=this.pageCount))return!1;var I=this.currentPage;return this.currentPage=A,this.eventBus.dispatch("pagechanging",{source:this,pageNumber:A,pageLabel:null,previous:I}),!0}},{key:"setRotation",value:function(A){A+=this._pagesRotation,Object(s.isValidRotation)(A),(A%=360)<0&&(A+=360),this._pagesRotation!==A&&this.core&&(this._pagesRotation=A,this.reformDiv(this._pagesRotation,!0),this.updateView())}},{key:"increaseScale",value:function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,I=this._currentScale;do{I=(I*s.DEFAULT_SCALE_DELTA).toFixed(2),I=Math.ceil(10*I)/10,I=Math.min(s.MAX_SCALE,I)}while(--A>0&&I<s.MAX_SCALE);this._setScale(I)}},{key:"decreaseScale",value:function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,I=this._currentScale;do{I=(I/s.DEFAULT_SCALE_DELTA).toFixed(2),I=Math.floor(10*I)/10,I=Math.max(s.MIN_SCALE,I)}while(--A>0&&I>s.MIN_SCALE);this._setScale(I)}},{key:"zoom",value:function(A){this._setScale(A)}},{key:"_setScale",value:function(A){var I=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.lastViewerHeight=document.getElementById("viewer").scrollHeight,this.lastViewerWidth=document.getElementById("viewer").scrollWidth,this.lastViewerContainerScrollTop=document.getElementById("viewerContainer").scrollTop,this.lastViewerContainerScrollLeft=document.getElementById("viewerContainer").scrollLeft;var g=parseFloat(A);if(g>0)this._setScaleUpdatePages(g,A,I,!1);else{var B=this._pages[0];if(!B)return;var C=s.SCROLLBAR_PADDING,Q=s.VERTICAL_PADDING,E=(this.container.clientWidth-C)/B.width*B.scale/1,i=(this.container.clientHeight-Q)/B.height*B.scale;switch(A){case"page-actual":g=1;break;case"page-width":g=E;break;case"page-height":g=i;break;case"page-fit":g=Math.min(E,i);break;case"auto":var o=Object(s.isPortraitOrientation)(B)?E:Math.min(i,E);g=Math.min(s.MAX_AUTO_SCALE,o);break;default:return}this._setScaleUpdatePages(g,A,I,!0)}}},{key:"isSameScale",value:function(A){return A===this._currentScale||Math.abs(A-this._currentScale)<1e-15}},{key:"ensurePageViewVisible",value:function(){if(this._scrollMode!==s.ScrollMode.PAGE)throw new Error("#ensurePageViewVisible: Invalid scrollMode value.");var A=this.currentPageNumber,I=this.scrollModePageState,g=this.viewer;if(g.textContent="",I.pages.length=0,this._spreadMode===s.SpreadMode.NONE){var B=this._pages[A-1];B.renderingState===s.RenderingStates.INITIAL&&this.forceRendering(B),g.appendChild(B.div)}else{var C=new Set,Q=this._spreadMode-1;A%2!==Q?(C.add(A-1),C.add(A)):(C.add(A-2),C.add(A-1));var E,i=null,o=y(C);try{for(o.s();!(E=o.n()).done;){var D=E.value,t=this._pages[D];t&&(null===i?((i=document.createElement("div")).className="spread",g.appendChild(i)):D%2===Q&&(i=i.cloneNode(!1),g.appendChild(i)),i.appendChild(t.div))}}catch(A){o.e(A)}finally{o.f()}}I.scrollDown=A>=I.previousPageNumber,I.previousPageNumber=A}},{key:"_setScaleUpdatePages",value:function(A,I){var g=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this._currentScaleValue=I.toString(),this.isSameScale(A)?g&&this.eventBus.dispatch("scalechanging",{source:this,scale:A,presetValue:I}):(this._currentScale=A,this.resetPageScale(),this.eventBus.dispatch("scalechanging",{source:this,scale:A,presetValue:g?I:void 0}))}},{key:"setSpreadMode",value:function(A){if(this._spreadMode!==A){if(!Object(s.isValidSpreadMode)(A))throw new Error("Invalid spread mode: ".concat(A));this._spreadMode=A,this.eventBus.dispatch("spreadmodechanged",{source:this,mode:A}),this._updateSpreadMode(this.currentPage)}}},{key:"_updateSpreadMode",value:function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,I=this._pages;if(this._scrollMode===s.ScrollMode.PAGE)this.ensurePageViewVisible();else if(this._spreadMode===s.SpreadMode.NONE){this.viewer.textContent="";for(var g=0,B=I.length;g<B;++g)this.viewer.appendChild(I[g].div)}else{this.viewer.textContent="";for(var C=this._spreadMode-1,Q=null,E=0,i=I.length;E<i;++E)null===Q?((Q=document.createElement("div")).className="spread",this.viewer.appendChild(Q)):E%2===C&&(Q=Q.cloneNode(!1),this.viewer.appendChild(Q)),Q.appendChild(I[E].div)}A&&(this._currentScale&&isNaN(this._currentScale)&&this._setScale(this._currentScale,!0),this._setCurrentPageNumber(A,!0),this.updateView())}},{key:"setScrollMode",value:function(A){if(this._scrollMode!==A){if(!Object(s.isValidScrollMode)(A))throw new Error("Invalid scroll mode: ".concat(A));this.pageCount>15e3||(this._previousScrollMode=this._scrollMode,this._scrollMode=A,this.eventBus.dispatch("scrollmodechanged",{source:this,mode:A}),this._updateScrollMode(this.currentPage))}}},{key:"_updateScrollMode",value:function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,I=this._scrollMode;this.viewer.classList.toggle("scrollHorizontal",I===s.ScrollMode.HORIZONTAL),this.viewer.classList.toggle("scrollWrapped",I===s.ScrollMode.WRAPPED),this.core&&(I===s.ScrollMode.PAGE?this.ensurePageViewVisible():this._previousScrollMode===s.ScrollMode.PAGE&&this._updateSpreadMode(),this._currentScale&&isNaN(this._currentScale)&&this._setScale(this._currentScale,!0),this._setCurrentPageNumber(A,!0),this.updateView())}},{key:"firstPage",value:function(){this._scrollMode===s.ScrollMode.PAGE?(this._setCurrentPageNumber(1),this.ensurePageViewVisible()):this.viewer.children.item(0).scrollIntoView(!0);return!0}},{key:"lastPage",value:function(){this._scrollMode===s.ScrollMode.PAGE?(this._setCurrentPageNumber(this.pageCount),this.ensurePageViewVisible()):this.viewer.children.item(this.pageCount-1).scrollIntoView(!0);return!0}},{key:"nextPage",value:function(){var A=this.currentPage;if(A>=this.pageCount)return!1;this._scrollMode===s.ScrollMode.PAGE?(this._setCurrentPageNumber(A+1),this.ensurePageViewVisible()):this.viewer.children.item(A).scrollIntoView(!0);return!0}},{key:"previousPage",value:function(){var A=this.currentPage;if(A<=1)return!1;this._scrollMode===s.ScrollMode.PAGE?(this._setCurrentPageNumber(A-1),this.ensurePageViewVisible()):this.viewer.children.item(A-2).scrollIntoView(!0);return!0}},{key:"jumpPage",value:function(A){(this.jumpPageEvt=A,this._scrollMode===s.ScrollMode.PAGE)?(A.pageIndex&&this._setCurrentPageNumber(A.pageIndex),this.ensurePageViewVisible()):(this.viewer.children.item(A.pageIndex-1).scrollIntoView(!0),this.highLightEle())}},{key:"freeDocument",value:function(){this.currentPage=1,this.pageCount=0,this._pages=[],this.emptyNode(this.viewer)}},{key:"initLoadingImg",value:function(){var A=new Image;return A.style.position="absolute",A.style.left=0,A.style.right=0,A.style.margin="auto",A.style.top=0,A.style.bottom=0,A.src="data:image/gif;base64,R0lGODlhNgA3APMAAP///zAyOJKTlkdJTzw+RN/g4XV2euPj5M/Q0WtscaChpDAyODAyODAyODAyODAyOCH5BAkKAAAAIf4aQ3JlYXRlZCB3aXRoIGFqYXhsb2FkLmluZm8AIf8LTkVUU0NBUEUyLjADAQAAACwAAAAANgA3AAAEzBDISau9OOvNu/9gKI5kaZ4lkhBEgqCnws6EApMITb93uOqsRC8EpA1Bxdnx8wMKl51ckXcsGFiGAkamsy0LA9pAe1EFqRbBYCAYXXUGk4DWJhZN4dlAlMSLRW80cSVzM3UgB3ksAwcnamwkB28GjVCWl5iZmpucnZ4cj4eWoRqFLKJHpgSoFIoEe5ausBeyl7UYqqw9uaVrukOkn8LDxMXGx8ibwY6+JLxydCO3JdMg1dJ/Is+E0SPLcs3Jnt/F28XXw+jC5uXh4u89EQAh+QQJCgAAACwAAAAANgA3AAAEzhDISau9OOvNu/9gKI5kaZ5oqhYGQRiFWhaD6w6xLLa2a+iiXg8YEtqIIF7vh/QcarbB4YJIuBKIpuTAM0wtCqNiJBgMBCaE0ZUFCXpoknWdCEFvpfURdCcM8noEIW82cSNzRnWDZoYjamttWhphQmOSHFVXkZecnZ6foKFujJdlZxqELo1AqQSrFH1/TbEZtLM9shetrzK7qKSSpryixMXGx8jJyifCKc1kcMzRIrYl1Xy4J9cfvibdIs/MwMue4cffxtvE6qLoxubk8ScRACH5BAkKAAAALAAAAAA2ADcAAATOEMhJq7046827/2AojmRpnmiqrqwwDAJbCkRNxLI42MSQ6zzfD0Sz4YYfFwyZKxhqhgJJeSQVdraBNFSsVUVPHsEAzJrEtnJNSELXRN2bKcwjw19f0QG7PjA7B2EGfn+FhoeIiYoSCAk1CQiLFQpoChlUQwhuBJEWcXkpjm4JF3w9P5tvFqZsLKkEF58/omiksXiZm52SlGKWkhONj7vAxcbHyMkTmCjMcDygRNAjrCfVaqcm11zTJrIjzt64yojhxd/G28XqwOjG5uTxJhEAIfkECQoAAAAsAAAAADYANwAABM0QyEmrvTjrzbv/YCiOZGmeaKqurDAMAlsKRE3EsjjYxJDrPN8PRLPhhh8XDMk0KY/OF5TIm4qKNWtnZxOWuDUvCNw7kcXJ6gl7Iz1T76Z8Tq/b7/i8qmCoGQoacT8FZ4AXbFopfTwEBhhnQ4w2j0GRkgQYiEOLPI6ZUkgHZwd6EweLBqSlq6ytricICTUJCKwKkgojgiMIlwS1VEYlspcJIZAkvjXHlcnKIZokxJLG0KAlvZfAebeMuUi7FbGz2z/Rq8jozavn7Nev8CsRACH5BAkKAAAALAAAAAA2ADcAAATLEMhJq7046827/2AojmRpnmiqrqwwDAJbCkRNxLI42MSQ6zzfD0Sz4YYfFwzJNCmPzheUyJuKijVrZ2cTlrg1LwjcO5HFyeoJeyM9U++mfE6v2+/4PD6O5F/YWiqAGWdIhRiHP4kWg0ONGH4/kXqUlZaXmJlMBQY1BgVuUicFZ6AhjyOdPAQGQF0mqzauYbCxBFdqJao8rVeiGQgJNQkIFwdnB0MKsQrGqgbJPwi2BMV5wrYJetQ129x62LHaedO21nnLq82VwcPnIhEAIfkECQoAAAAsAAAAADYANwAABMwQyEmrvTjrzbv/YCiOZGmeaKqurDAMAlsKRE3EsjjYxJDrPN8PRLPhhh8XDMk0KY/OF5TIm4qKNWtnZxOWuDUvCNw7kcXJ6gl7Iz1T76Z8Tq/b7/g8Po7kX9haKoAZZ0iFGIc/iRaDQ40Yfj+RepSVlpeYAAgJNQkIlgo8NQqUCKI2nzNSIpynBAkzaiCuNl9BIbQ1tl0hraewbrIfpq6pbqsioaKkFwUGNQYFSJudxhUFZ9KUz6IGlbTfrpXcPN6UB2cHlgfcBuqZKBEAIfkECQoAAAAsAAAAADYANwAABMwQyEmrvTjrzbv/YCiOZGmeaKqurDAMAlsKRE3EsjjYxJDrPN8PRLPhhh8XDMk0KY/OF5TIm4qKNWtnZxOWuDUvCNw7kcXJ6gl7Iz1T76Z8Tq/b7yJEopZA4CsKPDUKfxIIgjZ+P3EWe4gECYtqFo82P2cXlTWXQReOiJE5bFqHj4qiUhmBgoSFho59rrKztLVMBQY1BgWzBWe8UUsiuYIGTpMglSaYIcpfnSHEPMYzyB8HZwdrqSMHxAbath2MsqO0zLLorua05OLvJxEAIfkECQoAAAAsAAAAADYANwAABMwQyEmrvTjrzbv/YCiOZGmeaKqurDAMAlsKRE3EsjjYxJDrPN8PRLPhfohELYHQuGBDgIJXU0Q5CKqtOXsdP0otITHjfTtiW2lnE37StXUwFNaSScXaGZvm4r0jU1RWV1hhTIWJiouMjVcFBjUGBY4WBWw1A5RDT3sTkVQGnGYYaUOYPaVip3MXoDyiP3k3GAeoAwdRnRoHoAa5lcHCw8TFxscduyjKIrOeRKRAbSe3I9Um1yHOJ9sjzCbfyInhwt3E2cPo5dHF5OLvJREAOw==",A.draggable=!1,A}},{key:"setWaterText",value:function(A){this.ofdRender.coreHelper.setWaterText(A)}},{key:"setOfdCore",value:function(A){this.core=A,this.ofdRender.setOfdCore(this.core),this.ofdCanvasRender.setOfdCore(this.core),this._spreadMode=s.SpreadMode.NONE,this._scrollMode=s.ScrollMode.VERTICAL,this._pagesRotation=0,this.pageCount=this.core.getOFDPageCount(0),this.eventBus.dispatch("pagechanging",{source:this,pageNumber:1,pageLabel:null,previous:1}),this.viewer.scrollTo(0,0);var I=s.SCROLLBAR_PADDING,g=(s.VERTICAL_PADDING,this.container.clientWidth,new G.Ofd_Core_Helper(96)),B=(this.container.clientWidth-I)/g.pageRenderWidth(0,0,this.core)*1/1,C=Math.min(s.MAX_AUTO_SCALE,B);this.defaultScale!==s.DEFAULT_SCALE_VALUE&&(C=this.defaultScale),this._currentScale=C,this.coreHelper.setDpi(96*C),this.initDiv(0),this.updateView(),this.eventBus.dispatch("scalechanging",{source:this,scale:C,presetValue:this.defaultScale}),this.eventBus.dispatch("viewportchanging",{source:this}),this.scrollModePageState={previousPageNumber:1,scrollDown:!0,pages:[]}}}]),A}()},function(A,I){A.exports=function(A,I,g){return I in A?Object.defineProperty(A,I,{value:g,enumerable:!0,configurable:!0,writable:!0}):A[I]=g,A},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I,g){"use strict";g.r(I),g.d(I,"animationStarted",(function(){return j})),g.d(I,"apiPageLayoutToViewerModes",(function(){return P})),g.d(I,"apiPageModeToSidebarView",(function(){return _})),g.d(I,"approximateFraction",(function(){return u})),g.d(I,"AutoPrintRegExp",(function(){return k})),g.d(I,"backtrackBeforeAllVisibleElements",(function(){return b})),g.d(I,"binarySearchFirstItem",(function(){return f})),g.d(I,"DEFAULT_SCALE",(function(){return w})),g.d(I,"DEFAULT_SCALE_DELTA",(function(){return s})),g.d(I,"DEFAULT_SCALE_VALUE",(function(){return h})),g.d(I,"getActiveOrFocusedElement",(function(){return z})),g.d(I,"getPageSizeInches",(function(){return m})),g.d(I,"getVisibleElements",(function(){return Z})),g.d(I,"isPortraitOrientation",(function(){return T})),g.d(I,"isValidRotation",(function(){return V})),g.d(I,"isValidScrollMode",(function(){return v})),g.d(I,"isValidSpreadMode",(function(){return X})),g.d(I,"MAX_AUTO_SCALE",(function(){return G})),g.d(I,"MAX_SCALE",(function(){return e})),g.d(I,"MIN_SCALE",(function(){return a})),g.d(I,"noContextMenuHandler",(function(){return q})),g.d(I,"normalizeWheelEventDelta",(function(){return x})),g.d(I,"normalizeWheelEventDirection",(function(){return W})),g.d(I,"OutputScale",(function(){return Y})),g.d(I,"parseQueryString",(function(){return K})),g.d(I,"PresentationModeState",(function(){return R})),g.d(I,"ProgressBar",(function(){return O})),g.d(I,"removeNullCharacters",(function(){return l})),g.d(I,"RendererType",(function(){return N})),g.d(I,"RenderingStates",(function(){return n})),g.d(I,"roundToDivide",(function(){return p})),g.d(I,"SCROLLBAR_PADDING",(function(){return y})),g.d(I,"scrollIntoView",(function(){return d})),g.d(I,"ScrollMode",(function(){return U})),g.d(I,"SidebarView",(function(){return r})),g.d(I,"SpreadMode",(function(){return S})),g.d(I,"TextLayerMode",(function(){return M})),g.d(I,"UNKNOWN_SCALE",(function(){return c})),g.d(I,"VERTICAL_PADDING",(function(){return F})),g.d(I,"watchScroll",(function(){return H}));var B=g(21),C=g.n(B),Q=g(2),E=g.n(Q),i=g(1),o=g.n(i);function D(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return t(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return t(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function t(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var h="auto",w=1,s=1.1,a=.1,e=10,c=0,G=1.25,y=40,F=5,n={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3},R={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3},r={UNKNOWN:-1,NONE:0,THUMBS:1,OUTLINE:2,ATTACHMENTS:3,LAYERS:4,SIGNATURES:5},N={CANVAS:"canvas",SVG:"svg"},M={DISABLE:0,ENABLE:1,ENABLE_ENHANCE:2},U={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2,PAGE:3},S={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2},k=/\bprint\s*\(/,Y=function(){function A(){E()(this,A);var I=window.devicePixelRatio||1;this.sx=I,this.sy=I}return o()(A,[{key:"scaled",get:function(){return 1!==this.sx||1!==this.sy}}]),A}();function d(A,I){var g=arguments.length>2&&void 0!==arguments[2]&&arguments[2],B=A.offsetParent;if(B){for(var C=A.offsetTop+A.clientTop,Q=A.offsetLeft+A.clientLeft;B.clientHeight===B.scrollHeight&&B.clientWidth===B.scrollWidth||g&&(B.classList.contains("markedContent")||"hidden"===getComputedStyle(B).overflow);)if(C+=B.offsetTop,Q+=B.offsetLeft,!(B=B.offsetParent))return;I&&(void 0!==I.top&&(C+=I.top),void 0!==I.left&&(Q+=I.left,B.scrollLeft=Q)),B.scrollTop=C}}function H(A,I){var g=function(g){C||(C=window.requestAnimationFrame((function(){C=null;var g=A.scrollLeft,Q=B.lastX;g!==Q&&(B.right=g>Q),B.lastX=g;var E=A.scrollTop,i=B.lastY;E!==i&&(B.down=E>i),B.lastY=E,I(B)})))},B={right:!0,down:!0,lastX:A.scrollLeft,lastY:A.scrollTop,_eventHandler:g},C=null;return A.addEventListener("scroll",g,!0),B}function K(A){var I,g=new Map,B=D(new URLSearchParams(A));try{for(B.s();!(I=B.n()).done;){var Q=C()(I.value,2),E=Q[0],i=Q[1];g.set(E.toLowerCase(),i)}}catch(A){B.e(A)}finally{B.f()}return g}var J=/\x00/g,L=/[\x01-\x1F]/g;function l(A){var I=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"string"!=typeof A?A:(I&&(A=A.replace(L," ")),A.replace(J,""))}function f(A,I){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,B=g,C=A.length-1;if(C<0||!I(A[C]))return A.length;if(I(A[B]))return B;for(;B<C;){var Q=B+C>>1,E=A[Q];I(E)?C=Q:B=Q+1}return B}function u(A){if(Math.floor(A)===A)return[A,1];var I=1/A;if(I>8)return[1,8];if(Math.floor(I)===I)return[1,I];for(var g=A>1?I:A,B=0,C=1,Q=1,E=1;;){var i=B+Q,o=C+E;if(o>8)break;g<=i/o?(Q=i,E=o):(B=i,C=o)}return g-B/C<Q/E-g?g===A?[B,C]:[C,B]:g===A?[Q,E]:[E,Q]}function p(A,I){var g=A%I;return 0===g?A:Math.round(A-g+I)}function m(A){var I=A.view,g=A.userUnit,B=A.rotate,Q=C()(I,4),E=Q[0],i=Q[1],o=B%180!=0,D=(Q[2]-E)/72*g,t=(Q[3]-i)/72*g;return{width:o?t:D,height:o?D:t}}function b(A,I,g){if(A<2)return A;var B=I[A].div,C=B.offsetTop+B.clientTop;C>=g&&(C=(B=I[A-1].div).offsetTop+B.clientTop);for(var Q=A-2;Q>=0&&!((B=I[Q].div).offsetTop+B.clientTop+B.clientHeight<=C);--Q)A=Q;return A}function Z(A){var I=A.scrollEl,g=A.views,B=A.sortByVisibility,C=void 0!==B&&B,Q=A.horizontal,E=void 0!==Q&&Q,i=A.rtl,o=void 0!==i&&i,D=I.scrollTop,t=D+I.clientHeight,h=I.scrollLeft,w=h+I.clientWidth;var s=[],a=new Set,e=g.length,c=f(g,E?function(A){var I=A.div,g=I.offsetLeft+I.clientLeft,B=g+I.clientWidth;return o?g<w:B>h}:function(A){var I=A.div;return I.offsetTop+I.clientTop+I.clientHeight>D});c>0&&c<e&&!E&&(c=b(c,g,D));for(var G=E?w:-1,y=c;y<e;y++){var F=g[y],n=F.div,R=n.offsetLeft+n.clientLeft,r=n.offsetTop+n.clientTop,N=n.clientWidth,M=n.clientHeight,U=R+N,S=r+M;if(-1===G)S>=t&&(G=S);else if((E?R:r)>G)break;if(!(S<=D||r>=t||U<=h||R>=w)){var k=Math.max(0,D-r)+Math.max(0,S-t),Y=(N-(Math.max(0,h-R)+Math.max(0,U-w)))/N,d=(M-k)/M*Y*100|0;s.push({id:F.id,x:R,y:r,view:F,percent:d,widthPercent:100*Y|0}),a.add(F.id)}}var H=s[0],K=s[s.length-1];return C&&s.sort((function(A,I){var g=A.percent-I.percent;return Math.abs(g)>.001?-g:A.id-I.id})),{first:H,last:K,views:s,ids:a}}function q(A){A.preventDefault()}function W(A){var I=Math.hypot(A.deltaX,A.deltaY),g=Math.atan2(A.deltaY,A.deltaX);return-.25*Math.PI<g&&g<.75*Math.PI&&(I=-I),I}function x(A){var I=W(A);return 0===A.deltaMode?I/=900:1===A.deltaMode&&(I/=30),I}function V(A){return Number.isInteger(A)&&A%90==0}function v(A){return Number.isInteger(A)&&Object.values(U).includes(A)&&A!==U.UNKNOWN}function X(A){return Number.isInteger(A)&&Object.values(S).includes(A)&&A!==S.UNKNOWN}function T(A){return A.width<=A.height}var j=new Promise((function(A){"undefined"!=typeof PDFJSDev&&PDFJSDev.test("LIB")&&"undefined"==typeof window?setTimeout(A,20):window.requestAnimationFrame(A)}));var O=function(){function A(I){var g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},B=g.height,C=g.width,Q=g.units;E()(this,A),this.visible=!0,this.div=document.querySelector(I+" .progress"),this.bar=this.div.parentNode,this.height=B||100,this.width=C||100,this.units=Q||"%",this.div.style.height=this.height+this.units,this.percent=0}return o()(A,[{key:"_updateBar",value:function(){if(this._indeterminate)return this.div.classList.add("indeterminate"),void(this.div.style.width=this.width+this.units);this.div.classList.remove("indeterminate");var A=this.width*this._percent/100;this.div.style.width=A+this.units}},{key:"percent",get:function(){return this._percent},set:function(A){var I,g,B;this._indeterminate=isNaN(A),this._percent=(I=A,g=0,B=100,Math.min(Math.max(I,g),B)),this._updateBar()}},{key:"setWidth",value:function(A){if(A){var I=A.parentNode.offsetWidth-A.offsetWidth;if(I>0)document.documentElement.style.setProperty("--loadingBar-end-offset","".concat(I,"px"))}}},{key:"hide",value:function(){this.visible&&(this.visible=!1,this.bar.classList.add("hidden"))}},{key:"show",value:function(){this.visible||(this.visible=!0,this.bar.classList.remove("hidden"))}}]),A}();function z(){for(var A=document,I=A.activeElement||A.querySelector(":focus");I&&I.shadowRoot;)I=(A=I.shadowRoot).activeElement||A.querySelector(":focus");return I}function P(A){var I=U.VERTICAL,g=S.NONE;switch(A){case"SinglePage":I=U.PAGE;break;case"OneColumn":break;case"TwoPageLeft":I=U.PAGE;case"TwoColumnLeft":g=S.ODD;break;case"TwoPageRight":I=U.PAGE;case"TwoColumnRight":g=S.EVEN}return{scrollMode:I,spreadMode:g}}function _(A){switch(A){case"UseNone":return r.NONE;case"UseThumbs":return r.THUMBS;case"UseOutlines":return r.OUTLINE;case"UseAttachments":return r.ATTACHMENTS;case"UseOC":return r.LAYERS}return r.NONE}},function(A,I,g){var B=g(22),C=g(23),Q=g(24),E=g(26);A.exports=function(A,I){return B(A)||C(A,I)||Q(A,I)||E()},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I){A.exports=function(A){if(Array.isArray(A))return A},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I){A.exports=function(A,I){var g=null==A?null:"undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(null!=g){var B,C,Q=[],E=!0,i=!1;try{for(g=g.call(A);!(E=(B=g.next()).done)&&(Q.push(B.value),!I||Q.length!==I);E=!0);}catch(A){i=!0,C=A}finally{try{E||null==g.return||g.return()}finally{if(i)throw C}}return Q}},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I,g){var B=g(25);A.exports=function(A,I){if(A){if("string"==typeof A)return B(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);return"Object"===g&&A.constructor&&(g=A.constructor.name),"Map"===g||"Set"===g?Array.from(A):"Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?B(A,I):void 0}},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I){A.exports=function(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I){A.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},A.exports.__esModule=!0,A.exports.default=A.exports},function(A,I,g){"use strict";g.r(I),g.d(I,"getHighestPriority",(function(){return C}));var B=g(20);function C(A,I,g){var B=arguments.length>3&&void 0!==arguments[3]&&arguments[3],C=A.views,E=C.length;if(0===E)return null;for(var i=0;i<E;i++){var o=C[i].view;if(!Q(o))return o}var D=A.first.id,t=A.last.id;if(t-D+1>E)for(var h=A.ids,w=1,s=t-D;w<s;w++){var a=g?D+w:t-w;if(!h.has(a)){var e=I[a-1];if(!Q(e))return e}}var c=g?t:D-2,G=I[c];return G&&!Q(G)||B&&(G=I[c+=g?1:-1])&&!Q(G)?G:null}function Q(A){return A.renderingState===B.RenderingStates.FINISHED}},function(A,I,g){"use strict";g.r(I),g.d(I,"Ofd_Render",(function(){return c}));var B=g(3),C=g.n(B),Q=g(2),E=g.n(Q),i=g(1),o=g.n(i),D=g(4),t=g.n(D),h=g(29),w=g(30),s=g(33);g(34);function a(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return e(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return e(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function e(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var c=function(){function A(I,g){E()(this,A),this.core=I,this.coreHelper=g,this.mixBlendMode="darken"}var I,g,B;return o()(A,[{key:"setDpi",value:function(A){this.coreHelper.setDpi(A)}},{key:"setOfdCore",value:function(A){this.core=A}},{key:"setMixBlendMode",value:function(A){this.mixBlendMode=A}},{key:"renderPage",value:(B=C()(t.a.mark((function A(I,g,B,C){var Q,E,i,o,D,w,e,c,G,y,F,n,R,r,N,M,U,S,k,Y,d,H,K,J,L,l,f,u,p,m,b,Z,q,W,x,V,v,X,T,j,O,z,P,_,$,AA,IA,gA,BA;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(Q=C?C.readOfdDocument(g):this.core.readOfdDocument(g),E=C?C.readOfdPage(g,B):this.core.readOfdPage(g,B),this.coreHelper.waterText&&I.appendChild(this.watermark({watermark_txt:this.coreHelper.waterText})),i=E.Page.Template,o=Q.Annotations?Q.Annotations:[],D=C?C.readOfdTemplatePage(g):this.core.readOfdTemplatePage(g),w=Q.Signatures?Q.Signatures.Signature:[],e=Q.CommonData.Res.Fonts,c=Q.CommonData.Res.DrawParams,Q.CommonData.Res.ColorSpaces,G=Q.CommonData.Res.CompositeGraphicUnits,y=Q.CommonData.Res.MultiMedias,!i){A.next=47;break}F=a(i),A.prev=14,F.s();case 16:if((n=F.n()).done){A.next=39;break}R=n.value,r=a(D),A.prev=19,r.s();case 21:if((N=r.n()).done){A.next=29;break}if((M=N.value).ID!=R.TemplateID){A.next=27;break}if((M=C?C.readPageFromTemplate(M):this.core.readPageFromTemplate(M)).Page.Content){U=M.Page.Content.Layer,S=a(U);try{for(S.s();!(k=S.n()).done;)Y=k.value,this.renderLayer(B,I,e,c,y,G,Y,!1)}catch(A){S.e(A)}finally{S.f()}}return A.abrupt("break",29);case 27:A.next=21;break;case 29:A.next=34;break;case 31:A.prev=31,A.t0=A.catch(19),r.e(A.t0);case 34:return A.prev=34,r.f(),A.finish(34);case 37:A.next=16;break;case 39:A.next=44;break;case 41:A.prev=41,A.t1=A.catch(14),F.e(A.t1);case 44:return A.prev=44,F.f(),A.finish(44);case 47:if(E.Page.Content){d=E.Page.Content.Layer,H=a(d);try{for(H.s();!(K=H.n()).done;)J=K.value,this.renderLayer(B,I,e,c,y,G,J,!1)}catch(A){H.e(A)}finally{H.f()}}L=a(o),A.prev=49,L.s();case 51:if((l=L.n()).done){A.next=59;break}if(f=l.value,E.ID!=f.PageID){A.next=57;break}u=a(f.PageAnnot.Annot);try{for(u.s();!(p=u.n()).done;)m=p.value,this.renderAnnotation(I,m,e,c,y,G,B)}catch(A){u.e(A)}finally{u.f()}return A.abrupt("break",59);case 57:A.next=51;break;case 59:A.next=64;break;case 61:A.prev=61,A.t2=A.catch(49),L.e(A.t2);case 64:return A.prev=64,L.f(),A.finish(64);case 67:b=a(w),A.prev=68,b.s();case 70:if((Z=b.n()).done){A.next=105;break}q=Z.value,W=a(q.Signature.SignedInfo.StampAnnot),A.prev=73,W.s();case 75:if((x=W.n()).done){A.next=95;break}if(V=x.value,v=V.PageRef,E.ID!=v){A.next=93;break}if(X=V.Boundary,!(q.Signature.PicType&&q.Signature.PicType.length>0)){A.next=93;break}if("ofd"!==q.Signature.PicType){A.next=92;break}T=new s.Ofd_Core(q.Signature.ofd),j=0;case 84:if(!(j<T.getOFDPageCount(0))){A.next=90;break}return A.next=87,this.renderSealPage(I,j,T,!0,X,v,V.ID,B);case 87:j++,A.next=84;break;case 90:A.next=93;break;case 92:"svg"===q.Signature.PicType?(O=Object(h.converterBox)(X,this.coreHelper.dpi),(z=document.createElement("div")).innerHTML=q.Signature.svg,P=void 0,_=z.children[0].width.baseVal.value,$=z.children[0].height.baseVal.value,_!==O.w&&(P="transform-origin: 0px 0px; transform: scale(".concat(O.h/$<O.w/_?O.h/$:O.w/_,")")),z.setAttribute("style","".concat(P,"; position:absolute; left: ",0,"px; top: ",0,"px; width: ").concat(O.w,"px; height: ").concat(O.h,"px;")),(AA=document.createElement("div")).setAttribute("style","mix-blend-mode:".concat(this.mixBlendMode,";cursor: pointer;position:absolute; left: ").concat(O.x,"px; top: ").concat(O.y,"px; width: ").concat(O.w,"px; height: ").concat(O.h,"px;overflow:hidden")),AA.setAttribute("name","seal_img_div_".concat(B)),AA.setAttribute("data-signature-id",V.ID),AA.setAttribute("data-page-ref",v),AA.appendChild(z),I.appendChild(AA)):(IA=Object(h.converterBox)(X,this.coreHelper.dpi),gA="data:image/".concat(q.Signature.PicType,";base64,").concat(q.Signature.PicValue),(BA=this.renderImageOnDiv(B,I.style.width,I.style.height,gA,IA.w,IA.h,IA,V.Clip,!0,v,V.ID)).svg.setAttribute("style","".concat(BA.style,"left:").concat(BA.left,"px;top:").concat(BA.top,"px;mix-blend-mode:").concat(this.mixBlendMode)),q.Signature.PicType||BA.svg.removeChild(BA.svg.children[0]),I.appendChild(BA.svg));case 93:A.next=75;break;case 95:A.next=100;break;case 97:A.prev=97,A.t3=A.catch(73),W.e(A.t3);case 100:return A.prev=100,W.f(),A.finish(100);case 103:A.next=70;break;case 105:A.next=110;break;case 107:A.prev=107,A.t4=A.catch(68),b.e(A.t4);case 110:return A.prev=110,b.f(),A.finish(110);case 113:case"end":return A.stop()}}),A,this,[[14,41,44,47],[19,31,34,37],[49,61,64,67],[68,107,110,113],[73,97,100,103]])}))),function(A,I,g,C){return B.apply(this,arguments)})},{key:"throwWhite",value:(g=C()(t.a.mark((function A(I){return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",new Promise((function(A,g){var B=new Image;B.onload=function(){var I=B.width,g=B.height,C=document.createElement("canvas");C.style.width="".concat(I,"px"),C.style.height="".concat(g,"px"),C.width=I,C.height=g;var Q=C.getContext("2d");Q.drawImage(B,0,0,I,g);for(var E=Q.getImageData(0,0,I,g),i=E.data,o=0;o<i.length;o+=4)[i[o],i[o+1],i[o+2]].every((function(A){return A<256&&A>245}))&&(i[o+3]=0);Q.putImageData(E,0,0),A(C.toDataURL())},B.src=I})));case 1:case"end":return A.stop()}}),A)}))),function(A){return g.apply(this,arguments)})},{key:"renderAnnotation",value:function(A,I,g,B,C,Q,E){var i=document.createElement("div");i.setAttribute("style","overflow: hidden;;position:relative;");var o=I.Appearance.Boundary;if(o){var D=Object(h.converterBox)(o,this.coreHelper.dpi);i.setAttribute("style","mix-blend-mode:".concat(this.mixBlendMode,";overflow: visible;position:absolute; left: ").concat(D.x,"px; top: ").concat(D.y,"px; width: ").concat(D.w,"px; height: ").concat(D.h,"px"))}else i.setAttribute("style","mix-blend-mode:".concat(this.mixBlendMode,";overflow: visible;position:absolute; left: 0px; top: 0px; width: 1px; height: 1px"));var t=I.Appearance;this.renderLayer(E,i,g,B,C,Q,t,!1),A.appendChild(i)}},{key:"renderSealPage",value:(I=C()(t.a.mark((function A(I,g,B,C,Q,E,i,o){var D,w,s,a,e,c;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return D=Q,(s={x:0,y:0,w:B.pageWidth(0,g),h:B.pageHeight(0,g)}).w!==D.w&&(w="transform-origin: 0px 0px; transform: scale(".concat(D.h/s.h<D.w/s.w?D.h/s.h:D.w/s.w,")")),a=Object(h.converterBox)(D,this.coreHelper.dpi),(e=document.createElement("div")).setAttribute("name","seal_img_div_".concat(o)),e.setAttribute("style","".concat(w,";cursor: pointer; position:absolute; left: ",0,"px; top: ",0,"px; width: ").concat(a.w,"px; height: ").concat(a.h,"px;")),e.setAttribute("data-signature-id",i),e.setAttribute("data-page-ref",E),A.next=12,this.renderPage(e,0,g,B);case 12:(c=document.createElement("div")).setAttribute("style","mix-blend-mode:".concat(this.mixBlendMode,";position:absolute; left: ").concat(a.x,"px; top: ").concat(a.y,"px; width: ").concat(a.w,"px; height: ").concat(a.h,"px;overflow:hidden")),c.appendChild(e),I.appendChild(c);case 16:case"end":return A.stop()}}),A,this)}))),function(A,g,B,C,Q,E,i,o){return I.apply(this,arguments)})},{key:"renderLayer",value:function(A,I,g,B,C,Q,E,i,o,D,t){var w=null,s=null,e=Object(h.converterDpi)(.353,this.coreHelper.dpi),c=E.DrawParam;if(c&&Object(h.getDrawParam)(B,c)){var G=Object(h.getDrawParam)(B,c);Object(h.getDrawParam)(B,G.Relative)&&(G=Object(h.getDrawParam)(B,G.Relative)),G.FillColor&&(w=Object(h.parseColor)(G.FillColor.Value)),G.StrokeColor&&(s=Object(h.parseColor)(G.StrokeColor.Value)),G.LineWidth&&(e=Object(h.converterDpi)(G.LineWidth,this.coreHelper.dpi))}var y=E.PageBlock;if(y){var F,n=a(y);try{for(n.s();!(F=n.n()).done;){var R=F.value;if("ImageObject"==R.Type){var r=this.renderImageObject(A,I.style.width,I.style.height,C,R,i,D,t);r&&(r.svg.setAttribute("style","".concat(r.style,"left:").concat(r.left,"px;top:").concat(r.top,"px;")),I.appendChild(r.svg))}else if("PathObject"==R.Type){var N=this.renderPathObject(A,B,R,w,s,e,i,o,D,t,C,g);N.style&&(N.svg.setAttribute("style","".concat(N.style,"left:").concat(N.left,"px;top:").concat(N.top,"px;")),I.appendChild(N.svg))}else if("TextObject"==R.Type){var M=this.renderTextObject(I,g,R,w,s,B,o,D,t);M.childElementCount>0&&I.appendChild(M)}else if("CompositeObject"==R.Type){var U,S=a(Q);try{for(S.s();!(U=S.n()).done;){var k=U.value;if(k.ID===R.ResourceID){var Y=R.Alpha,d=R.Boundary,H=R.CTM;this.renderLayer(A,I,g,B,C,Q,k,!1,Y,d,H);break}}}catch(A){S.e(A)}finally{S.f()}}}}catch(A){n.e(A)}finally{n.f()}}}},{key:"renderImageObject",value:function(A,I,g,B,C,Q,E,i){var o=C.Boundary;o=Object(h.converterBox)(o,this.coreHelper.dpi);var D=C.ResourceID;if(!D)return null;var t=Object(h.getMultiMedia)(B,D);if(!t.MediaFile)return null;if(!(t.width>0||t.height>0)&&t.MediaFile){var s=Object(w.JSGetImageInfoByPath)(this.core.ofdParserPtr,t.MediaFile,t.MediaFileResPln,this.core.getDocPln(0));if("other"===s.ext)return null;t.width=s.width,t.height=s.height,t.FileBase64=s.fileBase64}var a=C.CTM,e=C.Clips,c=C.BlendMode,G=C.Alpha;return this.renderImageOnDiv(A,I,g,t.FileBase64,t.width,t.height,o,!1,Q,null,null,a,E,i,e,C.ID,c,G)}},{key:"renderImageOnDiv",value:function(A,I,g,B,C,Q,E,i,o,D,t,w,s,e,c,G,y,F){var n=parseFloat(I.replace("px","")),R=parseFloat(g.replace("px","")),r=E.w>n?n:E.w,N=E.h>R?R:E.h,M=document.createElementNS("http://www.w3.org/2000/svg","svg"),U=document.createElementNS("http://www.w3.org/2000/svg","image"),S="";o&&(S="cursor: pointer;",M.setAttribute("viewbox","0 0 ".concat(r," ").concat(N)),M.setAttribute("name","seal_img_div_".concat(A)),M.setAttribute("data-signature-id",t),M.setAttribute("data-page-ref",D),U.setAttribute("preserveAspectRatio","none slice"));var k=C,Y=Q;U.setAttribute("xlink:href",B),U.href.baseVal=B,U.setAttribute("width","".concat(k,"px")),U.setAttribute("height","".concat(Y,"px")),F&&U.setAttribute("opacity","".concat(F/255));var d="";w&&(d="matrix(".concat(w.a/k/Object(h.ctmImageScale)(this.coreHelper.dpi)," ").concat(w.b/k/Object(h.ctmImageScale)(this.coreHelper.dpi)," ").concat(w.c/Y/Object(h.ctmImageScale)(this.coreHelper.dpi)," ").concat(w.d/Y/Object(h.ctmImageScale)(this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(w.e,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(w.f,this.coreHelper.dpi),")")),e&&(d="".concat(d," matrix(").concat(e.a," ").concat(e.b," ").concat(e.c," ").concat(e.d," ").concat(Object(h.converterDpi)(e.e,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(e.f,this.coreHelper.dpi),")")),U.setAttribute("transform",d);var H="";i&&(i=Object(h.converterBox)(i,this.coreHelper.dpi),H="clip: rect(".concat(i.y,"px, ").concat(i.w+i.x,"px, ").concat(i.h+i.y,"px, ").concat(i.x,"px)"));var K=!1;if(c&&c.length>0)for(var J=0;J<c.length;J++){var L=document.createElementNS("http://www.w3.org/2000/svg","clipPath");L.setAttribute("id","image-clip-path-".concat(G,"-").concat(J));for(var l=c[J].Clip,f=0;f<l.length;f++){var u=l[f].Area;K=!0;var p=0,m=0;u.Path.Boundary&&(p=u.Path.Boundary.x,m=u.Path.Boundary.y);var b=document.createElementNS("http://www.w3.org/2000/svg","path");if(u.CTM)w=u.CTM;else if(w&&0==w.b&&0==w.c){var Z="matrix(".concat(w.a," ").concat(w.b," ").concat(w.c," ").concat(w.d," ").concat(Object(h.converterDpi)(w.e,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(w.f,this.coreHelper.dpi),")");b.setAttribute("transform",Z)}var q,W="",x=a(u.Path.AbbreviatedData);try{for(x.s();!(q=x.n()).done;){var V=q.value;"M"===V.cmd||"S"===V.cmd?W+="M ".concat(Object(h.converterDpi)(V.crds[0]+p,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[1]+m,this.coreHelper.dpi)," "):"L"===V.cmd?W+="L ".concat(Object(h.converterDpi)(V.crds[0]+p,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[1]+m,this.coreHelper.dpi)," "):"B"===V.cmd?W+="C ".concat(Object(h.converterDpi)(V.crds[0]+p,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[1]+m,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[2]+p,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[3]+m,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[4]+p,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[5]+m,this.coreHelper.dpi)," "):"Q"===V.cmd?W+="Q ".concat(Object(h.converterDpi)(V.crds[0]+p,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[1]+m,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[2]+p,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[3]+m,this.coreHelper.dpi)," "):"A"===V.cmd?W+="A ".concat(Object(h.converterDpi)(V.crds[0],this.coreHelper.dpi),",").concat(Object(h.converterDpi)(V.crds[1],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[2],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[3],this.coreHelper.dpi),",").concat(Object(h.converterDpi)(V.crds[4],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(V.crds[5],this.coreHelper.dpi),",").concat(Object(h.converterDpi)(V.crds[6],this.coreHelper.dpi)):"C"===V.cmd&&(W+="Z")}}catch(A){x.e(A)}finally{x.f()}b.setAttribute("d",W),L.appendChild(b)}M.appendChild(L)}M.appendChild(U);var v,X=E.x,T=E.y;if(e){var j=e.a,O=e.b,z=e.c,P=e.d,_=j>0?Math.sign(j)*Math.sqrt(j*j+z*z):Math.sqrt(j*j+z*z),$=P>0?Math.sign(P)*Math.sqrt(O*O+P*P):Math.sqrt(O*O+P*P);0==Math.atan2(-O,P)&&0!=j&&1==P||(T*=$,X*=_)}return K&&M.setAttribute("clip-path","url(#image-clip-path-".concat(G,"-0)")),y&&(v="mix-blend-mode: ".concat(y)),{svg:M,style:"".concat(S,"overflow: visible; position: absolute; width: ").concat(r,"px; height: ").concat(N,"px; ").concat(H,";").concat(v,";"),left:X,top:T}}},{key:"renderTextObject",value:function(A,I,g,B,C,Q,E,i,o){var D=1,t=g.Boundary;t=Object(h.converterBox)(t,this.coreHelper.dpi);var s=g.CTM,e=g.HScale,c=g.Font,G=g.Weight,y=g.Alpha/255,F=g.Size>0;s&&!F&&(s={a:-s.a,b:s.b,c:s.c,d:-s.d,e:-s.e,f:-s.f});var n=Object(h.converterDpi)(Math.abs(parseFloat(g.Size)),this.coreHelper.dpi),R=Object(h.calTextPoint)(this.coreHelper.dpi,g.TextCode,g.CGTransform,s,g.Boundary,i,o,F),r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("version","1.1"),r.setAttribute("id",g.ID);var N,M,U,S=g.FillColor,k=!1,Y=g.DrawParam;if(Y){var d=Object(h.getDrawParam)(Q,Y);d.FillColor&&(S&&S.Value||(S=d.FillColor))}if(S){S.Value&&(B=Object(h.parseColor)(S.Value)),D=S.alpha/255;var H=S.axialShd;if(H){k=!0;var K=document.createElementNS("http://www.w3.org/2000/svg","linearGradient");K.setAttribute("id","".concat(g.ID)),K.setAttribute("x1","0%"),K.setAttribute("y1","0%"),K.setAttribute("x2","100%"),K.setAttribute("y2","100%");var J,L=a(H.Segment);try{for(L.s();!(J=L.n()).done;){var l=J.value;if(l){var f=document.createElement("stop");f.setAttribute("offset","".concat(100*l.position,"%")),f.setAttribute("style","stop-color:".concat(Object(h.parseColor)(l.color.Value),";stop-opacity:1")),K.appendChild(f),B=Object(h.parseColor)(l.color.Value)}}}catch(A){L.e(A)}finally{L.f()}r.appendChild(K)}}g.Stroke&&(N=Object(h.parseColor)(g.StrokeColor.Value),M=g.LineWidth,U=g.LineWidth),g.Fill||(D=0);var u=t.w,p=t.h,m=t.x,b=t.y,Z=n,q=n,W=0;if(s){var x=s.a,V=s.b,v=s.c,X=s.d,T=x>0?Math.sign(x)*Math.sqrt(x*x+v*v):Math.sqrt(x*x+v*v),j=X>0?Math.sign(X)*Math.sqrt(V*V+X*X):Math.sqrt(V*V+X*X);0==(W=Math.atan2(-V,X))&&0!=x&&1==X||(Z*=T,q*=j,U*=T),0==W&&0!=x&&1==X&&(Z*=T,q*=j,U*=T),0==W&&e-0==1&&(e=x/X)>0&&(Z*=e)}if(o){var O=o.a,z=o.b,P=o.c,_=o.d,$=O>0?Math.sign(O)*Math.sqrt(O*O+P*P):Math.sqrt(O*O+P*P),AA=_>0?Math.sign(_)*Math.sqrt(z*z+_*_):Math.sqrt(z*z+_*_);0==(W=Math.atan2(-z,_))&&0!=O&&1==_||(Z*=$,q*=AA,b*=AA,m*=$,u*=$,p*=AA)}var IA=null,gA=g.Clips;if(gA&&gA.length>0)for(var BA=0;BA<gA.length;BA++){(IA=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-".concat(g.ID,"-").concat(BA));for(var CA=gA[BA].Clip,QA=0;QA<CA.length;QA++){var EA=CA[QA].Area,iA=document.createElementNS("http://www.w3.org/2000/svg","path"),oA="",DA=0,tA=0;EA.Path.Boundary&&(DA=EA.Path.Boundary.x,tA=EA.Path.Boundary.y);var hA,wA=a(EA.Path.AbbreviatedData);try{for(wA.s();!(hA=wA.n()).done;){var sA=hA.value;"M"===sA.cmd||"S"===sA.cmd?oA+="M ".concat(Object(h.converterDpi)(sA.crds[0]+DA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[1]+tA,this.coreHelper.dpi)," "):"L"===sA.cmd?oA+="L ".concat(Object(h.converterDpi)(sA.crds[0]+DA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[1]+tA,this.coreHelper.dpi)," "):"B"===sA.cmd?oA+="C ".concat(Object(h.converterDpi)(sA.crds[0]+DA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[1]+tA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[2]+DA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[3]+tA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[4]+DA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[5]+tA,this.coreHelper.dpi)," "):"Q"===sA.cmd?oA+="Q ".concat(Object(h.converterDpi)(sA.crds[0]+DA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[1]+tA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[2]+DA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[3]+tA,this.coreHelper.dpi)," "):"A"===sA.cmd?oA+="A ".concat(Object(h.converterDpi)(sA.crds[0],this.coreHelper.dpi),",").concat(Object(h.converterDpi)(sA.crds[1],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[2],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[3],this.coreHelper.dpi),",").concat(Object(h.converterDpi)(sA.crds[4],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[5],this.coreHelper.dpi),",").concat(Object(h.converterDpi)(sA.crds[6],this.coreHelper.dpi)):"C"===sA.cmd&&(oA+="Z")}}catch(A){wA.e(A)}finally{wA.f()}iA.setAttribute("d",oA),IA.appendChild(iA)}}var aA=Object(h.getFont)(I,c),eA="",cA="",GA="",yA="";s&&(yA="matrix(".concat(s.a," ").concat(s.b," ").concat(s.c," ").concat(s.d," ").concat(Object(h.converterDpi)(s.e,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(s.f,this.coreHelper.dpi),")")),o&&(yA="".concat(yA," matrix(").concat(o.a," ").concat(o.b," ").concat(o.c," ").concat(o.d," ").concat(Object(h.converterDpi)(o.e,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(o.f,this.coreHelper.dpi),")")),e&&(yA="".concat(yA," scale(").concat(e,", 1)"));var FA,nA=!1,RA=a(R);try{for(RA.s();!(FA=RA.n()).done;){var rA=FA.value;if(rA&&!isNaN(rA.x)){if(rA.glyph&&aA&&aA.face){nA=!0;var NA=Object(w.loadFaceInfo)(aA.face),MA=Object(w.FT_Glyph_Get_Measure)(aA.face,rA.glyph),UA=this.drawGlyph(MA.glyphPath,MA.horiUnderlinePosition,NA.units_per_EM,Z,q,C||B,D,N,U,g.ID);if(0===W)UA.img.setAttribute("style","position:absolute; left: ".concat(Math.ceil(rA.cx),"px; top: ").concat(rA.cy-UA.yScale*MA.horiUnderlinePosition-q,"px;width: ").concat(Math.ceil(Z),"px; height:").concat(Math.ceil(q),"px")),A.appendChild(UA.img);else{var SA=document.createElement("div");SA.setAttribute("style","transform-origin: center;transform: rotate(".concat(-W,"rad);position:absolute; left: ").concat(rA.cx,"px; top: ").concat(rA.cy-UA.yScale*MA.horiUnderlinePosition-q,"px;width: ").concat(Math.ceil(Z),"px; height:").concat(Math.ceil(q),"px")),UA.img.setAttribute("style","position: absolute;left: 0px;top:0px;width: ".concat(Math.ceil(Z),"px; height:").concat(Math.ceil(q),"px")),SA.appendChild(UA.img),A.appendChild(SA)}}eA=e?"".concat(eA).concat(rA.x+e*rA.x," "):"".concat(eA).concat(rA.x," "),cA="".concat(cA).concat(rA.y," "),GA=" "==rA.text?"".concat(GA," "):"".concat(GA).concat(rA.text)}}}catch(A){RA.e(A)}finally{RA.f()}var kA=document.createElementNS("http://www.w3.org/2000/svg","text");return kA.setAttribute("x",eA),kA.setAttribute("y",cA),kA.textContent=GA,kA.setAttribute("transform",yA),k?kA.setAttribute("fill",B):(kA.setAttribute("fill",C),kA.setAttribute("fill",B),kA.setAttribute("fill-opacity",nA?0:D<y?D:y)),nA||(IA&&r.appendChild(IA),kA.setAttribute("clip-path","url(#clip-path-".concat(g.ID,"-0)"))),N&&M>0&&(kA.setAttribute("stroke",N),kA.setAttribute("stroke-width",Object(h.converterDpi)(M,this.coreHelper.dpi))),kA.setAttribute("style","font-weight: ".concat(G,";font-size:").concat(n,"px;font-family: ").concat(Object(h.getFontFamily)(aA),";")),nA||r.appendChild(kA),r.setAttribute("style","overflow:visible;position:absolute;width:".concat(u,"px;height:").concat(p,"px;left:").concat(m,"px;top:").concat(b,"px;")),r}},{key:"renderPathObject",value:function(A,I,g,B,C,Q,E,i,o,D,t,w){var s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("version","1.1"),s.setAttribute("xmlns","http://www.w3.org/2000/svg");var e=g.Boundary;if(!e)return{svg:s,style:""};e=Object(h.converterBox)(e,this.coreHelper.dpi);var c=g.LineWidth,G=g.AbbreviatedData,y=g.StrokeColor,F=g.FillColor,n=g.CTM,R=document.createElementNS("http://www.w3.org/2000/svg","path");R.setAttribute("xmlns","http://www.w3.org/2000/svg"),R.setAttribute("ID",g.ID),c&&(Q=Object(h.converterDpi)(c,this.coreHelper.dpi));var r=g.DrawParam;if(r){var N=Object(h.getDrawParam)(I,r);(c=N.LineWidth)&&(Q=Object(h.converterDpi)(c,this.coreHelper.dpi)),N.FillColor&&(F&&F.Value||(F=N.FillColor)),N.StrokeColor&&(y&&y.Value||(y=N.StrokeColor))}n&&R.setAttribute("transform","matrix(".concat(n.a," ").concat(n.b," ").concat(n.c," ").concat(n.d," ").concat(Object(h.converterDpi)(n.e,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(n.f,this.coreHelper.dpi),")"));if(y){y.Value&&(C=Object(h.parseColor)(y.Value));var M=y.axialShd;if(M){!0;var U=document.createElementNS("http://www.w3.org/2000/svg","linearGradient");U.setAttribute("id","".concat(g.ID)),U.setAttribute("x1","0%"),U.setAttribute("y1","0%"),U.setAttribute("x2","100%"),U.setAttribute("y2","100%");var S,k=a(M.Segment);try{for(k.s();!(S=k.n()).done;){var Y=S.value;if(Y){var d=document.createElement("stop");d.setAttribute("offset","".concat(100*Y.position,"%")),d.setAttribute("style","stop-color:".concat(Object(h.parseColor)(Y.color.Value),";stop-opacity:1")),U.appendChild(d),C=Object(h.parseColor)(Y.color.Value)}}}catch(A){k.e(A)}finally{k.f()}s.appendChild(U)}}if(F){F.Value&&(B=Object(h.parseColor)(F.Value)),F.Alpha&&0==F.Alpha&&(B="none");var H=F.axialShd;if(H){!0;var K=document.createElement("linearGradient");K.setAttribute("id","".concat(g.ID)),K.setAttribute("x1","0%"),K.setAttribute("y1","0%"),K.setAttribute("x2","100%"),K.setAttribute("y2","100%");var J,L=a(H.Segment);try{for(L.s();!(J=L.n()).done;){var l=J.value;if(l){var f=document.createElement("stop");f.setAttribute("offset","".concat(100*l.position,"%")),f.setAttribute("style","stop-color:".concat(Object(h.parseColor)(l.color.Value),";stop-opacity:1")),K.appendChild(f),B=Object(h.parseColor)(l.color.Value)}}}catch(A){L.e(A)}finally{L.f()}s.appendChild(K)}}if(Q>0&&!C&&(C="rgb(0, 0, 0)"),i&&R.setAttribute("fill-opacity","".concat(i/255)),g.Stroke&&(R.setAttribute("stroke","".concat(C)),R.setAttribute("stroke-width","".concat(Q,"px"))),g.Fill?(R.setAttribute("fill-rule",g.Rule),R.setAttribute("fill","".concat(E?"none":B||"none"))):R.setAttribute("fill","none"),g.Join&&R.setAttribute("stroke-linejoin","".concat(g["@_Join"])),g.Cap&&R.setAttribute("stroke-linecap","".concat(g["@_Cap"])),g.DashPattern){var u=g.DashPattern,p=Object(h.parseCtm)(u),m=0;g.DashOffset&&(m=g.DashOffset),R.setAttribute("stroke-dasharray","".concat(Object(h.converterDpi)(p[0],this.coreHelper.dpi),",").concat(Object(h.converterDpi)(p[1],this.coreHelper.dpi))),R.setAttribute("stroke-dashoffset","".concat(Object(h.converterDpi)(m,this.coreHelper.dpi),"px"))}var b,Z="",q=a(G);try{for(q.s();!(b=q.n()).done;){var W=b.value;"M"===W.cmd||"S"===W.cmd?Z+="M ".concat(Object(h.converterDpi)(W.crds[0],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(W.crds[1],this.coreHelper.dpi)," "):"L"===W.cmd?Z+="L ".concat(Object(h.converterDpi)(W.crds[0],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(W.crds[1],this.coreHelper.dpi)," "):"B"===W.cmd?Z+="C ".concat(Object(h.converterDpi)(W.crds[0],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(W.crds[1],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(W.crds[2],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(W.crds[3],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(W.crds[4],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(W.crds[5],this.coreHelper.dpi)," "):"Q"===W.cmd?Z+="Q ".concat(Object(h.converterDpi)(W.crds[0],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(W.crds[1],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(W.crds[2],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(W.crds[3],this.coreHelper.dpi)," "):"A"===W.cmd?Z+="A ".concat(Object(h.converterDpi)(W.crds[0],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(W.crds[1],this.coreHelper.dpi)," ").concat(W.crds[2]," ").concat(W.crds[3],",").concat(W.crds[4]," ").concat(Object(h.converterDpi)(W.crds[5],this.coreHelper.dpi),",").concat(Object(h.converterDpi)(W.crds[6],this.coreHelper.dpi)," "):"C"===W.cmd&&(Z+="Z")}}catch(A){q.e(A)}finally{q.f()}R.setAttribute("d",Z),s.appendChild(R);var x=e.w,V=e.h,v=e.x,X=e.y,T=F.pattern;if(T){var j=document.createElementNS("http://www.w3.org/2000/svg","defs"),O=document.createElementNS("http://www.w3.org/2000/svg","pattern");O.setAttribute("width",Object(h.converterDpi)(T.width,this.coreHelper.dpi)),O.setAttribute("height",Object(h.converterDpi)(T.height,this.coreHelper.dpi)),O.setAttribute("id","pattern1"),O.setAttribute("patternUnits","userSpaceOnUse"),this.renderLayer(A,O,w,I,t,null,T,!1,null,null,null),j.appendChild(O),s.appendChild(j);var z=document.createElementNS("http://www.w3.org/2000/svg","rect");z.setAttribute("width",x),z.setAttribute("height",V),z.setAttribute("style","fill:url(#pattern1)"),s.appendChild(z)}var P=g.Clips;if(P&&P.length>0)for(var _=0;_<P.length;_++){var $=document.createElementNS("http://www.w3.org/2000/svg","clipPath");$.setAttribute("id","clip-path-".concat(g.ID,"-").concat(_));for(var AA=P[_].Clip,IA=0;IA<AA.length;IA++){var gA=AA[IA].Area,BA=document.createElementNS("http://www.w3.org/2000/svg","path"),CA="",QA=0,EA=0;if(gA.Path.Boundary&&(QA=gA.Path.Boundary.x,EA=gA.Path.Boundary.y),!gA.TransFlag&&gA.Path.CTM){var iA=gA.Path.CTM,oA="matrix(".concat(iA.a," ").concat(iA.b," ").concat(iA.c," ").concat(iA.d," ").concat(Object(h.converterDpi)(iA.e-n.e,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(iA.f-n.f,this.coreHelper.dpi),")");if(n){var DA=[[n.a,n.c,0],[n.b,n.d,0],[0,0,1]],tA=Object(h.inv)(DA);isNaN(tA[0][0])||tA[0][0]===1/0||(oA="".concat(oA," matrix(").concat(tA[0][0]," ").concat(tA[1][0]," ").concat(tA[0][1]," ").concat(tA[1][1]," 0 0)"))}BA.setAttribute("transform",oA)}var hA,wA=a(gA.Path.AbbreviatedData);try{for(wA.s();!(hA=wA.n()).done;){var sA=hA.value;"M"===sA.cmd||"S"===sA.cmd?CA+="M ".concat(Object(h.converterDpi)(sA.crds[0]+QA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[1]+EA,this.coreHelper.dpi)," "):"L"===sA.cmd?CA+="L ".concat(Object(h.converterDpi)(sA.crds[0]+QA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[1]+EA,this.coreHelper.dpi)," "):"B"===sA.cmd?CA+="C ".concat(Object(h.converterDpi)(sA.crds[0]+QA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[1]+EA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[2]+QA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[3]+EA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[4]+QA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[5]+EA,this.coreHelper.dpi)," "):"Q"===sA.cmd?CA+="Q ".concat(Object(h.converterDpi)(sA.crds[0]+QA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[1]+EA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[2]+QA,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[3]+EA,this.coreHelper.dpi)," "):"A"===sA.cmd?CA+="A ".concat(Object(h.converterDpi)(sA.crds[0],this.coreHelper.dpi),",").concat(Object(h.converterDpi)(sA.crds[1],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[2],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[3],this.coreHelper.dpi),",").concat(Object(h.converterDpi)(sA.crds[4],this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(sA.crds[5],this.coreHelper.dpi),",").concat(Object(h.converterDpi)(sA.crds[6],this.coreHelper.dpi)):"C"===sA.cmd&&(CA+="Z")}}catch(A){wA.e(A)}finally{wA.f()}BA.setAttribute("d",CA),$.appendChild(BA),s.appendChild($),R.setAttribute("clip-path","url(#clip-path-".concat(g.ID,"-0)"))}}var aA="overflow:hidden;position:absolute;width:".concat(Math.ceil(x),"px;height:").concat(Math.ceil(V),"px;");if(o){var eA=document.createElementNS("http://www.w3.org/2000/svg","svg");eA.setAttribute("version","1.1");var cA=Object(h.converterBox)(o,this.coreHelper.dpi),GA=Math.ceil(cA.w),yA=Math.ceil(cA.h),FA=cA.x,nA=cA.y;return aA="overflow:hidden;position:absolute;width:".concat(GA,"px;height:").concat(yA,"px;"),D&&s.setAttribute("transform","matrix(".concat(D.a," ").concat(D.b," ").concat(D.c," ").concat(D.d," ").concat(Object(h.converterDpi)(D.e,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(D.f,this.coreHelper.dpi),")")),eA.appendChild(s),{svg:eA,style:aA,left:FA,top:nA}}return{svg:s,style:aA,left:v,top:X}}},{key:"drawGlyph",value:function(A,I,g,B,C,Q,E,i,o,D){var t=B/g,w=C/g,s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("version","1.1"),s.setAttribute("xmlns","http://www.w3.org/2000/svg");var a=document.createElementNS("http://www.w3.org/2000/svg","path");return a.setAttribute("transform","translate(0, ".concat(C,") scale(").concat(t,", ").concat(-w,") translate(0, ").concat(-I,")")),a.setAttribute("d",A),Q&&a.setAttribute("fill",Q),a.setAttribute("fill-opacity",E),i&&(a.setAttribute("stroke","".concat(i)),a.setAttribute("stroke-width","".concat(Object(h.converterDpi)(o,this.coreHelper.dpi),"px"))),a.setAttribute("clip-path","url(#clip-path-".concat(D,"-0)")),s.appendChild(a),{img:s,yScale:w}}},{key:"watermark",value:function(A){var I={watermark_txt:"text",watermark_x:20,watermark_y:20,watermark_rows:20,watermark_cols:20,watermark_x_space:100,watermark_y_space:50,watermark_color:"#aaa",watermark_alpha:.4,watermark_fontsize:"15px",watermark_font:"微软雅黑",watermark_width:210,watermark_height:80,watermark_angle:20};if(1===arguments.length&&"object"==typeof arguments[0]){var g=arguments[0]||{};for(var B in g)g[B]&&I[B]&&g[B]===I[B]||g[B]&&(I[B]=g[B])}var C,Q,E=document.createDocumentFragment(),i=.015*(o=Math.max(document.body.scrollWidth,document.body.clientWidth)),o=o-i,D=Math.max(document.body.scrollHeight,document.body.clientHeight)+450;D=Math.max(D,window.innerHeight-30),(0==I.watermark_cols||parseInt(I.watermark_x+I.watermark_width*I.watermark_cols+I.watermark_x_space*(I.watermark_cols-1))>o)&&(I.watermark_cols=parseInt((o-I.watermark_x+I.watermark_x_space)/(I.watermark_width+I.watermark_x_space)),I.watermark_x_space=parseInt((o-I.watermark_x-I.watermark_width*I.watermark_cols)/(I.watermark_cols-1))),(0==I.watermark_rows||parseInt(I.watermark_y+I.watermark_height*I.watermark_rows+I.watermark_y_space*(I.watermark_rows-1))>D)&&(I.watermark_rows=parseInt((I.watermark_y_space+D-I.watermark_y)/(I.watermark_height+I.watermark_y_space)),I.watermark_y_space=parseInt((D-I.watermark_y-I.watermark_height*I.watermark_rows)/(I.watermark_rows-1)));for(var t=0;t<I.watermark_rows;t++){Q=I.watermark_y+(I.watermark_y_space+I.watermark_height)*t;for(var h=0;h<I.watermark_cols;h++){C=I.watermark_x+(I.watermark_width+I.watermark_x_space)*h;var w=document.createElement("div");w.id="mask_div"+t+h,w.className="mask_div",w.innerHTML=I.watermark_txt,w.style.webkitTransform="rotate(-"+I.watermark_angle+"deg)",w.style.MozTransform="rotate(-"+I.watermark_angle+"deg)",w.style.msTransform="rotate(-"+I.watermark_angle+"deg)",w.style.OTransform="rotate(-"+I.watermark_angle+"deg)",w.style.transform="rotate(-"+I.watermark_angle+"deg)",w.style.visibility="",w.style.position="absolute",w.style.left=C+"px",w.style.top=Q+"px",w.style.overflow="hidden",w.style.zIndex="9999",w.style.pointerEvents="none",w.style.opacity=I.watermark_alpha,w.style.fontSize=I.watermark_fontsize,w.style.fontFamily=I.watermark_font,w.style.color=I.watermark_color,w.style.textAlign="center",w.style.width=I.watermark_width+"px",w.style.height=I.watermark_height+"px",w.style.display="block",E.appendChild(w)}}return E}}]),A}()},function(A,I,g){"use strict";function B(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return C(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return C(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,Q=function(){};return{s:Q,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:Q}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var E,i=!0,o=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return i=A.done,A},e:function(A){o=!0,E=A},f:function(){try{i||null==g.return||g.return()}finally{if(o)throw E}}}}function C(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}g.r(I),g.d(I,"converterDpi",(function(){return Q})),g.d(I,"ctmImageScale",(function(){return E})),g.d(I,"calTextPoint",(function(){return t})),g.d(I,"decodeHtml",(function(){return s})),g.d(I,"getFontFamily",(function(){return e})),g.d(I,"parseStBox",(function(){return c})),g.d(I,"parseCtm",(function(){return G})),g.d(I,"parseColor",(function(){return y})),g.d(I,"converterBox",(function(){return n})),g.d(I,"Uint8ArrayToHexString",(function(){return R})),g.d(I,"replaceFirstSlash",(function(){return r})),g.d(I,"replaceFirstTarget",(function(){return N})),g.d(I,"readUTF",(function(){return M})),g.d(I,"getMultiMedia",(function(){return U})),g.d(I,"getDrawParam",(function(){return S})),g.d(I,"getFont",(function(){return k})),g.d(I,"inv",(function(){return H}));var Q=function(A,I){return function(A,I){return A*I/25.4}(A,I)},E=function(A){return 25.4/A},i=function(A,I,g){return{cx:A*g.a+I*g.c+1*g.e,cy:A*g.b+I*g.d+1*g.f}},o=function(A,I,g){return{ctmX:A*g.a+I*g.c,ctmY:A*g.b+I*g.d}},D=function(A,I,g){return{cx:g.x+A,cy:g.y+I}},t=function(A,I,g,C,E,t,h,w){var a=0,e=0,c=0,G=0,y=[];if(!I)return y;var F,n=B(I);try{for(n.s();!(F=n.n()).done;){var R=F.value;if(R){if(a=w?parseFloat(R.X):-parseFloat(R.X),e=w?parseFloat(R.Y):-parseFloat(R.Y),isNaN(a)&&(a=0),isNaN(e)&&(e=0),c=a,G=e,C){var r=i(c,G,C);c=r.cx,G=r.cy}var N=[],M=[];R.DeltaX&&R.DeltaX.length>0&&(N=R.DeltaX),R.DeltaY&&R.DeltaY.length>0&&(M=R.DeltaY);var U=R.text;if(U){U=(U=s(U+="")).replace(/&#x20;/g," ");for(var S=0;S<U.length;S++){if(S>0&&N.length>0){var k=S-1;if(k>=N.length&&(k=N.length-1),a+=w?N[k]:-N[k],C)c+=o(w?N[S-1]:-N[S-1],0,C).ctmX;else c=a}if(S>0&&M.length>0){var Y=S-1;if(Y>=M.length&&(Y=M.length-1),e+=w?M[Y]:-M[Y],C)G+=o(0,w?M[S-1]:-M[S-1],C).ctmY;else G=e}var d=U.substring(S,S+1),H=D(c,G,E);h&&(H=i(H.cx,H.cy,h));var K={x:Q(a,A),y:Q(e,A),text:d,cx:Q(H.cx,A),cy:Q(H.cy,A)};y.push(K)}}}}}catch(A){n.e(A)}finally{n.f()}if(y.length>0){var J,L=B(g);try{for(L.s();!(J=L.n()).done;)for(var l=J.value,f=l.CodePosition,u=l.GlyphCount,p=f;p<u+f;p++)if(y.length<=p){var m="".concat(y[y.length-1].glyph," ").concat(l.Glyphs[p-f]);y[y.length-1].glyph=m}else y[p].glyph=l.Glyphs[p-f]}catch(A){L.e(A)}finally{L.f()}}return y},h=/&\w+;|&#(\d+);/g,w={"&lt;":"<","&gt;":">","&amp;":"&","&nbsp;":" ","&quot;":'"',"&copy;":"","&apos;":"'"},s=function(A){return"string"!=typeof(A=null!=A?A:this.toString())?A:A.replace(h,(function(A,I){var g=w[A];return null==g&&(g=isNaN(I)?A:String.fromCharCode(160==I?32:I)),g}))},a={"楷体":"楷体, KaiTi, Kai, simkai",kaiti:"楷体, KaiTi, Kai, simkai",Kai:"楷体, KaiTi, Kai",simsun:"SimSun, simsun, Songti SC","宋体":"SimSun, simsun, Songti SC","黑体":"SimHei, STHeiti, simhei","仿宋":"FangSong, STFangsong, simfang","小标宋体":"小标宋体","方正小标宋_gbk":"方正小标宋_gbk, FZXiaoBiaoSong-B05S","方正小标宋简体":"方正小标宋_gbk, FZXiaoBiaoSong-B05S","仿宋_gb2312":"FangSong, STFangsong, simfang","楷体_gb2312":"楷体, KaiTi, Kai, simkai",couriernew:"Courier New","courier new":"Courier New"},e=function(A){if(!A)return a["宋体"];var I=A.FamilyName;I||(I=A.FontName),a[I.toLowerCase()]&&(I=a[I.toLowerCase()]);for(var g=0,B=Object.keys(a);g<B.length;g++){var C=B[g];if(-1!=I.toLowerCase().indexOf(C.toLowerCase()))return a[C]}return I},c=function(A){if(A){var I=A.split(" ");return{x:parseFloat(I[0]),y:parseFloat(I[1]),w:parseFloat(I[2]),h:parseFloat(I[3])}}return null},G=function(A){return A.split(" ")},y=function(A){if(!(A&&A.length>0))return"rgb(0, 0, 0)";if(-1!==A.indexOf("#"))return A="#"+(A=(A=A.replace(/#/g,"")).replace(/ /g,"")).toString();var I=A.split(" ");if(3===I.length)return"rgb(".concat(I[0],", ").concat(I[1],", ").concat(I[2],")");if(4===I.length){var g=F(I[0],I[1],I[2],I[3]);return"rgb(".concat(g.r,", ").concat(g.g,", ").concat(g.b,")")}},F=function(A,I,g,B,C){var Q=1-(A=(A/=100)*(1-(B/=100))+B),E=1-(I=(I/=100)*(1-B)+B),i=1-(g=(g/=100)*(1-B)+B);return C||(Q=Math.round(255*Q),E=Math.round(255*E),i=Math.round(255*i)),{r:Q,g:E,b:i}},n=function(A,I){return{x:Q(A.x,I),y:Q(A.y,I),w:Q(A.w,I),h:Q(A.h,I)}},R=function(A){for(var I=[],g=0,B=0;B<2*A.length;B+=2)I[B>>>3]|=parseInt(A[g],10)<<24-B%8*4,g++;for(var C=[],Q=0;Q<A.length;Q++){var E=I[Q>>>2]>>>24-Q%4*8&255;C.push((E>>>4).toString(16)),C.push((15&E).toString(16))}return C.join("")},r=function(A){return A&&0===A.indexOf("/")&&(A=A.replace("/","")),A},N=function(A,I){return A&&0===A.indexOf(I)&&(A=A.replace(I,"")),A},M=function(A){if("string"==typeof A)return A;for(var I="",g=A,B=0;B<g.length;B++){var C=g[B].toString(2),Q=C.match(/^1+?(?=0)/);if(Q&&8==C.length){for(var E=Q[0].length,i=g[B].toString(2).slice(7-E),o=1;o<E;o++)i+=g[o+B].toString(2).slice(2);I="".concat(I).concat(String.fromCharCode(parseInt(i,2))),B+=E-1}}return I},U=function(A,I){var g,C=B(A);try{for(C.s();!(g=C.n()).done;){var Q=g.value;if(Q.ID==I)return Q}}catch(A){C.e(A)}finally{C.f()}},S=function(A,I){var g,C=B(A);try{for(C.s();!(g=C.n()).done;){var Q=g.value;if(Q.ID==I)return Q}}catch(A){C.e(A)}finally{C.f()}},k=function(A,I){var g,C=B(A);try{for(C.s();!(g=C.n()).done;){var Q=g.value;if(Q.ID==I)return Q}}catch(A){C.e(A)}finally{C.f()}};function Y(A){if(A.length!==A[0].length)throw new Error;var I=A.length,g=0;if(I>3)for(var B=0;B<I;B++){for(var C=new Array(I-1).fill(0).map((function(A){return new Array(I-1).fill(0)})),Q=0;Q<I-1;Q++)for(var E=0;E<I-1;E++)C[Q][E]=E<B?A[Q+1][E]:A[Q+1][E+1];g+=A[0][B]*Math.pow(-1,0+B)*Y(C)}else 3===I?g=A[0][0]*A[1][1]*A[2][2]+A[0][1]*A[1][2]*A[2][0]+A[0][2]*A[1][0]*A[2][1]-A[0][2]*A[1][1]*A[2][0]-A[0][1]*A[1][0]*A[2][2]-A[0][0]*A[1][2]*A[2][1]:2===I?g=A[0][0]*A[1][1]-A[0][1]*A[1][0]:1===I&&(g=A[0][0]);return g}function d(A){if(A[0].length!==A.length)throw new Error;for(var I=A.length,g=new Array(I).fill(0).map((function(A){return new Array(I).fill(0)})),B=0;B<I;B++)for(var C=0;C<I;C++){for(var Q=[],E=0;E<A.length;E++)if(E!==B){for(var i=[],o=0;o<A.length;o++)o!==C&&i.push(A[E][o]);Q.push(i)}g[B][C]=Math.pow(-1,B+C)*Y(Q)}return function(A){for(var I=new Array(A.length).fill(0).map((function(I){return new Array(A[0].length).fill(0)})),g=0;g<I.length;g++)for(var B=0;B<I[0].length;B++)I[g][B]=A[B][g];return I}(g)}function H(A){if(A[0].length!==A.length)throw new Error;for(var I=Y(A),g=d(A),B=0;B<g.length;B++)for(var C=0;C<g.length;C++)g[B][C]/=I;return g}},function(A,I,g){"use strict";g.r(I),g.d(I,"needInitAgain",(function(){return D})),g.d(I,"setYYDS",(function(){return t})),g.d(I,"freeMemory",(function(){return h})),g.d(I,"getStreamData",(function(){return w})),g.d(I,"CreateLibrary",(function(){return s})),g.d(I,"CreateNativeStream",(function(){return a})),g.d(I,"FT_Open_Face",(function(){return e})),g.d(I,"loadFaceInfo",(function(){return c})),g.d(I,"FT_Glyph_Get_Measure",(function(){return G})),g.d(I,"freeOFD",(function(){return y})),g.d(I,"readOFD",(function(){return F})),g.d(I,"readOFDByBase64",(function(){return n})),g.d(I,"hashPath",(function(){return R})),g.d(I,"MD5",(function(){return r})),g.d(I,"SHA1",(function(){return N})),g.d(I,"SM3",(function(){return M})),g.d(I,"base64EncodeByByte",(function(){return U})),g.d(I,"base64Encode",(function(){return S})),g.d(I,"base64DecodeToUint8Array",(function(){return k})),g.d(I,"JSBase64ByHashFile",(function(){return Y})),g.d(I,"JSGetImageInfoByBase64",(function(){return d})),g.d(I,"JSGetImageInfoByPath",(function(){return H})),g.d(I,"JSReadPageInfo",(function(){return K})),g.d(I,"JSGetPathEncode",(function(){return J}));var B,C,Q,E,i=g(31),o=g(32),D=function(){return!B},t=function(A){B=A},h=function(A){B._ASC_FT_Free(A.data),A.data=0},w=function(){return E},s=function(){C=B._ASC_FT_Init()},a=function(A){var I=new Uint8Array(A),g=B._malloc(A.byteLength);return B.HEAPU8.set(I,g),{data:g,length:A.byteLength}},e=function(A){return B._ASC_FT_Open_Face(C,A.data,A.length,0)},c=function(A){var I=B._ASC_FT_GetFaceInfo(A);if(I){var g=new i.CFaceInfo,C=Math.min(B.HEAP8.length-I>>2,250),Q=new Int32Array(B.HEAP8.buffer,I,C),E=0;g.units_per_EM=Math.abs(Q[E++]),g.ascender=Q[E++],g.descender=Q[E++],g.height=Q[E++],g.face_flags=Q[E++],g.num_faces=Q[E++],g.num_glyphs=Q[E++],g.num_charmaps=Q[E++],g.style_flags=Q[E++],g.face_index=Q[E++];for(var o=Q[E++];o;)g.family_name+=String.fromCharCode(o),o=Q[E++];for(o=Q[E++];o;)g.style_name+=String.fromCharCode(o),o=Q[E++];g.os2_version=Q[E++],g.os2_usWeightClass=Q[E++],g.os2_fsSelection=Q[E++],g.os2_usWinAscent=Q[E++],g.os2_usWinDescent=Q[E++],g.os2_usDefaultChar=Q[E++],g.os2_sTypoAscender=Q[E++],g.os2_sTypoDescender=Q[E++],g.os2_sTypoLineGap=Q[E++],g.os2_ulUnicodeRange1=L(Q[E++]),g.os2_ulUnicodeRange2=L(Q[E++]),g.os2_ulUnicodeRange3=L(Q[E++]),g.os2_ulUnicodeRange4=L(Q[E++]),g.os2_ulCodePageRange1=L(Q[E++]),g.os2_ulCodePageRange2=L(Q[E++]),g.os2_nSymbolic=Q[E++],g.header_yMin=Q[E++],g.header_yMax=Q[E++];for(var D=Q[E++],t=0;t<D;t++)g.monochromeSizes.push(Q[E++]);return B._ASC_FT_Free(I),I=null,g}},G=function(A,I){if(B._AST_FT_Load_Glyph(A,I,1)>0)return" ";var g=B._ASC_FT_Get_Glyph_Measure_Params(A,1);if(!g)return null;var C=B.HEAP32[g>>2],Q=new Int32Array(B.HEAP8.buffer,g,C),E=new o.CGlyphMetrics;E.bbox_xMin=Q[1],E.bbox_yMin=Q[2],E.bbox_xMax=Q[3],E.bbox_yMax=Q[4],E.width=Q[5],E.height=Q[6],E.horiAdvance=Q[7],E.horiBearingX=Q[8],E.horiBearingY=Q[9],E.vertAdvance=Q[10],E.vertBearingX=Q[11],E.vertBearingY=Q[12],E.linearHoriAdvance=Q[13],E.linearVertAdvance=Q[14],E.horiUnderlinePosition=E.horiBearingY-E.height;for(var i=15,D="";i<C;)switch(Q[i++]){case 0:D+=" M ".concat(Q[i++]," ").concat(Q[i++]);break;case 1:D+=" L ".concat(Q[i++]," ").concat(Q[i++]);break;case 2:D+=" Q ".concat(Q[i++]," ").concat(Q[i++]," ").concat(Q[i++]," ").concat(Q[i++]);break;case 3:D+=" C ".concat(Q[i++]," ").concat(Q[i++]," ").concat(Q[i++]," ").concat(Q[i++]," ").concat(Q[i++]," ").concat(Q[i++])}return E.glyphPath=D,B._ASC_FT_Free(g),Q=null,E},y=function(A){if(h(Q),A.ofdParserPtr>0)B.JSFreeOFD(A.ofdParserPtr);var I=A.getFontRes(0);I&&I.forEach((function(A){A.face&&B._ASC_FT_Free(A.face)}))},F=function(A,I,g){E=A,Q=a(A);var i=B.JSReadOFD(C,Q.data,Q.length,I||"kgNVVbdUZ31C6mps",g?g.toLowerCase():"");return i.data&&i.data.ofd&&(i.data.ofd.size=Q.length),i},n=function(A,I,g){return B.JSReadOFDByBase64(C,A,I,g?g.toLowerCase():"")},R=function(A,I,g){return B.JSHashPath(A,I,g)},r=function(A){return B.JSMD5(A)},N=function(A){return B.JSSHA1(A)},M=function(A){return B.JSSM3(A)},U=function(A){var I=a(A),g=B.JSBase64EncodeByByte(I.data,I.length);return h(I),g},S=function(A){return B.JSBase64Encode(A)},k=function(A){var I=B.JSBase64Decode(A);return new Uint8Array(B.HEAPU8.buffer,I.ptr,I.len).slice(0,I.len)},Y=function(A,I,g){var C=a(A);return B.JSBase64ByHashFile(C.data,C.length,I,g)},d=function(A){var I=B.JSGetImageInfoByBase64(A);return"jb2"!==I.ext&&"jp2"!==I.ext&&"tif"!==I.ext&&"gif"!==I.ext&&"bmp"!==I.ext||(I.ext="png"),0===I.fileBase64.length&&(I.fileBase64=A),0!==I.fileBase64.indexOf("data:image")&&(I.fileBase64="data:image/".concat(I.ext,";base64,").concat(I.fileBase64)),I},H=function(A,I,g,C){var Q=B.JSGetImageInfoByPath(A,I,g,C);return"jb2"!==Q.ext&&"jp2"!==Q.ext&&"tif"!==Q.ext&&"gif"!==Q.ext&&"bmp"!==Q.ext&&"webp"!==Q.ext||(Q.ext="png"),0!==Q.fileBase64.indexOf("data:image")&&(Q.fileBase64="data:image/".concat(Q.ext,";base64,").concat(Q.fileBase64)),Q},K=function(A,I,g,C,Q){return B.JSReadPageInfo(A,I,g,C,Q)},J=function(A,I){return B.JSGetPathEncode(A,I).encode},L=function(A){return A<0?A+4294967296:A}},function(A,I,g){"use strict";g.r(I),g.d(I,"CFaceInfo",(function(){return i}));var B=g(1),C=g.n(B),Q=g(2),E=g.n(Q),i=C()((function A(){E()(this,A),this.units_per_EM=0,this.ascender=0,this.descender=0,this.height=0,this.face_flags=0,this.num_faces=0,this.num_glyphs=0,this.num_charmaps=0,this.style_flags=0,this.face_index=0,this.family_name="",this.style_name="",this.os2_version=0,this.os2_usWeightClass=0,this.os2_fsSelection=0,this.os2_usWinAscent=0,this.os2_usWinDescent=0,this.os2_usDefaultChar=0,this.os2_sTypoAscender=0,this.os2_sTypoDescender=0,this.os2_sTypoLineGap=0,this.os2_ulUnicodeRange1=0,this.os2_ulUnicodeRange2=0,this.os2_ulUnicodeRange3=0,this.os2_ulUnicodeRange4=0,this.os2_ulCodePageRange1=0,this.os2_ulCodePageRange2=0,this.os2_nSymbolic=0,this.header_yMin=0,this.header_yMax=0,this.monochromeSizes=[]}))},function(A,I,g){"use strict";g.r(I),g.d(I,"CGlyphMetrics",(function(){return i}));var B=g(1),C=g.n(B),Q=g(2),E=g.n(Q),i=C()((function A(){E()(this,A),this.bbox_xMin=0,this.bbox_yMin=0,this.bbox_xMax=0,this.bbox_yMax=0,this.width=0,this.height=0,this.horiAdvance=0,this.horiBearingX=0,this.horiBearingY=0,this.vertAdvance=0,this.vertBearingX=0,this.vertBearingY=0,this.linearHoriAdvance=0,this.linearVertAdvance=0,this.horiUnderlinePosition=0,this.glyphPath=null}))},function(A,I,g){"use strict";g.r(I),g.d(I,"Ofd_Core",(function(){return t}));var B=g(2),C=g.n(B),Q=g(1),E=g.n(Q),i=(g(29),g(30));function o(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return D(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return D(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function D(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var t=function(){function A(I,g){C()(this,A),this.ofd=I,this.ofdParserPtr=g}return E()(A,[{key:"getMetadata",value:function(A){return A?A>this.ofd.DocBody.length&&(A=this.ofd.DocBody.length-1):A=0,{Title:this.ofd.DocBody[A].DocInfo.Title,Author:this.ofd.DocBody[A].DocInfo.Author,Subject:this.ofd.DocBody[A].DocInfo.Subject,Creator:this.ofd.DocBody[A].DocInfo.Creator,CreationDate:this.ofd.DocBody[A].DocInfo.CreationDate,CreatorVersion:this.ofd.DocBody[A].DocInfo.CreatorVersion,ModificationDate:this.ofd.DocBody[A].DocInfo.ModDate,Keywords:this.ofd.DocBody[A].DocInfo.Keywords,numPages:this.getOFDPageCount(A),pageSize:"".concat(this.pageWidth(A,0),"毫米 X ").concat(this.pageHeight(A,0),"毫米")}}},{key:"readOfdDocBody",value:function(A){return this.ofd?(A?A>this.ofd.DocBody.length&&(A=this.ofd.DocBody.length-1):A=0,this.ofd.DocBody[A]):null}},{key:"readOfdDocument",value:function(A){return this.ofd?(A?A>this.ofd.Document.length&&(A=this.ofd.Document.length-1):A=0,this.ofd.Document[A]):null}},{key:"readOfdPage",value:function(A,I){if(!this.ofd)return null;A?A>this.ofd.Document.length&&(A=this.ofd.Document.length-1):A=0;var g=this.ofd.Document[A],B=g.Pages[I];if(B.Page.onlyReadArea){var C=Object(i.JSReadPageInfo)(this.ofdParserPtr,B.BasePln,B.BaseAbs,B.pln,B.abs);g.Pages[I].Page=C.Page}return g.Pages[I]}},{key:"readOfdTemplatePage",value:function(A){return this.ofd?(A?A>this.ofd.Document.length&&(A=this.ofd.Document.length-1):A=0,this.ofd.Document[A].CommonData.TemplatePage):null}},{key:"readPageFromTemplate",value:function(A){if(A.Page.onlyReadArea){var I=Object(i.JSReadPageInfo)(this.ofdParserPtr,A.BasePln,A.BaseAbs,"","");A.Page=I.Page}return A}},{key:"getOFDPageCount",value:function(A){var I=this.readOfdDocument(A);return I?I.Pages.length:0}},{key:"pageWidth",value:function(A,I){var g=this.readOfdDocument(A);if(!g)return 0;var B=g.Pages[I];return this.calPageBox(g,B).w}},{key:"pageHeight",value:function(A,I){var g=this.readOfdDocument(A);if(!g)return 0;var B=g.Pages[I];return this.calPageBox(g,B).h}},{key:"calPageBox",value:function(A,I){var g,B=I.Page.Area;if(B&&Object.keys(B).length>0){var C=B.PhysicalBox;if(C)g=C;else{var Q=B.ApplicationBox;if(Q)g=Q;else{var E=B.ContentBox;E&&(g=E)}}}else{var i=A.CommonData.PageArea,o=i.PhysicalBox;if(o)g=o;else{var D=i.ApplicationBox;if(D)g=D;else{var t=i.ContentBox;t&&(g=t)}}}return g}},{key:"getSignatureCount",value:function(A){var I=this.readOfdDocument(A);return I&&I.Signatures&&I.Signatures.Signature?I.Signatures.Signature.length:0}},{key:"getAllSignature",value:function(A){var I=this.readOfdDocument(A);return I&&I.Signatures?I.Signatures.Signature:0}},{key:"getSignatureByIndex",value:function(A,I){var g=this.readOfdDocument(A);return g?g.Signatures.Signature[I]:null}},{key:"findSignature",value:function(A,I,g){var B=null,C=this.readOfdDocument(A);if(C)for(var Q=0;Q<C.Signatures.Signature.length;Q++){var E,i=o(C.Signatures.Signature);try{for(i.s();!(E=i.n()).done;){var D,t=E.value,h=o(t.Signature.SignedInfo.StampAnnot);try{for(h.s();!(D=h.n()).done;){var w=D.value;if(w.ID==g&&w.PageRef==I){B=t.Signature;break}}}catch(A){h.e(A)}finally{h.f()}}}catch(A){i.e(A)}finally{i.f()}}return B}},{key:"getFontRes",value:function(A){var I,g,B=this.readOfdDocument(A);if(B)return null==B||null===(I=B.CommonData)||void 0===I||null===(g=I.Res)||void 0===g?void 0:g.Fonts}},{key:"getDocPln",value:function(A){var I=this.readOfdDocBody(A);if(I)return null==I?void 0:I.DocPln}},{key:"getAttachmentCount",value:function(A){var I=this.readOfdDocument(A);return I&&I.Attachments?I.Attachments.length:0}},{key:"getCustomTag",value:function(A){var I=this.readOfdDocument(A);return I&&I.CustomTags?I.CustomTags:null}},{key:"getPageIndexByPageId",value:function(A,I){if(!this.ofd)return 0;A?A>this.ofd.Document.length&&(A=this.ofd.Document.length-1):A=0;for(var g=this.ofd.Document[A],B=0;B<g.Pages.length;B++){if(g.Pages[B].ID==I)return B}}},{key:"getAllAttachment",value:function(A){var I=this.readOfdDocument(A);return I&&I.Attachments?I.Attachments:[]}},{key:"getAttachmentByIndex",value:function(A,I){var g=this.readOfdDocument(A);return g?g.Attachments[I]:null}},{key:"getAttachmentByID",value:function(A,I){var g=this.readOfdDocument(A);if(g){var B,C=o(g.Attachments);try{for(C.s();!(B=C.n()).done;){var Q=B.value;if(Q.ID==I)return Q}}catch(A){C.e(A)}finally{C.f()}}return null}},{key:"getTextObject",value:function(A,I){var g=[],B=this.readOfdPage(A,I);if(B){var C,Q=o(B.Page.Content.Layer);try{for(Q.s();!(C=Q.n()).done;){var E,i=o(C.value.PageBlock);try{for(i.s();!(E=i.n()).done;){var D=E.value;if("TextObject"==D.Type){var t,h="",w=o(D.TextCode);try{for(w.s();!(t=w.n()).done;){var s=t.value;h="".concat(h).concat(s.text)}}catch(A){w.e(A)}finally{w.f()}if(h.length>0){var a={id:D.ID,pageId:B.ID};a.text=h,g.push(a)}}}}catch(A){i.e(A)}finally{i.f()}}}catch(A){Q.e(A)}finally{Q.f()}}return g}},{key:"getAllTextObject",value:function(A){for(var I=[],g=this.readOfdDocument(A),B=0;B<g.Pages.length;B++){var C=g.Pages[B];if(C.Page.onlyReadArea){var Q=Object(i.JSReadPageInfo)(this.ofdParserPtr,C.BasePln,C.BaseAbs,C.pln,C.abs);C.Page=Q.Page}if(C){var E,D=o(C.Page.Content.Layer);try{for(D.s();!(E=D.n()).done;){var t,h=o(E.value.PageBlock);try{for(h.s();!(t=h.n()).done;){var w=t.value;if("TextObject"==w.Type){var s,a="",e=o(w.TextCode);try{for(e.s();!(s=e.n()).done;){var c=s.value;a="".concat(a).concat(c.text)}}catch(A){e.e(A)}finally{e.f()}if(a.length>0){var G={id:w.ID,pageId:C.ID,pageIndex:B+1};G.text=a,I.push(G)}}}}catch(A){h.e(A)}finally{h.f()}}}catch(A){D.e(A)}finally{D.f()}}}return I}}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"Ofd_Core_Helper",(function(){return o}));var B=g(2),C=g.n(B),Q=g(1),E=g.n(Q),i=g(29),o=function(){function A(){var I=arguments.length>0&&void 0!==arguments[0]?arguments[0]:96,g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";C()(this,A),this.dpi=I,this.waterText=g}return E()(A,[{key:"setWaterText",value:function(A){this.waterText=A}},{key:"setDpi",value:function(A){this.dpi=A}},{key:"pageRenderWidth",value:function(A,I,g){var B=g.pageWidth(A,I);return B=Object(i.converterDpi)(B,this.dpi)}},{key:"pageRenderHeight",value:function(A,I,g){var B=g.pageHeight(A,I);return B=Object(i.converterDpi)(B,this.dpi)}}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"OfdCanvasRender",(function(){return G}));var B=g(3),C=g.n(B),Q=g(2),E=g.n(Q),i=g(1),o=g.n(i),D=g(4),t=g.n(D),h=g(29),w=g(30),s=g(33),a=g(28);function e(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return c(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return c(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function c(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var G=function(){function A(I,g){E()(this,A),this.core=I,this.coreHelper=g,this.render=new a.Ofd_Render(this.core,this.coreHelper)}var I,g,B,Q,i,D,c,G,y,F;return o()(A,[{key:"setOfdCore",value:function(A){this.core=A,this.render.setOfdCore(this.core)}},{key:"renderPageByCanvas",value:(F=C()(t.a.mark((function A(I,g,B,C,Q){var E,i,o,D,a,c,G,y,F,n,R,r,N,M,U,S,k,Y,d,H,K,J,L,l,f,u,p,m,b,Z,q,W,x,V,v,X,T,j,O,z;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(E=Q?Q.readOfdDocument(B):this.core.readOfdDocument(B),i=Q?Q.readOfdPage(B,C):this.core.readOfdPage(B,C),o=i.Page.Template,E.Annotations,D=Q?Q.readOfdTemplatePage(B):this.core.readOfdTemplatePage(B),a=E.Signatures?E.Signatures.Signature:[],c=E.CommonData.Res.Fonts,G=E.CommonData.Res.DrawParams,E.CommonData.Res.ColorSpaces,y=E.CommonData.Res.CompositeGraphicUnits,F=E.CommonData.Res.MultiMedias,!o){A.next=64;break}n=e(o),A.prev=13,n.s();case 15:if((R=n.n()).done){A.next=56;break}r=R.value,N=e(D),A.prev=18,N.s();case 20:if((M=N.n()).done){A.next=46;break}if((U=M.value).ID!=r.TemplateID){A.next=44;break}if(!(U=Q?Q.readPageFromTemplate(U):this.core.readPageFromTemplate(U)).Page.Content){A.next=43;break}S=U.Page.Content.Layer,k=e(S),A.prev=27,k.s();case 29:if((Y=k.n()).done){A.next=35;break}return d=Y.value,A.next=33,this.renderLayerByCanvas(I,g,c,G,F,y,d,!1);case 33:A.next=29;break;case 35:A.next=40;break;case 37:A.prev=37,A.t0=A.catch(27),k.e(A.t0);case 40:return A.prev=40,k.f(),A.finish(40);case 43:return A.abrupt("break",46);case 44:A.next=20;break;case 46:A.next=51;break;case 48:A.prev=48,A.t1=A.catch(18),N.e(A.t1);case 51:return A.prev=51,N.f(),A.finish(51);case 54:A.next=15;break;case 56:A.next=61;break;case 58:A.prev=58,A.t2=A.catch(13),n.e(A.t2);case 61:return A.prev=61,n.f(),A.finish(61);case 64:if(!i.Page.Content){A.next=83;break}H=i.Page.Content.Layer,K=e(H),A.prev=67,K.s();case 69:if((J=K.n()).done){A.next=75;break}return L=J.value,A.next=73,this.renderLayerByCanvas(I,g,c,G,F,y,L,!1);case 73:A.next=69;break;case 75:A.next=80;break;case 77:A.prev=77,A.t3=A.catch(67),K.e(A.t3);case 80:return A.prev=80,K.f(),A.finish(80);case 83:l=e(a),A.prev=84,l.s();case 86:if((f=l.n()).done){A.next=134;break}u=f.value,p=e(u.Signature.SignedInfo.StampAnnot),A.prev=89,p.s();case 91:if((m=p.n()).done){A.next=124;break}if(b=m.value,Z=b.PageRef,i.ID!=Z){A.next=122;break}if(q=b.Boundary,!(u.Signature.PicType&&u.Signature.PicType.length>0)){A.next=122;break}if("ofd"!==u.Signature.PicType){A.next=108;break}W=new s.Ofd_Core(u.Signature.ofd,this.coreHelper.dpi),x=0;case 100:if(!(x<W.getOFDPageCount(0))){A.next=106;break}return A.next=103,this.renderSealPageOnCanvas(I,g,x,W,!0,q,Z,b.ID);case 103:x++,A.next=100;break;case 106:A.next=122;break;case 108:if("svg"!==u.Signature.PicType){A.next=114;break}return V="data:image/svg+xml;base64,".concat(u.Signature.PicValue),A.next=112,this.renderSealSvgOnCanvas(I,g,V,q);case 112:A.next=122;break;case 114:return v=q.w,X=q.h,T=Object(h.converterBox)(q,this.coreHelper.dpi),j=Object(w.JSGetImageInfoByBase64)(u.Signature.PicValue),O=j.fileBase64,z={a:v,b:0,c:0,d:X,e:0,f:0},A.next=122,this.renderImageOnCanvas(I,g,O,j.width,j.height,T,b.Clip,!0,Z,b.ID,z);case 122:A.next=91;break;case 124:A.next=129;break;case 126:A.prev=126,A.t4=A.catch(89),p.e(A.t4);case 129:return A.prev=129,p.f(),A.finish(129);case 132:A.next=86;break;case 134:A.next=139;break;case 136:A.prev=136,A.t5=A.catch(84),l.e(A.t5);case 139:return A.prev=139,l.f(),A.finish(139);case 142:case"end":return A.stop()}}),A,this,[[13,58,61,64],[18,48,51,54],[27,37,40,43],[67,77,80,83],[84,136,139,142],[89,126,129,132]])}))),function(A,I,g,B,C){return F.apply(this,arguments)})},{key:"renderAnnotationOnCanvas",value:(y=C()(t.a.mark((function A(I,g,B,C,Q,E,i){var o,D,w,s,a;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(o=B.Appearance,!(D=B.Appearance.Boundary)){A.next=15;break}if(0!==D.w&&0!==D.h){A.next=5;break}return A.abrupt("return");case 5:return w=Object(h.converterBox)(D,this.coreHelper.dpi),(s=document.createElement("canvas")).style.height="".concat(w.w,"px"),s.style.width="".concat(w.h,"px"),s.width=w.w,s.height=w.h,a=s.getContext("2d"),A.next=14,this.renderLayerByCanvas(s,a,C,Q,E,i,o,!1);case 14:g.drawImage(s,w.x,w.y);case 15:case"end":return A.stop()}}),A,this)}))),function(A,I,g,B,C,Q,E){return y.apply(this,arguments)})},{key:"renderSealSvgOnCanvas",value:(G=C()(t.a.mark((function A(I,g,B,C,Q,E){var i;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return i=Object(h.converterBox)(C,this.coreHelper.dpi),A.abrupt("return",new Promise((function(A,I){var C=new Image;C.src=B,C.onload=function(){var I=C.width,B=C.height,Q=document.createElement("canvas");if(Q.style.height="".concat(I,"px"),Q.style.width="".concat(B,"px"),Q.width=I,Q.height=B,Q.getContext("2d").drawImage(C,0,0),I!==i.w){var E=i.h/B<i.w/I?i.h/B:i.w/I,o=document.createElement("canvas");o.style.height="".concat(i.w,"px"),o.style.width="".concat(i.h,"px"),o.width=i.w,o.height=i.h;var D=o.getContext("2d");D.scale(E,E),D.drawImage(Q,0,0),g.drawImage(o,i.x,i.y)}else g.drawImage(Q,i.x,i.y);A()}})));case 2:case"end":return A.stop()}}),A,this)}))),function(A,I,g,B,C,Q){return G.apply(this,arguments)})},{key:"renderSealPageOnCanvas",value:(c=C()(t.a.mark((function A(I,g,B,C,Q,E,i,o){var D,w,s,a,e,c,G,y,F,n;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return D={x:0,y:0,w:0,h:0},D=E,w={x:E.x,y:E.y,w:C.pageWidth(0,B),h:C.pageHeight(0,B)},s=Object(h.converterBox)(w,this.coreHelper.dpi),a=1,(e=document.createElement("canvas")).style.height="".concat(s.w,"px"),e.style.width="".concat(s.h,"px"),e.width=s.w,e.height=s.h,c=e.getContext("2d"),A.next=13,this.renderPageByCanvas(e,c,0,B,C);case 13:c.scale(a,a),w.w!==D.w?(G=D.h/w.h<D.w/w.w?D.h/w.h:D.w/w.w,y=document.createElement("canvas"),F=Object(h.converterBox)(D,this.coreHelper.dpi),y.style.height="".concat(F.w,"px"),y.style.width="".concat(F.h,"px"),y.width=F.w,y.height=F.h,(n=y.getContext("2d")).scale(G,G),n.drawImage(e,0,0),g.drawImage(y,s.x,s.y)):g.drawImage(e,s.x,s.y);case 15:case"end":return A.stop()}}),A,this)}))),function(A,I,g,B,C,Q,E,i){return c.apply(this,arguments)})},{key:"renderLayerByCanvas",value:(D=C()(t.a.mark((function A(I,g,B,C,Q,E,i,o,D,w,s){var a,c,G,y,F,n,R,r,N,M,U,S,k,Y,d;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(a=null,c=null,G=Object(h.converterDpi)(.353,this.coreHelper.dpi),(y=i.DrawParam)&&Object(h.getDrawParam)(C,y)&&(F=Object(h.getDrawParam)(C,y),Object(h.getDrawParam)(C,F.Relative)&&(F=Object(h.getDrawParam)(C,F.Relative)),F.FillColor&&(a=Object(h.parseColor)(F.FillColor.Value)),F.StrokeColor&&(a=Object(h.parseColor)(F.StrokeColor.Value)),F.LineWidth&&(G=Object(h.converterDpi)(F.LineWidth,this.coreHelper.dpi))),!(n=i.PageBlock)){A.next=60;break}R=e(n),A.prev=8,R.s();case 10:if((r=R.n()).done){A.next=52;break}if("ImageObject"!=(N=r.value).Type){A.next=17;break}return A.next=15,this.renderImageObject(I,g,Q,N,o,w,s);case 15:A.next=50;break;case 17:if("PathObject"!=N.Type){A.next=22;break}return A.next=20,this.renderPathObject(I,g,C,N,a,c,G,o,D,w,s,Q,B);case 20:A.next=50;break;case 22:if("TextObject"!=N.Type){A.next=27;break}return A.next=25,this.renderTextObject(I,g,B,N,a,c,C,D,w,s);case 25:A.next=50;break;case 27:if("CompositeObject"!=N.Type){A.next=50;break}M=e(E),A.prev=29,M.s();case 31:if((U=M.n()).done){A.next=42;break}if((S=U.value).ID!==N.ResourceID){A.next=40;break}return k=N.Alpha,Y=N.Boundary,d=N.CTM,A.next=39,this.renderLayerByCanvas(I,g,B,C,Q,E,S,!1,k,Y,d);case 39:return A.abrupt("break",42);case 40:A.next=31;break;case 42:A.next=47;break;case 44:A.prev=44,A.t0=A.catch(29),M.e(A.t0);case 47:return A.prev=47,M.f(),A.finish(47);case 50:A.next=10;break;case 52:A.next=57;break;case 54:A.prev=54,A.t1=A.catch(8),R.e(A.t1);case 57:return A.prev=57,R.f(),A.finish(57);case 60:case"end":return A.stop()}}),A,this,[[8,54,57,60],[29,44,47,50]])}))),function(A,I,g,B,C,Q,E,i,o,t,h){return D.apply(this,arguments)})},{key:"renderImageObject",value:(i=C()(t.a.mark((function A(I,g,B,C,Q,E,i){var o,D,s,a,e,c;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(o=C.Boundary,o=Object(h.converterBox)(o,this.coreHelper.dpi),D=C.ResourceID){A.next=5;break}return A.abrupt("return");case 5:return(s=Object(h.getMultiMedia)(B,D)).width>0||s.height>0||(a=Object(w.JSGetImageInfoByBase64)(s.FileBase64),s.width=a.width,s.height=a.height,s.FileBase64=a.fileBase64),e=C.CTM,c=C.Clips,A.next=11,this.renderImageOnCanvas(I,g,s.FileBase64,s.width,s.height,o,!1,Q,null,null,e,E,i,c);case 11:case"end":return A.stop()}}),A,this)}))),function(A,I,g,B,C,Q,E){return i.apply(this,arguments)})},{key:"renderImageOnCanvas",value:(Q=C()(t.a.mark((function A(I,g,B,C,Q,E,i,o,D,w,s,a,c,G){var y=this;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(!o){A.next=4;break}return A.next=3,this.render.throwWhite(B);case 3:B=A.sent;case 4:return A.abrupt("return",new Promise((function(A,I){var i=E.x,o=E.y,D=new Image;D.src=B,D.width=C,D.height=Q;var t=y;D.onload=function(){if(a){var I=document.createElement("canvas");I.width=E.w,I.height=E.h,I.style.width="".concat(E.w,"px"),I.style.height="".concat(E.h,"px");var B=I.getContext("2d");s&&B.transform(s.a/C/Object(h.ctmImageScale)(t.coreHelper.dpi),s.b/C/Object(h.ctmImageScale)(t.coreHelper.dpi),s.c/Q/Object(h.ctmImageScale)(t.coreHelper.dpi),s.d/Q/Object(h.ctmImageScale)(t.coreHelper.dpi),Object(h.converterDpi)(s.e,t.coreHelper.dpi),Object(h.converterDpi)(s.f,t.coreHelper.dpi)),B.drawImage(D,0,0);var w=document.createElement("canvas"),y=Object(h.converterBox)(a,t.coreHelper.dpi),F=y.w,n=y.h,R=y.x,r=y.y;w.width=F,w.height=n,w.style.width="".concat(F,"px"),w.style.height="".concat(n,"px");var N=w.getContext("2d");c&&N.transform(c.a,c.b,c.c,c.d,Object(h.converterDpi)(c.e,t.coreHelper.dpi),Object(h.converterDpi)(c.f,t.coreHelper.dpi)),N.drawImage(I,i,o),g.drawImage(w,R,r)}else{var M=document.createElement("canvas");M.width=Math.ceil(E.w),M.height=Math.ceil(E.h),M.style.width="".concat(Math.ceil(E.w),"px"),M.style.height="".concat(Math.ceil(E.h),"px");var U=M.getContext("2d");if(G&&G.length>0)for(var S=0;S<G.length;S++)for(var k=G[S].Clip,Y=0;Y<k.length;Y++){var d=k[Y].Area,H=void 0;d.CTM?H=d.CTM:s&&(H=s),U.beginPath();var K,J=e(d.Path.AbbreviatedData);try{for(J.s();!(K=J.n()).done;){var L=K.value;if("M"===L.cmd||"S"===L.cmd){var l=L.crds[0],f=L.crds[1];if(H){var u=t.ctmCalPoint(l,f,H);l=u.ctmX,f=u.ctmY}U.moveTo(Object(h.converterDpi)(l,t.coreHelper.dpi),Object(h.converterDpi)(f,t.coreHelper.dpi))}else if("L"===L.cmd){var p=L.crds[0],m=L.crds[1];if(H){var b=t.ctmCalPoint(p,m,H);p=b.ctmX,m=b.ctmY}U.lineTo(Object(h.converterDpi)(p,t.coreHelper.dpi),Object(h.converterDpi)(m,t.coreHelper.dpi))}else if("B"===L.cmd){var Z=L.crds[0],q=L.crds[1],W=L.crds[2],x=L.crds[3],V=L.crds[4],v=L.crds[5];if(H){var X=t.ctmCalPoint(Z,q,H);Z=X.ctmX,q=X.ctmY;var T=t.ctmCalPoint(W,x,H);W=T.ctmX,x=T.ctmY;var j=t.ctmCalPoint(V,v,H);V=j.ctmX,v=j.ctmY}U.bezierCurveTo(Object(h.converterDpi)(Z,t.coreHelper.dpi),Object(h.converterDpi)(q,t.coreHelper.dpi),Object(h.converterDpi)(W,t.coreHelper.dpi),Object(h.converterDpi)(x,t.coreHelper.dpi),Object(h.converterDpi)(V,t.coreHelper.dpi),Object(h.converterDpi)(v,t.coreHelper.dpi))}else if("Q"===L.cmd){var O=L.crds[0],z=L.crds[1],P=L.crds[2],_=L.crds[3];if(H){var $=t.ctmCalPoint(O,z,H);O=$.ctmX,z=$.ctmY;var AA=t.ctmCalPoint(P,_,H);P=AA.ctmX,_=AA.ctmY}U.quadraticCurveTo(Object(h.converterDpi)(O,t.coreHelper.dpi),Object(h.converterDpi)(z,t.coreHelper.dpi),Object(h.converterDpi)(P,t.coreHelper.dpi),Object(h.converterDpi)(_,t.coreHelper.dpi))}else"A"===L.cmd||"C"===L.cmd&&U.closePath()}}catch(A){J.e(A)}finally{J.f()}U.clip()}s&&U.transform(s.a/C/Object(h.ctmImageScale)(t.coreHelper.dpi),s.b/C/Object(h.ctmImageScale)(t.coreHelper.dpi),s.c/Q/Object(h.ctmImageScale)(t.coreHelper.dpi),s.d/Q/Object(h.ctmImageScale)(t.coreHelper.dpi),Object(h.converterDpi)(s.e,t.coreHelper.dpi),Object(h.converterDpi)(s.f,t.coreHelper.dpi)),U.drawImage(D,0,0),g.drawImage(M,i,o)}A()}})));case 5:case"end":return A.stop()}}),A,this)}))),function(A,I,g,B,C,E,i,o,D,t,h,w,s,a){return Q.apply(this,arguments)})},{key:"ctmCalPoint",value:function(A,I,g){return{ctmX:A*g.a+I*g.c+1*g.e,ctmY:A*g.b+I*g.d+1*g.f}}},{key:"renderPathObject",value:(B=C()(t.a.mark((function A(I,g,B,C,Q,E,i,o,D,w,s,a,c){var G,y,F,n,R,r,N,M,U,S,k,Y,d,H,K,J,L,l,f,u,p,m,b,Z,q,W,x,V,v,X,T,j,O,z,P,_,$,AA,IA,gA,BA,CA,QA,EA,iA,oA,DA;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(G=C.Boundary){A.next=3;break}return A.abrupt("return");case 3:if(y=1,G=Object(h.converterBox)(G,this.coreHelper.dpi),F=Math.ceil(G.w),n=Math.ceil(G.h),R=G.x,r=G.y,F-0!=0&&n-0!=0){A.next=11;break}return A.abrupt("return");case 11:if(N=document.createElement("canvas"),M=N.getContext("2d"),N.width=F*y,N.height=n*y,N.style.width="".concat(F,"px"),N.style.height="".concat(n,"px"),U=C.LineWidth,S=C.AbbreviatedData,k=C.CTM,Y=C.StrokeColor,d=C.FillColor,U&&(i=Object(h.converterDpi)(U,this.coreHelper.dpi)),(H=C.DrawParam)&&(K=Object(h.getDrawParam)(B,H),(U=K.LineWidth)&&(i=Object(h.converterDpi)(U,this.coreHelper.dpi)),K.FillColor&&(d&&d.Value||(d=K.FillColor)),K.StrokeColor&&(Y&&Y.Value||(Y=K.StrokeColor))),k&&M.transform(k.a,k.b,k.c,k.d,Object(h.converterDpi)(k.e,this.coreHelper.dpi),Object(h.converterDpi)(k.f,this.coreHelper.dpi)),J=!1,Y&&(Y.Value&&(E=Object(h.parseColor)(Y.Value)),L=Y.axialShd)){J=!0,l=Object(h.parseCtm)(L.StartPoint),f=Object(h.parseCtm)(L.EndPoint),u=M.createLinearGradient(l[0],l[1],f[0],f[1]),p=e(L.Segment);try{for(p.s();!(m=p.n()).done;)(b=m.value)&&u.addColorStop(b.position,Object(h.parseColor)(b.color.Value))}catch(A){p.e(A)}finally{p.f()}M.lineWidth=i,M.strokeStyle=u}if(Z=!1,d&&(d.Value&&(Q=Object(h.parseColor)(d.Value)),d.Alpha&&0===d.Alpha&&(M.globalAlpha=0),q=d.AxialShd)){Z=!0,W=Object(h.parseCtm)(q.StartPoint),x=Object(h.parseCtm)(q.EndPoint),V=M.createLinearGradient(W[0],W[1],x[0],x[1]),v=e(q.Segment);try{for(v.s();!(X=v.n()).done;)(T=X.value)&&V.addColorStop(T.position,Object(h.parseColor)(T.color.Value))}catch(A){v.e(A)}finally{v.f()}M.fillStyle=V}i>0&&!E&&((E=Q)||(E="rgb(0, 0, 0)")),C.Join&&M.setLineJoin(C["@_Join"]),C.Cap&&M.setLineCap(C["@_Cap"]),C.DashPattern&&(j=C.DashPattern,O=Object(h.parseCtm)(j),C.DashOffset&&C.DashOffset,M.setLineDash([Object(h.converterDpi)(O[0],this.coreHelper.dpi),Object(h.converterDpi)(O[1],this.coreHelper.dpi)])),M.beginPath(),z=e(S);try{for(z.s();!(P=z.n()).done;)"M"===(_=P.value).cmd||"S"===_.cmd?M.moveTo(Object(h.converterDpi)(_.crds[0],this.coreHelper.dpi),Object(h.converterDpi)(_.crds[1],this.coreHelper.dpi)):"L"===_.cmd?M.lineTo(Object(h.converterDpi)(_.crds[0],this.coreHelper.dpi),Object(h.converterDpi)(_.crds[1],this.coreHelper.dpi)):"B"===_.cmd?M.bezierCurveTo(Object(h.converterDpi)(_.crds[0],this.coreHelper.dpi),Object(h.converterDpi)(_.crds[1],this.coreHelper.dpi),Object(h.converterDpi)(_.crds[2],this.coreHelper.dpi),Object(h.converterDpi)(_.crds[3],this.coreHelper.dpi),Object(h.converterDpi)(_.crds[4],this.coreHelper.dpi),Object(h.converterDpi)(_.crds[5],this.coreHelper.dpi)):"Q"===_.cmd?M.quadraticCurveTo(Object(h.converterDpi)(_.crds[0],this.coreHelper.dpi),Object(h.converterDpi)(_.crds[1],this.coreHelper.dpi),Object(h.converterDpi)(_.crds[2],this.coreHelper.dpi),Object(h.converterDpi)(_.crds[3],this.coreHelper.dpi)):"A"===_.cmd||"C"===_.cmd&&M.closePath()}catch(A){z.e(A)}finally{z.f()}if(C.Stroke&&(J||(M.strokeStyle=E,M.lineWidth=i),M.stroke()),$=d.pattern,!C.Fill||$?M.fillStyle="none":(Z||(M.fillStyle=Q),M.fill(C.Rule)),!$){A.next=52;break}return M.save(),AA=document.createElement("canvas"),IA=AA.getContext("2d"),AA.width=Object(h.converterDpi)($.width,this.coreHelper.dpi),AA.height=Object(h.converterDpi)($.height,this.coreHelper.dpi),A.next=48,this.renderLayerByCanvas(AA,IA,c,B,a,null,$,!1,null,null,null);case 48:gA=M.createPattern(AA,"repeat"),M.fillStyle=gA,M.fillRect(0,0,F,n),M.restore();case 52:w?(BA=document.createElement("canvas"),CA=Object(h.converterBox)(w,this.coreHelper.dpi),QA=CA.w,EA=CA.h,iA=CA.x,oA=CA.y,BA.width=QA*y,BA.height=EA*y,BA.style.width="".concat(QA,"px"),BA.style.height="".concat(EA,"px"),DA=BA.getContext("2d"),s&&DA.transform(s.a,s.b,s.c,s.d,Object(h.converterDpi)(s.e,this.coreHelper.dpi),Object(h.converterDpi)(s.f,this.coreHelper.dpi)),D&&(DA.globalAlpha=D/255),DA.drawImage(N,R,r),g.drawImage(BA,iA,oA)):g.drawImage(N,R,r);case 53:case"end":return A.stop()}}),A,this)}))),function(A,I,g,C,Q,E,i,o,D,t,h,w,s){return B.apply(this,arguments)})},{key:"renderTextObject",value:(g=C()(t.a.mark((function A(I,g,B,C,Q,E,i,o,D,s){var a,c,G,y,F,n,R,r,N,M,U,S,k,Y,d,H,K,J,L,l,f,u,p,m,b,Z,q,W,x,V,v,X,T,j,O,z,P,_,$,AA,IA,gA,BA,CA,QA,EA,iA,oA,DA,tA,hA,wA,sA;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(a=1,c=C.Boundary,c=Object(h.converterBox)(c,this.coreHelper.dpi),G=C.CTM,y=C.HScale,F=C.Font,n=C.Weight,R=C.Size>0,G&&!R&&(G={a:-G.a,b:G.b,c:G.c,d:-G.d,e:-G.e,f:-G.f}),r=Object(h.converterDpi)(Math.abs(parseFloat(C.Size)),this.coreHelper.dpi),N=Object(h.calTextPoint)(this.coreHelper.dpi,C.TextCode,C.CGTransform,G,C.Boundary,D,s,R),(M=document.createElementNS("http://www.w3.org/2000/svg","svg")).setAttribute("xmlns","http://www.w3.org/2000/svg"),M.setAttribute("version","1.1"),U=C.FillColor,S=!1,(k=C.DrawParam)&&(Y=Object(h.getDrawParam)(i,k)).FillColor&&(U&&U.Value||(U=Y.FillColor)),U&&(U.Value&&(Q=Object(h.parseColor)(U.Value)),d=U.alpha,a=d/255,H=U.axialShd)){S=!0,(K=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id","".concat(C.ID)),K.setAttribute("x1","0%"),K.setAttribute("y1","0%"),K.setAttribute("x2","100%"),K.setAttribute("y2","100%"),J=e(H.Segment);try{for(J.s();!(L=J.n()).done;)(l=L.value)&&((f=document.createElement("stop")).setAttribute("offset","".concat(100*l.position,"%")),f.setAttribute("style","stop-color:".concat(Object(h.parseColor)(l.color.Value),";stop-opacity:1")),K.appendChild(f),Q=Object(h.parseColor)(l.color.Value))}catch(A){J.e(A)}finally{J.f()}M.appendChild(K)}C.Fill||(a=0),u=c.w,p=c.h,m=c.x,b=c.y,Z=r,q=r,W=0,G&&(x=G.a,V=G.b,v=G.c,X=G.d,T=x>0?Math.sign(x)*Math.sqrt(x*x+v*v):Math.sqrt(x*x+v*v),j=X>0?Math.sign(X)*Math.sqrt(V*V+X*X):Math.sqrt(V*V+X*X),0==(W=Math.atan2(-V,X))&&0!=x&&1==X||(Z*=T,q*=j),0==W&&y-0==1&&(y=x/X)>0&&(Z*=y)),s&&(O=s.a,z=s.b,P=s.c,_=s.d,$=O>0?Math.sign(O)*Math.sqrt(O*O+P*P):Math.sqrt(O*O+P*P),AA=_>0?Math.sign(_)*Math.sqrt(z*z+_*_):Math.sqrt(z*z+_*_),0==(W=Math.atan2(-z,_))&&0!=O&&1==_||(Z*=$,q*=AA,b*=AA,m*=$,u*=$,p*=AA)),IA=Object(h.getFont)(B,F),gA=e(N),A.prev=31,gA.s();case 33:if((BA=gA.n()).done){A.next=73;break}if(!(CA=BA.value)||isNaN(CA.x)){A.next=71;break}if(!CA.glyph){A.next=59;break}if(!IA||!IA.face){A.next=57;break}if(QA=Object(w.loadFaceInfo)(IA.face),EA=Object(w.FT_Glyph_Get_Measure)(IA.face,CA.glyph),(iA=this.render.drawGlyph(EA.glyphPath,EA.horiUnderlinePosition,QA.units_per_EM,Z,q,E||Q,a)).img.setAttribute("style","width: ".concat(Math.ceil(Z),"px; height:").concat(Math.ceil(q),"px")),oA="data:image/svg+xml;base64,".concat(Object(w.base64Encode)(iA.img.outerHTML)),0!==W){A.next=48;break}return A.next=46,this.drawTextFromSvg(I,g,oA,Math.ceil(CA.cx),CA.cy-iA.yScale*EA.horiUnderlinePosition-q);case 46:A.next=57;break;case 48:return(DA=document.createElement("canvas")).style.width="".concat(Math.ceil(Z),"px"),DA.style.height="".concat(Math.ceil(q),"px"),DA.width=Math.ceil(Z),DA.height=Math.ceil(q),tA=DA.getContext("2d"),A.next=56,this.drawTextFromSvg(DA,tA,oA,0,0,W,Math.ceil(Z)/2,Math.ceil(q)/2);case 56:g.drawImage(DA,Math.ceil(CA.cx),CA.cy-iA.yScale*EA.horiUnderlinePosition-q);case 57:A.next=71;break;case 59:(hA=document.createElementNS("http://www.w3.org/2000/svg","text")).setAttribute("x",CA.x),hA.setAttribute("y",CA.y),hA.innerHTML=CA.text,wA="",G&&(wA="matrix(".concat(G.a," ").concat(G.b," ").concat(G.c," ").concat(G.d," ").concat(Object(h.converterDpi)(G.e,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(G.f,this.coreHelper.dpi),")")),s&&(wA="".concat(wA," matrix(").concat(s.a," ").concat(s.b," ").concat(s.c," ").concat(s.d," ").concat(Object(h.converterDpi)(s.e,this.coreHelper.dpi)," ").concat(Object(h.converterDpi)(s.f,this.coreHelper.dpi),")")),y&&(wA="".concat(wA," matrix(").concat(y,", 0, 0, 1, ").concat((1-y)*CA.x,", 0)")),hA.setAttribute("transform",wA),S?hA.setAttribute("fill",Q):(hA.setAttribute("fill",E),hA.setAttribute("fill",Q),hA.setAttribute("fill-opacity",a)),hA.setAttribute("style","font-weight: ".concat(n,";font-size:").concat(r,"px;font-family: ").concat(Object(h.getFontFamily)(IA),";")),M.appendChild(hA);case 71:A.next=33;break;case 73:A.next=78;break;case 75:A.prev=75,A.t0=A.catch(31),gA.e(A.t0);case 78:return A.prev=78,gA.f(),A.finish(78);case 81:return M.setAttribute("style","overflow:visible;width:".concat(u,"px;height:").concat(p,"px")),sA="data:image/svg+xml;base64,".concat(Object(w.base64Encode)(M.outerHTML)),A.next=85,this.drawTextFromSvg(I,g,sA,m,b);case 85:case"end":return A.stop()}}),A,this,[[31,75,78,81]])}))),function(A,I,B,C,Q,E,i,o,D,t){return g.apply(this,arguments)})},{key:"drawTextFromSvg",value:(I=C()(t.a.mark((function A(I,g,B,C,Q,E,i,o){return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",new Promise((function(A,I){var D=new Image;D.src=B,D.onload=function(){0!=E&&i&&o&&(g.translate(i,o),g.rotate(-E),g.translate(-i,-o)),g.drawImage(D,C,Q),A()}})));case 1:case"end":return A.stop()}}),A)}))),function(A,g,B,C,Q,E,i,o){return I.apply(this,arguments)})}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"OfdThumbnailViewer",(function(){return a}));var B=g(2),C=g.n(B),Q=g(1),E=g.n(Q),i=g(20),o=g(27),D=g(35),t=g(34);function h(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return w(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return w(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function w(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var s="selected",a=function(){function A(I,g){C()(this,A),this.core=null,this.coreHelper=new t.Ofd_Core_Helper(96),this.ofdCanvasRender=new D.OfdCanvasRender(null,this.coreHelper),this.eventBus=g,this.container=I,this.pageDIV=[],this.currentPage=1,this.container&&(this.scroll=Object(i.watchScroll)(this.container,this._scrollUpdate.bind(this)))}return E()(A,[{key:"emptyNode",value:function(A){if(A)for(;A.firstChild;)A.removeChild(A.firstChild)}},{key:"freeThumbnailDocument",value:function(){this.pageDIV=[];var A=this.container;this.emptyNode(A)}},{key:"getScrollAhead",value:function(A){return!(!A.first||1!==A.first.id)||(!A.last||A.last.id!==this.pageDIV.length)&&scroll.down}},{key:"_scrollUpdate",value:function(){0!==this.core.getOFDPageCount(0)&&this.updateThumbnailView()}},{key:"_getVisibleThumbs",value:function(){return Object(i.getVisibleElements)({scrollEl:this.container,views:this.pageDIV})}},{key:"updateThumbnailView",value:function(){var A=this,I=this._getVisibleThumbs();if(0!==I.views.length){var g=this.getScrollAhead(I),B=Object(o.getHighestPriority)(I,this.pageDIV,g);if(B&&B.renderingState===i.RenderingStates.INITIAL){B.renderingState=i.RenderingStates.RUNNING;var C=B.ring,Q=document.createElement("canvas"),E=Q.getContext("2d");Q.style.height=C.style.height,Q.style.width=C.style.width,Q.width=1*this.coreHelper.pageRenderWidth(0,B.id-1,this.core),Q.height=1*this.coreHelper.pageRenderHeight(0,B.id-1,this.core);var D=Q.width/Q.height,t=document.createElement("img");t.className="thumbnailImage",t.style.width="98px",t.style.height=98/D+"px",this.ofdCanvasRender.renderPageByCanvas(Q,E,0,B.id-1).then((function(I){var g=Q.toDataURL();t.src=g,B.renderingState=i.RenderingStates.FINISHED,A.updateThumbnailView()})),C.appendChild(t)}}}},{key:"scrollThumbnailIntoView",value:function(A){if(A){var I=this.pageDIV[A-1];if(I){if(A!==this.currentPage)this.pageDIV[this.currentPage-1].div.classList.remove(s),I.div.classList.add(s);var g=this._getVisibleThumbs(),B=g.first,C=g.last,Q=g.views;if(Q.length>0){var E=!1;if(A<=B.id||A>=C.id)E=!0;else{var o,D=h(Q);try{for(D.s();!(o=D.n()).done;){var t=o.value,w=t.id,a=t.percent;if(w===A){E=a<100;break}}}catch(A){D.e(A)}finally{D.f()}}E&&Object(i.scrollIntoView)(I.div,{top:-19})}this.currentPage=A}}}},{key:"setOfdCore",value:function(A){var I=this;if(this.container){this.core&&this.freeThumbnailDocument(),this.core=A,this.ofdCanvasRender.setOfdCore(this.core);for(var g=this.container,B=this,C=function(A){var C=I.coreHelper.pageRenderWidth(0,A,I.core)/I.coreHelper.pageRenderHeight(0,A,I.core),Q=document.createElement("a");Q.onclick=function(){return B.eventBus.dispatch("jumpPage",{source:this,pageIndex:A+1}),!1};var E=document.createElement("div");E.className="thumbnail",E.setAttribute("data-page-number","".concat(A+1));var o=document.createElement("div");o.className="thumbnailSelectionRing";o.style.width="100px",o.style.height=98/C+2+"px",E.appendChild(o),Q.appendChild(E),I.pageDIV[A]={ring:o,div:E,anchor:Q,id:A+1,renderingState:i.RenderingStates.INITIAL},g.appendChild(Q)},Q=0;Q<this.core.getOFDPageCount(0);++Q)C(Q);this.updateThumbnailView()}}}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"PDFSidebar",(function(){return D}));var B=g(2),C=g.n(B),Q=g(1),E=g.n(Q),i=g(20),o="pdfSidebarNotification",D=function(){function A(I){var g=I.elements,B=I.ofdViewer,Q=I.ofdThumbnailViewer,E=I.eventBus,o=I.l10n;C()(this,A),this.isOpen=!1,this.active=i.SidebarView.THUMBS,this.isInitialViewSet=!1,this.onToggled=null,this.ofdViewer=B,this.ofdThumbnailViewer=Q,this.outerContainer=g.outerContainer,this.viewerContainer=g.viewerContainer,this.toggleButton=g.toggleButton,this.thumbnailButton=g.thumbnailButton,this.outlineButton=g.outlineButton,this.attachmentsButton=g.attachmentsButton,this.layersButton=g.layersButton,this.signaturesButton=g.signaturesButton,this.thumbnailView=g.thumbnailView,this.outlineView=g.outlineView,this.attachmentsView=g.attachmentsView,this.layersView=g.layersView,this.signaturesView=g.signaturesView,this._outlineOptionsContainer=g.outlineOptionsContainer,this._currentOutlineItemButton=g.currentOutlineItemButton,this.eventBus=E,this.l10n=o,this._addEventListeners()}return E()(A,[{key:"reset",value:function(){this.isInitialViewSet=!1,this._hideUINotification(!0),this.switchView(i.SidebarView.OUTLINE),this.outlineButton.disabled=!1,this.attachmentsButton.disabled=!1,this.layersButton.disabled=!1,this._currentOutlineItemButton.disabled=!0}},{key:"visibleView",get:function(){return this.isOpen?this.active:i.SidebarView.NONE}},{key:"isThumbnailViewVisible",get:function(){return this.isOpen&&this.active===i.SidebarView.THUMBS}},{key:"isOutlineViewVisible",get:function(){return this.isOpen&&this.active===i.SidebarView.OUTLINE}},{key:"isAttachmentsViewVisible",get:function(){return this.isOpen&&this.active===i.SidebarView.ATTACHMENTS}},{key:"isLayersViewVisible",get:function(){return this.isOpen&&this.active===i.SidebarView.LAYERS}},{key:"isSignatureViewVisible",get:function(){return this.isOpen&&this.active===i.SidebarView.SIGNATURES}},{key:"setInitialView",value:function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.SidebarView.NONE;this.isInitialViewSet||(this.isInitialViewSet=!0,A!==i.SidebarView.NONE&&A!==i.SidebarView.UNKNOWN&&this._switchView(A,!0)||this._dispatchEvent())}},{key:"switchView",value:function(A){var I=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._switchView(A,I)}},{key:"_switchView",value:function(A){var I=arguments.length>1&&void 0!==arguments[1]&&arguments[1],g=A!==this.active,B=!1;switch(A){case i.SidebarView.NONE:return!!this.isOpen&&(this.close(),!0);case i.SidebarView.THUMBS:this.isOpen&&g&&(B=!0);break;case i.SidebarView.OUTLINE:if(this.outlineButton.disabled)return!1;break;case i.SidebarView.ATTACHMENTS:if(this.attachmentsButton.disabled)return!1;break;case i.SidebarView.LAYERS:if(this.layersButton.disabled)return!1;break;case i.SidebarView.SIGNATURES:if(this.signaturesButton.disabled)return!1;break;default:return!1}this.active=A;var C=A===i.SidebarView.THUMBS,Q=A===i.SidebarView.OUTLINE,E=A===i.SidebarView.ATTACHMENTS,o=A===i.SidebarView.LAYERS,D=A===i.SidebarView.SIGNATURES;return this.thumbnailButton&&this.thumbnailButton.classList.toggle("toggled",C),this.outlineButton&&this.outlineButton.classList.toggle("toggled",Q),this.attachmentsButton&&this.attachmentsButton.classList.toggle("toggled",E),this.layersButton&&this.layersButton.classList.toggle("toggled",o),this.signaturesButton&&this.signaturesButton.classList.toggle("toggled",D),this.thumbnailButton&&this.thumbnailButton.setAttribute("aria-checked",C),this.outlineButton&&this.outlineButton.setAttribute("aria-checked",Q),this.attachmentsButton&&this.attachmentsButton.setAttribute("aria-checked",E),this.layersButton&&this.layersButton.setAttribute("aria-checked",o),this.signaturesButton&&this.signaturesButton.setAttribute("aria-checked",D),this.thumbnailView&&this.thumbnailView.classList.toggle("hidden",!C),this.outlineView&&this.outlineView.classList.toggle("hidden",!Q),this.attachmentsView&&this.attachmentsView.classList.toggle("hidden",!E),this.layersView&&this.layersView.classList.toggle("hidden",!o),this.signaturesView&&this.signaturesView.classList.toggle("hidden",!D),this._outlineOptionsContainer&&this._outlineOptionsContainer.classList.toggle("hidden",!Q),I&&!this.isOpen?(this.open(),!0):(B&&(this._updateThumbnailViewer(),this._forceRendering()),g&&this._dispatchEvent(),g)}},{key:"open",value:function(){this.isOpen||(this.isOpen=!0,this.toggleButton.classList.add("toggled"),this.toggleButton.setAttribute("aria-expanded","true"),this.outerContainer.classList.add("sidebarMoving","sidebarOpen"),this.active===i.SidebarView.THUMBS&&this._updateThumbnailViewer(),this._forceRendering(),this._dispatchEvent(),this._hideUINotification())}},{key:"close",value:function(){this.isOpen&&(this.isOpen=!1,this.toggleButton.classList.remove("toggled"),this.toggleButton.setAttribute("aria-expanded","false"),this.outerContainer.classList.add("sidebarMoving"),this.outerContainer.classList.remove("sidebarOpen"),this._forceRendering(),this._dispatchEvent())}},{key:"toggle",value:function(){this.isOpen?this.close():this.open()}},{key:"_dispatchEvent",value:function(){this.eventBus.dispatch("sidebarviewchanged",{source:this,view:this.isOutlineViewVisible})}},{key:"_forceRendering",value:function(){this.onToggled?this.onToggled():(this.ofdViewer.forceRendering(),this.ofdThumbnailViewer&&this.ofdThumbnailViewer.updateThumbnailView())}},{key:"_updateThumbnailViewer",value:function(){var A=this.ofdViewer;this.ofdThumbnailViewer.scrollThumbnailIntoView(A.currentPageNumber)}},{key:"_showUINotification",value:function(){var A=this;this.l10n.get("toggle_sidebar_notification2.title").then((function(I){A.toggleButton.title=I})),this.isOpen||this.toggleButton.classList.add(o)}},{key:"_hideUINotification",value:function(){var A=this,I=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(this.isOpen||I)&&this.toggleButton.classList.remove(o),I&&this.l10n.get("toggle_sidebar.title").then((function(I){A.toggleButton.title=I}))}},{key:"_addEventListeners",value:function(){var A,I,g,B,C,Q,E,o,D,t,h=this;null===(A=this.viewerContainer)||void 0===A||A.addEventListener("transitionend",(function(A){A.target===h.viewerContainer&&h.outerContainer.classList.remove("sidebarMoving")})),null===(I=this.toggleButton)||void 0===I||I.addEventListener("click",(function(){h.toggle()})),null===(g=this.thumbnailButton)||void 0===g||g.addEventListener("click",(function(){h.switchView(i.SidebarView.THUMBS)})),null===(B=this.outlineButton)||void 0===B||B.addEventListener("click",(function(){h.switchView(i.SidebarView.OUTLINE)})),null===(C=this.outlineButton)||void 0===C||C.addEventListener("dblclick",(function(){h.eventBus.dispatch("toggleoutlinetree",{source:h})})),null===(Q=this.attachmentsButton)||void 0===Q||Q.addEventListener("click",(function(){h.switchView(i.SidebarView.ATTACHMENTS)})),null===(E=this.layersButton)||void 0===E||E.addEventListener("click",(function(){h.switchView(i.SidebarView.LAYERS)})),null===(o=this.layersButton)||void 0===o||o.addEventListener("dblclick",(function(){h.eventBus.dispatch("resetlayers",{source:h})})),null===(D=this.signaturesButton)||void 0===D||D.addEventListener("click",(function(){h.switchView(i.SidebarView.SIGNATURES)})),null===(t=this._currentOutlineItemButton)||void 0===t||t.addEventListener("click",(function(){h.eventBus.dispatch("currentoutlineitem",{source:h})}));var w=function(A,I,g){I.disabled=!A,A?h._showUINotification():h.active===g&&h.switchView(i.SidebarView.THUMBS)};this.eventBus._on("outlineloaded",(function(A){w(A.outlineCount,h.outlineButton,i.SidebarView.OUTLINE),A.currentOutlineItemPromise.then((function(A){h.isInitialViewSet&&(h._currentOutlineItemButton.disabled=!A)}))})),this.eventBus._on("attachmentsloaded",(function(A){w(A.attachmentsCount,h.attachmentsButton,i.SidebarView.ATTACHMENTS)})),this.eventBus._on("layersloaded",(function(A){w(A.layersCount,h.layersButton,i.SidebarView.LAYERS)})),this.eventBus._on("presentationmodechanged",(function(A){A.state===i.PresentationModeState.NORMAL&&h.isThumbnailViewVisible&&h._updateThumbnailViewer()}))}}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"OverlayManager",(function(){return h}));var B=g(3),C=g.n(B),Q=g(2),E=g.n(Q),i=g(1),o=g.n(i),D=g(4),t=g.n(D),h=function(){function A(){E()(this,A),this.overlays=new WeakMap}var I,g,B,Q;return o()(A,[{key:"register",value:(Q=C()(t.a.mark((function A(I){var g,B=this,C=arguments;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(g=C.length>1&&void 0!==C[1]&&C[1],"object"==typeof I){A.next=5;break}throw new Error("Not enough parameters.");case 5:if(!this.overlays.has(I)){A.next=7;break}throw new Error("The overlay is already registered.");case 7:this.overlays.set(I,{canForceClose:g}),"undefined"!=typeof PDFJSDev&&PDFJSDev.test("GENERIC && !SKIP_BABEL")&&I.showModal,I.addEventListener("cancel",(function(A){B.active=null}));case 10:case"end":return A.stop()}}),A,this)}))),function(A){return Q.apply(this,arguments)})},{key:"unregister",value:(B=C()(t.a.mark((function A(I){return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(this.overlays.has(I)){A.next=4;break}throw new Error("The overlay does not exist.");case 4:if(this.active!==I){A.next=6;break}throw new Error("The overlay cannot be removed while it is active.");case 6:this.overlays.delete(I);case 7:case"end":return A.stop()}}),A,this)}))),function(A){return B.apply(this,arguments)})},{key:"open",value:(g=C()(t.a.mark((function A(I){return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(this.overlays.has(I)){A.next=4;break}throw new Error("The overlay does not exist.");case 4:if(!this.active){A.next=15;break}if(this.active!==I){A.next=9;break}throw new Error("The overlay is already active.");case 9:if(!this.overlays.get(I).canForceClose){A.next=14;break}return A.next=12,this.close();case 12:A.next=15;break;case 14:throw new Error("Another overlay is currently active.");case 15:this.active=I,"function"==typeof I.showModal&&I.showModal();case 17:case"end":return A.stop()}}),A,this)}))),function(A){return g.apply(this,arguments)})},{key:"close",value:(I=C()(t.a.mark((function A(){var I,g=arguments;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(I=g.length>0&&void 0!==g[0]?g[0]:this.active,this.overlays.has(I)){A.next=5;break}throw new Error("The overlay does not exist.");case 5:if(this.active){A.next=9;break}throw new Error("The overlay is currently not active.");case 9:if(this.active===I){A.next=11;break}throw new Error("Another overlay is currently active.");case 11:I.close(),this.active=null;case 13:case"end":return A.stop()}}),A,this)}))),function(){return I.apply(this,arguments)})}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"PDFDocumentProperties",(function(){return w}));var B=g(3),C=g.n(B),Q=g(2),E=g.n(Q),i=g(1),o=g.n(i),D=g(4),t=g.n(D),h=(g(20),"-"),w=function(){function A(I,g,B,C){var Q=this,i=I.dialog,o=I.fields,D=I.closeButton;E()(this,A),this.dialog=i,this.fields=o,this.overlayManager=g,this.l10n=C,this.fieldData=null,this.reset(),D.addEventListener("click",this.close.bind(this)),this.overlayManager.register(this.dialog),B._on("pagechanging",(function(A){Q._currentPageNumber=A.pageNumber})),B._on("rotationchanging",(function(A){Q._pagesRotation=A.pagesRotation})),this._isNonMetricLocale=!0}var I,g;return o()(A,[{key:"open",value:(g=C()(t.a.mark((function A(){var I,g,B,C,Q,E;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(this.dialog.hidden=!1,this.ofdCore){A.next=3;break}return A.abrupt("return");case 3:if(this.overlayManager.open(this.dialog),I=this._currentPageNumber,g=this._pagesRotation,!this.fieldData||I!==this.fieldData._currentPageNumber||g!==this.fieldData._pagesRotation){A.next=9;break}return this.updateUI(),A.abrupt("return");case 9:B=this.getMetadata(),C=B.info,B.contentDispositionFilename,Q=B.contentLength,E=this.parseFileSize(Q),this.fieldData=Object.freeze({fileSize:E,title:C.Title,author:C.Author,subject:C.Subject,keywords:C.Keywords,creationDate:C.CreationDate,modificationDate:C.ModificationDate,creator:C.Creator,producer:C.Producer,version:C.CreatorVersion,pageCount:C.numPages,pageSize:C.pageSize,_currentPageNumber:I,_pagesRotation:g}),this.updateUI();case 13:case"end":return A.stop()}}),A,this)}))),function(){return g.apply(this,arguments)})},{key:"close",value:(I=C()(t.a.mark((function A(){return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:this.overlayManager.close(this.dialog);case 1:case"end":return A.stop()}}),A,this)}))),function(){return I.apply(this,arguments)})},{key:"setOfdCore",value:function(A){var I=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.ofdCore&&(this.reset(),this.updateUI(!0)),A&&(this.ofdCore=A,this.url=I)}},{key:"getMetadata",value:function(){if(this.ofdCore)return{info:this.ofdCore.getMetadata(0),contentLength:this.ofdCore.ofd.size}}},{key:"reset",value:function(){this.ofdCore=null,this.url=null,this.fieldData=null,this._currentPageNumber=1,this._pagesRotation=0}},{key:"updateUI",value:function(){var A=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!A&&this.fieldData){if(this.overlayManager.active===this.dialog)for(var I in this.fields){var g=this.fieldData[I];this.fields[I].textContent=g||0===g?g:h}}else for(var B in this.fields)this.fields[B].textContent=h}},{key:"parseFileSize",value:function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,I=A/1024,g=I/1024;if(I)return g>=1?"".concat(g>=1&&(+g.toPrecision(3)).toLocaleString(),"mb(").concat(A.toLocaleString(),"字节)"):"".concat(g<1&&(+I.toPrecision(3)).toLocaleString(),"kb(").concat(A.toLocaleString(),"字节)")}},{key:"parseLinearization",value:function(A){return this.l10n.get("document_properties_linearized_".concat(A?"yes":"no"))}}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"Toolbar",(function(){return h}));var B=g(2),C=g.n(B),Q=g(1),E=g.n(Q),i=g(20);function o(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return D(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return D(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function D(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var t="visiblePageIsLoading",h=function(){function A(I,g,B){C()(this,A),this.toolbar=I.container,this.eventBus=g,this.l10n=B,this.buttons=[{element:I.previous,eventName:"previouspage"},{element:I.next,eventName:"nextpage"},{element:I.zoomIn,eventName:"zoomin"},{element:I.zoomOut,eventName:"zoomout"},{element:I.openFile,eventName:"openfile"},{element:I.print,eventName:"print"},{element:I.presentationModeButton,eventName:"presentationmode"},{element:I.download,eventName:"download"},{element:I.viewBookmark,eventName:null}],this.items={numPages:I.numPages,pageNumber:I.pageNumber,scaleSelect:I.scaleSelect,customScaleOption:I.customScaleOption,previous:I.previous,next:I.next,zoomIn:I.zoomIn,zoomOut:I.zoomOut},this._wasLocalized=!1,this.reset(),this._bindListeners()}return E()(A,[{key:"setPageNumber",value:function(A,I){this.pageNumber=A,this.pageLabel=I,this._updateUIState(!1)}},{key:"setPagesCount",value:function(A,I){this.pagesCount=A,this.hasPageLabels=I,this._updateUIState(!0)}},{key:"setPageScale",value:function(A,I){this.pageScaleValue=(A||I).toString(),this.pageScale=I,this._updateUIState(!1)}},{key:"reset",value:function(){this.pageNumber=0,this.pageLabel=null,this.hasPageLabels=!1,this.pagesCount=0,this.pageScaleValue=i.DEFAULT_SCALE_VALUE,this.pageScale=i.DEFAULT_SCALE,this._updateUIState(!0),this.updateLoadingIndicatorState()}},{key:"_bindListeners",value:function(){var A,I=this,g=this.items,B=g.pageNumber,C=g.scaleSelect,Q=this,E=o(this.buttons);try{var D=function(){var g=A.value,B=g.element,C=g.eventName;null==B||B.addEventListener("click",(function(A){null!==C&&I.eventBus.dispatch(C,{source:I})}))};for(E.s();!(A=E.n()).done;)D()}catch(A){E.e(A)}finally{E.f()}B.addEventListener("click",(function(){this.select()})),B.addEventListener("change",(function(){Q.eventBus.dispatch("pagenumberchanged",{source:Q,value:this.value})})),C.addEventListener("change",(function(){"custom"!==this.value&&Q.eventBus.dispatch("scalechanged",{source:Q,value:this.value})})),C.addEventListener("click",(function(A){var I=A.target;this.value===Q.pageScaleValue&&"OPTION"===I.tagName.toUpperCase()&&this.blur()})),C.oncontextmenu=i.noContextMenuHandler,this.eventBus._on("localized",(function(){I._wasLocalized=!0,I._updateUIState(!0)}))}},{key:"_updateUIState",value:function(){var A=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._wasLocalized){var I=this.pageNumber,g=this.pagesCount,B=this.pageScaleValue,C=this.pageScale,Q=this.items;A&&(this.hasPageLabels?Q.pageNumber.type="text":(Q.pageNumber.type="number",this.l10n.get("of_pages",{pagesCount:g}).then((function(A){Q.numPages.textContent=A}))),Q.pageNumber.max=g),this.hasPageLabels?(Q.pageNumber.value=this.pageLabel,this.l10n.get("page_of_pages",{pageNumber:I,pagesCount:g}).then((function(A){Q.numPages.textContent=A}))):Q.pageNumber.value=I,Q.previous.disabled=I<=1,Q.next.disabled=I>=g,Q.zoomOut.disabled=C<=i.MIN_SCALE,Q.zoomIn.disabled=C>=i.MAX_SCALE;var E,D=!1,t=o(Q.scaleSelect.options);try{for(t.s();!(E=t.n()).done;){var h=E.value;h.value===B?(h.selected=!0,D=!0):h.selected=!1}}catch(A){t.e(A)}finally{t.f()}D||(Q.customScaleOption.textContent="".concat(1e4*C/100,"%"),Q.customScaleOption.selected=!0)}}},{key:"updateLoadingIndicatorState",value:function(){var A=arguments.length>0&&void 0!==arguments[0]&&arguments[0],I=this.items.pageNumber;I.classList.toggle(t,A)}}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"SecondaryToolbar",(function(){return h}));var B=g(2),C=g.n(B),Q=g(1),E=g.n(Q),i=g(20),o=g(42);function D(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return t(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return t(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function t(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var h=function(){function A(I,g,B){C()(this,A),this.toolbar=I.toolbar,this.toggleButton=I.toggleButton,this.toolbarButtonContainer=I.toolbarButtonContainer,this.buttons=[{element:I.presentationModeButton,eventName:"presentationmode",close:!0},{element:I.openFileButton,eventName:"openfile",close:!0},{element:I.printButton,eventName:"print",close:!0},{element:I.downloadButton,eventName:"download",close:!0},{element:I.viewBookmarkButton,eventName:null,close:!0},{element:I.firstPageButton,eventName:"firstpage",close:!0},{element:I.lastPageButton,eventName:"lastpage",close:!0},{element:I.pageRotateCwButton,eventName:"rotatecw",close:!1},{element:I.pageRotateCcwButton,eventName:"rotateccw",close:!1},{element:I.cursorSelectToolButton,eventName:"switchcursortool",eventDetails:{tool:o.CursorTool.SELECT},close:!0},{element:I.cursorHandToolButton,eventName:"switchcursortool",eventDetails:{tool:o.CursorTool.HAND},close:!0},{element:I.scrollPageButton,eventName:"switchscrollmode",eventDetails:{mode:i.ScrollMode.PAGE},close:!0},{element:I.scrollVerticalButton,eventName:"switchscrollmode",eventDetails:{mode:i.ScrollMode.VERTICAL},close:!0},{element:I.scrollHorizontalButton,eventName:"switchscrollmode",eventDetails:{mode:i.ScrollMode.HORIZONTAL},close:!0},{element:I.scrollWrappedButton,eventName:"switchscrollmode",eventDetails:{mode:i.ScrollMode.WRAPPED},close:!0},{element:I.spreadNoneButton,eventName:"switchspreadmode",eventDetails:{mode:i.SpreadMode.NONE},close:!0},{element:I.spreadOddButton,eventName:"switchspreadmode",eventDetails:{mode:i.SpreadMode.ODD},close:!0},{element:I.spreadEvenButton,eventName:"switchspreadmode",eventDetails:{mode:i.SpreadMode.EVEN},close:!0},{element:I.documentPropertiesButton,eventName:"documentproperties",close:!0}],this.items={firstPage:I.firstPageButton,lastPage:I.lastPageButton,pageRotateCw:I.pageRotateCwButton,pageRotateCcw:I.pageRotateCcwButton},this.mainContainer=g,this.eventBus=B,this.opened=!1,this.containerHeight=null,this.previousContainerHeight=null,this.reset(),this.bindClickListeners(),this.bindCursorToolsListener(I),this.bindScrollModeListener(I),this.bindSpreadModeListener(I),this.eventBus._on("resize",this.setMaxHeight.bind(this))}return E()(A,[{key:"isOpen",get:function(){return this.opened}},{key:"setPageNumber",value:function(A){this.pageNumber=A,this.updateUIState()}},{key:"setPagesCount",value:function(A){this.pagesCount=A,this.updateUIState()}},{key:"reset",value:function(){this.pageNumber=0,this.pagesCount=0,this.updateUIState(),this.eventBus.dispatch("secondarytoolbarreset",{source:this})}},{key:"updateUIState",value:function(){this.items.firstPage&&(this.items.firstPage.disabled=this.pageNumber<=1),this.items.lastPage&&(this.items.lastPage.disabled=this.pageNumber>=this.pagesCount),this.items.pageRotateCw&&(this.items.pageRotateCw.disabled=0===this.pagesCount),this.items.pageRotateCcw&&(this.items.pageRotateCcw.disabled=0===this.pagesCount)}},{key:"bindClickListeners",value:function(){var A,I=this;null===(A=this.toggleButton)||void 0===A||A.addEventListener("click",this.toggle.bind(this));var g,B=D(this.buttons);try{var C=function(){var A=g.value,B=A.element,C=A.eventName,Q=A.close,E=A.eventDetails;null==B||B.addEventListener("click",(function(A){if(null!==C){var g={source:I};for(var B in E)g[B]=E[B];I.eventBus.dispatch(C,g)}Q&&I.close()}))};for(B.s();!(g=B.n()).done;)C()}catch(A){B.e(A)}finally{B.f()}}},{key:"bindCursorToolsListener",value:function(A){var I=A.cursorSelectToolButton,g=A.cursorHandToolButton;this.eventBus._on("cursortoolchanged",(function(A){var B=A.tool,C=B===o.CursorTool.SELECT,Q=B===o.CursorTool.HAND;I.classList.toggle("toggled",C),g.classList.toggle("toggled",Q),I.setAttribute("aria-checked",C),g.setAttribute("aria-checked",Q)}))}},{key:"bindScrollModeListener",value:function(A){var I=this,g=A.scrollPageButton,B=A.scrollVerticalButton,C=A.scrollHorizontalButton,Q=A.scrollWrappedButton,E=A.spreadNoneButton,o=A.spreadOddButton,D=A.spreadEvenButton,t=function(A){var t=A.mode,h=t===i.ScrollMode.PAGE,w=t===i.ScrollMode.VERTICAL,s=t===i.ScrollMode.HORIZONTAL,a=t===i.ScrollMode.WRAPPED;g.classList.toggle("toggled",h),B.classList.toggle("toggled",w),C.classList.toggle("toggled",s),Q.classList.toggle("toggled",a),g.setAttribute("aria-checked",h),B.setAttribute("aria-checked",w),C.setAttribute("aria-checked",s),Q.setAttribute("aria-checked",a);var e=I.pagesCount>15e3;g.disabled=e,B.disabled=e,C.disabled=e,Q.disabled=e,E.disabled=s,o.disabled=s,D.disabled=s};this.eventBus._on("scrollmodechanged",t),this.eventBus._on("secondarytoolbarreset",(function(A){A.source===I&&t({mode:i.ScrollMode.VERTICAL})}))}},{key:"bindSpreadModeListener",value:function(A){var I=this,g=A.spreadNoneButton,B=A.spreadOddButton,C=A.spreadEvenButton;function Q(A){var I=A.mode,Q=I===i.SpreadMode.NONE,E=I===i.SpreadMode.ODD,o=I===i.SpreadMode.EVEN;g.classList.toggle("toggled",Q),B.classList.toggle("toggled",E),C.classList.toggle("toggled",o),g.setAttribute("aria-checked",Q),B.setAttribute("aria-checked",E),C.setAttribute("aria-checked",o)}this.eventBus._on("spreadmodechanged",Q),this.eventBus._on("secondarytoolbarreset",(function(A){A.source===I&&Q({mode:i.SpreadMode.NONE})}))}},{key:"open",value:function(){this.opened||(this.opened=!0,this.setMaxHeight(),this.toggleButton.classList.add("toggled"),this.toggleButton.setAttribute("aria-expanded","true"),this.toolbar.classList.remove("hidden"))}},{key:"close",value:function(){this.opened&&(this.opened=!1,this.toolbar.classList.add("hidden"),this.toggleButton.classList.remove("toggled"),this.toggleButton.setAttribute("aria-expanded","false"))}},{key:"toggle",value:function(){this.opened?this.close():this.open()}},{key:"setMaxHeight",value:function(){this.opened&&(this.containerHeight=this.mainContainer.clientHeight,this.containerHeight!==this.previousContainerHeight&&(this.toolbarButtonContainer.style.maxHeight="".concat(this.containerHeight-i.SCROLLBAR_PADDING,"px"),this.previousContainerHeight=this.containerHeight))}}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"CursorTool",(function(){return D})),g.d(I,"PDFCursorTools",(function(){return t}));var B=g(2),C=g.n(B),Q=g(1),E=g.n(Q),i=g(43),o=g(20),D={SELECT:0,HAND:1,ZOOM:2},t=function(){function A(I){var g=this,B=I.container,Q=I.eventBus,E=I.cursorToolOnLoad,o=void 0===E?D.SELECT:E;C()(this,A),this.container=B,this.eventBus=Q,this.active=D.SELECT,this.activeBeforePresentationMode=null,this.handTool=new i.GrabToPan({element:this.container}),this.addEventListeners(),Promise.resolve().then((function(){g.switchTool(o)}))}return E()(A,[{key:"activeTool",get:function(){return this.active}},{key:"switchTool",value:function(A){var I=this;if(null===this.activeBeforePresentationMode&&A!==this.active){var g=function(){switch(I.active){case D.SELECT:break;case D.HAND:I.handTool.deactivate();case D.ZOOM:}};switch(A){case D.SELECT:g();break;case D.HAND:g(),this.handTool.activate();break;case D.ZOOM:default:return}this.active=A,this.dispatchEvent()}}},{key:"dispatchEvent",value:function(){this.eventBus.dispatch("cursortoolchanged",{source:this,tool:this.active})}},{key:"addEventListeners",value:function(){var A=this;this.eventBus._on("switchcursortool",(function(I){A.switchTool(I.tool)})),this.eventBus._on("presentationmodechanged",(function(I){switch(I.state){case o.PresentationModeState.FULLSCREEN:var g=A.active;A.switchTool(D.SELECT),A.activeBeforePresentationMode=g;break;case o.PresentationModeState.NORMAL:var B=A.activeBeforePresentationMode;A.activeBeforePresentationMode=null,A.switchTool(B)}}))}}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"GrabToPan",(function(){return o}));var B=g(2),C=g.n(B),Q=g(1),E=g.n(Q),i="grab-to-pan-grab",o=function(){function A(I){C()(this,A),this.element=I.element,this.document=I.element.ownerDocument,"function"==typeof I.ignoreTarget&&(this.ignoreTarget=I.ignoreTarget),this.onActiveChanged=I.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._endPan=this.endPan.bind(this),(this.overlay=document.createElement("div")).className="grab-to-pan-grabbing"}return E()(A,[{key:"activate",value:function(){this.active||(this.active=!0,this.element.addEventListener("mousedown",this._onMouseDown,!0),this.element.classList.add(i),this.onActiveChanged&&this.onActiveChanged(!0))}},{key:"deactivate",value:function(){this.active&&(this.active=!1,this.element.removeEventListener("mousedown",this._onMouseDown,!0),this._endPan(),this.element.classList.remove(i),this.onActiveChanged&&this.onActiveChanged(!1))}},{key:"toggle",value:function(){this.active?this.deactivate():this.activate()}},{key:"ignoreTarget",value:function(A){return A.matches("a[href], a[href] *, input, textarea, button, button *, select, option")}},{key:"onMouseDown",value:function(A){if(0===A.button&&!this.ignoreTarget(A.target)){if(A.originalTarget)try{A.originalTarget.tagName}catch(A){return}this.scrollLeftStart=this.element.scrollLeft,this.scrollTopStart=this.element.scrollTop,this.clientXStart=A.clientX,this.clientYStart=A.clientY,this.document.addEventListener("mousemove",this._onMouseMove,!0),this.document.addEventListener("mouseup",this._endPan,!0),this.element.addEventListener("scroll",this._endPan,!0),A.preventDefault(),A.stopPropagation();var I=document.activeElement;I&&!I.contains(A.target)&&I.blur()}}},{key:"onMouseMove",value:function(A){if(this.element.removeEventListener("scroll",this._endPan,!0),1&A.buttons){var I=A.clientX-this.clientXStart,g=A.clientY-this.clientYStart,B=this.scrollTopStart-g,C=this.scrollLeftStart-I;this.element.scrollTo?this.element.scrollTo({top:B,left:C,behavior:"instant"}):(this.element.scrollTop=B,this.element.scrollLeft=C),this.overlay.parentNode||document.body.appendChild(this.overlay)}else this._endPan()}},{key:"endPan",value:function(){this.element.removeEventListener("scroll",this._endPan,!0),this.document.removeEventListener("mousemove",this._onMouseMove,!0),this.document.removeEventListener("mouseup",this._endPan,!0),this.overlay.remove()}}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"Print",(function(){return e}));var B=g(3),C=g.n(B),Q=g(2),E=g.n(Q),i=g(1),o=g.n(i),D=g(4),t=g.n(D),h=(g(35),g(28)),w=g(34);function s(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return a(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return a(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function a(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var e=function(){function A(I,g,B){E()(this,A),this.coreHelper=new w.Ofd_Core_Helper(40),this.dialog=I||document.getElementById("printServiceDialog"),this.overlayManager=g,this.l10n=B,this.ofdRender=new h.Ofd_Render(null,this.coreHelper),document.getElementById("printCancel").addEventListener("click",this.close.bind(this)),this.overlayManager.register(this.dialog),this.progressBar=this.dialog.querySelector("progress"),this.progressPerc=this.dialog.querySelector(".relative-progress"),this.abort=!1}var I,g,B;return o()(A,[{key:"setOfdCore",value:function(A){this.core=A,this.ofdRender.setOfdCore(this.core)}},{key:"close",value:(B=C()(t.a.mark((function A(){return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:this.abort=!0,this.overlayManager.close(this.dialog);case 2:case"end":return A.stop()}}),A,this)}))),function(){return B.apply(this,arguments)})},{key:"open",value:(g=C()(t.a.mark((function A(){var I=this;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(this.core){A.next=2;break}return A.abrupt("return");case 2:return this.abort=!1,this.overlayManager.open(this.dialog),A.next=6,this.renderProgress(0);case 6:setTimeout((function(){I.prepare().then((function(A){if(A&&A.length>0){I.close();var g,B=window.open("打印窗口","_blank"),C=B.document.body,Q=s(A);try{for(Q.s();!(g=Q.n()).done;){var E=g.value;C.appendChild(E)}}catch(A){Q.e(A)}finally{Q.f()}B.focus(),B.print(),B.close()}}))}),100);case 7:case"end":return A.stop()}}),A,this)}))),function(){return g.apply(this,arguments)})},{key:"prepare",value:(I=C()(t.a.mark((function A(){var I=this;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",new Promise(function(){var A=C()(t.a.mark((function A(g,B){var C,Q,E,i,o;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:C=[],Q=0;case 2:if(!(Q<I.core.getOFDPageCount(0))||I.abort){A.next=21;break}return E=785/I.core.pageWidth(0,Q)*25.4,I.ofdRender.setDpi(E),(i=document.createElement("canvas")).style.width="794px",i.style.height="1123px",(o=document.createElement("div")).style.width="794px",o.style.height="1123px",o.style.position="relative",o.appendChild(i),A.next=15,I.ofdRender.renderPage(o,0,Q);case 15:return C.push(o),A.next=18,I.renderProgress(Q+1);case 18:Q++,A.next=2;break;case 21:I.abort&&g(),g(C);case 23:case"end":return A.stop()}}),A)})));return function(I,g){return A.apply(this,arguments)}}()));case 1:case"end":return A.stop()}}),A)}))),function(){return I.apply(this,arguments)})},{key:"renderProgress",value:function(A){var I=this;return new Promise((function(g,B){var C=Math.round(100*A/I.core.getOFDPageCount(0));I.progressBar.value=C,I.l10n.get("print_progress_percent",{progress:C}).then((function(A){I.progressPerc.textContent=A})),setTimeout((function(){g()}),100)}))}}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"Print_api",(function(){return e}));var B=g(3),C=g.n(B),Q=g(2),E=g.n(Q),i=g(1),o=g.n(i),D=g(4),t=g.n(D),h=g(28),w=g(34);function s(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return a(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return a(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function a(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var e=function(){function A(I){E()(this,A),this.coreHelper=new w.Ofd_Core_Helper(96),this.onProgress=I,this.abort=!1,this.ofdRender=new h.Ofd_Render(null,this.coreHelper)}var I,g,B;return o()(A,[{key:"setOfdCore",value:function(A){this.core=A,this.ofdRender.setOfdCore(this.core)}},{key:"closePrint",value:(B=C()(t.a.mark((function A(){return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:this.abort=!0;case 1:case"end":return A.stop()}}),A,this)}))),function(){return B.apply(this,arguments)})},{key:"startPrint",value:(g=C()(t.a.mark((function A(){var I=this;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(this.core){A.next=2;break}return A.abrupt("return");case 2:return this.abort=!1,A.next=5,this.renderProgress(0);case 5:setTimeout((function(){I.prepare().then((function(A){if(A&&A.length>0){I.abort=!0;var g,B=window.open("打印窗口","_blank"),C=B.document.body,Q=s(A);try{for(Q.s();!(g=Q.n()).done;){var E=g.value;C.appendChild(E)}}catch(A){Q.e(A)}finally{Q.f()}B.focus(),B.print(),B.close()}}))}),100);case 6:case"end":return A.stop()}}),A,this)}))),function(){return g.apply(this,arguments)})},{key:"prepare",value:(I=C()(t.a.mark((function A(){var I=this;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",new Promise(function(){var A=C()(t.a.mark((function A(g,B){var C,Q,E,i,o;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:C=[],Q=0;case 2:if(!(Q<I.core.getOFDPageCount(0))||I.abort){A.next=23;break}return E=785/I.core.pageWidth(0,Q)*25.4,I.ofdRender.setDpi(E),(i=document.createElement("canvas")).style.width="794px",i.style.height="1123px",(o=document.createElement("div")).style.width="794px",o.style.height="1123px",o.style.position="relative",o.appendChild(i),A.next=16,I.ofdRender.renderPage(o,0,Q);case 16:return C.push(o),A.next=20,I.renderProgress(Q+1);case 20:Q++,A.next=2;break;case 23:I.abort&&g(),g(C);case 25:case"end":return A.stop()}}),A)})));return function(I,g){return A.apply(this,arguments)}}()));case 1:case"end":return A.stop()}}),A)}))),function(){return I.apply(this,arguments)})},{key:"renderProgress",value:function(A){var I=this;return new Promise((function(g,B){var C=Math.round(100*A/I.core.getOFDPageCount(0));I.onProgress(C),setTimeout((function(){g()}),100)}))}}]),A}()},function(A,I,g){"use strict";g.r(I),g.d(I,"OFDSignatureProperties",(function(){return c}));var B=g(3),C=g.n(B),Q=g(2),E=g.n(Q),i=g(1),o=g.n(i),D=g(4),t=g.n(D),h=g(30);function w(A,I){var g="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(!g){if(Array.isArray(A)||(g=function(A,I){if(!A)return;if("string"==typeof A)return s(A,I);var g=Object.prototype.toString.call(A).slice(8,-1);"Object"===g&&A.constructor&&(g=A.constructor.name);if("Map"===g||"Set"===g)return Array.from(A);if("Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return s(A,I)}(A))||I&&A&&"number"==typeof A.length){g&&(A=g);var B=0,C=function(){};return{s:C,n:function(){return B>=A.length?{done:!0}:{done:!1,value:A[B++]}},e:function(A){throw A},f:C}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Q,E=!0,i=!1;return{s:function(){g=g.call(A)},n:function(){var A=g.next();return E=A.done,A},e:function(A){i=!0,Q=A},f:function(){try{E||null==g.return||g.return()}finally{if(i)throw Q}}}}function s(A,I){(null==I||I>A.length)&&(I=A.length);for(var g=0,B=new Array(I);g<I;g++)B[g]=A[g];return B}var a=g(29).replaceFirstSlash,e="-",c=function(){function A(I,g,B,C){var Q=I.dialog,i=I.fields,o=I.closeButton;E()(this,A),this.dialog=Q,this.fields=i,this.overlayManager=g,this.l10n=C,this.fieldData=null,o.addEventListener("click",this.close.bind(this)),this.overlayManager.register(this.dialog)}var I,g;return o()(A,[{key:"close",value:(g=C()(t.a.mark((function A(){return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:this.overlayManager.close(this.dialog);case 1:case"end":return A.stop()}}),A,this)}))),function(){return g.apply(this,arguments)})},{key:"setOfdCore",value:function(A){this.ofdCore,A&&(this.ofdCore=A)}},{key:"open",value:(I=C()(t.a.mark((function A(I){var g=this;return t.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(I){A.next=2;break}return A.abrupt("return");case 2:this.overlayManager.open(this.dialog),I&&(this.fieldData={signer:I.SignCert.subject,provider:I.SignedInfo.Provider.ProviderName,hashedValue:I.HashHex,signedValue:I.signatureHex,signMethod:I.SignedInfo.SignatureMethod,signVersion:I.SignedInfo.Seal.esVersion,verify:I.verifyContent?I.verifyContent:"文件摘要值后台验证中,请稍等...",sealID:I.SignedInfo.Seal.esID,sealName:I.SignedInfo.Seal.Property.name,sealType:I.SignedInfo.Seal.Property.type,sealAuthTime:"".concat(I.SignedInfo.Seal.Property.validStart," 至 ").concat(I.SignedInfo.Seal.Property.validEnd),sealMakeTime:I.SignedInfo.Seal.Property.createDate,sealVersion:I.SignedInfo.Seal.Header.version},this.updateUI(),I.verifyContent||setTimeout((function(){g.checkHash(I)}),200));case 4:case"end":return A.stop()}}),A,this)}))),function(A){return I.apply(this,arguments)})},{key:"updateUI",value:function(){var A=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!A&&this.fieldData){if(this.overlayManager.active===this.dialog)for(var I in this.fields){var g=this.fieldData[I];this.fields[I].textContent=g||0===g?g:e}}else for(var B in this.fields)this.fields[B].textContent=e}},{key:"checkHash",value:function(A){var I,g="",B=w(A.SignedInfo.References);try{for(B.s();!(I=B.n()).done;){var C=I.value;g+="".concat(a(C.FileRef),"|")}}catch(A){B.e(A)}finally{B.f()}var Q,E=Object(h.hashPath)(this.ofdCore.ofdParserPtr,g,A.SignedInfo.ReferencesCheckMethod.toLowerCase()),i=!0,o=w(A.SignedInfo.References);try{for(o.s();!(Q=o.n()).done;){var D=Q.value,t=D.CheckValue,s=E["".concat(a(D.FileRef))];i&=t===s}}catch(A){o.e(A)}finally{o.f()}i?!A.HashValid&&A.HashHex?this.fieldData.verify="摘要属性错误":A.SignatureValid?this.fieldData.verify="签章有效":this.fieldData.verify="签名值验证错误":this.fieldData.verify="受该签章保护的内容有变更",A.verifyContent=this.fieldData.verify,this.updateUI()}}]),A}()},function(A,I,g){(function(I,B,C,Q){var E,i=(E=(E="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||I,function(A){var I,i;(A=void 0!==(A=A||{})?A:{}).ready=new Promise((function(A,g){I=A,i=g})),"object"!=typeof WebAssembly&&"undefined"!=typeof WXWebAssembly&&(WXWebAssembly.RuntimeError=WXWebAssembly.RuntimeError||function(){class A extends Error{constructor(I){if(super(I),!(this instanceof A)){const I=Object.setPrototypeOf;"function"==typeof I?I.call(Object,this,A.prototype):this.__proto__=A.prototype,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,A)}}}return Object.defineProperty(A.prototype,"name",{configurable:!0,writable:!0,value:"RuntimeError"}),A}(),(function(){if("undefined"!=typeof globalThis)return globalThis;var A=function(){return this}(),I=function(){var A;try{A=new Function}catch(A){return!1}return"function"==typeof A}();if(!A&&I)try{A=new Function("return this")()}catch(A){}if(!A){if("undefined"!=typeof window)return window;if("undefined"!=typeof self)return self}return A}()).WebAssembly=WXWebAssembly);var o,D={};for(o in A)A.hasOwnProperty(o)&&(D[o]=A[o]);var t,h,w,s,a,e=[],c="./this.program",G=function(A,I){throw I},y="object"==typeof window,F="function"==typeof importScripts,n="object"==typeof B&&"object"==typeof B.versions&&"string"==typeof B.versions.node,R="";n?(R=F?g(54).dirname(R)+"/":C+"/",t=function(A,I){return s||(s=g(!function(){var A=new Error("Cannot find module 'fs'");throw A.code="MODULE_NOT_FOUND",A}())),a||(a=g(54)),A=a.normalize(A),s.readFileSync(A,I?null:"utf8")},w=function(A){var I=t(A,!0);return I.buffer||(I=new Uint8Array(I)),d(I.buffer),I},h=function(A,I,B){s||(s=g(!function(){var A=new Error("Cannot find module 'fs'");throw A.code="MODULE_NOT_FOUND",A}())),a||(a=g(54)),A=a.normalize(A),s.readFile(A,(function(A,g){A?B(A):I(g.buffer)}))},B.argv.length>1&&(c=B.argv[1].replace(/\\/g,"/")),e=B.argv.slice(2),B.on("uncaughtException",(function(A){if(!(A instanceof xI))throw A})),B.on("unhandledRejection",(function(A){throw A})),G=function(A,I){if(CA())throw B.exitCode=A,I;var g;(g=I)instanceof xI||N("exiting due to exception: "+g),B.exit(A)},A.inspect=function(){return"[Emscripten Module object]"}):(y||F)&&(F?R=self.location.href:"undefined"!=typeof document&&document.currentScript&&(R=document.currentScript.src),E&&(R=E),R=0!==R.indexOf("blob:")?R.substr(0,R.replace(/[?#].*/,"").lastIndexOf("/")+1):"",t=function(A){var I=new XMLHttpRequest;return I.open("GET",A,!1),I.send(null),I.responseText},F&&(w=function(A){var I=new XMLHttpRequest;return I.open("GET",A,!1),I.responseType="arraybuffer",I.send(null),new Uint8Array(I.response)}),h=function(A,I,g){var B=new XMLHttpRequest;B.open("GET",A,!0),B.responseType="arraybuffer",B.onload=function(){200==B.status||0==B.status&&B.response?I(B.response):g()},B.onerror=g,B.send(null)});var r=A.print||void 0,N=A.printErr||void 0;for(o in D)D.hasOwnProperty(o)&&(A[o]=D[o]);D=null,A.arguments&&(e=A.arguments),A.thisProgram&&(c=A.thisProgram),A.quit&&(G=A.quit);var M,U=0;A.wasmBinary&&(M=A.wasmBinary);var S,k=A.noExitRuntime||!0;"object"!=typeof WebAssembly&&aA("no native wasm support detected");var Y=!1;function d(A,I){A||aA("Assertion failed: "+I)}var H="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function K(A,I,g){for(var B=I+g,C=I;A[C]&&!(C>=B);)++C;if(C-I>16&&A.subarray&&H)return H.decode(A.subarray(I,C));for(var Q="";I<C;){var E=A[I++];if(128&E){var i=63&A[I++];if(192!=(224&E)){var o=63&A[I++];if((E=224==(240&E)?(15&E)<<12|i<<6|o:(7&E)<<18|i<<12|o<<6|63&A[I++])<65536)Q+=String.fromCharCode(E);else{var D=E-65536;Q+=String.fromCharCode(55296|D>>10,56320|1023&D)}}else Q+=String.fromCharCode((31&E)<<6|i)}else Q+=String.fromCharCode(E)}return Q}function J(A,I){return A?K(m,A,I):""}function L(A,I,g,B){if(!(B>0))return 0;for(var C=g,Q=g+B-1,E=0;E<A.length;++E){var i=A.charCodeAt(E);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&A.charCodeAt(++E)),i<=127){if(g>=Q)break;I[g++]=i}else if(i<=2047){if(g+1>=Q)break;I[g++]=192|i>>6,I[g++]=128|63&i}else if(i<=65535){if(g+2>=Q)break;I[g++]=224|i>>12,I[g++]=128|i>>6&63,I[g++]=128|63&i}else{if(g+3>=Q)break;I[g++]=240|i>>18,I[g++]=128|i>>12&63,I[g++]=128|i>>6&63,I[g++]=128|63&i}}return I[g]=0,g-C}function l(A,I,g){return L(A,m,I,g)}function f(A){for(var I=0,g=0;g<A.length;++g){var B=A.charCodeAt(g);B>=55296&&B<=57343&&(B=65536+((1023&B)<<10)|1023&A.charCodeAt(++g)),B<=127?++I:I+=B<=2047?2:B<=65535?3:4}return I}var u,p,m,b,Z,q,W,x,V,v="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function X(A,I){for(var g=A,B=g>>1,C=B+I/2;!(B>=C)&&Z[B];)++B;if((g=B<<1)-A>32&&v)return v.decode(m.subarray(A,g));for(var Q="",E=0;!(E>=I/2);++E){var i=b[A+2*E>>1];if(0==i)break;Q+=String.fromCharCode(i)}return Q}function T(A,I,g){if(void 0===g&&(g=2147483647),g<2)return 0;for(var B=I,C=(g-=2)<2*A.length?g/2:A.length,Q=0;Q<C;++Q){var E=A.charCodeAt(Q);b[I>>1]=E,I+=2}return b[I>>1]=0,I-B}function j(A){return 2*A.length}function O(A,I){for(var g=0,B="";!(g>=I/4);){var C=q[A+4*g>>2];if(0==C)break;if(++g,C>=65536){var Q=C-65536;B+=String.fromCharCode(55296|Q>>10,56320|1023&Q)}else B+=String.fromCharCode(C)}return B}function z(A,I,g){if(void 0===g&&(g=2147483647),g<4)return 0;for(var B=I,C=B+g-4,Q=0;Q<A.length;++Q){var E=A.charCodeAt(Q);if(E>=55296&&E<=57343&&(E=65536+((1023&E)<<10)|1023&A.charCodeAt(++Q)),q[I>>2]=E,(I+=4)+4>C)break}return q[I>>2]=0,I-B}function P(A){for(var I=0,g=0;g<A.length;++g){var B=A.charCodeAt(g);B>=55296&&B<=57343&&++g,I+=4}return I}function _(A){var I=f(A)+1,g=JI(I);return g&&L(A,p,g,I),g}function $(I){u=I,A.HEAP8=p=new Int8Array(I),A.HEAP16=b=new Int16Array(I),A.HEAP32=q=new Int32Array(I),A.HEAPU8=m=new Uint8Array(I),A.HEAPU16=Z=new Uint16Array(I),A.HEAPU32=W=new Uint32Array(I),A.HEAPF32=x=new Float32Array(I),A.HEAPF64=V=new Float64Array(I)}A.INITIAL_MEMORY;var AA,IA=[],gA=[],BA=[];function CA(){return k||!1}var QA,EA,iA,oA,DA=0,tA=null,hA=null;function wA(I){DA++,A.monitorRunDependencies&&A.monitorRunDependencies(DA)}function sA(I){if(DA--,A.monitorRunDependencies&&A.monitorRunDependencies(DA),0==DA&&(null!==tA&&(clearInterval(tA),tA=null),hA)){var g=hA;hA=null,g()}}function aA(I){A.onAbort&&A.onAbort(I),N(I="Aborted("+I+")"),Y=!0,I+=". Build with -s ASSERTIONS=1 for more info.";var g=new WebAssembly.RuntimeError(I);throw i(g),g}function eA(A){return A.startsWith("data:application/octet-stream;base64,")}function cA(A){return A.startsWith("file://")}function GA(A){try{if(A==QA&&M)return new Uint8Array(M);if(w)return w(A);throw"both async and sync fetching of the wasm failed"}catch(A){aA(A)}}function yA(I){for(;I.length>0;){var g=I.shift();if("function"!=typeof g){var B=g.func;"number"==typeof B?void 0===g.arg?nA(B)():nA(B)(g.arg):B(void 0===g.arg?null:g.arg)}else g(A)}}A.preloadedImages={},A.preloadedAudios={},eA(QA="parser_helper_x.wasm")||(EA=QA,QA=A.locateFile?A.locateFile(EA,R):R+EA);var FA=[];function nA(A){var I=FA[A];return I||(A>=FA.length&&(FA.length=A+1),FA[A]=I=AA.get(A)),I}function RA(A){this.excPtr=A,this.ptr=A-16,this.set_type=function(A){q[this.ptr+4>>2]=A},this.get_type=function(){return q[this.ptr+4>>2]},this.set_destructor=function(A){q[this.ptr+8>>2]=A},this.get_destructor=function(){return q[this.ptr+8>>2]},this.set_refcount=function(A){q[this.ptr>>2]=A},this.set_caught=function(A){A=A?1:0,p[this.ptr+12>>0]=A},this.get_caught=function(){return 0!=p[this.ptr+12>>0]},this.set_rethrown=function(A){A=A?1:0,p[this.ptr+13>>0]=A},this.get_rethrown=function(){return 0!=p[this.ptr+13>>0]},this.init=function(A,I){this.set_type(A),this.set_destructor(I),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var A=q[this.ptr>>2];q[this.ptr>>2]=A+1},this.release_ref=function(){var A=q[this.ptr>>2];return q[this.ptr>>2]=A-1,1===A}}function rA(A){return q[lI()>>2]=A,A}var NA={splitPath:function(A){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(A).slice(1)},normalizeArray:function(A,I){for(var g=0,B=A.length-1;B>=0;B--){var C=A[B];"."===C?A.splice(B,1):".."===C?(A.splice(B,1),g++):g&&(A.splice(B,1),g--)}if(I)for(;g;g--)A.unshift("..");return A},normalize:function(A){var I="/"===A.charAt(0),g="/"===A.substr(-1);return(A=NA.normalizeArray(A.split("/").filter((function(A){return!!A})),!I).join("/"))||I||(A="."),A&&g&&(A+="/"),(I?"/":"")+A},dirname:function(A){var I=NA.splitPath(A),g=I[0],B=I[1];return g||B?(B&&(B=B.substr(0,B.length-1)),g+B):"."},basename:function(A){if("/"===A)return"/";var I=(A=(A=NA.normalize(A)).replace(/\/$/,"")).lastIndexOf("/");return-1===I?A:A.substr(I+1)},extname:function(A){return NA.splitPath(A)[3]},join:function(){var A=Array.prototype.slice.call(arguments,0);return NA.normalize(A.join("/"))},join2:function(A,I){return NA.normalize(A+"/"+I)}},MA={resolve:function(){for(var A="",I=!1,g=arguments.length-1;g>=-1&&!I;g--){var B=g>=0?arguments[g]:YA.cwd();if("string"!=typeof B)throw new TypeError("Arguments to path.resolve must be strings");if(!B)return"";A=B+"/"+A,I="/"===B.charAt(0)}return(I?"/":"")+(A=NA.normalizeArray(A.split("/").filter((function(A){return!!A})),!I).join("/"))||"."},relative:function(A,I){function g(A){for(var I=0;I<A.length&&""===A[I];I++);for(var g=A.length-1;g>=0&&""===A[g];g--);return I>g?[]:A.slice(I,g-I+1)}A=MA.resolve(A).substr(1),I=MA.resolve(I).substr(1);for(var B=g(A.split("/")),C=g(I.split("/")),Q=Math.min(B.length,C.length),E=Q,i=0;i<Q;i++)if(B[i]!==C[i]){E=i;break}var o=[];for(i=E;i<B.length;i++)o.push("..");return(o=o.concat(C.slice(E))).join("/")}},UA={ttys:[],init:function(){},shutdown:function(){},register:function(A,I){UA.ttys[A]={input:[],output:[],ops:I},YA.registerDevice(A,UA.stream_ops)},stream_ops:{open:function(A){var I=UA.ttys[A.node.rdev];if(!I)throw new YA.ErrnoError(43);A.tty=I,A.seekable=!1},close:function(A){A.tty.ops.flush(A.tty)},flush:function(A){A.tty.ops.flush(A.tty)},read:function(A,I,g,B,C){if(!A.tty||!A.tty.ops.get_char)throw new YA.ErrnoError(60);for(var Q=0,E=0;E<B;E++){var i;try{i=A.tty.ops.get_char(A.tty)}catch(A){throw new YA.ErrnoError(29)}if(void 0===i&&0===Q)throw new YA.ErrnoError(6);if(null==i)break;Q++,I[g+E]=i}return Q&&(A.node.timestamp=Date.now()),Q},write:function(A,I,g,B,C){if(!A.tty||!A.tty.ops.put_char)throw new YA.ErrnoError(60);try{for(var Q=0;Q<B;Q++)A.tty.ops.put_char(A.tty,I[g+Q])}catch(A){throw new YA.ErrnoError(29)}return B&&(A.node.timestamp=Date.now()),Q}},default_tty_ops:{get_char:function(A){if(!A.input.length){var I=null;if(n){var g=Q.alloc(256),C=0;try{C=s.readSync(B.stdin.fd,g,0,256,null)}catch(A){if(!A.toString().includes("EOF"))throw A;C=0}I=C>0?g.slice(0,C).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(I=window.prompt("Input: "))&&(I+="\n"):"function"==typeof readline&&null!==(I=readline())&&(I+="\n");if(!I)return null;A.input=dI(I,!0)}return A.input.shift()},put_char:function(A,I){null===I||10===I?(r(K(A.output,0)),A.output=[]):0!=I&&A.output.push(I)},flush:function(A){A.output&&A.output.length>0&&(r(K(A.output,0)),A.output=[])}},default_tty1_ops:{put_char:function(A,I){null===I||10===I?(N(K(A.output,0)),A.output=[]):0!=I&&A.output.push(I)},flush:function(A){A.output&&A.output.length>0&&(N(K(A.output,0)),A.output=[])}}};function SA(A){A=function(A,I){return Math.ceil(A/I)*I}(A,65536);var I=WI(65536,A);return I?(function(A,I){m.fill(0,A,A+I)}(I,A),I):0}var kA={ops_table:null,mount:function(A){return kA.createNode(null,"/",16895,0)},createNode:function(A,I,g,B){if(YA.isBlkdev(g)||YA.isFIFO(g))throw new YA.ErrnoError(63);kA.ops_table||(kA.ops_table={dir:{node:{getattr:kA.node_ops.getattr,setattr:kA.node_ops.setattr,lookup:kA.node_ops.lookup,mknod:kA.node_ops.mknod,rename:kA.node_ops.rename,unlink:kA.node_ops.unlink,rmdir:kA.node_ops.rmdir,readdir:kA.node_ops.readdir,symlink:kA.node_ops.symlink},stream:{llseek:kA.stream_ops.llseek}},file:{node:{getattr:kA.node_ops.getattr,setattr:kA.node_ops.setattr},stream:{llseek:kA.stream_ops.llseek,read:kA.stream_ops.read,write:kA.stream_ops.write,allocate:kA.stream_ops.allocate,mmap:kA.stream_ops.mmap,msync:kA.stream_ops.msync}},link:{node:{getattr:kA.node_ops.getattr,setattr:kA.node_ops.setattr,readlink:kA.node_ops.readlink},stream:{}},chrdev:{node:{getattr:kA.node_ops.getattr,setattr:kA.node_ops.setattr},stream:YA.chrdev_stream_ops}});var C=YA.createNode(A,I,g,B);return YA.isDir(C.mode)?(C.node_ops=kA.ops_table.dir.node,C.stream_ops=kA.ops_table.dir.stream,C.contents={}):YA.isFile(C.mode)?(C.node_ops=kA.ops_table.file.node,C.stream_ops=kA.ops_table.file.stream,C.usedBytes=0,C.contents=null):YA.isLink(C.mode)?(C.node_ops=kA.ops_table.link.node,C.stream_ops=kA.ops_table.link.stream):YA.isChrdev(C.mode)&&(C.node_ops=kA.ops_table.chrdev.node,C.stream_ops=kA.ops_table.chrdev.stream),C.timestamp=Date.now(),A&&(A.contents[I]=C,A.timestamp=C.timestamp),C},getFileDataAsTypedArray:function(A){return A.contents?A.contents.subarray?A.contents.subarray(0,A.usedBytes):new Uint8Array(A.contents):new Uint8Array(0)},expandFileStorage:function(A,I){var g=A.contents?A.contents.length:0;if(!(g>=I)){I=Math.max(I,g*(g<1048576?2:1.125)>>>0),0!=g&&(I=Math.max(I,256));var B=A.contents;A.contents=new Uint8Array(I),A.usedBytes>0&&A.contents.set(B.subarray(0,A.usedBytes),0)}},resizeFileStorage:function(A,I){if(A.usedBytes!=I)if(0==I)A.contents=null,A.usedBytes=0;else{var g=A.contents;A.contents=new Uint8Array(I),g&&A.contents.set(g.subarray(0,Math.min(I,A.usedBytes))),A.usedBytes=I}},node_ops:{getattr:function(A){var I={};return I.dev=YA.isChrdev(A.mode)?A.id:1,I.ino=A.id,I.mode=A.mode,I.nlink=1,I.uid=0,I.gid=0,I.rdev=A.rdev,YA.isDir(A.mode)?I.size=4096:YA.isFile(A.mode)?I.size=A.usedBytes:YA.isLink(A.mode)?I.size=A.link.length:I.size=0,I.atime=new Date(A.timestamp),I.mtime=new Date(A.timestamp),I.ctime=new Date(A.timestamp),I.blksize=4096,I.blocks=Math.ceil(I.size/I.blksize),I},setattr:function(A,I){void 0!==I.mode&&(A.mode=I.mode),void 0!==I.timestamp&&(A.timestamp=I.timestamp),void 0!==I.size&&kA.resizeFileStorage(A,I.size)},lookup:function(A,I){throw YA.genericErrors[44]},mknod:function(A,I,g,B){return kA.createNode(A,I,g,B)},rename:function(A,I,g){if(YA.isDir(A.mode)){var B;try{B=YA.lookupNode(I,g)}catch(A){}if(B)for(var C in B.contents)throw new YA.ErrnoError(55)}delete A.parent.contents[A.name],A.parent.timestamp=Date.now(),A.name=g,I.contents[g]=A,I.timestamp=A.parent.timestamp,A.parent=I},unlink:function(A,I){delete A.contents[I],A.timestamp=Date.now()},rmdir:function(A,I){var g=YA.lookupNode(A,I);for(var B in g.contents)throw new YA.ErrnoError(55);delete A.contents[I],A.timestamp=Date.now()},readdir:function(A){var I=[".",".."];for(var g in A.contents)A.contents.hasOwnProperty(g)&&I.push(g);return I},symlink:function(A,I,g){var B=kA.createNode(A,I,41471,0);return B.link=g,B},readlink:function(A){if(!YA.isLink(A.mode))throw new YA.ErrnoError(28);return A.link}},stream_ops:{read:function(A,I,g,B,C){var Q=A.node.contents;if(C>=A.node.usedBytes)return 0;var E=Math.min(A.node.usedBytes-C,B);if(E>8&&Q.subarray)I.set(Q.subarray(C,C+E),g);else for(var i=0;i<E;i++)I[g+i]=Q[C+i];return E},write:function(A,I,g,B,C,Q){if(I.buffer===p.buffer&&(Q=!1),!B)return 0;var E=A.node;if(E.timestamp=Date.now(),I.subarray&&(!E.contents||E.contents.subarray)){if(Q)return E.contents=I.subarray(g,g+B),E.usedBytes=B,B;if(0===E.usedBytes&&0===C)return E.contents=I.slice(g,g+B),E.usedBytes=B,B;if(C+B<=E.usedBytes)return E.contents.set(I.subarray(g,g+B),C),B}if(kA.expandFileStorage(E,C+B),E.contents.subarray&&I.subarray)E.contents.set(I.subarray(g,g+B),C);else for(var i=0;i<B;i++)E.contents[C+i]=I[g+i];return E.usedBytes=Math.max(E.usedBytes,C+B),B},llseek:function(A,I,g){var B=I;if(1===g?B+=A.position:2===g&&YA.isFile(A.node.mode)&&(B+=A.node.usedBytes),B<0)throw new YA.ErrnoError(28);return B},allocate:function(A,I,g){kA.expandFileStorage(A.node,I+g),A.node.usedBytes=Math.max(A.node.usedBytes,I+g)},mmap:function(A,I,g,B,C,Q){if(0!==I)throw new YA.ErrnoError(28);if(!YA.isFile(A.node.mode))throw new YA.ErrnoError(43);var E,i,o=A.node.contents;if(2&Q||o.buffer!==u){if((B>0||B+g<o.length)&&(o=o.subarray?o.subarray(B,B+g):Array.prototype.slice.call(o,B,B+g)),i=!0,!(E=SA(g)))throw new YA.ErrnoError(48);p.set(o,E)}else i=!1,E=o.byteOffset;return{ptr:E,allocated:i}},msync:function(A,I,g,B,C){if(!YA.isFile(A.node.mode))throw new YA.ErrnoError(43);return 2&C||kA.stream_ops.write(A,I,0,B,g,!1),0}}},YA={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(A,I){if(I=I||{},!(A=MA.resolve(YA.cwd(),A)))return{path:"",node:null};var g={follow_mount:!0,recurse_count:0};for(var B in g)void 0===I[B]&&(I[B]=g[B]);if(I.recurse_count>8)throw new YA.ErrnoError(32);for(var C=NA.normalizeArray(A.split("/").filter((function(A){return!!A})),!1),Q=YA.root,E="/",i=0;i<C.length;i++){var o=i===C.length-1;if(o&&I.parent)break;if(Q=YA.lookupNode(Q,C[i]),E=NA.join2(E,C[i]),YA.isMountpoint(Q)&&(!o||o&&I.follow_mount)&&(Q=Q.mounted.root),!o||I.follow)for(var D=0;YA.isLink(Q.mode);){var t=YA.readlink(E);if(E=MA.resolve(NA.dirname(E),t),Q=YA.lookupPath(E,{recurse_count:I.recurse_count}).node,D++>40)throw new YA.ErrnoError(32)}}return{path:E,node:Q}},getPath:function(A){for(var I;;){if(YA.isRoot(A)){var g=A.mount.mountpoint;return I?"/"!==g[g.length-1]?g+"/"+I:g+I:g}I=I?A.name+"/"+I:A.name,A=A.parent}},hashName:function(A,I){for(var g=0,B=0;B<I.length;B++)g=(g<<5)-g+I.charCodeAt(B)|0;return(A+g>>>0)%YA.nameTable.length},hashAddNode:function(A){var I=YA.hashName(A.parent.id,A.name);A.name_next=YA.nameTable[I],YA.nameTable[I]=A},hashRemoveNode:function(A){var I=YA.hashName(A.parent.id,A.name);if(YA.nameTable[I]===A)YA.nameTable[I]=A.name_next;else for(var g=YA.nameTable[I];g;){if(g.name_next===A){g.name_next=A.name_next;break}g=g.name_next}},lookupNode:function(A,I){var g=YA.mayLookup(A);if(g)throw new YA.ErrnoError(g,A);for(var B=YA.hashName(A.id,I),C=YA.nameTable[B];C;C=C.name_next){var Q=C.name;if(C.parent.id===A.id&&Q===I)return C}return YA.lookup(A,I)},createNode:function(A,I,g,B){var C=new YA.FSNode(A,I,g,B);return YA.hashAddNode(C),C},destroyNode:function(A){YA.hashRemoveNode(A)},isRoot:function(A){return A===A.parent},isMountpoint:function(A){return!!A.mounted},isFile:function(A){return 32768==(61440&A)},isDir:function(A){return 16384==(61440&A)},isLink:function(A){return 40960==(61440&A)},isChrdev:function(A){return 8192==(61440&A)},isBlkdev:function(A){return 24576==(61440&A)},isFIFO:function(A){return 4096==(61440&A)},isSocket:function(A){return 49152==(49152&A)},flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(A){var I=YA.flagModes[A];if(void 0===I)throw new Error("Unknown file open mode: "+A);return I},flagsToPermissionString:function(A){var I=["r","w","rw"][3&A];return 512&A&&(I+="w"),I},nodePermissions:function(A,I){return YA.ignorePermissions||(!I.includes("r")||292&A.mode)&&(!I.includes("w")||146&A.mode)&&(!I.includes("x")||73&A.mode)?0:2},mayLookup:function(A){var I=YA.nodePermissions(A,"x");return I||(A.node_ops.lookup?0:2)},mayCreate:function(A,I){try{return YA.lookupNode(A,I),20}catch(A){}return YA.nodePermissions(A,"wx")},mayDelete:function(A,I,g){var B;try{B=YA.lookupNode(A,I)}catch(A){return A.errno}var C=YA.nodePermissions(A,"wx");if(C)return C;if(g){if(!YA.isDir(B.mode))return 54;if(YA.isRoot(B)||YA.getPath(B)===YA.cwd())return 10}else if(YA.isDir(B.mode))return 31;return 0},mayOpen:function(A,I){return A?YA.isLink(A.mode)?32:YA.isDir(A.mode)&&("r"!==YA.flagsToPermissionString(I)||512&I)?31:YA.nodePermissions(A,YA.flagsToPermissionString(I)):44},MAX_OPEN_FDS:4096,nextfd:function(A,I){A=A||0,I=I||YA.MAX_OPEN_FDS;for(var g=A;g<=I;g++)if(!YA.streams[g])return g;throw new YA.ErrnoError(33)},getStream:function(A){return YA.streams[A]},createStream:function(A,I,g){YA.FSStream||(YA.FSStream=function(){},YA.FSStream.prototype={object:{get:function(){return this.node},set:function(A){this.node=A}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}});var B=new YA.FSStream;for(var C in A)B[C]=A[C];A=B;var Q=YA.nextfd(I,g);return A.fd=Q,YA.streams[Q]=A,A},closeStream:function(A){YA.streams[A]=null},chrdev_stream_ops:{open:function(A){var I=YA.getDevice(A.node.rdev);A.stream_ops=I.stream_ops,A.stream_ops.open&&A.stream_ops.open(A)},llseek:function(){throw new YA.ErrnoError(70)}},major:function(A){return A>>8},minor:function(A){return 255&A},makedev:function(A,I){return A<<8|I},registerDevice:function(A,I){YA.devices[A]={stream_ops:I}},getDevice:function(A){return YA.devices[A]},getMounts:function(A){for(var I=[],g=[A];g.length;){var B=g.pop();I.push(B),g.push.apply(g,B.mounts)}return I},syncfs:function(A,I){"function"==typeof A&&(I=A,A=!1),YA.syncFSRequests++,YA.syncFSRequests>1&&N("warning: "+YA.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var g=YA.getMounts(YA.root.mount),B=0;function C(A){return YA.syncFSRequests--,I(A)}function Q(A){if(A)return Q.errored?void 0:(Q.errored=!0,C(A));++B>=g.length&&C(null)}g.forEach((function(I){if(!I.type.syncfs)return Q(null);I.type.syncfs(I,A,Q)}))},mount:function(A,I,g){var B,C="/"===g,Q=!g;if(C&&YA.root)throw new YA.ErrnoError(10);if(!C&&!Q){var E=YA.lookupPath(g,{follow_mount:!1});if(g=E.path,B=E.node,YA.isMountpoint(B))throw new YA.ErrnoError(10);if(!YA.isDir(B.mode))throw new YA.ErrnoError(54)}var i={type:A,opts:I,mountpoint:g,mounts:[]},o=A.mount(i);return o.mount=i,i.root=o,C?YA.root=o:B&&(B.mounted=i,B.mount&&B.mount.mounts.push(i)),o},unmount:function(A){var I=YA.lookupPath(A,{follow_mount:!1});if(!YA.isMountpoint(I.node))throw new YA.ErrnoError(28);var g=I.node,B=g.mounted,C=YA.getMounts(B);Object.keys(YA.nameTable).forEach((function(A){for(var I=YA.nameTable[A];I;){var g=I.name_next;C.includes(I.mount)&&YA.destroyNode(I),I=g}})),g.mounted=null;var Q=g.mount.mounts.indexOf(B);g.mount.mounts.splice(Q,1)},lookup:function(A,I){return A.node_ops.lookup(A,I)},mknod:function(A,I,g){var B=YA.lookupPath(A,{parent:!0}).node,C=NA.basename(A);if(!C||"."===C||".."===C)throw new YA.ErrnoError(28);var Q=YA.mayCreate(B,C);if(Q)throw new YA.ErrnoError(Q);if(!B.node_ops.mknod)throw new YA.ErrnoError(63);return B.node_ops.mknod(B,C,I,g)},create:function(A,I){return I=void 0!==I?I:438,I&=4095,I|=32768,YA.mknod(A,I,0)},mkdir:function(A,I){return I=void 0!==I?I:511,I&=1023,I|=16384,YA.mknod(A,I,0)},mkdirTree:function(A,I){for(var g=A.split("/"),B="",C=0;C<g.length;++C)if(g[C]){B+="/"+g[C];try{YA.mkdir(B,I)}catch(A){if(20!=A.errno)throw A}}},mkdev:function(A,I,g){return void 0===g&&(g=I,I=438),I|=8192,YA.mknod(A,I,g)},symlink:function(A,I){if(!MA.resolve(A))throw new YA.ErrnoError(44);var g=YA.lookupPath(I,{parent:!0}).node;if(!g)throw new YA.ErrnoError(44);var B=NA.basename(I),C=YA.mayCreate(g,B);if(C)throw new YA.ErrnoError(C);if(!g.node_ops.symlink)throw new YA.ErrnoError(63);return g.node_ops.symlink(g,B,A)},rename:function(A,I){var g,B,C=NA.dirname(A),Q=NA.dirname(I),E=NA.basename(A),i=NA.basename(I);if(g=YA.lookupPath(A,{parent:!0}).node,B=YA.lookupPath(I,{parent:!0}).node,!g||!B)throw new YA.ErrnoError(44);if(g.mount!==B.mount)throw new YA.ErrnoError(75);var o,D=YA.lookupNode(g,E),t=MA.relative(A,Q);if("."!==t.charAt(0))throw new YA.ErrnoError(28);if("."!==(t=MA.relative(I,C)).charAt(0))throw new YA.ErrnoError(55);try{o=YA.lookupNode(B,i)}catch(A){}if(D!==o){var h=YA.isDir(D.mode),w=YA.mayDelete(g,E,h);if(w)throw new YA.ErrnoError(w);if(w=o?YA.mayDelete(B,i,h):YA.mayCreate(B,i))throw new YA.ErrnoError(w);if(!g.node_ops.rename)throw new YA.ErrnoError(63);if(YA.isMountpoint(D)||o&&YA.isMountpoint(o))throw new YA.ErrnoError(10);if(B!==g&&(w=YA.nodePermissions(g,"w")))throw new YA.ErrnoError(w);YA.hashRemoveNode(D);try{g.node_ops.rename(D,B,i)}catch(A){throw A}finally{YA.hashAddNode(D)}}},rmdir:function(A){var I=YA.lookupPath(A,{parent:!0}).node,g=NA.basename(A),B=YA.lookupNode(I,g),C=YA.mayDelete(I,g,!0);if(C)throw new YA.ErrnoError(C);if(!I.node_ops.rmdir)throw new YA.ErrnoError(63);if(YA.isMountpoint(B))throw new YA.ErrnoError(10);I.node_ops.rmdir(I,g),YA.destroyNode(B)},readdir:function(A){var I=YA.lookupPath(A,{follow:!0}).node;if(!I.node_ops.readdir)throw new YA.ErrnoError(54);return I.node_ops.readdir(I)},unlink:function(A){var I=YA.lookupPath(A,{parent:!0}).node,g=NA.basename(A),B=YA.lookupNode(I,g),C=YA.mayDelete(I,g,!1);if(C)throw new YA.ErrnoError(C);if(!I.node_ops.unlink)throw new YA.ErrnoError(63);if(YA.isMountpoint(B))throw new YA.ErrnoError(10);I.node_ops.unlink(I,g),YA.destroyNode(B)},readlink:function(A){var I=YA.lookupPath(A).node;if(!I)throw new YA.ErrnoError(44);if(!I.node_ops.readlink)throw new YA.ErrnoError(28);return MA.resolve(YA.getPath(I.parent),I.node_ops.readlink(I))},stat:function(A,I){var g=YA.lookupPath(A,{follow:!I}).node;if(!g)throw new YA.ErrnoError(44);if(!g.node_ops.getattr)throw new YA.ErrnoError(63);return g.node_ops.getattr(g)},lstat:function(A){return YA.stat(A,!0)},chmod:function(A,I,g){var B;if(!(B="string"==typeof A?YA.lookupPath(A,{follow:!g}).node:A).node_ops.setattr)throw new YA.ErrnoError(63);B.node_ops.setattr(B,{mode:4095&I|-4096&B.mode,timestamp:Date.now()})},lchmod:function(A,I){YA.chmod(A,I,!0)},fchmod:function(A,I){var g=YA.getStream(A);if(!g)throw new YA.ErrnoError(8);YA.chmod(g.node,I)},chown:function(A,I,g,B){var C;if(!(C="string"==typeof A?YA.lookupPath(A,{follow:!B}).node:A).node_ops.setattr)throw new YA.ErrnoError(63);C.node_ops.setattr(C,{timestamp:Date.now()})},lchown:function(A,I,g){YA.chown(A,I,g,!0)},fchown:function(A,I,g){var B=YA.getStream(A);if(!B)throw new YA.ErrnoError(8);YA.chown(B.node,I,g)},truncate:function(A,I){if(I<0)throw new YA.ErrnoError(28);var g;if(!(g="string"==typeof A?YA.lookupPath(A,{follow:!0}).node:A).node_ops.setattr)throw new YA.ErrnoError(63);if(YA.isDir(g.mode))throw new YA.ErrnoError(31);if(!YA.isFile(g.mode))throw new YA.ErrnoError(28);var B=YA.nodePermissions(g,"w");if(B)throw new YA.ErrnoError(B);g.node_ops.setattr(g,{size:I,timestamp:Date.now()})},ftruncate:function(A,I){var g=YA.getStream(A);if(!g)throw new YA.ErrnoError(8);if(0==(2097155&g.flags))throw new YA.ErrnoError(28);YA.truncate(g.node,I)},utime:function(A,I,g){var B=YA.lookupPath(A,{follow:!0}).node;B.node_ops.setattr(B,{timestamp:Math.max(I,g)})},open:function(I,g,B,C,Q){if(""===I)throw new YA.ErrnoError(44);var E;if(B=void 0===B?438:B,B=64&(g="string"==typeof g?YA.modeStringToFlags(g):g)?4095&B|32768:0,"object"==typeof I)E=I;else{I=NA.normalize(I);try{E=YA.lookupPath(I,{follow:!(131072&g)}).node}catch(A){}}var i=!1;if(64&g)if(E){if(128&g)throw new YA.ErrnoError(20)}else E=YA.mknod(I,B,0),i=!0;if(!E)throw new YA.ErrnoError(44);if(YA.isChrdev(E.mode)&&(g&=-513),65536&g&&!YA.isDir(E.mode))throw new YA.ErrnoError(54);if(!i){var o=YA.mayOpen(E,g);if(o)throw new YA.ErrnoError(o)}512&g&&YA.truncate(E,0),g&=-131713;var D=YA.createStream({node:E,path:YA.getPath(E),id:E.id,flags:g,mode:E.mode,seekable:!0,position:0,stream_ops:E.stream_ops,node_ops:E.node_ops,ungotten:[],error:!1},C,Q);return D.stream_ops.open&&D.stream_ops.open(D),!A.logReadFiles||1&g||(YA.readFiles||(YA.readFiles={}),I in YA.readFiles||(YA.readFiles[I]=1)),D},close:function(A){if(YA.isClosed(A))throw new YA.ErrnoError(8);A.getdents&&(A.getdents=null);try{A.stream_ops.close&&A.stream_ops.close(A)}catch(A){throw A}finally{YA.closeStream(A.fd)}A.fd=null},isClosed:function(A){return null===A.fd},llseek:function(A,I,g){if(YA.isClosed(A))throw new YA.ErrnoError(8);if(!A.seekable||!A.stream_ops.llseek)throw new YA.ErrnoError(70);if(0!=g&&1!=g&&2!=g)throw new YA.ErrnoError(28);return A.position=A.stream_ops.llseek(A,I,g),A.ungotten=[],A.position},read:function(A,I,g,B,C){if(B<0||C<0)throw new YA.ErrnoError(28);if(YA.isClosed(A))throw new YA.ErrnoError(8);if(1==(2097155&A.flags))throw new YA.ErrnoError(8);if(YA.isDir(A.node.mode))throw new YA.ErrnoError(31);if(!A.stream_ops.read)throw new YA.ErrnoError(28);var Q=void 0!==C;if(Q){if(!A.seekable)throw new YA.ErrnoError(70)}else C=A.position;var E=A.stream_ops.read(A,I,g,B,C);return Q||(A.position+=E),E},write:function(A,I,g,B,C,Q){if(B<0||C<0)throw new YA.ErrnoError(28);if(YA.isClosed(A))throw new YA.ErrnoError(8);if(0==(2097155&A.flags))throw new YA.ErrnoError(8);if(YA.isDir(A.node.mode))throw new YA.ErrnoError(31);if(!A.stream_ops.write)throw new YA.ErrnoError(28);A.seekable&&1024&A.flags&&YA.llseek(A,0,2);var E=void 0!==C;if(E){if(!A.seekable)throw new YA.ErrnoError(70)}else C=A.position;var i=A.stream_ops.write(A,I,g,B,C,Q);return E||(A.position+=i),i},allocate:function(A,I,g){if(YA.isClosed(A))throw new YA.ErrnoError(8);if(I<0||g<=0)throw new YA.ErrnoError(28);if(0==(2097155&A.flags))throw new YA.ErrnoError(8);if(!YA.isFile(A.node.mode)&&!YA.isDir(A.node.mode))throw new YA.ErrnoError(43);if(!A.stream_ops.allocate)throw new YA.ErrnoError(138);A.stream_ops.allocate(A,I,g)},mmap:function(A,I,g,B,C,Q){if(0!=(2&C)&&0==(2&Q)&&2!=(2097155&A.flags))throw new YA.ErrnoError(2);if(1==(2097155&A.flags))throw new YA.ErrnoError(2);if(!A.stream_ops.mmap)throw new YA.ErrnoError(43);return A.stream_ops.mmap(A,I,g,B,C,Q)},msync:function(A,I,g,B,C){return A&&A.stream_ops.msync?A.stream_ops.msync(A,I,g,B,C):0},munmap:function(A){return 0},ioctl:function(A,I,g){if(!A.stream_ops.ioctl)throw new YA.ErrnoError(59);return A.stream_ops.ioctl(A,I,g)},readFile:function(A,I){if((I=I||{}).flags=I.flags||0,I.encoding=I.encoding||"binary","utf8"!==I.encoding&&"binary"!==I.encoding)throw new Error('Invalid encoding type "'+I.encoding+'"');var g,B=YA.open(A,I.flags),C=YA.stat(A).size,Q=new Uint8Array(C);return YA.read(B,Q,0,C,0),"utf8"===I.encoding?g=K(Q,0):"binary"===I.encoding&&(g=Q),YA.close(B),g},writeFile:function(A,I,g){(g=g||{}).flags=g.flags||577;var B=YA.open(A,g.flags,g.mode);if("string"==typeof I){var C=new Uint8Array(f(I)+1),Q=L(I,C,0,C.length);YA.write(B,C,0,Q,void 0,g.canOwn)}else{if(!ArrayBuffer.isView(I))throw new Error("Unsupported data type");YA.write(B,I,0,I.byteLength,void 0,g.canOwn)}YA.close(B)},cwd:function(){return YA.currentPath},chdir:function(A){var I=YA.lookupPath(A,{follow:!0});if(null===I.node)throw new YA.ErrnoError(44);if(!YA.isDir(I.node.mode))throw new YA.ErrnoError(54);var g=YA.nodePermissions(I.node,"x");if(g)throw new YA.ErrnoError(g);YA.currentPath=I.path},createDefaultDirectories:function(){YA.mkdir("/tmp"),YA.mkdir("/home"),YA.mkdir("/home/web_user")},createDefaultDevices:function(){YA.mkdir("/dev"),YA.registerDevice(YA.makedev(1,3),{read:function(){return 0},write:function(A,I,g,B,C){return B}}),YA.mkdev("/dev/null",YA.makedev(1,3)),UA.register(YA.makedev(5,0),UA.default_tty_ops),UA.register(YA.makedev(6,0),UA.default_tty1_ops),YA.mkdev("/dev/tty",YA.makedev(5,0)),YA.mkdev("/dev/tty1",YA.makedev(6,0));var A=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var A=new Uint8Array(1);return function(){return crypto.getRandomValues(A),A[0]}}if(n)try{var I=g(55);return function(){return I.randomBytes(1)[0]}}catch(A){}return function(){aA("randomDevice")}}();YA.createDevice("/dev","random",A),YA.createDevice("/dev","urandom",A),YA.mkdir("/dev/shm"),YA.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){YA.mkdir("/proc");var A=YA.mkdir("/proc/self");YA.mkdir("/proc/self/fd"),YA.mount({mount:function(){var I=YA.createNode(A,"fd",16895,73);return I.node_ops={lookup:function(A,I){var g=+I,B=YA.getStream(g);if(!B)throw new YA.ErrnoError(8);var C={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return B.path}}};return C.parent=C,C}},I}},{},"/proc/self/fd")},createStandardStreams:function(){A.stdin?YA.createDevice("/dev","stdin",A.stdin):YA.symlink("/dev/tty","/dev/stdin"),A.stdout?YA.createDevice("/dev","stdout",null,A.stdout):YA.symlink("/dev/tty","/dev/stdout"),A.stderr?YA.createDevice("/dev","stderr",null,A.stderr):YA.symlink("/dev/tty1","/dev/stderr"),YA.open("/dev/stdin",0),YA.open("/dev/stdout",1),YA.open("/dev/stderr",1)},ensureErrnoError:function(){YA.ErrnoError||(YA.ErrnoError=function(A,I){this.node=I,this.setErrno=function(A){this.errno=A},this.setErrno(A),this.message="FS error"},YA.ErrnoError.prototype=new Error,YA.ErrnoError.prototype.constructor=YA.ErrnoError,[44].forEach((function(A){YA.genericErrors[A]=new YA.ErrnoError(A),YA.genericErrors[A].stack="<generic error, no stack>"})))},staticInit:function(){YA.ensureErrnoError(),YA.nameTable=new Array(4096),YA.mount(kA,{},"/"),YA.createDefaultDirectories(),YA.createDefaultDevices(),YA.createSpecialDirectories(),YA.filesystems={MEMFS:kA}},init:function(I,g,B){YA.init.initialized=!0,YA.ensureErrnoError(),A.stdin=I||A.stdin,A.stdout=g||A.stdout,A.stderr=B||A.stderr,YA.createStandardStreams()},quit:function(){YA.init.initialized=!1;var I=A._fflush;I&&I(0);for(var g=0;g<YA.streams.length;g++){var B=YA.streams[g];B&&YA.close(B)}},getMode:function(A,I){var g=0;return A&&(g|=365),I&&(g|=146),g},findObject:function(A,I){var g=YA.analyzePath(A,I);return g.exists?g.object:null},analyzePath:function(A,I){try{A=(B=YA.lookupPath(A,{follow:!I})).path}catch(A){}var g={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var B=YA.lookupPath(A,{parent:!0});g.parentExists=!0,g.parentPath=B.path,g.parentObject=B.node,g.name=NA.basename(A),B=YA.lookupPath(A,{follow:!I}),g.exists=!0,g.path=B.path,g.object=B.node,g.name=B.node.name,g.isRoot="/"===B.path}catch(A){g.error=A.errno}return g},createPath:function(A,I,g,B){A="string"==typeof A?A:YA.getPath(A);for(var C=I.split("/").reverse();C.length;){var Q=C.pop();if(Q){var E=NA.join2(A,Q);try{YA.mkdir(E)}catch(A){}A=E}}return E},createFile:function(A,I,g,B,C){var Q=NA.join2("string"==typeof A?A:YA.getPath(A),I),E=YA.getMode(B,C);return YA.create(Q,E)},createDataFile:function(A,I,g,B,C,Q){var E=I?NA.join2("string"==typeof A?A:YA.getPath(A),I):A,i=YA.getMode(B,C),o=YA.create(E,i);if(g){if("string"==typeof g){for(var D=new Array(g.length),t=0,h=g.length;t<h;++t)D[t]=g.charCodeAt(t);g=D}YA.chmod(o,146|i);var w=YA.open(o,577);YA.write(w,g,0,g.length,0,Q),YA.close(w),YA.chmod(o,i)}return o},createDevice:function(A,I,g,B){var C=NA.join2("string"==typeof A?A:YA.getPath(A),I),Q=YA.getMode(!!g,!!B);YA.createDevice.major||(YA.createDevice.major=64);var E=YA.makedev(YA.createDevice.major++,0);return YA.registerDevice(E,{open:function(A){A.seekable=!1},close:function(A){B&&B.buffer&&B.buffer.length&&B(10)},read:function(A,I,B,C,Q){for(var E=0,i=0;i<C;i++){var o;try{o=g()}catch(A){throw new YA.ErrnoError(29)}if(void 0===o&&0===E)throw new YA.ErrnoError(6);if(null==o)break;E++,I[B+i]=o}return E&&(A.node.timestamp=Date.now()),E},write:function(A,I,g,C,Q){for(var E=0;E<C;E++)try{B(I[g+E])}catch(A){throw new YA.ErrnoError(29)}return C&&(A.node.timestamp=Date.now()),E}}),YA.mkdev(C,Q,E)},forceLoadFile:function(A){if(A.isDevice||A.isFolder||A.link||A.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!t)throw new Error("Cannot load without read() or XMLHttpRequest.");try{A.contents=dI(t(A.url),!0),A.usedBytes=A.contents.length}catch(A){throw new YA.ErrnoError(29)}},createLazyFile:function(A,I,g,B,C){function Q(){this.lengthKnown=!1,this.chunks=[]}if(Q.prototype.get=function(A){if(!(A>this.length-1||A<0)){var I=A%this.chunkSize,g=A/this.chunkSize|0;return this.getter(g)[I]}},Q.prototype.setDataGetter=function(A){this.getter=A},Q.prototype.cacheLength=function(){var A=new XMLHttpRequest;if(A.open("HEAD",g,!1),A.send(null),!(A.status>=200&&A.status<300||304===A.status))throw new Error("Couldn't load "+g+". Status: "+A.status);var I,B=Number(A.getResponseHeader("Content-length")),C=(I=A.getResponseHeader("Accept-Ranges"))&&"bytes"===I,Q=(I=A.getResponseHeader("Content-Encoding"))&&"gzip"===I,E=1048576;C||(E=B);var i=this;i.setDataGetter((function(A){var I=A*E,C=(A+1)*E-1;if(C=Math.min(C,B-1),void 0===i.chunks[A]&&(i.chunks[A]=function(A,I){if(A>I)throw new Error("invalid range ("+A+", "+I+") or no bytes requested!");if(I>B-1)throw new Error("only "+B+" bytes available! programmer error!");var C=new XMLHttpRequest;if(C.open("GET",g,!1),B!==E&&C.setRequestHeader("Range","bytes="+A+"-"+I),"undefined"!=typeof Uint8Array&&(C.responseType="arraybuffer"),C.overrideMimeType&&C.overrideMimeType("text/plain; charset=x-user-defined"),C.send(null),!(C.status>=200&&C.status<300||304===C.status))throw new Error("Couldn't load "+g+". Status: "+C.status);return void 0!==C.response?new Uint8Array(C.response||[]):dI(C.responseText||"",!0)}(I,C)),void 0===i.chunks[A])throw new Error("doXHR failed!");return i.chunks[A]})),!Q&&B||(E=B=1,B=this.getter(0).length,E=B,r("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=B,this._chunkSize=E,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!F)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var E=new Q;Object.defineProperties(E,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var i={isDevice:!1,contents:E}}else i={isDevice:!1,url:g};var o=YA.createFile(A,I,i,B,C);i.contents?o.contents=i.contents:i.url&&(o.contents=null,o.url=i.url),Object.defineProperties(o,{usedBytes:{get:function(){return this.contents.length}}});var D={};return Object.keys(o.stream_ops).forEach((function(A){var I=o.stream_ops[A];D[A]=function(){return YA.forceLoadFile(o),I.apply(null,arguments)}})),D.read=function(A,I,g,B,C){YA.forceLoadFile(o);var Q=A.node.contents;if(C>=Q.length)return 0;var E=Math.min(Q.length-C,B);if(Q.slice)for(var i=0;i<E;i++)I[g+i]=Q[C+i];else for(i=0;i<E;i++)I[g+i]=Q.get(C+i);return E},o.stream_ops=D,o},createPreloadedFile:function(I,g,B,C,Q,E,i,o,D,t){Browser.init();var w=g?MA.resolve(NA.join2(I,g)):I;function s(B){function h(A){t&&t(),o||YA.createDataFile(I,g,A,C,Q,D),E&&E(),sA()}var s=!1;A.preloadPlugins.forEach((function(A){s||A.canHandle(w)&&(A.handle(B,w,h,(function(){i&&i(),sA()})),s=!0)})),s||h(B)}wA(),"string"==typeof B?function(A,I,g,B){var C=B?"":"al "+A;h(A,(function(g){d(g,'Loading data file "'+A+'" failed (no arrayBuffer).'),I(new Uint8Array(g)),C&&sA()}),(function(I){if(!g)throw'Loading data file "'+A+'" failed.';g()})),C&&wA()}(B,(function(A){s(A)}),i):s(B)},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(A,I,g){I=I||function(){},g=g||function(){};var B=YA.indexedDB();try{var C=B.open(YA.DB_NAME(),YA.DB_VERSION)}catch(A){return g(A)}C.onupgradeneeded=function(){r("creating db"),C.result.createObjectStore(YA.DB_STORE_NAME)},C.onsuccess=function(){var B=C.result.transaction([YA.DB_STORE_NAME],"readwrite"),Q=B.objectStore(YA.DB_STORE_NAME),E=0,i=0,o=A.length;function D(){0==i?I():g()}A.forEach((function(A){var I=Q.put(YA.analyzePath(A).object.contents,A);I.onsuccess=function(){++E+i==o&&D()},I.onerror=function(){i++,E+i==o&&D()}})),B.onerror=g},C.onerror=g},loadFilesFromDB:function(A,I,g){I=I||function(){},g=g||function(){};var B=YA.indexedDB();try{var C=B.open(YA.DB_NAME(),YA.DB_VERSION)}catch(A){return g(A)}C.onupgradeneeded=g,C.onsuccess=function(){var B=C.result;try{var Q=B.transaction([YA.DB_STORE_NAME],"readonly")}catch(A){return void g(A)}var E=Q.objectStore(YA.DB_STORE_NAME),i=0,o=0,D=A.length;function t(){0==o?I():g()}A.forEach((function(A){var I=E.get(A);I.onsuccess=function(){YA.analyzePath(A).exists&&YA.unlink(A),YA.createDataFile(NA.dirname(A),NA.basename(A),I.result,!0,!0,!0),++i+o==D&&t()},I.onerror=function(){o++,i+o==D&&t()}})),Q.onerror=g},C.onerror=g}},dA={mappings:{},DEFAULT_POLLMASK:5,calculateAt:function(A,I,g){if("/"===I[0])return I;var B;if(-100===A)B=YA.cwd();else{var C=YA.getStream(A);if(!C)throw new YA.ErrnoError(8);B=C.path}if(0==I.length){if(!g)throw new YA.ErrnoError(44);return B}return NA.join2(B,I)},doStat:function(A,I,g){try{var B=A(I)}catch(A){if(A&&A.node&&NA.normalize(I)!==NA.normalize(YA.getPath(A.node)))return-54;throw A}return q[g>>2]=B.dev,q[g+4>>2]=0,q[g+8>>2]=B.ino,q[g+12>>2]=B.mode,q[g+16>>2]=B.nlink,q[g+20>>2]=B.uid,q[g+24>>2]=B.gid,q[g+28>>2]=B.rdev,q[g+32>>2]=0,oA=[B.size>>>0,(iA=B.size,+Math.abs(iA)>=1?iA>0?(0|Math.min(+Math.floor(iA/4294967296),4294967295))>>>0:~~+Math.ceil((iA-+(~~iA>>>0))/4294967296)>>>0:0)],q[g+40>>2]=oA[0],q[g+44>>2]=oA[1],q[g+48>>2]=4096,q[g+52>>2]=B.blocks,q[g+56>>2]=B.atime.getTime()/1e3|0,q[g+60>>2]=0,q[g+64>>2]=B.mtime.getTime()/1e3|0,q[g+68>>2]=0,q[g+72>>2]=B.ctime.getTime()/1e3|0,q[g+76>>2]=0,oA=[B.ino>>>0,(iA=B.ino,+Math.abs(iA)>=1?iA>0?(0|Math.min(+Math.floor(iA/4294967296),4294967295))>>>0:~~+Math.ceil((iA-+(~~iA>>>0))/4294967296)>>>0:0)],q[g+80>>2]=oA[0],q[g+84>>2]=oA[1],0},doMsync:function(A,I,g,B,C){var Q=m.slice(A,A+g);YA.msync(I,Q,C,g,B)},doMkdir:function(A,I){return"/"===(A=NA.normalize(A))[A.length-1]&&(A=A.substr(0,A.length-1)),YA.mkdir(A,I,0),0},doMknod:function(A,I,g){switch(61440&I){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return YA.mknod(A,I,g),0},doReadlink:function(A,I,g){if(g<=0)return-28;var B=YA.readlink(A),C=Math.min(g,f(B)),Q=p[I+C];return l(B,I,g+1),p[I+C]=Q,C},doAccess:function(A,I){if(-8&I)return-28;var g;if(!(g=YA.lookupPath(A,{follow:!0}).node))return-44;var B="";return 4&I&&(B+="r"),2&I&&(B+="w"),1&I&&(B+="x"),B&&YA.nodePermissions(g,B)?-2:0},doDup:function(A,I,g){var B=YA.getStream(g);return B&&YA.close(B),YA.open(A,I,0,g,g).fd},doReadv:function(A,I,g,B){for(var C=0,Q=0;Q<g;Q++){var E=q[I+8*Q>>2],i=q[I+(8*Q+4)>>2],o=YA.read(A,p,E,i,B);if(o<0)return-1;if(C+=o,o<i)break}return C},doWritev:function(A,I,g,B){for(var C=0,Q=0;Q<g;Q++){var E=q[I+8*Q>>2],i=q[I+(8*Q+4)>>2],o=YA.write(A,p,E,i,B);if(o<0)return-1;C+=o}return C},varargs:void 0,get:function(){return dA.varargs+=4,q[dA.varargs-4>>2]},getStr:function(A){return J(A)},getStreamFromFD:function(A){var I=YA.getStream(A);if(!I)throw new YA.ErrnoError(8);return I},get64:function(A,I){return A}};function HA(){return 0}function KA(A){switch(A){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+A)}}var JA=void 0;function LA(A){for(var I="",g=A;m[g];)I+=JA[m[g++]];return I}var lA={},fA={},uA={};function pA(A){if(void 0===A)return"_unknown";var I=(A=A.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return I>=48&&I<=57?"_"+A:A}function mA(A,I){return A=pA(A),new Function("body","return function "+A+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(I)}function bA(A,I){var g=mA(I,(function(A){this.name=I,this.message=A;var g=new Error(A).stack;void 0!==g&&(this.stack=this.toString()+"\n"+g.replace(/^Error(:[^\n]*)?\n/,""))}));return g.prototype=Object.create(A.prototype),g.prototype.constructor=g,g.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},g}var ZA=void 0;function qA(A){throw new ZA(A)}var WA=void 0;function xA(A){throw new WA(A)}function VA(A,I,g){if(g=g||{},!("argPackAdvance"in I))throw new TypeError("registerType registeredInstance requires argPackAdvance");var B=I.name;if(A||qA('type "'+B+'" must have a positive integer typeid pointer'),fA.hasOwnProperty(A)){if(g.ignoreDuplicateRegistrations)return;qA("Cannot register type '"+B+"' twice")}if(fA[A]=I,delete uA[A],lA.hasOwnProperty(A)){var C=lA[A];delete lA[A],C.forEach((function(A){A()}))}}var vA=[],XA=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function TA(A){A>4&&0==--XA[A].refcount&&(XA[A]=void 0,vA.push(A))}function jA(){for(var A=0,I=5;I<XA.length;++I)void 0!==XA[I]&&++A;return A}function OA(){for(var A=5;A<XA.length;++A)if(void 0!==XA[A])return XA[A];return null}var zA=function(A){return A||qA("Cannot use deleted val. handle = "+A),XA[A].value},PA=function(A){switch(A){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var I=vA.length?vA.pop():XA.length;return XA[I]={refcount:1,value:A},I}};function _A(A){return this.fromWireType(W[A>>2])}function $A(A){if(null===A)return"null";var I=typeof A;return"object"===I||"array"===I||"function"===I?A.toString():""+A}function AI(A,I){switch(I){case 2:return function(A){return this.fromWireType(x[A>>2])};case 3:return function(A){return this.fromWireType(V[A>>3])};default:throw new TypeError("Unknown float type: "+A)}}function II(A,I){if(!(A instanceof Function))throw new TypeError("new_ called with constructor type "+typeof A+" which is not a function");var g=mA(A.name||"unknownFunctionName",(function(){}));g.prototype=A.prototype;var B=new g,C=A.apply(B,I);return C instanceof Object?C:B}function gI(A){for(;A.length;){var I=A.pop();A.pop()(I)}}function BI(I,g,B){A.hasOwnProperty(I)?((void 0===B||void 0!==A[I].overloadTable&&void 0!==A[I].overloadTable[B])&&qA("Cannot register public name '"+I+"' twice"),function(A,I,g){if(void 0===A[I].overloadTable){var B=A[I];A[I]=function(){return A[I].overloadTable.hasOwnProperty(arguments.length)||qA("Function '"+g+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+A[I].overloadTable+")!"),A[I].overloadTable[arguments.length].apply(this,arguments)},A[I].overloadTable=[],A[I].overloadTable[B.argCount]=B}}(A,I,I),A.hasOwnProperty(B)&&qA("Cannot register multiple overloads of a function with the same number of arguments ("+B+")!"),A[I].overloadTable[B]=g):(A[I]=g,void 0!==B&&(A[I].numArguments=B))}function CI(I,g,B){return I.includes("j")?function(I,g,B){var C=A["dynCall_"+I];return B&&B.length?C.apply(null,[g].concat(B)):C.call(null,g)}(I,g,B):nA(g).apply(null,B)}function QI(A,I){var g,B,C,Q=(A=LA(A)).includes("j")?(g=A,B=I,C=[],function(){C.length=arguments.length;for(var A=0;A<arguments.length;A++)C[A]=arguments[A];return CI(g,B,C)}):nA(I);return"function"!=typeof Q&&qA("unknown function pointer with signature "+A+": "+I),Q}var EI=void 0;function iI(A){var I=fI(A),g=LA(I);return LI(I),g}function oI(A,I,g){switch(I){case 0:return g?function(A){return p[A]}:function(A){return m[A]};case 1:return g?function(A){return b[A>>1]}:function(A){return Z[A>>1]};case 2:return g?function(A){return q[A>>2]}:function(A){return W[A>>2]};default:throw new TypeError("Unknown integer type: "+A)}}function DI(A,I){var g=fA[A];return void 0===g&&qA(I+" has unknown type "+iI(A)),g}var tI={};function hI(A){var I=tI[A];return void 0===I?LA(A):I}var wI,sI=[];function aI(){return"object"==typeof globalThis?globalThis:Function("return this")()}function eI(A){try{return S.grow(A-u.byteLength+65535>>>16),$(S.buffer),1}catch(A){}}wI=n?function(){var A=B.hrtime();return 1e3*A[0]+A[1]/1e6}:function(){return performance.now()};var cI={};function GI(){if(!GI.strings){var A={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:c||"./this.program"};for(var I in cI)void 0===cI[I]?delete A[I]:A[I]=cI[I];var g=[];for(var I in A)g.push(I+"="+A[I]);GI.strings=g}return GI.strings}function yI(){yI.called||(yI.called=!0,function(){var A=(new Date).getFullYear(),I=new Date(A,0,1),g=new Date(A,6,1),B=I.getTimezoneOffset(),C=g.getTimezoneOffset(),Q=Math.max(B,C);function E(A){var I=A.toTimeString().match(/\(([A-Za-z ]+)\)$/);return I?I[1]:"GMT"}q[mI()>>2]=60*Q,q[pI()>>2]=Number(B!=C);var i=E(I),o=E(g),D=_(i),t=_(o);C<B?(q[uI()>>2]=D,q[uI()+4>>2]=t):(q[uI()>>2]=t,q[uI()+4>>2]=D)}())}function FI(A){return A%4==0&&(A%100!=0||A%400==0)}function nI(A,I){for(var g=0,B=0;B<=I;g+=A[B++]);return g}var RI=[31,29,31,30,31,30,31,31,30,31,30,31],rI=[31,28,31,30,31,30,31,31,30,31,30,31];function NI(A,I){for(var g=new Date(A.getTime());I>0;){var B=FI(g.getFullYear()),C=g.getMonth(),Q=(B?RI:rI)[C];if(!(I>Q-g.getDate()))return g.setDate(g.getDate()+I),g;I-=Q-g.getDate()+1,g.setDate(1),C<11?g.setMonth(C+1):(g.setMonth(0),g.setFullYear(g.getFullYear()+1))}return g}function MI(A,I,g,B){var C=q[B+40>>2],Q={tm_sec:q[B>>2],tm_min:q[B+4>>2],tm_hour:q[B+8>>2],tm_mday:q[B+12>>2],tm_mon:q[B+16>>2],tm_year:q[B+20>>2],tm_wday:q[B+24>>2],tm_yday:q[B+28>>2],tm_isdst:q[B+32>>2],tm_gmtoff:q[B+36>>2],tm_zone:C?J(C):""},E=J(g),i={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var o in i)E=E.replace(new RegExp(o,"g"),i[o]);var D=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],t=["January","February","March","April","May","June","July","August","September","October","November","December"];function h(A,I,g){for(var B="number"==typeof A?A.toString():A||"";B.length<I;)B=g[0]+B;return B}function w(A,I){return h(A,I,"0")}function s(A,I){function g(A){return A<0?-1:A>0?1:0}var B;return 0===(B=g(A.getFullYear()-I.getFullYear()))&&0===(B=g(A.getMonth()-I.getMonth()))&&(B=g(A.getDate()-I.getDate())),B}function a(A){switch(A.getDay()){case 0:return new Date(A.getFullYear()-1,11,29);case 1:return A;case 2:return new Date(A.getFullYear(),0,3);case 3:return new Date(A.getFullYear(),0,2);case 4:return new Date(A.getFullYear(),0,1);case 5:return new Date(A.getFullYear()-1,11,31);case 6:return new Date(A.getFullYear()-1,11,30)}}function e(A){var I=NI(new Date(A.tm_year+1900,0,1),A.tm_yday),g=new Date(I.getFullYear(),0,4),B=new Date(I.getFullYear()+1,0,4),C=a(g),Q=a(B);return s(C,I)<=0?s(Q,I)<=0?I.getFullYear()+1:I.getFullYear():I.getFullYear()-1}var c={"%a":function(A){return D[A.tm_wday].substring(0,3)},"%A":function(A){return D[A.tm_wday]},"%b":function(A){return t[A.tm_mon].substring(0,3)},"%B":function(A){return t[A.tm_mon]},"%C":function(A){return w((A.tm_year+1900)/100|0,2)},"%d":function(A){return w(A.tm_mday,2)},"%e":function(A){return h(A.tm_mday,2," ")},"%g":function(A){return e(A).toString().substring(2)},"%G":function(A){return e(A)},"%H":function(A){return w(A.tm_hour,2)},"%I":function(A){var I=A.tm_hour;return 0==I?I=12:I>12&&(I-=12),w(I,2)},"%j":function(A){return w(A.tm_mday+nI(FI(A.tm_year+1900)?RI:rI,A.tm_mon-1),3)},"%m":function(A){return w(A.tm_mon+1,2)},"%M":function(A){return w(A.tm_min,2)},"%n":function(){return"\n"},"%p":function(A){return A.tm_hour>=0&&A.tm_hour<12?"AM":"PM"},"%S":function(A){return w(A.tm_sec,2)},"%t":function(){return"\t"},"%u":function(A){return A.tm_wday||7},"%U":function(A){var I=new Date(A.tm_year+1900,0,1),g=0===I.getDay()?I:NI(I,7-I.getDay()),B=new Date(A.tm_year+1900,A.tm_mon,A.tm_mday);if(s(g,B)<0){var C=nI(FI(B.getFullYear())?RI:rI,B.getMonth()-1)-31,Q=31-g.getDate()+C+B.getDate();return w(Math.ceil(Q/7),2)}return 0===s(g,I)?"01":"00"},"%V":function(A){var I,g=new Date(A.tm_year+1900,0,4),B=new Date(A.tm_year+1901,0,4),C=a(g),Q=a(B),E=NI(new Date(A.tm_year+1900,0,1),A.tm_yday);return s(E,C)<0?"53":s(Q,E)<=0?"01":(I=C.getFullYear()<A.tm_year+1900?A.tm_yday+32-C.getDate():A.tm_yday+1-C.getDate(),w(Math.ceil(I/7),2))},"%w":function(A){return A.tm_wday},"%W":function(A){var I=new Date(A.tm_year,0,1),g=1===I.getDay()?I:NI(I,0===I.getDay()?1:7-I.getDay()+1),B=new Date(A.tm_year+1900,A.tm_mon,A.tm_mday);if(s(g,B)<0){var C=nI(FI(B.getFullYear())?RI:rI,B.getMonth()-1)-31,Q=31-g.getDate()+C+B.getDate();return w(Math.ceil(Q/7),2)}return 0===s(g,I)?"01":"00"},"%y":function(A){return(A.tm_year+1900).toString().substring(2)},"%Y":function(A){return A.tm_year+1900},"%z":function(A){var I=A.tm_gmtoff,g=I>=0;return I=(I=Math.abs(I)/60)/60*100+I%60,(g?"+":"-")+String("0000"+I).slice(-4)},"%Z":function(A){return A.tm_zone},"%%":function(){return"%"}};for(var o in c)E.includes(o)&&(E=E.replace(new RegExp(o,"g"),c[o](Q)));var G=dI(E,!1);return G.length>I?0:(function(A,I){p.set(A,I)}(G,A),G.length-1)}function UI(A){return parseInt(A)}var SI=function(A,I,g,B){A||(A=this),this.parent=A,this.mount=A.mount,this.mounted=null,this.id=YA.nextInode++,this.name=I,this.mode=g,this.node_ops={},this.stream_ops={},this.rdev=B},kI=365,YI=146;function dI(A,I,g){var B=g>0?g:f(A)+1,C=new Array(B),Q=L(A,C,0,C.length);return I&&(C.length=Q),C}Object.defineProperties(SI.prototype,{read:{get:function(){return(this.mode&kI)===kI},set:function(A){A?this.mode|=kI:this.mode&=-366}},write:{get:function(){return(this.mode&YI)===YI},set:function(A){A?this.mode|=YI:this.mode&=-147}},isFolder:{get:function(){return YA.isDir(this.mode)}},isDevice:{get:function(){return YA.isChrdev(this.mode)}}}),YA.FSNode=SI,YA.staticInit(),function(){for(var A=new Array(256),I=0;I<256;++I)A[I]=String.fromCharCode(I);JA=A}(),ZA=A.BindingError=bA(Error,"BindingError"),WA=A.InternalError=bA(Error,"InternalError"),A.count_emval_handles=jA,A.get_first_emval=OA,EI=A.UnboundTypeError=bA(Error,"UnboundTypeError");var HI,KI={d:function(A,I,g,B){aA("Assertion failed: "+J(A)+", at: "+[I?J(I):"unknown filename",g,B?J(B):"unknown function"])},U:function(A){return JI(A+16)+16},T:function(A,I,g){throw new RA(A).init(I,g),A},C:function(A,I,g){dA.varargs=g;try{var B=dA.getStreamFromFD(A);switch(I){case 0:return(C=dA.get())<0?-28:YA.open(B.path,B.flags,0,C).fd;case 1:case 2:case 13:case 14:return 0;case 3:return B.flags;case 4:var C=dA.get();return B.flags|=C,0;case 12:return C=dA.get(),b[C+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return rA(28),-1}}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),-A.errno}},fa:function(A,I){try{var g=dA.getStreamFromFD(A);return dA.doStat(YA.stat,g.path,I)}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),-A.errno}},ka:function(A,I,g){try{var B=dA.getStreamFromFD(A);B.getdents||(B.getdents=YA.readdir(B.path));for(var C=280,Q=0,E=YA.llseek(B,0,1),i=Math.floor(E/C);i<B.getdents.length&&Q+C<=g;){var o,D,t=B.getdents[i];if("."===t)o=B.id,D=4;else if(".."===t)o=YA.lookupPath(B.path,{parent:!0}).id,D=4;else{var h=YA.lookupNode(B,t);o=h.id,D=YA.isChrdev(h.mode)?2:YA.isDir(h.mode)?4:YA.isLink(h.mode)?10:8}oA=[o>>>0,(iA=o,+Math.abs(iA)>=1?iA>0?(0|Math.min(+Math.floor(iA/4294967296),4294967295))>>>0:~~+Math.ceil((iA-+(~~iA>>>0))/4294967296)>>>0:0)],q[I+Q>>2]=oA[0],q[I+Q+4>>2]=oA[1],oA=[(i+1)*C>>>0,(iA=(i+1)*C,+Math.abs(iA)>=1?iA>0?(0|Math.min(+Math.floor(iA/4294967296),4294967295))>>>0:~~+Math.ceil((iA-+(~~iA>>>0))/4294967296)>>>0:0)],q[I+Q+8>>2]=oA[0],q[I+Q+12>>2]=oA[1],b[I+Q+16>>1]=280,p[I+Q+18>>0]=D,l(t,I+Q+19,256),Q+=C,i+=1}return YA.llseek(B,i*C,0),Q}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),-A.errno}},ia:HA,ga:function(){return 0},ha:function(){return 0},ja:function(){return 0},L:function(A,I,g){dA.varargs=g;try{var B=dA.getStreamFromFD(A);switch(I){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return B.tty?0:-59;case 21519:if(!B.tty)return-59;var C=dA.get();return q[C>>2]=0,0;case 21520:return B.tty?-28:-59;case 21531:return C=dA.get(),YA.ioctl(B,I,C);default:aA("bad ioctl syscall "+I)}}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),-A.errno}},da:function(A,I,g,B,C,Q){try{return function(A,I,g,B,C,Q){var E;Q<<=12;var i=!1;if(0!=(16&B)&&A%65536!=0)return-28;if(0!=(32&B)){if(!(E=SA(I)))return-48;i=!0}else{var o=YA.getStream(C);if(!o)return-8;var D=YA.mmap(o,A,I,Q,g,B);E=D.ptr,i=D.allocated}return dA.mappings[E]={malloc:E,len:I,allocated:i,fd:C,prot:g,flags:B,offset:Q},E}(A,I,g,B,C,Q)}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),-A.errno}},ca:function(A,I){try{return function(A,I){var g=dA.mappings[A];if(0===I||!g)return-28;if(I===g.len){var B=YA.getStream(g.fd);B&&(2&g.prot&&dA.doMsync(A,B,I,g.flags,g.offset),YA.munmap(B)),dA.mappings[A]=null,g.allocated&&LI(g.malloc)}return 0}(A,I)}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),-A.errno}},I:function(A,I,g){dA.varargs=g;try{var B=dA.getStr(A),C=g?dA.get():0;return YA.open(B,I,C).fd}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),-A.errno}},ea:function(A,I){try{return A=dA.getStr(A),dA.doStat(YA.stat,A,I)}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),-A.errno}},X:function(A,I,g,B,C){},ma:function(A,I,g,B,C){var Q=KA(g);VA(A,{name:I=LA(I),fromWireType:function(A){return!!A},toWireType:function(A,I){return I?B:C},argPackAdvance:8,readValueFromPointer:function(A){var B;if(1===g)B=p;else if(2===g)B=b;else{if(4!==g)throw new TypeError("Unknown boolean type size: "+I);B=q}return this.fromWireType(B[A>>Q])},destructorFunction:null})},la:function(A,I){VA(A,{name:I=LA(I),fromWireType:function(A){var I=zA(A);return TA(A),I},toWireType:function(A,I){return PA(I)},argPackAdvance:8,readValueFromPointer:_A,destructorFunction:null})},M:function(A,I,g){var B=KA(g);VA(A,{name:I=LA(I),fromWireType:function(A){return A},toWireType:function(A,I){if("number"!=typeof I&&"boolean"!=typeof I)throw new TypeError('Cannot convert "'+$A(I)+'" to '+this.name);return I},argPackAdvance:8,readValueFromPointer:AI(I,B),destructorFunction:null})},s:function(I,g,B,C,Q,E){var i=function(A,I){for(var g=[],B=0;B<A;B++)g.push(q[(I>>2)+B]);return g}(g,B);I=LA(I),Q=QI(C,Q),BI(I,(function(){!function(A,I){var g=[],B={};throw I.forEach((function A(I){B[I]||fA[I]||(uA[I]?uA[I].forEach(A):(g.push(I),B[I]=!0))})),new EI(A+": "+g.map(iI).join([", "]))}("Cannot call "+I+" due to unbound types",i)}),g-1),function(A,I,g){function B(I){var B=g(I);B.length!==A.length&&xA("Mismatched type converter count");for(var C=0;C<A.length;++C)VA(A[C],B[C])}A.forEach((function(A){uA[A]=I}));var C=new Array(I.length),Q=[],E=0;I.forEach((function(A,I){fA.hasOwnProperty(A)?C[I]=fA[A]:(Q.push(A),lA.hasOwnProperty(A)||(lA[A]=[]),lA[A].push((function(){C[I]=fA[A],++E===Q.length&&B(C)})))})),0===Q.length&&B(C)}([],i,(function(B){var C=[B[0],null].concat(B.slice(1));return function(I,g,B){A.hasOwnProperty(I)||xA("Replacing nonexistant public symbol"),void 0!==A[I].overloadTable&&void 0!==B?A[I].overloadTable[B]=g:(A[I]=g,A[I].argCount=B)}(I,function(A,I,g,B,C){var Q=I.length;Q<2&&qA("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var E=null!==I[1]&&null!==g,i=!1,o=1;o<I.length;++o)if(null!==I[o]&&void 0===I[o].destructorFunction){i=!0;break}var D="void"!==I[0].name,t="",h="";for(o=0;o<Q-2;++o)t+=(0!==o?", ":"")+"arg"+o,h+=(0!==o?", ":"")+"arg"+o+"Wired";var w="return function "+pA(A)+"("+t+") {\nif (arguments.length !== "+(Q-2)+") {\nthrowBindingError('function "+A+" called with ' + arguments.length + ' arguments, expected "+(Q-2)+" args!');\n}\n";i&&(w+="var destructors = [];\n");var s=i?"destructors":"null",a=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],e=[qA,B,C,gI,I[0],I[1]];for(E&&(w+="var thisWired = classParam.toWireType("+s+", this);\n"),o=0;o<Q-2;++o)w+="var arg"+o+"Wired = argType"+o+".toWireType("+s+", arg"+o+"); // "+I[o+2].name+"\n",a.push("argType"+o),e.push(I[o+2]);if(E&&(h="thisWired"+(h.length>0?", ":"")+h),w+=(D?"var rv = ":"")+"invoker(fn"+(h.length>0?", ":"")+h+");\n",i)w+="runDestructors(destructors);\n";else for(o=E?1:2;o<I.length;++o){var c=1===o?"thisWired":"arg"+(o-2)+"Wired";null!==I[o].destructorFunction&&(w+=c+"_dtor("+c+"); // "+I[o].name+"\n",a.push(c+"_dtor"),e.push(I[o].destructorFunction))}return D&&(w+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),w+="}\n",a.push(w),II(Function,a).apply(null,e)}(I,C,null,Q,E),g-1),[]}))},v:function(A,I,g,B,C){I=LA(I),-1===C&&(C=4294967295);var Q=KA(g),E=function(A){return A};if(0===B){var i=32-8*g;E=function(A){return A<<i>>>i}}var o=I.includes("unsigned");VA(A,{name:I,fromWireType:E,toWireType:function(A,g){if("number"!=typeof g&&"boolean"!=typeof g)throw new TypeError('Cannot convert "'+$A(g)+'" to '+this.name);if(g<B||g>C)throw new TypeError('Passing a number "'+$A(g)+'" from JS side to C/C++ side to an argument of type "'+I+'", which is outside the valid range ['+B+", "+C+"]!");return o?g>>>0:0|g},argPackAdvance:8,readValueFromPointer:oI(I,Q,0!==B),destructorFunction:null})},u:function(A,I,g){var B=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][I];function C(A){var I=W,g=I[A>>=2],C=I[A+1];return new B(u,C,g)}VA(A,{name:g=LA(g),fromWireType:C,argPackAdvance:8,readValueFromPointer:C},{ignoreDuplicateRegistrations:!0})},N:function(A,I){var g="std::string"===(I=LA(I));VA(A,{name:I,fromWireType:function(A){var I,B=W[A>>2];if(g)for(var C=A+4,Q=0;Q<=B;++Q){var E=A+4+Q;if(Q==B||0==m[E]){var i=J(C,E-C);void 0===I?I=i:(I+=String.fromCharCode(0),I+=i),C=E+1}}else{var o=new Array(B);for(Q=0;Q<B;++Q)o[Q]=String.fromCharCode(m[A+4+Q]);I=o.join("")}return LI(A),I},toWireType:function(A,I){I instanceof ArrayBuffer&&(I=new Uint8Array(I));var B="string"==typeof I;B||I instanceof Uint8Array||I instanceof Uint8ClampedArray||I instanceof Int8Array||qA("Cannot pass non-string to std::string");var C=(g&&B?function(){return f(I)}:function(){return I.length})(),Q=JI(4+C+1);if(W[Q>>2]=C,g&&B)l(I,Q+4,C+1);else if(B)for(var E=0;E<C;++E){var i=I.charCodeAt(E);i>255&&(LI(Q),qA("String has UTF-16 code units that do not fit in 8 bits")),m[Q+4+E]=i}else for(E=0;E<C;++E)m[Q+4+E]=I[E];return null!==A&&A.push(LI,Q),Q},argPackAdvance:8,readValueFromPointer:_A,destructorFunction:function(A){LI(A)}})},D:function(A,I,g){var B,C,Q,E,i;g=LA(g),2===I?(B=X,C=T,E=j,Q=function(){return Z},i=1):4===I&&(B=O,C=z,E=P,Q=function(){return W},i=2),VA(A,{name:g,fromWireType:function(A){for(var g,C=W[A>>2],E=Q(),o=A+4,D=0;D<=C;++D){var t=A+4+D*I;if(D==C||0==E[t>>i]){var h=B(o,t-o);void 0===g?g=h:(g+=String.fromCharCode(0),g+=h),o=t+I}}return LI(A),g},toWireType:function(A,B){"string"!=typeof B&&qA("Cannot pass non-string to C++ string type "+g);var Q=E(B),o=JI(4+Q+I);return W[o>>2]=Q>>i,C(B,o+4,Q+I),null!==A&&A.push(LI,o),o},argPackAdvance:8,readValueFromPointer:_A,destructorFunction:function(A){LI(A)}})},na:function(A,I){VA(A,{isVoid:!0,name:I=LA(I),argPackAdvance:0,fromWireType:function(){},toWireType:function(A,I){}})},$:function(){throw"longjmp"},V:function(A,I,g){A=zA(A),I=DI(I,"emval::as");var B=[],C=PA(B);return q[g>>2]=C,I.toWireType(B,A)},q:function(A,I,g,B,C){return(A=sI[A])(I=zA(I),g=hI(g),function(A){var I=[];return q[A>>2]=PA(I),I}(B),C)},a:TA,H:function(A){return 0===A?PA(aI()):(A=hI(A),PA(aI()[A]))},r:function(A,I){for(var g=function(A,I){for(var g=new Array(A),B=0;B<A;++B)g[B]=DI(q[(I>>2)+B],"parameter "+B);return g}(A,I),B=g[0],C=B.name+"_$"+g.slice(1).map((function(A){return A.name})).join("_")+"$",Q=["retType"],E=[B],i="",o=0;o<A-1;++o)i+=(0!==o?", ":"")+"arg"+o,Q.push("argType"+o),E.push(g[1+o]);var D="return function "+pA("methodCaller_"+C)+"(handle, name, destructors, args) {\n",t=0;for(o=0;o<A-1;++o)D+=" var arg"+o+" = argType"+o+".readValueFromPointer(args"+(t?"+"+t:"")+");\n",t+=g[o+1].argPackAdvance;for(D+=" var rv = handle[name]("+i+");\n",o=0;o<A-1;++o)g[o+1].deleteObject&&(D+=" argType"+o+".deleteObject(arg"+o+");\n");B.isVoid||(D+=" return retType.toWireType(destructors, rv);\n"),D+="};\n",Q.push(D);var h,w,s=II(Function,Q).apply(null,E);return h=s,w=sI.length,sI.push(h),w},l:function(A){A>4&&(XA[A].refcount+=1)},i:function(){return PA([])},b:function(A){return PA(hI(A))},h:function(){return PA({})},p:function(A){gI(zA(A)),TA(A)},c:function(A,I,g){A=zA(A),I=zA(I),g=zA(g),A[I]=g},f:function(A,I){var g=(A=DI(A,"_emval_take_value")).readValueFromPointer(I);return PA(g)},y:function(){aA("")},P:function(A,I){var g;if(0===A)g=Date.now();else{if(1!==A&&4!==A)return rA(28),-1;g=wI()}return q[I>>2]=g/1e3|0,q[I+4>>2]=g%1e3*1e3*1e3|0,0},Y:function(A,I,g){m.copyWithin(A,I,I+g)},Z:function(A){var I,g,B=m.length,C=2147483648;if((A>>>=0)>C)return!1;for(var Q=1;Q<=4;Q*=2){var E=B*(1+.2/Q);if(E=Math.min(E,A+100663296),eI(Math.min(C,((I=Math.max(A,E))%(g=65536)>0&&(I+=g-I%g),I))))return!0}return!1},aa:function(A,I){var g=0;return GI().forEach((function(B,C){var Q=I+g;q[A+4*C>>2]=Q,function(A,I,g){for(var B=0;B<A.length;++B)p[I++>>0]=A.charCodeAt(B);g||(p[I>>0]=0)}(B,Q),g+=B.length+1})),0},ba:function(A,I){var g=GI();q[A>>2]=g.length;var B=0;return g.forEach((function(A){B+=A.length+1})),q[I>>2]=B,0},G:function(I){!function(I,g){var B;CA(),B=I,CA()||(A.onExit&&A.onExit(B),Y=!0),G(B,new xI(B))}(I)},A:function(A){try{var I=dA.getStreamFromFD(A);return YA.close(I),0}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),A.errno}},K:function(A,I,g,B){try{var C=dA.getStreamFromFD(A),Q=dA.doReadv(C,I,g);return q[B>>2]=Q,0}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),A.errno}},W:function(A,I,g,B,C){try{var Q=dA.getStreamFromFD(A),E=4294967296*g+(I>>>0),i=9007199254740992;return E<=-i||E>=i?-61:(YA.llseek(Q,E,B),oA=[Q.position>>>0,(iA=Q.position,+Math.abs(iA)>=1?iA>0?(0|Math.min(+Math.floor(iA/4294967296),4294967295))>>>0:~~+Math.ceil((iA-+(~~iA>>>0))/4294967296)>>>0:0)],q[C>>2]=oA[0],q[C+4>>2]=oA[1],Q.getdents&&0===E&&0===B&&(Q.getdents=null),0)}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),A.errno}},J:function(A,I,g,B){try{var C=dA.getStreamFromFD(A),Q=dA.doWritev(C,I,g);return q[B>>2]=Q,0}catch(A){return void 0!==YA&&A instanceof YA.ErrnoError||aA(A),A.errno}},e:function(){return U},O:function(A){var I=Date.now();return q[A>>2]=I/1e3|0,q[A+4>>2]=I%1e3*1e3|0,0},m:function(A,I){var g=bI();try{return nA(A)(I)}catch(A){if(ZI(g),A!==A+0&&"longjmp"!==A)throw A;qI(1,0)}},t:function(A,I,g){var B=bI();try{return nA(A)(I,g)}catch(A){if(ZI(B),A!==A+0&&"longjmp"!==A)throw A;qI(1,0)}},k:function(A,I,g,B){var C=bI();try{return nA(A)(I,g,B)}catch(A){if(ZI(C),A!==A+0&&"longjmp"!==A)throw A;qI(1,0)}},o:function(A,I,g,B,C){var Q=bI();try{return nA(A)(I,g,B,C)}catch(A){if(ZI(Q),A!==A+0&&"longjmp"!==A)throw A;qI(1,0)}},oa:function(A,I,g,B,C,Q,E,i){var o=bI();try{return nA(A)(I,g,B,C,Q,E,i)}catch(A){if(ZI(o),A!==A+0&&"longjmp"!==A)throw A;qI(1,0)}},pa:function(A,I,g,B,C,Q,E,i,o,D){var t=bI();try{return nA(A)(I,g,B,C,Q,E,i,o,D)}catch(A){if(ZI(t),A!==A+0&&"longjmp"!==A)throw A;qI(1,0)}},n:function(A,I){var g=bI();try{nA(A)(I)}catch(A){if(ZI(g),A!==A+0&&"longjmp"!==A)throw A;qI(1,0)}},j:function(A,I,g){var B=bI();try{nA(A)(I,g)}catch(A){if(ZI(B),A!==A+0&&"longjmp"!==A)throw A;qI(1,0)}},w:function(A,I,g,B){var C=bI();try{nA(A)(I,g,B)}catch(A){if(ZI(C),A!==A+0&&"longjmp"!==A)throw A;qI(1,0)}},x:function(A,I,g,B,C){var Q=bI();try{nA(A)(I,g,B,C)}catch(A){if(ZI(Q),A!==A+0&&"longjmp"!==A)throw A;qI(1,0)}},B:function(A,I,g,B,C,Q,E,i,o,D){var t=bI();try{nA(A)(I,g,B,C,Q,E,i,o,D)}catch(A){if(ZI(t),A!==A+0&&"longjmp"!==A)throw A;qI(1,0)}},F:function(A,I){yI();var g=new Date(1e3*q[A>>2]);q[I>>2]=g.getSeconds(),q[I+4>>2]=g.getMinutes(),q[I+8>>2]=g.getHours(),q[I+12>>2]=g.getDate(),q[I+16>>2]=g.getMonth(),q[I+20>>2]=g.getFullYear()-1900,q[I+24>>2]=g.getDay();var B=new Date(g.getFullYear(),0,1),C=(g.getTime()-B.getTime())/864e5|0;q[I+28>>2]=C,q[I+36>>2]=-60*g.getTimezoneOffset();var Q=new Date(g.getFullYear(),6,1).getTimezoneOffset(),E=B.getTimezoneOffset(),i=0|(Q!=E&&g.getTimezoneOffset()==Math.min(E,Q));q[I+32>>2]=i;var o=q[uI()+(i?4:0)>>2];return q[I+40>>2]=o,I},S:function(A){yI();var I=new Date(q[A+20>>2]+1900,q[A+16>>2],q[A+12>>2],q[A+8>>2],q[A+4>>2],q[A>>2],0),g=q[A+32>>2],B=I.getTimezoneOffset(),C=new Date(I.getFullYear(),0,1),Q=new Date(I.getFullYear(),6,1).getTimezoneOffset(),E=C.getTimezoneOffset(),i=Math.min(E,Q);if(g<0)q[A+32>>2]=Number(Q!=E&&i==B);else if(g>0!=(i==B)){var o=Math.max(E,Q),D=g>0?i:o;I.setTime(I.getTime()+6e4*(D-B))}q[A+24>>2]=I.getDay();var t=(I.getTime()-C.getTime())/864e5|0;return q[A+28>>2]=t,q[A>>2]=I.getSeconds(),q[A+4>>2]=I.getMinutes(),q[A+8>>2]=I.getHours(),q[A+12>>2]=I.getDate(),q[A+16>>2]=I.getMonth(),I.getTime()/1e3|0},g:function(A){U=A},E:MI,_:function(A,I,g,B){return MI(A,I,g,B)},R:function(A,I,g){for(var B=J(I),C="\\!@#$^&*()+=-[]/{}|:<>?,.",Q=0,E=C.length;Q<E;++Q)B=B.replace(new RegExp("\\"+C[Q],"g"),"\\"+C[Q]);var i={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var o in i)B=B.replace(o,i[o]);var D={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"};for(var t in D)B=B.replace(t,"("+t+D[t]+")");var h=[];for(Q=B.indexOf("%");Q>=0;Q=B.indexOf("%"))h.push(B[Q+1]),B=B.replace(new RegExp("\\%"+B[Q+1],"g"),"");var w=new RegExp("^"+B,"i").exec(J(A));if(w){var s,a=function(){function A(A,I,g){return"number"!=typeof A||isNaN(A)?I:A>=I?A<=g?A:g:I}return{year:A(q[g+20>>2]+1900,1970,9999),month:A(q[g+16>>2],0,11),day:A(q[g+12>>2],1,31),hour:A(q[g+8>>2],0,23),min:A(q[g+4>>2],0,59),sec:A(q[g>>2],0,59)}}(),e=function(A){var I=h.indexOf(A);if(I>=0)return w[I+1]};if((s=e("S"))&&(a.sec=UI(s)),(s=e("M"))&&(a.min=UI(s)),s=e("H"))a.hour=UI(s);else if(s=e("I")){var c=UI(s);(s=e("p"))&&(c+="P"===s.toUpperCase()[0]?12:0),a.hour=c}if(s=e("Y"))a.year=UI(s);else if(s=e("y")){var G=UI(s);(s=e("C"))?G+=100*UI(s):G+=G<69?2e3:1900,a.year=G}if((s=e("m"))?a.month=UI(s)-1:(s=e("b"))&&(a.month={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11}[s.substring(0,3).toUpperCase()]||0),s=e("d"))a.day=UI(s);else if(s=e("j"))for(var y=UI(s),F=FI(a.year),n=0;n<12;++n){var R=nI(F?RI:rI,n-1);y<=R+(F?RI:rI)[n]&&(a.day=y-R)}else if(s=e("a")){var r=s.substring(0,3).toUpperCase();if(s=e("U")){var N={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6}[r],M=UI(s);S=0===(U=new Date(a.year,0,1)).getDay()?NI(U,N+7*(M-1)):NI(U,7-U.getDay()+N+7*(M-1)),a.day=S.getDate(),a.month=S.getMonth()}else if(s=e("W")){var U,S;N={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6}[r],M=UI(s),S=1===(U=new Date(a.year,0,1)).getDay()?NI(U,N+7*(M-1)):NI(U,7-U.getDay()+1+N+7*(M-1)),a.day=S.getDate(),a.month=S.getMonth()}}var k=new Date(a.year,a.month,a.day,a.hour,a.min,a.sec,0);return q[g>>2]=k.getSeconds(),q[g+4>>2]=k.getMinutes(),q[g+8>>2]=k.getHours(),q[g+12>>2]=k.getDate(),q[g+16>>2]=k.getMonth(),q[g+20>>2]=k.getFullYear()-1900,q[g+24>>2]=k.getDay(),q[g+28>>2]=nI(FI(k.getFullYear())?RI:rI,k.getMonth()-1)+k.getDate()-1,q[g+32>>2]=0,A+dI(w[0]).length-1}return 0},z:function(A){var I=Date.now()/1e3|0;return A&&(q[A>>2]=I),I},Q:function(A){yI();var I=Date.UTC(q[A+20>>2]+1900,q[A+16>>2],q[A+12>>2],q[A+8>>2],q[A+4>>2],q[A>>2],0),g=new Date(I);q[A+24>>2]=g.getUTCDay();var B=Date.UTC(g.getUTCFullYear(),0,1,0,0,0,0),C=(g.getTime()-B)/864e5|0;return q[A+28>>2]=C,g.getTime()/1e3|0}},JI=(function(){var I={a:KI};function g(I,g){var B,C=I.exports;A.asm=C,$((S=A.asm.qa).buffer),AA=A.asm.va,B=A.asm.ra,gA.unshift(B),sA()}function B(A){g(A.instance)}function C(A){return function(){if(!M&&(y||F)){if("function"==typeof fetch&&!cA(QA))return fetch(QA,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+QA+"'";return A.arrayBuffer()})).catch((function(){return GA(QA)}));if(h)return new Promise((function(A,I){h(QA,(function(I){A(new Uint8Array(I))}),I)}))}return Promise.resolve().then((function(){return GA(QA)}))}().then((function(A){return WebAssembly.instantiate(A,I)})).then((function(A){return A})).then(A,(function(A){N("failed to asynchronously prepare wasm: "+A),aA(A)}))}if(wA(),A.instantiateWasm)try{return A.instantiateWasm(I,g)}catch(A){return N("Module.instantiateWasm callback failed with error: "+A),!1}(M||"function"!=typeof WebAssembly.instantiateStreaming||eA(QA)||cA(QA)||"function"!=typeof fetch?C(B):fetch(QA,{credentials:"same-origin"}).then((function(A){return WebAssembly.instantiateStreaming(A,I).then(B,(function(A){return N("wasm streaming compile failed: "+A),N("falling back to ArrayBuffer instantiation"),C(B)}))}))).catch(i)}(),A.___wasm_call_ctors=function(){return(A.___wasm_call_ctors=A.asm.ra).apply(null,arguments)},A._malloc=function(){return(JI=A._malloc=A.asm.sa).apply(null,arguments)}),LI=A._free=function(){return(LI=A._free=A.asm.ta).apply(null,arguments)},lI=(A._ASC_FT_Open_Face=function(){return(A._ASC_FT_Open_Face=A.asm.ua).apply(null,arguments)},A._ASC_FT_Malloc=function(){return(A._ASC_FT_Malloc=A.asm.wa).apply(null,arguments)},A._ASC_FT_Free=function(){return(A._ASC_FT_Free=A.asm.xa).apply(null,arguments)},A._ASC_FT_Init=function(){return(A._ASC_FT_Init=A.asm.ya).apply(null,arguments)},A._ASC_FT_Open_Face_Path=function(){return(A._ASC_FT_Open_Face_Path=A.asm.za).apply(null,arguments)},A._ASC_FT_SetCMapForCharCode=function(){return(A._ASC_FT_SetCMapForCharCode=A.asm.Aa).apply(null,arguments)},A._ASC_FT_GetFaceInfo=function(){return(A._ASC_FT_GetFaceInfo=A.asm.Ba).apply(null,arguments)},A._ASC_FT_GetFaceMaxAdvanceX=function(){return(A._ASC_FT_GetFaceMaxAdvanceX=A.asm.Ca).apply(null,arguments)},A._ASC_FT_GetKerningX=function(){return(A._ASC_FT_GetKerningX=A.asm.Da).apply(null,arguments)},A._ASC_FT_Glyph_Get_CBox=function(){return(A._ASC_FT_Glyph_Get_CBox=A.asm.Ea).apply(null,arguments)},A._FT_Decompose_Outline_Buffer_Init=function(){return(A._FT_Decompose_Outline_Buffer_Init=A.asm.Fa).apply(null,arguments)},A._FT_Decompose_Outline_Buffer_Check=function(){return(A._FT_Decompose_Outline_Buffer_Check=A.asm.Ga).apply(null,arguments)},A._GlyphPathMoveTo=function(){return(A._GlyphPathMoveTo=A.asm.Ha).apply(null,arguments)},A._GlyphPathLineTo=function(){return(A._GlyphPathLineTo=A.asm.Ia).apply(null,arguments)},A._GlyphPathConicTo=function(){return(A._GlyphPathConicTo=A.asm.Ja).apply(null,arguments)},A._GlyphPathCubicTo=function(){return(A._GlyphPathCubicTo=A.asm.Ka).apply(null,arguments)},A._AST_FT_Load_Glyph=function(){return(A._AST_FT_Load_Glyph=A.asm.La).apply(null,arguments)},A._ASC_FT_Get_Glyph_Measure_Params=function(){return(A._ASC_FT_Get_Glyph_Measure_Params=A.asm.Ma).apply(null,arguments)},A._ASC_FT_Get_Glyph_Render_Params=function(){return(A._ASC_FT_Get_Glyph_Render_Params=A.asm.Na).apply(null,arguments)},A._ASC_FT_Get_Glyph_Render_Buffer=function(){return(A._ASC_FT_Get_Glyph_Render_Buffer=A.asm.Oa).apply(null,arguments)},A._ASC_FT_Set_Transform=function(){return(A._ASC_FT_Set_Transform=A.asm.Pa).apply(null,arguments)},A._ASC_FT_Set_TrueType_HintProp=function(){return(A._ASC_FT_Set_TrueType_HintProp=A.asm.Qa).apply(null,arguments)},A.___errno_location=function(){return(lI=A.___errno_location=A.asm.Ra).apply(null,arguments)}),fI=A.___getTypeName=function(){return(fI=A.___getTypeName=A.asm.Sa).apply(null,arguments)},uI=(A.___embind_register_native_and_builtin_types=function(){return(A.___embind_register_native_and_builtin_types=A.asm.Ta).apply(null,arguments)},A.__get_tzname=function(){return(uI=A.__get_tzname=A.asm.Ua).apply(null,arguments)}),pI=A.__get_daylight=function(){return(pI=A.__get_daylight=A.asm.Va).apply(null,arguments)},mI=A.__get_timezone=function(){return(mI=A.__get_timezone=A.asm.Wa).apply(null,arguments)},bI=A.stackSave=function(){return(bI=A.stackSave=A.asm.Xa).apply(null,arguments)},ZI=A.stackRestore=function(){return(ZI=A.stackRestore=A.asm.Ya).apply(null,arguments)},qI=A._setThrew=function(){return(qI=A._setThrew=A.asm.Za).apply(null,arguments)},WI=A._memalign=function(){return(WI=A._memalign=A.asm._a).apply(null,arguments)};function xI(A){this.name="ExitStatus",this.message="Program terminated with exit("+A+")",this.status=A}function VI(g){function B(){HI||(HI=!0,A.calledRun=!0,Y||(A.noFSInit||YA.init.initialized||YA.init(),YA.ignorePermissions=!1,UA.init(),yA(gA),I(A),A.onRuntimeInitialized&&A.onRuntimeInitialized(),function(){if(A.postRun)for("function"==typeof A.postRun&&(A.postRun=[A.postRun]);A.postRun.length;)I=A.postRun.shift(),BA.unshift(I);var I;yA(BA)}()))}g=g||e,DA>0||(function(){if(A.preRun)for("function"==typeof A.preRun&&(A.preRun=[A.preRun]);A.preRun.length;)I=A.preRun.shift(),IA.unshift(I);var I;yA(IA)}(),DA>0||(A.setStatus?(A.setStatus("Running..."),setTimeout((function(){setTimeout((function(){A.setStatus("")}),1),B()}),1)):B()))}if(A.dynCall_jji=function(){return(A.dynCall_jji=A.asm.$a).apply(null,arguments)},A.dynCall_iji=function(){return(A.dynCall_iji=A.asm.ab).apply(null,arguments)},A.dynCall_iiiji=function(){return(A.dynCall_iiiji=A.asm.bb).apply(null,arguments)},A.dynCall_jii=function(){return(A.dynCall_jii=A.asm.cb).apply(null,arguments)},A.dynCall_viij=function(){return(A.dynCall_viij=A.asm.db).apply(null,arguments)},A.dynCall_jiji=function(){return(A.dynCall_jiji=A.asm.eb).apply(null,arguments)},A.dynCall_ji=function(){return(A.dynCall_ji=A.asm.fb).apply(null,arguments)},A.dynCall_iiji=function(){return(A.dynCall_iiji=A.asm.gb).apply(null,arguments)},A.dynCall_iiiiij=function(){return(A.dynCall_iiiiij=A.asm.hb).apply(null,arguments)},A.dynCall_iiiiijj=function(){return(A.dynCall_iiiiijj=A.asm.ib).apply(null,arguments)},A.dynCall_iiiiiijj=function(){return(A.dynCall_iiiiiijj=A.asm.jb).apply(null,arguments)},A.dynCall_viijii=function(){return(A.dynCall_viijii=A.asm.kb).apply(null,arguments)},hA=function A(){HI||VI(),HI||(hA=A)},A.run=VI,A.preInit)for("function"==typeof A.preInit&&(A.preInit=[A.preInit]);A.preInit.length>0;)A.preInit.pop()();return VI(),A.ready});A.exports=i}).call(this,"/index.js",g(48),"/",g(49).Buffer)},function(A,I){var g,B,C=A.exports={};function Q(){throw new Error("setTimeout has not been defined")}function E(){throw new Error("clearTimeout has not been defined")}function i(A){if(g===setTimeout)return setTimeout(A,0);if((g===Q||!g)&&setTimeout)return g=setTimeout,setTimeout(A,0);try{return g(A,0)}catch(I){try{return g.call(null,A,0)}catch(I){return g.call(this,A,0)}}}!function(){try{g="function"==typeof setTimeout?setTimeout:Q}catch(A){g=Q}try{B="function"==typeof clearTimeout?clearTimeout:E}catch(A){B=E}}();var o,D=[],t=!1,h=-1;function w(){t&&o&&(t=!1,o.length?D=o.concat(D):h=-1,D.length&&s())}function s(){if(!t){var A=i(w);t=!0;for(var I=D.length;I;){for(o=D,D=[];++h<I;)o&&o[h].run();h=-1,I=D.length}o=null,t=!1,function(A){if(B===clearTimeout)return clearTimeout(A);if((B===E||!B)&&clearTimeout)return B=clearTimeout,clearTimeout(A);try{B(A)}catch(I){try{return B.call(null,A)}catch(I){return B.call(this,A)}}}(A)}}function a(A,I){this.fun=A,this.array=I}function e(){}C.nextTick=function(A){var I=new Array(arguments.length-1);if(arguments.length>1)for(var g=1;g<arguments.length;g++)I[g-1]=arguments[g];D.push(new a(A,I)),1!==D.length||t||i(s)},a.prototype.run=function(){this.fun.apply(null,this.array)},C.title="browser",C.browser=!0,C.env={},C.argv=[],C.version="",C.versions={},C.on=e,C.addListener=e,C.once=e,C.off=e,C.removeListener=e,C.removeAllListeners=e,C.emit=e,C.prependListener=e,C.prependOnceListener=e,C.listeners=function(A){return[]},C.binding=function(A){throw new Error("process.binding is not supported")},C.cwd=function(){return"/"},C.chdir=function(A){throw new Error("process.chdir is not supported")},C.umask=function(){return 0}},function(A,I,g){"use strict";(function(A){
3
3
  /*!
4
4
  * The buffer module from node.js, for the browser.
5
5
  *