UNPKG

@mescius/dspdfviewer

Version:
2 lines 1.54 MB
/*! For license information please see gcpdfviewer.worker.js.LICENSE.txt */ (()=>{var e={92:(e,t,r)=>{"use strict";var n=r(522);e.exports=n("document","documentElement")},264:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.validateAnnotationLayerField=t.validateField=void 0;var i=r(9180),a=r(2092),o=r(9349);function s(e,t,r,n,a,o){try{var s=t.fieldValue,u=s?s.toString().trim():"";if(!o){var c=t.gcProps||{},l=!!t.required;l||(l=!!n&&!!n.required)||(l=!!c.required);var f=c.type,h=c.minlength,d=c.maxlength,p=c.pattern,m=c.min,v=c.max,g=c.multiple;if(n&&(n.type&&(f=n.type),void 0!==n.minlength&&(h=n.minlength),void 0!==n.maxlength&&(d=n.maxlength),void 0!==n.min&&(m=n.min),void 0!==n.max&&(v=n.max),n.pattern&&(p=n.pattern),n.multiple&&(g=n.multiple)),l&&!s)return{valid:!1,invalidLabel:c.validationmessage||(r?r.t("dialogs.form-filler.validation.required-field-is-empty","Required field is empty"):"")};if("date"===f||"datetime"===f||"datetime-local"===f||"time"===f){var y=new i.DateTimeHelper(u,f);if(l&&y.isEmpty)return{valid:!1,invalidLabel:c.validationmessage||(r?r.t("dialogs.form-filler.validation.required-field-is-empty","Required field is empty"):"")};if(!y.isValid)return{valid:!1,invalidLabel:c.validationmessage||(r?r.t("dialogs.form-filler.validation.incorrect-input","Incorrect input"):"")}}else if("number"===f){var b=parseFloat(s?s.toString():"NaN");if(l&&!Number.isFinite(b))return{valid:!1,invalidLabel:c.validationmessage||(r?r.t("dialogs.form-filler.validation.required-number-is-incorrect","Required numeric value is invalid"):"")};if(null!=m&&b<m)return{valid:!1,invalidLabel:c.validationmessage||(r?r.t("dialogs.form-filler.validation.min-failed","The minimum value must be greater than or equal to {{min}}",{min:m}):"")};if(null!=v&&b>v)return{valid:!1,invalidLabel:c.validationmessage||(r?r.t("dialogs.form-filler.validation.max-failed","The maximum value must be less than or equal to {{max}}",{max:v}):"")}}else if("email"===f){var w=u.split(/[,\s]/gim);if((!w||w.length<1)&&(w=[u]),!g&&w.length>1)return{valid:!1,invalidLabel:c.validationmessage||(r?r.t("dialogs.form-filler.validation.multiple-emails-not-allowed","Multiple emails are not allowed"):"")};for(var k=0,S=w;k<S.length;k++){var x=S[k];x=(x||"").trim();try{var C=p?new RegExp(p,"gm"):/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gim;if(x&&!C.test(x))return{valid:!1,invalidLabel:c.validationmessage||(r?r.t("dialogs.form-filler.validation.email-failed","The email address is incorrect"):"")}}catch(e){console.error(e)}}}if(void 0!==h&&isFinite(h)&&s.length<h)return{valid:!1,invalidLabel:c.validationmessage||(r?r.t("dialogs.form-filler.validation.minlength-failed","The minimum length of the input value must be greater than or equal to {{minlength}}",{minlength:h}):"")};if(void 0!==d&&isFinite(d)&&s.length>d)return{valid:!1,invalidLabel:c.validationmessage||(r?r.t("dialogs.form-filler.validation.maxlength-failed","The maximum length of the input value must be less than or equal to {{maxlength}}",{maxlength:d}):"")};if(p&&"email"!==f)try{if(!(C=new RegExp(p,"gm")).test(s.toString()))return{valid:!1,invalidLabel:c.validationmessage||(r?r.t("dialogs.form-filler.validation.regex-pattern-failed","The value does not match the regular expression pattern: {{pattern}}",{pattern:p}):"")}}catch(e){console.error(e)}}var A=(null==n?void 0:n.validator)||a;if(A){var O=A(t.fieldValue,t,{caller:e});return"string"==typeof O?{valid:!1,invalidLabel:O}:null===O||!0===O?{valid:!0}:{valid:!1,invalidLabel:""}}}catch(e){return{valid:!1,invalidLabel:((null==e?void 0:e.message)||e||"Unknown exception").toString()}}return{valid:!0}}t.validateField=s,t.validateAnnotationLayerField=function(e,t,r,i,u,c,l){var f;try{if(!e||!t)return{valid:!1,invalidLabel:"No field data to validate."};i||"function"===i||(i=void 0);var h=(null===(f=null==r?void 0:r.pdfViewer)||void 0===f?void 0:f.in17n)||o.SharedRef.i18n;t=n({},t);var d=e.querySelector("input,textarea");d&&(t.fieldValue=d.value);var p=s(l||"annotation-layer",t,h,void 0,i,c);return p.valid?u||(0,a.hideTooltipPopup)(e):u||(0,a.showTooltipPopup)(e,p.invalidLabel||"Invalid input"),p}catch(e){return{valid:!1,invalidLabel:((null==e?void 0:e.message)||e||"Unknown exception").toString()}}}},289:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},394:(e,t,r)=>{"use strict";r.r(t),r.d(t,{WorkerMessageHandler:()=>fj});var n={_h:{"!PRODUCTION || TESTING":!1,"!PRODUCTION || GENERIC":!1,MOZCENTRAL:!1,TESTING:!1,GENERIC:!0,"GENERIC || CHROME":!0,PRODUCTION:!0,SKIP_BABEL:!0,BUNDLE_VERSION:"2.10.377",BUNDLE_BUILD:"2.10.377"},eval:function(e){return this._h[e]},test:function(e){return e=e.toString(),this._h[e]}};function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var a=!("object"!==("undefined"==typeof process?"undefined":i(process))||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);function o(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function l(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t,r){return t=m(t),function(e,t){if(t&&("object"==u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,r||[],m(e).constructor):t.apply(e,r))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}"undefined"!=typeof PDFJSDev&&PDFJSDev.test("SKIP_BABEL")||"undefined"!=typeof globalThis&&globalThis._pdfjsCompatibilityChecked||("undefined"!=typeof globalThis&&globalThis.Math===Math||(globalThis=r(611)),globalThis._pdfjsCompatibilityChecked=!0,!globalThis.btoa&&a&&(globalThis.btoa=function(e){return Buffer.from(e,"binary").toString("base64")}),!globalThis.atob&&a&&(globalThis.atob=function(e){return Buffer.from(e,"base64").toString("binary")}),!globalThis.DOMMatrix&&a&&(globalThis.DOMMatrix=r(3117)),Object.fromEntries||r(8748),"undefined"!=typeof PDFJSDev&&PDFJSDev.test("IMAGE_DECODERS")||globalThis.Promise.allSettled||(globalThis.Promise=r(575)),"undefined"!=typeof PDFJSDev&&PDFJSDev.test("IMAGE_DECODERS")||"undefined"!=typeof PDFJSDev&&PDFJSDev.test("CHROME")||!globalThis.ReadableStream&&a&&(globalThis.ReadableStream=r(3780).ReadableStream));var y=[1,0,0,1,0,0],b=[.001,0,0,.001,0,0],w={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},k=27,S=8192,x=65536,C={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},A={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},O={O:"PageOpen",C:"PageClose"},_={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"},T={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1STANDARD:"TYPE1STANDARD",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"},I=10,P=11,E=12,j=37,M=44,R=58,F=59,B=70,N=71,D="errorOperatorList",L=1;function U(){return L}function q(e){L>=5&&console.log("Info: ".concat(e))}function H(e){L>=1&&console.log("Warning: ".concat(e))}function z(e){throw new Error(e)}function G(e,t){e||z(t)}function W(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e)return null;try{if(r&&"string"==typeof e){if(r.addDefaultProtocol&&e.startsWith("www.")){var n=e.match(/\./g);n&&n.length>=2&&(e="http://".concat(e))}if(r.tryConvertEncoding)try{e=me(e)}catch(e){}}var i=t?new URL(e,t):new URL(e);if(function(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(i))return i}catch(e){}return null}function V(e,t,r){return("undefined"==typeof PDFJSDev||PDFJSDev.test("!PRODUCTION || TESTING"))&&G(t in e,'shadow: Property "'.concat(t&&t.toString(),'" not found in object.')),Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}var X=function(){function e(t,r){this.constructor===e&&z("Cannot initialize BaseException."),this.message=t,this.name=r}return e.prototype=new Error,e.constructor=e,e}(),K=function(e){function t(e,r){var n;return h(this,t),(n=d(this,t,[e,"PasswordException"])).code=r,n}return v(t,e),l(t)}(X),Y=function(e){function t(e,r){var n;return h(this,t),(n=d(this,t,[e,"UnknownErrorException"])).details=r,n}return v(t,e),l(t)}(X),J=function(e){function t(e){return h(this,t),d(this,t,[e,"InvalidPDFException"])}return v(t,e),l(t)}(X),Z=function(e){function t(e){return h(this,t),d(this,t,[e,"MissingPDFException"])}return v(t,e),l(t)}(X),Q=function(e){function t(e,r){var n;return h(this,t),(n=d(this,t,[e,"UnexpectedResponseException"])).status=r,n}return v(t,e),l(t)}(X),$=function(e){function t(e){return h(this,t),d(this,t,[e,"FormatError"])}return v(t,e),l(t)}(X),ee=function(e){function t(e){return h(this,t),d(this,t,[e,"AbortException"])}return v(t,e),l(t)}(X);function te(e){"object"===u(e)&&null!==e&&void 0!==e.length||z("Invalid argument for bytesToString");var t=e.length,r=8192;if(t<r)return String.fromCharCode.apply(null,e);for(var n=[],i=0;i<t;i+=r){var a=Math.min(i+r,t),o=e.subarray(i,a);n.push(String.fromCharCode.apply(null,o))}return n.join("")}function re(e){"string"!=typeof e&&z("Invalid argument for stringToBytes");for(var t=e.length,r=new Uint8Array(t),n=0;n<t;++n)r[n]=255&e.charCodeAt(n);return r}function ne(e){return void 0!==e.length?e.length:void 0!==e.byteLength?e.byteLength:void z("Invalid argument for arrayByteLength")}function ie(e){var t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];for(var r=0,n=0;n<t;n++)r+=ne(e[n]);for(var i=0,a=new Uint8Array(r),o=0;o<t;o++){var s=e[o];s instanceof Uint8Array||(s="string"==typeof s?re(s):new Uint8Array(s));var u=s.byteLength;a.set(s,i),i+=u}return a}function ae(e){return("undefined"==typeof PDFJSDev||PDFJSDev.test("!PRODUCTION || TESTING"))&&G("number"==typeof e&&Math.abs(e)<Math.pow(2,32),'string32: Unexpected input "'.concat(e,'".')),String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function oe(e){return Object.keys(e).length}var se={get value(){return V(this,"value",function(){try{return new Function(""),!0}catch(e){return!1}}())}},ue=o(Array(256).keys()).map(function(e){return e.toString(16).padStart(2,"0")}),ce=function(){function e(){h(this,e)}return l(e,null,[{key:"makeHexColor",value:function(e,t,r){return"#".concat(ue[e]).concat(ue[t]).concat(ue[r])}},{key:"scaleMinMax",value:function(e,t){var r;e[0]?(e[0]<0&&(r=t[0],t[0]=t[1],t[1]=r),t[0]*=e[0],t[1]*=e[0],e[3]<0&&(r=t[2],t[2]=t[3],t[3]=r),t[2]*=e[3],t[3]*=e[3]):(r=t[0],t[0]=t[2],t[2]=r,r=t[1],t[1]=t[3],t[3]=r,e[1]<0&&(r=t[2],t[2]=t[3],t[3]=r),t[2]*=e[1],t[3]*=e[1],e[2]<0&&(r=t[0],t[0]=t[1],t[1]=r),t[0]*=e[2],t[1]*=e[2]),t[0]+=e[4],t[1]+=e[4],t[2]+=e[5],t[3]+=e[5]}},{key:"transform",value:function(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}},{key:"applyTransform",value:function(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}},{key:"applyInverseTransform",value:function(e,t){var r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]}},{key:"getAxialAlignedBoundingBox",value:function(t,r){var n=e.applyTransform(t,r),i=e.applyTransform(t.slice(2,4),r),a=e.applyTransform([t[0],t[3]],r),o=e.applyTransform([t[2],t[1]],r);return[Math.min(n[0],i[0],a[0],o[0]),Math.min(n[1],i[1],a[1],o[1]),Math.max(n[0],i[0],a[0],o[0]),Math.max(n[1],i[1],a[1],o[1])]}},{key:"inverseTransform",value:function(e){var t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}},{key:"apply3dTransform",value:function(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]]}},{key:"singularValueDecompose2dScale",value:function(e){var t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],n=e[0]*t[1]+e[1]*t[3],i=e[2]*t[0]+e[3]*t[2],a=e[2]*t[1]+e[3]*t[3],o=(r+a)/2,s=Math.sqrt(Math.pow(r+a,2)-4*(r*a-i*n))/2,u=o+s||1,c=o-s||1;return[Math.sqrt(c),Math.sqrt(u)]}},{key:"normalizeRect",value:function(e){var t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}},{key:"intersect",value:function(e,t){var r=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),n=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(r>n)return null;var i=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),a=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return i>a?null:[r,i,n,a]}},{key:"bezierBoundingBox",value:function(e,t,r,n,i,a,s,u){for(var c,l,f,h,d,p,m,v,g=[],y=[[],[]],b=0;b<2;++b)if(0===b?(l=6*e-12*r+6*i,c=-3*e+9*r-9*i+3*s,f=3*r-3*e):(l=6*t-12*n+6*a,c=-3*t+9*n-9*a+3*u,f=3*n-3*t),Math.abs(c)<1e-12){if(Math.abs(l)<1e-12)continue;0<(h=-f/l)&&h<1&&g.push(h)}else m=l*l-4*f*c,v=Math.sqrt(m),m<0||(0<(d=(-l+v)/(2*c))&&d<1&&g.push(d),0<(p=(-l-v)/(2*c))&&p<1&&g.push(p));for(var w,k=g.length,S=k;k--;)w=1-(h=g[k]),y[0][k]=w*w*w*e+3*w*w*h*r+3*w*h*h*i+h*h*h*s,y[1][k]=w*w*w*t+3*w*w*h*n+3*w*h*h*a+h*h*h*u;return y[0][S]=e,y[1][S]=t,y[0][S+1]=s,y[1][S+1]=u,y[0].length=y[1].length=S+2,[Math.min.apply(Math,o(y[0])),Math.min.apply(Math,o(y[1])),Math.max.apply(Math,o(y[0])),Math.max.apply(Math,o(y[1]))]}}])}(),le=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function fe(e){var t;if(e[0]>="ï"&&("þ"===e[0]&&"ÿ"===e[1]?t="utf-16be":"ÿ"===e[0]&&"þ"===e[1]?t="utf-16le":"ï"===e[0]&&"»"===e[1]&&"¿"===e[2]&&(t="utf-8"),t))try{var r=new TextDecoder(t,{fatal:!0}),n=re(e);return r.decode(n)}catch(e){H('stringToPDFString: "'.concat(e,'".'))}for(var i=[],a=0,o=e.length;a<o;a++){var s=le[e.charCodeAt(a)];i.push(s?String.fromCharCode(s):e.charAt(a))}return i.join("")}function he(e){return e.replace(/([()\\\n\r])/g,function(e){return"\n"===e?"\\n":"\r"===e?"\\r":"\\".concat(e)})}function de(e){return/^[\x00-\x7F]*$/.test(e)}function pe(e){for(var t=["þÿ"],r=0,n=e.length;r<n;r++){var i=e.charCodeAt(r);t.push(String.fromCharCode(i>>8&255),String.fromCharCode(255&i))}return t.join("")}function me(e){return decodeURIComponent(escape(e))}function ve(e){return unescape(encodeURIComponent(e))}function ge(e){return"boolean"==typeof e}function ye(e){return"number"==typeof e}function be(e){return"string"==typeof e}function we(e){return"object"===u(e)&&null!==e&&void 0!==e.byteLength}function ke(e,t){if(e.length!==t.length)return!1;for(var r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}function Se(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")].join("")}function xe(){var e=Object.create(null),t=!1;return Object.defineProperty(e,"settled",{get:function(){return t}}),e.promise=new Promise(function(r,n){e.resolve=function(e){t=!0,r(e)},e.reject=function(e){t=!0,n(e)}}),e}function Ce(e){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ce(e)}function Ae(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Oe(n.key),n)}}function Oe(e){var t=function(e){if("object"!=Ce(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ce(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ce(t)?t:t+""}var _e=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.constructor===e&&z("Cannot initialize BaseStream.")},(t=[{key:"length",get:function(){z("Abstract getter `length` accessed")}},{key:"isEmpty",get:function(){z("Abstract getter `isEmpty` accessed")}},{key:"isDataLoaded",get:function(){return V(this,"isDataLoaded",!0)}},{key:"getByte",value:function(){z("Abstract method `getByte` called")}},{key:"getBytes",value:function(e){z("Abstract method `getBytes` called")}},{key:"peekByte",value:function(){var e=this.getByte();return-1!==e&&this.pos--,e}},{key:"peekBytes",value:function(e){var t=this.getBytes(e);return this.pos-=t.length,t}},{key:"getUint16",value:function(){var e=this.getByte(),t=this.getByte();return-1===e||-1===t?-1:(e<<8)+t}},{key:"getInt32",value:function(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()}},{key:"getByteRange",value:function(e,t){z("Abstract method `getByteRange` called")}},{key:"getString",value:function(e){return te(this.getBytes(e))}},{key:"skip",value:function(e){this.pos+=e||1}},{key:"reset",value:function(){z("Abstract method `reset` called")}},{key:"moveStart",value:function(){z("Abstract method `moveStart` called")}},{key:"makeSubStream",value:function(e,t){z("Abstract method `makeSubStream` called")}},{key:"getBaseStreams",value:function(){return null}}])&&Ae(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Te(e){return Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Te(e)}function Ie(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(e,t)||Ee(e,t)||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.")}()}function Pe(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Ee(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function Ee(e,t){if(e){if("string"==typeof e)return je(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?je(e,t):void 0}}function je(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Me(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function a(r,n,i,a){var u=n&&n.prototype instanceof s?n:s,c=Object.create(u.prototype);return Re(c,"_invoke",function(r,n,i){var a,s,u,c=0,l=i||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return a=t,s=0,u=e,h.n=r,o}};function d(r,n){for(s=r,u=n,t=0;!f&&c&&!i&&t<l.length;t++){var i,a=l[t],d=h.p,p=a[2];r>3?(i=p===n)&&(u=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=d&&((i=r<2&&d<a[1])?(s=0,h.v=n,h.n=a[1]):d<p&&(i=r<3||a[0]>n||n>p)&&(a[4]=r,a[5]=n,h.n=p,s=0))}if(i||r>1)return o;throw f=!0,n}return function(i,l,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,p),s=l,u=p;(t=s<2?e:u)||!f;){a||(s?s<3?(s>1&&(h.n=-1),d(s,u)):h.n=u:h.v=u);try{if(c=2,a){if(s||(i="next"),t=a[i]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=a.return)&&t.call(a),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);a=e}else if((t=(f=h.n<0)?u:r.call(n,h))!==o)break}catch(t){a=e,s=1,u=t}finally{c=1}}return{value:t,done:f}}}(r,i,a),!0),c}var o={};function s(){}function u(){}function c(){}t=Object.getPrototypeOf;var l=[][n]?t(t([][n]())):(Re(t={},n,function(){return this}),t),f=c.prototype=s.prototype=Object.create(l);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Re(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=c,Re(f,"constructor",c),Re(c,"constructor",u),u.displayName="GeneratorFunction",Re(c,i,"GeneratorFunction"),Re(f),Re(f,i,"Generator"),Re(f,n,function(){return this}),Re(f,"toString",function(){return"[object Generator]"}),(Me=function(){return{w:a,m:h}})()}function Re(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Re=function(e,t,r,n){if(t)i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var a=function(t,r){Re(e,t,function(e){return this._invoke(t,r,e)})};a("next",0),a("throw",1),a("return",2)}},Re(e,t,r,n)}function Fe(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function Be(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ne(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Le(n.key),n)}}function De(e,t,r){return t&&Ne(e.prototype,t),r&&Ne(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Le(e){var t=function(e){if("object"!=Te(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Te(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Te(t)?t:t+""}var Ue,qe,He,ze=Symbol("CIRCULAR_REF"),Ge=Symbol("EOF"),We=(Ue=Object.create(null),function(){function e(t){Be(this,e),this.name=t}return De(e,null,[{key:"get",value:function(t){return Ue[t]||(Ue[t]=new e(t))}},{key:"_clearCache",value:function(){Ue=Object.create(null)}}])}()),Ve=(qe=Object.create(null),function(){function e(t){Be(this,e),this.cmd=t}return De(e,null,[{key:"get",value:function(t){return qe[t]||(qe[t]=new e(t))}},{key:"_clearCache",value:function(){qe=Object.create(null)}}])}()),Xe=function(){return Xe},Ke=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Be(this,e),this._map=Object.create(null),this.xref=t,this.objId=null,this.suppressEncryption=!1,this.__nonSerializable__=Xe}return De(e,[{key:"assignXref",value:function(e){this.xref=e}},{key:"size",get:function(){return Object.keys(this._map).length}},{key:"get",value:function(e,t,r){var n=this._map[e];return void 0===n&&void 0!==t&&(("undefined"==typeof PDFJSDev||PDFJSDev.test("!PRODUCTION || TESTING"))&&t.length<e.length&&z("Dict.get: Expected keys to be ordered by length."),void 0===(n=this._map[t])&&void 0!==r&&(("undefined"==typeof PDFJSDev||PDFJSDev.test("!PRODUCTION || TESTING"))&&r.length<t.length&&z("Dict.get: Expected keys to be ordered by length."),n=this._map[r])),n instanceof Ye&&this.xref?this.xref.fetch(n,this.suppressEncryption):n}},{key:"getAsync",value:(t=Me().m(function e(t,r,n){var i;return Me().w(function(e){for(;;)switch(e.n){case 0:if(void 0===(i=this._map[t])&&void 0!==r&&(("undefined"==typeof PDFJSDev||PDFJSDev.test("!PRODUCTION || TESTING"))&&r.length<t.length&&z("Dict.getAsync: Expected keys to be ordered by length."),void 0===(i=this._map[r])&&void 0!==n&&(("undefined"==typeof PDFJSDev||PDFJSDev.test("!PRODUCTION || TESTING"))&&n.length<r.length&&z("Dict.getAsync: Expected keys to be ordered by length."),i=this._map[n])),!(i instanceof Ye&&this.xref)){e.n=1;break}return e.a(2,this.xref.fetchAsync(i,this.suppressEncryption));case 1:return e.a(2,i)}},e,this)}),r=function(){var e=this,r=arguments;return new Promise(function(n,i){var a=t.apply(e,r);function o(e){Fe(a,n,i,o,s,"next",e)}function s(e){Fe(a,n,i,o,s,"throw",e)}o(void 0)})},function(e,t,n){return r.apply(this,arguments)})},{key:"getArray",value:function(e,t,r){var n=this._map[e];if(void 0===n&&void 0!==t&&(("undefined"==typeof PDFJSDev||PDFJSDev.test("!PRODUCTION || TESTING"))&&t.length<e.length&&z("Dict.getArray: Expected keys to be ordered by length."),void 0===(n=this._map[t])&&void 0!==r&&(("undefined"==typeof PDFJSDev||PDFJSDev.test("!PRODUCTION || TESTING"))&&r.length<t.length&&z("Dict.getArray: Expected keys to be ordered by length."),n=this._map[r])),n instanceof Ye&&this.xref&&(n=this.xref.fetch(n,this.suppressEncryption)),Array.isArray(n))for(var i=0,a=(n=n.slice()).length;i<a;i++)n[i]instanceof Ye&&this.xref&&(n[i]=this.xref.fetch(n[i],this.suppressEncryption));return n}},{key:"getRaw",value:function(e){return this._map[e]}},{key:"getKeys",value:function(){return Object.keys(this._map)}},{key:"getRawValues",value:function(){return Object.values(this._map)}},{key:"set",value:function(e,t){"undefined"!=typeof PDFJSDev&&!PDFJSDev.test("!PRODUCTION || TESTING")||void 0!==t||z('Dict.set: The "value" cannot be undefined.'),this._map[e]=t}},{key:"has",value:function(e){return void 0!==this._map[e]}},{key:"forEach",value:function(e){for(var t in this._map)e(t,this.get(t))}}],[{key:"empty",get:function(){var t=new e(null);return t.set=function(e,t){z("Should not call `set` on the empty dictionary.")},V(this,"empty",t)}},{key:"merge",value:function(t){var r,n=t.xref,i=t.dictArray,a=t.mergeSubDicts,o=void 0!==a&&a,s=new e(n),u=new Map,c=Pe(i);try{for(c.s();!(r=c.n()).done;){var l=r.value;if(l instanceof e)for(var f=0,h=Object.entries(l._map);f<h.length;f++){var d=Ie(h[f],2),p=d[0],m=d[1],v=u.get(p);if(void 0===v)v=[],u.set(p,v);else if(!(o&&m instanceof e))continue;v.push(m)}}}catch(e){c.e(e)}finally{c.f()}var g,y=Pe(u);try{for(y.s();!(g=y.n()).done;){var b=Ie(g.value,2),w=b[0],k=b[1];if(1!==k.length&&k[0]instanceof e){var S,x=new e(n),C=Pe(k);try{for(C.s();!(S=C.n()).done;)for(var A=S.value,O=0,_=Object.entries(A._map);O<_.length;O++){var T=Ie(_[O],2),I=T[0],P=T[1];void 0===x._map[I]&&(x._map[I]=P)}}catch(e){C.e(e)}finally{C.f()}x.size>0&&(s._map[w]=x)}else s._map[w]=k[0]}}catch(e){y.e(e)}finally{y.f()}return u.clear(),s.size>0?s:e.empty}}]);var t,r}(),Ye=(He=Object.create(null),function(){function e(t,r){Be(this,e),this.num=t,this.gen=r}return De(e,[{key:"toString",value:function(){return 0===this.gen?"".concat(this.num,"R"):"".concat(this.num,"R").concat(this.gen)}}],[{key:"get",value:function(t,r){var n=0===r?"".concat(t,"R"):"".concat(t,"R").concat(r);return He[n]||(He[n]=new e(t,r))}},{key:"_clearCache",value:function(){He=Object.create(null)}}])}()),Je=function(){return De(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Be(this,e),"undefined"!=typeof PDFJSDev&&!PDFJSDev.test("!PRODUCTION || TESTING")||!t||t instanceof e||z('RefSet: Invalid "parent" value.'),this._set=new Set(t&&t._set)},[{key:"has",value:function(e){return this._set.has(e.toString())}},{key:"put",value:function(e){this._set.add(e.toString())}},{key:"remove",value:function(e){this._set.delete(e.toString())}},{key:"forEach",value:function(e){var t,r=Pe(this._set.values());try{for(r.s();!(t=r.n()).done;)e(t.value)}catch(e){r.e(e)}finally{r.f()}}},{key:Symbol.iterator,value:function(){return this._set.values()}},{key:"clear",value:function(){this._set.clear()}}])}(),Ze=function(){return De(function e(){Be(this,e),this._map=new Map},[{key:"size",get:function(){return this._map.size}},{key:"get",value:function(e){return this._map.get(e.toString())}},{key:"has",value:function(e){return this._map.has(e.toString())}},{key:"put",value:function(e,t){this._map.set(e.toString(),t)}},{key:"putAlias",value:function(e,t){this._map.set(e.toString(),this.get(t))}},{key:"forEach",value:function(e){var t,r=Pe(this._map.values());try{for(r.s();!(t=r.n()).done;)e(t.value)}catch(e){r.e(e)}finally{r.f()}}},{key:Symbol.iterator,value:function(){return this._map.values()}},{key:"clear",value:function(){this._map.clear()}}])}();function Qe(e,t){return e instanceof We&&(void 0===t||e.name===t)}function $e(e,t){return e instanceof Ve&&(void 0===t||e.cmd===t)}function et(e,t){return e instanceof Ke&&(void 0===t||Qe(e.get("Type"),t))}function tt(e){return e instanceof Ye}function rt(e,t){return("undefined"==typeof PDFJSDev||PDFJSDev.test("!PRODUCTION || TESTING"))&&G(e instanceof Ye&&t instanceof Ye,"isRefsEqual: Both parameters should be `Ref`s."),e.num===t.num&&e.gen===t.gen}function nt(e){return e instanceof _e}function it(){Ve._clearCache(),We._clearCache(),Ye._clearCache()}function at(e){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},at(e)}function ot(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return st(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?st(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function st(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ut(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,lt(n.key),n)}}function ct(e,t,r){return t&&ut(e.prototype,t),r&&ut(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function lt(e){var t=function(e){if("object"!=at(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=at(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==at(t)?t:t+""}function ft(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ht(e,t,r){return t=pt(t),function(e,t){if(t&&("object"==at(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,dt()?Reflect.construct(t,r||[],pt(e).constructor):t.apply(e,r))}function dt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(dt=function(){return!!e})()}function pt(e){return pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pt(e)}function mt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vt(e,t)}function vt(e,t){return vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vt(e,t)}function gt(e){var t;return function(){return e&&(t=Object.create(null),e(t),e=null),t}}function yt(e){var t;return function(){if(e){var r=e();e=null,t=Object.create(null);for(var n=0,i=r.length;n<i;n+=2)t[r[n]]=r[n+1];r=null}return t}}var bt=function(e){function t(e,r){var n;return ft(this,t),(n=ht(this,t,["Missing data [".concat(e,", ").concat(r,")"),"MissingDataException"])).begin=e,n.end=r,n}return mt(t,e),ct(t)}(X),wt=function(e){function t(e){return ft(this,t),ht(this,t,[e,"ParserEOFException"])}return mt(t,e),ct(t)}(X),kt=function(e){function t(e){return ft(this,t),ht(this,t,[e,"XRefEntryException"])}return mt(t,e),ct(t)}(X),St=function(e){function t(e){return ft(this,t),ht(this,t,[e,"XRefParseException"])}return mt(t,e),ct(t)}(X),xt=function(){return ct(function e(t){ft(this,e),this._handler=t,this._streamTypes=new Set,this._fontTypes=new Set},[{key:"_send",value:function(){var e,t=Object.create(null),r=Object.create(null),n=ot(this._streamTypes);try{for(n.s();!(e=n.n()).done;)t[e.value]=!0}catch(e){n.e(e)}finally{n.f()}var i,a=ot(this._fontTypes);try{for(a.s();!(i=a.n()).done;)r[i.value]=!0}catch(e){a.e(e)}finally{a.f()}this._handler.send("DocStats",{streamTypes:t,fontTypes:r})}},{key:"addStreamType",value:function(e){("undefined"==typeof PDFJSDev||PDFJSDev.test("!PRODUCTION || TESTING"))&&G(_[e]===e,'addStreamType: Invalid "type" value.'),this._streamTypes.has(e)||(this._streamTypes.add(e),this._send())}},{key:"addFontType",value:function(e){("undefined"==typeof PDFJSDev||PDFJSDev.test("!PRODUCTION || TESTING"))&&G(T[e]===e,'addFontType: Invalid "type" value.'),this._fontTypes.has(e)||(this._fontTypes.add(e),this._send())}}])}();function Ct(e){for(var t,r=e.dict,n=e.key,i=e.getArray,a=void 0!==i&&i,o=e.stopWhenFound,s=void 0===o||o,u=new Je;r instanceof Ke&&(!r.objId||!u.has(r.objId));){r.objId&&u.put(r.objId);var c=a?r.getArray(n):r.get(n);if(void 0!==c){if(s)return c;t||(t=[]),t.push(c)}r=r.get("Parent")}return t}var At=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"];function Ot(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];G(Number.isInteger(e)&&e>0,"The number should be a positive integer.");for(var r,n=[];e>=1e3;)e-=1e3,n.push("M");r=e/100|0,e%=100,n.push(At[r]),r=e/10|0,e%=10,n.push(At[10+r]),n.push(At[20+e]);var i=n.join("");return t?i.toLowerCase():i}function _t(e){return e<=0?0:Math.ceil(Math.log2(e))}function Tt(e,t){return e[t]<<24>>24}function It(e,t){return e[t]<<8|e[t+1]}function Pt(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function Et(e){return 32===e||9===e||13===e||10===e}function jt(e){var t=/(.+)\[(\d+)\]$/;return e.split(".").map(function(e){var r=e.match(t);return r?{name:r[1],pos:parseInt(r[2],10)}:{name:e,pos:0}})}function Mt(e){for(var t=[],r=0,n=0,i=e.length;n<i;n++){var a=e.charCodeAt(n);(a<33||a>126||35===a||40===a||41===a||60===a||62===a||91===a||93===a||123===a||125===a||47===a||37===a)&&(r<n&&t.push(e.substring(r,n)),t.push("#".concat(a.toString(16))),r=n+1)}return 0===t.length?e:(r<e.length&&t.push(e.substring(r,e.length)),t.join(""))}function Rt(e,t,r,n){if(e){var i=null;if(tt(e)){if(n.has(e))return;i=e,n.put(i),e=t.fetch(e)}if(Array.isArray(e)){var a,o=ot(e);try{for(o.s();!(a=o.n()).done;)Rt(a.value,t,r,n)}catch(e){o.e(e)}finally{o.f()}}else if(e instanceof Ke){if(Qe(e.get("S"),"JavaScript")&&e.has("JS")){var s,u=e.get("JS");(s=fe(s=nt(u)?u.getString():u))&&r.push(s)}Rt(e.getRaw("Next"),t,r,n)}i&&n.remove(i)}}function Ft(e,t,r){var n=Object.create(null),i=Ct({dict:t,key:"AA",stopWhenFound:!1});if(i)for(var a=i.length-1;a>=0;a--){var o=i[a];if(o instanceof Ke){var s,u=ot(o.getKeys());try{for(u.s();!(s=u.n()).done;){var c=s.value,l=r[c];if(l){var f=o.getRaw(c),h=new Je,d=[];Rt(f,e,d,h),d.length>0&&(n[l]=d)}}}catch(e){u.e(e)}finally{u.f()}}}if(t.has("A")){var p=[];Rt(t.get("A"),e,p,new Je),p.length>0&&(n.Action=p)}return oe(n)>0?n:null}var Bt={60:"&lt;",62:"&gt;",38:"&amp;",34:"&quot;",39:"&apos;"};function Nt(e){for(var t=[],r=0,n=0,i=e.length;n<i;n++){var a=e.codePointAt(n);if(32<=a&&a<=126){var o=Bt[a];o&&(r<n&&t.push(e.substring(r,n)),t.push(o),r=n+1)}else r<n&&t.push(e.substring(r,n)),t.push("&#x".concat(a.toString(16).toUpperCase(),";")),a>55295&&(a<57344||a>65533)&&n++,r=n+1}return 0===t.length?e:(r<e.length&&t.push(e.substring(r,e.length)),t.join(""))}function Dt(e){var t=new Set(["100","200","300","400","500","600","700","800","900","1000","normal","bold","bolder","lighter"]),r=e.fontFamily,n=e.fontWeight,i=e.italicAngle;if(/^".*"$/.test(r)){if(/[^\\]"/.test(r.slice(1,r.length-1)))return H('XFA - FontFamily contains some unescaped ": '.concat(r,".")),!1}else if(/^'.*'$/.test(r)){if(/[^\\]'/.test(r.slice(1,r.length-1)))return H("XFA - FontFamily contains some unescaped ': ".concat(r,".")),!1}else{var a,o=ot(r.split(/[ \t]+/));try{for(o.s();!(a=o.n()).done;){var s=a.value;if(/^(\d|(-(\d|-)))/.test(s)||!/^[\w-\\]+$/.test(s))return H("XFA - FontFamily contains some invalid <custom-ident>: ".concat(r,".")),!1}}catch(e){o.e(e)}finally{o.f()}}var u=n?n.toString():"";e.fontWeight=t.has(u)?u:"400";var c=parseFloat(i);return e.italicAngle=isNaN(c)||c<-90||c>90?"14":i.toString(),!0}function Lt(e){var t=new RegExp("^\\s*("+["app.launchURL","window.open","xfa.host.gotoURL"].join("|").split(".").join("\\.")+")\\((?:'|\")([^'\"]*)(?:'|\")(?:,\\s*(\\w+)\\)|\\))","i").exec(e);if(t&&t[2]){var r=t[2],n=!1;return"true"===t[3]&&"app.launchURL"===t[1]&&(n=!0),{url:r,newWindow:n}}return null}function Ut(e){return Ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ut(e)}function qt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ht(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Gt(n.key),n)}}function zt(e,t,r){return t&&Ht(e.prototype,t),r&&Ht(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Gt(e){var t=function(e){if("object"!=Ut(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ut(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ut(t)?t:t+""}function Wt(e,t,r){return t=Xt(t),function(e,t){if(t&&("object"==Ut(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Vt()?Reflect.construct(t,r||[],Xt(e).constructor):t.apply(e,r))}function Vt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Vt=function(){return!!e})()}function Xt(e){return Xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xt(e)}function Kt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yt(e,t)}function Yt(e,t){return Yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yt(e,t)}var Jt=function(e){function t(e,r,n,i){var a;return qt(this,t),(a=Wt(this,t)).bytes=e instanceof Uint8Array?e:new Uint8Array(e),a.start=r||0,a.pos=a.start,a.end=r+n||a.bytes.length,a.dict=i,a}return Kt(t,e),zt(t,[{key:"length",get:function(){return this.end-this.start}},{key:"isEmpty",get:function(){return 0===this.length}},{key:"getByte",value:function(){return this.pos>=this.end?-1:this.bytes[this.pos++]}},{key:"getBytes",value:function(e){var t=this.bytes,r=this.pos,n=this.end;if(!e)return t.subarray(r,n);var i=r+e;return i>n&&(i=n),this.pos=i,t.subarray(r,i)}},{key:"getByteRange",value:function(e,t){return e<0&&(e=0),t>this.end&&(t=this.end),this.bytes.subarray(e,t)}},{key:"reset",value:function(){this.pos=this.start}},{key:"moveStart",value:function(){this.start=this.pos}},{key:"makeSubStream",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return new t(this.bytes.buffer,e,r,n)}}])}(_e),Zt=function(e){function t(e){return qt(this,t),Wt(this,t,[re(e)])}return Kt(t,e),zt(t)}(Jt),Qt=function(e){function t(){return qt(this,t),Wt(this,t,[new Uint8Array(0)])}return Kt(t,e),zt(t)}(Jt);function $t(e){return $t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$t(e)}function er(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return tr(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function tr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function rr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ar(n.key),n)}}function ir(e,t,r){return t&&nr(e.prototype,t),r&&nr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ar(e){var t=function(e){if("object"!=$t(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=$t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$t(t)?t:t+""}function or(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(or=function(){return!!e})()}function sr(e){return sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sr(e)}function ur(e,t){return ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ur(e,t)}var cr=function(e){function t(e,r,n){var i,a,o,s;return rr(this,t),(a=this,o=t,s=[new Uint8Array(e),0,e,null],o=sr(o),i=function(e,t){if(t&&("object"==$t(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(a,or()?Reflect.construct(o,s||[],sr(a).constructor):o.apply(a,s))).chunkSize=r,i._loadedChunks=new Set,i.numChunks=Math.ceil(e/r),i.manager=n,i.progressiveDataLength=0,i.lastSuccessfulEnsureByteChunk=-1,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ur(e,t)}(t,e),ir(t,[{key:"getMissingChunks",value:function(){for(var e=[],t=0,r=this.numChunks;t<r;++t)this._loadedChunks.has(t)||e.push(t);return e}},{key:"numChunksLoaded",get:function(){return this._loadedChunks.size}},{key:"isDataLoaded",get:function(){return this.numChunksLoaded===this.numChunks}},{key:"onReceiveData",value:function(e,t){var r=this.chunkSize;if(e%r!==0)throw new Error("Bad begin offset: ".concat(e));var n=e+t.byteLength;if(n%r!==0&&n!==this.bytes.length)throw new Error("Bad end offset: ".concat(n));this.bytes.set(new Uint8Array(t),e);for(var i=Math.floor(e/r),a=Math.floor((n-1)/r)+1,o=i;o<a;++o)this._loadedChunks.add(o)}},{key:"onReceiveProgressiveData",value:function(e){var t=this.progressiveDataLength,r=Math.floor(t/this.chunkSize);this.bytes.set(new Uint8Array(e),t),t+=e.byteLength,this.progressiveDataLength=t;for(var n=t>=this.end?this.numChunks:Math.floor(t/this.chunkSize),i=r;i<n;++i)this._loadedChunks.add(i)}},{key:"ensureByte",value:function(e){if(!(e<this.progressiveDataLength)){var t=Math.floor(e/this.chunkSize);if(!(t>this.numChunks)&&t!==this.lastSuccessfulEnsureByteChunk){if(!this._loadedChunks.has(t))throw new bt(e,e+1);this.lastSuccessfulEnsureByteChunk=t}}}},{key:"ensureRange",value:function(e,t){if(!(e>=t||t<=this.progressiveDataLength)){var r=Math.floor(e/this.chunkSize);if(!(r>this.numChunks))for(var n=Math.min(Math.floor((t-1)/this.chunkSize)+1,this.numChunks),i=r;i<n;++i)if(!this._loadedChunks.has(i))throw new bt(e,t)}}},{key:"nextEmptyChunk",value:function(e){for(var t=this.numChunks,r=0;r<t;++r){var n=(e+r)%t;if(!this._loadedChunks.has(n))return n}return null}},{key:"hasChunk",value:function(e){return this._loadedChunks.has(e)}},{key:"getByte",value:function(){var e=this.pos;return e>=this.end?-1:(e>=this.progressiveDataLength&&this.ensureByte(e),this.bytes[this.pos++])}},{key:"getBytes",value:function(e){var t=this.bytes,r=this.pos,n=this.end;if(!e)return n>this.progressiveDataLength&&this.ensureRange(r,n),t.subarray(r,n);var i=r+e;return i>n&&(i=n),i>this.progressiveDataLength&&this.ensureRange(r,i),this.pos=i,t.subarray(r,i)}},{key:"getByteRange",value:function(e,t){return e<0&&(e=0),t>this.end&&(t=this.end),t>this.progressiveDataLength&&this.ensureRange(e,t),this.bytes.subarray(e,t)}},{key:"makeSubStream",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;function n(){}t?e+t>this.progressiveDataLength&&this.ensureRange(e,e+t):e>=this.progressiveDataLength&&this.ensureByte(e),n.prototype=Object.create(this),n.prototype.getMissingChunks=function(){for(var e=this.chunkSize,t=Math.floor(this.start/e),r=Math.floor((this.end-1)/e)+1,n=[],i=t;i<r;++i)this._loadedChunks.has(i)||n.push(i);return n},Object.defineProperty(n.prototype,"isDataLoaded",{get:function(){return this.numChunksLoaded===this.numChunks||0===this.getMissingChunks().length},configurable:!0});var i=new n;return i.pos=i.start=e,i.end=e+t||this.en