@elizaos/plugin-pdf 2.0.0-alpha.12 → 2.0.0-alpha.14
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/browser/index.browser.js +63 -5
- package/dist/browser/index.browser.js.map +6 -4
- package/dist/browser/index.d.ts +2 -0
- package/dist/build.d.ts.map +1 -1
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.node.cjs +38373 -48
- package/dist/cjs/index.node.js.map +6 -4
- package/dist/node/index.d.ts +2 -0
- package/dist/node/index.node.js +38379 -15
- package/dist/node/index.node.js.map +6 -4
- package/dist/services/pdf.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +8 -7
|
@@ -1,6 +1,64 @@
|
|
|
1
|
-
|
|
2
|
-
`);return this.cleanUpContent(r)}catch(t){throw x.error(`PdfService: Failed to convert PDF to text - error: ${t}, bufferSize: ${e.length}`),t}}async convertPdfToTextWithOptions(e,t={}){try{let a=new Uint8Array(e),i=await m({data:a}).promise,n=i.numPages,r=Math.max(1,t.startPage||1),s=Math.min(n,t.endPage||n),g=[];for(let o=r;o<=s;o++){let l=(await(await i.getPage(o)).getTextContent()).items.filter(P).map((p)=>p.str).join(t.preserveWhitespace?"":" ");g.push(l)}let c=g.join(`
|
|
3
|
-
`);if(t.cleanContent!==!1)c=this.cleanUpContent(c);return{success:!0,text:c,pageCount:n}}catch(a){return{success:!1,error:a instanceof Error?a.message:String(a)}}}async getDocumentInfo(e){let t=new Uint8Array(e),a=await m({data:t}).promise,i=a.numPages,r=(await a.getMetadata()).info,s={title:r.Title,author:r.Author,subject:r.Subject,keywords:r.Keywords,creator:r.Creator,producer:r.Producer,creationDate:r.CreationDate?new Date(r.CreationDate):void 0,modificationDate:r.ModDate?new Date(r.ModDate):void 0},g=[],c=[];for(let o=1;o<=i;o++){let d=await a.getPage(o),u=d.getViewport({scale:1}),p=(await d.getTextContent()).items.filter(P).map((C)=>C.str).join(" ");g.push({pageNumber:o,width:u.width,height:u.height,text:this.cleanUpContent(p)}),c.push(p)}return{pageCount:i,metadata:s,text:this.cleanUpContent(c.join(`
|
|
4
|
-
`)),pages:g}}cleanUpContent(e){try{return e.split("").filter((i)=>{let n=i.charCodeAt(0);return!(n===0||n>=1&&n<=8||n>=11&&n<=12||n>=14&&n<=31||n===127)}).join("").replace(/[^\S\r\n]+/g," ").replace(/[ \t]+(\r?\n)/g,"$1").trim()}catch(t){return x.error(`PdfService: Failed to clean up content - error: ${t}, contentLength: ${e.length}`),e}}}var T={name:"pdf",description:"Plugin for PDF reading and text extraction",services:[f],actions:[]},v=T;export{T as pdfPlugin,v as default,f as PdfService};
|
|
1
|
+
var eK=Object.defineProperty;var PB=(P)=>P;function ZB(P,Z){this[P]=PB.bind(null,Z)}var qB=(P,Z)=>{for(var q in Z)eK(P,q,{get:Z[q],enumerable:!0,configurable:!0,set:ZB.bind(Z,q)})};var XB=(P,Z)=>()=>(P&&(Z=P(P=0)),Z);var rK={};qB(rK,{version:()=>MK,updateUrlHash:()=>fX,stopEvent:()=>_8,shadow:()=>D1,setLayerDimensions:()=>i4,renderRichText:()=>WX,normalizeUnicode:()=>VU,noContextMenu:()=>A0,isValidExplicitDest:()=>pU,isPdfFile:()=>FP,isDataScheme:()=>Y2,getXfaPageViewport:()=>AU,getUuid:()=>GX,getRGB:()=>T6,getPdfFilenameFromUrl:()=>MU,getFilenameFromUrl:()=>HU,getDocument:()=>IK,findContrastColor:()=>kU,fetchData:()=>O6,createValidAbsoluteUrl:()=>RX,build:()=>AK,applyOpacity:()=>bU,XfaLayer:()=>vP,VerbosityLevel:()=>R2,Util:()=>j1,TouchManager:()=>W2,TextLayer:()=>s8,SupportedImageMimeTypes:()=>o3,SignatureExtractor:()=>u4,ResponseException:()=>C6,RenderingCancelledException:()=>Q2,PixelsPerInch:()=>n4,PermissionFlag:()=>UU,PasswordResponses:()=>BU,PDFWorker:()=>v8,PDFDateString:()=>l7,PDFDataRangeTransport:()=>OP,OutputScale:()=>u0,OPS:()=>k6,MathClamp:()=>l8,InvalidPDFException:()=>h7,ImageKind:()=>x7,GlobalWorkerOptions:()=>F5,FeatureTest:()=>k8,DrawLayer:()=>N8,DOMSVGFactory:()=>N6,ColorPicker:()=>B0,CSSConstants:()=>YX,AnnotationType:()=>V8,AnnotationMode:()=>j4,AnnotationLayer:()=>wP,AnnotationEditorUIManager:()=>T4,AnnotationEditorType:()=>m1,AnnotationEditorParamsType:()=>h1,AnnotationEditorLayer:()=>a0,AbortException:()=>f4});function v1(P){I3>=b9&&console.info(`Info: ${P}`)}function v(P){I3>=aR&&console.warn(`Warning: ${P}`)}function O1(P){throw Error(P)}function t1(P,Z){P||O1(Z)}function j3(P,Z=null,q=null){if(!P)return null;if(q&&typeof P=="string"){if(q.addDefaultProtocol&&P.startsWith("www."))P.match(/\./g)?.length>=2&&(P=`http://${P}`);if(q.tryConvertEncoding)try{P=k7(P)}catch{}}let X=Z?URL.parse(P,Z):URL.parse(P);return function(z){switch(z?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(X)?X:null}function q1(P,Z,q,X=!1){return Object.defineProperty(P,Z,{value:q,enumerable:!X,configurable:!0,writable:!1}),q}function W0(P){typeof P=="object"&&P?.length!==void 0||O1("Invalid argument for bytesToString");let Z=P.length,q=8192;if(Z<q)return String.fromCharCode.apply(null,P);let X=[];for(let z=0;z<Z;z+=q){let R=Math.min(z+q,Z),f=P.subarray(z,R);X.push(String.fromCharCode.apply(null,f))}return X.join("")}function w8(P){typeof P!="string"&&O1("Invalid argument for stringToBytes");let Z=P.length,q=new Uint8Array(Z);for(let X=0;X<Z;++X)q[X]=255&P.charCodeAt(X);return q}function D8(P){return String.fromCharCode(P>>24&255,P>>16&255,P>>8&255,255&P)}function Zq(P){return Object.keys(P).length}class P0{static get isLittleEndian(){return q1(this,"isLittleEndian",function(){let P=new Uint8Array(4);return P[0]=1,new Uint32Array(P.buffer,0,1)[0]===1}())}static get isEvalSupported(){return q1(this,"isEvalSupported",function(){try{return Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return q1(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get isImageDecoderSupported(){return q1(this,"isImageDecoderSupported",typeof ImageDecoder<"u")}static get platform(){let{platform:P,userAgent:Z}=navigator;return q1(this,"platform",{isAndroid:Z.includes("Android"),isLinux:P.includes("Linux"),isMac:P.includes("Mac"),isWindows:P.includes("Win"),isFirefox:Z.includes("Firefox")})}static get isCSSRoundSupported(){return q1(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}}function E1(P,Z=!1){if(P[0]>="ï"){let X;if(P[0]==="þ"&&P[1]==="ÿ"?(X="utf-16be",P.length%2==1&&(P=P.slice(0,-1))):P[0]==="ÿ"&&P[1]==="þ"?(X="utf-16le",P.length%2==1&&(P=P.slice(0,-1))):P[0]==="ï"&&P[1]==="»"&&P[2]==="¿"&&(X="utf-8"),X)try{let z=new TextDecoder(X,{fatal:!0}),R=w8(P),f=z.decode(R);return Z||!f.includes("\x1B")?f:f.replaceAll(/\x1b[^\x1b]*(?:\x1b|$)/g,"")}catch(z){v(`stringToPDFString: "${z}".`)}}let q=[];for(let X=0,z=P.length;X<z;X++){let R=P.charCodeAt(X);if(!Z&&R===27){for(;++X<z&&P.charCodeAt(X)!==27;);continue}let f=tB[R];q.push(f?String.fromCharCode(f):P.charAt(X))}return q.join("")}function k7(P){return decodeURIComponent(escape(P))}function E9(P){return unescape(encodeURIComponent(P))}function C7(P,Z){if(P.length!==Z.length)return!1;for(let q=0,X=P.length;q<X;q++)if(P[q]!==Z[q])return!1;return!0}function m5(P=new Date){return P instanceof Date||(P=new Date(P)),[P.getUTCFullYear().toString(),(P.getUTCMonth()+1).toString().padStart(2,"0"),P.getUTCDate().toString().padStart(2,"0"),P.getUTCHours().toString().padStart(2,"0"),P.getUTCMinutes().toString().padStart(2,"0"),P.getUTCSeconds().toString().padStart(2,"0")].join("")}function E8(P,Z,q){return Math.min(Math.max(P,Z),q)}function eX(P){return Uint8Array.prototype.toHex?P.toHex():Array.from(P,(Z)=>Y6[Z]).join("")}class t{constructor(P){this.name=P}static get(P){return jf[P]||=new t(P)}}class H8{constructor(P){this.cmd=P}static get(P){return If[P]||=new H8(P)}}class f1{constructor(P,Z){this.num=P,this.gen=Z}toString(){return this.gen===0?`${this.num}R`:`${this.num}R${this.gen}`}static fromString(P){let Z=d2[P];if(Z)return Z;let q=/^(\d+)R(\d*)$/.exec(P);return q&&q[1]!=="0"?d2[P]=new f1(parseInt(q[1]),q[2]?parseInt(q[2]):0):null}static get(P,Z){let q=Z===0?`${P}R`:`${P}R${Z}`;return d2[q]||=new f1(P,Z)}}function G8(P,Z){return P instanceof t&&(Z===void 0||P.name===Z)}function b8(P,Z){return P instanceof H8&&(Z===void 0||P.cmd===Z)}function xf(P,Z){return P instanceof S&&(Z===void 0||G8(P.get("Type"),Z))}function V3(P,Z){return P.num===Z.num&&P.gen===Z.gen}class T1{get length(){O1("Abstract getter `length` accessed")}get isEmpty(){O1("Abstract getter `isEmpty` accessed")}get isDataLoaded(){return q1(this,"isDataLoaded",!0)}getByte(){O1("Abstract method `getByte` called")}getBytes(P){O1("Abstract method `getBytes` called")}async getImageData(P,Z){return this.getBytes(P,Z)}async asyncGetBytes(){O1("Abstract method `asyncGetBytes` called")}get isAsync(){return!1}get isAsyncDecoder(){return!1}get canAsyncDecodeImageFromBuffer(){return!1}async getTransferableImage(){return null}peekByte(){let P=this.getByte();return P!==-1&&this.pos--,P}peekBytes(P){let Z=this.getBytes(P);return this.pos-=Z.length,Z}getUint16(){let P=this.getByte(),Z=this.getByte();return P===-1||Z===-1?-1:(P<<8)+Z}getInt32(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()}getByteRange(P,Z){O1("Abstract method `getByteRange` called")}getString(P){return W0(this.getBytes(P))}skip(P){this.pos+=P||1}reset(){O1("Abstract method `reset` called")}moveStart(){O1("Abstract method `moveStart` called")}makeSubStream(P,Z,q=null){O1("Abstract method `makeSubStream` called")}getBaseStreams(){return null}}function R8(P){let Z;return function(){return P&&(Z=Object.create(null),P(Z),P=null),Z}}function Mf(P){let Z=P.length;if(Z===0)return new Uint8Array(0);if(Z===1)return new Uint8Array(P[0]);let q=0;for(let R=0;R<Z;R++)q+=P[R].byteLength;let X=new Uint8Array(q),z=0;for(let R=0;R<Z;R++){let f=new Uint8Array(P[R]);X.set(f,z),z+=f.byteLength}return X}async function Pz(P){let Z=await fetch(P);if(!Z.ok)throw Error(`Failed to fetch file "${P}" with "${Z.statusText}".`);return new Uint8Array(await Z.arrayBuffer())}function N0({dict:P,key:Z,getArray:q=!1,stopWhenFound:X=!0}){let z,R=new J8;for(;P instanceof S&&(!P.objId||!R.has(P.objId));){P.objId&&R.put(P.objId);let f=q?P.getArray(Z):P.get(Z);if(f!==void 0){if(X)return f;(z||=[]).push(f)}P=P.get("Parent")}return z}function PI(P,Z=!1){t1(Number.isInteger(P)&&P>0,"The number should be a positive integer.");let q="M".repeat(P/1000|0)+cP[P%1000/100|0]+cP[10+(P%100/10|0)]+cP[20+P%10];return Z?q.toLowerCase():q}function sP(P){return P>0?Math.ceil(Math.log2(P)):0}function h0(P,Z){return P[Z]<<24>>24}function I4(P,Z){return(P[Z]<<24|P[Z+1]<<16)>>16}function S1(P,Z){return P[Z]<<8|P[Z+1]}function n1(P,Z){return(P[Z]<<24|P[Z+1]<<16|P[Z+2]<<8|P[Z+3])>>>0}function M0(P){return P===32||P===9||P===13||P===10}function e8(P,Z){return Array.isArray(P)?(Z===null||P.length===Z)&&P.every((q)=>typeof q=="number"):ArrayBuffer.isView(P)&&!(P instanceof BigInt64Array||P instanceof BigUint64Array)&&(Z===null||P.length===Z)}function g4(P,Z){return e8(P,6)?P:Z}function c9(P,Z){return e8(P,4)?P:Z}function k4(P,Z){return e8(P,4)?s1.normalizeRect(P):Z}function Af(P){let Z=/(.+)\[(\d+)\]$/;return P.split(".").map((q)=>{let X=q.match(Z);return X?{name:X[1],pos:parseInt(X[2],10)}:{name:q,pos:0}})}function qq(P){let Z=[],q=0;for(let X=0,z=P.length;X<z;X++){let R=P.charCodeAt(X);(R<33||R>126||R===35||R===40||R===41||R===60||R===62||R===91||R===93||R===123||R===125||R===47||R===37)&&(q<X&&Z.push(P.substring(q,X)),Z.push(`#${R.toString(16)}`),q=X+1)}return Z.length===0?P:(q<P.length&&Z.push(P.substring(q,P.length)),Z.join(""))}function j6(P){return P.replaceAll(/([()\\\n\r])/g,(Z)=>Z===`
|
|
2
|
+
`?"\\n":Z==="\r"?"\\r":`\\${Z}`)}function H3(P,Z,q,X){if(!P)return;let z=null;if(P instanceof f1){if(X.has(P))return;z=P,X.put(z),P=Z.fetch(P)}if(Array.isArray(P))for(let R of P)H3(R,Z,q,X);else if(P instanceof S){if(G8(P.get("S"),"JavaScript")){let R=P.get("JS"),f;R instanceof T1?f=R.getString():typeof R=="string"&&(f=R),f&&=E1(f,!0).replaceAll("\x00",""),f&&q.push(f.trim())}H3(P.getRaw("Next"),Z,q,X)}z&&X.remove(z)}function qP(P,Z,q){let X=Object.create(null),z=N0({dict:Z,key:"AA",stopWhenFound:!1});if(z)for(let R=z.length-1;R>=0;R--){let f=z[R];if(f instanceof S)for(let G of f.getKeys()){let Q=q[G];if(!Q)continue;let Y=[];H3(f.getRaw(G),P,Y,new J8),Y.length>0&&(X[Q]=Y)}}if(Z.has("A")){let R=[];H3(Z.get("A"),P,R,new J8),R.length>0&&(X.Action=R)}return Zq(X)>0?X:null}function*qI(P){for(let Z=0,q=P.length;Z<q;Z++){let X=P.codePointAt(Z);X>55295&&(X<57344||X>65533)&&Z++,yield X}}function W6(P){let Z=[],q=0;for(let X=0,z=P.length;X<z;X++){let R=P.codePointAt(X);if(32<=R&&R<=126){let f=ZI[R];f&&(q<X&&Z.push(P.substring(q,X)),Z.push(f),q=X+1)}else q<X&&Z.push(P.substring(q,X)),Z.push(`&#x${R.toString(16).toUpperCase()};`),R>55295&&(R<57344||R>65533)&&X++,q=X+1}return Z.length===0?P:(q<P.length&&Z.push(P.substring(q,P.length)),Z.join(""))}function s9(P,Z=!1){let q=/^("|').*("|')$/.exec(P);if(q&&q[1]===q[2]){if(new RegExp(`[^\\\\]${q[1]}`).test(P.slice(1,-1)))return Z&&v(`FontFamily contains unescaped ${q[1]}: ${P}.`),!1}else for(let X of P.split(/[ \t]+/))if(/^(\d|(-(\d|-)))/.test(X)||!/^[\w-\\]+$/.test(X))return Z&&v(`FontFamily contains invalid <custom-ident>: ${P}.`),!1;return!0}function XI(P){let Z=new Set(["100","200","300","400","500","600","700","800","900","1000","normal","bold","bolder","lighter"]),{fontFamily:q,fontWeight:X,italicAngle:z}=P;if(!s9(q,!0))return!1;let R=X?X.toString():"";P.fontWeight=Z.has(R)?R:"400";let f=parseFloat(z);return P.italicAngle=isNaN(f)||f<-90||f>90?"14":z.toString(),!0}function Lf(P){let Z=new RegExp("^\\s*("+["app.launchURL","window.open","xfa.host.gotoURL"].join("|").replaceAll(".","\\.")+`)\\((?:'|")([^'"]*)(?:'|")(?:,\\s*(\\w+)\\)|\\))`,"i").exec(P);return Z?.[2]?{url:Z[2],newWindow:Z[1]==="app.launchURL"&&Z[3]==="true"}:null}function p1(P){if(Number.isInteger(P))return P.toString();let Z=Math.round(100*P);return Z%100==0?(Z/100).toString():Z%10==0?P.toFixed(1):P.toFixed(2)}function bf(P){if(!P)return null;let Z=new Map;for(let[q,X]of P){if(!q.startsWith(rR))continue;let z=Z.get(X.pageIndex);z||(z=[],Z.set(X.pageIndex,z)),z.push(X)}return Z.size>0?Z:null}function H0(P){return P==null||function(Z){if(typeof Z!="string")return!1;return!Z||/^[\x00-\x7F]*$/.test(Z)}(P)?P:kf(P,!0)}function zI(P){let Z=[];for(let q=0,X=P.length;q<X;q++){let z=P.charCodeAt(q);Z.push(Y6[z>>8&255],Y6[255&z])}return Z.join("")}function kf(P,Z=!1){let q=[];Z&&q.push("þÿ");for(let X=0,z=P.length;X<z;X++){let R=P.charCodeAt(X);q.push(String.fromCharCode(R>>8&255),String.fromCharCode(255&R))}return q.join("")}function M3(P,Z,q){switch(P){case 90:return[0,1,-1,0,Z,0];case 180:return[-1,0,0,-1,Z,q];case 270:return[0,-1,1,0,0,q];default:throw Error("Invalid rotation")}}function Zz(P){return Math.ceil(Math.ceil(Math.log2(1+P))/8)}class L8{static#P=null;static _memory=null;static _mustAddAlpha=!1;static _destBuffer=null;static _destOffset=0;static _destLength=0;static _cssColor="";static _makeHexColor=null;static get _memoryArray(){let P=this.#P;return P?.byteLength?P:this.#P=new Uint8Array(this._memory.buffer)}}function Tf(){return Z7!==null&&Z7.byteLength!==0||(Z7=new Uint8Array(i8.memory.buffer)),Z7}function qz(P,Z){let q=Z(1*P.length,1)>>>0;return Tf().set(P,q/1),h9=P.length,q}function fI(){let P={wbg:{}};return P.wbg.__wbg_copyresult_b08ee7d273f295dd=function(Z,q){(function(X,z){let{_mustAddAlpha:R,_destBuffer:f,_destOffset:G,_destLength:Q,_memoryArray:Y}=L8;if(z!==Q)if(R)for(let W=X,$=X+z,_=G;W<$;W+=3,_+=4)f[_]=Y[W],f[_+1]=Y[W+1],f[_+2]=Y[W+2],f[_+3]=255;else for(let W=X,$=X+z,_=G;W<$;W+=3,_+=4)f[_]=Y[W],f[_+1]=Y[W+1],f[_+2]=Y[W+2];else f.set(Y.subarray(X,X+z),G)})(Z>>>0,q>>>0)},P.wbg.__wbg_copyrgb_d60ce17bb05d9b67=function(Z){(function(q){let{_destBuffer:X,_destOffset:z,_memoryArray:R}=L8;X[z]=R[q],X[z+1]=R[q+1],X[z+2]=R[q+2]})(Z>>>0)},P.wbg.__wbg_makecssRGB_893bf0cd9fdb302d=function(Z){(function(q){let{_memoryArray:X}=L8;L8._cssColor=L8._makeHexColor(X[q],X[q+1],X[q+2])})(Z>>>0)},P.wbg.__wbindgen_init_externref_table=function(){let Z=i8.__wbindgen_export_0,q=Z.grow(4);Z.set(0,void 0),Z.set(q+0,void 0),Z.set(q+1,null),Z.set(q+2,!0),Z.set(q+3,!1)},P.wbg.__wbindgen_throw=function(Z,q){throw Error((X=Z,z=q,X>>>=0,Cf.decode(Tf().subarray(X,X+z))));var X,z},P}function GI(P){if(i8!==void 0)return i8;P!==void 0&&(Object.getPrototypeOf(P)===Object.prototype?{module:P}=P:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let Z=fI();return P instanceof WebAssembly.Module||(P=new WebAssembly.Module(P)),function(q){return i8=q.exports,Z7=null,i8.__wbindgen_start(),i8}(new WebAssembly.Instance(P,Z))}function yf(P){let Z=new XMLHttpRequest;return Z.open("GET",P,!1),Z.responseType="arraybuffer",Z.send(null),Z.response}class wf{constructor(P,Z){this.length=Z.length,this.chunkSize=Z.rangeChunkSize,this.stream=new Df(this.length,this.chunkSize,this),this.pdfNetworkStream=P,this.disableAutoFetch=Z.disableAutoFetch,this.msgHandler=Z.msgHandler,this.currRequestId=0,this._chunksNeededByRequest=new Map,this._requestsByChunk=new Map,this._promisesByRequest=new Map,this.progressiveDataLength=0,this.aborted=!1,this._loadedStreamCapability=Promise.withResolvers()}sendRequest(P,Z){let q=this.pdfNetworkStream.getRangeReader(P,Z);q.isStreamingSupported||(q.onProgress=this.onProgress.bind(this));let X=[],z=0;return new Promise((R,f)=>{let G=({value:Q,done:Y})=>{try{if(Y){let W=Mf(X);return X=null,void R(W)}z+=Q.byteLength,q.isStreamingSupported&&this.onProgress({loaded:z}),X.push(Q),q.read().then(G,f)}catch(W){f(W)}};q.read().then(G,f)}).then((R)=>{this.aborted||this.onReceiveData({chunk:R,begin:P})})}requestAllChunks(P=!1){if(!P){let Z=this.stream.getMissingChunks();this._requestChunks(Z)}return this._loadedStreamCapability.promise}_requestChunks(P){let Z=this.currRequestId++,q=new Set;this._chunksNeededByRequest.set(Z,q);for(let R of P)this.stream.hasChunk(R)||q.add(R);if(q.size===0)return Promise.resolve();let X=Promise.withResolvers();this._promisesByRequest.set(Z,X);let z=[];for(let R of q){let f=this._requestsByChunk.get(R);f||(f=[],this._requestsByChunk.set(R,f),z.push(R)),f.push(Z)}if(z.length>0){let R=this.groupChunks(z);for(let f of R){let G=f.beginChunk*this.chunkSize,Q=Math.min(f.endChunk*this.chunkSize,this.length);this.sendRequest(G,Q).catch(X.reject)}}return X.promise.catch((R)=>{if(!this.aborted)throw R})}getStream(){return this.stream}requestRange(P,Z){Z=Math.min(Z,this.length);let q=this.getBeginChunk(P),X=this.getEndChunk(Z),z=[];for(let R=q;R<X;++R)z.push(R);return this._requestChunks(z)}requestRanges(P=[]){let Z=[];for(let q of P){let X=this.getBeginChunk(q.begin),z=this.getEndChunk(q.end);for(let R=X;R<z;++R)Z.includes(R)||Z.push(R)}return Z.sort((q,X)=>q-X),this._requestChunks(Z)}groupChunks(P){let Z=[],q=-1,X=-1;for(let z=0,R=P.length;z<R;++z){let f=P[z];q<0&&(q=f),X>=0&&X+1!==f&&(Z.push({beginChunk:q,endChunk:X+1}),q=f),z+1===P.length&&Z.push({beginChunk:q,endChunk:f+1}),X=f}return Z}onProgress(P){this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize+P.loaded,total:this.length})}onReceiveData(P){let Z=P.chunk,q=P.begin===void 0,X=q?this.progressiveDataLength:P.begin,z=X+Z.byteLength,R=Math.floor(X/this.chunkSize),f=z<this.length?Math.floor(z/this.chunkSize):Math.ceil(z/this.chunkSize);q?(this.stream.onReceiveProgressiveData(Z),this.progressiveDataLength=z):this.stream.onReceiveData(X,Z),this.stream.isDataLoaded&&this._loadedStreamCapability.resolve(this.stream);let G=[];for(let Q=R;Q<f;++Q){let Y=this._requestsByChunk.get(Q);if(Y){this._requestsByChunk.delete(Q);for(let W of Y){let $=this._chunksNeededByRequest.get(W);$.has(Q)&&$.delete(Q),$.size>0||G.push(W)}}}if(!this.disableAutoFetch&&this._requestsByChunk.size===0){let Q;if(this.stream.numChunksLoaded===1){let Y=this.stream.numChunks-1;this.stream.hasChunk(Y)||(Q=Y)}else Q=this.stream.nextEmptyChunk(f);Number.isInteger(Q)&&this._requestChunks([Q])}for(let Q of G){let Y=this._promisesByRequest.get(Q);this._promisesByRequest.delete(Q),Y.resolve()}this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize,total:this.length})}onError(P){this._loadedStreamCapability.reject(P)}getBeginChunk(P){return Math.floor(P/this.chunkSize)}getEndChunk(P){return Math.floor((P-1)/this.chunkSize)+1}abort(P){this.aborted=!0,this.pdfNetworkStream?.cancelAllRequests(P);for(let Z of this._promisesByRequest.values())Z.reject(P)}}function Ef(P){switch(P.kind){case q3:return l9(P);case Y7:return function({src:Z,srcPos:q=0,dest:X,destPos:z=0,width:R,height:f}){let G=0,Q=R*f*3,Y=Q>>2,W=new Uint32Array(Z.buffer,q,Y);if(P0.isLittleEndian){for(;G<Y-2;G+=3,z+=4){let $=W[G],_=W[G+1],J=W[G+2];X[z]=4278190080|$,X[z+1]=$>>>24|_<<8|4278190080,X[z+2]=_>>>16|J<<16|4278190080,X[z+3]=J>>>8|4278190080}for(let $=4*G,_=q+Q;$<_;$+=3)X[z++]=Z[$]|Z[$+1]<<8|Z[$+2]<<16|4278190080}else{for(;G<Y-2;G+=3,z+=4){let $=W[G],_=W[G+1],J=W[G+2];X[z]=255|$,X[z+1]=$<<24|_>>>8|255,X[z+2]=_<<16|J>>>16|255,X[z+3]=J<<8|255}for(let $=4*G,_=q+Q;$<_;$+=3)X[z++]=Z[$]<<24|Z[$+1]<<16|Z[$+2]<<8|255}return{srcPos:q+Q,destPos:z}}(P)}return null}function l9({src:P,srcPos:Z=0,dest:q,width:X,height:z,nonBlackColor:R=4294967295,inverseDecode:f=!1}){let G=P0.isLittleEndian?4278190080:255,[Q,Y]=f?[R,G]:[G,R],W=X>>3,$=7&X,_=P.length;q=new Uint32Array(q.buffer);let J=0;for(let U=0;U<z;U++){for(let I=Z+W;Z<I;Z++){let B=Z<_?P[Z]:255;q[J++]=128&B?Y:Q,q[J++]=64&B?Y:Q,q[J++]=32&B?Y:Q,q[J++]=16&B?Y:Q,q[J++]=8&B?Y:Q,q[J++]=4&B?Y:Q,q[J++]=2&B?Y:Q,q[J++]=1&B?Y:Q}if($===0)continue;let K=Z<_?P[Z++]:255;for(let I=0;I<$;I++)q[J++]=K&1<<7-I?Y:Q}return{srcPos:Z,destPos:J}}class g1{static parse({cs:P,xref:Z,resources:q=null,pdfFunctionFactory:X,globalColorSpaceCache:z,localColorSpaceCache:R,asyncIfNotCached:f=!1}){let G={xref:Z,resources:q,pdfFunctionFactory:X,globalColorSpaceCache:z,localColorSpaceCache:R},Q,Y,W;if(P instanceof f1){Y=P;let $=z.getByRef(Y)||R.getByRef(Y);if($)return $;P=Z.fetch(P)}if(P instanceof t){Q=P.name;let $=R.getByName(Q);if($)return $}try{W=this.#Z(P,G)}catch($){if(f&&!($ instanceof q8))return Promise.reject($);throw $}return(Q||Y)&&(R.set(Q,Y,W),Y&&z.set(null,Y,W)),f?Promise.resolve(W):W}static#P(P,Z){let{globalColorSpaceCache:q}=Z,X;if(P instanceof f1){X=P;let R=q.getByRef(X);if(R)return R}let z=this.#Z(P,Z);return X&&q.set(null,X,z),z}static#Z(P,Z){let{xref:q,resources:X,pdfFunctionFactory:z,globalColorSpaceCache:R}=Z;if((P=q.fetchIfRef(P))instanceof t)switch(P.name){case"G":case"DeviceGray":return this.gray;case"RGB":case"DeviceRGB":return this.rgb;case"DeviceRGBA":return this.rgba;case"CMYK":case"DeviceCMYK":return this.cmyk;case"Pattern":return new r9(null);default:if(X instanceof S){let f=X.get("ColorSpace");if(f instanceof S){let G=f.get(P.name);if(G){if(G instanceof t)return this.#Z(G,Z);P=G;break}}}return v(`Unrecognized ColorSpace: ${P.name}`),this.gray}if(Array.isArray(P)){let f=q.fetchIfRef(P[0]).name,G,Q,Y,W,$,_;switch(f){case"G":case"DeviceGray":return this.gray;case"RGB":case"DeviceRGB":return this.rgb;case"CMYK":case"DeviceCMYK":return this.cmyk;case"CalGray":return G=q.fetchIfRef(P[1]),W=G.getArray("WhitePoint"),$=G.getArray("BlackPoint"),_=G.get("Gamma"),new pf(W,$,_);case"CalRGB":G=q.fetchIfRef(P[1]),W=G.getArray("WhitePoint"),$=G.getArray("BlackPoint"),_=G.getArray("Gamma");let J=G.getArray("Matrix");return new c8(W,$,_,J);case"ICCBased":let U=P[1]instanceof f1;if(U){let A=R.getByRef(P[1]);if(A)return A}let K=q.fetchIfRef(P[1]),I=K.dict;if(Q=I.get("N"),M4.isUsable)try{let A=new M4(K.getBytes(),"ICCBased",Q);return U&&R.set(null,P[1],A),A}catch(A){if(A instanceof q8)throw A;v(`ICCBased color space (${P[1]}): "${A}".`)}let B=I.getRaw("Alternate");if(B){let A=this.#P(B,Z);if(A.numComps===Q)return A;v("ICCBased color space: Ignoring incorrect /Alternate entry.")}if(Q===1)return this.gray;if(Q===3)return this.rgb;if(Q===4)return this.cmyk;break;case"Pattern":return Y=P[1]||null,Y&&(Y=this.#P(Y,Z)),new r9(Y);case"I":case"Indexed":Y=this.#P(P[1],Z);let j=E8(q.fetchIfRef(P[2]),0,255),V=q.fetchIfRef(P[3]);return new vf(Y,j,V);case"Separation":case"DeviceN":let H=q.fetchIfRef(P[1]);Q=Array.isArray(H)?H.length:1,Y=this.#P(P[2],Z);let M=z.create(P[3]);return new Nf(Q,Y,M);case"Lab":G=q.fetchIfRef(P[1]),W=G.getArray("WhitePoint"),$=G.getArray("BlackPoint");let x=G.getArray("Range");return new Of(W,$,x);default:return v(`Unimplemented ColorSpace object: ${f}`),this.gray}}return v(`Unrecognized ColorSpace object: ${P}`),this.gray}static get gray(){return q1(this,"gray",new Ff)}static get rgb(){return q1(this,"rgb",new Sf)}static get rgba(){return q1(this,"rgba",new mf)}static get cmyk(){if(T7.isUsable)try{return q1(this,"cmyk",new T7)}catch{v("CMYK fallback: DeviceCMYK")}return q1(this,"cmyk",new Xq)}}function YI(P,Z){let q,X,z=0,R=16;for(;R>0&&!P[R-1];)R--;let f=[{children:[],index:0}],G,Q=f[0];for(q=0;q<R;q++){for(X=0;X<P[q];X++){for(Q=f.pop(),Q.children[Q.index]=Z[z];Q.index>0;)Q=f.pop();for(Q.index++,f.push(Q);f.length<=q;)f.push(G={children:[],index:0}),Q.children[Q.index]=G.children,Q=G;z++}q+1<R&&(f.push(G={children:[],index:0}),Q.children[Q.index]=G.children,Q=G)}return f[0].children}function o9(P,Z,q){return 64*((P.blocksPerLine+1)*Z+q)}function WI(P,Z,q,X,z,R,f,G,Q,Y=!1){let{mcusPerLine:W,progressive:$}=q,_=Z,J=0,U=0;function K(){if(U>0)return U--,J>>U&1;if(J=P[Z++],J===255){let E=P[Z++];if(E){if(E===220&&Y){let y=S1(P,Z+=2);if(Z+=2,y>0&&y!==q.scanLines)throw new L3("Found DNL marker (0xFFDC) while parsing scan data",y)}else if(E===217){if(Y){let y=x*(q.precision===8?8:0);if(y>0&&Math.round(q.scanLines/y)>=5)throw new L3("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",y)}throw new zq("Found EOI marker (0xFFD9) while parsing scan data")}throw new I0(`unexpected marker ${(J<<8|E).toString(16)}`)}}return U=7,J>>>7}function I(E){let y=E;for(;;){switch(y=y[K()],typeof y){case"number":return y;case"object":continue}throw new I0("invalid huffman sequence")}}function B(E){let y=0;for(;E>0;)y=y<<1|K(),E--;return y}function j(E){if(E===1)return K()===1?1:-1;let y=B(E);return y>=1<<E-1?y:y+(-1<<E)+1}let V=0,H,M=0,x=0;function A(E,y,N,h,w){let c=N%W;x=(N/W|0)*E.v+h;let o=c*E.h+w;y(E,o9(E,x,o))}function k(E,y,N){x=N/E.blocksPerLine|0;let h=N%E.blocksPerLine;y(E,o9(E,x,h))}let b=X.length,O,p,D,n,F,l;l=$?R===0?G===0?function(E,y){let N=I(E.huffmanTableDC),h=N===0?0:j(N)<<Q;E.blockData[y]=E.pred+=h}:function(E,y){E.blockData[y]|=K()<<Q}:G===0?function(E,y){if(V>0)return void V--;let N=R,h=f;for(;N<=h;){let w=I(E.huffmanTableAC),c=15&w,o=w>>4;if(c===0){if(o<15){V=B(o)+(1<<o)-1;break}N+=16;continue}N+=o;let G1=$7[N];E.blockData[y+G1]=j(c)*(1<<Q),N++}}:function(E,y){let N=R,h=f,w,c,o=0;for(;N<=h;){let G1=y+$7[N],r=E.blockData[G1]<0?-1:1;switch(M){case 0:if(c=I(E.huffmanTableAC),w=15&c,o=c>>4,w===0)o<15?(V=B(o)+(1<<o),M=4):(o=16,M=1);else{if(w!==1)throw new I0("invalid ACn encoding");H=j(w),M=o?2:3}continue;case 1:case 2:E.blockData[G1]?E.blockData[G1]+=r*(K()<<Q):(o--,o===0&&(M=M===2?3:0));break;case 3:E.blockData[G1]?E.blockData[G1]+=r*(K()<<Q):(E.blockData[G1]=H<<Q,M=0);break;case 4:E.blockData[G1]&&(E.blockData[G1]+=r*(K()<<Q))}N++}M===4&&(V--,V===0&&(M=0))}:function(E,y){let N=I(E.huffmanTableDC),h=N===0?0:j(N);E.blockData[y]=E.pred+=h;let w=1;for(;w<64;){let c=I(E.huffmanTableAC),o=15&c,G1=c>>4;if(o===0){if(G1<15)break;w+=16;continue}w+=G1;let r=$7[w];E.blockData[y+r]=j(o),w++}};let C,L=0,m=b===1?X[0].blocksPerLine*X[0].blocksPerColumn:W*q.mcusPerColumn,d,e;for(;L<=m;){let E=z?Math.min(m-L,z):m;if(E>0){for(p=0;p<b;p++)X[p].pred=0;if(V=0,b===1)for(O=X[0],F=0;F<E;F++)k(O,l,L),L++;else for(F=0;F<E;F++){for(p=0;p<b;p++)for(O=X[p],d=O.h,e=O.v,D=0;D<e;D++)for(n=0;n<d;n++)A(O,l,L,D,n);L++}}if(U=0,C=XP(P,Z),!C)break;if(C.invalid)v(`decodeScan - ${E>0?"unexpected":"excessive"} MCU data, current marker is: ${C.invalid}`),Z=C.offset;if(!(C.marker>=65488&&C.marker<=65495))break;Z+=2}return Z-_}function $I(P,Z,q){let{quantizationTable:X,blockData:z}=P,R,f,G,Q,Y,W,$,_,J,U,K,I,B,j,V,H,M;if(!X)throw new I0("missing required Quantization Table.");for(let x=0;x<64;x+=8)J=z[Z+x],U=z[Z+x+1],K=z[Z+x+2],I=z[Z+x+3],B=z[Z+x+4],j=z[Z+x+5],V=z[Z+x+6],H=z[Z+x+7],J*=X[x],(U|K|I|B|j|V|H)!==0?(U*=X[x+1],K*=X[x+2],I*=X[x+3],B*=X[x+4],j*=X[x+5],V*=X[x+6],H*=X[x+7],R=d5*J+128>>8,f=d5*B+128>>8,G=K,Q=V,Y=A2*(U-H)+128>>8,_=A2*(U+H)+128>>8,W=I<<4,$=j<<4,R=R+f+1>>1,f=R-f,M=G*M2+Q*H2+128>>8,G=G*H2-Q*M2+128>>8,Q=M,Y=Y+$+1>>1,$=Y-$,_=_+W+1>>1,W=_-W,R=R+Q+1>>1,Q=R-Q,f=f+G+1>>1,G=f-G,M=Y*x2+_*V2+2048>>12,Y=Y*V2-_*x2+2048>>12,_=M,M=W*j2+$*I2+2048>>12,W=W*I2-$*j2+2048>>12,$=M,q[x]=R+_,q[x+7]=R-_,q[x+1]=f+$,q[x+6]=f-$,q[x+2]=G+W,q[x+5]=G-W,q[x+3]=Q+Y,q[x+4]=Q-Y):(M=d5*J+512>>10,q[x]=M,q[x+1]=M,q[x+2]=M,q[x+3]=M,q[x+4]=M,q[x+5]=M,q[x+6]=M,q[x+7]=M);for(let x=0;x<8;++x)J=q[x],U=q[x+8],K=q[x+16],I=q[x+24],B=q[x+32],j=q[x+40],V=q[x+48],H=q[x+56],(U|K|I|B|j|V|H)!==0?(R=d5*J+2048>>12,f=d5*B+2048>>12,G=K,Q=V,Y=A2*(U-H)+2048>>12,_=A2*(U+H)+2048>>12,W=I,$=j,R=4112+(R+f+1>>1),f=R-f,M=G*M2+Q*H2+2048>>12,G=G*H2-Q*M2+2048>>12,Q=M,Y=Y+$+1>>1,$=Y-$,_=_+W+1>>1,W=_-W,R=R+Q+1>>1,Q=R-Q,f=f+G+1>>1,G=f-G,M=Y*x2+_*V2+2048>>12,Y=Y*V2-_*x2+2048>>12,_=M,M=W*j2+$*I2+2048>>12,W=W*I2-$*j2+2048>>12,$=M,J=R+_,H=R-_,U=f+$,V=f-$,K=G+W,j=G-W,I=Q+Y,B=Q-Y,J<16?J=0:J>=4080?J=255:J>>=4,U<16?U=0:U>=4080?U=255:U>>=4,K<16?K=0:K>=4080?K=255:K>>=4,I<16?I=0:I>=4080?I=255:I>>=4,B<16?B=0:B>=4080?B=255:B>>=4,j<16?j=0:j>=4080?j=255:j>>=4,V<16?V=0:V>=4080?V=255:V>>=4,H<16?H=0:H>=4080?H=255:H>>=4,z[Z+x]=J,z[Z+x+8]=U,z[Z+x+16]=K,z[Z+x+24]=I,z[Z+x+32]=B,z[Z+x+40]=j,z[Z+x+48]=V,z[Z+x+56]=H):(M=d5*J+8192>>14,M=M<-2040?0:M>=2024?255:M+2056>>4,z[Z+x]=M,z[Z+x+8]=M,z[Z+x+16]=M,z[Z+x+24]=M,z[Z+x+32]=M,z[Z+x+40]=M,z[Z+x+48]=M,z[Z+x+56]=M)}function _I(P,Z){let{blocksPerLine:q,blocksPerColumn:X}=Z,z=new Int16Array(64);for(let R=0;R<X;R++)for(let f=0;f<q;f++)$I(Z,o9(Z,R,f),z);return Z.blockData}function XP(P,Z,q=Z){let X=P.length-1,z=q<Z?q:Z;if(Z>=X)return null;let R=S1(P,Z);if(R>=65472&&R<=65534)return{invalid:null,marker:R,offset:Z};let f=S1(P,z);for(;!(f>=65472&&f<=65534);){if(++z>=X)return null;f=S1(P,z)}return{invalid:R.toString(16),marker:f,offset:z}}function JI(P){let Z=Math.ceil(P.samplesPerLine/8/P.maxH),q=Math.ceil(P.scanLines/8/P.maxV);for(let X of P.components){let z=Math.ceil(Math.ceil(P.samplesPerLine/8)*X.h/P.maxH),R=Math.ceil(Math.ceil(P.scanLines/8)*X.v/P.maxV),f=Z*X.h,G=64*(q*X.v)*(f+1);X.blockData=new Int16Array(G),X.blocksPerLine=z,X.blocksPerColumn=R}P.mcusPerLine=Z,P.mcusPerColumn=q}function Xz(P,Z){let q=S1(P,Z),X=(Z+=2)+q-2,z=XP(P,X,Z);z?.invalid&&(v("readDataBlock - incorrect length, current marker is: "+z.invalid),X=z.offset);let R=P.subarray(Z,X);return{appData:R,oldOffset:Z,newOffset:Z+R.length}}function UI(P,Z){let q=S1(P,Z),X=(Z+=2)+q-2,z=XP(P,X,Z);return z?.invalid?z.offset:X}class a9{constructor({decodeTransform:P=null,colorTransform:Z=-1}={}){this._decodeTransform=P,this._colorTransform=Z}static canUseImageDecoder(P,Z=-1){let q=null,X=0,z=null,R=S1(P,X);if(X+=2,R!==65496)throw new I0("SOI not found");R=S1(P,X),X+=2;P:for(;R!==65497;){switch(R){case 65505:let{appData:f,oldOffset:G,newOffset:Q}=Xz(P,X);if(X=Q,f[0]===69&&f[1]===120&&f[2]===105&&f[3]===102&&f[4]===0&&f[5]===0){if(q)throw new I0("Duplicate EXIF-blocks found.");q={exifStart:G+6,exifEnd:Q}}R=S1(P,X),X+=2;continue;case 65472:case 65473:case 65474:z=P[X+7];break P;case 65535:P[X]!==255&&X--}X=UI(P,X),R=S1(P,X),X+=2}return z===4||z===3&&Z===0?null:q||{}}parse(P,{dnlScanLines:Z=null}={}){let q,X,z=0,R=null,f=null,G=0,Q=[],Y=[],W=[],$=S1(P,z);if(z+=2,$!==65496)throw new I0("SOI not found");$=S1(P,z),z+=2;P:for(;$!==65497;){let _,J,U;switch($){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:let{appData:K,newOffset:I}=Xz(P,z);z=I,$===65504&&K[0]===74&&K[1]===70&&K[2]===73&&K[3]===70&&K[4]===0&&(R={version:{major:K[5],minor:K[6]},densityUnits:K[7],xDensity:K[8]<<8|K[9],yDensity:K[10]<<8|K[11],thumbWidth:K[12],thumbHeight:K[13],thumbData:K.subarray(14,14+3*K[12]*K[13])}),$===65518&&K[0]===65&&K[1]===100&&K[2]===111&&K[3]===98&&K[4]===101&&(f={version:K[5]<<8|K[6],flags0:K[7]<<8|K[8],flags1:K[9]<<8|K[10],transformCode:K[11]});break;case 65499:let B=S1(P,z);z+=2;let j=B+z-2,V;for(;z<j;){let C=P[z++],L=new Uint16Array(64);if(C>>4){if(C>>4!=1)throw new I0("DQT - invalid table spec");for(J=0;J<64;J++)V=$7[J],L[V]=S1(P,z),z+=2}else for(J=0;J<64;J++)V=$7[J],L[V]=P[z++];Q[15&C]=L}break;case 65472:case 65473:case 65474:if(q)throw new I0("Only single frame JPEGs supported");z+=2,q={},q.extended=$===65473,q.progressive=$===65474,q.precision=P[z++];let H=S1(P,z);z+=2,q.scanLines=Z||H,q.samplesPerLine=S1(P,z),z+=2,q.components=[],q.componentIds={};let M=P[z++],x=0,A=0;for(_=0;_<M;_++){let C=P[z],L=P[z+1]>>4,m=15&P[z+1];x<L&&(x=L),A<m&&(A=m);let d=P[z+2];U=q.components.push({h:L,v:m,quantizationId:d,quantizationTable:null}),q.componentIds[C]=U-1,z+=3}q.maxH=x,q.maxV=A,JI(q);break;case 65476:let k=S1(P,z);for(z+=2,_=2;_<k;){let C=P[z++],L=new Uint8Array(16),m=0;for(J=0;J<16;J++,z++)m+=L[J]=P[z];let d=new Uint8Array(m);for(J=0;J<m;J++,z++)d[J]=P[z];_+=17+m,(C>>4?Y:W)[15&C]=YI(L,d)}break;case 65501:z+=2,X=S1(P,z),z+=2;break;case 65498:let b=++G===1&&!Z;z+=2;let O=P[z++],p=[];for(_=0;_<O;_++){let C=P[z++],L=q.componentIds[C],m=q.components[L];m.index=C;let d=P[z++];m.huffmanTableDC=W[d>>4],m.huffmanTableAC=Y[15&d],p.push(m)}let D=P[z++],n=P[z++],F=P[z++];try{z+=WI(P,z,q,p,X,D,n,F>>4,15&F,b)}catch(C){if(C instanceof L3)return v(`${C.message} -- attempting to re-parse the JPEG image.`),this.parse(P,{dnlScanLines:C.scanLines});if(C instanceof zq){v(`${C.message} -- ignoring the rest of the image data.`);break P}throw C}break;case 65500:z+=4;break;case 65535:P[z]!==255&&z--;break;default:let l=XP(P,z-2,z-3);if(l?.invalid){v("JpegImage.parse - unexpected data, current marker is: "+l.invalid),z=l.offset;break}if(!l||z>=P.length-1){v("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break P}throw new I0("JpegImage.parse - unknown marker: "+$.toString(16))}$=S1(P,z),z+=2}if(!q)throw new I0("JpegImage.parse - no frame data found.");this.width=q.samplesPerLine,this.height=q.scanLines,this.jfif=R,this.adobe=f,this.components=[];for(let _ of q.components){let J=Q[_.quantizationId];J&&(_.quantizationTable=J),this.components.push({index:_.index,output:_I(0,_),scaleX:_.h/q.maxH,scaleY:_.v/q.maxV,blocksPerLine:_.blocksPerLine,blocksPerColumn:_.blocksPerColumn})}this.numComponents=this.components.length}_getLinearizedBlockData(P,Z,q=!1){let X=this.width/P,z=this.height/Z,R,f,G,Q,Y,W,$,_,J,U,K,I=0,B=this.components.length,j=P*Z*B,V=new Uint8ClampedArray(j),H=new Uint32Array(P),M=4294967288,x;for($=0;$<B;$++){if(R=this.components[$],f=R.scaleX*X,G=R.scaleY*z,I=$,K=R.output,Q=R.blocksPerLine+1<<3,f!==x){for(Y=0;Y<P;Y++)_=0|Y*f,H[Y]=(_&M)<<3|7&_;x=f}for(W=0;W<Z;W++)for(_=0|W*G,U=Q*(_&M)|(7&_)<<3,Y=0;Y<P;Y++)V[I]=K[U+H[Y]],I+=B}let A=this._decodeTransform;if(q||B!==4||A||(A=new Int32Array([-256,255,-256,255,-256,255,-256,255])),A)for($=0;$<j;)for(_=0,J=0;_<B;_++,$++,J+=2)V[$]=(V[$]*A[J]>>8)+A[J+1];return V}get _isColorConversionNeeded(){return this.adobe?!!this.adobe.transformCode:this.numComponents===3?this._colorTransform!==0&&(this.components[0].index!==82||this.components[1].index!==71||this.components[2].index!==66):this._colorTransform===1}_convertYccToRgb(P){let Z,q,X;for(let z=0,R=P.length;z<R;z+=3)Z=P[z],q=P[z+1],X=P[z+2],P[z]=Z-179.456+1.402*X,P[z+1]=Z+135.459-0.344*q-0.714*X,P[z+2]=Z-226.816+1.772*q;return P}_convertYccToRgba(P,Z){for(let q=0,X=0,z=P.length;q<z;q+=3,X+=4){let R=P[q],f=P[q+1],G=P[q+2];Z[X]=R-179.456+1.402*G,Z[X+1]=R+135.459-0.344*f-0.714*G,Z[X+2]=R-226.816+1.772*f,Z[X+3]=255}return Z}_convertYcckToRgb(P){return this._convertYcckToCmyk(P),this._convertCmykToRgb(P)}_convertYcckToRgba(P){return this._convertYcckToCmyk(P),this._convertCmykToRgba(P)}_convertYcckToCmyk(P){let Z,q,X;for(let z=0,R=P.length;z<R;z+=4)Z=P[z],q=P[z+1],X=P[z+2],P[z]=434.456-Z-1.402*X,P[z+1]=119.541-Z+0.344*q+0.714*X,P[z+2]=481.816-Z-1.772*q;return P}_convertCmykToRgb(P){let Z=P.length/4;return g1.cmyk.getRgbBuffer(P,0,Z,P,0,8,0),P.subarray(0,3*Z)}_convertCmykToRgba(P){if(g1.cmyk.getRgbBuffer(P,0,P.length/4,P,0,8,1),g1.cmyk instanceof Xq)for(let Z=3,q=P.length;Z<q;Z+=4)P[Z]=255;return P}getData({width:P,height:Z,forceRGBA:q=!1,forceRGB:X=!1,isSourcePDF:z=!1}){if(this.numComponents>4)throw new I0("Unsupported color mode");let R=this._getLinearizedBlockData(P,Z,z);if(this.numComponents===1&&(q||X)){let f=R.length*(q?4:3),G=new Uint8ClampedArray(f),Q=0;if(q)(function(Y,W){if(P0.isLittleEndian)for(let $=0,_=Y.length;$<_;$++)W[$]=65793*Y[$]|4278190080;else for(let $=0,_=Y.length;$<_;$++)W[$]=16843008*Y[$]|255})(R,new Uint32Array(G.buffer));else for(let Y of R)G[Q++]=Y,G[Q++]=Y,G[Q++]=Y;return G}if(this.numComponents===3&&this._isColorConversionNeeded){if(q){let f=new Uint8ClampedArray(R.length/3*4);return this._convertYccToRgba(R,f)}return this._convertYccToRgb(R)}if(this.numComponents===4){if(this._isColorConversionNeeded)return q?this._convertYcckToRgba(R):X?this._convertYcckToRgb(R):this._convertYcckToCmyk(R);if(q)return this._convertCmykToRgba(R);if(X)return this._convertCmykToRgb(R)}return R}}class i7{static#P=null;static#Z=null;static#X=null;static#q=!0;static#z=!0;static#R=null;static setOptions({handler:P,useWasm:Z,useWorkerFetch:q,wasmUrl:X}){this.#q=Z,this.#z=q,this.#R=X,q||(this.#Z=P)}static async#G(P){}static async#f(P,Z,q){}static async decode(P,{numComponents:Z=4,isIndexedColormap:q=!1,smaskInData:X=!1,reducePower:z=0}={}){let R=await this.#X;if(!R)throw new q7("OpenJPEG failed to initialize");let f;try{let G=P.length;if(f=R._malloc(G),R.writeArrayToMemory(P,f),R._jp2_decode(f,G,Z>0?Z:0,!!q,!!X,z)){let{errorMessages:Y}=R;if(Y)throw delete R.errorMessages,new q7(Y);throw new q7("Unknown error")}let{imageData:Q}=R;return R.imageData=null,Q}finally{f&&R._free(f)}}static cleanup(){this.#X=null}static parseImageProperties(P){let Z=P.getByte();for(;Z>=0;){let q=Z;if(Z=P.getByte(),(q<<8|Z)===65361){P.skip(4);let X=P.getInt32()>>>0,z=P.getInt32()>>>0,R=P.getInt32()>>>0,f=P.getInt32()>>>0;return P.skip(16),{width:X-R,height:z-f,bitsPerComponent:8,componentsCount:P.getUint16()}}}throw new q7("No size marker found in JPX stream")}}function w6(P,Z,q,X,z){let R=P;for(let f=0,G=Z.length-1;f<G;f++){let Q=Z[f];R=R[Q]||=[]}R[Z.at(-1)]={checkFn:q,iterateFn:X,processFn:z}}class Rq{constructor(P){this.queue=P}_optimize(){}push(P,Z){this.queue.fnArray.push(P),this.queue.argsArray.push(Z),this._optimize()}flush(){}reset(){}}function d8(P,Z){let q=0;for(let X=0;X<=Z;X++)q=q<<8|P[X];return q>>>0}function L2(P,Z){return Z===1?String.fromCharCode(P[0],P[1]):Z===3?String.fromCharCode(P[0],P[1],P[2],P[3]):String.fromCharCode(...P.subarray(0,Z+1))}function n8(P,Z,q){let X=0;for(let z=q;z>=0;z--)X+=P[z]+Z[z],P[z]=255&X,X>>=8}function q5(P,Z){let q=1;for(let X=Z;X>=0&&q>0;X--)q+=P[X],P[X]=255&q,q>>=8}class df{constructor(P){this.buffer=P,this.pos=0,this.end=P.length,this.tmpBuf=new Uint8Array(19)}readByte(){return this.pos>=this.end?-1:this.buffer[this.pos++]}readNumber(){let P,Z=0;do{let q=this.readByte();if(q<0)throw new s("unexpected EOF in bcmap");P=!(128&q),Z=Z<<7|127&q}while(!P);return Z}readSigned(){let P=this.readNumber();return 1&P?~(P>>>1):P>>>1}readHex(P,Z){P.set(this.buffer.subarray(this.pos,this.pos+Z+1)),this.pos+=Z+1}readHexNumber(P,Z){let q,X=this.tmpBuf,z=0;do{let Q=this.readByte();if(Q<0)throw new s("unexpected EOF in bcmap");q=!(128&Q),X[z++]=127&Q}while(!q);let R=Z,f=0,G=0;for(;R>=0;){for(;G<8&&X.length>0;)f|=X[--z]<<G,G+=7;P[R]=255&f,R--,f>>=8,G-=8}}readHexSigned(P,Z){this.readHexNumber(P,Z);let q=1&P[Z]?255:0,X=0;for(let z=0;z<=Z;z++)X=(1&X)<<8|P[z],P[z]=X>>1^q}readString(){let P=this.readNumber(),Z=Array(P);for(let q=0;q<P;q++)Z[q]=this.readNumber();return String.fromCharCode(...Z)}}class cf{async process(P,Z,q){let X=new df(P),z=X.readByte();Z.vertical=!!(1&z);let R=null,f=new Uint8Array(c5),G=new Uint8Array(c5),Q=new Uint8Array(c5),Y=new Uint8Array(c5),W=new Uint8Array(c5),$,_;for(;(_=X.readByte())>=0;){let J=_>>5;if(J===7){switch(31&_){case 0:X.readString();break;case 1:R=X.readString()}continue}let U=!!(16&_),K=15&_;if(K+1>c5)throw Error("BinaryCMapReader.process: Invalid dataSize.");let I=1,B=X.readNumber();switch(J){case 0:X.readHex(f,K),X.readHexNumber(G,K),n8(G,f,K),Z.addCodespaceRange(K+1,d8(f,K),d8(G,K));for(let j=1;j<B;j++)q5(G,K),X.readHexNumber(f,K),n8(f,G,K),X.readHexNumber(G,K),n8(G,f,K),Z.addCodespaceRange(K+1,d8(f,K),d8(G,K));break;case 1:X.readHex(f,K),X.readHexNumber(G,K),n8(G,f,K),X.readNumber();for(let j=1;j<B;j++)q5(G,K),X.readHexNumber(f,K),n8(f,G,K),X.readHexNumber(G,K),n8(G,f,K),X.readNumber();break;case 2:X.readHex(Q,K),$=X.readNumber(),Z.mapOne(d8(Q,K),$);for(let j=1;j<B;j++)q5(Q,K),U||(X.readHexNumber(W,K),n8(Q,W,K)),$=X.readSigned()+($+1),Z.mapOne(d8(Q,K),$);break;case 3:X.readHex(f,K),X.readHexNumber(G,K),n8(G,f,K),$=X.readNumber(),Z.mapCidRange(d8(f,K),d8(G,K),$);for(let j=1;j<B;j++)q5(G,K),U?f.set(G):(X.readHexNumber(f,K),n8(f,G,K)),X.readHexNumber(G,K),n8(G,f,K),$=X.readNumber(),Z.mapCidRange(d8(f,K),d8(G,K),$);break;case 4:X.readHex(Q,I),X.readHex(Y,K),Z.mapOne(d8(Q,I),L2(Y,K));for(let j=1;j<B;j++)q5(Q,I),U||(X.readHexNumber(W,I),n8(Q,W,I)),q5(Y,K),X.readHexSigned(W,K),n8(Y,W,K),Z.mapOne(d8(Q,I),L2(Y,K));break;case 5:X.readHex(f,I),X.readHexNumber(G,I),n8(G,f,I),X.readHex(Y,K),Z.mapBfRange(d8(f,I),d8(G,I),L2(Y,K));for(let j=1;j<B;j++)q5(G,I),U?f.set(G):(X.readHexNumber(f,I),n8(f,G,I)),X.readHexNumber(G,I),n8(G,f,I),X.readHex(Y,K),Z.mapBfRange(d8(f,I),d8(G,I),L2(Y,K));break;default:throw Error(`BinaryCMapReader.process - unknown type: ${J}`)}}return R?q(R):Z}}class fq{constructor(P,Z={}){if(typeof P?.next!="function")throw Error('CCITTFaxDecoder - invalid "source" parameter.');let q;for(this.source=P,this.eof=!1,this.encoding=Z.K||0,this.eoline=Z.EndOfLine||!1,this.byteAlign=Z.EncodedByteAlign||!1,this.columns=Z.Columns||1728,this.rows=Z.Rows||0,this.eoblock=Z.EndOfBlock??!0,this.black=Z.BlackIs1||!1,this.codingLine=new Uint32Array(this.columns+1),this.refLine=new Uint32Array(this.columns+2),this.codingLine[0]=this.columns,this.codingPos=0,this.row=0,this.nextLine2D=this.encoding<0,this.inputBits=0,this.inputBuf=0,this.outputBits=0,this.rowsDone=!1;(q=this._lookBits(12))===0;)this._eatBits(1);q===1&&this._eatBits(12),this.encoding>0&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1))}readNextChar(){if(this.eof)return-1;let P=this.refLine,Z=this.codingLine,q=this.columns,X,z,R,f,G;if(this.outputBits===0){if(this.rowsDone&&(this.eof=!0),this.eof)return-1;let Q,Y,W;if(this.err=!1,this.nextLine2D){for(f=0;Z[f]<q;++f)P[f]=Z[f];for(P[f++]=q,P[f]=q,Z[0]=0,this.codingPos=0,X=0,z=0;Z[this.codingPos]<q;)switch(Q=this._getTwoDimCode(),Q){case 0:this._addPixels(P[X+1],z),P[X+1]<q&&(X+=2);break;case 1:if(Q=Y=0,z){do Q+=W=this._getBlackCode();while(W>=64);do Y+=W=this._getWhiteCode();while(W>=64)}else{do Q+=W=this._getWhiteCode();while(W>=64);do Y+=W=this._getBlackCode();while(W>=64)}for(this._addPixels(Z[this.codingPos]+Q,z),Z[this.codingPos]<q&&this._addPixels(Z[this.codingPos]+Y,1^z);P[X]<=Z[this.codingPos]&&P[X]<q;)X+=2;break;case 7:if(this._addPixels(P[X]+3,z),z^=1,Z[this.codingPos]<q)for(++X;P[X]<=Z[this.codingPos]&&P[X]<q;)X+=2;break;case 5:if(this._addPixels(P[X]+2,z),z^=1,Z[this.codingPos]<q)for(++X;P[X]<=Z[this.codingPos]&&P[X]<q;)X+=2;break;case 3:if(this._addPixels(P[X]+1,z),z^=1,Z[this.codingPos]<q)for(++X;P[X]<=Z[this.codingPos]&&P[X]<q;)X+=2;break;case 2:if(this._addPixels(P[X],z),z^=1,Z[this.codingPos]<q)for(++X;P[X]<=Z[this.codingPos]&&P[X]<q;)X+=2;break;case 8:if(this._addPixelsNeg(P[X]-3,z),z^=1,Z[this.codingPos]<q)for(X>0?--X:++X;P[X]<=Z[this.codingPos]&&P[X]<q;)X+=2;break;case 6:if(this._addPixelsNeg(P[X]-2,z),z^=1,Z[this.codingPos]<q)for(X>0?--X:++X;P[X]<=Z[this.codingPos]&&P[X]<q;)X+=2;break;case 4:if(this._addPixelsNeg(P[X]-1,z),z^=1,Z[this.codingPos]<q)for(X>0?--X:++X;P[X]<=Z[this.codingPos]&&P[X]<q;)X+=2;break;case G4:this._addPixels(q,0),this.eof=!0;break;default:v1("bad 2d code"),this._addPixels(q,0),this.err=!0}}else for(Z[0]=0,this.codingPos=0,z=0;Z[this.codingPos]<q;){if(Q=0,z)do Q+=W=this._getBlackCode();while(W>=64);else do Q+=W=this._getWhiteCode();while(W>=64);this._addPixels(Z[this.codingPos]+Q,z),z^=1}let $=!1;if(this.byteAlign&&(this.inputBits&=-8),this.eoblock||this.row!==this.rows-1){if(Q=this._lookBits(12),this.eoline)for(;Q!==G4&&Q!==1;)this._eatBits(1),Q=this._lookBits(12);else for(;Q===0;)this._eatBits(1),Q=this._lookBits(12);Q===1?(this._eatBits(12),$=!0):Q===G4&&(this.eof=!0)}else this.rowsDone=!0;if(!this.eof&&this.encoding>0&&!this.rowsDone&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1)),this.eoblock&&$&&this.byteAlign){if(Q=this._lookBits(12),Q===1){if(this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1)),this.encoding>=0)for(f=0;f<4;++f)Q=this._lookBits(12),Q!==1&&v1("bad rtc code: "+Q),this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1));this.eof=!0}}else if(this.err&&this.eoline){for(;;){if(Q=this._lookBits(13),Q===G4)return this.eof=!0,-1;if(Q>>1==1)break;this._eatBits(1)}this._eatBits(12),this.encoding>0&&(this._eatBits(1),this.nextLine2D=!(1&Q))}this.outputBits=Z[0]>0?Z[this.codingPos=0]:Z[this.codingPos=1],this.row++}if(this.outputBits>=8)G=1&this.codingPos?0:255,this.outputBits-=8,this.outputBits===0&&Z[this.codingPos]<q&&(this.codingPos++,this.outputBits=Z[this.codingPos]-Z[this.codingPos-1]);else{R=8,G=0;do{if(typeof this.outputBits!="number")throw new s('Invalid /CCITTFaxDecode data, "outputBits" must be a number.');this.outputBits>R?(G<<=R,1&this.codingPos||(G|=255>>8-R),this.outputBits-=R,R=0):(G<<=this.outputBits,1&this.codingPos||(G|=255>>8-this.outputBits),R-=this.outputBits,this.outputBits=0,Z[this.codingPos]<q?(this.codingPos++,this.outputBits=Z[this.codingPos]-Z[this.codingPos-1]):R>0&&(G<<=R,R=0))}while(R)}return this.black&&(G^=255),G}_addPixels(P,Z){let q=this.codingLine,X=this.codingPos;P>q[X]&&(P>this.columns&&(v1("row is wrong length"),this.err=!0,P=this.columns),1&X^Z&&++X,q[X]=P),this.codingPos=X}_addPixelsNeg(P,Z){let q=this.codingLine,X=this.codingPos;if(P>q[X])P>this.columns&&(v1("row is wrong length"),this.err=!0,P=this.columns),1&X^Z&&++X,q[X]=P;else if(P<q[X]){for(P<0&&(v1("invalid code"),this.err=!0,P=0);X>0&&P<q[X-1];)--X;q[X]=P}this.codingPos=X}_findTableCode(P,Z,q,X){let z=X||0;for(let R=P;R<=Z;++R){let f=this._lookBits(R);if(f===G4)return[!0,1,!1];if(R<Z&&(f<<=Z-R),!z||f>=z){let G=q[f-z];if(G[0]===R)return this._eatBits(R),[!0,G[1],!0]}}return[!1,0,!1]}_getTwoDimCode(){let P,Z=0;if(this.eoblock){if(Z=this._lookBits(7),P=zz[Z],P?.[0]>0)return this._eatBits(P[0]),P[1]}else{let q=this._findTableCode(1,7,zz);if(q[0]&&q[2])return q[1]}return v1("Bad two dim code"),G4}_getWhiteCode(){let P,Z=0;if(this.eoblock){if(Z=this._lookBits(12),Z===G4)return 1;if(P=Z>>5?fz[Z>>3]:Rz[Z],P[0]>0)return this._eatBits(P[0]),P[1]}else{let q=this._findTableCode(1,9,fz);if(q[0])return q[1];if(q=this._findTableCode(11,12,Rz),q[0])return q[1]}return v1("bad white code"),this._eatBits(1),1}_getBlackCode(){let P,Z;if(this.eoblock){if(P=this._lookBits(13),P===G4)return 1;if(Z=P>>7?!(P>>9)&&P>>7?Qz[(P>>1)-64]:Yz[P>>7]:Gz[P],Z[0]>0)return this._eatBits(Z[0]),Z[1]}else{let q=this._findTableCode(2,6,Yz);if(q[0])return q[1];if(q=this._findTableCode(7,12,Qz,64),q[0])return q[1];if(q=this._findTableCode(10,13,Gz),q[0])return q[1]}return v1("bad black code"),this._eatBits(1),1}_lookBits(P){let Z;for(;this.inputBits<P;){if((Z=this.source.next())===-1)return this.inputBits===0?G4:this.inputBuf<<P-this.inputBits&65535>>16-P;this.inputBuf=this.inputBuf<<8|Z,this.inputBits+=8}return this.inputBuf>>this.inputBits-P&65535>>16-P}_eatBits(P){(this.inputBits-=P)<0&&(this.inputBits=0)}}class lf{constructor(P,Z,q){this.data=P,this.bp=Z,this.dataEnd=q,this.chigh=P[Z],this.clow=0,this.byteIn(),this.chigh=this.chigh<<7&65535|this.clow>>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768}byteIn(){let P=this.data,Z=this.bp;P[Z]===255?P[Z+1]>143?(this.clow+=65280,this.ct=8):(Z++,this.clow+=P[Z]<<9,this.ct=7,this.bp=Z):(Z++,this.clow+=Z<this.dataEnd?P[Z]<<8:65280,this.ct=8,this.bp=Z),this.clow>65535&&(this.chigh+=this.clow>>16,this.clow&=65535)}readBit(P,Z){let q=P[Z]>>1,X=1&P[Z],z=VI[q],R=z.qe,f,G=this.a-R;if(this.chigh<R)G<R?(G=R,f=X,q=z.nmps):(G=R,f=1^X,z.switchFlag===1&&(X=f),q=z.nlps);else{if(this.chigh-=R,32768&G)return this.a=G,X;G<R?(f=1^X,z.switchFlag===1&&(X=f),q=z.nlps):(f=X,q=z.nmps)}do this.ct===0&&this.byteIn(),G<<=1,this.chigh=this.chigh<<1&65535|this.clow>>15&1,this.clow=this.clow<<1&65535,this.ct--;while(!(32768&G));return this.a=G,P[Z]=q<<1|X,f}}class of{getContexts(P){return P in this?this[P]:this[P]=new Int8Array(65536)}}class o5{constructor(P,Z,q){this.data=P,this.start=Z,this.end=q}get decoder(){return q1(this,"decoder",new lf(this.data,this.start,this.end))}get contextCache(){return q1(this,"contextCache",new of)}}function h8(P,Z,q){let X=P.getContexts(Z),z=1;function R(Y){let W=0;for(let $=0;$<Y;$++){let _=q.readBit(X,z);z=z<256?z<<1|_:511&(z<<1|_)|256,W=W<<1|_}return W>>>0}let f=R(1),G=R(1)?R(1)?R(1)?R(1)?R(1)?R(32)+4436:R(12)+340:R(8)+84:R(6)+20:R(4)+4:R(2),Q;return f===0?Q=G:G>0&&(Q=-G),Q>=-2147483648&&Q<=u9?Q:null}function af(P,Z,q){let X=P.getContexts("IAID"),z=1;for(let R=0;R<q;R++)z=z<<1|Z.readBit(X,z);return q<31?z&(1<<q)-1:2147483647&z}function b2(P,Z,q,X,z,R,f,G){if(P)return i9(new e5(G.data,G.start,G.end),Z,q,!1);if(X===0&&!z&&f.length===4&&f[0].x===3&&f[0].y===-1&&f[1].x===-3&&f[1].y===-1&&f[2].x===2&&f[2].y===-2&&f[3].x===-2&&f[3].y===-2)return function(y,N,h){let w=h.decoder,c=h.contextCache.getContexts("GB"),o=[],G1,r,Z1,z1,V1,U1,Q1;for(r=0;r<N;r++)for(V1=o[r]=new Uint8Array(y),U1=r<1?V1:o[r-1],Q1=r<2?V1:o[r-2],G1=Q1[0]<<13|Q1[1]<<12|Q1[2]<<11|U1[0]<<7|U1[1]<<6|U1[2]<<5|U1[3]<<4,Z1=0;Z1<y;Z1++)V1[Z1]=z1=w.readBit(c,G1),G1=(31735&G1)<<1|(Z1+3<y?Q1[Z1+3]<<11:0)|(Z1+4<y?U1[Z1+4]<<4:0)|z1;return o}(Z,q,G);let Q=xI[X].concat(f);Q.sort((y,N)=>y.y-N.y||y.x-N.x);let Y=Q.length,W=new Int8Array(Y),$=new Int8Array(Y),_=[],J,U,K=0,I=0,B=0,j=0;for(U=0;U<Y;U++)W[U]=Q[U].x,$[U]=Q[U].y,I=Math.min(I,Q[U].x),B=Math.max(B,Q[U].x),j=Math.min(j,Q[U].y),U<Y-1&&Q[U].y===Q[U+1].y&&Q[U].x===Q[U+1].x-1?K|=1<<Y-1-U:_.push(U);let V=_.length,H=new Int8Array(V),M=new Int8Array(V),x=new Uint16Array(V);for(J=0;J<V;J++)U=_[J],H[J]=Q[U].x,M[J]=Q[U].y,x[J]=1<<Y-1-U;let A=-I,k=-j,b=Z-B,O=HI[X],p=new Uint8Array(Z),D=[],n=G.decoder,F=G.contextCache.getContexts("GB"),l,C,L,m,d,e=0,E=0;for(let y=0;y<q;y++){if(z){if(e^=n.readBit(F,O),e){D.push(p);continue}}for(p=new Uint8Array(p),D.push(p),l=0;l<Z;l++){if(l>=A&&l<b&&y>=k)for(E=E<<1&K,U=0;U<V;U++)C=y+M[U],L=l+H[U],m=D[C][L],m&&(m=x[U],E|=m);else for(E=0,d=Y-1,U=0;U<Y;U++,d--)L=l+W[U],L>=0&&L<Z&&(C=y+$[U],C>=0&&(m=D[C][L],m&&(E|=m<<d)));let N=n.readBit(F,E);p[l]=N}}return D}function nf(P,Z,q,X,z,R,f,G,Q){let Y=_z[q].coding;q===0&&(Y=Y.concat([G[0]]));let W=Y.length,$=new Int32Array(W),_=new Int32Array(W),J;for(J=0;J<W;J++)$[J]=Y[J].x,_[J]=Y[J].y;let U=_z[q].reference;q===0&&(U=U.concat([G[1]]));let K=U.length,I=new Int32Array(K),B=new Int32Array(K);for(J=0;J<K;J++)I[J]=U[J].x,B[J]=U[J].y;let j=X[0].length,V=X.length,H=[],M=Q.decoder,x=Q.contextCache.getContexts("GR");for(let A=0;A<Z;A++){let k=new Uint8Array(P);H.push(k);for(let b=0;b<P;b++){let O,p,D=0;for(J=0;J<W;J++)O=A+_[J],p=b+$[J],O<0||p<0||p>=P?D<<=1:D=D<<1|H[O][p];for(J=0;J<K;J++)O=A+B[J]-R,p=b+I[J]-z,O<0||O>=V||p<0||p>=j?D<<=1:D=D<<1|X[O][p];let n=M.readBit(x,D);k[b]=n}}return H}function Jz(P,Z,q,X,z,R,f,G,Q,Y,W,$,_,J,U,K,I,B,j){if(P&&Z)throw new z8("refinement with Huffman is not supported");let V=[],H,M;for(H=0;H<X;H++)M=new Uint8Array(q),z&&M.fill(z),V.push(M);let{decoder:x,contextCache:A}=I,k=P?-J.tableDeltaT.decode(j):-h8(A,"IADT",x),b=0;for(H=0;H<R;){k+=P?J.tableDeltaT.decode(j):h8(A,"IADT",x),b+=P?J.tableFirstS.decode(j):h8(A,"IAFS",x);let O=b;for(;;){let p=0;f>1&&(p=P?j.readBits(B):h8(A,"IAIT",x));let D=f*k+p,n=P?J.symbolIDTable.decode(j):af(A,x,Q),F=Z&&(P?j.readBit():h8(A,"IARI",x)),l=G[n],C=l[0].length,L=l.length;if(F){let w=h8(A,"IARDW",x),c=h8(A,"IARDH",x);C+=w,L+=c,l=nf(C,L,U,l,(w>>1)+h8(A,"IARDX",x),(c>>1)+h8(A,"IARDY",x),0,K,I)}let m=0;Y?1&$?m=L-1:O+=L-1:$>1?O+=C-1:m=C-1;let d=D-(1&$?0:L-1),e=O-(2&$?C-1:0),E,y,N;if(Y)for(E=0;E<L;E++){if(M=V[e+E],!M)continue;N=l[E];let w=Math.min(q-d,C);switch(_){case 0:for(y=0;y<w;y++)M[d+y]|=N[y];break;case 2:for(y=0;y<w;y++)M[d+y]^=N[y];break;default:throw new z8(`operator ${_} is not supported`)}}else for(y=0;y<L;y++)if(M=V[d+y],M)switch(N=l[y],_){case 0:for(E=0;E<C;E++)M[e+E]|=N[E];break;case 2:for(E=0;E<C;E++)M[e+E]^=N[E];break;default:throw new z8(`operator ${_} is not supported`)}H++;let h=P?J.tableDeltaS.decode(j):h8(A,"IADS",x);if(h===null)break;O+=m+h+W}}return V}function MI(P,Z){let q={};q.number=n1(P,Z);let X=P[Z+4],z=63&X;if(!$z[z])throw new z8("invalid segment type: "+z);q.type=z,q.typeName=$z[z],q.deferredNonRetain=!!(128&X);let R=!!(64&X),f=P[Z+5],G=f>>5&7,Q=[31&f],Y=Z+6;if(f===7){G=536870911&n1(P,Y-1),Y+=3;let U=G+7>>3;for(Q[0]=P[Y++];--U>0;)Q.push(P[Y++])}else if(f===5||f===6)throw new z8("invalid referred-to flags");q.retainBits=Q;let W=4;q.number<=256?W=1:q.number<=65536&&(W=2);let $=[],_,J;for(_=0;_<G;_++){let U;U=W===1?P[Y]:W===2?S1(P,Y):n1(P,Y),$.push(U),Y+=W}if(q.referredTo=$,R?(q.pageAssociation=n1(P,Y),Y+=4):q.pageAssociation=P[Y++],q.length=n1(P,Y),Y+=4,q.length===4294967295){if(z!==38)throw new z8("invalid unknown segment length");{let U=c2(P,Y),K=!!(1&P[Y+s2]),B=new Uint8Array(6);for(K||(B[0]=255,B[1]=172),B[2]=U.height>>>24&255,B[3]=U.height>>16&255,B[4]=U.height>>8&255,B[5]=255&U.height,_=Y,J=P.length;_<J;_++){let j=0;for(;j<6&&B[j]===P[_+j];)j++;if(j===6){q.length=_+6;break}}if(q.length===4294967295)throw new z8("segment end was not found")}}return q.headerEnd=Y,q}function AI(P,Z,q,X){let z=[],R=q;for(;R<X;){let f=MI(Z,R);R=f.headerEnd;let G={header:f,data:Z};if(P.randomAccess||(G.start=R,R+=f.length,G.end=R),z.push(G),f.type===51)break}if(P.randomAccess)for(let f=0,G=z.length;f<G;f++)z[f].start=R,R+=z[f].header.length,z[f].end=R;return z}function c2(P,Z){return{width:n1(P,Z),height:n1(P,Z+4),x:n1(P,Z+8),y:n1(P,Z+12),combinationOperator:7&P[Z+16]}}function LI(P,Z){let{header:q,data:X,end:z}=P,R,f,G,Q,Y=P.start;switch(q.type){case 0:let $={},_=S1(X,Y);if($.huffman=!!(1&_),$.refinement=!!(2&_),$.huffmanDHSelector=_>>2&3,$.huffmanDWSelector=_>>4&3,$.bitmapSizeSelector=_>>6&1,$.aggregationInstancesSelector=_>>7&1,$.bitmapCodingContextUsed=!!(256&_),$.bitmapCodingContextRetained=!!(512&_),$.template=_>>10&3,$.refinementTemplate=_>>12&1,Y+=2,!$.huffman){for(Q=$.template===0?4:1,f=[],G=0;G<Q;G++)f.push({x:h0(X,Y),y:h0(X,Y+1)}),Y+=2;$.at=f}if($.refinement&&!$.refinementTemplate){for(f=[],G=0;G<2;G++)f.push({x:h0(X,Y),y:h0(X,Y+1)}),Y+=2;$.refinementAt=f}$.numberOfExportedSymbols=n1(X,Y),Y+=4,$.numberOfNewSymbols=n1(X,Y),Y+=4,R=[$,q.number,q.referredTo,X,Y,z];break;case 6:case 7:let J={};J.info=c2(X,Y),Y+=s2;let U=S1(X,Y);if(Y+=2,J.huffman=!!(1&U),J.refinement=!!(2&U),J.logStripSize=U>>2&3,J.stripSize=1<<J.logStripSize,J.referenceCorner=U>>4&3,J.transposed=!!(64&U),J.combinationOperator=U>>7&3,J.defaultPixelValue=U>>9&1,J.dsOffset=U<<17>>27,J.refinementTemplate=U>>15&1,J.huffman){let A=S1(X,Y);Y+=2,J.huffmanFS=3&A,J.huffmanDS=A>>2&3,J.huffmanDT=A>>4&3,J.huffmanRefinementDW=A>>6&3,J.huffmanRefinementDH=A>>8&3,J.huffmanRefinementDX=A>>10&3,J.huffmanRefinementDY=A>>12&3,J.huffmanRefinementSizeSelector=!!(16384&A)}if(J.refinement&&!J.refinementTemplate){for(f=[],G=0;G<2;G++)f.push({x:h0(X,Y),y:h0(X,Y+1)}),Y+=2;J.refinementAt=f}J.numberOfSymbolInstances=n1(X,Y),Y+=4,R=[J,q.referredTo,X,Y,z];break;case 16:let K={},I=X[Y++];K.mmr=!!(1&I),K.template=I>>1&3,K.patternWidth=X[Y++],K.patternHeight=X[Y++],K.maxPatternIndex=n1(X,Y),Y+=4,R=[K,q.number,X,Y,z];break;case 22:case 23:let B={};B.info=c2(X,Y),Y+=s2;let j=X[Y++];B.mmr=!!(1&j),B.template=j>>1&3,B.enableSkip=!!(8&j),B.combinationOperator=j>>4&7,B.defaultPixelValue=j>>7&1,B.gridWidth=n1(X,Y),Y+=4,B.gridHeight=n1(X,Y),Y+=4,B.gridOffsetX=4294967295&n1(X,Y),Y+=4,B.gridOffsetY=4294967295&n1(X,Y),Y+=4,B.gridVectorX=S1(X,Y),Y+=2,B.gridVectorY=S1(X,Y),Y+=2,R=[B,q.referredTo,X,Y,z];break;case 38:case 39:let V={};V.info=c2(X,Y),Y+=s2;let H=X[Y++];if(V.mmr=!!(1&H),V.template=H>>1&3,V.prediction=!!(8&H),!V.mmr){for(Q=V.template===0?4:1,f=[],G=0;G<Q;G++)f.push({x:h0(X,Y),y:h0(X,Y+1)}),Y+=2;V.at=f}R=[V,X,Y,z];break;case 48:let M={width:n1(X,Y),height:n1(X,Y+4),resolutionX:n1(X,Y+8),resolutionY:n1(X,Y+12)};M.height===4294967295&&delete M.height;let x=X[Y+16];S1(X,Y+17),M.lossless=!!(1&x),M.refinement=!!(2&x),M.defaultPixelValue=x>>2&1,M.combinationOperator=x>>3&3,M.requiresBuffer=!!(32&x),M.combinationOperatorOverride=!!(64&x),R=[M];break;case 49:case 50:case 51:case 62:break;case 53:R=[q.number,X,Y,z];break;default:throw new z8(`segment type ${q.typeName}(${q.type}) is not implemented`)}let W="on"+q.typeName;W in Z&&Z[W].apply(Z,R)}function bI(P,Z){for(let q=0,X=P.length;q<X;q++)LI(P[q],Z)}class tf{onPageInformation(P){this.currentPageInfo=P;let Z=P.width+7>>3,q=new Uint8ClampedArray(Z*P.height);P.defaultPixelValue&&q.fill(255),this.buffer=q}drawBitmap(P,Z){let q=this.currentPageInfo,X=P.width,z=P.height,R=q.width+7>>3,f=q.combinationOperatorOverride?P.combinationOperator:q.combinationOperator,G=this.buffer,Q=128>>(7&P.x),Y,W,$,_,J=P.y*R+(P.x>>3);switch(f){case 0:for(Y=0;Y<z;Y++){for($=Q,_=J,W=0;W<X;W++)Z[Y][W]&&(G[_]|=$),$>>=1,$||($=128,_++);J+=R}break;case 2:for(Y=0;Y<z;Y++){for($=Q,_=J,W=0;W<X;W++)Z[Y][W]&&(G[_]^=$),$>>=1,$||($=128,_++);J+=R}break;default:throw new z8(`operator ${f} is not supported`)}}onImmediateGenericRegion(P,Z,q,X){let z=P.info,R=new o5(Z,q,X),f=b2(P.mmr,z.width,z.height,P.template,P.prediction,0,P.at,R);this.drawBitmap(z,f)}onImmediateLosslessGenericRegion(){this.onImmediateGenericRegion(...arguments)}onSymbolDictionary(P,Z,q,X,z,R){let f,G;P.huffman&&(f=function($,_,J){let U,K,I,B,j=0;switch($.huffmanDHSelector){case 0:case 1:U=N4($.huffmanDHSelector+4);break;case 3:U=X5(j,_,J),j++;break;default:throw new z8("invalid Huffman DH selector")}switch($.huffmanDWSelector){case 0:case 1:K=N4($.huffmanDWSelector+2);break;case 3:K=X5(j,_,J),j++;break;default:throw new z8("invalid Huffman DW selector")}return $.bitmapSizeSelector?(I=X5(j,_,J),j++):I=N4(1),B=$.aggregationInstancesSelector?X5(j,_,J):N4(1),{tableDeltaHeight:U,tableDeltaWidth:K,tableBitmapSize:I,tableAggregateInstances:B}}(P,q,this.customTables),G=new e5(X,z,R));let Q=this.symbols;Q||(this.symbols=Q={});let Y=[];for(let $ of q){let _=Q[$];_&&Y.push(..._)}let W=new o5(X,z,R);Q[Z]=function($,_,J,U,K,I,B,j,V,H,M,x){if($&&_)throw new z8("symbol refinement with Huffman is not supported");let A=[],k=0,b=sP(J.length+U),O=M.decoder,p=M.contextCache,D,n;for($&&(D=N4(1),n=[],b=Math.max(b,1));A.length<U;){k+=$?I.tableDeltaHeight.decode(x):h8(p,"IADH",O);let e=0,E=0,y=$?n.length:0;for(;;){let N=$?I.tableDeltaWidth.decode(x):h8(p,"IADW",O);if(N===null)break;let h;if(e+=N,E+=e,_){let w=h8(p,"IAAI",O);if(w>1)h=Jz($,_,e,k,0,w,1,J.concat(A),b,0,0,1,0,I,V,H,M,0,x);else{let c=af(p,O,b),o=h8(p,"IARDX",O),G1=h8(p,"IARDY",O);h=nf(e,k,V,c<J.length?J[c]:A[c-J.length],o,G1,0,H,M)}A.push(h)}else $?n.push(e):(h=b2(!1,e,k,B,!1,0,j,M),A.push(h))}if($&&!_){let N=I.tableBitmapSize.decode(x),h;if(x.byteAlign(),N===0)h=kI(x,E,k);else{let c=x.end,o=x.position+N;x.end=o,h=i9(x,E,k,!1),x.end=c,x.position=o}let w=n.length;if(y===w-1)A.push(h);else{let c,o,G1,r,Z1,z1=0;for(c=y;c<w;c++){for(r=n[c],G1=z1+r,Z1=[],o=0;o<k;o++)Z1.push(h[o].subarray(z1,G1));A.push(Z1),z1=G1}}}}let F=[],l=[],C,L,m=!1,d=J.length+U;for(;l.length<d;){let e=$?D.decode(x):h8(p,"IAEX",O);for(;e--;)l.push(m);m=!m}for(C=0,L=J.length;C<L;C++)l[C]&&F.push(J[C]);for(let e=0;e<U;C++,e++)l[C]&&F.push(A[e]);return F}(P.huffman,P.refinement,Y,P.numberOfNewSymbols,P.numberOfExportedSymbols,f,P.template,P.at,P.refinementTemplate,P.refinementAt,W,G)}onImmediateTextRegion(P,Z,q,X,z){let R=P.info,f,G,Q=this.symbols,Y=[];for(let J of Z){let U=Q[J];U&&Y.push(...U)}let W=sP(Y.length);P.huffman&&(G=new e5(q,X,z),f=function(J,U,K,I,B){let j=[];for(let b=0;b<=34;b++){let O=B.readBits(4);j.push(new _4([b,O,0,0]))}let V=new _7(j,!1);j.length=0;for(let b=0;b<I;){let O=V.decode(B);if(O>=32){let p,D,n;switch(O){case 32:if(b===0)throw new z8("no previous value in symbol ID table");D=B.readBits(2)+3,p=j[b-1].prefixLength;break;case 33:D=B.readBits(3)+3,p=0;break;case 34:D=B.readBits(7)+11,p=0;break;default:throw new z8("invalid code length in symbol ID table")}for(n=0;n<D;n++)j.push(new _4([b,p,0,0])),b++}else j.push(new _4([b,O,0,0])),b++}B.byteAlign();let H=new _7(j,!1),M,x,A,k=0;switch(J.huffmanFS){case 0:case 1:M=N4(J.huffmanFS+6);break;case 3:M=X5(k,U,K),k++;break;default:throw new z8("invalid Huffman FS selector")}switch(J.huffmanDS){case 0:case 1:case 2:x=N4(J.huffmanDS+8);break;case 3:x=X5(k,U,K),k++;break;default:throw new z8("invalid Huffman DS selector")}switch(J.huffmanDT){case 0:case 1:case 2:A=N4(J.huffmanDT+11);break;case 3:A=X5(k,U,K),k++;break;default:throw new z8("invalid Huffman DT selector")}if(J.refinement)throw new z8("refinement with Huffman is not supported");return{symbolIDTable:H,tableFirstS:M,tableDeltaS:x,tableDeltaT:A}}(P,Z,this.customTables,Y.length,G));let $=new o5(q,X,z),_=Jz(P.huffman,P.refinement,R.width,R.height,P.defaultPixelValue,P.numberOfSymbolInstances,P.stripSize,Y,W,P.transposed,P.dsOffset,P.referenceCorner,P.combinationOperator,f,P.refinementTemplate,P.refinementAt,$,P.logStripSize,G);this.drawBitmap(R,_)}onImmediateLosslessTextRegion(){this.onImmediateTextRegion(...arguments)}onPatternDictionary(P,Z,q,X,z){let R=this.patterns;R||(this.patterns=R={});let f=new o5(q,X,z);R[Z]=function(G,Q,Y,W,$,_){let J=[];G||(J.push({x:-Q,y:0}),$===0&&J.push({x:-3,y:-1},{x:2,y:-2},{x:-2,y:-2}));let U=b2(G,(W+1)*Q,Y,$,!1,0,J,_),K=[];for(let I=0;I<=W;I++){let B=[],j=Q*I,V=j+Q;for(let H=0;H<Y;H++)B.push(U[H].subarray(j,V));K.push(B)}return K}(P.mmr,P.patternWidth,P.patternHeight,P.maxPatternIndex,P.template,f)}onImmediateHalftoneRegion(P,Z,q,X,z){let R=this.patterns[Z[0]],f=P.info,G=new o5(q,X,z),Q=function(Y,W,$,_,J,U,K,I,B,j,V,H,M,x,A){if(K)throw new z8("skip is not supported");if(I!==0)throw new z8(`operator "${I}" is not supported in halftone region`);let k=[],b,O,p;for(b=0;b<J;b++)p=new Uint8Array(_),U&&p.fill(U),k.push(p);let D=W.length,n=W[0],F=n[0].length,l=n.length,C=sP(D),L=[];Y||(L.push({x:$<=1?3:2,y:-1}),$===0&&L.push({x:-3,y:-1},{x:2,y:-2},{x:-2,y:-2}));let m=[],d,e,E,y,N,h,w,c,o,G1,r;for(Y&&(d=new e5(A.data,A.start,A.end)),b=C-1;b>=0;b--)e=Y?i9(d,B,j,!0):b2(!1,B,j,$,!1,0,L,A),m[b]=e;for(E=0;E<j;E++)for(y=0;y<B;y++){for(N=0,h=0,O=C-1;O>=0;O--)N^=m[O][E][y],h|=N<<O;if(w=W[h],c=V+E*x+y*M>>8,o=H+E*M-y*x>>8,c>=0&&c+F<=_&&o>=0&&o+l<=J)for(b=0;b<l;b++)for(r=k[o+b],G1=w[b],O=0;O<F;O++)r[c+O]|=G1[O];else{let Z1,z1;for(b=0;b<l;b++)if(z1=o+b,!(z1<0||z1>=J))for(r=k[z1],G1=w[b],O=0;O<F;O++)Z1=c+O,Z1>=0&&Z1<_&&(r[Z1]|=G1[O])}}return k}(P.mmr,R,P.template,f.width,f.height,P.defaultPixelValue,P.enableSkip,P.combinationOperator,P.gridWidth,P.gridHeight,P.gridOffsetX,P.gridOffsetY,P.gridVectorX,P.gridVectorY,G);this.drawBitmap(f,Q)}onImmediateLosslessHalftoneRegion(){this.onImmediateHalftoneRegion(...arguments)}onTables(P,Z,q,X){let z=this.customTables;z||(this.customTables=z={}),z[P]=function(R,f,G){let Q=R[f],Y=4294967295&n1(R,f+1),W=4294967295&n1(R,f+5),$=new e5(R,f+9,G),_=1+(Q>>1&7),J=1+(Q>>4&7),U=[],K,I,B=Y;do K=$.readBits(_),I=$.readBits(J),U.push(new _4([B,K,I,0])),B+=1<<I;while(B<W);return K=$.readBits(_),U.push(new _4([Y-1,K,32,0,"lower"])),K=$.readBits(_),U.push(new _4([W,K,32,0])),1&Q&&(K=$.readBits(_),U.push(new _4([K,0]))),new _7(U,!1)}(Z,q,X)}}class _4{constructor(P){P.length===2?(this.isOOB=!0,this.rangeLow=0,this.prefixLength=P[0],this.rangeLength=0,this.prefixCode=P[1],this.isLowerRange=!1):(this.isOOB=!1,this.rangeLow=P[0],this.prefixLength=P[1],this.rangeLength=P[2],this.prefixCode=P[3],this.isLowerRange=P[4]==="lower")}}class b3{constructor(P){this.children=[],P?(this.isLeaf=!0,this.rangeLength=P.rangeLength,this.rangeLow=P.rangeLow,this.isLowerRange=P.isLowerRange,this.isOOB=P.isOOB):this.isLeaf=!1}buildTree(P,Z){let q=P.prefixCode>>Z&1;if(Z<=0)this.children[q]=new b3(P);else{let X=this.children[q];X||(this.children[q]=X=new b3(null)),X.buildTree(P,Z-1)}}decodeNode(P){if(this.isLeaf){if(this.isOOB)return null;let q=P.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-q:q)}let Z=this.children[P.readBit()];if(!Z)throw new z8("invalid Huffman data");return Z.decodeNode(P)}}class _7{constructor(P,Z){Z||this.assignPrefixCodes(P),this.rootNode=new b3(null);for(let q=0,X=P.length;q<X;q++){let z=P[q];z.prefixLength>0&&this.rootNode.buildTree(z,z.prefixLength-1)}}decode(P){return this.rootNode.decodeNode(P)}assignPrefixCodes(P){let Z=P.length,q=0;for(let Y=0;Y<Z;Y++)q=Math.max(q,P[Y].prefixLength);let X=new Uint32Array(q+1);for(let Y=0;Y<Z;Y++)X[P[Y].prefixLength]++;let z,R,f,G=1,Q=0;for(X[0]=0;G<=q;){for(Q=Q+X[G-1]<<1,z=Q,R=0;R<Z;)f=P[R],f.prefixLength===G&&(f.prefixCode=z,z++),R++;G++}}}function N4(P){let Z,q=Uz[P];if(q)return q;switch(P){case 1:Z=[[0,1,4,0],[16,2,8,2],[272,3,16,6],[65808,3,32,7]];break;case 2:Z=[[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[75,6,32,62],[6,63]];break;case 3:Z=[[-256,8,8,254],[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[-257,8,32,255,"lower"],[75,7,32,126],[6,62]];break;case 4:Z=[[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[76,5,32,31]];break;case 5:Z=[[-255,7,8,126],[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[-256,7,32,127,"lower"],[76,6,32,62]];break;case 6:Z=[[-2048,5,10,28],[-1024,4,9,8],[-512,4,8,9],[-256,4,7,10],[-128,5,6,29],[-64,5,5,30],[-32,4,5,11],[0,2,7,0],[128,3,7,2],[256,3,8,3],[512,4,9,12],[1024,4,10,13],[-2049,6,32,62,"lower"],[2048,6,32,63]];break;case 7:Z=[[-1024,4,9,8],[-512,3,8,0],[-256,4,7,9],[-128,5,6,26],[-64,5,5,27],[-32,4,5,10],[0,4,5,11],[32,5,5,28],[64,5,6,29],[128,4,7,12],[256,3,8,1],[512,3,9,2],[1024,3,10,3],[-1025,5,32,30,"lower"],[2048,5,32,31]];break;case 8:Z=[[-15,8,3,252],[-7,9,1,508],[-5,8,1,253],[-3,9,0,509],[-2,7,0,124],[-1,4,0,10],[0,2,1,0],[2,5,0,26],[3,6,0,58],[4,3,4,4],[20,6,1,59],[22,4,4,11],[38,4,5,12],[70,5,6,27],[134,5,7,28],[262,6,7,60],[390,7,8,125],[646,6,10,61],[-16,9,32,510,"lower"],[1670,9,32,511],[2,1]];break;case 9:Z=[[-31,8,4,252],[-15,9,2,508],[-11,8,2,253],[-7,9,1,509],[-5,7,1,124],[-3,4,1,10],[-1,3,1,2],[1,3,1,3],[3,5,1,26],[5,6,1,58],[7,3,5,4],[39,6,2,59],[43,4,5,11],[75,4,6,12],[139,5,7,27],[267,5,8,28],[523,6,8,60],[779,7,9,125],[1291,6,11,61],[-32,9,32,510,"lower"],[3339,9,32,511],[2,0]];break;case 10:Z=[[-21,7,4,122],[-5,8,0,252],[-4,7,0,123],[-3,5,0,24],[-2,2,2,0],[2,5,0,25],[3,6,0,54],[4,7,0,124],[5,8,0,253],[6,2,6,1],[70,5,5,26],[102,6,5,55],[134,6,6,56],[198,6,7,57],[326,6,8,58],[582,6,9,59],[1094,6,10,60],[2118,7,11,125],[-22,8,32,254,"lower"],[4166,8,32,255],[2,2]];break;case 11:Z=[[1,1,0,0],[2,2,1,2],[4,4,0,12],[5,4,1,13],[7,5,1,28],[9,5,2,29],[13,6,2,60],[17,7,2,122],[21,7,3,123],[29,7,4,124],[45,7,5,125],[77,7,6,126],[141,7,32,127]];break;case 12:Z=[[1,1,0,0],[2,2,0,2],[3,3,1,6],[5,5,0,28],[6,5,1,29],[8,6,1,60],[10,7,0,122],[11,7,1,123],[13,7,2,124],[17,7,3,125],[25,7,4,126],[41,8,5,254],[73,8,32,255]];break;case 13:Z=[[1,1,0,0],[2,3,0,4],[3,4,0,12],[4,5,0,28],[5,4,1,13],[7,3,3,5],[15,6,1,58],[17,6,2,59],[21,6,3,60],[29,6,4,61],[45,6,5,62],[77,7,6,126],[141,7,32,127]];break;case 14:Z=[[-2,3,0,4],[-1,3,0,5],[0,1,0,0],[1,3,0,6],[2,3,0,7]];break;case 15:Z=[[-24,7,4,124],[-8,6,2,60],[-4,5,1,28],[-2,4,0,12],[-1,3,0,4],[0,1,0,0],[1,3,0,5],[2,4,0,13],[3,5,1,29],[5,6,2,61],[9,7,4,125],[-25,7,32,126,"lower"],[25,7,32,127]];break;default:throw new z8(`standard table B.${P} does not exist`)}for(let X=0,z=Z.length;X<z;X++)Z[X]=new _4(Z[X]);return q=new _7(Z,!0),Uz[P]=q,q}class e5{constructor(P,Z,q){this.data=P,this.start=Z,this.end=q,this.position=Z,this.shift=-1,this.currentByte=0}readBit(){if(this.shift<0){if(this.position>=this.end)throw new z8("end of data while reading bit");this.currentByte=this.data[this.position++],this.shift=7}let P=this.currentByte>>this.shift&1;return this.shift--,P}readBits(P){let Z,q=0;for(Z=P-1;Z>=0;Z--)q|=this.readBit()<<Z;return q}byteAlign(){this.shift=-1}next(){return this.position>=this.end?-1:this.data[this.position++]}}function X5(P,Z,q){let X=0;for(let z=0,R=Z.length;z<R;z++){let f=q[Z[z]];if(f){if(P===X)return f;X++}}throw new z8("can't find custom Huffman table")}function kI(P,Z,q){let X=[];for(let z=0;z<q;z++){let R=new Uint8Array(Z);X.push(R);for(let f=0;f<Z;f++)R[f]=P.readBit();P.byteAlign()}return X}function i9(P,Z,q,X){let z=new fq(P,{K:-1,Columns:Z,Rows:q,BlackIs1:!0,EndOfBlock:X}),R=[],f,G=!1;for(let Q=0;Q<q;Q++){let Y=new Uint8Array(Z);R.push(Y);let W=-1;for(let $=0;$<Z;$++)W<0&&(f=z.readNextChar(),f===-1&&(f=0,G=!0),W=7),Y[$]=f>>W&1,W--}if(X&&!G)for(let Y=0;Y<5&&z.readNextChar()!==-1;Y++);return R}class ef{parseChunks(P){return function(Z){let q=new tf;for(let X=0,z=Z.length;X<z;X++){let R=Z[X];bI(AI({},R.data,R.start,R.end),q)}return q.buffer}(P)}parse(P){throw Error("Not implemented: Jbig2Image.parse")}}class U4{constructor({lexer:P,xref:Z,allowStreams:q=!1,recoveryMode:X=!1}){this.lexer=P,this.xref=Z,this.allowStreams=q,this.recoveryMode=X,this.imageCache=Object.create(null),this._imageId=0,this.refill()}refill(){this.buf1=this.lexer.getObj(),this.buf2=this.lexer.getObj()}shift(){this.buf2 instanceof H8&&this.buf2.cmd==="ID"?(this.buf1=this.buf2,this.buf2=null):(this.buf1=this.buf2,this.buf2=this.lexer.getObj())}tryShift(){try{return this.shift(),!0}catch(P){if(P instanceof q8)throw P;return!1}}getObj(P=null){let Z=this.buf1;if(this.shift(),Z instanceof H8)switch(Z.cmd){case"BI":return this.makeInlineImage(P);case"[":let q=[];for(;!b8(this.buf1,"]")&&this.buf1!==F8;)q.push(this.getObj(P));if(this.buf1===F8){if(this.recoveryMode)return q;throw new x3("End of file inside array.")}return this.shift(),q;case"<<":let X=new S(this.xref);for(;!b8(this.buf1,">>")&&this.buf1!==F8;){if(!(this.buf1 instanceof t)){v1("Malformed dictionary: key must be a name object"),this.shift();continue}let z=this.buf1.name;if(this.shift(),this.buf1===F8)break;X.set(z,this.getObj(P))}if(this.buf1===F8){if(this.recoveryMode)return X;throw new x3("End of file inside dictionary.")}return b8(this.buf2,"stream")?this.allowStreams?this.makeStream(X,P):X:(this.shift(),X);default:return Z}if(Number.isInteger(Z)){if(Number.isInteger(this.buf1)&&b8(this.buf2,"R")){let q=f1.get(Z,this.buf1);return this.shift(),this.shift(),q}return Z}return typeof Z=="string"&&P?P.decryptString(Z):Z}findDefaultInlineStreamEnd(P){let{knownCommands:Z}=this.lexer,q=P.pos,X,z,R=0;for(;(X=P.getByte())!==-1;)if(R===0)R=X===69?1:0;else if(R===1)R=X===73?2:0;else if(X===32||X===10||X===13){z=P.pos;let G=P.peekBytes(15),Q=G.length;if(Q===0)break;for(let $=0;$<Q;$++)if(X=G[$],(X!==0||G[$+1]===0)&&X!==10&&X!==13&&(X<32||X>127)){R=0;break}if(R!==2)continue;if(!Z){v("findDefaultInlineStreamEnd - `lexer.knownCommands` is undefined.");continue}let Y=new T0(new Y8(P.peekBytes(75)),Z);Y._hexStringWarn=()=>{};let W=0;for(;;){let $=Y.getObj();if($===F8){R=0;break}if($ instanceof H8){let _=Z[$.cmd];if(!_){R=0;break}if(_.variableArgs?W<=_.numArgs:W===_.numArgs)break;W=0;continue}W++}if(R===2)break}else R=0;X===-1&&(v("findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker"),z&&(v('... trying to recover by using the last "EI" occurrence.'),P.skip(-(P.pos-z))));let f=4;return P.skip(-f),X=P.peekByte(),P.skip(f),M0(X)||f--,P.pos-f-q}findDCTDecodeInlineStreamEnd(P){let Z=P.pos,q,X,z=!1;for(;(q=P.getByte())!==-1;)if(q===255){switch(P.getByte()){case 0:break;case 255:P.skip(-1);break;case 217:z=!0;break;case 192:case 193:case 194:case 195:case 197:case 198:case 199:case 201:case 202:case 203:case 205:case 206:case 207:case 196:case 204:case 218:case 219:case 220:case 221:case 222:case 223:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:X=P.getUint16(),X>2?P.skip(X-2):P.skip(-2)}if(z)break}let R=P.pos-Z;return q===-1?(v("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead."),P.skip(-R),this.findDefaultInlineStreamEnd(P)):(this.inlineStreamSkipEI(P),R)}findASCII85DecodeInlineStreamEnd(P){let Z=P.pos,q;for(;(q=P.getByte())!==-1;)if(q===126){let z=P.pos;for(q=P.peekByte();M0(q);)P.skip(),q=P.peekByte();if(q===62){P.skip();break}if(P.pos>z){let R=P.peekBytes(2);if(R[0]===69&&R[1]===73)break}}let X=P.pos-Z;return q===-1?(v("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead."),P.skip(-X),this.findDefaultInlineStreamEnd(P)):(this.inlineStreamSkipEI(P),X)}findASCIIHexDecodeInlineStreamEnd(P){let Z=P.pos,q;for(;(q=P.getByte())!==-1&&q!==62;);let X=P.pos-Z;return q===-1?(v("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead."),P.skip(-X),this.findDefaultInlineStreamEnd(P)):(this.inlineStreamSkipEI(P),X)}inlineStreamSkipEI(P){let Z,q=0;for(;(Z=P.getByte())!==-1;)if(q===0)q=Z===69?1:0;else if(q===1)q=Z===73?2:0;else if(q===2)break}makeInlineImage(P){let Z=this.lexer,q=Z.stream,X=Object.create(null),z;for(;!b8(this.buf1,"ID")&&this.buf1!==F8;){if(!(this.buf1 instanceof t))throw new s("Dictionary key must be a name object");let _=this.buf1.name;if(this.shift(),this.buf1===F8)break;X[_]=this.getObj(P)}Z.beginInlineImagePos!==-1&&(z=q.pos-Z.beginInlineImagePos);let R=this.xref.fetchIfRef(X.F||X.Filter),f;if(R instanceof t)f=R.name;else if(Array.isArray(R)){let _=this.xref.fetchIfRef(R[0]);_ instanceof t&&(f=_.name)}let G=q.pos,Q,Y;switch(f){case"DCT":case"DCTDecode":Q=this.findDCTDecodeInlineStreamEnd(q);break;case"A85":case"ASCII85Decode":Q=this.findASCII85DecodeInlineStreamEnd(q);break;case"AHx":case"ASCIIHexDecode":Q=this.findASCIIHexDecodeInlineStreamEnd(q);break;default:Q=this.findDefaultInlineStreamEnd(q)}if(Q<1000&&z>0){let _=q.pos;q.pos=Z.beginInlineImagePos,Y=function(U){let K=[],I=U.length,B=0;for(;B<I-1;)K.push(U[B++]<<8|U[B++]);return B<I&&K.push(U[B]),I+"_"+String.fromCharCode.apply(null,K)}(q.getBytes(z+Q)),q.pos=_;let J=this.imageCache[Y];if(J!==void 0)return this.buf2=H8.get("EI"),this.shift(),J.reset(),J}let W=new S(this.xref);for(let _ in X)W.set(_,X[_]);let $=q.makeSubStream(G,Q,W);return P&&($=P.createStream($,Q)),$=this.filter($,W,Q),$.dict=W,Y!==void 0&&($.cacheKey="inline_img_"+ ++this._imageId,this.imageCache[Y]=$),this.buf2=H8.get("EI"),this.shift(),$}#P(P){let{stream:Z}=this.lexer;Z.pos=P;let q=new Uint8Array([101,110,100]),X=q.length,z=[new Uint8Array([115,116,114,101,97,109]),new Uint8Array([115,116,101,97,109]),new Uint8Array([115,116,114,101,97])],R=9-X;for(;Z.pos<Z.end;){let f=Z.peekBytes(2048),G=f.length-9;if(G<=0)break;let Q=0;for(;Q<G;){let Y=0;for(;Y<X&&f[Q+Y]===q[Y];)Y++;if(Y>=X){let W=!1;for(let $ of z){let _=$.length,J=0;for(;J<_&&f[Q+Y+J]===$[J];)J++;if(J>=R){W=!0;break}if(J>=_){M0(f[Q+Y+J])&&(v1(`Found "${W0([...q,...$])}" when searching for endstream command.`),W=!0);break}}if(W)return Z.pos+=Q,Z.pos-P}Q++}Z.pos+=G}return-1}makeStream(P,Z){let q=this.lexer,X=q.stream;q.skipToNextLine();let z=X.pos-1,R=P.get("Length");if(Number.isInteger(R)||(v1(`Bad length "${R&&R.toString()}" in stream.`),R=0),X.pos=z+R,q.nextChar(),this.tryShift()&&b8(this.buf2,"endstream"))this.shift();else{if(R=this.#P(z),R<0)throw new s("Missing endstream command.");q.nextChar(),this.shift(),this.shift()}return this.shift(),X=X.makeSubStream(z,R,P),Z&&(X=Z.createStream(X,R)),X=this.filter(X,P,R),X.dict=P,X}filter(P,Z,q){let X=Z.get("F","Filter"),z=Z.get("DP","DecodeParms");if(X instanceof t)return Array.isArray(z)&&v("/DecodeParms should not be an Array, when /Filter is a Name."),this.makeFilter(P,X.name,q,z);let R=q;if(Array.isArray(X)){let f=X,G=z;for(let Q=0,Y=f.length;Q<Y;++Q){if(X=this.xref.fetchIfRef(f[Q]),!(X instanceof t))throw new s(`Bad filter name "${X}"`);z=null,Array.isArray(G)&&Q in G&&(z=this.xref.fetchIfRef(G[Q])),P=this.makeFilter(P,X.name,R,z),R=null}}return P}makeFilter(P,Z,q,X){if(q===0)return v(`Empty "${Z}" stream.`),new A3;try{switch(Z){case"Fl":case"FlateDecode":return X?new e9(new n9(P,q),q,X):new n9(P,q);case"LZW":case"LZWDecode":let z=1;return X?(X.has("EarlyChange")&&(z=X.get("EarlyChange")),new e9(new t9(P,q,z),q,X)):new t9(P,q,z);case"DCT":case"DCTDecode":return new v6(P,q,X);case"JPX":case"JPXDecode":return new ZG(P,q,X);case"A85":case"ASCII85Decode":return new sf(P,q);case"AHx":case"ASCIIHexDecode":return new hf(P,q);case"CCF":case"CCITTFaxDecode":return new rf(P,q,X);case"RL":case"RunLengthDecode":return new qG(P,q);case"JBIG2Decode":return new PG(P,q,X)}return v(`Filter "${Z}" is not supported.`),P}catch(z){if(z instanceof q8)throw z;return v(`Invalid stream: "${z}"`),new A3}}}function rP(P){return P>=48&&P<=57?15&P:P>=65&&P<=70||P>=97&&P<=102?9+(15&P):-1}class T0{constructor(P,Z=null){this.stream=P,this.nextChar(),this.strBuf=[],this.knownCommands=Z,this._hexStringNumWarn=0,this.beginInlineImagePos=-1}nextChar(){return this.currentChar=this.stream.getByte()}peekChar(){return this.stream.peekByte()}getNumber(){let P=this.currentChar,Z=!1,q=0,X=1;if(P===45?(X=-1,P=this.nextChar(),P===45&&(P=this.nextChar())):P===43&&(P=this.nextChar()),P===10||P===13)do P=this.nextChar();while(P===10||P===13);if(P===46&&(q=10,P=this.nextChar()),P<48||P>57){let G=`Invalid number: ${String.fromCharCode(P)} (charCode ${P})`;if(M0(P)||P===40||P===60||P===-1)return v1(`Lexer.getNumber - "${G}".`),0;throw new s(G)}let z=P-48,R=0,f=1;for(;(P=this.nextChar())>=0;)if(P>=48&&P<=57){let G=P-48;Z?R=10*R+G:(q!==0&&(q*=10),z=10*z+G)}else if(P===46){if(q!==0)break;q=1}else if(P===45)v("Badly formatted number: minus sign in the middle");else{if(P!==69&&P!==101)break;if(P=this.peekChar(),P===43||P===45)f=P===45?-1:1,this.nextChar();else if(P<48||P>57)break;Z=!0}return q!==0&&(z/=q),Z&&(z*=10**(f*R)),X*z}getString(){let P=1,Z=!1,q=this.strBuf;q.length=0;let X=this.nextChar();for(;;){let z=!1;switch(0|X){case-1:v("Unterminated string"),Z=!0;break;case 40:++P,q.push("(");break;case 41:--P===0?(this.nextChar(),Z=!0):q.push(")");break;case 92:switch(X=this.nextChar(),X){case-1:v("Unterminated string"),Z=!0;break;case 110:q.push(`
|
|
3
|
+
`);break;case 114:q.push("\r");break;case 116:q.push("\t");break;case 98:q.push("\b");break;case 102:q.push("\f");break;case 92:case 40:case 41:q.push(String.fromCharCode(X));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:let R=15&X;X=this.nextChar(),z=!0,X>=48&&X<=55&&(R=(R<<3)+(15&X),X=this.nextChar(),X>=48&&X<=55&&(z=!1,R=(R<<3)+(15&X))),q.push(String.fromCharCode(R));break;case 13:this.peekChar()===10&&this.nextChar();break;case 10:break;default:q.push(String.fromCharCode(X))}break;default:q.push(String.fromCharCode(X))}if(Z)break;z||(X=this.nextChar())}return q.join("")}getName(){let P,Z,q=this.strBuf;for(q.length=0;(P=this.nextChar())>=0&&!s5[P];)if(P===35){if(P=this.nextChar(),s5[P]){v("Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number."),q.push("#");break}let X=rP(P);if(X!==-1){Z=P,P=this.nextChar();let z=rP(P);if(z===-1){if(v(`Lexer_getName: Illegal digit (${String.fromCharCode(P)}) in hexadecimal number.`),q.push("#",String.fromCharCode(Z)),s5[P])break;q.push(String.fromCharCode(P));continue}q.push(String.fromCharCode(X<<4|z))}else q.push("#",String.fromCharCode(P))}else q.push(String.fromCharCode(P));return q.length>127&&v(`Name token is longer than allowed by the spec: ${q.length}`),t.get(q.join(""))}_hexStringWarn(P){this._hexStringNumWarn++!==5?this._hexStringNumWarn>5||v(`getHexString - ignoring invalid character: ${P}`):v("getHexString - ignoring additional invalid characters.")}getHexString(){let P=this.strBuf;P.length=0;let Z=this.currentChar,q=-1,X=-1;for(this._hexStringNumWarn=0;;){if(Z<0){v("Unterminated hex string");break}if(Z===62){this.nextChar();break}s5[Z]!==1?(X=rP(Z),X===-1?this._hexStringWarn(Z):q===-1?q=X:(P.push(String.fromCharCode(q<<4|X)),q=-1),Z=this.nextChar()):Z=this.nextChar()}return q!==-1&&P.push(String.fromCharCode(q<<4)),P.join("")}getObj(){let P=!1,Z=this.currentChar;for(;;){if(Z<0)return F8;if(P)Z!==10&&Z!==13||(P=!1);else if(Z===37)P=!0;else if(s5[Z]!==1)break;Z=this.nextChar()}switch(0|Z){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return this.getNumber();case 40:return this.getString();case 47:return this.getName();case 91:return this.nextChar(),H8.get("[");case 93:return this.nextChar(),H8.get("]");case 60:return Z=this.nextChar(),Z===60?(this.nextChar(),H8.get("<<")):this.getHexString();case 62:return Z=this.nextChar(),Z===62?(this.nextChar(),H8.get(">>")):H8.get(">");case 123:return this.nextChar(),H8.get("{");case 125:return this.nextChar(),H8.get("}");case 41:throw this.nextChar(),new s(`Illegal character: ${Z}`)}let q=String.fromCharCode(Z);if(Z<32||Z>127){let R=this.peekChar();if(R>=32&&R<=127)return this.nextChar(),H8.get(q)}let X=this.knownCommands,z=X?.[q]!==void 0;for(;(Z=this.nextChar())>=0&&!s5[Z];){let R=q+String.fromCharCode(Z);if(z&&X[R]===void 0)break;if(q.length===128)throw new s(`Command token too long: ${q.length}`);q=R,z=X?.[q]!==void 0}return q==="true"||q!=="false"&&(q==="null"?null:(q==="BI"&&(this.beginInlineImagePos=this.stream.pos),H8.get(q)))}skipToNextLine(){let P=this.currentChar;for(;P>=0;){if(P===13){P=this.nextChar(),P===10&&this.nextChar();break}if(P===10){this.nextChar();break}P=this.nextChar()}}}class XG{static create(P){function Z(Y,W,$=!1){let _=Y.get(W);if(Number.isInteger(_)&&($?_>=0:_>0))return _;throw Error(`The "${W}" parameter in the linearization dictionary is invalid.`)}let q=new U4({lexer:new T0(P),xref:null}),X=q.getObj(),z=q.getObj(),R=q.getObj(),f=q.getObj(),G,Q;if(!(Number.isInteger(X)&&Number.isInteger(z)&&b8(R,"obj")&&f instanceof S&&typeof(G=f.get("Linearized"))=="number"&&G>0))return null;if((Q=Z(f,"L"))!==P.length)throw Error('The "L" parameter in the linearization dictionary does not equal the stream length.');return{length:Q,hints:function(Y){let W=Y.get("H"),$;if(Array.isArray(W)&&(($=W.length)===2||$===4)){for(let _=0;_<$;_++){let J=W[_];if(!(Number.isInteger(J)&&J>0))throw Error(`Hint (${_}) in the linearization dictionary is invalid.`)}return W}throw Error("Hint array in the linearization dictionary is invalid.")}(f),objectNumberFirst:Z(f,"O"),endFirst:Z(f,"E"),numPages:Z(f,"N"),mainXRefEntriesOffset:Z(f,"T"),pageFirst:f.has("P")?Z(f,"P",!0):0}}}class zP{constructor(P=!1){this.codespaceRanges=[[],[],[],[]],this.numCodespaceRanges=0,this._map=[],this.name="",this.vertical=!1,this.useCMap=null,this.builtInCMap=P}addCodespaceRange(P,Z,q){this.codespaceRanges[P-1].push(Z,q),this.numCodespaceRanges++}mapCidRange(P,Z,q){if(Z-P>lP)throw Error("mapCidRange - ignoring data above MAX_MAP_RANGE.");for(;P<=Z;)this._map[P++]=q++}mapBfRange(P,Z,q){if(Z-P>lP)throw Error("mapBfRange - ignoring data above MAX_MAP_RANGE.");let X=q.length-1;for(;P<=Z;){this._map[P++]=q;let z=q.charCodeAt(X)+1;z>255?q=q.substring(0,X-1)+String.fromCharCode(q.charCodeAt(X-1)+1)+"\x00":q=q.substring(0,X)+String.fromCharCode(z)}}mapBfRangeToArray(P,Z,q){if(Z-P>lP)throw Error("mapBfRangeToArray - ignoring data above MAX_MAP_RANGE.");let X=q.length,z=0;for(;P<=Z&&z<X;)this._map[P]=q[z++],++P}mapOne(P,Z){this._map[P]=Z}lookup(P){return this._map[P]}contains(P){return this._map[P]!==void 0}forEach(P){let Z=this._map,q=Z.length;if(q<=65536)for(let X=0;X<q;X++)Z[X]!==void 0&&P(X,Z[X]);else for(let X in Z)P(X,Z[X])}charCodeOf(P){let Z=this._map;if(Z.length<=65536)return Z.indexOf(P);for(let q in Z)if(Z[q]===P)return 0|q;return-1}getMap(){return this._map}readCharCode(P,Z,q){let X=0,z=this.codespaceRanges;for(let R=0,f=z.length;R<f;R++){X=(X<<8|P.charCodeAt(Z+R))>>>0;let G=z[R];for(let Q=0,Y=G.length;Q<Y;){let W=G[Q++],$=G[Q++];if(X>=W&&X<=$)return q.charcode=X,void(q.length=R+1)}}q.charcode=0,q.length=1}getCharCodeLength(P){let Z=this.codespaceRanges;for(let q=0,X=Z.length;q<X;q++){let z=Z[q];for(let R=0,f=z.length;R<f;){let G=z[R++],Q=z[R++];if(P>=G&&P<=Q)return q+1}}return 1}get length(){return this._map.length}get isIdentityCMap(){if(this.name!=="Identity-H"&&this.name!=="Identity-V")return!1;if(this._map.length!==65536)return!1;for(let P=0;P<65536;P++)if(this._map[P]!==P)return!1;return!0}}function o4(P){let Z=0;for(let q=0;q<P.length;q++)Z=Z<<8|P.charCodeAt(q);return Z>>>0}function p5(P){if(typeof P!="string")throw new s("Malformed CMap: expected string.")}function zG(P){if(!Number.isInteger(P))throw new s("Malformed CMap: expected int.")}function TI(P,Z){for(;;){let q=Z.getObj();if(q===F8)break;if(b8(q,"endbfchar"))return;p5(q);let X=o4(q);q=Z.getObj(),p5(q);let z=q;P.mapOne(X,z)}}function NI(P,Z){for(;;){let q=Z.getObj();if(q===F8)break;if(b8(q,"endbfrange"))return;p5(q);let X=o4(q);q=Z.getObj(),p5(q);let z=o4(q);if(q=Z.getObj(),Number.isInteger(q)||typeof q=="string"){let R=Number.isInteger(q)?String.fromCharCode(q):q;P.mapBfRange(X,z,R)}else{if(!b8(q,"["))break;{q=Z.getObj();let R=[];for(;!b8(q,"]")&&q!==F8;)R.push(q),q=Z.getObj();P.mapBfRangeToArray(X,z,R)}}}throw new s("Invalid bf range.")}function vI(P,Z){for(;;){let q=Z.getObj();if(q===F8)break;if(b8(q,"endcidchar"))return;p5(q);let X=o4(q);q=Z.getObj(),zG(q);let z=q;P.mapOne(X,z)}}function FI(P,Z){for(;;){let q=Z.getObj();if(q===F8)break;if(b8(q,"endcidrange"))return;p5(q);let X=o4(q);q=Z.getObj(),p5(q);let z=o4(q);q=Z.getObj(),zG(q);let R=q;P.mapCidRange(X,z,R)}}function SI(P,Z){for(;;){let q=Z.getObj();if(q===F8)break;if(b8(q,"endcodespacerange"))return;if(typeof q!="string")break;let X=o4(q);if(q=Z.getObj(),typeof q!="string")break;let z=o4(q);P.addCodespaceRange(q.length,X,z)}throw new s("Invalid codespace range.")}function mI(P,Z){let q=Z.getObj();Number.isInteger(q)&&(P.vertical=!!q)}function pI(P,Z){let q=Z.getObj();q instanceof t&&(P.name=q.name)}async function RG(P,Z,q,X){let z,R;P:for(;;)try{let f=Z.getObj();if(f===F8)break;if(f instanceof t)f.name==="WMode"?mI(P,Z):f.name==="CMapName"&&pI(P,Z),z=f;else if(f instanceof H8)switch(f.cmd){case"endcmap":break P;case"usecmap":z instanceof t&&(R=z.name);break;case"begincodespacerange":SI(P,Z);break;case"beginbfchar":TI(P,Z);break;case"begincidchar":vI(P,Z);break;case"beginbfrange":NI(P,Z);break;case"begincidrange":FI(P,Z)}}catch(f){if(f instanceof q8)throw f;v("Invalid cMap data: "+f);continue}return!X&&R&&(X=R),X?fG(P,q,X):P}async function fG(P,Z,q){if(P.useCMap=await PZ(q,Z),P.numCodespaceRanges===0){let X=P.useCMap.codespaceRanges;for(let z=0;z<X.length;z++)P.codespaceRanges[z]=X[z].slice();P.numCodespaceRanges=P.useCMap.numCodespaceRanges}return P.useCMap.forEach(function(X,z){P.contains(X)||P.mapOne(X,z)}),P}async function PZ(P,Z){if(P==="Identity-H")return new b5(!1,2);if(P==="Identity-V")return new b5(!0,2);if(!CI.includes(P))throw Error("Unknown CMap name: "+P);if(!Z)throw Error("Built-in CMap parameters are not provided.");let{cMapData:q,isCompressed:X}=await Z(P),z=new zP(!0);if(X)return new cf().process(q,z,(f)=>fG(z,Z,f));let R=new T0(new Y8(q));return RG(z,R,Z,null)}class X7{static async create({encoding:P,fetchBuiltInCMap:Z,useCMap:q}){if(P instanceof t)return PZ(P.name,Z);if(P instanceof T1){let X=await RG(new zP,new T0(P),Z,q);return X.isIdentityCMap?PZ(X.name,Z):X}throw Error("Encoding required.")}}function v7(P){switch(P){case"WinAnsiEncoding":return N7;case"StandardEncoding":return A4;case"MacRomanEncoding":return Gq;case"SymbolSetEncoding":return Qq;case"ZapfDingbatsEncoding":return Yq;case"ExpertEncoding":return GG;case"MacExpertEncoding":return OI;default:return null}}function V6(P,Z){let q=Z[P];if(q!==void 0)return q;if(!P)return-1;if(P[0]==="u"){let X=P.length,z;if(X===7&&P[1]==="n"&&P[2]==="i")z=P.substring(3);else{if(!(X>=5&&X<=7))return-1;z=P.substring(1)}if(z===z.toUpperCase()&&(q=parseInt(z,16),q>=0))return q}return-1}function wI(P,Z=-1){if(Z!==-1){let q=oP[Z];for(let X=0,z=q.length;X<z;X+=2)if(P>=q[X]&&P<=q[X+1])return Z}for(let q=0,X=oP.length;q<X;q++){let z=oP[q];for(let R=0,f=z.length;R<f;R+=2)if(P>=z[R]&&P<=z[R+1])return q}return-1}function YG(P,Z){if(Z[P]!==void 0)return P;let q=V6(P,Z);if(q!==-1){for(let X in Z)if(Z[X]===q)return X}return v1("Unable to recover a standard glyph name for: "+P),P}function WG(P,Z,q){let X=Object.create(null),z,R,f,G=!!(P.flags&k3);if(P.isInternalFont)for(f=Z,R=0;R<f.length;R++)z=q.indexOf(f[R]),X[R]=z>=0?z:0;else if(P.baseEncodingName)for(f=v7(P.baseEncodingName),R=0;R<f.length;R++)z=q.indexOf(f[R]),X[R]=z>=0?z:0;else if(G)for(R in Z)X[R]=Z[R];else for(f=A4,R=0;R<f.length;R++)z=q.indexOf(f[R]),X[R]=z>=0?z:0;let Q=P.differences,Y;if(Q)for(R in Q){let W=Q[R];if(z=q.indexOf(W),z===-1){Y||(Y=l0());let $=YG(W,Y);$!==W&&(z=q.indexOf($))}X[R]=z>=0?z:0}return X}function t7(P){return P.replaceAll(/[,_]/g,"-").replaceAll(/\s/g,"")}class RP{constructor(P,Z,q){this.bytes=P.getBytes(),this.properties=Z,this.seacAnalysisEnabled=!!q}parse(){let P=this.properties,Z=new Wq;this.cff=Z;let q=this.parseHeader(),X=this.parseIndex(q.endPos),z=this.parseIndex(X.endPos),R=this.parseIndex(z.endPos),f=this.parseIndex(R.endPos),G=this.parseDict(z.obj.get(0)),Q=this.createDict(S7,G,Z.strings);Z.header=q.obj,Z.names=this.parseNameIndex(X.obj),Z.strings=this.parseStringIndex(R.obj),Z.topDict=Q,Z.globalSubrIndex=f.obj,this.parsePrivateDict(Z.topDict),Z.isCIDFont=Q.hasName("ROS");let Y=Q.getByName("CharStrings"),W=this.parseIndex(Y).obj,$=Q.getByName("FontMatrix");$&&(P.fontMatrix=$);let _=Q.getByName("FontBBox"),J,U;if(_&&(P.ascent=Math.max(_[3],_[1]),P.descent=Math.min(_[1],_[3]),P.ascentScaled=!0),Z.isCIDFont){let I=this.parseIndex(Q.getByName("FDArray")).obj;for(let B=0,j=I.count;B<j;++B){let V=I.get(B),H=this.createDict(S7,this.parseDict(V),Z.strings);this.parsePrivateDict(H),Z.fdArray.push(H)}U=null,J=this.parseCharsets(Q.getByName("charset"),W.count,Z.strings,!0),Z.fdSelect=this.parseFDSelect(Q.getByName("FDSelect"),W.count)}else J=this.parseCharsets(Q.getByName("charset"),W.count,Z.strings,!1),U=this.parseEncoding(Q.getByName("Encoding"),P,Z.strings,J.charset);Z.charset=J,Z.encoding=U;let K=this.parseCharStrings({charStrings:W,localSubrIndex:Q.privateDict.subrsIndex,globalSubrIndex:f.obj,fdSelect:Z.fdSelect,fdArray:Z.fdArray,privateDict:Q.privateDict});return Z.charStrings=K.charStrings,Z.seacs=K.seacs,Z.widths=K.widths,Z}parseHeader(){let P=this.bytes,Z=P.length,q=0;for(;q<Z&&P[q]!==1;)++q;if(q>=Z)throw new s("Invalid CFF header");q!==0&&(v1("cff data is shifted"),P=P.subarray(q),this.bytes=P);let X=P[0],z=P[1],R=P[2],f=P[3];return{obj:new $q(X,z,R,f),endPos:R}}parseDict(P){let Z=0;function q(){let f=P[Z++];return f===30?function(){let G="",Q=15,Y=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],W=P.length;for(;Z<W;){let $=P[Z++],_=$>>4,J=15&$;if(_===Q)break;if(G+=Y[_],J===Q)break;G+=Y[J]}return parseFloat(G)}():f===28?(f=I4(P,Z),Z+=2,f):f===29?(f=P[Z++],f=f<<8|P[Z++],f=f<<8|P[Z++],f=f<<8|P[Z++],f):f>=32&&f<=246?f-139:f>=247&&f<=250?256*(f-247)+P[Z++]+108:f>=251&&f<=254?-256*(f-251)-P[Z++]-108:(v('CFFParser_parseDict: "'+f+'" is a reserved command.'),NaN)}let X=[],z=[];Z=0;let R=P.length;for(;Z<R;){let f=P[Z];f<=21?(f===12&&(f=f<<8|P[++Z]),z.push([f,X]),X=[],++Z):X.push(q())}return z}parseIndex(P){let Z=new x4,q=this.bytes,X=q[P++]<<8|q[P++],z=[],R,f,G=P;if(X!==0){let Q=q[P++],Y=P+(X+1)*Q-1;for(R=0,f=X+1;R<f;++R){let W=0;for(let $=0;$<Q;++$)W<<=8,W+=q[P++];z.push(Y+W)}G=z[X]}for(R=0,f=z.length-1;R<f;++R){let Q=z[R],Y=z[R+1];Z.add(q.subarray(Q,Y))}return{obj:Z,endPos:G}}parseNameIndex(P){let Z=[];for(let q=0,X=P.count;q<X;++q){let z=P.get(q);Z.push(W0(z))}return Z}parseStringIndex(P){let Z=new fP;for(let q=0,X=P.count;q<X;++q){let z=P.get(q);Z.add(W0(z))}return Z}createDict(P,Z,q){let X=new P(q);for(let[z,R]of Z)X.setByKey(z,R);return X}parseCharString(P,Z,q,X){if(!Z||P.callDepth>10)return!1;let{stackSize:z,stack:R}=P,f=Z.length;for(let G=0;G<f;){let Q=Z[G++],Y=null;if(Q===12){let W=Z[G++];W===0?(Z[G-2]=139,Z[G-1]=22,z=0):Y=sI[W]}else if(Q===28)R[z]=I4(Z,G),G+=2,z++;else if(Q===14){if(z>=4&&(z-=4,this.seacAnalysisEnabled))return P.seac=R.slice(z,z+4),!1;Y=h5[Q]}else if(Q>=32&&Q<=246)R[z]=Q-139,z++;else if(Q>=247&&Q<=254)R[z]=Q<251?(Q-247<<8)+Z[G]+108:-(Q-251<<8)-Z[G]-108,G++,z++;else if(Q===255)R[z]=(Z[G]<<24|Z[G+1]<<16|Z[G+2]<<8|Z[G+3])/65536,G+=4,z++;else if(Q===19||Q===20){if(P.hints+=z>>1,P.hints===0){Z.copyWithin(G-1,G,-1),G-=1,f-=1;continue}G+=P.hints+7>>3,z%=2,Y=h5[Q]}else{if(Q===10||Q===29){let W=Q===10?q:X;if(!W)return Y=h5[Q],v("Missing subrsIndex for "+Y.id),!1;let $=32768;W.count<1240?$=107:W.count<33900&&($=1131);let _=R[--z]+$;if(_<0||_>=W.count||isNaN(_))return Y=h5[Q],v("Out of bounds subrIndex for "+Y.id),!1;if(P.stackSize=z,P.callDepth++,!this.parseCharString(P,W.get(_),q,X))return!1;P.callDepth--,z=P.stackSize;continue}if(Q===11)return P.stackSize=z,!0;if(Q===0&&G===Z.length)Z[G-1]=14,Y=h5[14];else{if(Q===9){Z.copyWithin(G-1,G,-1),G-=1,f-=1;continue}Y=h5[Q]}}if(Y){if(Y.stem&&(P.hints+=z>>1,Q===3||Q===23?P.hasVStems=!0:!P.hasVStems||Q!==1&&Q!==18||(v("CFF stem hints are in wrong order"),Z[G-1]=Q===1?3:23)),"min"in Y&&!P.undefStack&&z<Y.min)return v("Not enough parameters for "+Y.id+"; actual: "+z+", expected: "+Y.min),z===0&&(Z[G-1]=14,!0);P.firstStackClearing&&Y.stackClearing&&(P.firstStackClearing=!1,z-=Y.min,z>=2&&Y.stem?z%=2:z>1&&v("Found too many parameters for stack-clearing command"),z>0&&(P.width=R[z-1])),"stackDelta"in Y?(("stackFn"in Y)&&Y.stackFn(R,z),z+=Y.stackDelta):Y.stackClearing?z=0:Y.resetStack?(z=0,P.undefStack=!1):Y.undefStack&&(z=0,P.undefStack=!0,P.firstStackClearing=!1)}}return f<Z.length&&Z.fill(14,f),P.stackSize=z,!0}parseCharStrings({charStrings:P,localSubrIndex:Z,globalSubrIndex:q,fdSelect:X,fdArray:z,privateDict:R}){let f=[],G=[],Q=P.count;for(let Y=0;Y<Q;Y++){let W=P.get(Y),$={callDepth:0,stackSize:0,stack:[],undefStack:!0,hints:0,firstStackClearing:!0,seac:null,width:null,hasVStems:!1},_=!0,J=null,U=R;if(X&&z.length){let K=X.getFDIndex(Y);K===-1&&(v("Glyph index is not in fd select."),_=!1),K>=z.length&&(v("Invalid fd index for glyph index."),_=!1),_&&(U=z[K].privateDict,J=U.subrsIndex)}else Z&&(J=Z);if(_&&(_=this.parseCharString($,W,J,q)),$.width!==null){let K=U.getByName("nominalWidthX");G[Y]=K+$.width}else{let K=U.getByName("defaultWidthX");G[Y]=K}$.seac!==null&&(f[Y]=$.seac),_||P.set(Y,new Uint8Array([14]))}return{charStrings:P,seacs:f,widths:G}}emptyPrivateDictionary(P){let Z=this.createDict(m7,[],P.strings);P.setByKey(18,[0,0]),P.privateDict=Z}parsePrivateDict(P){if(!P.hasName("Private"))return void this.emptyPrivateDictionary(P);let Z=P.getByName("Private");if(!Array.isArray(Z)||Z.length!==2)return void P.removeByName("Private");let q=Z[0],X=Z[1];if(q===0||X>=this.bytes.length)return void this.emptyPrivateDictionary(P);let z=X+q,R=this.bytes.subarray(X,z),f=this.parseDict(R),G=this.createDict(m7,f,P.strings);if(P.privateDict=G,G.getByName("ExpansionFactor")===0&&G.setByName("ExpansionFactor",0.06),!G.getByName("Subrs"))return;let Q=G.getByName("Subrs"),Y=X+Q;if(Q===0||Y>=this.bytes.length)return void this.emptyPrivateDictionary(P);let W=this.parseIndex(Y);G.subrsIndex=W.obj}parseCharsets(P,Z,q,X){if(P===0)return new P6(!0,nP.ISO_ADOBE,gI);if(P===1)return new P6(!0,nP.EXPERT,dI);if(P===2)return new P6(!0,nP.EXPERT_SUBSET,cI);let z=this.bytes,R=P,f=z[P++],G=[X?0:".notdef"],Q,Y,W;switch(Z-=1,f){case 0:for(W=0;W<Z;W++)Q=z[P++]<<8|z[P++],G.push(X?Q:q.get(Q));break;case 1:for(;G.length<=Z;)for(Q=z[P++]<<8|z[P++],Y=z[P++],W=0;W<=Y;W++)G.push(X?Q++:q.get(Q++));break;case 2:for(;G.length<=Z;)for(Q=z[P++]<<8|z[P++],Y=z[P++]<<8|z[P++],W=0;W<=Y;W++)G.push(X?Q++:q.get(Q++));break;default:throw new s("Unknown charset format")}let $=P,_=z.subarray(R,$);return new P6(!1,f,G,_)}parseEncoding(P,Z,q,X){let z=Object.create(null),R=this.bytes,f,G,Q,Y=!1,W=null;if(P===0||P===1){Y=!0,f=P;let $=P?GG:A4;for(G=0,Q=X.length;G<Q;G++){let _=$.indexOf(X[G]);_!==-1&&(z[_]=G)}}else{let $=P;switch(f=R[P++],127&f){case 0:let J=R[P++];for(G=1;G<=J;G++)z[R[P++]]=G;break;case 1:let U=R[P++],K=1;for(G=0;G<U;G++){let I=R[P++],B=R[P++];for(let j=I;j<=I+B;j++)z[j]=K++}break;default:throw new s(`Unknown encoding format: ${f} in CFF`)}let _=P;128&f&&(R[$]&=127,function(){let J=R[P++];for(G=0;G<J;G++){let U=R[P++],K=(R[P++]<<8)+(255&R[P++]);z[U]=X.indexOf(q.get(K))}}()),W=R.subarray($,_)}return f&=127,new $G(Y,f,z,W)}parseFDSelect(P,Z){let q=this.bytes,X=q[P++],z=[],R;switch(X){case 0:for(R=0;R<Z;++R){let G=q[P++];z.push(G)}break;case 3:let f=q[P++]<<8|q[P++];for(R=0;R<f;++R){let G=q[P++]<<8|q[P++];R===0&&G!==0&&(v("parseFDSelect: The first range must have a first GID of 0 -- trying to recover."),G=0);let Q=q[P++],Y=q[P]<<8|q[P+1];for(let W=G;W<Y;++W)z.push(Q)}P+=2;break;default:throw new s(`parseFDSelect: Unknown format "${X}".`)}if(z.length!==Z)throw new s("parseFDSelect: Invalid font data.");return new _G(X,z)}}class Wq{constructor(){this.header=null,this.names=[],this.topDict=null,this.strings=new fP,this.globalSubrIndex=null,this.encoding=null,this.charset=null,this.charStrings=null,this.fdArray=[],this.fdSelect=null,this.isCIDFont=!1}duplicateFirstGlyph(){if(this.charStrings.count>=65535)return void v("Not enough space in charstrings to duplicate first glyph.");let P=this.charStrings.get(0);this.charStrings.add(P),this.isCIDFont&&this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0])}hasGlyphId(P){if(P<0||P>=this.charStrings.count)return!1;return this.charStrings.get(P).length>0}}class $q{constructor(P,Z,q,X){this.major=P,this.minor=Z,this.hdrSize=q,this.offSize=X}}class fP{constructor(){this.strings=[]}get(P){return P>=0&&P<=390?h2[P]:P-aP<=this.strings.length?this.strings[P-aP]:h2[0]}getSID(P){let Z=h2.indexOf(P);return Z!==-1?Z:(Z=this.strings.indexOf(P),Z!==-1?Z+aP:-1)}add(P){this.strings.push(P)}get count(){return this.strings.length}}class x4{constructor(){this.objects=[],this.length=0}add(P){this.length+=P.length,this.objects.push(P)}set(P,Z){this.length+=Z.length-this.objects[P].length,this.objects[P]=Z}get(P){return this.objects[P]}get count(){return this.objects.length}}class _q{constructor(P,Z){this.keyToNameMap=P.keyToNameMap,this.nameToKeyMap=P.nameToKeyMap,this.defaults=P.defaults,this.types=P.types,this.opcodes=P.opcodes,this.order=P.order,this.strings=Z,this.values=Object.create(null)}setByKey(P,Z){if(!(P in this.keyToNameMap))return!1;if(Z.length===0)return!0;for(let X of Z)if(isNaN(X))return v(`Invalid CFFDict value: "${Z}" for key "${P}".`),!0;let q=this.types[P];return q!=="num"&&q!=="sid"&&q!=="offset"||(Z=Z[0]),this.values[P]=Z,!0}setByName(P,Z){if(!(P in this.nameToKeyMap))throw new s(`Invalid dictionary name "${P}"`);this.values[this.nameToKeyMap[P]]=Z}hasName(P){return this.nameToKeyMap[P]in this.values}getByName(P){if(!(P in this.nameToKeyMap))throw new s(`Invalid dictionary name ${P}"`);let Z=this.nameToKeyMap[P];return Z in this.values?this.values[Z]:this.defaults[Z]}removeByName(P){delete this.values[this.nameToKeyMap[P]]}static createTables(P){let Z={keyToNameMap:{},nameToKeyMap:{},defaults:{},types:{},opcodes:{},order:[]};for(let q of P){let X=Array.isArray(q[0])?(q[0][0]<<8)+q[0][1]:q[0];Z.keyToNameMap[X]=q[1],Z.nameToKeyMap[q[1]]=X,Z.types[X]=q[2],Z.defaults[X]=q[3],Z.opcodes[X]=Array.isArray(q[0])?q[0]:[q[0]],Z.order.push(X)}return Z}}class P6{constructor(P,Z,q,X){this.predefined=P,this.format=Z,this.charset=q,this.raw=X}}class $G{constructor(P,Z,q,X){this.predefined=P,this.format=Z,this.encoding=q,this.raw=X}}class _G{constructor(P,Z){this.format=P,this.fdSelect=Z}getFDIndex(P){return P<0||P>=this.fdSelect.length?-1:this.fdSelect[P]}}class XZ{constructor(){this.offsets=Object.create(null)}isTracking(P){return P in this.offsets}track(P,Z){if(P in this.offsets)throw new s(`Already tracking location of ${P}`);this.offsets[P]=Z}offset(P){for(let Z in this.offsets)this.offsets[Z]+=P}setEntryLocation(P,Z,q){if(!(P in this.offsets))throw new s(`Not tracking location of ${P}`);let X=q.data,z=this.offsets[P];for(let R=0,f=Z.length;R<f;++R){let G=5*R+z,Q=G+1,Y=G+2,W=G+3,$=G+4;if(X[G]!==29||X[Q]!==0||X[Y]!==0||X[W]!==0||X[$]!==0)throw new s("writing to an offset that is not empty");let _=Z[R];X[G]=29,X[Q]=_>>24&255,X[Y]=_>>16&255,X[W]=_>>8&255,X[$]=255&_}}}class e7{constructor(P){this.cff=P}compile(){let P=this.cff,Z={data:[],length:0,add($){try{this.data.push(...$)}catch{this.data=this.data.concat($)}this.length=this.data.length}},q=this.compileHeader(P.header);Z.add(q);let X=this.compileNameIndex(P.names);if(Z.add(X),P.isCIDFont&&P.topDict.hasName("FontMatrix")){let $=P.topDict.getByName("FontMatrix");P.topDict.removeByName("FontMatrix");for(let _ of P.fdArray){let J=$.slice(0);_.hasName("FontMatrix")&&(J=s1.transform(J,_.getByName("FontMatrix"))),_.setByName("FontMatrix",J)}}P.topDict.getByName("XUID")?.length>16&&P.topDict.removeByName("XUID"),P.topDict.setByName("charset",0);let R=this.compileTopDicts([P.topDict],Z.length,P.isCIDFont);Z.add(R.output);let f=R.trackers[0],G=this.compileStringIndex(P.strings.strings);Z.add(G);let Q=this.compileIndex(P.globalSubrIndex);if(Z.add(Q),P.encoding&&P.topDict.hasName("Encoding"))if(P.encoding.predefined)f.setEntryLocation("Encoding",[P.encoding.format],Z);else{let $=this.compileEncoding(P.encoding);f.setEntryLocation("Encoding",[Z.length],Z),Z.add($)}let Y=this.compileCharset(P.charset,P.charStrings.count,P.strings,P.isCIDFont);f.setEntryLocation("charset",[Z.length],Z),Z.add(Y);let W=this.compileCharStrings(P.charStrings);if(f.setEntryLocation("CharStrings",[Z.length],Z),Z.add(W),P.isCIDFont){f.setEntryLocation("FDSelect",[Z.length],Z);let $=this.compileFDSelect(P.fdSelect);Z.add($),R=this.compileTopDicts(P.fdArray,Z.length,!0),f.setEntryLocation("FDArray",[Z.length],Z),Z.add(R.output);let _=R.trackers;this.compilePrivateDicts(P.fdArray,_,Z)}return this.compilePrivateDicts([P.topDict],[f],Z),Z.add([0]),Z.data}encodeNumber(P){return Number.isInteger(P)?this.encodeInteger(P):this.encodeFloat(P)}static get EncodeFloatRegExp(){return q1(this,"EncodeFloatRegExp",/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/)}encodeFloat(P){let Z=P.toString(),q=e7.EncodeFloatRegExp.exec(Z);if(q){let G=parseFloat("1e"+((q[2]?+q[2]:0)+q[1].length));Z=(Math.round(P*G)/G).toString()}let X,z,R="";for(X=0,z=Z.length;X<z;++X){let G=Z[X];R+=G==="e"?Z[++X]==="-"?"c":"b":G==="."?"a":G==="-"?"e":G}R+=1&R.length?"f":"ff";let f=[30];for(X=0,z=R.length;X<z;X+=2)f.push(parseInt(R.substring(X,X+2),16));return f}encodeInteger(P){let Z;return Z=P>=-107&&P<=107?[P+139]:P>=108&&P<=1131?[247+((P-=108)>>8),255&P]:P>=-1131&&P<=-108?[251+((P=-P-108)>>8),255&P]:P>=-32768&&P<=32767?[28,P>>8&255,255&P]:[29,P>>24&255,P>>16&255,P>>8&255,255&P],Z}compileHeader(P){return[P.major,P.minor,4,P.offSize]}compileNameIndex(P){let Z=new x4;for(let q of P){let X=Math.min(q.length,127),z=Array(X);for(let R=0;R<X;R++){let f=q[R];(f<"!"||f>"~"||f==="["||f==="]"||f==="("||f===")"||f==="{"||f==="}"||f==="<"||f===">"||f==="/"||f==="%")&&(f="_"),z[R]=f}z=z.join(""),z===""&&(z="Bad_Font_Name"),Z.add(w8(z))}return this.compileIndex(Z)}compileTopDicts(P,Z,q){let X=[],z=new x4;for(let R of P){q&&(R.removeByName("CIDFontVersion"),R.removeByName("CIDFontRevision"),R.removeByName("CIDFontType"),R.removeByName("CIDCount"),R.removeByName("UIDBase"));let f=new XZ,G=this.compileDict(R,f);X.push(f),z.add(G),f.offset(Z)}return z=this.compileIndex(z,X),{trackers:X,output:z}}compilePrivateDicts(P,Z,q){for(let X=0,z=P.length;X<z;++X){let R=P[X],f=R.privateDict;if(!f||!R.hasName("Private"))throw new s("There must be a private dictionary.");let G=new XZ,Q=this.compileDict(f,G),Y=q.length;if(G.offset(Y),Q.length||(Y=0),Z[X].setEntryLocation("Private",[Q.length,Y],q),q.add(Q),f.subrsIndex&&f.hasName("Subrs")){let W=this.compileIndex(f.subrsIndex);G.setEntryLocation("Subrs",[Q.length],q),q.add(W)}}}compileDict(P,Z){let q=[];for(let X of P.order){if(!(X in P.values))continue;let z=P.values[X],R=P.types[X];if(Array.isArray(R)||(R=[R]),Array.isArray(z)||(z=[z]),z.length!==0){for(let f=0,G=R.length;f<G;++f){let Q=R[f],Y=z[f];switch(Q){case"num":case"sid":q.push(...this.encodeNumber(Y));break;case"offset":let W=P.keyToNameMap[X];Z.isTracking(W)||Z.track(W,q.length),q.push(29,0,0,0,0);break;case"array":case"delta":q.push(...this.encodeNumber(Y));for(let $=1,_=z.length;$<_;++$)q.push(...this.encodeNumber(z[$]));break;default:throw new s(`Unknown data type of ${Q}`)}}q.push(...P.opcodes[X])}}return q}compileStringIndex(P){let Z=new x4;for(let q of P)Z.add(w8(q));return this.compileIndex(Z)}compileCharStrings(P){let Z=new x4;for(let q=0;q<P.count;q++){let X=P.get(q);X.length!==0?Z.add(X):Z.add(new Uint8Array([139,14]))}return this.compileIndex(Z)}compileCharset(P,Z,q,X){let z,R=Z-1;if(X){let f=R-1;z=new Uint8Array([2,0,1,f>>8&255,255&f])}else{z=new Uint8Array(1+2*R),z[0]=0;let f=0,G=P.charset.length,Q=!1;for(let Y=1;Y<z.length;Y+=2){let W=0;if(f<G){let $=P.charset[f++];W=q.getSID($),W===-1&&(W=0,Q||(Q=!0,v(`Couldn't find ${$} in CFF strings`)))}z[Y]=W>>8&255,z[Y+1]=255&W}}return this.compileTypedArray(z)}compileEncoding(P){return this.compileTypedArray(P.raw)}compileFDSelect(P){let Z=P.format,q,X;switch(Z){case 0:for(q=new Uint8Array(1+P.fdSelect.length),q[0]=Z,X=0;X<P.fdSelect.length;X++)q[X+1]=P.fdSelect[X];break;case 3:let z=0,R=P.fdSelect[0],f=[Z,0,0,z>>8&255,255&z,R];for(X=1;X<P.fdSelect.length;X++){let Q=P.fdSelect[X];Q!==R&&(f.push(X>>8&255,255&X,Q),R=Q)}let G=(f.length-3)/3;f[1]=G>>8&255,f[2]=255&G,f.push(X>>8&255,255&X),q=new Uint8Array(f)}return this.compileTypedArray(q)}compileTypedArray(P){return Array.from(P)}compileIndex(P,Z=[]){let q=P.objects,X=q.length;if(X===0)return[0,0];let z=[X>>8&255,255&X],R,f,G=1;for(R=0;R<X;++R)G+=q[R].length;f=G<256?1:G<65536?2:G<16777216?3:4,z.push(f);let Q=1;for(R=0;R<X+1;R++)f===1?z.push(255&Q):f===2?z.push(Q>>8&255,255&Q):f===3?z.push(Q>>16&255,Q>>8&255,255&Q):z.push(Q>>>24&255,Q>>16&255,Q>>8&255,255&Q),q[R]&&(Q+=q[R].length);for(R=0;R<X;R++)Z[R]&&Z[R].offset(z.length),z.push(...q[R]);return z}}function jz(P){let Z=t7(P);return p7()[Z]}function Vz(P){let Z=t7(P);return!!(p7()[Z]||zZ()[Z]||Jq()[Z]||RZ()[Z])}class Z6{constructor(P=[]){this._map=P}get length(){return this._map.length}forEach(P){for(let Z in this._map)P(Z,this._map[Z].codePointAt(0))}has(P){return this._map[P]!==void 0}get(P){return this._map[P]}charCodeOf(P){let Z=this._map;if(Z.length<=65536)return Z.indexOf(P);for(let q in Z)if(Z[q]===P)return 0|q;return-1}amend(P){for(let Z in P)this._map[Z]=P[Z]}}class j0{constructor(P,Z){this.firstChar=P,this.lastChar=Z}get length(){return this.lastChar+1-this.firstChar}forEach(P){for(let Z=this.firstChar,q=this.lastChar;Z<=q;Z++)P(Z,Z)}has(P){return this.firstChar<=P&&P<=this.lastChar}get(P){if(this.firstChar<=P&&P<=this.lastChar)return String.fromCharCode(P)}charCodeOf(P){return Number.isInteger(P)&&P>=this.firstChar&&P<=this.lastChar?P:-1}amend(P){O1("Should not call amend()")}}class r2{constructor(P,Z){this.properties=Z;let q=new RP(P,Z,F7);this.cff=q.parse(),this.cff.duplicateFirstGlyph();let X=new e7(this.cff);this.seacs=this.cff.seacs;try{this.data=X.compile()}catch{v("Failed to compile font "+Z.loadedName),this.data=P}this._createBuiltInEncoding()}get numGlyphs(){return this.cff.charStrings.count}getCharset(){return this.cff.charset.charset}getGlyphMapping(){let P=this.cff,Z=this.properties,{cidToGidMap:q,cMap:X}=Z,z=P.charset.charset,R,f;if(Z.composite){let Q,Y;if(q?.length>0){Q=Object.create(null);for(let W=0,$=q.length;W<$;W++){let _=q[W];_!==void 0&&(Q[_]=W)}}if(R=Object.create(null),P.isCIDFont)for(f=0;f<z.length;f++){let W=z[f];Y=X.charCodeOf(W),Q?.[Y]!==void 0&&(Y=Q[Y]),R[Y]=f}else for(f=0;f<P.charStrings.count;f++)Y=X.charCodeOf(f),R[Y]=f;return R}let G=P.encoding?P.encoding.encoding:null;return Z.isInternalFont&&(G=Z.defaultEncoding),R=WG(Z,G,z),R}hasGlyphId(P){return this.cff.hasGlyphId(P)}_createBuiltInEncoding(){let{charset:P,encoding:Z}=this.cff;if(!P||!Z)return;let q=P.charset,X=Z.encoding,z=[];for(let R in X){let f=X[R];if(f>=0){let G=q[f];G&&(z[R]=G)}}z.length>0&&(this.properties.builtInEncoding=z)}}function z5(P,Z){return I4(P,Z)/16384}function fZ(P){let Z=P.length,q=32768;return Z<1240?q=107:Z<33900&&(q=1131),q}function nI(P,Z,q){let X=S1(P,Z+2)===1?n1(P,Z+8):n1(P,Z+16),z=S1(P,Z+X),R,f,G;if(z===4){S1(P,Z+X+2);let Q=S1(P,Z+X+6)>>1;for(f=Z+X+14,R=[],G=0;G<Q;G++,f+=2)R[G]={end:S1(P,f)};for(f+=2,G=0;G<Q;G++,f+=2)R[G].start=S1(P,f);for(G=0;G<Q;G++,f+=2)R[G].idDelta=S1(P,f);for(G=0;G<Q;G++,f+=2){let Y=S1(P,f);if(Y!==0){R[G].ids=[];for(let W=0,$=R[G].end-R[G].start+1;W<$;W++)R[G].ids[W]=S1(P,f+Y),Y+=2}}return R}if(z===12){let Q=n1(P,Z+X+12);for(f=Z+X+16,R=[],G=0;G<Q;G++)Z=n1(P,f),R.push({start:Z,end:n1(P,f+4),idDelta:n1(P,f+8)-Z}),f+=12;return R}throw new s(`unsupported cmap: ${z}`)}function iI(P,Z,q,X){let z=new RP(new Y8(P,Z,q-Z),{},X).parse();return{glyphs:z.charStrings.objects,subrs:z.topDict.privateDict?.subrsIndex?.objects,gsubrs:z.globalSubrIndex?.objects,isCFFCIDFont:z.isCIDFont,fdSelect:z.fdSelect,fdArray:z.fdArray}}function C3(P,Z){let q=Z.codePointAt(0),X=0,z=0,R=P.length-1;for(;z<R;){let f=z+R+1>>1;q<P[f].start?R=f-1:z=f}return P[z].start<=q&&q<=P[z].end&&(X=P[z].idDelta+(P[z].ids?P[z].ids[q-P[z].start]:q)&65535),{charCode:q,glyphId:X}}function JG(P,Z,q){function X(_,J){Y&&Z.add("L",Y),Y=[_,J],Z.add("M",[_,J])}function z(_,J){Z.add("L",[_,J])}function R(_,J,U,K){Z.add("Q",[_,J,U,K])}let f=0,G=I4(P,f),Q,Y=null,W=0,$=0;if(f+=10,G<0)do{Q=S1(P,f);let _=S1(P,f+2),J,U;f+=4,1&Q?(2&Q?(J=I4(P,f),U=I4(P,f+2)):(J=S1(P,f),U=S1(P,f+2)),f+=4):2&Q?(J=h0(P,f++),U=h0(P,f++)):(J=P[f++],U=P[f++]),2&Q?(W=J,$=U):(W=0,$=0);let K=1,I=1,B=0,j=0;8&Q?(K=I=z5(P,f),f+=2):64&Q?(K=z5(P,f),I=z5(P,f+2),f+=4):128&Q&&(K=z5(P,f),B=z5(P,f+2),j=z5(P,f+4),I=z5(P,f+6),f+=8);let V=q.glyphs[_];V&&(Z.save(),Z.transform([K,B,j,I,W,$]),JG(V,Z,q),Z.restore())}while(32&Q);else{let _=[],J,U;for(J=0;J<G;J++)_.push(S1(P,f)),f+=2;f+=2+S1(P,f);let K=_.at(-1)+1,I=[];for(;I.length<K;){Q=P[f++];let j=1;for(8&Q&&(j+=P[f++]);j-- >0;)I.push({flags:Q})}for(J=0;J<K;J++){switch(18&I[J].flags){case 0:W+=I4(P,f),f+=2;break;case 2:W-=P[f++];break;case 18:W+=P[f++]}I[J].x=W}for(J=0;J<K;J++){switch(36&I[J].flags){case 0:$+=I4(P,f),f+=2;break;case 4:$-=P[f++];break;case 36:$+=P[f++]}I[J].y=$}let B=0;for(f=0;f<G;f++){let j=_[f],V=I.slice(B,j+1);if(1&V[0].flags)V.push(V[0]);else if(1&V.at(-1).flags)V.unshift(V.at(-1));else{let H={flags:1,x:(V[0].x+V.at(-1).x)/2,y:(V[0].y+V.at(-1).y)/2};V.unshift(H),V.push(H)}for(X(V[0].x,V[0].y),J=1,U=V.length;J<U;J++)1&V[J].flags?z(V[J].x,V[J].y):1&V[J+1].flags?(R(V[J].x,V[J].y,V[J+1].x,V[J+1].y),J++):R(V[J].x,V[J].y,(V[J].x+V[J+1].x)/2,(V[J].y+V[J+1].y)/2);B=j+1}}}function GZ(P,Z,q,X){function z(_,J){$&&Z.add("L",$),$=[_,J],Z.add("M",[_,J])}function R(_,J){Z.add("L",[_,J])}function f(_,J,U,K,I,B){Z.add("C",[_,J,U,K,I,B])}let G=[],Q=0,Y=0,W=0,$=null;(function _(J){let U=0;for(;U<J.length;){let K,I,B,j,V,H,M,x,A,k=!1,b=J[U++];switch(b){case 1:case 3:case 18:case 23:W+=G.length>>1,k=!0;break;case 4:Y+=G.pop(),z(Q,Y),k=!0;break;case 5:for(;G.length>0;)Q+=G.shift(),Y+=G.shift(),R(Q,Y);break;case 6:for(;G.length>0&&(Q+=G.shift(),R(Q,Y),G.length!==0);)Y+=G.shift(),R(Q,Y);break;case 7:for(;G.length>0&&(Y+=G.shift(),R(Q,Y),G.length!==0);)Q+=G.shift(),R(Q,Y);break;case 8:for(;G.length>0;)K=Q+G.shift(),B=Y+G.shift(),I=K+G.shift(),j=B+G.shift(),Q=I+G.shift(),Y=j+G.shift(),f(K,B,I,j,Q,Y);break;case 10:if(x=G.pop(),A=null,q.isCFFCIDFont){let O=q.fdSelect.getFDIndex(X);if(O>=0&&O<q.fdArray.length){let p=q.fdArray[O],D;p.privateDict?.subrsIndex&&(D=p.privateDict.subrsIndex.objects),D&&(x+=fZ(D),A=D[x])}else v("Invalid fd index for glyph index.")}else A=q.subrs[x+q.subrsBias];A&&_(A);break;case 11:return;case 12:switch(b=J[U++],b){case 34:K=Q+G.shift(),I=K+G.shift(),V=Y+G.shift(),Q=I+G.shift(),f(K,Y,I,V,Q,V),K=Q+G.shift(),I=K+G.shift(),Q=I+G.shift(),f(K,V,I,Y,Q,Y);break;case 35:K=Q+G.shift(),B=Y+G.shift(),I=K+G.shift(),j=B+G.shift(),Q=I+G.shift(),Y=j+G.shift(),f(K,B,I,j,Q,Y),K=Q+G.shift(),B=Y+G.shift(),I=K+G.shift(),j=B+G.shift(),Q=I+G.shift(),Y=j+G.shift(),f(K,B,I,j,Q,Y),G.pop();break;case 36:K=Q+G.shift(),V=Y+G.shift(),I=K+G.shift(),H=V+G.shift(),Q=I+G.shift(),f(K,V,I,H,Q,H),K=Q+G.shift(),I=K+G.shift(),M=H+G.shift(),Q=I+G.shift(),f(K,H,I,M,Q,Y);break;case 37:let O=Q,p=Y;K=Q+G.shift(),B=Y+G.shift(),I=K+G.shift(),j=B+G.shift(),Q=I+G.shift(),Y=j+G.shift(),f(K,B,I,j,Q,Y),K=Q+G.shift(),B=Y+G.shift(),I=K+G.shift(),j=B+G.shift(),Q=I,Y=j,Math.abs(Q-O)>Math.abs(Y-p)?Q+=G.shift():Y+=G.shift(),f(K,B,I,j,Q,Y);break;default:throw new s(`unknown operator: 12 ${b}`)}break;case 14:if(G.length>=4){let O=G.pop(),p=G.pop();Y=G.pop(),Q=G.pop(),Z.save(),Z.translate(Q,Y);let D=C3(q.cmap,String.fromCharCode(q.glyphNameMap[A4[O]]));GZ(q.glyphs[D.glyphId],Z,q,D.glyphId),Z.restore(),D=C3(q.cmap,String.fromCharCode(q.glyphNameMap[A4[p]])),GZ(q.glyphs[D.glyphId],Z,q,D.glyphId)}return;case 19:case 20:W+=G.length>>1,U+=W+7>>3,k=!0;break;case 21:Y+=G.pop(),Q+=G.pop(),z(Q,Y),k=!0;break;case 22:Q+=G.pop(),z(Q,Y),k=!0;break;case 24:for(;G.length>2;)K=Q+G.shift(),B=Y+G.shift(),I=K+G.shift(),j=B+G.shift(),Q=I+G.shift(),Y=j+G.shift(),f(K,B,I,j,Q,Y);Q+=G.shift(),Y+=G.shift(),R(Q,Y);break;case 25:for(;G.length>6;)Q+=G.shift(),Y+=G.shift(),R(Q,Y);K=Q+G.shift(),B=Y+G.shift(),I=K+G.shift(),j=B+G.shift(),Q=I+G.shift(),Y=j+G.shift(),f(K,B,I,j,Q,Y);break;case 26:for(G.length%2&&(Q+=G.shift());G.length>0;)K=Q,B=Y+G.shift(),I=K+G.shift(),j=B+G.shift(),Q=I,Y=j+G.shift(),f(K,B,I,j,Q,Y);break;case 27:for(G.length%2&&(Y+=G.shift());G.length>0;)K=Q+G.shift(),B=Y,I=K+G.shift(),j=B+G.shift(),Q=I+G.shift(),Y=j,f(K,B,I,j,Q,Y);break;case 28:G.push(I4(J,U)),U+=2;break;case 29:x=G.pop()+q.gsubrsBias,A=q.gsubrs[x],A&&_(A);break;case 30:for(;G.length>0&&(K=Q,B=Y+G.shift(),I=K+G.shift(),j=B+G.shift(),Q=I+G.shift(),Y=j+(G.length===1?G.shift():0),f(K,B,I,j,Q,Y),G.length!==0);)K=Q+G.shift(),B=Y,I=K+G.shift(),j=B+G.shift(),Y=j+G.shift(),Q=I+(G.length===1?G.shift():0),f(K,B,I,j,Q,Y);break;case 31:for(;G.length>0&&(K=Q+G.shift(),B=Y,I=K+G.shift(),j=B+G.shift(),Y=j+G.shift(),Q=I+(G.length===1?G.shift():0),f(K,B,I,j,Q,Y),G.length!==0);)K=Q,B=Y+G.shift(),I=K+G.shift(),j=B+G.shift(),Q=I+G.shift(),Y=j+(G.length===1?G.shift():0),f(K,B,I,j,Q,Y);break;default:if(b<32)throw new s(`unknown operator: ${b}`);b<247?G.push(b-139):b<251?G.push(256*(b-247)+J[U++]+108):b<255?G.push(256*-(b-251)-J[U++]-108):(G.push((J[U]<<24|J[U+1]<<16|J[U+2]<<8|J[U+3])/65536),U+=4)}k&&(G.length=0)}})(P)}class UG{cmds=[];transformStack=[];currentTransform=[1,0,0,1,0,0];add(P,Z){if(Z){let{currentTransform:q}=this;for(let X=0,z=Z.length;X<z;X+=2)s1.applyTransform(Z,q,X);this.cmds.push(`${P}${Z.join(" ")}`)}else this.cmds.push(P)}transform(P){this.currentTransform=s1.transform(this.currentTransform,P)}translate(P,Z){this.transform([1,0,0,1,P,Z])}save(){this.transformStack.push(this.currentTransform.slice())}restore(){this.currentTransform=this.transformStack.pop()||[1,0,0,1,0,0]}getSVG(){return this.cmds.join("")}}class Uq{constructor(P){this.fontMatrix=P,this.compiledGlyphs=Object.create(null),this.compiledCharCodeToGlyphId=Object.create(null)}getPathJs(P){let{charCode:Z,glyphId:q}=C3(this.cmap,P),X,z=this.compiledGlyphs[q];if(z===void 0){try{z=this.compileGlyph(this.glyphs[q],q)}catch(R){z="",X=R}this.compiledGlyphs[q]=z}if(this.compiledCharCodeToGlyphId[Z]??=q,X)throw X;return z}compileGlyph(P,Z){if(!P?.length||P[0]===14)return"";let q=this.fontMatrix;if(this.isCFFCIDFont){let z=this.fdSelect.getFDIndex(Z);if(z>=0&&z<this.fdArray.length)q=this.fdArray[z].getByName("FontMatrix")||H5;else v("Invalid fd index for glyph index.")}t1(e8(q,6),"Expected a valid fontMatrix.");let X=new UG;return X.transform(q.slice()),this.compileGlyphImpl(P,X,Z),X.add("Z"),X.getSVG()}compileGlyphImpl(){O1("Children classes should implement this.")}hasBuiltPath(P){let{charCode:Z,glyphId:q}=C3(this.cmap,P);return this.compiledGlyphs[q]!==void 0&&this.compiledCharCodeToGlyphId[Z]!==void 0}}class IG{static create(P,Z){let q=new Uint8Array(P.data),X,z,R,f,G,Q,Y=S1(q,4);for(let W=0,$=12;W<Y;W++,$+=16){let _=W0(q.subarray($,$+4)),J=n1(q,$+8),U=n1(q,$+12);switch(_){case"cmap":X=nI(q,J);break;case"glyf":z=q.subarray(J,J+U);break;case"loca":R=q.subarray(J,J+U);break;case"head":Q=S1(q,J+18),G=S1(q,J+50);break;case"CFF ":f=iI(q,J,J+U,Z)}}if(z){let W=Q?[1/Q,0,0,1/Q,0,0]:P.fontMatrix;return new KG(function($,_,J){let U,K;J?(U=4,K=n1):(U=2,K=(j,V)=>2*S1(j,V));let I=[],B=K(_,0);for(let j=U;j<_.length;j+=U){let V=K(_,j);I.push($.subarray(B,V)),B=V}return I}(z,R,G),X,W)}return new BG(f,X,P.fontMatrix)}}class jG{constructor({glyfTable:P,isGlyphLocationsLong:Z,locaTable:q,numGlyphs:X}){this.glyphs=[];let z=new DataView(q.buffer,q.byteOffset,q.byteLength),R=new DataView(P.buffer,P.byteOffset,P.byteLength),f=Z?4:2,G=Z?z.getUint32(0):2*z.getUint16(0),Q=0;for(let Y=0;Y<X;Y++){Q+=f;let W=Z?z.getUint32(Q):2*z.getUint16(Q);if(W===G){this.glyphs.push(new O7({}));continue}let $=O7.parse(G,R);this.glyphs.push($),G=W}}getSize(){return Math.sumPrecise(this.glyphs.map((P)=>P.getSize()+3&-4))}write(){let P=this.getSize(),Z=new DataView(new ArrayBuffer(P)),q=P>131070,X=q?4:2,z=new DataView(new ArrayBuffer((this.glyphs.length+1)*X));q?z.setUint32(0,0):z.setUint16(0,0);let R=0,f=0;for(let G of this.glyphs)R+=G.write(R,Z),R=R+3&-4,f+=X,q?z.setUint32(f,R):z.setUint16(f,R>>1);return{isLocationLong:q,loca:new Uint8Array(z.buffer),glyf:new Uint8Array(Z.buffer)}}scale(P){for(let Z=0,q=this.glyphs.length;Z<q;Z++)this.glyphs[Z].scale(P[Z])}}class O7{constructor({header:P=null,simple:Z=null,composites:q=null}){this.header=P,this.simple=Z,this.composites=q}static parse(P,Z){let[q,X]=Kq.parse(P,Z);if(P+=q,X.numberOfContours<0){let R=[];for(;;){let[f,G]=Iq.parse(P,Z);if(P+=f,R.push(G),!(32&G.flags))break}return new O7({header:X,composites:R})}let z=Bq.parse(P,Z,X.numberOfContours);return new O7({header:X,simple:z})}getSize(){if(!this.header)return 0;let P=this.simple?this.simple.getSize():Math.sumPrecise(this.composites.map((Z)=>Z.getSize()));return this.header.getSize()+P}write(P,Z){if(!this.header)return 0;let q=P;if(P+=this.header.write(P,Z),this.simple)P+=this.simple.write(P,Z);else for(let X of this.composites)P+=X.write(P,Z);return P-q}scale(P){if(!this.header)return;let Z=(this.header.xMin+this.header.xMax)/2;if(this.header.scale(Z,P),this.simple)this.simple.scale(Z,P);else for(let q of this.composites)q.scale(Z,P)}}class Kq{constructor({numberOfContours:P,xMin:Z,yMin:q,xMax:X,yMax:z}){this.numberOfContours=P,this.xMin=Z,this.yMin=q,this.xMax=X,this.yMax=z}static parse(P,Z){return[10,new Kq({numberOfContours:Z.getInt16(P),xMin:Z.getInt16(P+2),yMin:Z.getInt16(P+4),xMax:Z.getInt16(P+6),yMax:Z.getInt16(P+8)})]}getSize(){return 10}write(P,Z){return Z.setInt16(P,this.numberOfContours),Z.setInt16(P+2,this.xMin),Z.setInt16(P+4,this.yMin),Z.setInt16(P+6,this.xMax),Z.setInt16(P+8,this.yMax),10}scale(P,Z){this.xMin=Math.round(P+(this.xMin-P)*Z),this.xMax=Math.round(P+(this.xMax-P)*Z)}}class VG{constructor({flags:P,xCoordinates:Z,yCoordinates:q}){this.xCoordinates=Z,this.yCoordinates=q,this.flags=P}}class Bq{constructor({contours:P,instructions:Z}){this.contours=P,this.instructions=Z}static parse(P,Z,q){let X=[];for(let K=0;K<q;K++){let I=Z.getUint16(P);P+=2,X.push(I)}let z=X[q-1]+1,R=Z.getUint16(P);P+=2;let f=new Uint8Array(Z).slice(P,P+R);P+=R;let G=[];for(let K=0;K<z;P++,K++){let I=Z.getUint8(P);if(G.push(I),8&I){let B=Z.getUint8(++P);I^=8;for(let j=0;j<B;j++)G.push(I);K+=B}}let Q=[],Y=[],W=[],$=[],_=[],J=0,U=0;for(let K=0;K<z;K++){let I=G[K];if(2&I){let B=Z.getUint8(P++);U+=16&I?B:-B,Y.push(U)}else 16&I||(U+=Z.getInt16(P),P+=2),Y.push(U);X[J]===K&&(J++,Q.push(Y),Y=[])}U=0,J=0;for(let K=0;K<z;K++){let I=G[K];if(4&I){let B=Z.getUint8(P++);U+=32&I?B:-B,W.push(U)}else 32&I||(U+=Z.getInt16(P),P+=2),W.push(U);$.push(1&I|64&I),X[J]===K&&(Y=Q[J],J++,_.push(new VG({flags:$,xCoordinates:Y,yCoordinates:W})),W=[],$=[])}return new Bq({contours:_,instructions:f})}getSize(){let P=2*this.contours.length+2+this.instructions.length,Z=0,q=0;for(let X of this.contours){P+=X.flags.length;for(let z=0,R=X.xCoordinates.length;z<R;z++){let f=X.xCoordinates[z],G=X.yCoordinates[z],Q=Math.abs(f-Z);Q>255?P+=2:Q>0&&(P+=1),Z=f,Q=Math.abs(G-q),Q>255?P+=2:Q>0&&(P+=1),q=G}}return P}write(P,Z){let q=P,X=[],z=[],R=[],f=0,G=0;for(let Q of this.contours){for(let Y=0,W=Q.xCoordinates.length;Y<W;Y++){let $=Q.flags[Y],_=Q.xCoordinates[Y],J=_-f;if(J===0)$|=16,X.push(0);else{let K=Math.abs(J);K<=255?($|=J>=0?18:2,X.push(K)):X.push(J)}f=_;let U=Q.yCoordinates[Y];if(J=U-G,J===0)$|=32,z.push(0);else{let K=Math.abs(J);K<=255?($|=J>=0?36:4,z.push(K)):z.push(J)}G=U,R.push($)}Z.setUint16(P,X.length-1),P+=2}Z.setUint16(P,this.instructions.length),P+=2,this.instructions.length&&(new Uint8Array(Z.buffer,0,Z.buffer.byteLength).set(this.instructions,P),P+=this.instructions.length);for(let Q of R)Z.setUint8(P++,Q);for(let Q=0,Y=X.length;Q<Y;Q++){let W=X[Q],$=R[Q];2&$?Z.setUint8(P++,W):16&$||(Z.setInt16(P,W),P+=2)}for(let Q=0,Y=z.length;Q<Y;Q++){let W=z[Q],$=R[Q];4&$?Z.setUint8(P++,W):32&$||(Z.setInt16(P,W),P+=2)}return P-q}scale(P,Z){for(let q of this.contours)if(q.xCoordinates.length!==0)for(let X=0,z=q.xCoordinates.length;X<z;X++)q.xCoordinates[X]=Math.round(P+(q.xCoordinates[X]-P)*Z)}}class Iq{constructor({flags:P,glyphIndex:Z,argument1:q,argument2:X,transf:z,instructions:R}){this.flags=P,this.glyphIndex=Z,this.argument1=q,this.argument2=X,this.transf=z,this.instructions=R}static parse(P,Z){let q=P,X=[],z=Z.getUint16(P),R=Z.getUint16(P+2),f,G;P+=4,1&z?(2&z?(f=Z.getInt16(P),G=Z.getInt16(P+2)):(f=Z.getUint16(P),G=Z.getUint16(P+2)),P+=4,z^=1):(2&z?(f=Z.getInt8(P),G=Z.getInt8(P+1)):(f=Z.getUint8(P),G=Z.getUint8(P+1)),P+=2),8&z?(X.push(Z.getUint16(P)),P+=2):64&z?(X.push(Z.getUint16(P),Z.getUint16(P+2)),P+=4):128&z&&(X.push(Z.getUint16(P),Z.getUint16(P+2),Z.getUint16(P+4),Z.getUint16(P+6)),P+=8);let Q=null;if(256&z){let Y=Z.getUint16(P);P+=2,Q=new Uint8Array(Z).slice(P,P+Y),P+=Y}return[P-q,new Iq({flags:z,glyphIndex:R,argument1:f,argument2:G,transf:X,instructions:Q})]}getSize(){let P=4+2*this.transf.length;return 256&this.flags&&(P+=2+this.instructions.length),P+=2,2&this.flags?this.argument1>=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(P+=2):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(P+=2),P}write(P,Z){let q=P;return 2&this.flags?this.argument1>=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(this.flags|=1):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(this.flags|=1),Z.setUint16(P,this.flags),Z.setUint16(P+2,this.glyphIndex),P+=4,1&this.flags?(2&this.flags?(Z.setInt16(P,this.argument1),Z.setInt16(P+2,this.argument2)):(Z.setUint16(P,this.argument1),Z.setUint16(P+2,this.argument2)),P+=4):(Z.setUint8(P,this.argument1),Z.setUint8(P+1,this.argument2),P+=2),256&this.flags&&(Z.setUint16(P,this.instructions.length),P+=2,this.instructions.length&&(new Uint8Array(Z.buffer,0,Z.buffer.byteLength).set(this.instructions,P),P+=this.instructions.length)),P-q}scale(P,Z){}}function k2(P,Z,q){P[Z]=q>>8&255,P[Z+1]=255&q}function iP(P,Z,q){P[Z]=q>>24&255,P[Z+1]=q>>16&255,P[Z+2]=q>>8&255,P[Z+3]=255&q}function Pj(P,Z,q){if(q instanceof Uint8Array)P.set(q,Z);else if(typeof q=="string")for(let X=0,z=q.length;X<z;X++)P[Z++]=255&q.charCodeAt(X);else for(let X of q)P[Z++]=255&X}class y7{constructor(P){this.sfnt=P,this.tables=Object.create(null)}static getSearchParams(P,Z){let q=1,X=0;for(;(q^P)>q;)q<<=1,X++;let z=q*Z;return{range:z,entry:X,rangeShift:Z*P-z}}toArray(){let P=this.sfnt,Z=this.tables,q=Object.keys(Z);q.sort();let X=q.length,z,R,f,G,Q,Y=12+16*X,W=[Y];for(z=0;z<X;z++)G=Z[q[z]],Y+=(G.length+3&-4)>>>0,W.push(Y);let $=new Uint8Array(Y);for(z=0;z<X;z++)G=Z[q[z]],Pj($,W[z],G);P==="true"&&(P=D8(65536)),$[0]=255&P.charCodeAt(0),$[1]=255&P.charCodeAt(1),$[2]=255&P.charCodeAt(2),$[3]=255&P.charCodeAt(3),k2($,4,X);let _=y7.getSearchParams(X,16);for(k2($,6,_.range),k2($,8,_.entry),k2($,10,_.rangeShift),Y=12,z=0;z<X;z++){Q=q[z],$[Y]=255&Q.charCodeAt(0),$[Y+1]=255&Q.charCodeAt(1),$[Y+2]=255&Q.charCodeAt(2),$[Y+3]=255&Q.charCodeAt(3);let J=0;for(R=W[z],f=W[z+1];R<f;R+=4)J=J+n1($,R)>>>0;iP($,Y+4,J),iP($,Y+8,W[z]),iP($,Y+12,Z[Q].length),Y+=16}return $}addTable(P,Z){if(P in this.tables)throw Error("Table "+P+" already exists");this.tables[P]=Z}}class xG{constructor(){this.width=0,this.lsb=0,this.flexing=!1,this.output=[],this.stack=[]}convert(P,Z,q){let X=P.length,z,R,f,G=!1;for(let Q=0;Q<X;Q++){let Y=P[Q];if(Y<32){switch(Y===12&&(Y=(Y<<8)+P[++Q]),Y){case 1:case 3:case 9:case 3072:case 3073:case 3074:case 3105:this.stack=[];break;case 4:if(this.flexing){if(this.stack.length<1){G=!0;break}let U=this.stack.pop();this.stack.push(0,U);break}G=this.executeCommand(1,Zj);break;case 5:G=this.executeCommand(2,qj);break;case 6:G=this.executeCommand(1,Xj);break;case 7:G=this.executeCommand(1,zj);break;case 8:G=this.executeCommand(6,Rj);break;case 10:if(this.stack.length<1){G=!0;break}if(f=this.stack.pop(),!Z[f]){G=!0;break}G=this.convert(Z[f],Z,q);break;case 11:return G;case 13:if(this.stack.length<2){G=!0;break}z=this.stack.pop(),R=this.stack.pop(),this.lsb=R,this.width=z,this.stack.push(z,R),G=this.executeCommand(2,Hz);break;case 14:this.output.push(tP[0]);break;case 21:if(this.flexing)break;G=this.executeCommand(2,xz);break;case 22:if(this.flexing){this.stack.push(0);break}G=this.executeCommand(1,Hz);break;case 30:G=this.executeCommand(4,Gj);break;case 31:G=this.executeCommand(4,Qj);break;case 3078:if(q){let U=this.stack.at(-5);this.seac=this.stack.splice(-4,4),this.seac[0]+=this.lsb-U,G=this.executeCommand(0,tP)}else G=this.executeCommand(4,tP);break;case 3079:if(this.stack.length<4){G=!0;break}this.stack.pop(),z=this.stack.pop();let W=this.stack.pop();R=this.stack.pop(),this.lsb=R,this.width=z,this.stack.push(z,R,W),G=this.executeCommand(3,xz);break;case 3084:if(this.stack.length<2){G=!0;break}let $=this.stack.pop(),_=this.stack.pop();this.stack.push(_/$);break;case 3088:if(this.stack.length<2){G=!0;break}f=this.stack.pop();let J=this.stack.pop();if(f===0&&J===3){let U=this.stack.splice(-17,17);this.stack.push(U[2]+U[0],U[3]+U[1],U[4],U[5],U[6],U[7],U[8],U[9],U[10],U[11],U[12],U[13],U[14]),G=this.executeCommand(13,fj,!0),this.flexing=!1,this.stack.push(U[15],U[16])}else f===1&&J===0&&(this.flexing=!0);break;case 3089:break;default:v('Unknown type 1 charstring command of "'+Y+'"')}if(G)break}else Y<=246?Y-=139:Y=Y<=250?256*(Y-247)+P[++Q]+108:Y<=254?-256*(Y-251)-P[++Q]-108:(255&P[++Q])<<24|(255&P[++Q])<<16|(255&P[++Q])<<8|255&P[++Q],this.stack.push(Y)}return G}executeCommand(P,Z,q){let X=this.stack.length;if(P>X)return!0;let z=X-P;for(let R=z;R<X;R++){let f=this.stack[R];Number.isInteger(f)?this.output.push(28,f>>8&255,255&f):(f=65536*f|0,this.output.push(255,f>>24&255,f>>16&255,f>>8&255,255&f))}return this.output.push(...Z),q?this.stack.splice(z,P):this.stack.length=0,!1}}function c0(P){return P>=48&&P<=57||P>=65&&P<=70||P>=97&&P<=102}function Mz(P,Z,q){if(q>=P.length)return new Uint8Array(0);let X,z,R=0|Z;for(X=0;X<q;X++)R=52845*(P[X]+R)+22719&65535;let f=P.length-q,G=new Uint8Array(f);for(X=q,z=0;z<f;X++,z++){let Q=P[X];G[z]=Q^R>>8,R=52845*(Q+R)+22719&65535}return G}function Az(P){return P===47||P===91||P===93||P===123||P===125||P===40||P===41}class QZ{constructor(P,Z,q){if(Z){let X=P.getBytes(),z=!((c0(X[0])||M0(X[0]))&&c0(X[1])&&c0(X[2])&&c0(X[3])&&c0(X[4])&&c0(X[5])&&c0(X[6])&&c0(X[7]));P=new Y8(z?Mz(X,55665,4):function(R,f,G){let Q=0|f,Y=R.length,W=new Uint8Array(Y>>>1),$,_;for($=0,_=0;$<Y;$++){let J=R[$];if(!c0(J))continue;let U;for($++;$<Y&&!c0(U=R[$]);)$++;if($<Y){let K=parseInt(String.fromCharCode(J,U),16);W[_++]=K^Q>>8,Q=52845*(K+Q)+22719&65535}}return W.slice(G,_)}(X,55665,4))}this.seacAnalysisEnabled=!!q,this.stream=P,this.nextChar()}readNumberArray(){this.getToken();let P=[];for(;;){let Z=this.getToken();if(Z===null||Z==="]"||Z==="}")break;P.push(parseFloat(Z||0))}return P}readNumber(){let P=this.getToken();return parseFloat(P||0)}readInt(){let P=this.getToken();return 0|parseInt(P||0,10)}readBoolean(){return this.getToken()==="true"?1:0}nextChar(){return this.currentChar=this.stream.getByte()}prevChar(){return this.stream.skip(-2),this.currentChar=this.stream.getByte()}getToken(){let P=!1,Z=this.currentChar;for(;;){if(Z===-1)return null;if(P)Z!==10&&Z!==13||(P=!1);else if(Z===37)P=!0;else if(!M0(Z))break;Z=this.nextChar()}if(Az(Z))return this.nextChar(),String.fromCharCode(Z);let q="";do q+=String.fromCharCode(Z),Z=this.nextChar();while(Z>=0&&!M0(Z)&&!Az(Z));return q}readCharStrings(P,Z){return Z===-1?P:Mz(P,4330,Z)}extractFontProgram(P){let Z=this.stream,q=[],X=[],z=Object.create(null);z.lenIV=4;let R={subrs:[],charstrings:[],properties:{privateData:z}},f,G,Q,Y;for(;(f=this.getToken())!==null;)if(f==="/")switch(f=this.getToken(),f){case"CharStrings":for(this.getToken(),this.getToken(),this.getToken(),this.getToken();f=this.getToken(),f!==null&&f!=="end";){if(f!=="/")continue;let $=this.getToken();G=this.readInt(),this.getToken(),Q=G>0?Z.getBytes(G):new Uint8Array(0),Y=R.properties.privateData.lenIV;let _=this.readCharStrings(Q,Y);this.nextChar(),f=this.getToken(),f==="noaccess"?this.getToken():f==="/"&&this.prevChar(),X.push({glyph:$,encoded:_})}break;case"Subrs":for(this.readInt(),this.getToken();this.getToken()==="dup";){let $=this.readInt();G=this.readInt(),this.getToken(),Q=G>0?Z.getBytes(G):new Uint8Array(0),Y=R.properties.privateData.lenIV;let _=this.readCharStrings(Q,Y);this.nextChar(),f=this.getToken(),f==="noaccess"&&this.getToken(),q[$]=_}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":let W=this.readNumberArray();W.length>0&&W.length;break;case"StemSnapH":case"StemSnapV":R.properties.privateData[f]=this.readNumberArray();break;case"StdHW":case"StdVW":R.properties.privateData[f]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"LanguageGroup":R.properties.privateData[f]=this.readNumber();break;case"ExpansionFactor":R.properties.privateData[f]=this.readNumber()||0.06;break;case"ForceBold":R.properties.privateData[f]=this.readBoolean()}for(let{encoded:W,glyph:$}of X){let _=new xG,J=_.convert(W,q,this.seacAnalysisEnabled),U=_.output;J&&(U=[14]);let K={glyphName:$,charstring:U,width:_.width,lsb:_.lsb,seac:_.seac};if($===".notdef"?R.charstrings.unshift(K):R.charstrings.push(K),P.builtInEncoding){let I=P.builtInEncoding.indexOf($);I>-1&&P.widths[I]===void 0&&I>=P.firstChar&&I<=P.lastChar&&(P.widths[I]=_.width)}}return R}extractFontHeader(P){let Z;for(;(Z=this.getToken())!==null;)if(Z==="/")switch(Z=this.getToken(),Z){case"FontMatrix":let q=this.readNumberArray();P.fontMatrix=q;break;case"Encoding":let X=this.getToken(),z;if(/^\d+$/.test(X)){z=[];let f=0|parseInt(X,10);this.getToken();for(let G=0;G<f;G++){for(Z=this.getToken();Z!=="dup"&&Z!=="def";)if(Z=this.getToken(),Z===null)return;if(Z==="def")break;let Q=this.readInt();this.getToken();let Y=this.getToken();z[Q]=Y,this.getToken()}}else z=v7(X);P.builtInEncoding=z;break;case"FontBBox":let R=this.readNumberArray();P.ascent=Math.max(R[3],R[1]),P.descent=Math.min(R[1],R[3]),P.ascentScaled=!0}}}function Lz(P,Z,q){let X=P.length,z=Z.length,R=X-z,f=q,G=!1;for(;f<R;){let Q=0;for(;Q<z&&P[f+Q]===Z[Q];)Q++;if(Q>=z){for(f+=Q;f<X&&M0(P[f]);)f++;G=!0;break}f++}return{found:G,length:f}}class HG{constructor(P,Z,q){let X=q.length1;q.length2;let z=Z.peekBytes(6),R=z[0]===128&&z[1]===1;R&&(Z.skip(6),X=z[5]<<24|z[4]<<16|z[3]<<8|z[2]);let f=function(_,J){let U=[101,101,120,101,99],K=_.pos,I,B,j,V;try{I=_.getBytes(J),B=I.length}catch{}if(B===J&&(j=Lz(I,U,J-2*U.length),j.found&&j.length===J))return{stream:new Y8(I),length:J};for(v('Invalid "Length1" property in Type1 font -- trying to recover.'),_.pos=K;j=Lz(_.peekBytes(2048),U,0),j.length!==0;)if(_.pos+=j.length,j.found){V=_.pos-K;break}return _.pos=K,V?{stream:new Y8(_.getBytes(V)),length:V}:(v('Unable to recover "Length1" property in Type1 font -- using as is.'),{stream:new Y8(_.getBytes(J)),length:J})}(Z,X);new QZ(f.stream,!1,F7).extractFontHeader(q),R&&(z=Z.getBytes(6),z[5],z[4],z[3],z[2]);let G=function(_){let J=_.getBytes();if(J.length===0)throw new s("getEexecBlock - no font program found.");return{stream:new Y8(J),length:J.length}}(Z),Q=new QZ(G.stream,!0,F7).extractFontProgram(q);for(let _ in Q.properties)q[_]=Q.properties[_];let Y=Q.charstrings,W=this.getType2Charstrings(Y),$=this.getType2Subrs(Q.subrs);this.charstrings=Y,this.data=this.wrap(P,W,this.charstrings,$,q),this.seacs=this.getSeacs(Q.charstrings)}get numGlyphs(){return this.charstrings.length+1}getCharset(){let P=[".notdef"];for(let{glyphName:Z}of this.charstrings)P.push(Z);return P}getGlyphMapping(P){let Z=this.charstrings;if(P.composite){let f=Object.create(null);for(let G=0,Q=Z.length;G<Q;G++)f[P.cMap.charCodeOf(G)]=G+1;return f}let q=[".notdef"],X,z;for(z=0;z<Z.length;z++)q.push(Z[z].glyphName);let R=P.builtInEncoding;if(R){X=Object.create(null);for(let f in R)z=q.indexOf(R[f]),z>=0&&(X[f]=z)}return WG(P,X,q)}hasGlyphId(P){if(P<0||P>=this.numGlyphs)return!1;if(P===0)return!0;return this.charstrings[P-1].charstring.length>0}getSeacs(P){let Z=[];for(let q=0,X=P.length;q<X;q++){let z=P[q];z.seac&&(Z[q+1]=z.seac)}return Z}getType2Charstrings(P){let Z=[];for(let q of P)Z.push(q.charstring);return Z}getType2Subrs(P){let Z=0,q=P.length;Z=q<1133?107:q<33769?1131:32768;let X=[],z;for(z=0;z<Z;z++)X.push([11]);for(z=0;z<q;z++)X.push(P[z]);return X}wrap(P,Z,q,X,z){let R=new Wq;R.header=new $q(1,0,4,4),R.names=[P];let f=new S7;f.setByName("version",391),f.setByName("Notice",392),f.setByName("FullName",393),f.setByName("FamilyName",394),f.setByName("Weight",395),f.setByName("Encoding",null),f.setByName("FontMatrix",z.fontMatrix),f.setByName("FontBBox",z.bbox),f.setByName("charset",null),f.setByName("CharStrings",null),f.setByName("Private",null),R.topDict=f;let G=new fP;G.add("Version 0.11"),G.add("See original notice"),G.add(P),G.add(P),G.add("Medium"),R.strings=G,R.globalSubrIndex=new x4;let Q=Z.length,Y=[".notdef"],W,$;for(W=0;W<Q;W++){let I=q[W].glyphName;h2.indexOf(I)===-1&&G.add(I),Y.push(I)}R.charset=new P6(!1,0,Y);let _=new x4;for(_.add([139,14]),W=0;W<Q;W++)_.add(Z[W]);R.charStrings=_;let J=new m7;J.setByName("Subrs",null);let U=["BlueValues","OtherBlues","FamilyBlues","FamilyOtherBlues","StemSnapH","StemSnapV","BlueShift","BlueFuzz","BlueScale","LanguageGroup","ExpansionFactor","ForceBold","StdHW","StdVW"];for(W=0,$=U.length;W<$;W++){let I=U[W];if(!(I in z.privateData))continue;let B=z.privateData[I];if(Array.isArray(B))for(let j=B.length-1;j>0;j--)B[j]-=B[j-1];J.setByName(I,B)}R.topDict.privateDict=J;let K=new x4;for(W=0,$=X.length;W<$;W++)K.add(X[W]);return J.subrsIndex=K,new e7(R).compile()}}function bz(P){if(!P.fontMatrix)return;if(P.fontMatrix[0]===H5[0])return;let Z=0.001/P.fontMatrix[0],q=P.widths;for(let X in q)q[X]*=Z;P.defaultWidth*=Z}function kz(P){if(!P.fallbackToUnicode)return;if(P.toUnicode instanceof j0)return;let Z=[];for(let q in P.fallbackToUnicode)P.toUnicode.has(q)||(Z[q]=P.fallbackToUnicode[q]);Z.length>0&&P.toUnicode.amend(Z)}class MG{constructor(P,Z,q,X,z,R,f,G,Q){this.originalCharCode=P,this.fontChar=Z,this.unicode=q,this.accent=X,this.width=z,this.vmetric=R,this.operatorListId=f,this.isSpace=G,this.isInFont=Q}get category(){return q1(this,"category",function(P){let Z=ZZ.get(P);if(Z)return Z;let q=P.match(EI),X={isWhitespace:!!q?.[1],isZeroWidthDiacritic:!!q?.[2],isInvisibleFormatMark:!!q?.[3]};return ZZ.set(P,X),X}(this.unicode),!0)}}function R5(P,Z){return(P<<8)+Z}function E6(P,Z,q){P[Z+1]=q,P[Z]=q>>>8}function U0(P,Z){let q=(P<<8)+Z;return 32768&q?q-65536:q}function l1(P){return String.fromCharCode(P>>8&255,255&P)}function f5(P){return P>32767?P=32767:P<-32768&&(P=-32768),String.fromCharCode(P>>8&255,255&P)}function AG(P){return W0(P.peekBytes(4))==="ttcf"}function $j(P,{type:Z,subtype:q,composite:X}){let z,R;return function(f){let G=f.peekBytes(4);return n1(G,0)===65536||W0(G)==="true"}(P)||AG(P)?z=X?"CIDFontType2":"TrueType":!function(f){return W0(f.peekBytes(4))==="OTTO"}(P)?!function(f){let G=f.peekBytes(2);return G[0]===37&&G[1]===33||G[0]===128&&G[1]===1}(P)?!function(f){let G=f.peekBytes(4);return G[0]>=1&&G[3]>=1&&G[3]<=4}(P)?(v("getFontFileType: Unable to detect correct font file Type/Subtype."),z=Z,R=q):X?(z="CIDFontType0",R="CIDFontType0C"):(z=Z==="MMType1"?"MMType1":"Type1",R="Type1C"):z=X?"CIDFontType0":Z==="MMType1"?"MMType1":"Type1":z=X?"CIDFontType2":"OpenType",[z,R]}function C2(P,Z){for(let q in Z)P[+q]=Z[q]}function eP(P,Z,q){let X=[],z;for(let R=0,f=P.length;R<f;R++)z=V6(P[R],Z),z!==-1&&(X[R]=z);for(let R in q)z=V6(q[R],Z),z!==-1&&(X[+R]=z);return X}function _j(P){return P.platform===1&&P.encoding===0&&P.language===0}function Cz(P){return P.platform===3&&P.encoding===1&&P.language===1033}function P9(P,Z,q=!1){switch(Z.length){case 1:return Z.charCodeAt(0);case 2:return Z.charCodeAt(0)<<8|Z.charCodeAt(1)}let X=`Unsupported CID string (charCode ${P}): "${Z}".`;if(q)throw new s(X);return v(X),Z}function Tz(P,Z,q,X){let z=Object.create(null),R=new Map,f=[],G=new Set,Q=0,Y=Q4[Q][0],W=Q4[Q][1],$=(J)=>Q4[0][0]<=J&&J<=Q4[0][1]||Q4[1][0]<=J&&J<=Q4[1][1],_=null;for(let J in P){let U=P[J];if(!Z(U))continue;if(Y>W){if(Q++,Q>=Q4.length){v("Ran out of space in font private use area.");break}Y=Q4[Q][0],W=Q4[Q][1]}let K=Y++;U===0&&(U=q);let I=X.get(J);if(typeof I=="string")if(I.length===1)I=I.codePointAt(0);else{if(!_){_=new Map;for(let B=64256;B<=64335;B++){let j=String.fromCharCode(B).normalize("NFKD");j.length>1&&_.set(j,B)}}I=_.get(I)||I.codePointAt(0)}!I||$(I)||G.has(U)||(R.set(I,U),G.add(U)),z[K]=U,f[J]=K}return{toFontChar:f,charCodeToGlyphId:z,toUnicodeExtraMap:R,nextAvailableFontCharCode:Y}}function Nz(P,Z,q){let X=function(p,D,n){let F=[];for(let L in p)p[L]>=n||F.push({fontCharCode:0|L,glyphId:p[L]});if(D)for(let[L,m]of D)m>=n||F.push({fontCharCode:L,glyphId:m});F.length===0&&F.push({fontCharCode:0,glyphId:0}),F.sort((L,m)=>L.fontCharCode-m.fontCharCode);let l=[],C=F.length;for(let L=0;L<C;){let m=F[L].fontCharCode,d=[F[L].glyphId];++L;let e=m;for(;L<C&&e+1===F[L].fontCharCode&&(d.push(F[L].glyphId),++e,++L,e!==65535););l.push([m,e,d])}return l}(P,Z,q),z=X.at(-1)[1]>65535?2:1,R,f,G,Q,Y="\x00\x00"+l1(z)+"\x00\x03\x00\x01"+D8(4+8*z);for(R=X.length-1;R>=0&&!(X[R][0]<=65535);--R);let W=R+1;X[R][0]<65535&&X[R][1]===65535&&(X[R][1]=65534);let $=X[R][1]<65535?1:0,_=W+$,J=y7.getSearchParams(_,2),U,K,I,B,j="",V="",H="",M="",x="",A=0;for(R=0,f=W;R<f;R++){U=X[R],K=U[0],I=U[1],j+=l1(K),V+=l1(I),B=U[2];let p=!0;for(G=1,Q=B.length;G<Q;++G)if(B[G]!==B[G-1]+1){p=!1;break}if(p)H+=l1(B[0]-K&65535),M+=l1(0);else{let D=2*(_-R)+2*A;for(A+=I-K+1,H+=l1(0),M+=l1(D),G=0,Q=B.length;G<Q;++G)x+=l1(B[G])}}$>0&&(V+="ÿÿ",j+="ÿÿ",H+="\x00\x01",M+="\x00\x00");let k="\x00\x00"+l1(2*_)+l1(J.range)+l1(J.entry)+l1(J.rangeShift)+V+"\x00\x00"+j+H+M+x,b="",O="";if(z>1){for(Y+=`\x00\x03\x00
|
|
4
|
+
`+D8(4+8*z+4+k.length),b="",R=0,f=X.length;R<f;R++){U=X[R],K=U[0],B=U[2];let p=B[0];for(G=1,Q=B.length;G<Q;++G)B[G]!==B[G-1]+1&&(I=U[0]+G-1,b+=D8(K)+D8(I)+D8(p),K=I+1,p=B[G]);b+=D8(K)+D8(U[1])+D8(p)}O="\x00\f\x00\x00"+D8(b.length+16)+"\x00\x00\x00\x00"+D8(b.length/12)}return Y+"\x00\x04"+l1(k.length+4)+k+O+b}function vz(P,Z,q){q||={unitsPerEm:0,yMax:0,yMin:0,ascent:0,descent:0};let X=0,z=0,R=0,f=0,G=null,Q=0,Y=-1;if(Z){for(let B in Z)if(B|=0,(G>B||!G)&&(G=B),Q<B&&(Q=B),Y=wI(B,Y),Y<32)X|=1<<Y;else if(Y<64)z|=1<<Y-32;else if(Y<96)R|=1<<Y-64;else{if(!(Y<123))throw new s("Unicode ranges Bits > 123 are reserved for internal usage");f|=1<<Y-96}Q>65535&&(Q=65535)}else G=0,Q=255;let W=P.bbox||[0,0,0,0],$=q.unitsPerEm||(P.fontMatrix?1/Math.max(...P.fontMatrix.slice(0,4).map(Math.abs)):1000),_=P.ascentScaled?1:$/Y5,J=q.ascent||Math.round(_*(P.ascent||W[3])),U=q.descent||Math.round(_*(P.descent||W[1]));U>0&&P.descent>0&&W[1]<0&&(U=-U);let K=q.yMax||J,I=-q.yMin||-U;return"\x00\x03\x02$\x01ô\x00\x05\x00\x00\x02\x02»\x00\x00\x00\x02\x02»\x00\x00\x01ß\x001\x01\x02\x00\x00\x00\x00\x06"+String.fromCharCode(P.fixedPitch?9:0)+"\x00\x00\x00\x00\x00\x00"+D8(X)+D8(z)+D8(R)+D8(f)+"*21*"+l1(P.italicAngle?1:0)+l1(G||P.firstChar)+l1(Q||P.lastChar)+l1(J)+l1(U)+"\x00d"+l1(K)+l1(I)+"\x00\x00\x00\x00\x00\x00\x00\x00"+l1(P.xHeight)+l1(P.capHeight)+l1(0)+l1(G||P.firstChar)+"\x00\x03"}function Fz(P){return"\x00\x03\x00\x00"+D8(Math.floor(65536*P.italicAngle))+"\x00\x00\x00\x00"+D8(P.fixedPitch?1:0)+"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"}function Jj(P){return P.replaceAll(/[^\x21-\x7E]|[[\](){}<>/%]/g,"").slice(0,63)}function Z9(P,Z){Z||(Z=[[],[]]);let q=[Z[0][0]||"Original licence",Z[0][1]||P,Z[0][2]||"Unknown",Z[0][3]||"uniqueID",Z[0][4]||P,Z[0][5]||"Version 0.11",Z[0][6]||Jj(P),Z[0][7]||"Unknown",Z[0][8]||"Unknown",Z[0][9]||"Unknown"],X=[],z,R,f,G,Q;for(z=0,R=q.length;z<R;z++){Q=Z[1][z]||q[z];let I=[];for(f=0,G=Q.length;f<G;f++)I.push(l1(Q.charCodeAt(f)));X.push(I.join(""))}let Y=[q,X],W=["\x00\x01","\x00\x03"],$=["\x00\x00","\x00\x01"],_=["\x00\x00","\x04\t"],J=q.length*W.length,U="\x00\x00"+l1(J)+l1(12*J+6),K=0;for(z=0,R=W.length;z<R;z++){let I=Y[z];for(f=0,G=I.length;f<G;f++)Q=I[f],U+=W[z]+$[z]+_[z]+l1(f)+l1(Q.length)+l1(K),K+=Q.length}return U+=q.join("")+X.join(""),U}class YZ{constructor(P,Z,q,X){this.name=P,this.psName=null,this.mimetype=null,this.disableFontFace=X.disableFontFace,this.fontExtraProperties=X.fontExtraProperties,this.loadedName=q.loadedName,this.isType3Font=q.isType3Font,this.missingFile=!1,this.cssFontInfo=q.cssFontInfo,this._charsCache=Object.create(null),this._glyphCache=Object.create(null);let z=!!(q.flags&QG);if(!z&&!q.isSimulatedFlags){let Y=p7(),W=zZ(),$=Jq();for(let _ of P.split("+")){let J=_.replaceAll(/[,_]/g,"-");if(J=Y[J]||W[J]||J,J=J.split("-",1)[0],$[J]){z=!0;break}}}this.isSerifFont=z,this.isSymbolicFont=!!(q.flags&k3),this.isMonospace=!!(q.flags&qZ);let{type:R,subtype:f}=q;this.type=R,this.subtype=f,this.systemFontInfo=q.systemFontInfo;let G=P.match(/^InvalidPDFjsFont_(.*)_\d+$/);if(this.isInvalidPDFjsFont=!!G,this.isInvalidPDFjsFont?this.fallbackName=G[1]:this.isMonospace?this.fallbackName="monospace":this.isSerifFont?this.fallbackName="serif":this.fallbackName="sans-serif",this.systemFontInfo?.guessFallback&&(this.systemFontInfo.guessFallback=!1,this.systemFontInfo.css+=`,${this.fallbackName}`),this.differences=q.differences,this.widths=q.widths,this.defaultWidth=q.defaultWidth,this.composite=q.composite,this.cMap=q.cMap,this.capHeight=q.capHeight/Y5,this.ascent=q.ascent/Y5,this.descent=q.descent/Y5,this.lineHeight=this.ascent-this.descent,this.fontMatrix=q.fontMatrix,this.bbox=q.bbox,this.defaultEncoding=q.defaultEncoding,this.toUnicode=q.toUnicode,this.toFontChar=[],q.type==="Type3"){for(let Y=0;Y<256;Y++)this.toFontChar[Y]=this.differences[Y]||q.defaultEncoding[Y];return}if(this.cidEncoding=q.cidEncoding||"",this.vertical=!!q.vertical,this.vertical&&(this.vmetrics=q.vmetrics,this.defaultVMetrics=q.defaultVMetrics),!Z||Z.isEmpty)return Z&&v('Font file is empty in "'+P+'" ('+this.loadedName+")"),void this.fallbackToSystemFont(q);let Q;[R,f]=$j(Z,q),R===this.type&&f===this.subtype||v1(`Inconsistent font file Type/SubType, expected: ${this.type}/${this.subtype} but found: ${R}/${f}.`);try{switch(R){case"MMType1":v1("MMType1 font ("+P+"), falling back to Type1.");case"Type1":case"CIDFontType0":this.mimetype="font/opentype";let Y=f==="Type1C"||f==="CIDFontType0C"?new r2(Z,q):new HG(P,Z,q);bz(q),Q=this.convert(P,Y,q);break;case"OpenType":case"TrueType":case"CIDFontType2":this.mimetype="font/opentype",Q=this.checkAndRepair(P,Z,q),bz(q),this.isOpenType&&(R="OpenType");break;default:throw new s(`Font ${R} is not supported`)}}catch(Y){return v(Y),void this.fallbackToSystemFont(q)}kz(q),this.data=Q,this.type=R,this.subtype=f,this.fontMatrix=q.fontMatrix,this.widths=q.widths,this.defaultWidth=q.defaultWidth,this.toUnicode=q.toUnicode,this.seacMap=q.seacMap}get renderer(){return q1(this,"renderer",IG.create(this,F7))}exportData(){let P=Object.create(null);for(let q of Yj){let X=this[q];X!==void 0&&(P[q]=X)}if(!this.fontExtraProperties)return{data:P};let Z=Object.create(null);for(let q of Wj){let X=this[q];X!==void 0&&(Z[q]=X)}return{data:P,extra:Z}}fallbackToSystemFont(P){this.missingFile=!0;let{name:Z,type:q}=this,X=t7(Z),z=p7(),R=zZ(),f=!!z[X],G=!(!R[X]||!z[R[X]]);X=z[X]||R[X]||X;let Q=eI()[X];Q&&(isNaN(this.ascent)&&(this.ascent=Q.ascent/Y5),isNaN(this.descent)&&(this.descent=Q.descent/Y5),isNaN(this.capHeight)&&(this.capHeight=Q.capHeight/Y5)),this.bold=/bold/gi.test(X),this.italic=/oblique|italic/gi.test(X),this.black=/Black/g.test(Z);let Y=/Narrow/g.test(Z);if(this.remeasure=(!f||Y)&&Object.keys(this.widths).length>0,(f||G)&&q==="CIDFontType2"&&this.cidEncoding.startsWith("Identity-")){let W=P.cidToGidMap,$=[];if(C2($,Iz()),/Arial-?Black/i.test(Z)?C2($,oI()):/Calibri/i.test(Z)&&C2($,aI()),W){for(let _ in $){let J=$[_];W[J]!==void 0&&($[+_]=W[J])}W.length!==this.toUnicode.length&&P.hasIncludedToUnicodeMap&&this.toUnicode instanceof j0&&this.toUnicode.forEach(function(_,J){let U=$[_];W[U]===void 0&&($[+_]=J)})}this.toUnicode instanceof j0||this.toUnicode.forEach(function(_,J){$[+_]=J}),this.toFontChar=$,this.toUnicode=new Z6($)}else if(/Symbol/i.test(X))this.toFontChar=eP(Qq,l0(),this.differences);else if(/Dingbats/i.test(X))this.toFontChar=eP(Yq,yI(),this.differences);else if(f||G){let W=eP(this.defaultEncoding,l0(),this.differences);q!=="CIDFontType2"||this.cidEncoding.startsWith("Identity-")||this.toUnicode instanceof j0||this.toUnicode.forEach(function($,_){W[+$]=_}),this.toFontChar=W}else{let W=l0(),$=[];this.toUnicode.forEach((_,J)=>{if(!this.composite){let U=V6(this.differences[_]||this.defaultEncoding[_],W);U!==-1&&(J=U)}$[+_]=J}),this.composite&&this.toUnicode instanceof j0&&/Tahoma|Verdana/i.test(Z)&&C2($,Iz()),this.toFontChar=$}kz(P),this.loadedName=X.split("-",1)[0]}checkAndRepair(P,Z,q){let X=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "];function z(C,L){let m=Object.create(null);m["OS/2"]=null,m.cmap=null,m.head=null,m.hhea=null,m.hmtx=null,m.maxp=null,m.name=null,m.post=null;for(let d=0;d<L;d++){let e=R(C);X.includes(e.tag)&&(e.length!==0&&(m[e.tag]=e))}return m}function R(C){let L=C.getString(4),m=C.getInt32()>>>0,d=C.getInt32()>>>0,e=C.getInt32()>>>0,E=C.pos;C.pos=C.start||0,C.skip(d);let y=C.getBytes(e);return C.pos=E,L==="head"&&(y[8]=y[9]=y[10]=y[11]=0,y[17]|=32),{tag:L,checksum:m,length:e,offset:d,data:y}}function f(C){return{version:C.getString(4),numTables:C.getUint16(),searchRange:C.getUint16(),entrySelector:C.getUint16(),rangeShift:C.getUint16()}}function G(C,L,m,d,e,E){let y={length:0,sizeOfInstructions:0};if(L<0||L>=C.length||m>C.length||m-L<=12)return y;let N=C.subarray(L,m),h=U0(N[2],N[3]),w=U0(N[4],N[5]),c=U0(N[6],N[7]),o=U0(N[8],N[9]);h>c&&(E6(N,2,c),E6(N,6,h)),w>o&&(E6(N,4,o),E6(N,8,w));let G1=U0(N[0],N[1]);if(G1<0)return G1<-1||(d.set(N,e),y.length=N.length),y;let r,Z1=10,z1=0;for(r=0;r<G1;r++)z1=(N[Z1]<<8|N[Z1+1])+1,Z1+=2;let V1=Z1,U1=N[Z1]<<8|N[Z1+1];y.sizeOfInstructions=U1,Z1+=2+U1;let Q1=Z1,H1=0;for(r=0;r<z1;r++){let W1=N[Z1++];192&W1&&(N[Z1-1]=63&W1);let k1=2;2&W1?k1=1:16&W1&&(k1=0);let B1=2;4&W1?B1=1:32&W1&&(B1=0);let Y1=k1+B1;if(H1+=Y1,8&W1){let _1=N[Z1++];_1===0&&(N[Z1-1]^=8),r+=_1,H1+=_1*Y1}}if(H1===0)return y;let J1=Z1+H1;return J1>N.length?y:!E&&U1>0?(d.set(N.subarray(0,V1),e),d.set([0,0],e+V1),d.set(N.subarray(Q1,J1),e+V1+2),J1-=U1,N.length-J1>3&&(J1=J1+3&-4),y.length=J1,y):N.length-J1>3?(J1=J1+3&-4,d.set(N.subarray(0,J1),e),y.length=J1,y):(d.set(N,e),y.length=N.length,y)}function Q(C){let L=(Z.start||0)+C.offset;Z.pos=L;let m=[[],[]],d=[],e=C.length,E=L+e;if(Z.getUint16()!==0||e<6)return[m,d];let y=Z.getUint16(),N=Z.getUint16(),h,w;for(h=0;h<y&&Z.pos+12<=E;h++){let c={platform:Z.getUint16(),encoding:Z.getUint16(),language:Z.getUint16(),name:Z.getUint16(),length:Z.getUint16(),offset:Z.getUint16()};(_j(c)||Cz(c))&&d.push(c)}for(h=0,w=d.length;h<w;h++){let c=d[h];if(c.length<=0)continue;let o=L+N+c.offset;if(o+c.length>E)continue;Z.pos=o;let G1=c.name;if(c.encoding){let r="";for(let Z1=0,z1=c.length;Z1<z1;Z1+=2)r+=String.fromCharCode(Z.getUint16());m[1][G1]=r}else m[0][G1]=Z.getString(c.length)}return[m,d]}let Y=[0,0,0,0,0,0,0,0,-2,-2,-2,-2,0,0,-2,-5,-1,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,-1,-1,1,-1,-999,0,1,0,-1,-2,0,-1,-2,-1,-1,0,-1,-1,0,0,-999,-999,-1,-1,-1,-1,-2,-999,-2,-2,-999,0,-2,-2,0,0,-2,0,-2,0,0,0,-2,-1,-1,1,1,0,0,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,0,-999,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,-2,-999,-999,-999,-999,-999,-1,-1,-2,-2,0,0,0,0,-1,-1,-999,-2,-2,0,0,-1,-2,-2,0,0,0,-1,-1,-1,-2];function W(C,L){let m,d,e,E,y,N=C.data,h=0,w=0,c=0,o=[],G1=[],r=[],Z1=L.tooComplexToFollowFunctions,z1=!1,V1=0,U1=0;for(let H1=N.length;h<H1;){let J1=N[h++];if(J1===64)if(d=N[h++],z1||U1)h+=d;else for(m=0;m<d;m++)o.push(N[h++]);else if(J1===65)if(d=N[h++],z1||U1)h+=2*d;else for(m=0;m<d;m++)e=N[h++],o.push(e<<8|N[h++]);else if((248&J1)==176)if(d=J1-176+1,z1||U1)h+=d;else for(m=0;m<d;m++)o.push(N[h++]);else if((248&J1)==184)if(d=J1-184+1,z1||U1)h+=2*d;else for(m=0;m<d;m++)e=N[h++],o.push(U0(e,N[h++]));else if(J1!==43||Z1)if(J1!==44||Z1){if(J1===45)if(z1)z1=!1,w=h;else{if(y=G1.pop(),!y)return v("TT: ENDF bad stack"),void(L.hintsValid=!1);E=r.pop(),N=y.data,h=y.i,L.functionsStackDeltas[E]=o.length-y.stackTop}else if(J1===137)(z1||U1)&&(v("TT: nested IDEFs not allowed"),Z1=!0),z1=!0,c=h;else if(J1===88)++V1;else if(J1===27)U1=V1;else if(J1===89)U1===V1&&(U1=0),--V1;else if(J1===28&&!z1&&!U1){let W1=o.at(-1);W1>0&&(h+=W1-1)}}else(z1||U1)&&(v("TT: nested FDEFs not allowed"),Z1=!0),z1=!0,c=h,E=o.pop(),L.functionsDefined[E]={data:N,i:h};else if(!z1&&!U1){if(E=o.at(-1),isNaN(E))v1("TT: CALL empty stack (or invalid entry).");else if(L.functionsUsed[E]=!0,E in L.functionsStackDeltas){let W1=o.length+L.functionsStackDeltas[E];if(W1<0)return v("TT: CALL invalid functions stack delta."),void(L.hintsValid=!1);o.length=W1}else if(E in L.functionsDefined&&!r.includes(E)){if(G1.push({data:N,i:h,stackTop:o.length-1}),r.push(E),y=L.functionsDefined[E],!y)return v("TT: CALL non-existent function"),void(L.hintsValid=!1);N=y.data,h=y.i}}if(!z1&&!U1){let W1=0;for(J1<=142?W1=Y[J1]:J1>=192&&J1<=223?W1=-1:J1>=224&&(W1=-2),J1>=113&&J1<=117&&(d=o.pop(),isNaN(d)||(W1=2*-d));W1<0&&o.length>0;)o.pop(),W1++;for(;W1>0;)o.push(NaN),W1--}}L.tooComplexToFollowFunctions=Z1;let Q1=[N];h>N.length&&Q1.push(new Uint8Array(h-N.length)),c>w&&(v("TT: complementing a missing function tail"),Q1.push(new Uint8Array([34,45]))),function(H1,J1){if(J1.length>1){let W1,k1,B1=0;for(W1=0,k1=J1.length;W1<k1;W1++)B1+=J1[W1].length;B1=B1+3&-4;let Y1=new Uint8Array(B1),_1=0;for(W1=0,k1=J1.length;W1<k1;W1++)Y1.set(J1[W1],_1),_1+=J1[W1].length;H1.data=Y1,H1.length=B1}}(C,Q1)}let $,_,J,U;if(AG(Z=new Y8(new Uint8Array(Z.getBytes())))){let C=function(L,m){let{numFonts:d,offsetTable:e}=function(N){let h=N.getString(4);t1(h==="ttcf","Must be a TrueType Collection font.");let w=N.getUint16(),c=N.getUint16(),o=N.getInt32()>>>0,G1=[];for(let Z1=0;Z1<o;Z1++)G1.push(N.getInt32()>>>0);let r={ttcTag:h,majorVersion:w,minorVersion:c,numFonts:o,offsetTable:G1};switch(w){case 1:return r;case 2:return r.dsigTag=N.getInt32()>>>0,r.dsigLength=N.getInt32()>>>0,r.dsigOffset=N.getInt32()>>>0,r}throw new s(`Invalid TrueType Collection majorVersion: ${w}.`)}(L),E=m.split("+"),y;for(let N=0;N<d;N++){L.pos=(L.start||0)+e[N];let h=f(L),w=z(L,h.numTables);if(!w.name)throw new s('TrueType Collection font must contain a "name" table.');let[c]=Q(w.name);for(let o=0,G1=c.length;o<G1;o++)for(let r=0,Z1=c[o].length;r<Z1;r++){let z1=c[o][r]?.replaceAll(/\s/g,"");if(z1){if(z1===m)return{header:h,tables:w};if(!(E.length<2))for(let V1 of E)z1===V1&&(y={name:V1,header:h,tables:w})}}}if(y)return v(`TrueType Collection does not contain "${m}" font, falling back to "${y.name}" font instead.`),{header:y.header,tables:y.tables};throw new s(`TrueType Collection does not contain "${m}" font.`)}(Z,this.name);$=C.header,_=C.tables}else $=f(Z),_=z(Z,$.numTables);let K=!_["CFF "];if(K){if(!_.loca)throw new s('Required "loca" table is not found');_.glyf||(v('Required "glyf" table is not found -- trying to recover.'),_.glyf={tag:"glyf",data:new Uint8Array(0)}),this.isOpenType=!1}else{let C=q.composite&&(q.cidToGidMap?.length>0||!(q.cMap instanceof b5));if($.version==="OTTO"&&!C||!_.head||!_.hhea||!_.maxp||!_.post)return U=new Y8(_["CFF "].data),J=new r2(U,q),this.convert(P,J,q);delete _.glyf,delete _.loca,delete _.fpgm,delete _.prep,delete _["cvt "],this.isOpenType=!0}if(!_.maxp)throw new s('Required "maxp" table is not found');Z.pos=(Z.start||0)+_.maxp.offset;let I=Z.getInt32(),B=Z.getUint16();if(I!==65536&&I!==20480){if(_.maxp.length===6)I=20480;else{if(!(_.maxp.length>=32))throw new s('"maxp" table has a wrong version number');I=65536}j=_.maxp.data,H=I,j[(V=0)+3]=255&H,j[V+2]=H>>>8,j[V+1]=H>>>16,j[V]=H>>>24}var j,V,H;if(q.scaleFactors?.length===B&&K){let{scaleFactors:C}=q,L=R5(_.head.data[50],_.head.data[51]),m=new jG({glyfTable:_.glyf.data,isGlyphLocationsLong:L,locaTable:_.loca.data,numGlyphs:B});m.scale(C);let{glyf:d,loca:e,isLocationLong:E}=m.write();_.glyf.data=d,_.loca.data=e,E!==!!L&&(_.head.data[50]=0,_.head.data[51]=E?1:0);let y=_.hmtx.data;for(let N=0;N<B;N++){let h=4*N,w=Math.round(C[N]*R5(y[h],y[h+1]));y[h]=w>>8&255,y[h+1]=255&w,E6(y,h+2,Math.round(C[N]*U0(y[h+2],y[h+3])))}}let M=B+1,x=!0;M>65535&&(x=!1,M=B,v("Not enough space in glyfs to duplicate first glyph."));let A=0,k=0;if(I>=65536&&_.maxp.length>=32)Z.pos+=8,Z.getUint16()>2&&(_.maxp.data[14]=0,_.maxp.data[15]=2),Z.pos+=4,A=Z.getUint16(),Z.pos+=4,k=Z.getUint16();_.maxp.data[4]=M>>8,_.maxp.data[5]=255&M;let b=function(C,L,m,d){let e={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};if(C&&W(C,e),L&&W(L,e),C&&function(E,y){if(!E.tooComplexToFollowFunctions){if(E.functionsDefined.length>y)return v("TT: more functions defined than expected"),void(E.hintsValid=!1);for(let N=0,h=E.functionsUsed.length;N<h;N++){if(N>y)return v("TT: invalid function id: "+N),void(E.hintsValid=!1);if(E.functionsUsed[N]&&!E.functionsDefined[N])return v("TT: undefined function: "+N),void(E.hintsValid=!1)}}}(e,d),m&&1&m.length){let E=new Uint8Array(m.length+1);E.set(m.data),m.data=E}return e.hintsValid}(_.fpgm,_.prep,_["cvt "],A);if(b||(delete _.fpgm,delete _.prep,delete _["cvt "]),function(C,L,m,d,e,E){if(!L)return void(m&&(m.data=null));C.pos=(C.start||0)+L.offset,C.pos+=4,C.pos+=2,C.pos+=2,C.pos+=2,C.pos+=2,C.pos+=2,C.pos+=2,C.pos+=2,C.pos+=2,C.pos+=2;let y=C.getUint16();C.pos+=8,C.pos+=2;let N=C.getUint16();if(y!==0)2&R5(d.data[44],d.data[45])||(L.data[22]=0,L.data[23]=0);N>e&&(v1(`The numOfMetrics (${N}) should not be greater than the numGlyphs (${e}).`),N=e,L.data[34]=(65280&N)>>8,L.data[35]=255&N);let h=e-N-(m.length-4*N>>1);if(h>0){let w=new Uint8Array(m.length+2*h);w.set(m.data),E&&(w[m.length]=m.data[2],w[m.length+1]=m.data[3]),m.data=w}}(Z,_.hhea,_.hmtx,_.head,M,x),!_.head)throw new s('Required "head" table is not found');(function(C,L,m){let d=C.data,e=(E=d[0],y=d[1],N=d[2],h=d[3],(E<<24)+(y<<16)+(N<<8)+h);var E,y,N,h;e>>16!=1&&(v1("Attempting to fix invalid version in head table: "+e),d[0]=0,d[1]=1,d[2]=0,d[3]=0);let w=R5(d[50],d[51]);if(w<0||w>1){v1("Attempting to fix invalid indexToLocFormat in head table: "+w);let c=L+1;if(m===c<<1)d[50]=0,d[51]=0;else{if(m!==c<<2)throw new s("Could not fix indexToLocFormat: "+w);d[50]=0,d[51]=1}}})(_.head,B,K?_.loca.length:0);let O=Object.create(null);if(K){let C=R5(_.head.data[50],_.head.data[51]),L=function(m,d,e,E,y,N,h){let w,c,o;E?(w=4,c=function(Y1,_1){return Y1[_1]<<24|Y1[_1+1]<<16|Y1[_1+2]<<8|Y1[_1+3]},o=function(Y1,_1,w1){Y1[_1]=w1>>>24&255,Y1[_1+1]=w1>>16&255,Y1[_1+2]=w1>>8&255,Y1[_1+3]=255&w1}):(w=2,c=function(Y1,_1){return Y1[_1]<<9|Y1[_1+1]<<1},o=function(Y1,_1,w1){Y1[_1]=w1>>9&255,Y1[_1+1]=w1>>1&255});let G1=N?e+1:e,r=w*(1+G1),Z1=new Uint8Array(r);Z1.set(m.data.subarray(0,r)),m.data=Z1;let z1=d.data,V1=z1.length,U1=new Uint8Array(V1),Q1,H1,J1=[];for(Q1=0,H1=0;Q1<e+1;Q1++,H1+=w){let Y1=c(Z1,H1);Y1>V1&&(Y1=V1),J1.push({index:Q1,offset:Y1,endOffset:0})}for(J1.sort((Y1,_1)=>Y1.offset-_1.offset),Q1=0;Q1<e;Q1++)J1[Q1].endOffset=J1[Q1+1].offset;for(J1.sort((Y1,_1)=>Y1.index-_1.index),Q1=0;Q1<e;Q1++){let{offset:Y1,endOffset:_1}=J1[Q1];if(Y1!==0||_1!==0)break;let w1=J1[Q1+1].offset;if(w1!==0){J1[Q1].endOffset=w1;break}}let W1=J1.at(-2);W1.offset!==0&&W1.endOffset===0&&(W1.endOffset=V1);let k1=Object.create(null),B1=0;for(o(Z1,0,B1),Q1=0,H1=w;Q1<e;Q1++,H1+=w){let Y1=G(z1,J1[Q1].offset,J1[Q1].endOffset,U1,B1,y),_1=Y1.length;_1===0&&(k1[Q1]=!0),Y1.sizeOfInstructions>h&&(h=Y1.sizeOfInstructions),B1+=_1,o(Z1,H1,B1)}if(B1===0){let Y1=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(Q1=0,H1=w;Q1<G1;Q1++,H1+=w)o(Z1,H1,Y1.length);d.data=Y1}else if(N){let Y1=c(Z1,w);U1.length>Y1+B1?d.data=U1.subarray(0,Y1+B1):(d.data=new Uint8Array(Y1+B1),d.data.set(U1.subarray(0,B1))),d.data.set(U1.subarray(0,Y1),B1),o(m.data,Z1.length-w,B1+Y1)}else d.data=U1.subarray(0,B1);return{missingGlyphs:k1,maxSizeOfInstructions:h}}(_.loca,_.glyf,B,C,b,x,k);O=L.missingGlyphs,I>=65536&&_.maxp.length>=32&&(_.maxp.data[26]=L.maxSizeOfInstructions>>8,_.maxp.data[27]=255&L.maxSizeOfInstructions)}if(!_.hhea)throw new s('Required "hhea" table is not found');_.hhea.data[10]===0&&_.hhea.data[11]===0&&(_.hhea.data[10]=255,_.hhea.data[11]=255);let p={unitsPerEm:R5(_.head.data[18],_.head.data[19]),yMax:U0(_.head.data[42],_.head.data[43]),yMin:U0(_.head.data[38],_.head.data[39]),ascent:U0(_.hhea.data[4],_.hhea.data[5]),descent:U0(_.hhea.data[6],_.hhea.data[7]),lineGap:U0(_.hhea.data[8],_.hhea.data[9])};this.ascent=p.ascent/p.unitsPerEm,this.descent=p.descent/p.unitsPerEm,this.lineGap=p.lineGap/p.unitsPerEm,this.cssFontInfo?.lineHeight?(this.lineHeight=this.cssFontInfo.metrics.lineHeight,this.lineGap=this.cssFontInfo.metrics.lineGap):this.lineHeight=this.ascent-this.descent+this.lineGap,_.post&&function(C,L,m){let d=(Z.start||0)+C.offset;Z.pos=d;let e=d+C.length,E=Z.getInt32(),y;Z.skip(28);let N,h=!0;switch(E){case 65536:y=Bz;break;case 131072:let w=Z.getUint16();if(w!==m){h=!1;break}let c=[];for(N=0;N<w;++N){let r=Z.getUint16();if(r>=32768){h=!1;break}c.push(r)}if(!h)break;let o=[],G1=[];for(;Z.pos<e;){let r=Z.getByte();for(G1.length=r,N=0;N<r;++N)G1[N]=String.fromCharCode(Z.getByte());o.push(G1.join(""))}for(y=[],N=0;N<w;++N){let r=c[N];r<258?y.push(Bz[r]):y.push(o[r-258])}break;case 196608:break;default:v("Unknown/unsupported post table version "+E),h=!1,L.defaultEncoding&&(y=L.defaultEncoding)}L.glyphNames=y}(_.post,q,B),_.post={tag:"post",data:Fz(q)};let D=Object.create(null);function n(C){return!O[C]}if(q.composite){let C=q.cidToGidMap||[],L=C.length===0;q.cMap.forEach(function(m,d){if(typeof d=="string"&&(d=P9(m,d,!0)),d>65535)throw new s("Max size of CID is 65,535");let e=-1;L?e=d:C[d]!==void 0&&(e=C[d]),e>=0&&e<B&&n(e)&&(D[m]=e)})}else{let C=function(y,N,h,w){if(!y)return v("No cmap table available."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};let c,o=(N.start||0)+y.offset;N.pos=o,N.skip(2);let G1=N.getUint16(),r,Z1=!1;for(let k1=0;k1<G1;k1++){let B1=N.getUint16(),Y1=N.getUint16(),_1=N.getInt32()>>>0,w1=!1;if(r?.platformId!==B1||r?.encodingId!==Y1){if(B1!==0||Y1!==0&&Y1!==1&&Y1!==3)if(B1===1&&Y1===0)w1=!0;else if(B1!==3||Y1!==1||!w&&r){if(h&&B1===3&&Y1===0){w1=!0;let J0=!0;if(k1<G1-1){let i1=N.peekBytes(2);R5(i1[0],i1[1])<B1&&(J0=!1)}J0&&(Z1=!0)}}else w1=!0,h||(Z1=!0);else w1=!0;if(w1&&(r={platformId:B1,encodingId:Y1,offset:_1}),Z1)break}}if(r&&(N.pos=o+r.offset),!r||N.peekByte()===-1)return v("Could not find a preferred cmap table."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};let z1=N.getUint16(),V1=!1,U1=[],Q1,H1;if(z1===0){for(N.skip(4),Q1=0;Q1<256;Q1++){let k1=N.getByte();k1&&U1.push({charCode:Q1,glyphId:k1})}V1=!0}else if(z1===2){N.skip(4);let k1=[],B1=0;for(let _1=0;_1<256;_1++){let w1=N.getUint16()>>3;k1.push(w1),B1=Math.max(w1,B1)}let Y1=[];for(let _1=0;_1<=B1;_1++)Y1.push({firstCode:N.getUint16(),entryCount:N.getUint16(),idDelta:U0(N.getByte(),N.getByte()),idRangePos:N.pos+N.getUint16()});for(let _1=0;_1<256;_1++)if(k1[_1]===0)N.pos=Y1[0].idRangePos+2*_1,H1=N.getUint16(),U1.push({charCode:_1,glyphId:H1});else{let w1=Y1[k1[_1]];for(Q1=0;Q1<w1.entryCount;Q1++){let J0=(_1<<8)+Q1+w1.firstCode;N.pos=w1.idRangePos+2*Q1,H1=N.getUint16(),H1!==0&&(H1=(H1+w1.idDelta)%65536),U1.push({charCode:J0,glyphId:H1})}}}else if(z1===4){N.skip(4);let k1=N.getUint16()>>1;N.skip(6);let B1=[],Y1;for(Y1=0;Y1<k1;Y1++)B1.push({end:N.getUint16()});for(N.skip(2),Y1=0;Y1<k1;Y1++)B1[Y1].start=N.getUint16();for(Y1=0;Y1<k1;Y1++)B1[Y1].delta=N.getUint16();let _1,w1=0;for(Y1=0;Y1<k1;Y1++){c=B1[Y1];let i1=N.getUint16();i1?(_1=(i1>>1)-(k1-Y1),c.offsetIndex=_1,w1=Math.max(w1,_1+c.end-c.start+1)):c.offsetIndex=-1}let J0=[];for(Q1=0;Q1<w1;Q1++)J0.push(N.getUint16());for(Y1=0;Y1<k1;Y1++){c=B1[Y1],o=c.start;let{end:i1,delta:Z5}=c;for(_1=c.offsetIndex,Q1=o;Q1<=i1;Q1++)Q1!==65535&&(H1=_1<0?Q1:J0[_1+Q1-o],H1=H1+Z5&65535,U1.push({charCode:Q1,glyphId:H1}))}}else if(z1===6){N.skip(4);let k1=N.getUint16(),B1=N.getUint16();for(Q1=0;Q1<B1;Q1++){H1=N.getUint16();let Y1=k1+Q1;U1.push({charCode:Y1,glyphId:H1})}}else{if(z1!==12)return v("cmap table has unsupported format: "+z1),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};{N.skip(10);let k1=N.getInt32()>>>0;for(Q1=0;Q1<k1;Q1++){let B1=N.getInt32()>>>0,Y1=N.getInt32()>>>0,_1=N.getInt32()>>>0;for(let w1=B1;w1<=Y1;w1++)U1.push({charCode:w1,glyphId:_1++})}}}U1.sort((k1,B1)=>k1.charCode-B1.charCode);let J1=[],W1=new Set;for(let k1 of U1){let{charCode:B1}=k1;W1.has(B1)||(W1.add(B1),J1.push(k1))}return{platformId:r.platformId,encodingId:r.encodingId,mappings:J1,hasShortCmap:V1}}(_.cmap,Z,this.isSymbolicFont,q.hasEncoding),L=C.platformId,m=C.encodingId,d=C.mappings,e=[],E=!1;if(!q.hasEncoding||q.baseEncodingName!=="MacRomanEncoding"&&q.baseEncodingName!=="WinAnsiEncoding"||(e=v7(q.baseEncodingName)),q.hasEncoding&&!this.isSymbolicFont&&(L===3&&m===1||L===1&&m===0)){let y=l0();for(let N=0;N<256;N++){let h;if(h=this.differences[N]!==void 0?this.differences[N]:e.length&&e[N]!==""?e[N]:A4[N],!h)continue;let w=YG(h,y),c;if(L===3&&m===1?c=y[w]:L===1&&m===0&&(c=Gq.indexOf(w)),c===void 0){if(!q.glyphNames&&q.hasIncludedToUnicodeMap&&!(this.toUnicode instanceof j0)){let o=this.toUnicode.get(N);o&&(c=o.codePointAt(0))}if(c===void 0)continue}for(let o of d)if(o.charCode===c){D[N]=o.glyphId;break}}}else if(L===0){for(let y of d)D[y.charCode]=y.glyphId;E=!0}else if(L===3&&m===0)for(let y of d){let N=y.charCode;N>=61440&&N<=61695&&(N&=255),D[N]=y.glyphId}else for(let y of d)D[y.charCode]=y.glyphId;if(q.glyphNames&&(e.length||this.differences.length))for(let y=0;y<256;++y){if(!E&&D[y]!==void 0)continue;let N=this.differences[y]||e[y];if(!N)continue;let h=q.glyphNames.indexOf(N);h>0&&n(h)&&(D[y]=h)}}D.length===0&&(D[0]=0);let F=M-1;if(x||(F=0),!q.cssFontInfo){let C=Tz(D,n,F,this.toUnicode);this.toFontChar=C.toFontChar,_.cmap={tag:"cmap",data:Nz(C.charCodeToGlyphId,C.toUnicodeExtraMap,M)},_["OS/2"]&&function(L,m){m.pos=(m.start||0)+L.offset;let d=m.getUint16();m.skip(60);let e=m.getUint16();return!(d<4&&768&e)&&(!(m.getUint16()>m.getUint16())&&(m.skip(6),m.getUint16()!==0&&(L.data[8]=L.data[9]=0,!0)))}(_["OS/2"],Z)||(_["OS/2"]={tag:"OS/2",data:vz(q,C.charCodeToGlyphId,p)})}if(!K)try{U=new Y8(_["CFF "].data),J=new RP(U,q,F7).parse(),J.duplicateFirstGlyph();let C=new e7(J);_["CFF "].data=C.compile()}catch{v("Failed to compile font "+q.loadedName)}if(_.name){let[C,L]=Q(_.name);_.name.data=Z9(P,C),this.psName=C[0][6]||null,q.composite||function(m,d,e){if(m.isInternalFont)return;if(m.hasIncludedToUnicodeMap)return;if(m.hasEncoding)return;if(m.toUnicode instanceof j0)return;if(!d)return;if(e.length===0)return;if(m.defaultEncoding===N7)return;for(let h of e)if(!Cz(h))return;let E=N7,y=[],N=l0();for(let h in E){let w=E[h];if(w==="")continue;let c=N[w];c!==void 0&&(y[h]=String.fromCharCode(c))}y.length>0&&m.toUnicode.amend(y)}(q,this.isSymbolicFont,L)}else _.name={tag:"name",data:Z9(this.name)};let l=new y7($.version);for(let C in _)l.addTable(C,_[C].data);return l.toArray()}convert(P,Z,q){q.fixedPitch=!1,q.builtInEncoding&&function(U,K){if(U.isInternalFont)return;if(U.hasIncludedToUnicodeMap)return;if(K===U.defaultEncoding)return;if(U.toUnicode instanceof j0)return;let I=[],B=l0();for(let j in K){if(U.hasEncoding&&(U.baseEncodingName||U.differences[j]!==void 0))continue;let V=V6(K[j],B);V!==-1&&(I[j]=String.fromCharCode(V))}I.length>0&&U.toUnicode.amend(I)}(q,q.builtInEncoding);let X=1;Z instanceof r2&&(X=Z.numGlyphs-1);let z=Z.getGlyphMapping(q),R=null,f=z,G=null;q.cssFontInfo||(R=Tz(z,Z.hasGlyphId.bind(Z),X,this.toUnicode),this.toFontChar=R.toFontChar,f=R.charCodeToGlyphId,G=R.toUnicodeExtraMap);let Q=Z.numGlyphs;function Y(U,K){let I=null;for(let B in U)K===U[B]&&(I||=[]).push(0|B);return I}function W(U,K){for(let I in U)if(K===U[I])return 0|I;return R.charCodeToGlyphId[R.nextAvailableFontCharCode]=K,R.nextAvailableFontCharCode++}let $=Z.seacs;if(R&&$?.length){let U=q.fontMatrix||H5,K=Z.getCharset(),I=Object.create(null);for(let B in $){B|=0;let j=$[B],V=A4[j[2]],H=A4[j[3]],M=K.indexOf(V),x=K.indexOf(H);if(M<0||x<0)continue;let A={x:j[0]*U[0]+j[1]*U[2]+U[4],y:j[0]*U[1]+j[1]*U[3]+U[5]},k=Y(z,B);if(k)for(let b of k){let O=R.charCodeToGlyphId,p=W(O,M),D=W(O,x);I[b]={baseFontCharCode:p,accentFontCharCode:D,accentOffset:A}}}q.seacMap=I}let _=q.fontMatrix?1/Math.max(...q.fontMatrix.slice(0,4).map(Math.abs)):1000,J=new y7("OTTO");return J.addTable("CFF ",Z.data),J.addTable("OS/2",vz(q,f)),J.addTable("cmap",Nz(f,G,Q)),J.addTable("head","\x00\x01\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00_\x0F<õ\x00\x00"+f5(_)+"\x00\x00\x00\x00\v~'\x00\x00\x00\x00\v~'\x00\x00"+f5(q.descent)+"\x0Fÿ"+f5(q.ascent)+l1(q.italicAngle?2:0)+"\x00\x11\x00\x00\x00\x00\x00\x00"),J.addTable("hhea","\x00\x01\x00\x00"+f5(q.ascent)+f5(q.descent)+"\x00\x00ÿÿ\x00\x00\x00\x00\x00\x00"+f5(q.capHeight)+f5(Math.tan(q.italicAngle)*q.xHeight)+"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"+l1(Q)),J.addTable("hmtx",function(){let U=Z.charstrings,K=Z.cff?Z.cff.widths:null,I="\x00\x00\x00\x00";for(let B=1,j=Q;B<j;B++){let V=0;if(U){let H=U[B-1];V="width"in H?H.width:0}else K&&(V=Math.ceil(K[B]||0));I+=l1(V)+l1(0)}return I}()),J.addTable("maxp","\x00\x00P\x00"+l1(Q)),J.addTable("name",Z9(P)),J.addTable("post",Fz(q)),J.toArray()}get _spaceWidth(){let P=["space","minus","one","i","I"],Z;for(let q of P){if(q in this.widths){Z=this.widths[q];break}let X=l0()[q],z=0;if(this.composite&&this.cMap.contains(X)&&(z=this.cMap.lookup(X),typeof z=="string"&&(z=P9(X,z))),!z&&this.toUnicode&&(z=this.toUnicode.charCodeOf(X)),z<=0&&(z=X),Z=this.widths[z],Z)break}return q1(this,"_spaceWidth",Z||this.defaultWidth)}_charToGlyph(P,Z=!1){let q,X,z,R=this._glyphCache[P];if(R?.isSpace===Z)return R;let f=P;this.cMap?.contains(P)&&(f=this.cMap.lookup(P),typeof f=="string"&&(f=P9(P,f))),X=this.widths[f],typeof X!="number"&&(X=this.defaultWidth);let G=this.vmetrics?.[f],Q=this.toUnicode.get(P)||P;typeof Q=="number"&&(Q=String.fromCharCode(Q));let Y=this.toFontChar[P]!==void 0;if(q=this.toFontChar[P]||P,this.missingFile){let J=this.differences[P]||this.defaultEncoding[P];J!==".notdef"&&J!==""||this.type!=="Type1"||(q=32,J===""&&(X||=this._spaceWidth,Q=String.fromCharCode(q))),q=(W=q)>=65520&&W<=65535?0:W>=62976&&W<=63743?DI()[W]||W:W===173?45:W}var W;this.isType3Font&&(z=q);let $=null;if(this.seacMap?.[P]){Y=!0;let J=this.seacMap[P];q=J.baseFontCharCode,$={fontChar:String.fromCodePoint(J.accentFontCharCode),offset:J.accentOffset}}let _="";if(typeof q=="number"&&(q<=1114111?_=String.fromCodePoint(q):v(`charToGlyph - invalid fontCharCode: ${q}`)),this.missingFile&&this.vertical&&_.length===1){let J=uI()[_.charCodeAt(0)];J&&(_=Q=String.fromCharCode(J))}return R=new MG(P,_,Q,$,X,G,z,Z,Y),this._glyphCache[P]=R}charsToGlyphs(P){let Z=this._charsCache[P];if(Z)return Z;if(Z=[],this.cMap){let q=Object.create(null),X=P.length,z=0;for(;z<X;){this.cMap.readCharCode(P,z,q);let{charcode:R,length:f}=q;z+=f;let G=this._charToGlyph(R,f===1&&P.charCodeAt(z-1)===32);Z.push(G)}}else for(let q=0,X=P.length;q<X;++q){let z=P.charCodeAt(q),R=this._charToGlyph(z,z===32);Z.push(R)}return this._charsCache[P]=Z}getCharPositions(P){let Z=[];if(this.cMap){let q=Object.create(null),X=0;for(;X<P.length;){this.cMap.readCharCode(P,X,q);let z=q.length;Z.push([X,X+z]),X+=z}}else for(let q=0,X=P.length;q<X;++q)Z.push([q,q+1]);return Z}get glyphCacheValues(){return Object.values(this._glyphCache)}encodeString(P){let Z=[],q=[],X=()=>Z.length%2==1,z=this.toUnicode instanceof j0?(R)=>this.toUnicode.charCodeOf(R):(R)=>this.toUnicode.charCodeOf(String.fromCodePoint(R));for(let R=0,f=P.length;R<f;R++){let G=P.codePointAt(R);if(G>55295&&(G<57344||G>65533)&&R++,this.toUnicode){let Q=z(G);if(Q!==-1){X()&&(Z.push(q.join("")),q.length=0);for(let Y=(this.cMap?this.cMap.getCharCodeLength(Q):1)-1;Y>=0;Y--)q.push(String.fromCharCode(Q>>8*Y&255));continue}}X()||(Z.push(q.join("")),q.length=0),q.push(String.fromCodePoint(G))}return Z.push(q.join("")),Z}}class WZ{constructor(P){this.error=P,this.loadedName="g_font_error",this.missingFile=!0}charsToGlyphs(){return[]}encodeString(P){return[P]}exportData(){return{error:this.error}}}class TG{constructor(){O1("Cannot initialize Pattern.")}static parseShading(P,Z,q,X,z,R){let f=P instanceof T1?P.dict:P,G=f.get("ShadingType");try{switch(G){case $Z:case l2:return new NG(f,Z,q,X,z,R);case LG:case bG:case kG:case CG:return new y4(P,Z,q,X,z,R);default:throw new s("Unsupported ShadingType: "+G)}}catch(Q){if(Q instanceof q8)throw Q;return v(Q),new SG}}}class $6{static SMALL_NUMBER=0.000001;getIR(){O1("Abstract method `getIR` called.")}}class vG{constructor(P,Z){this.stream=P,this.context=Z,this.buffer=0,this.bufferLength=0;let q=Z.numComps;this.tmpCompsBuf=new Float32Array(q);let X=Z.colorSpace.numComps;this.tmpCsCompsBuf=Z.colorFn?new Float32Array(X):this.tmpCompsBuf}get hasData(){if(this.stream.end)return this.stream.pos<this.stream.end;if(this.bufferLength>0)return!0;let P=this.stream.getByte();return!(P<0)&&(this.buffer=P,this.bufferLength=8,!0)}readBits(P){let{stream:Z}=this,{buffer:q,bufferLength:X}=this;if(P===32){if(X===0)return Z.getInt32()>>>0;q=q<<24|Z.getByte()<<16|Z.getByte()<<8|Z.getByte();let z=Z.getByte();return this.buffer=z&(1<<X)-1,(q<<8-X|(255&z)>>X)>>>0}if(P===8&&X===0)return Z.getByte();for(;X<P;)q=q<<8|Z.getByte(),X+=8;return X-=P,this.bufferLength=X,this.buffer=q&(1<<X)-1,q>>X}align(){this.buffer=0,this.bufferLength=0}readFlag(){return this.readBits(this.context.bitsPerFlag)}readCoordinate(){let{bitsPerCoordinate:P,decode:Z}=this.context,q=this.readBits(P),X=this.readBits(P),z=P<32?1/((1<<P)-1):0.00000000023283064365386963;return[q*z*(Z[1]-Z[0])+Z[0],X*z*(Z[3]-Z[2])+Z[2]]}readComponents(){let{bitsPerComponent:P,colorFn:Z,colorSpace:q,decode:X,numComps:z}=this.context,R=P<32?1/((1<<P)-1):0.00000000023283064365386963,f=this.tmpCompsBuf;for(let Q=0,Y=4;Q<z;Q++,Y+=2){let W=this.readBits(P);f[Q]=W*R*(X[Y+1]-X[Y])+X[Y]}let G=this.tmpCsCompsBuf;return Z?.(f,0,G,0),q.getRgb(G,0)}}function Sz(P){return FG[P]||=function(Z){let q=[];for(let X=0;X<=Z;X++){let z=X/Z,R=1-z;q.push(new Float32Array([R**3,3*z*R**2,3*z**2*R,z**3]))}return q}(P)}function mz(P,Z,q){let X=g4(Z.getArray("Matrix"),w0),z=k4(Z.getArray("BBox"),null);if(!z||z[2]-z[0]===0||z[3]-z[1]===0)throw new s("Invalid getTilingPatternIR /BBox array.");let R=Z.get("XStep");if(typeof R!="number")throw new s("Invalid getTilingPatternIR /XStep value.");let f=Z.get("YStep");if(typeof f!="number")throw new s("Invalid getTilingPatternIR /YStep value.");let G=Z.get("PaintType");if(!Number.isInteger(G))throw new s("Invalid getTilingPatternIR /PaintType value.");let Q=Z.get("TilingType");if(!Number.isInteger(Q))throw new s("Invalid getTilingPatternIR /TilingType value.");return["TilingPattern",q,P,X,z,R,f,G,Q]}function jq(P){let Z=t7(P);return rj()[Z]}function mG(P){let Z=function(R){let f=jq(R);if(!f)return null;let{baseWidths:G,baseMapping:Q,factors:Y}=f,W=Y?G.map((U,K)=>U*Y[K]):G,$,_=-2,J=[];for(let[U,K]of Q.map((I,B)=>[I,B]).sort(([I],[B])=>I-B))U!==-1&&(U===_+1?($.push(W[K]),_+=1):(_=U,$=[W[K]],J.push(U,$)));return J}(P),q=new S(null);q.set("BaseFont",t.get(P)),q.set("Type",t.get("Font")),q.set("Subtype",t.get("CIDFontType2")),q.set("Encoding",t.get("Identity-H")),q.set("CIDToGIDMap",t.get("Identity")),q.set("W",Z),q.set("FirstChar",Z[0]),q.set("LastChar",Z.at(-2)+Z.at(-1).length-1);let X=new S(null);q.set("FontDescriptor",X);let z=new S(null);return z.set("Ordering","Identity"),z.set("Registry","Adobe"),z.set("Supplement",0),q.set("CIDSystemInfo",z),q}class pG{constructor(P){this.lexer=P,this.operators=[],this.token=null,this.prev=null}nextToken(){this.prev=this.token,this.token=this.lexer.getToken()}accept(P){return this.token.type===P&&(this.nextToken(),!0)}expect(P){if(this.accept(P))return!0;throw new s(`Unexpected symbol: found ${this.token.type} expected ${P}.`)}parse(){return this.nextToken(),this.expect(r8.LBRACE),this.parseBlock(),this.expect(r8.RBRACE),this.operators}parseBlock(){for(;;)if(this.accept(r8.NUMBER))this.operators.push(this.prev.value);else if(this.accept(r8.OPERATOR))this.operators.push(this.prev.value);else{if(!this.accept(r8.LBRACE))return;this.parseCondition()}}parseCondition(){let P=this.operators.length;if(this.operators.push(null,null),this.parseBlock(),this.expect(r8.RBRACE),this.accept(r8.IF))this.operators[P]=this.operators.length,this.operators[P+1]="jz";else{if(!this.accept(r8.LBRACE))throw new s("PS Function: error parsing conditional.");{let Z=this.operators.length;this.operators.push(null,null);let q=this.operators.length;this.parseBlock(),this.expect(r8.RBRACE),this.expect(r8.IFELSE),this.operators[Z]=this.operators.length,this.operators[Z+1]="j",this.operators[P]=q,this.operators[P+1]="jz"}}}}class x0{static get opCache(){return q1(this,"opCache",Object.create(null))}constructor(P,Z){this.type=P,this.value=Z}static getOperator(P){return x0.opCache[P]||=new x0(r8.OPERATOR,P)}static get LBRACE(){return q1(this,"LBRACE",new x0(r8.LBRACE,"{"))}static get RBRACE(){return q1(this,"RBRACE",new x0(r8.RBRACE,"}"))}static get IF(){return q1(this,"IF",new x0(r8.IF,"IF"))}static get IFELSE(){return q1(this,"IFELSE",new x0(r8.IFELSE,"IFELSE"))}}class OG{constructor(P){this.stream=P,this.nextChar(),this.strBuf=[]}nextChar(){return this.currentChar=this.stream.getByte()}getToken(){let P=!1,Z=this.currentChar;for(;;){if(Z<0)return F8;if(P)Z!==10&&Z!==13||(P=!1);else if(Z===37)P=!0;else if(!M0(Z))break;Z=this.nextChar()}switch(0|Z){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return new x0(r8.NUMBER,this.getNumber());case 123:return this.nextChar(),x0.LBRACE;case 125:return this.nextChar(),x0.RBRACE}let q=this.strBuf;for(q.length=0,q[0]=String.fromCharCode(Z);(Z=this.nextChar())>=0&&(Z>=65&&Z<=90||Z>=97&&Z<=122);)q.push(String.fromCharCode(Z));let X=q.join("");switch(X.toLowerCase()){case"if":return x0.IF;case"ifelse":return x0.IFELSE;default:return x0.getOperator(X)}}getNumber(){let P=this.currentChar,Z=this.strBuf;for(Z.length=0,Z[0]=String.fromCharCode(P);(P=this.nextChar())>=0&&(P>=48&&P<=57||P===45||P===46);)Z.push(String.fromCharCode(P));let q=parseFloat(Z.join(""));if(isNaN(q))throw new s(`Invalid floating point number: ${q}`);return q}}class t4{constructor(P){this._onlyRefs=P?.onlyRefs===!0,this._onlyRefs||(this._nameRefMap=new Map,this._imageMap=new Map),this._imageCache=new t8}getByName(P){this._onlyRefs&&O1("Should not call `getByName` method.");let Z=this._nameRefMap.get(P);return Z?this.getByRef(Z):this._imageMap.get(P)||null}getByRef(P){return this._imageCache.get(P)||null}set(P,Z,q){O1("Abstract method `set` called.")}}class q6{static NUM_PAGES_THRESHOLD=2;static MIN_IMAGES_TO_CACHE=10;static MAX_BYTE_SIZE=50000000;#P=new J8;constructor(){this._refCache=new t8,this._imageCache=new t8}get#Z(){let P=0;for(let Z of this._imageCache)P+=Z.byteSize;return P}get#X(){return!(this._imageCache.size<q6.MIN_IMAGES_TO_CACHE)&&!(this.#Z<q6.MAX_BYTE_SIZE)}shouldCache(P,Z){let q=this._refCache.get(P);return q||(q=new Set,this._refCache.put(P,q)),q.add(Z),!(q.size<q6.NUM_PAGES_THRESHOLD)&&!(!this._imageCache.has(P)&&this.#X)}addDecodeFailed(P){this.#P.put(P)}hasDecodeFailed(P){return this.#P.has(P)}addByteSize(P,Z){let q=this._imageCache.get(P);q&&(q.byteSize||(q.byteSize=Z))}getData(P,Z){let q=this._refCache.get(P);if(!q)return null;if(q.size<q6.NUM_PAGES_THRESHOLD)return null;let X=this._imageCache.get(P);return X?(q.add(Z),X):null}setData(P,Z){if(!this._refCache.has(P))throw Error('GlobalImageCache.setData - expected "shouldCache" to have been called.');this._imageCache.has(P)||(this.#X?v("GlobalImageCache.setData - cache limit reached."):this._imageCache.put(P,Z))}clear(P=!1){P||(this.#P.clear(),this._refCache.clear()),this._imageCache.clear()}}class xq{constructor({xref:P,isEvalSupported:Z=!0}){this.xref=P,this.isEvalSupported=Z!==!1}create(P,Z=!1){let q,X;if(P instanceof f1?q=P:P instanceof S?q=P.objId:P instanceof T1&&(q=P.dict?.objId),q){let R=this._localFunctionCache.getByRef(q);if(R)return R}let z=this.xref.fetchIfRef(P);if(Array.isArray(z)){if(!Z)throw Error('PDFFunctionFactory.create - expected "parseArray" argument.');X=UZ.parseArray(this,z)}else X=UZ.parse(this,z);return q&&this._localFunctionCache.set(null,q,X),X}get _localFunctionCache(){return q1(this,"_localFunctionCache",new yG)}}function L0(P){return Array.isArray(P)?e8(P,null)?P:P.map((Z)=>+Z):null}class UZ{static getSampleArray(P,Z,q,X){let z,R,f=1;for(z=0,R=P.length;z<R;z++)f*=P[z];f*=Z;let G=Array(f),Q=0,Y=0,W=1/(2**q-1),$=X.getBytes((f*q+7)/8),_=0;for(z=0;z<f;z++){for(;Q<q;)Y<<=8,Y|=$[_++],Q+=8;Q-=q,G[z]=(Y>>Q)*W,Y&=(1<<Q)-1}return G}static parse(P,Z){let q=Z.dict||Z;switch(q.get("FunctionType")){case 0:return this.constructSampled(P,Z,q);case 1:break;case 2:return this.constructInterpolated(P,q);case 3:return this.constructStiched(P,q);case 4:return this.constructPostScript(P,Z,q)}throw new s("Unknown type of function")}static parseArray(P,Z){let{xref:q}=P,X=[];for(let z of Z)X.push(this.parse(P,q.fetchIfRef(z)));return function(z,R,f,G){for(let Q=0,Y=X.length;Q<Y;Q++)X[Q](z,R,f,G+Q)}}static constructSampled(P,Z,q){function X(K){let I=K.length,B=[],j=0;for(let V=0;V<I;V+=2)B[j++]=[K[V],K[V+1]];return B}function z(K,I,B,j,V){return j+(V-j)/(B-I)*(K-I)}let R=L0(q.getArray("Domain")),f=L0(q.getArray("Range"));if(!R||!f)throw new s("No domain or range");let G=R.length/2,Q=f.length/2;R=X(R),f=X(f);let Y=L0(q.getArray("Size")),W=q.get("BitsPerSample"),$=q.get("Order")||1;$!==1&&v1("No support for cubic spline interpolation: "+$);let _=L0(q.getArray("Encode"));if(_)_=X(_);else{_=[];for(let K=0;K<G;++K)_.push([0,Y[K]-1])}let J=L0(q.getArray("Decode"));J=J?X(J):f;let U=this.getSampleArray(Y,Q,W,Z);return function(K,I,B,j){let V=1<<G,H=new Float64Array(V).fill(1),M=new Uint32Array(V),x,A,k=Q,b=1;for(x=0;x<G;++x){let O=R[x][0],p=R[x][1],D=z(E8(K[I+x],O,p),O,p,_[x][0],_[x][1]),n=Y[x];D=E8(D,0,n-1);let F=D<n-1?Math.floor(D):D-1,l=F+1-D,C=D-F,L=F*k,m=L+k;for(A=0;A<V;A++)A&b?(H[A]*=C,M[A]+=m):(H[A]*=l,M[A]+=L);k*=n,b<<=1}for(A=0;A<Q;++A){let O=0;for(x=0;x<V;x++)O+=U[M[x]+A]*H[x];O=z(O,0,1,J[A][0],J[A][1]),B[j+A]=E8(O,f[A][0],f[A][1])}}}static constructInterpolated(P,Z){let q=L0(Z.getArray("C0"))||[0],X=L0(Z.getArray("C1"))||[1],z=Z.get("N"),R=[];for(let G=0,Q=q.length;G<Q;++G)R.push(X[G]-q[G]);let f=R.length;return function(G,Q,Y,W){let $=z===1?G[Q]:G[Q]**z;for(let _=0;_<f;++_)Y[W+_]=q[_]+$*R[_]}}static constructStiched(P,Z){let q=L0(Z.getArray("Domain"));if(!q)throw new s("No domain");if(q.length/2!==1)throw new s("Bad domain for stiched function");let{xref:X}=P,z=[];for(let Q of Z.get("Functions"))z.push(this.parse(P,X.fetchIfRef(Q)));let R=L0(Z.getArray("Bounds")),f=L0(Z.getArray("Encode")),G=new Float32Array(1);return function(Q,Y,W,$){let _=E8(Q[Y],q[0],q[1]),J=R.length,U;for(U=0;U<J&&!(_<R[U]);++U);let K=q[0];U>0&&(K=R[U-1]);let I=q[1];U<R.length&&(I=R[U]);let B=f[2*U],j=f[2*U+1];G[0]=K===I?B:B+(_-K)*(j-B)/(I-K),z[U](G,0,W,$)}}static constructPostScript(P,Z,q){let X=L0(q.getArray("Domain")),z=L0(q.getArray("Range"));if(!X)throw new s("No domain.");if(!z)throw new s("No range.");let R=new OG(Z),f=new pG(R).parse();if(P.isEvalSupported&&P0.isEvalSupported){let J=new cG().compile(f,X,z);if(J)return Function("src","srcOffset","dest","destOffset",J)}v1("Unable to compile PS function");let G=z.length>>1,Q=X.length>>1,Y=new uG(f),W=Object.create(null),$=8192,_=new Float32Array(Q);return function(J,U,K,I){let B,j,V="",H=_;for(B=0;B<Q;B++)j=J[U+B],H[B]=j,V+=j+"_";let M=W[V];if(M!==void 0)return void K.set(M,I);let x=new Float32Array(G),A=Y.execute(H),k=A.length-G;for(B=0;B<G;B++){j=A[k+B];let b=z[2*B];j<b?j=b:(b=z[2*B+1],j>b&&(j=b)),x[B]=j}$>0&&($--,W[V]=x),K.set(x,I)}}}function q9(P){let Z;if(P instanceof S)Z=P;else{if(!(P instanceof T1))return!1;Z=P.dict}return Z.has("FunctionType")}class T3{static MAX_STACK_SIZE=100;constructor(P){this.stack=P?Array.from(P):[]}push(P){if(this.stack.length>=T3.MAX_STACK_SIZE)throw Error("PostScript function stack overflow.");this.stack.push(P)}pop(){if(this.stack.length<=0)throw Error("PostScript function stack underflow.");return this.stack.pop()}copy(P){if(this.stack.length+P>=T3.MAX_STACK_SIZE)throw Error("PostScript function stack overflow.");let Z=this.stack;for(let q=Z.length-P,X=P-1;X>=0;X--,q++)Z.push(Z[q])}index(P){this.push(this.stack[this.stack.length-P-1])}roll(P,Z){let q=this.stack,X=q.length-P,z=q.length-1,R=X+(Z-Math.floor(Z/P)*P);for(let f=X,G=z;f<G;f++,G--){let Q=q[f];q[f]=q[G],q[G]=Q}for(let f=X,G=R-1;f<G;f++,G--){let Q=q[f];q[f]=q[G],q[G]=Q}for(let f=R,G=z;f<G;f++,G--){let Q=q[f];q[f]=q[G],q[G]=Q}}}class uG{constructor(P){this.operators=P}execute(P){let Z=new T3(P),q=0,X=this.operators,z=X.length,R,f,G;for(;q<z;)if(R=X[q++],typeof R!="number")switch(R){case"jz":G=Z.pop(),f=Z.pop(),f||(q=G);break;case"j":f=Z.pop(),q=f;break;case"abs":f=Z.pop(),Z.push(Math.abs(f));break;case"add":G=Z.pop(),f=Z.pop(),Z.push(f+G);break;case"and":G=Z.pop(),f=Z.pop(),typeof f=="boolean"&&typeof G=="boolean"?Z.push(f&&G):Z.push(f&G);break;case"atan":G=Z.pop(),f=Z.pop(),f=Math.atan2(f,G)/Math.PI*180,f<0&&(f+=360),Z.push(f);break;case"bitshift":G=Z.pop(),f=Z.pop(),f>0?Z.push(f<<G):Z.push(f>>G);break;case"ceiling":f=Z.pop(),Z.push(Math.ceil(f));break;case"copy":f=Z.pop(),Z.copy(f);break;case"cos":f=Z.pop(),Z.push(Math.cos(f%360/180*Math.PI));break;case"cvi":f=0|Z.pop(),Z.push(f);break;case"cvr":break;case"div":G=Z.pop(),f=Z.pop(),Z.push(f/G);break;case"dup":Z.copy(1);break;case"eq":G=Z.pop(),f=Z.pop(),Z.push(f===G);break;case"exch":Z.roll(2,1);break;case"exp":G=Z.pop(),f=Z.pop(),Z.push(f**G);break;case"false":Z.push(!1);break;case"floor":f=Z.pop(),Z.push(Math.floor(f));break;case"ge":G=Z.pop(),f=Z.pop(),Z.push(f>=G);break;case"gt":G=Z.pop(),f=Z.pop(),Z.push(f>G);break;case"idiv":G=Z.pop(),f=Z.pop(),Z.push(f/G|0);break;case"index":f=Z.pop(),Z.index(f);break;case"le":G=Z.pop(),f=Z.pop(),Z.push(f<=G);break;case"ln":f=Z.pop(),Z.push(Math.log(f));break;case"log":f=Z.pop(),Z.push(Math.log10(f));break;case"lt":G=Z.pop(),f=Z.pop(),Z.push(f<G);break;case"mod":G=Z.pop(),f=Z.pop(),Z.push(f%G);break;case"mul":G=Z.pop(),f=Z.pop(),Z.push(f*G);break;case"ne":G=Z.pop(),f=Z.pop(),Z.push(f!==G);break;case"neg":f=Z.pop(),Z.push(-f);break;case"not":f=Z.pop(),typeof f=="boolean"?Z.push(!f):Z.push(~f);break;case"or":G=Z.pop(),f=Z.pop(),typeof f=="boolean"&&typeof G=="boolean"?Z.push(f||G):Z.push(f|G);break;case"pop":Z.pop();break;case"roll":G=Z.pop(),f=Z.pop(),Z.roll(f,G);break;case"round":f=Z.pop(),Z.push(Math.round(f));break;case"sin":f=Z.pop(),Z.push(Math.sin(f%360/180*Math.PI));break;case"sqrt":f=Z.pop(),Z.push(Math.sqrt(f));break;case"sub":G=Z.pop(),f=Z.pop(),Z.push(f-G);break;case"true":Z.push(!0);break;case"truncate":f=Z.pop(),f=f<0?Math.ceil(f):Math.floor(f),Z.push(f);break;case"xor":G=Z.pop(),f=Z.pop(),typeof f=="boolean"&&typeof G=="boolean"?Z.push(f!==G):Z.push(f^G);break;default:throw new s(`Unknown operator ${R}`)}else Z.push(R);return Z.stack}}class w5{constructor(P){this.type=P}visit(P){O1("abstract method")}}class IZ{constructor(){this.parts=[]}visitArgument(P){this.parts.push("Math.max(",P.min,", Math.min(",P.max,", src[srcOffset + ",P.index,"]))")}visitVariable(P){this.parts.push("v",P.index)}visitLiteral(P){this.parts.push(P.number)}visitBinaryOperation(P){this.parts.push("("),P.arg1.visit(this),this.parts.push(" ",P.op," "),P.arg2.visit(this),this.parts.push(")")}visitVariableDefinition(P){this.parts.push("var "),P.variable.visit(this),this.parts.push(" = "),P.arg.visit(this),this.parts.push(";")}visitMin(P){this.parts.push("Math.min("),P.arg.visit(this),this.parts.push(", ",P.max,")")}toString(){return this.parts.join("")}}function lj(P,Z){return Z.type==="literal"&&Z.number===0?P:P.type==="literal"&&P.number===0?Z:Z.type==="literal"&&P.type==="literal"?new r4(P.number+Z.number):new GP("+",P,Z,P.min+Z.min,P.max+Z.max)}function oj(P,Z){if(Z.type==="literal"){if(Z.number===0)return new r4(0);if(Z.number===1)return P;if(P.type==="literal")return new r4(P.number*Z.number)}if(P.type==="literal"){if(P.number===0)return new r4(0);if(P.number===1)return Z}let q=Math.min(P.min*Z.min,P.min*Z.max,P.max*Z.min,P.max*Z.max),X=Math.max(P.min*Z.min,P.min*Z.max,P.max*Z.min,P.max*Z.max);return new GP("*",P,Z,q,X)}function aj(P,Z){if(Z.type==="literal"){if(Z.number===0)return P;if(P.type==="literal")return new r4(P.number-Z.number)}return Z.type==="binary"&&Z.op==="-"&&P.type==="literal"&&P.number===1&&Z.arg1.type==="literal"&&Z.arg1.number===1?Z.arg2:new GP("-",P,Z,P.min-Z.max,P.max-Z.min)}function nj(P,Z){return P.min>=Z?new r4(Z):P.max<=Z?P:new dG(P,Z)}class cG{compile(P,Z,q){let X=[],z=[],R=Z.length>>1,f=q.length>>1,G,Q,Y,W,$,_,J,U,K=0;for(let B=0;B<R;B++)X.push(new gG(B,Z[2*B],Z[2*B+1]));for(let B=0,j=P.length;B<j;B++)if(U=P[B],typeof U!="number")switch(U){case"add":if(X.length<2)return null;W=X.pop(),Y=X.pop(),X.push(lj(Y,W));break;case"cvr":if(X.length<1)return null;break;case"mul":if(X.length<2)return null;W=X.pop(),Y=X.pop(),X.push(oj(Y,W));break;case"sub":if(X.length<2)return null;W=X.pop(),Y=X.pop(),X.push(aj(Y,W));break;case"exch":if(X.length<2)return null;$=X.pop(),_=X.pop(),X.push($,_);break;case"pop":if(X.length<1)return null;X.pop();break;case"index":if(X.length<1)return null;if(Y=X.pop(),Y.type!=="literal")return null;if(G=Y.number,G<0||!Number.isInteger(G)||X.length<G)return null;if($=X[X.length-G-1],$.type==="literal"||$.type==="var"){X.push($);break}J=new KZ(K++,$.min,$.max),X[X.length-G-1]=J,X.push(J),z.push(new BZ(J,$));break;case"dup":if(X.length<1)return null;if(typeof P[B+1]=="number"&&P[B+2]==="gt"&&P[B+3]===B+7&&P[B+4]==="jz"&&P[B+5]==="pop"&&P[B+6]===P[B+1]){Y=X.pop(),X.push(nj(Y,P[B+1])),B+=6;break}if($=X.at(-1),$.type==="literal"||$.type==="var"){X.push($);break}J=new KZ(K++,$.min,$.max),X[X.length-1]=J,X.push(J),z.push(new BZ(J,$));break;case"roll":if(X.length<2)return null;if(W=X.pop(),Y=X.pop(),W.type!=="literal"||Y.type!=="literal")return null;if(Q=W.number,G=Y.number,G<=0||!Number.isInteger(G)||!Number.isInteger(Q)||X.length<G)return null;if(Q=(Q%G+G)%G,Q===0)break;X.push(...X.splice(X.length-G,G-Q));break;default:return null}else X.push(new r4(U));if(X.length!==f)return null;let I=[];for(let B of z){let j=new IZ;B.visit(j),I.push(j.toString())}for(let B=0,j=X.length;B<j;B++){let V=X[B],H=new IZ;V.visit(H);let M=q[2*B],x=q[2*B+1],A=[H.toString()];M>V.min&&(A.unshift("Math.max(",M,", "),A.push(")")),x<V.max&&(A.unshift("Math.min(",x,", "),A.push(")")),A.unshift("dest[destOffset + ",B,"] = "),A.push(";"),I.push(A.join(""))}return I.join(`
|
|
5
|
+
`)}}function pz(P){return!!(1&P)}function ej(P){return!(1&P)}function PV(P,Z,q){let X,z;for(X=Z,z=P.length;X<z;++X)if(P[X]!==q)return X;return X}function Oz(P,Z,q){for(let X=Z,z=q-1;X<z;++X,--z){let R=P[X];P[X]=P[z],P[z]=R}}function X9(P,Z,q=!1){let X="ltr";return q?X="ttb":Z||(X="rtl"),{str:P,dir:X}}function sG(P,Z=-1,q=!1){let X=!0,z=P.length;if(z===0||q)return X9(P,X,q);v4.length=z,c1.length=z;let R,f,G=0;for(R=0;R<z;++R){v4[R]=P.charAt(R);let B=P.charCodeAt(R),j="L";B<=255?j=ij[B]:1424<=B&&B<=1524?j="R":1536<=B&&B<=1791?(j=tj[255&B],j||v("Bidi: invalid Unicode character "+B.toString(16))):(1792<=B&&B<=2220||64336<=B&&B<=65023||65136<=B&&B<=65279)&&(j="AL"),j!=="R"&&j!=="AL"&&j!=="AN"||G++,c1[R]=j}if(G===0)return X=!0,X9(P,X);Z===-1&&(G/z<0.3&&z>4?(X=!0,Z=0):(X=!1,Z=1));let Q=[];for(R=0;R<z;++R)Q[R]=Z;let Y=pz(Z)?"R":"L",W=Y,$=W,_,J=W;for(R=0;R<z;++R)c1[R]==="NSM"?c1[R]=J:J=c1[R];for(J=W,R=0;R<z;++R)_=c1[R],_==="EN"?c1[R]=J==="AL"?"AN":"EN":_!=="R"&&_!=="L"&&_!=="AL"||(J=_);for(R=0;R<z;++R)_=c1[R],_==="AL"&&(c1[R]="R");for(R=1;R<z-1;++R)c1[R]==="ES"&&c1[R-1]==="EN"&&c1[R+1]==="EN"&&(c1[R]="EN"),c1[R]!=="CS"||c1[R-1]!=="EN"&&c1[R-1]!=="AN"||c1[R+1]!==c1[R-1]||(c1[R]=c1[R-1]);for(R=0;R<z;++R)if(c1[R]==="EN"){for(let B=R-1;B>=0&&c1[B]==="ET";--B)c1[B]="EN";for(let B=R+1;B<z&&c1[B]==="ET";++B)c1[B]="EN"}for(R=0;R<z;++R)_=c1[R],_!=="WS"&&_!=="ES"&&_!=="ET"&&_!=="CS"||(c1[R]="ON");for(J=W,R=0;R<z;++R)_=c1[R],_==="EN"?c1[R]=J==="L"?"L":"EN":_!=="R"&&_!=="L"||(J=_);for(R=0;R<z;++R)if(c1[R]==="ON"){let B=PV(c1,R+1,"ON"),j=W;R>0&&(j=c1[R-1]);let V=$;B+1<z&&(V=c1[B+1]),j!=="L"&&(j="R"),V!=="L"&&(V="R"),j===V&&c1.fill(j,R,B),R=B-1}for(R=0;R<z;++R)c1[R]==="ON"&&(c1[R]=Y);for(R=0;R<z;++R)_=c1[R],ej(Q[R])?_==="R"?Q[R]+=1:_!=="AN"&&_!=="EN"||(Q[R]+=2):_!=="L"&&_!=="AN"&&_!=="EN"||(Q[R]+=1);let U,K=-1,I=99;for(R=0,f=Q.length;R<f;++R)U=Q[R],K<U&&(K=U),I>U&&pz(U)&&(I=U);for(U=K;U>=I;--U){let B=-1;for(R=0,f=Q.length;R<f;++R)Q[R]<U?B>=0&&(Oz(v4,B,R),B=-1):B<0&&(B=R);B>=0&&Oz(v4,B,Q.length)}for(R=0,f=v4.length;R<f;++R){let B=v4[R];B!=="<"&&B!==">"||(v4[R]="")}return X9(v4.join(""),X)}function wz(P){let Z=new Set(["thin","extralight","ultralight","demilight","semilight","light","book","regular","normal","medium","demibold","semibold","bold","extrabold","ultrabold","black","heavy","extrablack","ultrablack","roman","italic","oblique","ultracondensed","extracondensed","condensed","semicondensed","normal","semiexpanded","expanded","extraexpanded","ultraexpanded","bolditalic"]);return P.split(/[- ,+]+/g).filter((q)=>!Z.has(q.toLowerCase())).join(" ")}function jZ({alias:P,local:Z,path:q,fallback:X,style:z,ultimate:R},f,G,Q=!0,Y=!0,W=""){let $={style:null,ultimate:null};if(Z){let _=W?` ${W}`:"";for(let J of Z)f.push(`local(${J}${_})`)}if(P){let _=J7.get(P),J=W||function(U){switch(U){case U5:return"Bold";case K5:return"Italic";case B5:return"Bold Italic";default:if(U?.weight==="bold")return"Bold";if(U?.style==="italic")return"Italic"}return""}(z);Object.assign($,jZ(_,f,G,Q&&!X,Y&&!q,J))}if(z&&($.style=z),R&&($.ultimate=R),Q&&X){let _=J7.get(X),{ultimate:J}=jZ(_,f,G,Q,Y&&!q,W);$.ultimate||=J}return Y&&q&&G&&f.push(`url(${G}${q})`),$}function Ez(P,Z,q,X,z,R){if(X.startsWith("InvalidPDFjsFont_"))return null;R!=="TrueType"&&R!=="Type1"||!/^[A-Z]{6}\+/.test(X)||(X=X.slice(7));let f=X=t7(X),G=P.get(f);if(G)return G;let Q=J7.get(X);if(!Q){for(let[I,B]of qV)if(X.startsWith(I)){X=`${B}${X.substring(I.length)}`,Q=J7.get(X);break}}let Y=!1;Q||(Q=J7.get(z),Y=!0);let W=`${Z.getDocId()}_s${Z.createFontId()}`;if(!Q){if(!s9(X))return v(`Cannot substitute the font because of its name: ${X}`),P.set(f,null),null;let I=/bold/gi.test(X),B=/oblique|italic/gi.test(X),j=I&&B&&B5||I&&U5||B&&K5||W5;return G={css:`"${wz(X)}",${W}`,guessFallback:!0,loadedName:W,baseFontName:X,src:`local(${X})`,style:j},P.set(f,G),G}let $=[];Y&&s9(X)&&$.push(`local(${X})`);let{style:_,ultimate:J}=jZ(Q,$,q),U=J===null,K=U?"":`,${J}`;return G={css:`"${wz(X)}",${W}${K}`,guessFallback:U,loadedName:W,baseFontName:X,src:$.join(","),style:_},P.set(f,G),G}function gz(P,Z,q,X,z,R){let f=z*R,G;G=Z<=8?new Uint8Array(f):Z<=16?new Uint16Array(f):new Uint32Array(f);let Q=q/z,Y=X/R,W,$,_,J,U=0,K=new Uint16Array(z),I=q;for(W=0;W<z;W++)K[W]=Math.floor(W*Q);for(W=0;W<R;W++)for(_=Math.floor(W*Y)*I,$=0;$<z;$++)J=_+K[$],G[U++]=P[J];return G}class d4{constructor({xref:P,res:Z,image:q,isInline:X=!1,smask:z=null,mask:R=null,isMask:f=!1,pdfFunctionFactory:G,globalColorSpaceCache:Q,localColorSpaceCache:Y}){this.image=q;let W=q.dict,$=W.get("F","Filter"),_;if($ instanceof t)_=$.name;else if(Array.isArray($)){let I=P.fetchIfRef($[0]);I instanceof t&&(_=I.name)}switch(_){case"JPXDecode":({width:q.width,height:q.height,componentsCount:q.numComps,bitsPerComponent:q.bitsPerComponent}=i7.parseImageProperties(q.stream)),q.stream.reset();let I=G0.getReducePowerForJPX(q.width,q.height,q.numComps);if(this.jpxDecoderOptions={numComponents:0,isIndexedColormap:!1,smaskInData:W.has("SMaskInData"),reducePower:I},I){let B=2**I;q.width=Math.ceil(q.width/B),q.height=Math.ceil(q.height/B)}break;case"JBIG2Decode":q.bitsPerComponent=1,q.numComps=1}let J=W.get("W","Width"),U=W.get("H","Height");if(Number.isInteger(q.width)&&q.width>0&&Number.isInteger(q.height)&&q.height>0&&(q.width!==J||q.height!==U))v("PDFImage - using the Width/Height of the image data, rather than the image dictionary."),J=q.width,U=q.height;else{let I=typeof J=="number"&&J>0,B=typeof U=="number"&&U>0;if(!I||!B){if(!q.fallbackDims)throw new s(`Invalid image width: ${J} or height: ${U}`);v("PDFImage - using the Width/Height of the parent image, for SMask/Mask data."),I||(J=q.fallbackDims.width),B||(U=q.fallbackDims.height)}}this.width=J,this.height=U,this.interpolate=W.get("I","Interpolate"),this.imageMask=W.get("IM","ImageMask")||!1,this.matte=W.get("Matte")||!1;let K=q.bitsPerComponent;if(!K&&(K=W.get("BPC","BitsPerComponent"),!K)){if(!this.imageMask)throw new s(`Bits per component missing in image: ${this.imageMask}`);K=1}if(this.bpc=K,!this.imageMask){let I=W.getRaw("CS")||W.getRaw("ColorSpace"),B=!!I;if(B)this.jpxDecoderOptions?.smaskInData&&(I=t.get("DeviceRGBA"));else if(this.jpxDecoderOptions)I=t.get("DeviceRGBA");else switch(q.numComps){case 1:I=t.get("DeviceGray");break;case 3:I=t.get("DeviceRGB");break;case 4:I=t.get("DeviceCMYK");break;default:throw Error(`Images with ${q.numComps} color components not supported.`)}this.colorSpace=g1.parse({cs:I,xref:P,resources:X?Z:null,pdfFunctionFactory:G,globalColorSpaceCache:Q,localColorSpaceCache:Y}),this.numComps=this.colorSpace.numComps,this.jpxDecoderOptions&&(this.jpxDecoderOptions.numComponents=B?this.numComps:0,this.jpxDecoderOptions.isIndexedColormap=this.colorSpace.name==="Indexed")}if(this.decode=W.getArray("D","Decode"),this.needsDecode=!1,this.decode&&(this.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode,K)||f&&!m8.isDefaultDecode(this.decode,1))){this.needsDecode=!0;let I=(1<<K)-1;this.decodeCoefficients=[],this.decodeAddends=[];let B=this.colorSpace?.name==="Indexed";for(let j=0,V=0;j<this.decode.length;j+=2,++V){let H=this.decode[j],M=this.decode[j+1];this.decodeCoefficients[V]=B?(M-H)/I:M-H,this.decodeAddends[V]=B?H:I*H}}if(z)z.fallbackDims??={width:J,height:U},this.smask=new d4({xref:P,res:Z,image:z,isInline:X,pdfFunctionFactory:G,globalColorSpaceCache:Q,localColorSpaceCache:Y});else if(R)if(R instanceof T1)R.dict.get("IM","ImageMask")?(R.fallbackDims??={width:J,height:U},this.mask=new d4({xref:P,res:Z,image:R,isInline:X,isMask:!0,pdfFunctionFactory:G,globalColorSpaceCache:Q,localColorSpaceCache:Y})):v("Ignoring /Mask in image without /ImageMask.");else this.mask=R}static async buildImage({xref:P,res:Z,image:q,isInline:X=!1,pdfFunctionFactory:z,globalColorSpaceCache:R,localColorSpaceCache:f}){let G=q,Q=null,Y=null,W=q.dict.get("SMask"),$=q.dict.get("Mask");return W?W instanceof T1?Q=W:v("Unsupported /SMask format."):$&&($ instanceof T1||Array.isArray($)?Y=$:v("Unsupported /Mask format.")),new d4({xref:P,res:Z,image:G,isInline:X,smask:Q,mask:Y,pdfFunctionFactory:z,globalColorSpaceCache:R,localColorSpaceCache:f})}static async createMask({image:P,isOffscreenCanvasSupported:Z=!1}){let{dict:q}=P,X=q.get("W","Width"),z=q.get("H","Height"),R=q.get("I","Interpolate"),f=q.getArray("D","Decode"),G=f?.[0]>0,Q=(X+7>>3)*z,Y=P.getBytes(Q),W=X===1&&z===1&&G===(Y.length===0||!!(128&Y[0]));if(W)return{isSingleOpaquePixel:W};if(Z){if(G0.needsToBeResized(X,z)){let I=new Uint8ClampedArray(X*z*4);return l9({src:Y,dest:I,width:X,height:z,nonBlackColor:0,inverseDecode:G}),G0.createImage({kind:J4,data:I,width:X,height:z,interpolate:R})}let J=new OffscreenCanvas(X,z),U=J.getContext("2d"),K=U.createImageData(X,z);return l9({src:Y,dest:K.data,width:X,height:z,nonBlackColor:0,inverseDecode:G}),U.putImageData(K,0,0),{data:null,width:X,height:z,interpolate:R,bitmap:J.transferToImageBitmap()}}let $=Y.byteLength,_;if(P instanceof a8&&(!G||Q===$)?_=Y:G?(_=new Uint8Array(Q),_.set(Y),_.fill(255,$)):_=new Uint8Array(Y),G)for(let J=0;J<$;J++)_[J]^=255;return{data:_,width:X,height:z,interpolate:R}}get drawWidth(){return Math.max(this.width,this.smask?.width||0,this.mask?.width||0)}get drawHeight(){return Math.max(this.height,this.smask?.height||0,this.mask?.height||0)}decodeBuffer(P){let Z=this.bpc,q=this.numComps,X=this.decodeAddends,z=this.decodeCoefficients,R=(1<<Z)-1,f,G;if(Z===1){for(f=0,G=P.length;f<G;f++)P[f]=+!P[f];return}let Q=0;for(f=0,G=this.width*this.height;f<G;f++)for(let Y=0;Y<q;Y++)P[Q]=E8(X[Y]+P[Q]*z[Y],0,R),Q++}getComponents(P){let Z=this.bpc;if(Z===8)return P;let q=this.width,X=this.height,z=this.numComps,R=q*X*z,f,G=0;f=Z<=8?new Uint8Array(R):Z<=16?new Uint16Array(R):new Uint32Array(R);let Q=q*z,Y=(1<<Z)-1,W,$,_=0;if(Z===1){let J,U,K;for(let I=0;I<X;I++){for(U=_+(-8&Q),K=_+Q;_<U;)$=P[G++],f[_]=$>>7&1,f[_+1]=$>>6&1,f[_+2]=$>>5&1,f[_+3]=$>>4&1,f[_+4]=$>>3&1,f[_+5]=$>>2&1,f[_+6]=$>>1&1,f[_+7]=1&$,_+=8;if(_<K)for($=P[G++],J=128;_<K;)f[_++]=+!!($&J),J>>=1}}else{let J=0;for($=0,_=0,W=R;_<W;++_){for(_%Q===0&&($=0,J=0);J<Z;)$=$<<8|P[G++],J+=8;let U=J-Z,K=$>>U;K<0?K=0:K>Y&&(K=Y),f[_]=K,$&=(1<<U)-1,J=U}}return f}async fillOpacity(P,Z,q,X,z){let R=this.smask,f=this.mask,G,Q,Y,W,$,_;if(R)Q=R.width,Y=R.height,G=new Uint8ClampedArray(Q*Y),await R.fillGrayBuffer(G),Q===Z&&Y===q||(G=gz(G,R.bpc,Q,Y,Z,q));else if(f)if(f instanceof d4){for(Q=f.width,Y=f.height,G=new Uint8ClampedArray(Q*Y),f.numComps=1,await f.fillGrayBuffer(G),W=0,$=Q*Y;W<$;++W)G[W]=255-G[W];Q===Z&&Y===q||(G=gz(G,f.bpc,Q,Y,Z,q))}else{if(!Array.isArray(f))throw new s("Unknown mask format.");{G=new Uint8ClampedArray(Z*q);let J=this.numComps;for(W=0,$=Z*q;W<$;++W){let U=0,K=W*J;for(_=0;_<J;++_){let I=z[K+_],B=2*_;if(I<f[B]||I>f[B+1]){U=255;break}}G[W]=U}}}if(G)for(W=0,_=3,$=Z*X;W<$;++W,_+=4)P[_]=G[W];else for(W=0,_=3,$=Z*X;W<$;++W,_+=4)P[_]=255}undoPreblend(P,Z,q){let X=this.smask?.matte;if(!X)return;let z=this.colorSpace.getRgb(X,0),R=z[0],f=z[1],G=z[2],Q=Z*q*4;for(let Y=0;Y<Q;Y+=4){let W=P[Y+3];if(W===0){P[Y]=255,P[Y+1]=255,P[Y+2]=255;continue}let $=255/W;P[Y]=(P[Y]-R)*$+R,P[Y+1]=(P[Y+1]-f)*$+f,P[Y+2]=(P[Y+2]-G)*$+G}}async createImageData(P=!1,Z=!1){let q=this.drawWidth,X=this.drawHeight,z={width:q,height:X,interpolate:this.interpolate,kind:0,data:null},R=this.numComps,f=this.width,G=this.height,Q=this.bpc,Y=f*R*Q+7>>3,W=Z&&G0.needsToBeResized(q,X);if(!this.smask&&!this.mask&&this.colorSpace.name==="DeviceRGBA"){z.kind=J4;let H=z.data=await this.getImageBytes(G*f*4,{});return Z?W?G0.createImage(z,!1):this.createBitmap(J4,q,X,H):z}if(!P){let H;if(this.colorSpace.name==="DeviceGray"&&Q===1?H=q3:this.colorSpace.name!=="DeviceRGB"||Q!==8||this.needsDecode||(H=Y7),H&&!this.smask&&!this.mask&&q===f&&X===G){let M=await this.#P(f,G);if(M)return M;let x=await this.getImageBytes(G*Y,{});if(Z)return W?G0.createImage({data:x,kind:H,width:q,height:X,interpolate:this.interpolate},this.needsDecode):this.createBitmap(H,f,G,x);if(z.kind=H,z.data=x,this.needsDecode){t1(H===q3,"PDFImage.createImageData: The image must be grayscale.");let A=z.data;for(let k=0,b=A.length;k<b;k++)A[k]^=255}return z}if(this.image instanceof v6&&!this.smask&&!this.mask&&!this.needsDecode){let M=G*Y;if(Z&&!W){let x=!1;switch(this.colorSpace.name){case"DeviceGray":M*=4,x=!0;break;case"DeviceRGB":M=M/3*4,x=!0;break;case"DeviceCMYK":x=!0}if(x){let A=await this.#P(q,X);if(A)return A;let k=await this.getImageBytes(M,{drawWidth:q,drawHeight:X,forceRGBA:!0});return this.createBitmap(J4,q,X,k)}}else switch(this.colorSpace.name){case"DeviceGray":M*=3;case"DeviceRGB":case"DeviceCMYK":return z.kind=Y7,z.data=await this.getImageBytes(M,{drawWidth:q,drawHeight:X,forceRGB:!0}),W?G0.createImage(z):z}}}let $=await this.getImageBytes(G*Y,{internal:!0}),_=0|$.length/Y*X/G,J=this.getComponents($),U,K,I,B,j,V;if(Z&&!W&&(I=new OffscreenCanvas(q,X),B=I.getContext("2d"),j=B.createImageData(q,X),V=j.data),z.kind=J4,P||this.smask||this.mask)Z&&!W||(V=new Uint8ClampedArray(q*X*4)),U=1,K=!0,await this.fillOpacity(V,q,X,_,J);else{if(!Z||W)z.kind=Y7,V=new Uint8ClampedArray(q*X*3),U=0;else new Uint32Array(V.buffer).fill(P0.isLittleEndian?4278190080:255),U=1;K=!1}if(this.needsDecode&&this.decodeBuffer(J),this.colorSpace.fillRgb(V,f,G,q,X,_,Q,J,U),K&&this.undoPreblend(V,q,_),Z&&!W)return B.putImageData(j,0,0),{data:null,width:q,height:X,bitmap:I.transferToImageBitmap(),interpolate:this.interpolate};return z.data=V,W?G0.createImage(z):z}async fillGrayBuffer(P){let Z=this.numComps;if(Z!==1)throw new s(`Reading gray scale from a color image: ${Z}`);let q=this.width,X=this.height,z=this.bpc,R=q*Z*z+7>>3,f=await this.getImageBytes(X*R,{internal:!0}),G=this.getComponents(f),Q,Y;if(z===1){if(Y=q*X,this.needsDecode)for(Q=0;Q<Y;++Q)P[Q]=G[Q]-1&255;else for(Q=0;Q<Y;++Q)P[Q]=255&-G[Q];return}this.needsDecode&&this.decodeBuffer(G),Y=q*X;let W=255/((1<<z)-1);for(Q=0;Q<Y;++Q)P[Q]=W*G[Q]}createBitmap(P,Z,q,X){let z=new OffscreenCanvas(Z,q),R=z.getContext("2d"),f;return P===J4?f=new ImageData(X,Z,q):(f=R.createImageData(Z,q),Ef({kind:P,src:X,dest:new Uint32Array(f.data.buffer),width:Z,height:q,inverseDecode:this.needsDecode})),R.putImageData(f,0,0),{data:null,width:Z,height:q,bitmap:z.transferToImageBitmap(),interpolate:this.interpolate}}async#P(P,Z){let q=await this.image.getTransferableImage();return q?{data:null,width:P,height:Z,bitmap:q,interpolate:this.interpolate}:null}async getImageBytes(P,{drawWidth:Z,drawHeight:q,forceRGBA:X=!1,forceRGB:z=!1,internal:R=!1}){this.image.reset(),this.image.drawWidth=Z||this.width,this.image.drawHeight=q||this.height,this.image.forceRGBA=!!X,this.image.forceRGB=!!z;let f=await this.image.getImageData(P,this.jpxDecoderOptions);return R||this.image instanceof a8?f:(t1(f instanceof Uint8Array,'PDFImage.getImageBytes: Unsupported "imageBytes" type.'),new Uint8Array(f))}}function hG(P,Z=!1){if(Array.isArray(P)){for(let q of P){let X=hG(q,!0);if(X)return X}return v(`Unsupported blend mode Array: ${P}`),"source-over"}if(!(P instanceof t))return Z?null:"source-over";switch(P.name){case"Normal":case"Compatible":return"source-over";case"Multiply":return"multiply";case"Screen":return"screen";case"Overlay":return"overlay";case"Darken":return"darken";case"Lighten":return"lighten";case"ColorDodge":return"color-dodge";case"ColorBurn":return"color-burn";case"HardLight":return"hard-light";case"SoftLight":return"soft-light";case"Difference":return"difference";case"Exclusion":return"exclusion";case"Hue":return"hue";case"Saturation":return"saturation";case"Color":return"color";case"Luminosity":return"luminosity"}return Z?null:(v(`Unsupported blend mode: ${P.name}`),"source-over")}function z9(P,{objId:Z,fn:q,args:X,optionalContent:z,hasMask:R}){Z&&P.addDependency(Z),P.addImageOps(q,X,z,R),q===I6&&X[0]?.count>0&&X[0].count++}class D7{static TIME_SLOT_DURATION_MS=20;static CHECK_TIME_EVERY=100;constructor(){this.reset()}check(){return!(++this.checked<D7.CHECK_TIME_EVERY)&&(this.checked=0,this.endTime<=Date.now())}reset(){this.endTime=Date.now()+D7.TIME_SLOT_DURATION_MS,this.checked=0}}class x6{constructor({xref:P,handler:Z,pageIndex:q,idFactory:X,fontCache:z,builtInCMapCache:R,standardFontDataCache:f,globalColorSpaceCache:G,globalImageCache:Q,systemFontCache:Y,options:W=null}){this.xref=P,this.handler=Z,this.pageIndex=q,this.idFactory=X,this.fontCache=z,this.builtInCMapCache=R,this.standardFontDataCache=f,this.globalColorSpaceCache=G,this.globalImageCache=Q,this.systemFontCache=Y,this.options=W||zV,this.type3FontRefs=null,this._regionalImageCache=new wG,this._fetchBuiltInCMapBound=this.fetchBuiltInCMap.bind(this)}get _pdfFunctionFactory(){return q1(this,"_pdfFunctionFactory",new xq({xref:this.xref,isEvalSupported:this.options.isEvalSupported}))}get parsingType3Font(){return!!this.type3FontRefs}clone(P=null){let Z=Object.create(this);return Z.options=Object.assign(Object.create(null),this.options,P),Z}hasBlendModes(P,Z){if(!(P instanceof S))return!1;if(P.objId&&Z.has(P.objId))return!1;let q=new J8(Z);P.objId&&q.put(P.objId);let X=[P],z=this.xref;for(;X.length;){let R=X.shift(),f=R.get("ExtGState");if(f instanceof S)for(let Q of f.getRawValues()){if(Q instanceof f1){if(q.has(Q))continue;try{Q=z.fetch(Q)}catch(W){q.put(Q),v1(`hasBlendModes - ignoring ExtGState: "${W}".`);continue}}if(!(Q instanceof S))continue;Q.objId&&q.put(Q.objId);let Y=Q.get("BM");if(Y instanceof t){if(Y.name!=="Normal")return!0}else if(Y!==void 0&&Array.isArray(Y)){for(let W of Y)if(W instanceof t&&W.name!=="Normal")return!0}}let G=R.get("XObject");if(G instanceof S)for(let Q of G.getRawValues()){if(Q instanceof f1){if(q.has(Q))continue;try{Q=z.fetch(Q)}catch(W){q.put(Q),v1(`hasBlendModes - ignoring XObject: "${W}".`);continue}}if(!(Q instanceof T1))continue;Q.dict.objId&&q.put(Q.dict.objId);let Y=Q.dict.get("Resources");Y instanceof S&&(Y.objId&&q.has(Y.objId)||(X.push(Y),Y.objId&&q.put(Y.objId)))}}for(let R of q)Z.put(R);return!1}async fetchBuiltInCMap(P){let Z=this.builtInCMapCache.get(P);if(Z)return Z;let q;return q=this.options.useWorkerFetch?{cMapData:await Pz(`${this.options.cMapUrl}${P}.bcmap`),isCompressed:!0}:await this.handler.sendWithPromise("FetchBinaryData",{type:"cMapReaderFactory",name:P}),this.builtInCMapCache.set(P,q),q}async fetchStandardFontData(P){let Z=this.standardFontDataCache.get(P);if(Z)return new Y8(Z);if(this.options.useSystemFonts&&P!=="Symbol"&&P!=="ZapfDingbats")return null;let q=lI()[P],X;try{X=this.options.useWorkerFetch?await Pz(`${this.options.standardFontDataUrl}${q}`):await this.handler.sendWithPromise("FetchBinaryData",{type:"standardFontDataFactory",filename:q})}catch(z){return v(z),null}return this.standardFontDataCache.set(P,X),new Y8(X)}async buildFormXObject(P,Z,q,X,z,R,f,G){let{dict:Q}=Z,Y=g4(Q.getArray("Matrix"),null),W=k4(Q.getArray("BBox"),null),$,_;Q.has("OC")&&($=await this.parseMarkedContentProps(Q.get("OC"),P)),$!==void 0&&X.addOp(i0,["OC",$]);let J=Q.get("Group");if(J){_={matrix:Y,bbox:W,smask:q,isolated:!1,knockout:!1};let I=null;if(G8(J.get("S"),"Transparency")&&(_.isolated=J.get("I")||!1,_.knockout=J.get("K")||!1,J.has("CS"))){let B=this._getColorSpace(J.getRaw("CS"),P,f);I=B instanceof m8?B:await this._handleColorSpace(B)}q?.backdrop&&(I||=g1.rgb,q.backdrop=I.getRgbHex(q.backdrop,0)),X.addOp(gB,[_])}let U=[Y&&new Float32Array(Y),!J&&W&&new Float32Array(W)||null];X.addOp(Jf,U);let K=Q.get("Resources");await this.getOperatorList({stream:Z,task:z,resources:K instanceof S?K:P,operatorList:X,initialState:R,prevRefs:G}),X.addOp(uB,[]),J&&X.addOp(dB,[_]),$!==void 0&&X.addOp(B6,[])}_sendImgData(P,Z,q=!1){let X=Z?[Z.bitmap||Z.data.buffer]:null;return this.parsingType3Font||q?this.handler.send("commonobj",[P,"Image",Z],X):this.handler.send("obj",[P,this.pageIndex,"Image",Z],X)}async buildPaintImageXObject({resources:P,image:Z,isInline:q=!1,operatorList:X,cacheKey:z,localImageCache:R,localColorSpaceCache:f}){let{maxImageSize:G,ignoreErrors:Q,isOffscreenCanvasSupported:Y}=this.options,{dict:W}=Z,$=W.objId,_=W.get("W","Width"),J=W.get("H","Height");if(!_||typeof _!="number"||!J||typeof J!="number")return void v("Image dimensions are missing, or not numbers.");if(G!==-1&&_*J>G){if(!Q)throw Error("Image exceeded maximum allowed size and was removed.");return void v("Image exceeded maximum allowed size and was removed.")}let U;W.has("OC")&&(U=await this.parseMarkedContentProps(W.get("OC"),P));let K,I,B;if(W.get("IM","ImageMask")){if(K=await d4.createMask({image:Z,isOffscreenCanvasSupported:Y&&!this.parsingType3Font}),K.isSingleOpaquePixel){if(I=rB,B=[],X.addImageOps(I,B,U),z){let A={fn:I,args:B,optionalContent:U};R.set(z,$,A),$&&this._regionalImageCache.set(null,$,A)}return}if(this.parsingType3Font)return B=function({data:A,width:k,height:b}){if(k>1000||b>1000)return null;let O=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),p=k+1,D=new Uint8Array(p*(b+1)),n,F,l,C=k+7&-8,L=new Uint8Array(C*b),m=0;for(let G1 of A){let r=128;for(;r>0;)L[m++]=G1&r?0:255,r>>=1}let d=0;for(m=0,L[m]!==0&&(D[0]=1,++d),F=1;F<k;F++)L[m]!==L[m+1]&&(D[F]=L[m]?2:1,++d),m++;for(L[m]!==0&&(D[F]=2,++d),n=1;n<b;n++){m=n*C,l=n*p,L[m-C]!==L[m]&&(D[l]=L[m]?1:8,++d);let G1=(L[m]?4:0)+(L[m-C]?8:0);for(F=1;F<k;F++)G1=(G1>>2)+(L[m+1]?4:0)+(L[m-C+1]?8:0),O[G1]&&(D[l+F]=O[G1],++d),m++;if(L[m-C]!==L[m]&&(D[l+F]=L[m]?2:4,++d),d>1000)return null}for(m=C*(b-1),l=n*p,L[m]!==0&&(D[l]=8,++d),F=1;F<k;F++)L[m]!==L[m+1]&&(D[l+F]=L[m]?4:8,++d),m++;if(L[m]!==0&&(D[l+F]=4,++d),d>1000)return null;let e=new Int32Array([0,p,-1,0,-p,0,0,0,1]),E=[],{a:y,b:N,c:h,d:w,e:c,f:o}=new DOMMatrix().scaleSelf(1/k,-1/b).translateSelf(0,-b);for(n=0;d&&n<=b;n++){let G1=n*p,r=G1+k;for(;G1<r&&!D[G1];)G1++;if(G1===r)continue;let Z1=G1%p,z1=n;E.push(P7,y*Z1+h*z1+c,N*Z1+w*z1+o);let V1=G1,U1=D[G1];do{let Q1=e[U1];do G1+=Q1;while(!D[G1]);let H1=D[G1];H1!==5&&H1!==10?(U1=H1,D[G1]=0):(U1=H1&51*U1>>4,D[G1]&=U1>>2|U1<<2),Z1=G1%p,z1=G1/p|0,E.push(Q5,y*Z1+h*z1+c,N*Z1+w*z1+o),D[G1]||--d}while(V1!==G1);--n}return[aB,[new Float32Array(E)],new Float32Array([0,0,k,b])]}(K),B?void X.addImageOps(A5,B,U):(v("Cannot compile Type3 glyph."),void X.addImageOps(I6,[K],U));let x=`mask_${this.idFactory.createObjId()}`;if(X.addDependency(x),K.dataLen=K.bitmap?K.width*K.height*4:K.data.length,this._sendImgData(x,K),I=I6,B=[{data:x,width:K.width,height:K.height,interpolate:K.interpolate,count:1}],X.addImageOps(I,B,U),z){let A={objId:x,fn:I,args:B,optionalContent:U};R.set(z,$,A),$&&this._regionalImageCache.set(null,$,A)}return}let j=W.has("SMask")||W.has("Mask");if(q&&_+J<200&&!j){try{K=await new d4({xref:this.xref,res:P,image:Z,isInline:q,pdfFunctionFactory:this._pdfFunctionFactory,globalColorSpaceCache:this.globalColorSpaceCache,localColorSpaceCache:f}).createImageData(!0,!1),X.addImageOps(B3,[K],U)}catch(x){let A=`Unable to decode inline image: "${x}".`;if(!Q)throw Error(A);v(A)}return}let V=`img_${this.idFactory.createObjId()}`,H=!1,M=null;if(this.parsingType3Font?V=`${this.idFactory.getDocId()}_type3_${V}`:z&&$&&(H=this.globalImageCache.shouldCache($,this.pageIndex),H&&(t1(!q,"Cannot cache an inline image globally."),V=`${this.idFactory.getDocId()}_${V}`)),X.addDependency(V),I=w9,B=[V,_,J],X.addImageOps(I,B,U,j),H){if(M={objId:V,fn:I,args:B,optionalContent:U,hasMask:j,byteSize:0},this.globalImageCache.hasDecodeFailed($))return this.globalImageCache.setData($,M),void this._sendImgData(V,null,H);if(_*J>250000||j){let x=await this.handler.sendWithPromise("commonobj",[V,"CopyLocalImage",{imageRef:$}]);if(x)return this.globalImageCache.setData($,M),void this.globalImageCache.addByteSize($,x)}}if(d4.buildImage({xref:this.xref,res:P,image:Z,isInline:q,pdfFunctionFactory:this._pdfFunctionFactory,globalColorSpaceCache:this.globalColorSpaceCache,localColorSpaceCache:f}).then(async(x)=>(K=await x.createImageData(!1,Y),K.dataLen=K.bitmap?K.width*K.height*4:K.data.length,K.ref=$,H&&this.globalImageCache.addByteSize($,K.dataLen),this._sendImgData(V,K,H))).catch((x)=>(v(`Unable to decode image "${V}": "${x}".`),$&&this.globalImageCache.addDecodeFailed($),this._sendImgData(V,null,H))),z){let x={objId:V,fn:I,args:B,optionalContent:U,hasMask:j};R.set(z,$,x),$&&(this._regionalImageCache.set(null,$,x),H&&(t1(M,"The global cache-data must be available."),this.globalImageCache.setData($,M)))}}handleSMask(P,Z,q,X,z,R,f){let G=P.get("G"),Q={subtype:P.get("S").name,backdrop:P.get("BC")},Y=P.get("TR");if(q9(Y)){let W=this._pdfFunctionFactory.create(Y),$=new Uint8Array(256),_=new Float32Array(1);for(let J=0;J<256;J++)_[0]=J/255,W(_,0,_,0),$[J]=255*_[0]|0;Q.transferMap=$}return this.buildFormXObject(Z,G,Q,q,X,z.state.clone({newPath:!0}),R,f)}handleTransferFunction(P){let Z;if(Array.isArray(P))Z=P;else{if(!q9(P))return null;Z=[P]}let q=[],X=0,z=0;for(let R of Z){let f=this.xref.fetchIfRef(R);if(X++,G8(f,"Identity")){q.push(null);continue}if(!q9(f))return null;let G=this._pdfFunctionFactory.create(f),Q=new Uint8Array(256),Y=new Float32Array(1);for(let W=0;W<256;W++)Y[0]=W/255,G(Y,0,Y,0),Q[W]=255*Y[0]|0;q.push(Q),z++}return X!==1&&X!==4||z===0?null:q}handleTilingType(P,Z,q,X,z,R,f,G){let Q=new p8,Y=S.merge({xref:this.xref,dictArray:[z.get("Resources"),q]});return this.getOperatorList({stream:X,task:f,resources:Y,operatorList:Q}).then(function(){let W=Q.getIR(),$=mz(W,z,Z);R.addDependencies(Q.dependencies),R.addOp(P,$),z.objId&&G.set(null,z.objId,{operatorListIR:W,dict:z})}).catch((W)=>{if(!(W instanceof y8)){if(!this.options.ignoreErrors)throw W;v(`handleTilingType - ignoring pattern: "${W}".`)}})}async handleSetFont(P,Z,q,X,z,R,f=null,G=null){let Q=Z?.[0]instanceof t?Z[0].name:null,Y=await this.loadFont(Q,q,P,z,f,G);return Y.font.isType3Font&&X.addDependencies(Y.type3Dependencies),R.font=Y.font,Y.send(this.handler),Y.loadedName}handleText(P,Z){let q=Z.font,X=q.charsToGlyphs(P);if(q.data)(!!(Z.textRenderingMode&YB)||Z.fillColorSpace.name==="Pattern"||q.disableFontFace)&&x6.buildFontPaths(q,X,this.handler,this.options);return X}ensureStateFont(P){if(P.font)return;let Z=new s("Missing setFont (Tf) operator before text rendering operator.");if(!this.options.ignoreErrors)throw Z;v(`ensureStateFont: "${Z}".`)}async setGState({resources:P,gState:Z,operatorList:q,cacheKey:X,task:z,stateManager:R,localGStateCache:f,localColorSpaceCache:G,seenRefs:Q}){let Y=Z.objId,W=!0,$=[],_=Promise.resolve();for(let[J,U]of Z)switch(J){case"Type":break;case"LW":if(typeof U!="number"){v(`Invalid LW (line width): ${U}`);break}$.push([J,Math.abs(U)]);break;case"LC":case"LJ":case"ML":case"D":case"RI":case"FL":case"CA":case"ca":$.push([J,U]);break;case"Font":W=!1,_=_.then(()=>this.handleSetFont(P,null,U[0],q,z,R.state).then(function(I){q.addDependency(I),$.push([J,[I,U[1]]])}));break;case"BM":$.push([J,hG(U)]);break;case"SMask":if(G8(U,"None")){$.push([J,!1]);break}U instanceof S?(W=!1,_=_.then(()=>this.handleSMask(U,P,q,z,R,G,Q)),$.push([J,!0])):v("Unsupported SMask type");break;case"TR":let K=this.handleTransferFunction(U);$.push([J,K]);break;case"OP":case"op":case"OPM":case"BG":case"BG2":case"UCR":case"UCR2":case"TR2":case"HT":case"SM":case"SA":case"AIS":case"TK":v1("graphic state operator "+J);break;default:v1("Unknown graphic state operator "+J)}await _,$.length>0&&q.addOp(I5,[$]),W&&f.set(X,Y,$)}loadFont(P,Z,q,X,z=null,R=null){let f=async()=>new o2({loadedName:"g_font_error",font:new WZ(`Font "${P}" is not available.`),dict:Z}),G;if(Z)Z instanceof f1&&(G=Z);else{let K=q.get("Font");K&&(G=K.getRaw(P))}if(G){if(this.type3FontRefs?.has(G))return f();if(this.fontCache.has(G))return this.fontCache.get(G);try{Z=this.xref.fetchIfRef(G)}catch(K){v(`loadFont - lookup failed: "${K}".`)}}if(!(Z instanceof S)){if(!this.options.ignoreErrors&&!this.parsingType3Font)return v(`Font "${P}" is not available.`),f();v(`Font "${P}" is not available -- attempting to fallback to a default font.`),Z=z||x6.fallbackFontDict}if(Z.cacheKey&&this.fontCache.has(Z.cacheKey))return this.fontCache.get(Z.cacheKey);let{promise:Q,resolve:Y}=Promise.withResolvers(),W;try{W=this.preEvaluateFont(Z),W.cssFontInfo=R}catch(K){return v(`loadFont - preEvaluateFont failed: "${K}".`),f()}let{descriptor:$,hash:_}=W,J=G instanceof f1,U;if(_&&$ instanceof S){let K=$.fontAliases||=Object.create(null);if(K[_]){let I=K[_].aliasRef;if(J&&I&&this.fontCache.has(I))return this.fontCache.putAlias(G,I),this.fontCache.get(G)}else K[_]={fontID:this.idFactory.createFontId()};J&&(K[_].aliasRef=G),U=K[_].fontID}else U=this.idFactory.createFontId();return t1(U?.startsWith("f"),'The "fontID" must be (correctly) defined.'),J?this.fontCache.put(G,Q):(Z.cacheKey=`cacheKey_${U}`,this.fontCache.put(Z.cacheKey,Q)),Z.loadedName=`${this.idFactory.getDocId()}_${U}`,this.translateFont(W).then(async(K)=>{let I=new o2({loadedName:Z.loadedName,font:K,dict:Z});if(K.isType3Font)try{await I.loadType3Data(this,q,X)}catch(B){throw Error(`Type3 font load error: ${B}`)}Y(I)}).catch((K)=>{v(`loadFont - translateFont failed: "${K}".`),Y(new o2({loadedName:Z.loadedName,font:new WZ(K?.message),dict:Z}))}),Q}buildPath(P,Z,q){let{pathMinMax:X,pathBuffer:z}=q;switch(0|P){case F9:{let R=q.currentPointX=Z[0],f=q.currentPointY=Z[1],G=Z[2],Q=Z[3],Y=R+G,W=f+Q;G===0||Q===0?z.push(P7,R,f,Q5,Y,W,B2):z.push(P7,R,f,Q5,Y,f,Q5,Y,W,Q5,R,W,B2),s1.rectBoundingBox(R,f,Y,W,X);break}case z3:{let R=q.currentPointX=Z[0],f=q.currentPointY=Z[1];z.push(P7,R,f),s1.pointBoundingBox(R,f,X);break}case k9:{let R=q.currentPointX=Z[0],f=q.currentPointY=Z[1];z.push(Q5,R,f),s1.pointBoundingBox(R,f,X);break}case C9:{let{currentPointX:R,currentPointY:f}=q,[G,Q,Y,W,$,_]=Z;q.currentPointX=$,q.currentPointY=_,z.push(g2,G,Q,Y,W,$,_),s1.bezierBoundingBox(R,f,G,Q,Y,W,$,_,X);break}case T9:{let{currentPointX:R,currentPointY:f}=q,[G,Q,Y,W]=Z;q.currentPointX=Y,q.currentPointY=W,z.push(g2,R,f,G,Q,Y,W),s1.bezierBoundingBox(R,f,R,f,G,Q,Y,W,X);break}case N9:{let{currentPointX:R,currentPointY:f}=q,[G,Q,Y,W]=Z;q.currentPointX=Y,q.currentPointY=W,z.push(g2,G,Q,Y,W,Y,W),s1.bezierBoundingBox(R,f,G,Q,Y,W,Y,W,X);break}case v9:z.push(B2)}}_getColorSpace(P,Z,q){return g1.parse({cs:P,xref:this.xref,resources:Z,pdfFunctionFactory:this._pdfFunctionFactory,globalColorSpaceCache:this.globalColorSpaceCache,localColorSpaceCache:q,asyncIfNotCached:!0})}async _handleColorSpace(P){try{return await P}catch(Z){if(Z instanceof y8)return null;if(this.options.ignoreErrors)return v(`_handleColorSpace - ignoring ColorSpace: "${Z}".`),null;throw Z}}parseShading({shading:P,resources:Z,localColorSpaceCache:q,localShadingPatternCache:X}){let z,R=X.get(P);if(R)return R;try{z=TG.parseShading(P,this.xref,Z,this._pdfFunctionFactory,this.globalColorSpaceCache,q).getIR()}catch(f){if(f instanceof y8)return null;if(this.options.ignoreErrors)return v(`parseShading - ignoring shading: "${f}".`),X.set(P,null),null;throw f}return R=`pattern_${this.idFactory.createObjId()}`,this.parsingType3Font&&(R=`${this.idFactory.getDocId()}_type3_${R}`),X.set(P,R),this.parsingType3Font?this.handler.send("commonobj",[R,"Pattern",z]):this.handler.send("obj",[R,this.pageIndex,"Pattern",z]),R}handleColorN(P,Z,q,X,z,R,f,G,Q,Y){let W=q.pop();if(W instanceof t){let $=z.getRaw(W.name),_=$ instanceof f1&&Q.getByRef($);if(_)try{let U=X.base?X.base.getRgbHex(q,0):null,K=mz(_.operatorListIR,_.dict,U);return void P.addOp(Z,K)}catch{}let J=this.xref.fetchIfRef($);if(J){let U=J instanceof T1?J.dict:J,K=U.get("PatternType");if(K===RV){let I=X.base?X.base.getRgbHex(q,0):null;return this.handleTilingType(Z,I,R,J,U,P,f,Q)}if(K===fV){let I=U.get("Shading"),B=this.parseShading({shading:I,resources:R,localColorSpaceCache:G,localShadingPatternCache:Y});if(B){let j=g4(U.getArray("Matrix"),null);P.addOp(Z,["Shading",B,j])}return}throw new s(`Unknown PatternType: ${K}`)}}throw new s(`Unknown PatternName: ${W}`)}_parseVisibilityExpression(P,Z,q){if(++Z>10)return void v("Visibility expression is too deeply nested");let X=P.length,z=this.xref.fetchIfRef(P[0]);if(!(X<2)&&z instanceof t){switch(z.name){case"And":case"Or":case"Not":q.push(z.name);break;default:return void v(`Invalid operator ${z.name} in visibility expression`)}for(let R=1;R<X;R++){let f=P[R],G=this.xref.fetchIfRef(f);if(Array.isArray(G)){let Q=[];q.push(Q),this._parseVisibilityExpression(G,Z,Q)}else f instanceof f1&&q.push(f.toString())}}else v("Invalid visibility expression")}async parseMarkedContentProps(P,Z){let q;if(P instanceof t)q=Z.get("Properties").get(P.name);else{if(!(P instanceof S))throw new s("Optional content properties malformed.");q=P}let X=q.get("Type")?.name;if(X==="OCG")return{type:X,id:q.objId};if(X==="OCMD"){let z=q.get("VE");if(Array.isArray(z)){let f=[];if(this._parseVisibilityExpression(z,0,f),f.length>0)return{type:"OCMD",expression:f}}let R=q.get("OCGs");if(Array.isArray(R)||R instanceof S){let f=[];if(Array.isArray(R))for(let G of R)f.push(G.toString());else f.push(R.objId);return{type:X,ids:f,policy:q.get("P")instanceof t?q.get("P").name:null,expression:null}}if(R instanceof f1)return{type:X,id:R.toString()}}return null}getOperatorList({stream:P,task:Z,resources:q,operatorList:X,initialState:z=null,fallbackFontDict:R=null,prevRefs:f=null}){let G=P.dict?.objId,Q=new J8(f);if(G){if(f?.has(G))throw Error(`getOperatorList - ignoring circular reference: ${G}`);Q.put(G)}if(q||=S.empty,z||=new Hq,!X)throw Error('getOperatorList: missing "operatorList" parameter');let Y=this,W=this.xref,$=new _Z,_=new Vq,J=new JZ,U=new DG,K=new Map,I=q.get("XObject")||S.empty,B=q.get("Pattern")||S.empty,j=new U7(z),V=new l4(P,W,j),H=new D7;function M(x){for(let A=0,k=V.savedStatesDepth;A<k;A++)X.addOp(Q0,[])}return new Promise(function x(A,k){let b=function(L){Promise.all([L,X.ready]).then(function(){try{x(A,k)}catch(m){k(m)}},k)};Z.ensureNotTerminated(),H.reset();let O={},p,D,n,F,l,C;for(;!(p=H.check())&&(O.args=null,V.read(O));){let{args:L,fn:m}=O;switch(0|m){case D9:if(C=L[0]instanceof t,l=L[0].name,C){let w=$.getByName(l);if(w){z9(X,w),L=null;continue}}return void b(new Promise(function(w,c){if(!C)throw new s("XObject must be referred to by name.");let o=I.getRaw(l);if(o instanceof f1){let r=$.getByRef(o)||Y._regionalImageCache.getByRef(o)||Y.globalImageCache.getData(o,Y.pageIndex);if(r)return z9(X,r),void w();o=W.fetch(o)}if(!(o instanceof T1))throw new s("XObject should be a stream");let G1=o.dict.get("Subtype");if(!(G1 instanceof t))throw new s("XObject should have a Name subtype");if(G1.name==="Form")return j.save(),void Y.buildFormXObject(q,o,null,X,Z,j.state.clone({newPath:!0}),_,Q).then(function(){j.restore(),w()},c);if(G1.name!=="Image"){if(G1.name!=="PS")throw new s(`Unhandled XObject subtype ${G1.name}`);v1("Ignored XObject subtype PS"),w()}else Y.buildPaintImageXObject({resources:q,image:o,operatorList:X,cacheKey:l,localImageCache:$,localColorSpaceCache:_}).then(w,c)}).catch(function(w){if(!(w instanceof y8)){if(!Y.options.ignoreErrors)throw w;v(`getOperatorList - ignoring XObject: "${w}".`)}}));case h4:let d=L[1];return void b(Y.handleSetFont(q,L,null,X,Z,j.state,R).then(function(w){X.addDependency(w),X.addOp(h4,[w,d])}));case Gf:let e=L[0].cacheKey;if(e){let w=$.getByName(e);if(w){z9(X,w),L=null;continue}}return void b(Y.buildPaintImageXObject({resources:q,image:L[0],isInline:!0,operatorList:X,cacheKey:e,localImageCache:$,localColorSpaceCache:_}));case B4:if(!j.state.font){Y.ensureStateFont(j.state);continue}L[0]=Y.handleText(L[0],j.state);break;case W3:if(!j.state.font){Y.ensureStateFont(j.state);continue}let E=[],y=j.state;for(let w of L[0])typeof w=="string"?E.push(...Y.handleText(w,y)):typeof w=="number"&&E.push(w);L[0]=E,m=B4;break;case $3:if(!j.state.font){Y.ensureStateFont(j.state);continue}X.addOp(u2),L[0]=Y.handleText(L[0],j.state),m=B4;break;case _3:if(!j.state.font){Y.ensureStateFont(j.state);continue}X.addOp(u2),X.addOp(O9,[L.shift()]),X.addOp(p9,[L.shift()]),L[0]=Y.handleText(L[0],j.state),m=B4;break;case qf:j.state.textRenderingMode=L[0];break;case PP:{let w=Y._getColorSpace(L[0],q,_);if(w instanceof m8){j.state.fillColorSpace=w;continue}return void b(Y._handleColorSpace(w).then((c)=>{j.state.fillColorSpace=c||g1.gray}))}case iZ:{let w=Y._getColorSpace(L[0],q,_);if(w instanceof m8){j.state.strokeColorSpace=w;continue}return void b(Y._handleColorSpace(w).then((c)=>{j.state.strokeColorSpace=c||g1.gray}))}case ZP:F=j.state.fillColorSpace,L=[F.getRgbHex(L,0)],m=n0;break;case tZ:F=j.state.strokeColorSpace,L=[F.getRgbHex(L,0)],m=O4;break;case a7:j.state.fillColorSpace=g1.gray,L=[g1.gray.getRgbHex(L,0)],m=n0;break;case eZ:j.state.strokeColorSpace=g1.gray,L=[g1.gray.getRgbHex(L,0)],m=O4;break;case n7:j.state.fillColorSpace=g1.cmyk,L=[g1.cmyk.getRgbHex(L,0)],m=n0;break;case Pq:j.state.strokeColorSpace=g1.cmyk,L=[g1.cmyk.getRgbHex(L,0)],m=O4;break;case n0:j.state.fillColorSpace=g1.rgb,L=[g1.rgb.getRgbHex(L,0)];break;case O4:j.state.strokeColorSpace=g1.rgb,L=[g1.rgb.getRgbHex(L,0)];break;case U3:if(F=j.state.patternFillColorSpace,!F){if(e8(L,null)){L=[g1.gray.getRgbHex(L,0)],m=n0;break}L=[],m=oB;break}if(F.name==="Pattern")return void b(Y.handleColorN(X,U3,L,F,B,q,Z,_,U,K));L=[F.getRgbHex(L,0)],m=n0;break;case J3:if(F=j.state.patternStrokeColorSpace,!F){if(e8(L,null)){L=[g1.gray.getRgbHex(L,0)],m=O4;break}L=[],m=lB;break}if(F.name==="Pattern")return void b(Y.handleColorN(X,J3,L,F,B,q,Z,_,U,K));L=[F.getRgbHex(L,0)],m=O4;break;case K3:let N;try{let w=q.get("Shading");if(!w)throw new s("No shading resource found");if(N=w.get(L[0].name),!N)throw new s("No shading object found")}catch(w){if(w instanceof y8)continue;if(Y.options.ignoreErrors){v(`getOperatorList - ignoring Shading: "${w}".`);continue}throw w}let h=Y.parseShading({shading:N,resources:q,localColorSpaceCache:_,localShadingPatternCache:K});if(!h)continue;L=[h],m=K3;break;case I5:if(C=L[0]instanceof t,l=L[0].name,C){let w=J.getByName(l);if(w){w.length>0&&X.addOp(I5,[w]),L=null;continue}}return void b(new Promise(function(w,c){if(!C)throw new s("GState must be referred to by name.");let o=q.get("ExtGState");if(!(o instanceof S))throw new s("ExtGState should be a dictionary.");let G1=o.get(l);if(!(G1 instanceof S))throw new s("GState should be a dictionary.");Y.setGState({resources:q,gState:G1,operatorList:X,cacheKey:l,task:Z,stateManager:j,localGStateCache:J,localColorSpaceCache:_,seenRefs:Q}).then(w,c)}).catch(function(w){if(!(w instanceof y8)){if(!Y.options.ignoreErrors)throw w;v(`getOperatorList - ignoring ExtGState: "${w}".`)}}));case nR:{let[w]=L;if(typeof w!="number"){v(`Invalid setLineWidth: ${w}`);continue}L[0]=Math.abs(w);break}case iR:{let w=L[1];if(typeof w!="number"){v(`Invalid setDash: ${w}`);continue}let c=L[0];if(!Array.isArray(c)){v(`Invalid setDash: ${c}`);continue}c.some((o)=>typeof o!="number")&&(L[0]=c.filter((o)=>typeof o=="number"));break}case z3:case k9:case C9:case T9:case N9:case v9:case F9:Y.buildPath(m,L,j.state);continue;case oZ:case R3:case S9:case eR:case aZ:case nZ:case f3:case G3:case m9:{let{state:{pathBuffer:w,pathMinMax:c}}=j;m!==R3&&m!==f3&&m!==G3||w.push(B2),w.length===0?X.addOp(A5,[m,[null],null]):(X.addOp(A5,[m,[new Float32Array(w)],c.slice()]),w.length=0,c.set([1/0,1/0,-1/0,-1/0],0));continue}case S5:X.addOp(m,[new Float32Array(L)]);continue;case Qf:case Yf:case $f:case _f:continue;case i0:if(!(L[0]instanceof t)){v(`Expected name for beginMarkedContentProps arg0=${L[0]}`),X.addOp(i0,["OC",null]);continue}if(L[0].name==="OC")return void b(Y.parseMarkedContentProps(L[1],q).then((w)=>{X.addOp(i0,["OC",w])}).catch((w)=>{if(!(w instanceof y8)){if(Y.options.ignoreErrors)return v(`getOperatorList - ignoring beginMarkedContentProps: "${w}".`),void X.addOp(i0,["OC",null]);throw w}}));L=[L[0].name,L[1]instanceof S?L[1].get("MCID"):null];break;default:if(L!==null){for(D=0,n=L.length;D<n&&!(L[D]instanceof S);D++);if(D<n){v("getOperatorList - ignoring operator: "+m);continue}}}X.addOp(m,L)}p?b(dz):(M(),A())}).catch((x)=>{if(!(x instanceof y8)){if(this.options.ignoreErrors)return v(`getOperatorList - ignoring errors during "${Z.name}" task: "${x}".`),void M();throw x}})}getTextContent({stream:P,task:Z,resources:q,stateManager:X=null,includeMarkedContent:z=!1,sink:R,seenStyles:f=new Set,viewBox:G,lang:Q=null,markedContentData:Y=null,disableNormalization:W=!1,keepWhiteSpace:$=!1,prevRefs:_=null,intersector:J=null}){let U=P.dict?.objId,K=new J8(_);if(U){if(_?.has(U))throw Error(`getTextContent - ignoring circular reference: ${U}`);K.put(U)}q||=S.empty,X||=new U7(new rG),z&&(Y||={level:0});let I={items:[],styles:Object.create(null),lang:Q},B={initialized:!1,str:[],totalWidth:0,totalHeight:0,width:0,height:0,vertical:!1,prevTransform:null,textAdvanceScale:0,spaceInFlowMin:0,spaceInFlowMax:0,trackingSpaceMin:1/0,negativeSpaceMax:-1/0,notASpace:-1/0,transform:null,fontName:null,hasEOL:!1},j=[" "," "],V=0;function H(r){let Z1=(V+1)%2,z1=j[V]!==" "&&j[Z1]===" ";return j[V]=r,V=Z1,!$&&z1}function M(){return!$&&j[V]!==" "&&j[(V+1)%2]===" "}function x(){j[0]=j[1]=" ",V=0}let A=this,k=this.xref,b=[],O=null,p=new _Z,D=new JZ,n=new l4(P,k,X),F;function l({width:r=0,height:Z1=0,transform:z1=B.prevTransform,fontName:V1=B.fontName}){J?.addExtraChar(" "),I.items.push({str:" ",dir:"ltr",width:r,height:Z1,transform:z1,fontName:V1,hasEOL:!1})}function C(){let r=F.font,Z1=[F.fontSize*F.textHScale,0,0,F.fontSize,0,F.textRise];if(r.isType3Font&&(F.fontSize<=1||r.isCharBBox)&&!C7(F.fontMatrix,H5)){let z1=r.bbox[3]-r.bbox[1];z1>0&&(Z1[3]*=z1*F.fontMatrix[3])}return s1.transform(F.ctm,s1.transform(F.textMatrix,Z1))}function L(){if(B.initialized)return B;let{font:r,loadedName:Z1}=F;if(!f.has(Z1)&&(f.add(Z1),I.styles[Z1]={fontFamily:r.fallbackName,ascent:r.ascent,descent:r.descent,vertical:r.vertical},A.options.fontExtraProperties&&r.systemFontInfo)){let H1=I.styles[Z1];H1.fontSubstitution=r.systemFontInfo.css,H1.fontSubstitutionLoadedName=r.systemFontInfo.loadedName}B.fontName=Z1;let z1=B.transform=C();r.vertical?(B.width=B.totalWidth=Math.hypot(z1[0],z1[1]),B.height=B.totalHeight=0,B.vertical=!0):(B.width=B.totalWidth=0,B.height=B.totalHeight=Math.hypot(z1[2],z1[3]),B.vertical=!1);let V1=Math.hypot(F.textLineMatrix[0],F.textLineMatrix[1]),U1=Math.hypot(F.ctm[0],F.ctm[1]);B.textAdvanceScale=U1*V1;let{fontSize:Q1}=F;return B.trackingSpaceMin=0.102*Q1,B.notASpace=0.03*Q1,B.negativeSpaceMax=-0.2*Q1,B.spaceInFlowMin=0.102*Q1,B.spaceInFlowMax=0.6*Q1,B.hasEOL=!1,B.initialized=!0,B}function m(){if(!B.initialized)return;let r=Math.hypot(F.textLineMatrix[0],F.textLineMatrix[1]),Z1=Math.hypot(F.ctm[0],F.ctm[1])*r;Z1!==B.textAdvanceScale&&(B.vertical?(B.totalHeight+=B.height*B.textAdvanceScale,B.height=0):(B.totalWidth+=B.width*B.textAdvanceScale,B.width=0),B.textAdvanceScale=Z1)}function d(r){let Z1=r.str.join("");var z1;W||(z1=Z1,dP||(dP=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,tX=new Map([["ſt","ſt"]])),Z1=z1.replaceAll(dP,(U1,Q1,H1)=>Q1?Q1.normalize("NFKC"):tX.get(H1)));let V1=sG(Z1,-1,r.vertical);return{str:V1.str,dir:V1.dir,width:Math.abs(r.totalWidth),height:Math.abs(r.totalHeight),transform:r.transform,fontName:r.fontName,hasEOL:r.hasEOL}}async function e(r,Z1){let z1=await A.loadFont(r,Z1,q,Z);F.loadedName=z1.loadedName,F.font=z1.font,F.fontMatrix=z1.font.fontMatrix||H5}function E(r,Z1,z1){let V1=Math.hypot(z1[0],z1[1]);return[(z1[0]*r+z1[1]*Z1)/V1,(z1[2]*r+z1[3]*Z1)/V1]}function y(r){let Z1=C(),z1=Z1[4],V1=Z1[5];if(F.font?.vertical){if(z1<G[0]||z1>G[2]||V1+r<G[1]||V1>G[3])return!1}else if(z1+r<G[0]||z1>G[2]||V1<G[1]||V1>G[3])return!1;if(!F.font||!B.prevTransform)return!0;let U1=B.prevTransform[4],Q1=B.prevTransform[5];if(U1===z1&&Q1===V1)return!0;let H1=-1;switch(Z1[0]&&Z1[1]===0&&Z1[2]===0?H1=Z1[0]>0?0:180:Z1[1]&&Z1[0]===0&&Z1[3]===0&&(H1=Z1[1]>0?90:270),H1){case 0:break;case 90:[z1,V1]=[V1,z1],[U1,Q1]=[Q1,U1];break;case 180:[z1,V1,U1,Q1]=[-z1,-V1,-U1,-Q1];break;case 270:[z1,V1]=[-V1,-z1],[U1,Q1]=[-Q1,-U1];break;default:[z1,V1]=E(z1,V1,Z1),[U1,Q1]=E(U1,Q1,B.prevTransform)}if(F.font.vertical){let B1=(Q1-V1)/B.textAdvanceScale,Y1=z1-U1,_1=Math.sign(B.height);return B1<_1*B.negativeSpaceMax?Math.abs(Y1)>0.5*B.width?(h(),!0):(x(),c(),!0):Math.abs(Y1)>B.width?(h(),!0):(B1<=_1*B.notASpace&&x(),B1<=_1*B.trackingSpaceMin?M()?(x(),c(),l({height:Math.abs(B1)})):B.height+=B1:w(B1,B.prevTransform,_1)||(B.str.length===0?(x(),l({height:Math.abs(B1)})):B.height+=B1),Math.abs(Y1)>0.25*B.width&&c(),!0)}let J1=(z1-U1)/B.textAdvanceScale,W1=V1-Q1,k1=Math.sign(B.width);return J1<k1*B.negativeSpaceMax?Math.abs(W1)>0.5*B.height?(h(),!0):(x(),c(),!0):Math.abs(W1)>B.height?(h(),!0):(J1<=k1*B.notASpace&&x(),J1<=k1*B.trackingSpaceMin?M()?(x(),c(),l({width:Math.abs(J1)})):B.width+=J1:w(J1,B.prevTransform,k1)||(B.str.length===0?(x(),l({width:Math.abs(J1)})):B.width+=J1),Math.abs(W1)>0.25*B.height&&c(),!0)}function N({chars:r,extraSpacing:Z1}){let z1=F.font;if(!r){let Q1=F.charSpacing+Z1;return Q1&&(z1.vertical?F.translateTextMatrix(0,-Q1):F.translateTextMatrix(Q1*F.textHScale,0)),void($&&y(0))}let V1=z1.charsToGlyphs(r),U1=F.fontMatrix[0]*F.fontSize;for(let Q1=0,H1=V1.length;Q1<H1;Q1++){let J1=V1[Q1],{category:W1,originalCharCode:k1}=J1;if(W1.isInvisibleFormatMark)continue;let B1=F.charSpacing+(Q1+1===H1?Z1:0),Y1=J1.width;z1.vertical&&(Y1=J1.vmetric?J1.vmetric[0]:-Y1);let _1=Y1*U1;if(k1===32&&(B1+=F.wordSpacing),!$&&W1.isWhitespace){z1.vertical?(B1+=-_1,F.translateTextMatrix(0,-B1)):(B1+=_1,F.translateTextMatrix(B1*F.textHScale,0)),H(" ");continue}if(!W1.isZeroWidthDiacritic&&!y(_1)){z1.vertical?F.translateTextMatrix(0,_1):F.translateTextMatrix(_1*F.textHScale,0);continue}let w1=L();W1.isZeroWidthDiacritic&&(_1=0),z1.vertical?(J?.addGlyph(C(),0,_1,J1.unicode),F.translateTextMatrix(0,_1),_1=Math.abs(_1),w1.height+=_1):(_1*=F.textHScale,J?.addGlyph(C(),_1,0,J1.unicode),F.translateTextMatrix(_1,0),w1.width+=_1),_1&&(w1.prevTransform=C());let J0=J1.unicode;H(J0)&&(w1.str.push(" "),J?.addExtraChar(" ")),J||w1.str.push(J0),B1&&(z1.vertical?F.translateTextMatrix(0,-B1):F.translateTextMatrix(B1*F.textHScale,0))}}function h(){J?.addExtraChar(`
|
|
6
|
+
`),x(),B.initialized?(B.hasEOL=!0,c()):I.items.push({str:"",dir:"ltr",width:0,height:0,transform:C(),fontName:F.loadedName,hasEOL:!0})}function w(r,Z1,z1){if(z1*B.spaceInFlowMin<=r&&r<=z1*B.spaceInFlowMax)return B.initialized&&(x(),B.str.push(" "),J?.addExtraChar(" ")),!1;let V1=B.fontName,U1=0;return B.vertical&&(U1=r,r=0),c(),x(),l({width:Math.abs(r),height:Math.abs(U1),transform:Z1||C(),fontName:V1}),!0}function c(){B.initialized&&B.str&&(B.vertical?B.totalHeight+=B.height*B.textAdvanceScale:B.totalWidth+=B.width*B.textAdvanceScale,I.items.push(d(B)),B.initialized=!1,B.str.length=0)}function o(r=!1){let Z1=I.items.length;Z1!==0&&(r&&Z1<10||(R?.enqueue(I,Z1),I.items=[],I.styles=Object.create(null)))}let G1=new D7;return new Promise(function r(Z1,z1){let V1=function(k1){o(!0),Promise.all([k1,R?.ready]).then(function(){try{r(Z1,z1)}catch(B1){z1(B1)}},z1)};Z.ensureNotTerminated(),G1.reset();let U1={},Q1,H1,J1,W1=[];for(;!(Q1=G1.check())&&(W1.length=0,U1.args=W1,n.read(U1));){let k1=F;F=X.state;let B1=U1.fn;switch(W1=U1.args,0|B1){case h4:let Y1=W1[0].name,_1=W1[1];if(F.font&&Y1===F.fontName&&_1===F.fontSize)break;return c(),F.fontName=Y1,F.fontSize=_1,void V1(e(Y1,null));case Xf:F.textRise=W1[0];break;case Pf:F.textHScale=W1[0]/100;break;case Zf:F.leading=W1[0];break;case zf:F.translateTextLineMatrix(W1[0],W1[1]),F.textMatrix=F.textLineMatrix.slice();break;case Rf:F.leading=-W1[1],F.translateTextLineMatrix(W1[0],W1[1]),F.textMatrix=F.textLineMatrix.slice();break;case u2:F.carriageReturn();break;case S5:F.setTextMatrix(W1[0],W1[1],W1[2],W1[3],W1[4],W1[5]),F.setTextLineMatrix(W1[0],W1[1],W1[2],W1[3],W1[4],W1[5]),m();break;case p9:F.charSpacing=W1[0];break;case O9:F.wordSpacing=W1[0];break;case Q3:F.textMatrix=w0.slice(),F.textLineMatrix=w0.slice();break;case W3:if(!X.state.font){A.ensureStateFont(X.state);continue}let w1=(F.font.vertical?1:-1)*F.fontSize/1000,J0=W1[0];for(let i1=0,Z5=J0.length;i1<Z5;i1++){let O8=J0[i1];if(typeof O8=="string")b.push(O8);else if(typeof O8=="number"&&O8!==0){let p0=b.join("");b.length=0,N({chars:p0,extraSpacing:O8*w1})}}if(b.length>0){let i1=b.join("");b.length=0,N({chars:i1,extraSpacing:0})}break;case B4:if(!X.state.font){A.ensureStateFont(X.state);continue}N({chars:W1[0],extraSpacing:0});break;case $3:if(!X.state.font){A.ensureStateFont(X.state);continue}F.carriageReturn(),N({chars:W1[0],extraSpacing:0});break;case _3:if(!X.state.font){A.ensureStateFont(X.state);continue}F.wordSpacing=W1[0],F.charSpacing=W1[1],F.carriageReturn(),N({chars:W1[2],extraSpacing:0});break;case D9:if(c(),O??=q.get("XObject")||S.empty,J1=W1[0]instanceof t,H1=W1[0].name,J1&&p.getByName(H1))break;return void V1(new Promise(function(i1,Z5){if(!J1)throw new s("XObject must be referred to by name.");let O8=O.getRaw(H1);if(O8 instanceof f1){if(p.getByRef(O8))return void i1();if(A.globalImageCache.getData(O8,A.pageIndex))return void i1();O8=k.fetch(O8)}if(!(O8 instanceof T1))throw new s("XObject should be a stream");let{dict:p0}=O8,g5=p0.get("Subtype");if(!(g5 instanceof t))throw new s("XObject should have a Name subtype");if(g5.name!=="Form")return p.set(H1,p0.objId,!0),void i1();let nK=X.state.clone(),OX=new U7(nK),yX=g4(p0.getArray("Matrix"),null);yX&&OX.transform(yX);let DX=p0.get("Resources");o();let wX={enqueueInvoked:!1,enqueue(iK,tK){this.enqueueInvoked=!0,R.enqueue(iK,tK)},get desiredSize(){return R.desiredSize??0},get ready(){return R.ready}};A.getTextContent({stream:O8,task:Z,resources:DX instanceof S?DX:q,stateManager:OX,includeMarkedContent:z,sink:R&&wX,seenStyles:f,viewBox:G,lang:Q,markedContentData:Y,disableNormalization:W,keepWhiteSpace:$,prevRefs:K}).then(function(){wX.enqueueInvoked||p.set(H1,p0.objId,!0),i1()},Z5)}).catch(function(i1){if(!(i1 instanceof y8)){if(!A.options.ignoreErrors)throw i1;v(`getTextContent - ignoring XObject: "${i1}".`)}}));case I5:if(J1=W1[0]instanceof t,H1=W1[0].name,J1&&D.getByName(H1))break;return void V1(new Promise(function(i1,Z5){if(!J1)throw new s("GState must be referred to by name.");let O8=q.get("ExtGState");if(!(O8 instanceof S))throw new s("ExtGState should be a dictionary.");let p0=O8.get(H1);if(!(p0 instanceof S))throw new s("GState should be a dictionary.");let g5=p0.get("Font");if(!g5)return D.set(H1,p0.objId,!0),void i1();c(),F.fontName=null,F.fontSize=g5[1],e(null,g5[0]).then(i1,Z5)}).catch(function(i1){if(!(i1 instanceof y8)){if(!A.options.ignoreErrors)throw i1;v(`getTextContent - ignoring ExtGState: "${i1}".`)}}));case Wf:c(),z&&(Y.level++,I.items.push({type:"beginMarkedContent",tag:W1[0]instanceof t?W1[0].name:null}));break;case i0:if(c(),z){Y.level++;let i1=null;W1[1]instanceof S&&(i1=W1[1].get("MCID")),I.items.push({type:"beginMarkedContentProps",id:Number.isInteger(i1)?`${A.idFactory.getPageObjId()}_mc${i1}`:null,tag:W1[0]instanceof t?W1[0].name:null})}break;case B6:if(c(),z){if(Y.level===0)break;Y.level--,I.items.push({type:"endMarkedContent"})}break;case Q0:!k1||k1.font===F.font&&k1.fontSize===F.fontSize&&k1.fontName===F.fontName||c()}if(I.items.length>=(R?.desiredSize??1)){Q1=!0;break}}Q1?V1(dz):(c(),o(),Z1())}).catch((r)=>{if(!(r instanceof y8)){if(this.options.ignoreErrors)return v(`getTextContent - ignoring errors during "${Z.name}" task: "${r}".`),c(),void o();throw r}})}async extractDataStructures(P,Z){let q=this.xref,X,z=this.readToUnicode(Z.toUnicode);if(Z.composite){let $=P.get("CIDSystemInfo");$ instanceof S&&(Z.cidSystemInfo={registry:E1($.get("Registry")),ordering:E1($.get("Ordering")),supplement:$.get("Supplement")});try{let _=P.get("CIDToGIDMap");_ instanceof T1&&(X=_.getBytes())}catch(_){if(!this.options.ignoreErrors)throw _;v(`extractDataStructures - ignoring CIDToGIDMap data: "${_}".`)}}let R=[],f,G=null;if(P.has("Encoding")){if(f=P.get("Encoding"),f instanceof S){if(G=f.get("BaseEncoding"),G=G instanceof t?G.name:null,f.has("Differences")){let $=f.get("Differences"),_=0;for(let J of $){let U=q.fetchIfRef(J);if(typeof U=="number")_=U;else{if(!(U instanceof t))throw new s(`Invalid entry in 'Differences' array: ${U}`);R[_++]=U.name}}}}else if(f instanceof t)G=f.name;else{if(!this.options.ignoreErrors)throw new s("Encoding is not a Name nor a Dict");v("Encoding is not a Name nor a Dict")}G!=="MacRomanEncoding"&&G!=="MacExpertEncoding"&&G!=="WinAnsiEncoding"&&(G=null)}let Q=!Z.file||Z.isInternalFont,Y=RZ()[Z.name];if(G&&Q&&Y&&(G=null),G)Z.defaultEncoding=v7(G);else{let $=!!(Z.flags&k3),_=!!(Z.flags&Kz);Z.type==="TrueType"&&$&&_&&R.length!==0&&(Z.flags&=-5,$=!1),f=A4,Z.type!=="TrueType"||_||(f=N7),($||Y)&&(f=Gq,Q&&(/Symbol/i.test(Z.name)?f=Qq:/Dingbats/i.test(Z.name)?f=Yq:/Wingdings/i.test(Z.name)&&(f=N7))),Z.defaultEncoding=f}Z.differences=R,Z.baseEncodingName=G,Z.hasEncoding=!!G||R.length>0,Z.dict=P,Z.toUnicode=await z;let W=await this.buildToUnicode(Z);return Z.toUnicode=W,X&&(Z.cidToGidMap=this.readCidToGidMap(X,W)),Z}_simpleFontToUnicode(P,Z=!1){t1(!P.composite,"Must be a simple font.");let q=[],X=P.defaultEncoding.slice(),z=P.baseEncodingName,R=P.differences;for(let G in R){let Q=R[G];Q!==".notdef"&&(X[G]=Q)}let f=l0();for(let G in X){let Q=X[G];if(Q==="")continue;let Y=f[Q];if(Y!==void 0){q[G]=String.fromCharCode(Y);continue}let W=0;switch(Q[0]){case"G":Q.length===3&&(W=parseInt(Q.substring(1),16));break;case"g":Q.length===5&&(W=parseInt(Q.substring(1),16));break;case"C":case"c":if(Q.length>=3&&Q.length<=4){let $=Q.substring(1);if(Z){W=parseInt($,16);break}if(W=+$,Number.isNaN(W)&&Number.isInteger(parseInt($,16)))return this._simpleFontToUnicode(P,!0)}break;case"u":Y=V6(Q,f),Y!==-1&&(W=Y);break;default:switch(Q){case"f_h":case"f_t":case"T_h":q[G]=Q.replaceAll("_","");continue}}if(W>0&&W<=1114111&&Number.isInteger(W)){if(z&&W===+G){let $=v7(z);if($&&(Q=$[G])){q[G]=String.fromCharCode(f[Q]);continue}}q[G]=String.fromCodePoint(W)}}return q}async buildToUnicode(P){if(P.hasIncludedToUnicodeMap=P.toUnicode?.length>0,P.hasIncludedToUnicodeMap)return!P.composite&&P.hasEncoding&&(P.fallbackToUnicode=this._simpleFontToUnicode(P)),P.toUnicode;if(!P.composite)return new Z6(this._simpleFontToUnicode(P));if(P.composite&&(P.cMap.builtInCMap&&!(P.cMap instanceof b5)||P.cidSystemInfo?.registry==="Adobe"&&(P.cidSystemInfo.ordering==="GB1"||P.cidSystemInfo.ordering==="CNS1"||P.cidSystemInfo.ordering==="Japan1"||P.cidSystemInfo.ordering==="Korea1"))){let{registry:Z,ordering:q}=P.cidSystemInfo,X=t.get(`${Z}-${q}-UCS2`),z=await X7.create({encoding:X,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}),R=[],f=[];return P.cMap.forEach(function(G,Q){if(Q>65535)throw new s("Max size of CID is 65,535");let Y=z.lookup(Q);if(Y){f.length=0;for(let W=0,$=Y.length;W<$;W+=2)f.push((Y.charCodeAt(W)<<8)+Y.charCodeAt(W+1));R[G]=String.fromCharCode(...f)}}),new Z6(R)}return new j0(P.firstChar,P.lastChar)}async readToUnicode(P){if(!P)return null;if(P instanceof t){let Z=await X7.create({encoding:P,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});return Z instanceof b5?new j0(0,65535):new Z6(Z.getMap())}if(P instanceof T1)try{let Z=await X7.create({encoding:P,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});if(Z instanceof b5)return new j0(0,65535);let q=Array(Z.length);return Z.forEach(function(X,z){if(typeof z=="number")return void(q[X]=String.fromCodePoint(z));z.length%2!=0&&(z="\x00"+z);let R=[];for(let f=0;f<z.length;f+=2){let G=z.charCodeAt(f)<<8|z.charCodeAt(f+1);if((63488&G)!=55296){R.push(G);continue}f+=2;let Q=z.charCodeAt(f)<<8|z.charCodeAt(f+1);R.push(((1023&G)<<10)+(1023&Q)+65536)}q[X]=String.fromCodePoint(...R)}),new Z6(q)}catch(Z){if(Z instanceof y8)return null;if(this.options.ignoreErrors)return v(`readToUnicode - ignoring ToUnicode data: "${Z}".`),null;throw Z}return null}readCidToGidMap(P,Z){let q=[];for(let X=0,z=P.length;X<z;X++){let R=P[X++]<<8|P[X],f=X>>1;(R!==0||Z.has(f))&&(q[f]=R)}return q}extractWidths(P,Z,q){let X=this.xref,z=[],R=0,f=[],G;if(q.composite){let W=P.get("DW");R=typeof W=="number"?Math.ceil(W):1000;let $=P.get("W");if(Array.isArray($))for(let _=0,J=$.length;_<J;_++){let U=X.fetchIfRef($[_++]);if(!Number.isInteger(U))break;let K=X.fetchIfRef($[_]);if(Array.isArray(K))for(let I of K){let B=X.fetchIfRef(I);typeof B=="number"&&(z[U]=B),U++}else{if(!Number.isInteger(K))break;{let I=X.fetchIfRef($[++_]);if(typeof I!="number")continue;for(let B=U;B<=K;B++)z[B]=I}}}if(q.vertical){let _=P.getArray("DW2"),J=e8(_,2)?_:[880,-1000];if(G=[J[1],0.5*R,J[0]],J=P.get("W2"),Array.isArray(J))for(let U=0,K=J.length;U<K;U++){let I=X.fetchIfRef(J[U++]);if(!Number.isInteger(I))break;let B=X.fetchIfRef(J[U]);if(Array.isArray(B))for(let j=0,V=B.length;j<V;j++){let H=[X.fetchIfRef(B[j++]),X.fetchIfRef(B[j++]),X.fetchIfRef(B[j])];e8(H,null)&&(f[I]=H),I++}else{if(!Number.isInteger(B))break;{let j=[X.fetchIfRef(J[++U]),X.fetchIfRef(J[++U]),X.fetchIfRef(J[++U])];if(!e8(j,null))continue;for(let V=I;V<=B;V++)f[V]=j}}}}}else{let W=P.get("Widths");if(Array.isArray(W)){let $=q.firstChar;for(let J of W){let U=X.fetchIfRef(J);typeof U=="number"&&(z[$]=U),$++}let _=Z.get("MissingWidth");R=typeof _=="number"?_:0}else{let $=P.get("BaseFont");if($ instanceof t){let _=this.getBaseFontMetrics($.name);z=this.buildCharCodeToWidth(_.widths,q),R=_.defaultWidth}}}let Q=!0,Y=R;for(let W in z){let $=z[W];if($)if(Y){if(Y!==$){Q=!1;break}}else Y=$}Q?q.flags|=qZ:q.flags&=-2,q.defaultWidth=R,q.widths=z,q.defaultVMetrics=G,q.vmetrics=f}isSerifFont(P){let Z=P.split("-",1)[0];return Z in Jq()||/serif/gi.test(Z)}getBaseFontMetrics(P){let Z=0,q=Object.create(null),X=!1,z=p7()[P]||P,R=tI();z in R||(z=this.isSerifFont(P)?"Times-Roman":"Helvetica");let f=R[z];return typeof f=="number"?(Z=f,X=!0):q=f(),{defaultWidth:Z,monospace:X,widths:q}}buildCharCodeToWidth(P,Z){let q=Object.create(null),X=Z.differences,z=Z.defaultEncoding;for(let R=0;R<256;R++)R in X&&P[X[R]]?q[R]=P[X[R]]:(R in z)&&P[z[R]]&&(q[R]=P[z[R]]);return q}preEvaluateFont(P){let Z=P,q=P.get("Subtype");if(!(q instanceof t))throw new s("invalid font Subtype");let X,z=!1;if(q.name==="Type0"){let Y=P.get("DescendantFonts");if(!Y)throw new s("Descendant fonts are not specified");if(!((P=Array.isArray(Y)?this.xref.fetchIfRef(Y[0]):Y)instanceof S))throw new s("Descendant font is not a dictionary.");if(q=P.get("Subtype"),!(q instanceof t))throw new s("invalid font Subtype");z=!0}let R=P.get("FirstChar");Number.isInteger(R)||(R=0);let f=P.get("LastChar");Number.isInteger(f)||(f=z?65535:255);let G=P.get("FontDescriptor"),Q=P.get("ToUnicode")||Z.get("ToUnicode");if(G){X=new XV;let Y=Z.getRaw("Encoding");if(Y instanceof t)X.update(Y.name);else if(Y instanceof f1)X.update(Y.toString());else if(Y instanceof S){for(let $ of Y.getRawValues())if($ instanceof t)X.update($.name);else if($ instanceof f1)X.update($.toString());else if(Array.isArray($)){let _=$.length,J=Array(_);for(let U=0;U<_;U++){let K=$[U];K instanceof t?J[U]=K.name:(typeof K=="number"||K instanceof f1)&&(J[U]=K.toString())}X.update(J.join())}}if(X.update(`${R}-${f}`),Q instanceof T1){let $=Q.str||Q,_=$.buffer?new Uint8Array($.buffer.buffer,0,$.bufferLength):new Uint8Array($.bytes.buffer,$.start,$.end-$.start);X.update(_)}else Q instanceof t&&X.update(Q.name);let W=P.get("Widths")||Z.get("Widths");if(Array.isArray(W)){let $=[];for(let _ of W)(typeof _=="number"||_ instanceof f1)&&$.push(_.toString());X.update($.join())}if(z){X.update("compositeFont");let $=P.get("W")||Z.get("W");if(Array.isArray($)){let J=[];for(let U of $)if(typeof U=="number"||U instanceof f1)J.push(U.toString());else if(Array.isArray(U)){let K=[];for(let I of U)(typeof I=="number"||I instanceof f1)&&K.push(I.toString());J.push(`[${K.join()}]`)}X.update(J.join())}let _=P.getRaw("CIDToGIDMap")||Z.getRaw("CIDToGIDMap");_ instanceof t?X.update(_.name):_ instanceof f1?X.update(_.toString()):_ instanceof T1&&X.update(_.peekBytes())}}return{descriptor:G,dict:P,baseDict:Z,composite:z,type:q.name,firstChar:R,lastChar:f,toUnicode:Q,hash:X?X.hexdigest():""}}async translateFont({descriptor:P,dict:Z,baseDict:q,composite:X,type:z,firstChar:R,lastChar:f,toUnicode:G,cssFontInfo:Q}){let Y=z==="Type3";if(!P){if(!Y){let C=Z.get("BaseFont");if(!(C instanceof t))throw new s("Base font is not specified");C=C.name.replaceAll(/[,_]/g,"-");let L=this.getBaseFontMetrics(C),m=C.split("-",1)[0],d=(this.isSerifFont(m)?QG:0)|(L.monospace?qZ:0)|(RZ()[m]?k3:Kz),e={type:z,name:C,loadedName:q.loadedName,systemFontInfo:null,widths:L.widths,defaultWidth:L.defaultWidth,isSimulatedFlags:!0,flags:d,firstChar:R,lastChar:f,toUnicode:G,xHeight:0,capHeight:0,italicAngle:0,isType3Font:Y},E=Z.get("Widths"),y=jz(C),N=null;y&&(N=await this.fetchStandardFontData(y),e.isInternalFont=!!N),!e.isInternalFont&&this.options.useSystemFonts&&(e.systemFontInfo=Ez(this.systemFontCache,this.idFactory,this.options.standardFontDataUrl,C,y,z));let h=await this.extractDataStructures(Z,e);if(Array.isArray(E)){let w=[],c=R;for(let o of E){let G1=this.xref.fetchIfRef(o);typeof G1=="number"&&(w[c]=G1),c++}h.widths=w}else h.widths=this.buildCharCodeToWidth(L.widths,h);return new YZ(C,N,h,this.options)}P=S.empty}let W=P.get("FontName"),$=Z.get("BaseFont");typeof W=="string"&&(W=t.get(W)),typeof $=="string"&&($=t.get($));let _=W?.name,J=$?.name;if(Y?_||(W=t.get(z)):_!==J&&(v1(`The FontDescriptor's FontName is "${_}" but should be the same as the Font's BaseFont "${J}".`),_&&J&&(J.startsWith(_)||!Vz(_)&&Vz(J))&&(W=null),W||=$),!(W instanceof t))throw new s("invalid font name");let U,K,I,B,j;try{if(U=P.get("FontFile","FontFile2","FontFile3"),U){if(!(U instanceof T1))throw new s("FontFile should be a stream");if(U.isEmpty)throw new s("FontFile is empty")}}catch(C){if(!this.options.ignoreErrors)throw C;v(`translateFont - fetching "${W.name}" font file: "${C}".`),U=null}let V=!1,H=null,M=null;if(U){if(U.dict){let C=U.dict.get("Subtype");C instanceof t&&(K=C.name),I=U.dict.get("Length1"),B=U.dict.get("Length2"),j=U.dict.get("Length3")}}else if(Q){let C=jq(W.name);C&&(Q.fontFamily=`${Q.fontFamily}-PdfJS-XFA`,Q.metrics=C.metrics||null,H=C.factors||null,U=await this.fetchStandardFontData(C.name),V=!!U,q=Z=mG(W.name),X=!0)}else if(!Y){let C=jz(W.name);C&&(U=await this.fetchStandardFontData(C),V=!!U),!V&&this.options.useSystemFonts&&(M=Ez(this.systemFontCache,this.idFactory,this.options.standardFontDataUrl,W.name,C,z))}let x=g4(Z.getArray("FontMatrix"),H5),A=k4(P.getArray("FontBBox")||Z.getArray("FontBBox"),Y?[0,0,0,0]:void 0),k=P.get("Ascent");typeof k!="number"&&(k=void 0);let b=P.get("Descent");typeof b!="number"&&(b=void 0);let O=P.get("XHeight");typeof O!="number"&&(O=0);let p=P.get("CapHeight");typeof p!="number"&&(p=0);let D=P.get("Flags");Number.isInteger(D)||(D=0);let n=P.get("ItalicAngle");typeof n!="number"&&(n=0);let F={type:z,name:W.name,subtype:K,file:U,length1:I,length2:B,length3:j,isInternalFont:V,loadedName:q.loadedName,composite:X,fixedPitch:!1,fontMatrix:x,firstChar:R,lastChar:f,toUnicode:G,bbox:A,ascent:k,descent:b,xHeight:O,capHeight:p,flags:D,italicAngle:n,isType3Font:Y,cssFontInfo:Q,scaleFactors:H,systemFontInfo:M};if(X){let C=q.get("Encoding");C instanceof t&&(F.cidEncoding=C.name);let L=await X7.create({encoding:C,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});F.cMap=L,F.vertical=F.cMap.vertical}let l=await this.extractDataStructures(Z,F);return this.extractWidths(Z,P,l),new YZ(W.name,U,l,this.options)}static buildFontPaths(P,Z,q,X){function z(R){let f=`${P.loadedName}_path_${R}`;try{if(P.renderer.hasBuiltPath(R))return;q.send("commonobj",[f,"FontPath",P.renderer.getPathJs(R)])}catch(G){if(X.ignoreErrors)return void v(`buildFontPaths - ignoring ${f} glyph: "${G}".`);throw G}}for(let R of Z){z(R.fontChar);let f=R.accent;f?.fontChar&&z(f.fontChar)}}static get fallbackFontDict(){let P=new S;return P.set("BaseFont",t.get("Helvetica")),P.set("Type",t.get("FallbackType")),P.set("Subtype",t.get("FallbackType")),P.set("Encoding",t.get("WinAnsiEncoding")),q1(this,"fallbackFontDict",P)}}class o2{#P=!1;#Z=null;constructor({loadedName:P,font:Z,dict:q}){this.loadedName=P,this.font=Z,this.dict=q,this.type3Dependencies=Z.isType3Font?new Set:null}send(P){if(this.#P)return;this.#P=!0;let Z=this.font.exportData(),q=[];Z.data&&(Z.data.charProcOperatorList&&(Z.charProcOperatorList=Z.data.charProcOperatorList),Z.data=ZV.write(Z.data),q.push(Z.data)),P.send("commonobj",[this.loadedName,"Font",Z],q)}fallback(P,Z){this.font.data&&(this.font.disableFontFace=!0,x6.buildFontPaths(this.font,this.font.glyphCacheValues,P,Z))}loadType3Data(P,Z,q){if(this.#Z)return this.#Z;let{font:X,type3Dependencies:z}=this;t1(X.isType3Font,"Must be a Type3 font.");let R=P.clone({ignoreErrors:!1}),f=new J8(P.type3FontRefs);this.dict.objId&&!f.has(this.dict.objId)&&f.put(this.dict.objId),R.type3FontRefs=f;let G=Promise.resolve(),Q=this.dict.get("CharProcs"),Y=this.dict.get("Resources")||Z,W=Object.create(null),[$,_,J,U]=X.bbox,K=J-$,I=U-_,B=Math.hypot(K,I);for(let j of Q.getKeys())G=G.then(()=>{let V=Q.get(j),H=new p8;return R.getOperatorList({stream:V,task:q,resources:Y,operatorList:H}).then(()=>{switch(H.fnArray[0]){case y9:this.#X(H,B);break;case ff:B||this.#q(H)}W[j]=H.getIR();for(let M of H.dependencies)z.add(M)}).catch(function(M){v(`Type3 font resource "${j}" is not available.`);let x=new p8;W[j]=x.getIR()})});return this.#Z=G.then(()=>{X.charProcOperatorList=W,this._bbox&&(X.isCharBBox=!0,X.bbox=this._bbox)}),this.#Z}#X(P,Z=NaN){let q=s1.normalizeRect(P.argsArray[0].slice(2)),X=q[2]-q[0],z=q[3]-q[1],R=Math.hypot(X,z);X===0||z===0?(P.fnArray.splice(0,1),P.argsArray.splice(0,1)):(Z===0||Math.round(R/Z)>=10)&&(this._bbox??=[1/0,1/0,-1/0,-1/0],s1.rectBoundingBox(...q,this._bbox));let f=0,G=P.length;for(;f<G;){switch(P.fnArray[f]){case y9:break;case iZ:case PP:case tZ:case J3:case ZP:case U3:case eZ:case a7:case O4:case n0:case Pq:case n7:case K3:case tR:P.fnArray.splice(f,1),P.argsArray.splice(f,1),G--;continue;case I5:let[Q]=P.argsArray[f],Y=0,W=Q.length;for(;Y<W;){let[$]=Q[Y];switch($){case"TR":case"TR2":case"HT":case"BG":case"BG2":case"UCR":case"UCR2":Q.splice(Y,1),W--;continue}Y++}}f++}}#q(P){let Z=1,q=P.length;for(;Z<q;){if(P.fnArray[Z]===A5){let X=P.argsArray[Z][2];this._bbox??=[1/0,1/0,-1/0,-1/0],s1.rectBoundingBox(...X,this._bbox)}Z++}}}class U7{constructor(P=new Hq){this.state=P,this.stateStack=[]}save(){let P=this.state;this.stateStack.push(this.state),this.state=P.clone()}restore(){let P=this.stateStack.pop();P&&(this.state=P)}transform(P){this.state.ctm=s1.transform(this.state.ctm,P)}}class rG{constructor(){this.ctm=new Float32Array(w0),this.fontName=null,this.fontSize=0,this.loadedName=null,this.font=null,this.fontMatrix=H5,this.textMatrix=w0.slice(),this.textLineMatrix=w0.slice(),this.charSpacing=0,this.wordSpacing=0,this.leading=0,this.textHScale=1,this.textRise=0}setTextMatrix(P,Z,q,X,z,R){let f=this.textMatrix;f[0]=P,f[1]=Z,f[2]=q,f[3]=X,f[4]=z,f[5]=R}setTextLineMatrix(P,Z,q,X,z,R){let f=this.textLineMatrix;f[0]=P,f[1]=Z,f[2]=q,f[3]=X,f[4]=z,f[5]=R}translateTextMatrix(P,Z){let q=this.textMatrix;q[4]=q[0]*P+q[2]*Z+q[4],q[5]=q[1]*P+q[3]*Z+q[5]}translateTextLineMatrix(P,Z){let q=this.textLineMatrix;q[4]=q[0]*P+q[2]*Z+q[4],q[5]=q[1]*P+q[3]*Z+q[5]}carriageReturn(){this.translateTextLineMatrix(0,-this.leading),this.textMatrix=this.textLineMatrix.slice()}clone(){let P=Object.create(this);return P.textMatrix=this.textMatrix.slice(),P.textLineMatrix=this.textLineMatrix.slice(),P.fontMatrix=this.fontMatrix.slice(),P}}class Hq{constructor(){this.ctm=new Float32Array(w0),this.font=null,this.textRenderingMode=QB,this._fillColorSpace=this._strokeColorSpace=g1.gray,this.patternFillColorSpace=null,this.patternStrokeColorSpace=null,this.currentPointX=this.currentPointY=0,this.pathMinMax=new Float32Array([1/0,1/0,-1/0,-1/0]),this.pathBuffer=[]}get fillColorSpace(){return this._fillColorSpace}set fillColorSpace(P){this._fillColorSpace=this.patternFillColorSpace=P}get strokeColorSpace(){return this._strokeColorSpace}set strokeColorSpace(P){this._strokeColorSpace=this.patternStrokeColorSpace=P}clone({newPath:P=!1}={}){let Z=Object.create(this);return P&&(Z.pathBuffer=[],Z.pathMinMax=new Float32Array([1/0,1/0,-1/0,-1/0])),Z}}class l4{static get opMap(){return q1(this,"opMap",Object.assign(Object.create(null),{w:{id:nR,numArgs:1,variableArgs:!1},J:{id:SB,numArgs:1,variableArgs:!1},j:{id:mB,numArgs:1,variableArgs:!1},M:{id:pB,numArgs:1,variableArgs:!1},d:{id:iR,numArgs:2,variableArgs:!1},ri:{id:tR,numArgs:1,variableArgs:!1},i:{id:OB,numArgs:1,variableArgs:!1},gs:{id:I5,numArgs:1,variableArgs:!1},q:{id:O0,numArgs:0,variableArgs:!1},Q:{id:Q0,numArgs:0,variableArgs:!1},cm:{id:$4,numArgs:6,variableArgs:!1},m:{id:z3,numArgs:2,variableArgs:!1},l:{id:k9,numArgs:2,variableArgs:!1},c:{id:C9,numArgs:6,variableArgs:!1},v:{id:T9,numArgs:4,variableArgs:!1},y:{id:N9,numArgs:4,variableArgs:!1},h:{id:v9,numArgs:0,variableArgs:!1},re:{id:F9,numArgs:4,variableArgs:!1},S:{id:oZ,numArgs:0,variableArgs:!1},s:{id:R3,numArgs:0,variableArgs:!1},f:{id:S9,numArgs:0,variableArgs:!1},F:{id:S9,numArgs:0,variableArgs:!1},"f*":{id:eR,numArgs:0,variableArgs:!1},B:{id:aZ,numArgs:0,variableArgs:!1},"B*":{id:nZ,numArgs:0,variableArgs:!1},b:{id:f3,numArgs:0,variableArgs:!1},"b*":{id:G3,numArgs:0,variableArgs:!1},n:{id:m9,numArgs:0,variableArgs:!1},W:{id:yB,numArgs:0,variableArgs:!1},"W*":{id:DB,numArgs:0,variableArgs:!1},BT:{id:Q3,numArgs:0,variableArgs:!1},ET:{id:Y3,numArgs:0,variableArgs:!1},Tc:{id:p9,numArgs:1,variableArgs:!1},Tw:{id:O9,numArgs:1,variableArgs:!1},Tz:{id:Pf,numArgs:1,variableArgs:!1},TL:{id:Zf,numArgs:1,variableArgs:!1},Tf:{id:h4,numArgs:2,variableArgs:!1},Tr:{id:qf,numArgs:1,variableArgs:!1},Ts:{id:Xf,numArgs:1,variableArgs:!1},Td:{id:zf,numArgs:2,variableArgs:!1},TD:{id:Rf,numArgs:2,variableArgs:!1},Tm:{id:S5,numArgs:6,variableArgs:!1},"T*":{id:u2,numArgs:0,variableArgs:!1},Tj:{id:B4,numArgs:1,variableArgs:!1},TJ:{id:W3,numArgs:1,variableArgs:!1},"'":{id:$3,numArgs:1,variableArgs:!1},'"':{id:_3,numArgs:3,variableArgs:!1},d0:{id:ff,numArgs:2,variableArgs:!1},d1:{id:y9,numArgs:6,variableArgs:!1},CS:{id:iZ,numArgs:1,variableArgs:!1},cs:{id:PP,numArgs:1,variableArgs:!1},SC:{id:tZ,numArgs:4,variableArgs:!0},SCN:{id:J3,numArgs:33,variableArgs:!0},sc:{id:ZP,numArgs:4,variableArgs:!0},scn:{id:U3,numArgs:33,variableArgs:!0},G:{id:eZ,numArgs:1,variableArgs:!1},g:{id:a7,numArgs:1,variableArgs:!1},RG:{id:O4,numArgs:3,variableArgs:!1},rg:{id:n0,numArgs:3,variableArgs:!1},K:{id:Pq,numArgs:4,variableArgs:!1},k:{id:n7,numArgs:4,variableArgs:!1},sh:{id:K3,numArgs:1,variableArgs:!1},BI:{id:wB,numArgs:0,variableArgs:!1},ID:{id:EB,numArgs:0,variableArgs:!1},EI:{id:Gf,numArgs:1,variableArgs:!1},Do:{id:D9,numArgs:1,variableArgs:!1},MP:{id:Qf,numArgs:1,variableArgs:!1},DP:{id:Yf,numArgs:2,variableArgs:!1},BMC:{id:Wf,numArgs:1,variableArgs:!1},BDC:{id:i0,numArgs:2,variableArgs:!1},EMC:{id:B6,numArgs:0,variableArgs:!1},BX:{id:$f,numArgs:0,variableArgs:!1},EX:{id:_f,numArgs:0,variableArgs:!1},BM:null,BD:null,true:null,fa:null,fal:null,fals:null,false:null,nu:null,nul:null,null:null}))}static MAX_INVALID_PATH_OPS=10;constructor(P,Z,q=new U7){this.parser=new U4({lexer:new T0(P,l4.opMap),xref:Z}),this.stateManager=q,this.nonProcessedArgs=[],this._isPathOp=!1,this._numInvalidPathOPS=0}get savedStatesDepth(){return this.stateManager.stateStack.length}read(P){let Z=P.args;for(;;){let q=this.parser.getObj();if(q instanceof H8){let X=q.cmd,z=l4.opMap[X];if(!z){v(`Unknown command "${X}".`);continue}let{id:R,numArgs:f}=z,G=Z!==null?Z.length:0;if(this._isPathOp||(this._numInvalidPathOPS=0),this._isPathOp=R>=z3&&R<=m9,z.variableArgs)G>f&&v1(`Command ${X}: expected [0, ${f}] args, but received ${G} args.`);else{if(G!==f){let Q=this.nonProcessedArgs;for(;G>f;)Q.push(Z.shift()),G--;for(;G<f&&Q.length!==0;)Z===null&&(Z=[]),Z.unshift(Q.pop()),G++}if(G<f){let Q=`command ${X}: expected ${f} args, but received ${G} args.`;if(this._isPathOp&&++this._numInvalidPathOPS>l4.MAX_INVALID_PATH_OPS)throw new s(`Invalid ${Q}`);v(`Skipping ${Q}`),Z!==null&&(Z.length=0);continue}}return this.preprocessCommand(R,Z),P.fn=R,P.args=Z,!0}if(q===F8)return!1;if(q!==null&&(Z===null&&(Z=[]),Z.push(q),Z.length>33))throw new s("Too many arguments")}}preprocessCommand(P,Z){switch(0|P){case O0:this.stateManager.save();break;case Q0:this.stateManager.restore();break;case $4:this.stateManager.transform(Z)}}}function Mq(P){return new lG(P).parse()}function Z4(P,Z){if(P[0]===P[1]&&P[1]===P[2])return`${p1(P[0]/255)} ${Z?"g":"G"}`;return Array.from(P,(q)=>p1(q/255)).join(" ")+" "+(Z?"rg":"RG")}class t0{constructor(P,Z){this.xref=P,this.widths=null,this.firstChar=1/0,this.lastChar=-1/0,this.fontFamily=Z;let q=new OffscreenCanvas(1,1);this.ctxMeasure=q.getContext("2d",{willReadFrequently:!0}),t0._fontNameId||(t0._fontNameId=1),this.fontName=t.get(`InvalidPDFjsFont_${Z}_${t0._fontNameId++}`)}get fontDescriptorRef(){if(!t0._fontDescriptorRef){let P=new S(this.xref);P.setIfName("Type","FontDescriptor"),P.set("FontName",this.fontName),P.set("FontFamily","MyriadPro Regular"),P.set("FontBBox",[0,0,0,0]),P.setIfName("FontStretch","Normal"),P.set("FontWeight",400),P.set("ItalicAngle",0),t0._fontDescriptorRef=this.xref.getNewPersistentRef(P)}return t0._fontDescriptorRef}get descendantFontRef(){let P=new S(this.xref);P.set("BaseFont",this.fontName),P.setIfName("Type","Font"),P.setIfName("Subtype","CIDFontType0"),P.setIfName("CIDToGIDMap","Identity"),P.set("FirstChar",this.firstChar),P.set("LastChar",this.lastChar),P.set("FontDescriptor",this.fontDescriptorRef),P.set("DW",1000);let Z=[],q=[...this.widths.entries()].sort(),X=null,z=null;for(let[f,G]of q)X?f===X+z.length?z.push(G):(Z.push(X,z),X=f,z=[G]):(X=f,z=[G]);X&&Z.push(X,z),P.set("W",Z);let R=new S(this.xref);return R.set("Ordering","Identity"),R.set("Registry","Adobe"),R.set("Supplement",0),P.set("CIDSystemInfo",R),this.xref.getNewPersistentRef(P)}get baseFontRef(){let P=new S(this.xref);return P.set("BaseFont",this.fontName),P.setIfName("Type","Font"),P.setIfName("Subtype","Type0"),P.setIfName("Encoding","Identity-H"),P.set("DescendantFonts",[this.descendantFontRef]),P.setIfName("ToUnicode","Identity-H"),this.xref.getNewPersistentRef(P)}get resources(){let P=new S(this.xref),Z=new S(this.xref);return Z.set(this.fontName.name,this.baseFontRef),P.set("Font",Z),P}_createContext(){return this.widths=new Map,this.ctxMeasure.font=`1000px ${this.fontFamily}`,this.ctxMeasure}createFontResources(P){let Z=this._createContext();for(let q of P.split(/\r\n?|\n/))for(let X of q.split("")){let z=X.charCodeAt(0);if(this.widths.has(z))continue;let R=Z.measureText(X),f=Math.ceil(R.width);this.widths.set(z,f),this.firstChar=Math.min(z,this.firstChar),this.lastChar=Math.max(z,this.lastChar)}return this.resources}static getFirstPositionInfo(P,Z,q){let[X,z,R,f]=P,G=R-X,Q=f-z;Z%180!=0&&([G,Q]=[Q,G]);let Y=M5*q;return{coords:[0,Q+EX*q-Y],bbox:[0,0,G,Q],matrix:Z!==0?M3(Z,Q,Y):void 0}}createAppearance(P,Z,q,X,z,R){let f=this._createContext(),G=[],Q=-1/0;for(let p of P.split(/\r\n?|\n/)){G.push(p);let D=f.measureText(p).width;Q=Math.max(Q,D);for(let n of qI(p)){let F=String.fromCodePoint(n),l=this.widths.get(n);if(l===void 0){let C=f.measureText(F);l=Math.ceil(C.width),this.widths.set(n,l),this.firstChar=Math.min(n,this.firstChar),this.lastChar=Math.max(n,this.lastChar)}}}Q*=X/1000;let[Y,W,$,_]=Z,J=$-Y,U=_-W;q%180!=0&&([J,U]=[U,J]);let K=1;Q>J&&(K=J/Q);let I=1,B=M5*X,j=EX*X,V=B*G.length;V>U&&(I=U/V);let H=X*Math.min(K,I),M=["q",`0 0 ${p1(J)} ${p1(U)} re W n`,"BT",`1 0 0 1 0 ${p1(U+j)} Tm 0 Tc ${Z4(z,!0)}`,`/${this.fontName.name} ${p1(H)} Tf`],{resources:x}=this;if((R=typeof R=="number"&&R>=0&&R<=1?R:1)!==1){M.push("/R0 gs");let p=new S(this.xref),D=new S(this.xref);D.set("ca",R),D.set("CA",R),D.setIfName("Type","ExtGState"),p.set("R0",D),x.set("ExtGState",p)}let A=p1(B);for(let p of G)M.push(`0 -${A} Td <${zI(p)}> Tj`);M.push("ET","Q");let k=M.join(`
|
|
7
|
+
`),b=new S(this.xref);if(b.setIfName("Subtype","Form"),b.setIfName("Type","XObject"),b.set("BBox",[0,0,J,U]),b.set("Length",k.length),b.set("Resources",x),q){let p=M3(q,J,U);b.set("Matrix",p)}let O=new o8(k);return O.dict=b,O}}class Aq{constructor(P,Z,q){this.root=P,this.xref=Z,this._type=q}getAll(){let P=new Map;if(!this.root)return P;let Z=this.xref,q=new J8;q.put(this.root);let X=[this.root];for(;X.length>0;){let z=Z.fetchIfRef(X.shift());if(!(z instanceof S))continue;if(z.has("Kids")){let f=z.get("Kids");if(!Array.isArray(f))continue;for(let G of f){if(q.has(G))throw new s(`Duplicate entry in "${this._type}" tree.`);X.push(G),q.put(G)}continue}let R=z.get(this._type);if(Array.isArray(R))for(let f=0,G=R.length;f<G;f+=2)P.set(Z.fetchIfRef(R[f]),Z.fetchIfRef(R[f+1]))}return P}getRaw(P){if(!this.root)return null;let Z=this.xref,q=Z.fetchIfRef(this.root),X=0;for(;q.has("Kids");){if(++X>10)return v(`Search depth limit reached for "${this._type}" tree.`),null;let R=q.get("Kids");if(!Array.isArray(R))return null;let f=0,G=R.length-1;for(;f<=G;){let Q=f+G>>1,Y=Z.fetchIfRef(R[Q]),W=Y.get("Limits");if(P<Z.fetchIfRef(W[0]))G=Q-1;else{if(!(P>Z.fetchIfRef(W[1]))){q=Y;break}f=Q+1}}if(f>G)return null}let z=q.get(this._type);if(Array.isArray(z)){let R=0,f=z.length-2;for(;R<=f;){let G=R+f>>1,Q=G+(1&G),Y=Z.fetchIfRef(z[Q]);if(P<Y)f=Q-2;else{if(!(P>Y))return z[Q+1];R=Q+2}}}return null}get(P){return this.xref.fetchIfRef(this.getRaw(P))}}function Lq(){FG=Object.create(null),If=Object.create(null),jf=Object.create(null),d2=Object.create(null),ZZ.clear(),i7.cleanup()}function cz(P){return P instanceof S?P.has("UF")?P.get("UF"):P.has("F")?P.get("F"):P.has("Unix")?P.get("Unix"):P.has("Mac")?P.get("Mac"):P.has("DOS")?P.get("DOS"):null:null}class N3{#P=!1;constructor(P,Z,q=!1){P instanceof S&&(this.xref=Z,this.root=P,P.has("FS")&&(this.fs=P.get("FS")),P.has("RF")&&v("Related file specifications are not supported"),q||(P.has("EF")?this.#P=!0:v("Non-embedded file specifications are not supported")))}get filename(){let P="",Z=cz(this.root);return Z&&typeof Z=="string"&&(P=E1(Z,!0).replaceAll("\\\\","\\").replaceAll("\\/","/").replaceAll("\\","/")),q1(this,"filename",P||"unnamed")}get content(){if(!this.#P)return null;this._contentRef||=cz(this.root?.get("EF"));let P=null;if(this._contentRef){let Z=this.xref.fetchIfRef(this._contentRef);Z instanceof T1?P=Z.getBytes():v("Embedded file specification points to non-existing/invalid content")}else v("Embedded file specification does not have any content");return P}get description(){let P="",Z=this.root?.get("Desc");return Z&&typeof Z=="string"&&(P=E1(Z)),q1(this,"description",P)}get serializable(){return{rawFilename:this.filename,filename:(P=this.filename,P.substring(P.lastIndexOf("/")+1)),content:this.content,description:this.description};var P}}function a5(P,Z){let q=P[Z];return q===" "||q===`
|
|
8
|
+
`||q==="\r"||q==="\t"}class bq{_resolveEntities(P){return P.replaceAll(/&([^;]+);/g,(Z,q)=>{if(q.substring(0,2)==="#x")return String.fromCodePoint(parseInt(q.substring(2),16));if(q.substring(0,1)==="#")return String.fromCodePoint(parseInt(q.substring(1),10));switch(q){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return'"';case"apos":return"'"}return this.onResolveEntity(q)})}_parseContent(P,Z){let q=[],X=Z;function z(){for(;X<P.length&&a5(P,X);)++X}for(;X<P.length&&!a5(P,X)&&P[X]!==">"&&P[X]!=="/";)++X;let R=P.substring(Z,X);for(z();X<P.length&&P[X]!==">"&&P[X]!=="/"&&P[X]!=="?";){z();let f="",G="";for(;X<P.length&&!a5(P,X)&&P[X]!=="=";)f+=P[X],++X;if(z(),P[X]!=="=")return null;++X,z();let Q=P[X];if(Q!=='"'&&Q!=="'")return null;let Y=P.indexOf(Q,++X);if(Y<0)return null;G=P.substring(X,Y),q.push({name:f,value:this._resolveEntities(G)}),X=Y+1,z()}return{name:R,attributes:q,parsed:X-Z}}_parseProcessingInstruction(P,Z){let q=Z;for(;q<P.length&&!a5(P,q)&&P[q]!==">"&&P[q]!=="?"&&P[q]!=="/";)++q;let X=P.substring(Z,q);(function(){for(;q<P.length&&a5(P,q);)++q})();let z=q;for(;q<P.length&&(P[q]!=="?"||P[q+1]!==">");)++q;return{name:X,value:P.substring(z,q),parsed:q-Z}}parseXml(P){let Z=0;for(;Z<P.length;){let q=Z;if(P[Z]==="<"){++q;let X;switch(P[q]){case"/":if(++q,X=P.indexOf(">",q),X<0)return void this.onError(rz);this.onEndElement(P.substring(q,X)),q=X+1;break;case"?":++q;let z=this._parseProcessingInstruction(P,q);if(P.substring(q+z.parsed,q+z.parsed+2)!=="?>")return void this.onError(WV);this.onPi(z.name,z.value),q+=z.parsed+2;break;case"!":if(P.substring(q+1,q+3)==="--"){if(X=P.indexOf("-->",q+3),X<0)return void this.onError($V);this.onComment(P.substring(q+3,X)),q=X+3}else if(P.substring(q+1,q+8)==="[CDATA["){if(X=P.indexOf("]]>",q+8),X<0)return void this.onError(YV);this.onCdata(P.substring(q+8,X)),q=X+3}else{if(P.substring(q+1,q+8)!=="DOCTYPE")return void this.onError(hz);{let G=P.indexOf("[",q+8),Q=!1;if(X=P.indexOf(">",q+8),X<0)return void this.onError(sz);if(G>0&&X>G){if(X=P.indexOf("]>",q+8),X<0)return void this.onError(sz);Q=!0}let Y=P.substring(q+8,X+(Q?1:0));this.onDoctype(Y),q=X+(Q?2:1)}}break;default:let R=this._parseContent(P,q);if(R===null)return void this.onError(hz);let f=!1;if(P.substring(q+R.parsed,q+R.parsed+2)==="/>")f=!0;else if(P.substring(q+R.parsed,q+R.parsed+1)!==">")return void this.onError(rz);this.onBeginElement(R.name,R.attributes,f),q+=R.parsed+(f?2:1)}}else{for(;q<P.length&&P[q]!=="<";)q++;let X=P.substring(Z,q);this.onText(this._resolveEntities(X))}Z=q}}onResolveEntity(P){return`&${P};`}onPi(P,Z){}onComment(P){}onCdata(P){}onDoctype(P){}onText(P){}onBeginElement(P,Z,q){}onEndElement(P){}onError(P){}}class _6{constructor(P,Z){this.nodeName=P,this.nodeValue=Z,Object.defineProperty(this,"parentNode",{value:null,writable:!0})}get firstChild(){return this.childNodes?.[0]}get nextSibling(){let P=this.parentNode.childNodes;if(!P)return;let Z=P.indexOf(this);return Z!==-1?P[Z+1]:void 0}get textContent(){return this.childNodes?this.childNodes.map((P)=>P.textContent).join(""):this.nodeValue||""}get children(){return this.childNodes||[]}hasChildNodes(){return this.childNodes?.length>0}searchNode(P,Z){if(Z>=P.length)return this;let q=P[Z];if(q.name.startsWith("#")&&Z<P.length-1)return this.searchNode(P,Z+1);let X=[],z=this;for(;;){if(q.name===z.nodeName){if(q.pos!==0){if(X.length===0)return null;{let[R]=X.pop(),f=0;for(let G of R.childNodes)if(q.name===G.nodeName){if(f===q.pos)return G.searchNode(P,Z+1);f++}return z.searchNode(P,Z+1)}}{let R=z.searchNode(P,Z+1);if(R!==null)return R}}if(z.childNodes?.length>0)X.push([z,0]),z=z.childNodes[0];else{if(X.length===0)return null;for(;X.length!==0;){let[R,f]=X.pop(),G=f+1;if(G<R.childNodes.length){X.push([R,G]),z=R.childNodes[G];break}}if(X.length===0)return null}}}dump(P){if(this.nodeName!=="#text"){if(P.push(`<${this.nodeName}`),this.attributes)for(let Z of this.attributes)P.push(` ${Z.name}="${W6(Z.value)}"`);if(this.hasChildNodes()){P.push(">");for(let Z of this.childNodes)Z.dump(P);P.push(`</${this.nodeName}>`)}else this.nodeValue?P.push(`>${W6(this.nodeValue)}</${this.nodeName}>`):P.push("/>")}else P.push(W6(this.nodeValue))}}class aG{constructor(P){P=this._repair(P);let Z=new P2({lowerCaseName:!0}).parseFromString(P);this._metadataMap=new Map,this._data=P,Z&&this._parse(Z)}_repair(P){return P.replace(/^[^<]+/,"").replaceAll(/>\\376\\377([^<]+)/g,function(Z,q){let X=q.replaceAll(/\\([0-3])([0-7])([0-7])/g,function(R,f,G,Q){return String.fromCharCode(64*f+8*G+1*Q)}).replaceAll(/&(amp|apos|gt|lt|quot);/g,function(R,f){switch(f){case"amp":return"&";case"apos":return"'";case"gt":return">";case"lt":return"<";case"quot":return'"'}throw Error(`_repair: ${f} isn't defined.`)}),z=[">"];for(let R=0,f=X.length;R<f;R+=2){let G=256*X.charCodeAt(R)+X.charCodeAt(R+1);G>=32&&G<127&&G!==60&&G!==62&&G!==38?z.push(String.fromCharCode(G)):z.push("&#x"+(65536+G).toString(16).substring(1)+";")}return z.join("")})}_getSequence(P){let Z=P.nodeName;return Z!=="rdf:bag"&&Z!=="rdf:seq"&&Z!=="rdf:alt"?null:P.childNodes.filter((q)=>q.nodeName==="rdf:li")}_parseArray(P){if(!P.hasChildNodes())return;let[Z]=P.childNodes,q=this._getSequence(Z)||[];this._metadataMap.set(P.nodeName,q.map((X)=>X.textContent.trim()))}_parse(P){let Z=P.documentElement;if(Z.nodeName!=="rdf:rdf")for(Z=Z.firstChild;Z&&Z.nodeName!=="rdf:rdf";)Z=Z.nextSibling;if(Z&&Z.nodeName==="rdf:rdf"&&Z.hasChildNodes()){for(let q of Z.childNodes)if(q.nodeName==="rdf:description")for(let X of q.childNodes){let z=X.nodeName;switch(z){case"#text":continue;case"dc:creator":case"dc:subject":this._parseArray(X);continue}this._metadataMap.set(z,X.textContent.trim())}}}get serializable(){return{parsedData:this._metadataMap,rawData:this._data}}}class c4{constructor(P,Z,q){this.xref=P,this.dict=Z,this.ref=q instanceof f1?q:null,this.roleMap=new Map,this.structParentIds=null}init(){this.readRoleMap()}#P(P,Z,q){if(!(P instanceof f1)||Z<0)return;this.structParentIds||=new t8;let X=this.structParentIds.get(P);X||(X=[],this.structParentIds.put(P,X)),X.push([Z,q])}addAnnotationIdToPage(P,Z){this.#P(P,Z,tG)}readRoleMap(){let P=this.dict.get("RoleMap");if(P instanceof S)for(let[Z,q]of P)q instanceof t&&this.roleMap.set(Z,q.name)}static async canCreateStructureTree({catalogRef:P,pdfManager:Z,newAnnotationsByPage:q}){if(!(P instanceof f1))return v("Cannot save the struct tree: no catalog reference."),!1;let X=0,z=!0;for(let[R,f]of q){let{ref:G}=await Z.getPage(R);if(!(G instanceof f1)){v(`Cannot save the struct tree: page ${R} has no ref.`),z=!0;break}for(let Q of f)Q.accessibilityData?.type&&(Q.parentTreeId=X++,z=!1)}if(z){for(let R of q.values())for(let f of R)delete f.parentTreeId;return!1}return!0}static async createStructureTree({newAnnotationsByPage:P,xref:Z,catalogRef:q,pdfManager:X,changes:z}){let R=await X.ensureCatalog("cloneDict"),f=new t8;f.put(q,R);let G=Z.getNewTemporaryRef();R.set("StructTreeRoot",G);let Q=new S(Z);Q.set("Type",t.get("StructTreeRoot"));let Y=Z.getNewTemporaryRef();Q.set("ParentTree",Y);let W=[];Q.set("K",W),f.put(G,Q);let $=new S(Z),_=[];$.set("Nums",_);let J=await this.#Z({newAnnotationsByPage:P,structTreeRootRef:G,structTreeRoot:null,kids:W,nums:_,xref:Z,pdfManager:X,changes:z,cache:f});Q.set("ParentTreeNextKey",J),f.put(Y,$);for(let[U,K]of f.items())z.put(U,{data:K})}async canUpdateStructTree({pdfManager:P,newAnnotationsByPage:Z}){if(!this.ref)return v("Cannot update the struct tree: no root reference."),!1;let q=this.dict.get("ParentTreeNextKey");if(!Number.isInteger(q)||q<0)return v("Cannot update the struct tree: invalid next key."),!1;let X=this.dict.get("ParentTree");if(!(X instanceof S))return v("Cannot update the struct tree: ParentTree isn't a dict."),!1;let z=X.get("Nums");if(!Array.isArray(z))return v("Cannot update the struct tree: nums isn't an array."),!1;let R=new w7(X,this.xref);for(let G of Z.keys()){let{pageDict:Q}=await P.getPage(G);if(!Q.has("StructParents"))continue;let Y=Q.get("StructParents");if(!Number.isInteger(Y)||!Array.isArray(R.get(Y)))return v(`Cannot save the struct tree: page ${G} has a wrong id.`),!1}let f=!0;for(let[G,Q]of Z){let{pageDict:Y}=await P.getPage(G);c4.#q({elements:Q,xref:this.xref,pageDict:Y,numberTree:R});for(let W of Q)W.accessibilityData?.type&&(W.accessibilityData.structParent>=0||(W.parentTreeId=q++),f=!1)}if(f){for(let G of Z.values())for(let Q of G)delete Q.parentTreeId,delete Q.structTreeParent;return!1}return!0}async updateStructureTree({newAnnotationsByPage:P,pdfManager:Z,changes:q}){let{ref:X,xref:z}=this,R=this.dict.clone(),f=new t8;f.put(X,R);let G,Q=R.getRaw("ParentTree");Q instanceof f1?G=z.fetch(Q):(G=Q,Q=z.getNewTemporaryRef(),R.set("ParentTree",Q)),G=G.clone(),f.put(Q,G);let Y=G.getRaw("Nums"),W=null;Y instanceof f1&&(W=Y,Y=z.fetch(W)),Y=Y.slice(),W||G.set("Nums",Y);let $=await c4.#Z({newAnnotationsByPage:P,structTreeRootRef:X,structTreeRoot:this,kids:null,nums:Y,xref:z,pdfManager:Z,changes:q,cache:f});if($!==-1){R.set("ParentTreeNextKey",$),W&&f.put(W,Y);for(let[_,J]of f.items())q.put(_,{data:J})}}static async#Z({newAnnotationsByPage:P,structTreeRootRef:Z,structTreeRoot:q,kids:X,nums:z,xref:R,pdfManager:f,changes:G,cache:Q}){let Y=t.get("OBJR"),W,$=-1;for(let[_,J]of P){let U=await f.getPage(_),{ref:K}=U,I=K instanceof f1;for(let{accessibilityData:B,ref:j,parentTreeId:V,structTreeParent:H}of J){if(!B?.type)continue;let{structParent:M}=B;if(q&&Number.isInteger(M)&&M>=0){let b=(W||=new Map).get(_);if(b===void 0)b=new kq(q,U.pageDict).collectObjects(K),W.set(_,b);let O=b?.get(M);if(O){let p=R.fetch(O).clone();c4.#X(p,B),G.put(O,{data:p});continue}}$=Math.max($,V);let x=R.getNewTemporaryRef(),A=new S(R);c4.#X(A,B),await this.#z({structTreeParent:H,tagDict:A,newTagRef:x,structTreeRootRef:Z,fallbackKids:X,xref:R,cache:Q});let k=new S(R);A.set("K",k),k.set("Type",Y),I&&k.set("Pg",K),k.set("Obj",j),Q.put(x,A),z.push(V,x)}}return $+1}static#X(P,{type:Z,title:q,lang:X,alt:z,expanded:R,actualText:f}){P.set("S",t.get(Z)),q&&P.set("T",H0(q)),X&&P.set("Lang",H0(X)),z&&P.set("Alt",H0(z)),R&&P.set("E",H0(R)),f&&P.set("ActualText",H0(f))}static#q({elements:P,xref:Z,pageDict:q,numberTree:X}){let z=new Map;for(let Q of P)if(Q.structTreeParentId){let Y=parseInt(Q.structTreeParentId.split("_mc")[1],10),W=z.get(Y);W||(W=[],z.set(Y,W)),W.push(Q)}let R=q.get("StructParents");if(!Number.isInteger(R))return;let f=X.get(R),G=(Q,Y,W)=>{let $=z.get(Q);if($){let _=Y.getRaw("P"),J=Z.fetchIfRef(_);if(_ instanceof f1&&J instanceof S){let U={ref:W,dict:Y};for(let K of $)K.structTreeParent=U}return!0}return!1};for(let Q of f){if(!(Q instanceof f1))continue;let Y=Z.fetch(Q),W=Y.get("K");if(Number.isInteger(W))G(W,Y,Q);else if(Array.isArray(W))for(let $ of W){if($=Z.fetchIfRef($),Number.isInteger($)&&G($,Y,Q))break;if(!($ instanceof S))continue;if(!G8($.get("Type"),"MCR"))break;let _=$.get("MCID");if(Number.isInteger(_)&&G(_,Y,Q))break}}}static async#z({structTreeParent:P,tagDict:Z,newTagRef:q,structTreeRootRef:X,fallbackKids:z,xref:R,cache:f}){let G,Q=null;P?({ref:Q}=P,G=P.dict.getRaw("P")||X):G=X,Z.set("P",G);let Y=R.fetchIfRef(G);if(!Y)return void z.push(q);let W=f.get(G);W||(W=Y.clone(),f.put(G,W));let $=W.getRaw("K"),_=$ instanceof f1?f.get($):null;if(!_){_=R.fetchIfRef($),_=Array.isArray(_)?_.slice():[$];let U=R.getNewTemporaryRef();W.set("K",U),f.put(U,_)}let J=_.indexOf(Q);_.splice(J>=0?J+1:_.length,0,q)}}class eG{constructor(P,Z){this.tree=P,this.xref=P.xref,this.dict=Z,this.kids=[],this.parseKids()}get role(){let P=this.dict.get("S"),Z=P instanceof t?P.name:"",{root:q}=this.tree;return q.roleMap.get(Z)??Z}parseKids(){let P=null,Z=this.dict.getRaw("Pg");Z instanceof f1&&(P=Z.toString());let q=this.dict.get("K");if(Array.isArray(q))for(let X of q){let z=this.parseKid(P,this.xref.fetchIfRef(X));z&&this.kids.push(z)}else{let X=this.parseKid(P,q);X&&this.kids.push(X)}}parseKid(P,Z){if(Number.isInteger(Z))return this.tree.pageDict.objId!==P?null:new z7({type:nG,mcid:Z,pageObjId:P});if(!(Z instanceof S))return null;let q=Z.getRaw("Pg");q instanceof f1&&(P=q.toString());let X=Z.get("Type")instanceof t?Z.get("Type").name:null;if(X==="MCR"){if(this.tree.pageDict.objId!==P)return null;let z=Z.getRaw("Stm");return new z7({type:iG,refObjId:z instanceof f1?z.toString():null,pageObjId:P,mcid:Z.get("MCID")})}if(X==="OBJR"){if(this.tree.pageDict.objId!==P)return null;let z=Z.getRaw("Obj");return new z7({type:VZ,refObjId:z instanceof f1?z.toString():null,pageObjId:P})}return new z7({type:xZ,dict:Z})}}class z7{constructor({type:P,dict:Z=null,mcid:q=null,pageObjId:X=null,refObjId:z=null}){this.type=P,this.dict=Z,this.mcid=q,this.pageObjId=X,this.refObjId=z,this.parentNode=null}}class kq{constructor(P,Z){this.root=P,this.xref=P?.xref??null,this.rootDict=P?.dict??null,this.pageDict=Z,this.nodes=[]}collectObjects(P){if(!(this.root&&this.rootDict&&P instanceof f1))return null;let Z=this.rootDict.get("ParentTree");if(!Z)return null;let q=this.root.structParentIds?.get(P);if(!q)return null;let X=new Map,z=new w7(Z,this.xref);for(let[R]of q){let f=z.getRaw(R);f instanceof f1&&X.set(R,f)}return X}parse(P){if(!(this.root&&this.rootDict&&P instanceof f1))return;let Z=this.rootDict.get("ParentTree");if(!Z)return;let q=this.pageDict.get("StructParents"),X=this.root.structParentIds?.get(P);if(!Number.isInteger(q)&&!X)return;let z=new Map,R=new w7(Z,this.xref);if(Number.isInteger(q)){let f=R.get(q);if(Array.isArray(f))for(let G of f)G instanceof f1&&this.addNode(this.xref.fetch(G),z)}if(X)for(let[f,G]of X){let Q=R.get(f);if(Q){let Y=this.addNode(this.xref.fetchIfRef(Q),z);Y?.kids?.length===1&&Y.kids[0].type===VZ&&(Y.kids[0].type=G)}}}addNode(P,Z,q=0){if(q>40)return v("StructTree MAX_DEPTH reached."),null;if(!(P instanceof S))return null;if(Z.has(P))return Z.get(P);let X=new eG(this,P);Z.set(P,X);let z=P.get("P");if(!(z instanceof S)||G8(z.get("Type"),"StructTreeRoot"))return this.addTopLevelNode(P,X)||Z.delete(P),X;let R=this.addNode(z,Z,q+1);if(!R)return X;let f=!1;for(let G of R.kids)G.type===xZ&&G.dict===P&&(G.parentNode=X,f=!0);return f||Z.delete(P),X}addTopLevelNode(P,Z){let q=this.rootDict.get("K");if(!q)return!1;if(q instanceof S)return q.objId===P.objId&&(this.nodes[0]=Z,!0);if(!Array.isArray(q))return!0;let X=!1;for(let z=0;z<q.length;z++)q[z]?.toString()===P.objId&&(this.nodes[z]=Z,X=!0);return X}get serializable(){function P(q,X,z=0){if(z>40)return void v("StructTree too deep to be fully serialized.");let R=Object.create(null);R.role=q.role,R.children=[],X.children.push(R);let f=q.dict.get("Alt");typeof f!="string"&&(f=q.dict.get("ActualText")),typeof f=="string"&&(R.alt=E1(f));let G=q.dict.get("A");if(G instanceof S){let Y=k4(G.getArray("BBox"),null);if(Y)R.bbox=Y;else{let W=G.get("Width"),$=G.get("Height");typeof W=="number"&&W>0&&typeof $=="number"&&$>0&&(R.bbox=[0,0,W,$])}}let Q=q.dict.get("Lang");typeof Q=="string"&&(R.lang=E1(Q));for(let Y of q.kids){let W=Y.type===xZ?Y.parentNode:null;W?P(W,R,z+1):Y.type===nG||Y.type===iG?R.children.push({type:"content",id:`p${Y.pageObjId}_mc${Y.mcid}`}):Y.type===VZ?R.children.push({type:"object",id:Y.refObjId}):Y.type===tG&&R.children.push({type:"annotation",id:`pdfjs_internal_id_${Y.refObjId}`})}}let Z=Object.create(null);Z.children=[],Z.role="Root";for(let q of this.nodes)q&&P(q,Z);return Z}}function R9(P){return P instanceof S&&(P=P.get("D")),v3(P)?P:null}function lz(P){let Z=P.get("D");if(Z){if(Z instanceof t&&(Z=Z.name),typeof Z=="string")return E1(Z,!0);if(v3(Z))return JSON.stringify(Z)}return null}class H6{#P=null;#Z=null;builtInCMapCache=new Map;fontCache=new t8;globalColorSpaceCache=new EG;globalImageCache=new q6;nonBlendModesSet=new J8;pageDictCache=new t8;pageIndexCache=new t8;pageKidsCountCache=new t8;standardFontDataCache=new Map;systemFontCache=new Map;constructor(P,Z){if(this.pdfManager=P,this.xref=Z,this.#Z=Z.getCatalogObj(),!(this.#Z instanceof S))throw new s("Catalog object is not a dictionary.");this.toplevelPagesDict}cloneDict(){return this.#Z.clone()}get version(){let P=this.#Z.get("Version");if(P instanceof t){if(Hf.test(P.name))return q1(this,"version",P.name);v(`Invalid PDF catalog version: ${P.name}`)}return q1(this,"version",null)}get lang(){let P=this.#Z.get("Lang");return q1(this,"lang",P&&typeof P=="string"?E1(P):null)}get needsRendering(){let P=this.#Z.get("NeedsRendering");return q1(this,"needsRendering",typeof P=="boolean"&&P)}get collection(){let P=null;try{let Z=this.#Z.get("Collection");Z instanceof S&&Z.size>0&&(P=Z)}catch(Z){if(Z instanceof q8)throw Z;v1("Cannot fetch Collection entry; assuming no collection is present.")}return q1(this,"collection",P)}get acroForm(){let P=null;try{let Z=this.#Z.get("AcroForm");Z instanceof S&&Z.size>0&&(P=Z)}catch(Z){if(Z instanceof q8)throw Z;v1("Cannot fetch AcroForm entry; assuming no forms are present.")}return q1(this,"acroForm",P)}get acroFormRef(){let P=this.#Z.getRaw("AcroForm");return q1(this,"acroFormRef",P instanceof f1?P:null)}get metadata(){let P=this.#Z.getRaw("Metadata");if(!(P instanceof f1))return q1(this,"metadata",null);let Z=null;try{let q=this.xref.fetch(P,!this.xref.encrypt?.encryptMetadata);if(q instanceof T1&&q.dict instanceof S){let X=q.dict.get("Type"),z=q.dict.get("Subtype");if(G8(X,"Metadata")&&G8(z,"XML")){let R=k7(q.getString());R&&(Z=new aG(R).serializable)}}}catch(q){if(q instanceof q8)throw q;v1(`Skipping invalid Metadata: "${q}".`)}return q1(this,"metadata",Z)}get markInfo(){let P=null;try{P=this.#X()}catch(Z){if(Z instanceof q8)throw Z;v("Unable to read mark info.")}return q1(this,"markInfo",P)}#X(){let P=this.#Z.get("MarkInfo");if(!(P instanceof S))return null;let Z={Marked:!1,UserProperties:!1,Suspects:!1};for(let q in Z){let X=P.get(q);typeof X=="boolean"&&(Z[q]=X)}return Z}get structTreeRoot(){let P=null;try{P=this.#q()}catch(Z){if(Z instanceof q8)throw Z;v("Unable read to structTreeRoot info.")}return q1(this,"structTreeRoot",P)}#q(){let P=this.#Z.getRaw("StructTreeRoot"),Z=this.xref.fetchIfRef(P);if(!(Z instanceof S))return null;let q=new c4(this.xref,Z,P);return q.init(),q}get toplevelPagesDict(){let P=this.#Z.get("Pages");if(!(P instanceof S))throw new s("Invalid top-level pages dictionary.");return q1(this,"toplevelPagesDict",P)}get documentOutline(){let P=null;try{P=this.#z()}catch(Z){if(Z instanceof q8)throw Z;v("Unable to read document outline.")}return q1(this,"documentOutline",P)}#z(){let P=this.#Z.get("Outlines");if(!(P instanceof S))return null;if(P=P.getRaw("First"),!(P instanceof f1))return null;let Z={items:[]},q=[{obj:P,parent:Z}],X=new J8;X.put(P);let z=this.xref,R=new Uint8ClampedArray(3);for(;q.length>0;){let f=q.shift(),G=z.fetchIfRef(f.obj);if(G===null)continue;G.has("Title")||v("Invalid outline item encountered.");let Q={url:null,dest:null,action:null};H6.parseDestDictionary({destDict:G,resultObj:Q,docBaseUrl:this.baseUrl,docAttachments:this.attachments});let Y=G.get("Title"),W=G.get("F")||0,$=G.getArray("C"),_=G.get("Count"),J=R;!e8($,3)||$[0]===0&&$[1]===0&&$[2]===0||(J=g1.rgb.getRgb($,0));let U={action:Q.action,attachment:Q.attachment,dest:Q.dest,url:Q.url,unsafeUrl:Q.unsafeUrl,newWindow:Q.newWindow,setOCGState:Q.setOCGState,title:typeof Y=="string"?E1(Y):"",color:J,count:Number.isInteger(_)?_:void 0,bold:!!(2&W),italic:!!(1&W),items:[]};f.parent.items.push(U),P=G.getRaw("First"),P instanceof f1&&!X.has(P)&&(q.push({obj:P,parent:U}),X.put(P)),P=G.getRaw("Next"),P instanceof f1&&!X.has(P)&&(q.push({obj:P,parent:f.parent}),X.put(P))}return Z.items.length>0?Z.items:null}get permissions(){let P=null;try{P=this.#R()}catch(Z){if(Z instanceof q8)throw Z;v("Unable to read permissions.")}return q1(this,"permissions",P)}#R(){let P=this.xref.trailer.get("Encrypt");if(!(P instanceof S))return null;let Z=P.get("P");if(typeof Z!="number")return null;Z+=4294967296;let q=[];for(let X in aX){let z=aX[X];Z&z&&q.push(z)}return q}get optionalContentConfig(){let P=null;try{let Z=this.#Z.get("OCProperties");if(!Z)return q1(this,"optionalContentConfig",null);let q=Z.get("D");if(!q)return q1(this,"optionalContentConfig",null);let X=Z.get("OCGs");if(!Array.isArray(X))return q1(this,"optionalContentConfig",null);let z=new t8;for(let R of X)R instanceof f1&&!z.has(R)&&z.put(R,this.#G(R));P=this.#f(q,z)}catch(Z){if(Z instanceof q8)throw Z;v(`Unable to read optional content config: ${Z}`)}return q1(this,"optionalContentConfig",P)}#G(P){let Z=this.xref.fetch(P),q={id:P.toString(),name:null,intent:null,usage:{print:null,view:null},rbGroups:[]},X=Z.get("Name");typeof X=="string"&&(q.name=E1(X));let z=Z.getArray("Intent");Array.isArray(z)||(z=[z]),z.every((Y)=>Y instanceof t)&&(q.intent=z.map((Y)=>Y.name));let R=Z.get("Usage");if(!(R instanceof S))return q;let f=q.usage,G=R.get("Print");if(G instanceof S){let Y=G.get("PrintState");if(Y instanceof t)switch(Y.name){case"ON":case"OFF":f.print={printState:Y.name}}}let Q=R.get("View");if(Q instanceof S){let Y=Q.get("ViewState");if(Y instanceof t)switch(Y.name){case"ON":case"OFF":f.view={viewState:Y.name}}}return q}#f(P,Z){function q(Q){let Y=[];if(Array.isArray(Q))for(let W of Q)W instanceof f1&&Z.has(W)&&Y.push(W.toString());return Y}function X(Q,Y=0){if(!Array.isArray(Q))return null;let W=[];for(let _ of Q){if(_ instanceof f1&&Z.has(_)){f.put(_),W.push(_.toString());continue}let J=z(_,Y);J&&W.push(J)}if(Y>0)return W;let $=[];for(let[_]of Z.items())f.has(_)||$.push(_.toString());return $.length&&W.push({name:null,order:$}),W}function z(Q,Y){if(++Y>G)return v("parseNestedOrder - reached MAX_NESTED_LEVELS."),null;let W=R.fetchIfRef(Q);if(!Array.isArray(W))return null;let $=R.fetchIfRef(W[0]);if(typeof $!="string")return null;let _=X(W.slice(1),Y);return _?.length?{name:E1($),order:_}:null}let R=this.xref,f=new J8,G=10;return function(Q){if(Array.isArray(Q))for(let Y of Q){let W=R.fetchIfRef(Y);if(!Array.isArray(W)||!W.length)continue;let $=new Set;for(let _ of W)_ instanceof f1&&Z.has(_)&&!$.has(_.toString())&&($.add(_.toString()),Z.get(_).rbGroups.push($))}}(P.get("RBGroups")),{name:typeof P.get("Name")=="string"?E1(P.get("Name")):null,creator:typeof P.get("Creator")=="string"?E1(P.get("Creator")):null,baseState:P.get("BaseState")instanceof t?P.get("BaseState").name:null,on:q(P.get("ON")),off:q(P.get("OFF")),order:X(P.get("Order")),groups:[...Z]}}setActualNumPages(P=null){this.#P=P}get hasActualNumPages(){return this.#P!==null}get _pagesCount(){let P=this.toplevelPagesDict.get("Count");if(!Number.isInteger(P))throw new s("Page count in top-level pages dictionary is not an integer.");return q1(this,"_pagesCount",P)}get numPages(){return this.#P??this._pagesCount}get destinations(){let P=this.#Q(),Z=Object.create(null);for(let q of P)if(q instanceof $5)for(let[X,z]of q.getAll()){let R=R9(z);R&&(Z[E1(X,!0)]=R)}else if(q instanceof S)for(let[X,z]of q){let R=R9(z);R&&(Z[E1(X,!0)]||=R)}return q1(this,"destinations",Z)}getDestination(P){if(this.hasOwnProperty("destinations"))return this.destinations[P]??null;let Z=this.#Q();for(let q of Z)if(q instanceof $5||q instanceof S){let X=R9(q.get(P));if(X)return X}if(Z.length){let q=this.destinations[P];if(q)return q}return null}#Q(){let P=this.#Z.get("Names"),Z=[];return P?.has("Dests")&&Z.push(new $5(P.getRaw("Dests"),this.xref)),this.#Z.has("Dests")&&Z.push(this.#Z.get("Dests")),Z}get pageLabels(){let P=null;try{P=this.#Y()}catch(Z){if(Z instanceof q8)throw Z;v("Unable to read page labels.")}return q1(this,"pageLabels",P)}#Y(){let P=this.#Z.getRaw("PageLabels");if(!P)return null;let Z=Array(this.numPages),q=null,X="",z=new w7(P,this.xref).getAll(),R="",f=1;for(let G=0,Q=this.numPages;G<Q;G++){let Y=z.get(G);if(Y!==void 0){if(!(Y instanceof S))throw new s("PageLabel is not a dictionary.");if(Y.has("Type")&&!G8(Y.get("Type"),"PageLabel"))throw new s("Invalid type in PageLabel dictionary.");if(Y.has("S")){let W=Y.get("S");if(!(W instanceof t))throw new s("Invalid style in PageLabel dictionary.");q=W.name}else q=null;if(Y.has("P")){let W=Y.get("P");if(typeof W!="string")throw new s("Invalid prefix in PageLabel dictionary.");X=E1(W)}else X="";if(Y.has("St")){let W=Y.get("St");if(!(Number.isInteger(W)&&W>=1))throw new s("Invalid start in PageLabel dictionary.");f=W}else f=1}switch(q){case"D":R=f;break;case"R":case"r":R=PI(f,q==="r");break;case"A":case"a":let W=26,$=q==="a"?97:65,_=f-1;R=String.fromCharCode($+_%W).repeat(Math.floor(_/W)+1);break;default:if(q)throw new s(`Invalid style "${q}" in PageLabel dictionary.`);R=""}Z[G]=X+R,f++}return Z}get pageLayout(){let P=this.#Z.get("PageLayout"),Z="";if(P instanceof t)switch(P.name){case"SinglePage":case"OneColumn":case"TwoColumnLeft":case"TwoColumnRight":case"TwoPageLeft":case"TwoPageRight":Z=P.name}return q1(this,"pageLayout",Z)}get pageMode(){let P=this.#Z.get("PageMode"),Z="UseNone";if(P instanceof t)switch(P.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"FullScreen":case"UseOC":case"UseAttachments":Z=P.name}return q1(this,"pageMode",Z)}get viewerPreferences(){let P=this.#Z.get("ViewerPreferences");if(!(P instanceof S))return q1(this,"viewerPreferences",null);let Z=null;for(let[q,X]of P){let z;switch(q){case"HideToolbar":case"HideMenubar":case"HideWindowUI":case"FitWindow":case"CenterWindow":case"DisplayDocTitle":case"PickTrayByPDFSize":typeof X=="boolean"&&(z=X);break;case"NonFullScreenPageMode":if(X instanceof t)switch(X.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"UseOC":z=X.name;break;default:z="UseNone"}break;case"Direction":if(X instanceof t)switch(X.name){case"L2R":case"R2L":z=X.name;break;default:z="L2R"}break;case"ViewArea":case"ViewClip":case"PrintArea":case"PrintClip":if(X instanceof t)switch(X.name){case"MediaBox":case"CropBox":case"BleedBox":case"TrimBox":case"ArtBox":z=X.name;break;default:z="CropBox"}break;case"PrintScaling":if(X instanceof t)switch(X.name){case"None":case"AppDefault":z=X.name;break;default:z="AppDefault"}break;case"Duplex":if(X instanceof t)switch(X.name){case"Simplex":case"DuplexFlipShortEdge":case"DuplexFlipLongEdge":z=X.name;break;default:z="None"}break;case"PrintPageRange":if(Array.isArray(X)&&X.length%2==0)X.every((R,f,G)=>Number.isInteger(R)&&R>0&&(f===0||R>=G[f-1])&&R<=this.numPages)&&(z=X);break;case"NumCopies":Number.isInteger(X)&&X>0&&(z=X);break;default:v(`Ignoring non-standard key in ViewerPreferences: ${q}.`);continue}z!==void 0?(Z??=Object.create(null),Z[q]=z):v(`Bad value, for key "${q}", in ViewerPreferences: ${X}.`)}return q1(this,"viewerPreferences",Z)}get openAction(){let P=this.#Z.get("OpenAction"),Z=Object.create(null);if(P instanceof S){let q=new S(this.xref);q.set("A",P);let X={url:null,dest:null,action:null};H6.parseDestDictionary({destDict:q,resultObj:X}),Array.isArray(X.dest)?Z.dest=X.dest:X.action&&(Z.action=X.action)}else v3(P)&&(Z.dest=P);return q1(this,"openAction",Zq(Z)>0?Z:null)}get attachments(){let P=this.#Z.get("Names"),Z=null;if(P instanceof S&&P.has("EmbeddedFiles")){let q=new $5(P.getRaw("EmbeddedFiles"),this.xref);for(let[X,z]of q.getAll()){let R=new N3(z,this.xref);Z??=Object.create(null),Z[E1(X,!0)]=R.serializable}}return q1(this,"attachments",Z)}get xfaImages(){let P=this.#Z.get("Names"),Z=null;if(P instanceof S&&P.has("XFAImages")){let q=new $5(P.getRaw("XFAImages"),this.xref);for(let[X,z]of q.getAll())z instanceof T1&&(Z??=new Map,Z.set(E1(X,!0),z.getBytes()))}return q1(this,"xfaImages",Z)}#_(){let P=this.#Z.get("Names"),Z=null;function q(z,R){if(!(R instanceof S))return;if(!G8(R.get("S"),"JavaScript"))return;let f=R.get("JS");if(f instanceof T1)f=f.getString();else if(typeof f!="string")return;f=E1(f,!0).replaceAll("\x00",""),f&&(Z||=new Map).set(z,f)}if(P instanceof S&&P.has("JavaScript")){let z=new $5(P.getRaw("JavaScript"),this.xref);for(let[R,f]of z.getAll())q(E1(R,!0),f)}let X=this.#Z.get("OpenAction");return X&&q("OpenAction",X),Z}get jsActions(){let P=this.#_(),Z=qP(this.xref,this.#Z,NB);if(P){Z||=Object.create(null);for(let[q,X]of P)q in Z?Z[q].push(X):Z[q]=[X]}return q1(this,"jsActions",Z)}async cleanup(P=!1){Lq(),this.globalColorSpaceCache.clear(),this.globalImageCache.clear(P),this.pageKidsCountCache.clear(),this.pageIndexCache.clear(),this.pageDictCache.clear(),this.nonBlendModesSet.clear();for(let{dict:Z}of await Promise.all(this.fontCache))delete Z.cacheKey;this.fontCache.clear(),this.builtInCMapCache.clear(),this.standardFontDataCache.clear(),this.systemFontCache.clear()}async getPageDict(P){let Z=[this.toplevelPagesDict],q=new J8,X=this.#Z.getRaw("Pages");X instanceof f1&&q.put(X);let z=this.xref,R=this.pageKidsCountCache,f=this.pageIndexCache,G=this.pageDictCache,Q=0;for(;Z.length;){let Y=Z.pop();if(Y instanceof f1){let J=R.get(Y);if(J>=0&&Q+J<=P){Q+=J;continue}if(q.has(Y))throw new s("Pages tree contains circular reference.");q.put(Y);let U=await(G.get(Y)||z.fetchAsync(Y));if(U instanceof S){let K=U.getRaw("Type");if(K instanceof f1&&(K=await z.fetchAsync(K)),G8(K,"Page")||!U.has("Kids")){if(R.has(Y)||R.put(Y,1),f.has(Y)||f.put(Y,Q),Q===P)return[U,Y];Q++;continue}}Z.push(U);continue}if(!(Y instanceof S))throw new s("Page dictionary kid reference points to wrong type of object.");let{objId:W}=Y,$=Y.getRaw("Count");if($ instanceof f1&&($=await z.fetchAsync($)),Number.isInteger($)&&$>=0&&(W&&!R.has(W)&&R.put(W,$),Q+$<=P)){Q+=$;continue}let _=Y.getRaw("Kids");if(_ instanceof f1&&(_=await z.fetchAsync(_)),!Array.isArray(_)){let J=Y.getRaw("Type");if(J instanceof f1&&(J=await z.fetchAsync(J)),G8(J,"Page")||!Y.has("Kids")){if(Q===P)return[Y,null];Q++;continue}throw new s("Page dictionary kids object is not an array.")}for(let J=_.length-1;J>=0;J--){let U=_[J];Z.push(U),Y===this.toplevelPagesDict&&U instanceof f1&&!G.has(U)&&G.put(U,z.fetchAsync(U))}}throw Error(`Page index ${P} not found.`)}async getAllPageDicts(P=!1){let{ignoreErrors:Z}=this.pdfManager.evaluatorOptions,q=[{currentNode:this.toplevelPagesDict,posInKids:0}],X=new J8,z=this.#Z.getRaw("Pages");z instanceof f1&&X.put(z);let R=new Map,f=this.xref,G=this.pageIndexCache,Q=0;function Y($,_){_&&!G.has(_)&&G.put(_,Q),R.set(Q++,[$,_])}function W($){if($ instanceof V4&&!P)throw $;P&&Z&&Q===0&&(v(`getAllPageDicts - Skipping invalid first page: "${$}".`),$=S.empty),R.set(Q++,[$,null])}for(;q.length>0;){let $=q.at(-1),{currentNode:_,posInKids:J}=$,U=_.getRaw("Kids");if(U instanceof f1)try{U=await f.fetchAsync(U)}catch(j){W(j);break}if(!Array.isArray(U)){W(new s("Page dictionary kids object is not an array."));break}if(J>=U.length){q.pop();continue}let K=U[J],I;if(K instanceof f1){if(X.has(K)){W(new s("Pages tree contains circular reference."));break}X.put(K);try{I=await f.fetchAsync(K)}catch(j){W(j);break}}else I=K;if(!(I instanceof S)){W(new s("Page dictionary kid reference points to wrong type of object."));break}let B=I.getRaw("Type");if(B instanceof f1)try{B=await f.fetchAsync(B)}catch(j){W(j);break}G8(B,"Page")||!I.has("Kids")?Y(I,K instanceof f1?K:null):q.push({currentNode:I,posInKids:0}),$.posInKids++}return R}getPageIndex(P){let Z=this.pageIndexCache.get(P);if(Z!==void 0)return Promise.resolve(Z);let q=this.xref,X=0,z=(R)=>function(f){let G,Q=0;return q.fetchAsync(f).then(function(Y){if(V3(f,P)&&!xf(Y,"Page")&&!(Y instanceof S&&!Y.has("Type")&&Y.has("Contents")))throw new s("The reference does not point to a /Page dictionary.");if(!Y)return null;if(!(Y instanceof S))throw new s("Node must be a dictionary.");return G=Y.getRaw("Parent"),Y.getAsync("Parent")}).then(function(Y){if(!Y)return null;if(!(Y instanceof S))throw new s("Parent must be a dictionary.");return Y.getAsync("Kids")}).then(function(Y){if(!Y)return null;let W=[],$=!1;for(let _ of Y){if(!(_ instanceof f1))throw new s("Kid must be a reference.");if(V3(_,f)){$=!0;break}W.push(q.fetchAsync(_).then(function(J){if(!(J instanceof S))throw new s("Kid node must be a dictionary.");J.has("Count")?Q+=J.get("Count"):Q++}))}if(!$)throw new s("Kid reference not found in parent's kids.");return Promise.all(W).then(()=>[Q,G])})}(R).then((f)=>{if(!f)return this.pageIndexCache.put(P,X),X;let[G,Q]=f;return X+=G,z(Q)});return z(P)}get baseUrl(){let P=this.#Z.get("URI");if(P instanceof S){let Z=P.get("Base");if(typeof Z=="string"){let q=j3(Z,null,{tryConvertEncoding:!0});if(q)return q1(this,"baseUrl",q.href)}}return q1(this,"baseUrl",this.pdfManager.docBaseUrl)}static parseDestDictionary({destDict:P,resultObj:Z,docBaseUrl:q=null,docAttachments:X=null}){if(!(P instanceof S))return void v("parseDestDictionary: `destDict` must be a dictionary.");let z,R,f=P.get("A");if(f instanceof S||(P.has("Dest")?f=P.get("Dest"):(f=P.get("AA"),f instanceof S&&(f.has("D")?f=f.get("D"):f.has("U")&&(f=f.get("U"))))),f instanceof S){let G=f.get("S");if(!(G instanceof t))return void v("parseDestDictionary: Invalid type in Action dictionary.");let Q=G.name;switch(Q){case"ResetForm":let Y=f.get("Flags"),W=!(1&(typeof Y=="number"?Y:0)),$=[],_=[];for(let b of f.get("Fields")||[])b instanceof f1?_.push(b.toString()):typeof b=="string"&&$.push(E1(b));Z.resetForm={fields:$,refs:_,include:W};break;case"URI":z=f.get("URI"),z instanceof t&&(z="/"+z.name);break;case"GoTo":R=f.get("D");break;case"Launch":case"GoToR":let J=f.get("F");if(J instanceof S){let b=new N3(J,null,!0),{rawFilename:O}=b.serializable;z=O}else typeof J=="string"&&(z=J);let U=lz(f);U&&typeof z=="string"&&(z=z.split("#",1)[0]+"#"+U);let K=f.get("NewWindow");typeof K=="boolean"&&(Z.newWindow=K);break;case"GoToE":let I=f.get("T"),B;if(X&&I instanceof S){let b=I.get("R"),O=I.get("N");G8(b,"C")&&typeof O=="string"&&(B=X[E1(O,!0)])}if(B){Z.attachment=B;let b=lz(f);b&&(Z.attachmentDest=b)}else v('parseDestDictionary - unimplemented "GoToE" action.');break;case"Named":let j=f.get("N");j instanceof t&&(Z.action=j.name);break;case"SetOCGState":let V=f.get("State"),H=f.get("PreserveRB");if(!Array.isArray(V)||V.length===0)break;let M=[];for(let b of V)if(b instanceof t)switch(b.name){case"ON":case"OFF":case"Toggle":M.push(b.name)}else b instanceof f1&&M.push(b.toString());if(M.length!==V.length)break;Z.setOCGState={state:M,preserveRB:typeof H!="boolean"||H};break;case"JavaScript":let x=f.get("JS"),A;x instanceof T1?A=x.getString():typeof x=="string"&&(A=x);let k=A&&Lf(E1(A,!0));if(k){z=k.url,Z.newWindow=k.newWindow;break}default:if(Q==="JavaScript"||Q==="SubmitForm")break;v(`parseDestDictionary - unsupported action: "${Q}".`)}}else P.has("Dest")&&(R=P.get("Dest"));if(typeof z=="string"){let G=j3(z,q,{addDefaultProtocol:!0,tryConvertEncoding:!0});G&&(Z.url=G.href),Z.unsafeUrl=z}R&&(R instanceof t&&(R=R.name),typeof R=="string"?Z.dest=E1(R,!0):v3(R)&&(Z.dest=R))}}function _V(P){return P instanceof f1||P instanceof S||P instanceof T1||Array.isArray(P)}function JV(P,Z){if(P instanceof S)P=P.getRawValues();else if(P instanceof T1)P=P.dict.getRawValues();else if(!Array.isArray(P))return;for(let q of P)_V(q)&&Z.push(q)}class M6{refSet=new J8;constructor(P,Z,q){this.dict=P,this.keys=Z,this.xref=q}async load(){let{keys:P,dict:Z}=this,q=[];for(let X of P){let z=Z.getRaw(X);z!==void 0&&q.push(z)}await this.#P(q),this.refSet=null}async#P(P){let Z=[],q=[];for(;P.length;){let X=P.pop();if(X instanceof f1){if(this.refSet.has(X))continue;try{this.refSet.put(X),X=this.xref.fetch(X)}catch(z){if(!(z instanceof q8))return v(`ObjectLoader.#walk - requesting all data: "${z}".`),void await this.xref.stream.manager.requestAllChunks();Z.push(X),q.push({begin:z.begin,end:z.end})}}if(X instanceof T1){let z=X.getBaseStreams();if(z){let R=!1;for(let f of z)f.isDataLoaded||(R=!0,q.push({begin:f.start,end:f.end}));R&&Z.push(X)}}JV(X,P)}if(q.length){await this.xref.stream.manager.requestRanges(q);for(let X of Z)X instanceof f1&&this.refSet.remove(X);await this.#P(Z)}}static async load(P,Z,q){if(q.stream.isDataLoaded)return;await new M6(P,Z,q).load()}}function WP(P){return P.startsWith("'")||P.startsWith('"')?P.slice(1,-1):P}function A1({data:P,defaultValue:Z,validate:q}){if(!P)return Z;P=P.trim();let X=parseInt(P,10);return!isNaN(X)&&q(X)?X:Z}function F3({data:P,defaultValue:Z,validate:q}){if(!P)return Z;P=P.trim();let X=parseFloat(P);return!isNaN(X)&&q(X)?X:Z}function $P({data:P,defaultValue:Z,validate:q}){return P&&q(P=P.trim())?P:Z}function i(P,Z){return $P({data:P,defaultValue:Z[0],validate:(q)=>Z.includes(q)})}function $1(P,Z="0"){if(Z||="0",!P)return $1(Z);let q=P.trim().match(BV);if(!q)return $1(Z);let[,X,z]=q,R=parseFloat(X);if(isNaN(R))return $1(Z);if(R===0)return 0;let f=KV[z];return f?f(R):R}function oz(P){if(!P)return{num:1,den:1};let Z=P.split(":",2).map((z)=>parseFloat(z.trim())).filter((z)=>!isNaN(z));if(Z.length===1&&Z.push(1),Z.length===0)return{num:1,den:1};let[q,X]=Z;return{num:q,den:X}}function d0(P){return P?P.trim().split(/\s+/).map((Z)=>({excluded:Z[0]==="-",viewname:Z.substring(1)})):[]}class K1{static get FAILURE(){return q1(this,"FAILURE",new K1(!1,null,null,null))}static get EMPTY(){return q1(this,"EMPTY",new K1(!0,null,null,null))}constructor(P,Z,q,X){this.success=P,this.html=Z,this.bbox=q,this.breakNode=X}isBreak(){return!!this.breakNode}static breakNode(P){return new K1(!1,null,null,P)}static success(P,Z=null){return new K1(!0,P,Z,null)}}class zQ{constructor(P){this.fonts=new Map,this.cache=new Map,this.warned=new Set,this.defaultFont=null,this.add(P)}add(P,Z=null){for(let X of P)this.addPdfFont(X);for(let X of this.fonts.values())X.regular||(X.regular=X.italic||X.bold||X.bolditalic);if(!Z||Z.size===0)return;let q=this.fonts.get("PdfJS-Fallback-PdfJS-XFA");for(let X of Z)this.fonts.set(X,q)}addPdfFont(P){let Z=P.cssFontInfo,q=Z.fontFamily,X=this.fonts.get(q);X||(X=Object.create(null),this.fonts.set(q,X),this.defaultFont||(this.defaultFont=X));let z="",R=parseFloat(Z.fontWeight);parseFloat(Z.italicAngle)!==0?z=R>=700?"bolditalic":"italic":R>=700&&(z="bold"),z||((P.name.includes("Bold")||P.psName?.includes("Bold"))&&(z="bold"),(P.name.includes("Italic")||P.name.endsWith("It")||P.psName?.includes("Italic")||P.psName?.endsWith("It"))&&(z+="italic")),z||(z="regular"),X[z]=P}getDefault(){return this.defaultFont}find(P,Z=!0){let q=this.fonts.get(P)||this.cache.get(P);if(q)return q;let X=/,|-|_| |bolditalic|bold|italic|regular|it/gi,z=P.replaceAll(X,"");if(q=this.fonts.get(z),q)return this.cache.set(P,q),q;z=z.toLowerCase();let R=[];for(let[f,G]of this.fonts.entries())f.replaceAll(X,"").toLowerCase().startsWith(z)&&R.push(G);if(R.length===0)for(let[,f]of this.fonts.entries())f.regular.name?.replaceAll(X,"").toLowerCase().startsWith(z)&&R.push(f);if(R.length===0){z=z.replaceAll(/psmt|mt/gi,"");for(let[f,G]of this.fonts.entries())f.replaceAll(X,"").toLowerCase().startsWith(z)&&R.push(G)}if(R.length===0)for(let f of this.fonts.values())f.regular.name?.replaceAll(X,"").toLowerCase().startsWith(z)&&R.push(f);return R.length>=1?(R.length!==1&&Z&&v(`XFA - Too many choices to guess the correct font: ${P}`),this.cache.set(P,R[0]),R[0]):(Z&&!this.warned.has(P)&&(this.warned.add(P),v(`XFA - Cannot find the font: ${P}`)),null)}}function Nq(P,Z){return P.posture==="italic"?P.weight==="bold"?Z.bolditalic:Z.italic:P.weight==="bold"?Z.bold:Z.regular}class bZ{constructor(P,Z,q,X){if(this.lineHeight=q,this.paraMargin=Z||{top:0,bottom:0,left:0,right:0},!P)return void([this.pdfFont,this.xfaFont]=this.defaultFont(X));this.xfaFont={typeface:P.typeface,posture:P.posture,weight:P.weight,size:P.size,letterSpacing:P.letterSpacing};let z=X.find(P.typeface);z?(this.pdfFont=Nq(P,z),this.pdfFont||([this.pdfFont,this.xfaFont]=this.defaultFont(X))):[this.pdfFont,this.xfaFont]=this.defaultFont(X)}defaultFont(P){let Z=P.find("Helvetica",!1)||P.find("Myriad Pro",!1)||P.find("Arial",!1)||P.getDefault();if(Z?.regular){let q=Z.regular;return[q,{typeface:q.cssFontInfo.fontFamily,posture:"normal",weight:"normal",size:10,letterSpacing:0}]}return[null,{typeface:"Courier",posture:"normal",weight:"normal",size:10,letterSpacing:0}]}}class RQ{constructor(P,Z,q,X){this.fontFinder=X,this.stack=[new bZ(P,Z,q,X)]}pushData(P,Z,q){let X=this.stack.at(-1);for(let R of["typeface","posture","weight","size","letterSpacing"])P[R]||(P[R]=X.xfaFont[R]);for(let R of["top","bottom","left","right"])isNaN(Z[R])&&(Z[R]=X.paraMargin[R]);let z=new bZ(P,Z,q||X.lineHeight,this.fontFinder);z.pdfFont||(z.pdfFont=X.pdfFont),this.stack.push(z)}popFont(){this.stack.pop()}topFont(){return this.stack.at(-1)}}class fQ{constructor(P,Z,q,X){this.glyphs=[],this.fontSelector=new RQ(P,Z,q,X),this.extraHeight=0}pushData(P,Z,q){this.fontSelector.pushData(P,Z,q)}popFont(P){return this.fontSelector.popFont()}addPara(){let P=this.fontSelector.topFont();this.extraHeight+=P.paraMargin.top+P.paraMargin.bottom}addString(P){if(!P)return;let Z=this.fontSelector.topFont(),q=Z.xfaFont.size;if(Z.pdfFont){let X=Z.xfaFont.letterSpacing,z=Z.pdfFont,R=z.lineHeight||1.2,f=Z.lineHeight||Math.max(1.2,R)*q,G=R-(z.lineGap===void 0?0.2:z.lineGap),Q=Math.max(1,G)*q,Y=q/1000,W=z.defaultWidth||z.charsToGlyphs(" ")[0].width;for(let $ of P.split(/[\u2029\n]/)){let _=z.encodeString($).join(""),J=z.charsToGlyphs(_);for(let U of J){let K=U.width||W;this.glyphs.push([K*Y+X,f,Q,U.unicode,!1])}this.glyphs.push([0,0,0,`
|
|
9
|
+
`,!0])}return void this.glyphs.pop()}for(let X of P.split(/[\u2029\n]/)){for(let z of X.split(""))this.glyphs.push([q,1.2*q,q,z,!1]);this.glyphs.push([0,0,0,`
|
|
10
|
+
`,!0])}this.glyphs.pop()}compute(P){let Z=-1,q=0,X=0,z=0,R=0,f=0,G=!1,Q=!0;for(let Y=0,W=this.glyphs.length;Y<W;Y++){let[$,_,J,U,K]=this.glyphs[Y],I=U===" ",B=Q?J:_;K?(X=Math.max(X,R),R=0,z+=f,f=B,Z=-1,q=0,Q=!1):I?R+$>P?(X=Math.max(X,R),R=0,z+=f,f=B,Z=-1,q=0,G=!0,Q=!1):(f=Math.max(B,f),q=R,R+=$,Z=Y):R+$>P?(z+=f,f=B,Z!==-1?(Y=Z,X=Math.max(X,q),R=0,Z=-1,q=0):(X=Math.max(X,R),R=$),G=!0,Q=!1):(R+=$,f=Math.max(B,f))}return X=Math.max(X,R),z+=f+this.extraHeight,{width:1.02*X,height:z,isBroken:G}}}function xV(P){return(P=P.trim())==="*"?1/0:parseInt(P,10)||0}function QQ(P,Z,q=!0){let X=P.match(az);if(!X)return null;let[z]=X,R=[{name:z,cacheName:"."+z,index:0,js:null,formCalc:null,operator:S3}],f=z.length;for(;f<P.length;){let G=f;if(P.charAt(f++)==="["){if(X=P.slice(f).match(IV),!X)return v("XFA - Invalid index in SOM expression"),null;R.at(-1).index=xV(X[0]),f+=X[0].length+1;continue}let Q;switch(P.charAt(f)){case".":if(!Z)return null;f++,Q=m3;break;case"#":f++,Q=vq;break;case"[":if(q)return v("XFA - SOM expression contains a FormCalc subexpression which is not supported for now."),null;Q=jV;break;case"(":if(q)return v("XFA - SOM expression contains a JavaScript subexpression which is not supported for now."),null;Q=VV;break;default:Q=S3}if(X=P.slice(f).match(az),!X)break;[z]=X,f+=z.length,R.push({name:z,cacheName:P.slice(G,f),operator:Q,index:0,js:null,formCalc:null})}return R}function D4(P,Z,q,X=!0,z=!0){let R=QQ(q,X);if(!R)return null;let f=GQ.get(R[0].name),G,Q=0;f?(G=!0,P=[f(P,Z)],Q=1):(G=Z===null,P=[Z||P]);for(let Y=R.length;Q<Y;Q++){let{name:W,cacheName:$,operator:_,index:J}=R[Q],U=[];for(let K of P){if(!K.isXFAObject)continue;let I,B;if(z&&(B=nz.get(K),B||(B=new Map,nz.set(K,B)),I=B.get($)),!I){switch(_){case S3:I=K[E7](W,!1);break;case m3:I=K[E7](W,!0);break;case vq:I=K[YP](W),I=I.isXFAObjectArray?I.children:[I]}z&&B.set($,I)}I.length>0&&U.push(I)}if(U.length===0&&!G&&Q===0){if(!(Z=Z[L1]()))return null;Q=-1,P=[Z];continue}P=isFinite(J)?U.filter((K)=>J<K.length).map((K)=>K[J]):U.flat()}return P.length===0?null:P}function HV(P,Z,q){let X=QQ(q);if(!X)return null;if(X.some((f)=>f.operator===m3))return null;let z=GQ.get(X[0].name),R=0;z?(P=z(P,Z),R=1):P=Z||P;for(let f=X.length;R<f;R++){let{name:G,operator:Q,index:Y}=X[R];if(!isFinite(Y))return X[R].index=0,P.createNodes(X.slice(R));let W;switch(Q){case S3:W=P[E7](G,!1);break;case m3:W=P[E7](G,!0);break;case vq:W=P[YP](G),W=W.isXFAObjectArray?W.children:[W]}if(W.length===0)return P.createNodes(X.slice(R));if(!(Y<W.length))return X[R].index=Y-W.length,P.createNodes(X.slice(R));{let $=W[Y];if(!$.isXFAObject)return v("XFA - Cannot create a node."),null;P=$}}return null}function M1(P){return typeof P=="string"?"0px":Number.isInteger(P)?`${P}px`:`${P.toFixed(2)}px`}function WQ(P,Z){P[I8]().layout==="position"&&(P.minW>0&&(Z.minWidth=M1(P.minW)),P.maxW>0&&(Z.maxWidth=M1(P.maxW)),P.minH>0&&(Z.minHeight=M1(P.minH)),P.maxH>0&&(Z.maxHeight=M1(P.maxH)))}function PR(P,Z,q,X,z,R){let f=new fQ(Z,q,X,z);return typeof P=="string"?f.addString(P):P[R4](f),f.compute(R)}function Sq(P,Z){let q=null,X=null,z=!1;if((!P.w||!P.h)&&P.value){let R=0,f=0;P.margin&&(R=P.margin.leftInset+P.margin.rightInset,f=P.margin.topInset+P.margin.bottomInset);let G=null,Q=null;P.para&&(Q=Object.create(null),G=P.para.lineHeight===""?null:P.para.lineHeight,Q.top=P.para.spaceAbove===""?0:P.para.spaceAbove,Q.bottom=P.para.spaceBelow===""?0:P.para.spaceBelow,Q.left=P.para.marginLeft===""?0:P.para.marginLeft,Q.right=P.para.marginRight===""?0:P.para.marginRight);let Y=P.font;if(!Y){let _=P[K8](),J=P[L1]();for(;J&&J!==_;){if(J.font){Y=J.font;break}J=J[L1]()}}let W=(P.w||Z.width)-R,$=P[e1].fontFinder;if(P.value.exData&&P.value.exData[a]&&P.value.exData.contentType==="text/html"){let _=PR(P.value.exData[a],Y,Q,G,$,W);X=_.width,q=_.height,z=_.isBroken}else{let _=P.value[A8]();if(_){let J=PR(_,Y,Q,G,$,W);X=J.width,q=J.height,z=J.isBroken}}X===null||P.w||(X+=R),q===null||P.h||(q+=f)}return{w:X,h:q,isBroken:z}}function $Q(P,Z,q){let X;if(P.w!==""&&P.h!=="")X=[P.x,P.y,P.w,P.h];else{if(!q)return null;let z=P.w;if(z===""){if(P.maxW===0){let f=P[I8]();z=f.layout==="position"&&f.w!==""?0:P.minW}else z=Math.min(P.maxW,q.width);Z.attributes.style.width=M1(z)}let R=P.h;if(R===""){if(P.maxH===0){let f=P[I8]();R=f.layout==="position"&&f.h!==""?0:P.minH}else R=Math.min(P.maxH,q.height);Z.attributes.style.height=M1(R)}X=[P.x,P.y,z,R]}return X}function JP(P){let Z=P[I8]();if(Z.layout?.includes("row")){let q=Z[u],X=P.colSpan,z;z=X===-1?Math.sumPrecise(q.columnWidths.slice(q.currentColumn)):Math.sumPrecise(q.columnWidths.slice(q.currentColumn,q.currentColumn+X)),isNaN(z)||(P.w=z)}Z.layout&&Z.layout!=="position"&&(P.x=P.y=0),P.layout==="table"&&P.w===""&&Array.isArray(P.columnWidths)&&(P.w=Math.sumPrecise(P.columnWidths))}function _Q(P){switch(P.layout){case"position":default:return"xfaPosition";case"lr-tb":return"xfaLrTb";case"rl-row":return"xfaRlRow";case"rl-tb":return"xfaRlTb";case"row":return"xfaRow";case"table":return"xfaTable";case"tb":return"xfaTb"}}function q0(P,...Z){let q=Object.create(null);for(let X of Z){let z=P[X];if(z!==null){if(ez.hasOwnProperty(X))ez[X](P,q);else if(z instanceof g){let R=z[u1]();R?Object.assign(q,R):v(`(DEBUG) - XFA - style for ${X} not implemented yet`)}}}return q}function T5(P,Z){let{attributes:q}=Z,{style:X}=q,z={name:"div",attributes:{class:["xfaWrapper"],style:Object.create(null)},children:[]};if(q.class.push("xfaWrapped"),P.border){let{widths:R,insets:f}=P.border[u],G,Q,Y=f[0],W=f[3],$=f[0]+f[2],_=f[1]+f[3];switch(P.border.hand){case"even":Y-=R[0]/2,W-=R[3]/2,G=`calc(100% + ${(R[1]+R[3])/2-_}px)`,Q=`calc(100% + ${(R[0]+R[2])/2-$}px)`;break;case"left":Y-=R[0],W-=R[3],G=`calc(100% + ${R[1]+R[3]-_}px)`,Q=`calc(100% + ${R[0]+R[2]-$}px)`;break;case"right":G=_?`calc(100% - ${_}px)`:"100%",Q=$?`calc(100% - ${$}px)`:"100%"}let J=["xfaBorder"];S6(P.border)&&J.push("xfaPrintOnly");let U={name:"div",attributes:{class:J,style:{top:`${Y}px`,left:`${W}px`,width:G,height:Q}},children:[]};for(let K of["border","borderWidth","borderColor","borderRadius","borderStyle"])X[K]!==void 0&&(U.attributes.style[K]=X[K],delete X[K]);z.children.push(U,Z)}else z.children.push(Z);for(let R of["background","backgroundClip","top","left","width","height","minWidth","minHeight","maxWidth","maxHeight","transform","transformOrigin","visibility"])X[R]!==void 0&&(z.attributes.style[R]=X[R],delete X[R]);return z.attributes.style.position=X.position==="absolute"?"absolute":"relative",delete X.position,X.alignSelf&&(z.attributes.style.alignSelf=X.alignSelf,delete X.alignSelf),z}function JQ(P){let Z=$1(P.textIndent,"0px");if(Z>=0)return;let q="padding"+((P.textAlign==="right"?"right":"left")==="left"?"Left":"Right"),X=$1(P[q],"0px");P[q]=X-Z+"px"}function mq(P,Z){switch(P.access){case"nonInteractive":Z.push("xfaNonInteractive");break;case"readOnly":Z.push("xfaReadOnly");break;case"protected":Z.push("xfaDisabled")}}function S6(P){return P.relevant.length>0&&!P.relevant[0].excluded&&P.relevant[0].viewname==="print"}function UQ(P){let Z=P[K8]()[u].paraStack;return Z.length?Z.at(-1):null}function KQ(P,Z,q){if(q.attributes.class?.includes("xfaRich")){Z&&(P.h===""&&(Z.height="auto"),P.w===""&&(Z.width="auto"));let X=UQ(P);if(X){let z=q.attributes.style;switch(z.display="flex",z.flexDirection="column",X.vAlign){case"top":z.justifyContent="start";break;case"bottom":z.justifyContent="end";break;case"middle":z.justifyContent="center"}let R=X[u1]();for(let[f,G]of Object.entries(R))f in z||(z[f]=G)}}}function BQ(P,Z,q,X){if(!q)return void delete X.fontFamily;let z=WP(P.typeface);X.fontFamily=`"${z}"`;let R=q.find(z);if(R){let{fontFamily:f}=R.regular.cssFontInfo;f!==z&&(X.fontFamily=`"${f}"`);let G=UQ(Z);if(G&&G.lineHeight!=="")return;if(X.lineHeight)return;let Q=Nq(P,R);Q&&(X.lineHeight=Math.max(1.2,Q.lineHeight))}}function IQ(P){let Z=j3(P,null,{addDefaultProtocol:!0,tryConvertEncoding:!0});return Z?Z.href:null}function jQ(P,Z){return{name:"div",attributes:{class:[P.layout==="lr-tb"?"xfaLr":"xfaRl"]},children:Z}}function VQ(P){if(!P[u])return null;let Z={name:"div",attributes:P[u].attributes,children:P[u].children};if(P[u].failingNode){let q=P[u].failingNode[Z2]();q&&(P.layout.endsWith("-tb")?Z.children.push(jQ(P,[q])):Z.children.push(q))}return Z.children.length===0?null:Z}function xQ(P,Z,q){let X=P[u],z=X.availableSpace,[R,f,G,Q]=q;switch(P.layout){case"position":X.width=Math.max(X.width,R+G),X.height=Math.max(X.height,f+Q),X.children.push(Z);break;case"lr-tb":case"rl-tb":X.line&&X.attempt!==1||(X.line=jQ(P,[]),X.children.push(X.line),X.numberInLine=0),X.numberInLine+=1,X.line.children.push(Z),X.attempt===0?(X.currentWidth+=G,X.height=Math.max(X.height,X.prevHeight+Q)):(X.currentWidth=G,X.prevHeight=X.height,X.height+=Q,X.attempt=0),X.width=Math.max(X.width,X.currentWidth);break;case"rl-row":case"row":{X.children.push(Z),X.width+=G,X.height=Math.max(X.height,Q);let Y=M1(X.height);for(let W of X.children)W.attributes.style.height=Y;break}case"table":case"tb":X.width=E8(G,X.width,z.width),X.height+=Q,X.children.push(Z)}}function HQ(P){let Z=P[u].availableSpace,q=P.margin?P.margin.topInset+P.margin.bottomInset:0,X=P.margin?P.margin.leftInset+P.margin.rightInset:0;switch(P.layout){case"lr-tb":case"rl-tb":return P[u].attempt===0?{width:Z.width-X-P[u].currentWidth,height:Z.height-q-P[u].prevHeight}:{width:Z.width-X,height:Z.height-q-P[u].height};case"rl-row":case"row":return{width:Math.sumPrecise(P[u].columnWidths.slice(P[u].currentColumn)),height:Z.height-X};case"table":case"tb":return{width:Z.width-X,height:Z.height-q-P[u].height};default:return Z}}function UP(P,Z){if(P[K8]()[u].firstUnsplittable===null)return!0;if(P.w===0||P.h===0)return!0;let q=P[I8](),X=q[u]?.attempt||0,[,z,R,f]=function(G){let Q,Y,W=G.w===""?NaN:G.w,$=G.h===""?NaN:G.h,[_,J]=[0,0];switch(G.anchorType||""){case"bottomCenter":[_,J]=[W/2,$];break;case"bottomLeft":[_,J]=[0,$];break;case"bottomRight":[_,J]=[W,$];break;case"middleCenter":[_,J]=[W/2,$/2];break;case"middleLeft":[_,J]=[0,$/2];break;case"middleRight":[_,J]=[W,$/2];break;case"topCenter":[_,J]=[W/2,0];break;case"topRight":[_,J]=[W,0]}switch(G.rotate||0){case 0:[Q,Y]=[-_,-J];break;case 90:[Q,Y]=[-J,_],[W,$]=[$,-W];break;case 180:[Q,Y]=[_,J],[W,$]=[-W,-$];break;case 270:[Q,Y]=[J,-_],[W,$]=[-$,W]}return[G.x+Q+Math.min(0,W),G.y+Y+Math.min(0,$),Math.abs(W),Math.abs($)]}(P);switch(q.layout){case"lr-tb":case"rl-tb":return X===0?P[K8]()[u].noLayoutFailure?P.w!==""?Math.round(R-Z.width)<=2:Z.width>2:!(P.h!==""&&Math.round(f-Z.height)>2)&&(P.w!==""?Math.round(R-Z.width)<=2||q[u].numberInLine===0&&Z.height>2:Z.width>2):!!P[K8]()[u].noLayoutFailure||!(P.h!==""&&Math.round(f-Z.height)>2)&&((P.w===""||Math.round(R-Z.width)<=2||!q[C4]())&&Z.height>2);case"table":case"tb":return!!P[K8]()[u].noLayoutFailure||(P.h===""||P[L4]()?(P.w===""||Math.round(R-Z.width)<=2||!q[C4]())&&Z.height>2:Math.round(f-Z.height)<=2);case"position":if(P[K8]()[u].noLayoutFailure)return!0;if(P.h===""||Math.round(f+z-Z.height)<=2)return!0;return f+z>P[K8]()[u].currentContentArea.h;case"rl-row":case"row":return!!P[K8]()[u].noLayoutFailure||(P.h===""||Math.round(f-Z.height)<=2);default:return!0}}function ZR(P){if(!P||!P.border)return{w:0,h:0};let Z=P.border[u8]();return Z?{w:Z.widths[0]+Z.widths[2]+Z.insets[0]+Z.insets[2],h:Z.widths[1]+Z.widths[3]+Z.insets[1]+Z.insets[3]}:{w:0,h:0}}function pq(P){return P.margin&&(P.margin.topInset||P.margin.rightInset||P.margin.bottomInset||P.margin.leftInset)}function Oq(P,Z){if(!P.value){let q=new LP({});P[Q8](q),P.value=q}P.value[$0](Z)}function*yq(P){for(let Z of P[S8]())Z instanceof HP?yield*Z[L6]():yield Z}function q2(P){return P.validate?.nullTest==="error"}function KP(P){for(;P;){if(!P.traversal)return void(P[y0]=P[L1]()[y0]);if(P[y0])return;let Z=null;for(let z of P.traversal[S8]())if(z.operation==="next"){Z=z;break}if(!Z||!Z.ref)return void(P[y0]=P[L1]()[y0]);let q=P[K8]();P[y0]=++q[y0];let X=q[H4](Z.ref,P);if(!X)return;P=X[0]}}function BP(P,Z){let q=P.assist;if(q){let X=q[x1]();X&&(Z.title=X);let z=q.role.match(MV);if(z){let f=z[1];Z.role="heading",Z["aria-level"]=f}}if(P.layout==="table")Z.role="table";else if(P.layout==="row")Z.role="row";else{let X=P[L1]();X.layout==="row"&&(Z.role=X.assist?.role==="TH"?"columnheader":"cell")}}function O5(P){if(!P.assist)return null;let Z=P.assist;return Z.speak&&Z.speak[a]!==""?Z.speak[a]:Z.toolTip?Z.toolTip[a]:null}function e4(P){return K1.success({name:"div",attributes:{class:["xfaRich"],style:Object.create(null)},children:[{name:"span",attributes:{style:Object.create(null)},value:P}]})}function IP(P){let Z=P[K8]();Z[u].firstUnsplittable===null&&(Z[u].firstUnsplittable=P,Z[u].noLayoutFailure=!0)}function jP(P){let Z=P[K8]();Z[u].firstUnsplittable===P&&(Z[u].noLayoutFailure=!1)}function qR(P){if(P[u])return!1;if(P[u]=Object.create(null),P.targetType==="auto")return!1;let Z=P[K8](),q=null;if(P.target){if(q=Z[H4](P.target,P[L1]()),!q)return!1;q=q[0]}let{currentPageArea:X,currentContentArea:z}=Z[u];if(P.targetType==="pageArea")return q instanceof y5||(q=null),P.startNew?(P[u].target=q||X,!0):!(!q||q===X)&&(P[u].target=q,!0);q instanceof VP||(q=null);let R=q&&q[L1](),f,G=R;if(P.startNew)if(q){let Q=R.contentArea.children,Y=Q.indexOf(z),W=Q.indexOf(q);Y!==-1&&Y<W&&(G=null),f=W-1}else f=X.contentArea.children.indexOf(z);else{if(!q||q===z)return!1;f=R.contentArea.children.indexOf(q)-1,G=R===X?null:R}return P[u].target=G,P[u].index=f,!0}function XR(P,Z,q){let X=P[K8](),z=X[u].noLayoutFailure,R=Z[I8];Z[I8]=()=>P,X[u].noLayoutFailure=!0;let f=Z[x1](q);P[k5](f.html,f.bbox),X[u].noLayoutFailure=z,Z[I8]=R}function v2(P){let Z=new aq({});return Z[a]=P,Z}class PW{constructor(P){this.root=P,this.datasets=P.datasets,this.data=P.datasets?.data||new X4(j8.datasets.id,"data"),this.emptyMerge=this.data[S8]().length===0,this.root.form=this.form=P.template[D0]()}_isConsumeData(){return!this.emptyMerge&&this._mergeMode}_isMatchTemplate(){return!this._isConsumeData()}bind(){return this._bindElement(this.form,this.data),this.form}getData(){return this.data}_bindValue(P,Z,q){if(P[v0]=Z,P[u7]())if(Z[z6]()){let X=Z[Cq]();P[$0](v2(X))}else if(P instanceof xP&&P.ui?.choiceList?.open==="multiSelect"){let X=Z[S8]().map((z)=>z[a].trim()).join(`
|
|
11
|
+
`);P[$0](v2(X))}else this._isConsumeData()&&v("XFA - Nodes haven't the same type.");else!Z[z6]()||this._isMatchTemplate()?this._bindElement(P,Z):v("XFA - Nodes haven't the same type.")}_findDataByNameToConsume(P,Z,q,X){if(!P)return null;let z,R;for(let f=0;f<3;f++){for(z=q[I7](P,!1,!0);R=z.next().value,R;)if(Z===R[z6]())return R;if(q[B8]===j8.datasets.id&&q[d1]==="data")break;q=q[L1]()}return X?(z=this.data[I7](P,!0,!1),R=z.next().value,R||(z=this.data[HZ](P,!0),R=z.next().value,R?.[z6]()?R:null)):null}_setProperties(P,Z){if(P.hasOwnProperty("setProperty"))for(let{ref:q,target:X,connection:z}of P.setProperty.children){if(z)continue;if(!q)continue;let R=D4(this.root,Z,q,!1,!1);if(!R){v(`XFA - Invalid reference: ${q}.`);continue}let[f]=R;if(!f[E4](this.data)){v("XFA - Invalid node: must be a data node.");continue}let G=D4(this.root,P,X,!1,!1);if(!G){v(`XFA - Invalid target: ${X}.`);continue}let[Q]=G;if(!Q[E4](P)){v("XFA - Invalid target: must be a property or subproperty.");continue}let Y=Q[L1]();if(Q instanceof y3||Y instanceof y3){v("XFA - Invalid target: cannot be a setProperty or one of its properties.");continue}if(Q instanceof p3||Y instanceof p3){v("XFA - Invalid target: cannot be a bindItems or one of its properties.");continue}let W=f[A8](),$=Q[d1];if(Q instanceof _P){let _=Object.create(null);_[$]=W;let J=Reflect.construct(Object.getPrototypeOf(Y).constructor,[_]);Y[$]=J[$];continue}Q.hasOwnProperty(a)?(Q[v0]=f,Q[a]=W,Q[P8]()):v("XFA - Invalid node to use in setProperty")}}_bindItems(P,Z){if(!P.hasOwnProperty("items")||!P.hasOwnProperty("bindItems")||P.bindItems.isEmpty())return;for(let z of P.items.children)P[s4](z);P.items.clear();let q=new O3({}),X=new O3({});P[Q8](q),P.items.push(q),P[Q8](X),P.items.push(X);for(let{ref:z,labelRef:R,valueRef:f,connection:G}of P.bindItems.children){if(G)continue;if(!z)continue;let Q=D4(this.root,Z,z,!1,!1);if(Q)for(let Y of Q){if(!Y[E4](this.datasets)){v(`XFA - Invalid ref (${z}): must be a datasets child.`);continue}let W=D4(this.root,Y,R,!0,!1);if(!W){v(`XFA - Invalid label: ${R}.`);continue}let[$]=W;if(!$[E4](this.datasets)){v("XFA - Invalid label: must be a datasets child.");continue}let _=D4(this.root,Y,f,!0,!1);if(!_){v(`XFA - Invalid value: ${f}.`);continue}let[J]=_;if(!J[E4](this.datasets)){v("XFA - Invalid value: must be a datasets child.");continue}let U=v2($[A8]()),K=v2(J[A8]());q[Q8](U),q.text.push(U),X[Q8](K),X.text.push(K)}else v(`XFA - Invalid reference: ${z}.`)}}_bindOccurrences(P,Z,q){let X;if(Z.length>1&&(X=P[D0](),X[s4](X.occur),X.occur=null),this._bindValue(P,Z[0],q),this._setProperties(P,Z[0]),this._bindItems(P,Z[0]),Z.length===1)return;let z=P[L1](),R=P[d1],f=z[MZ](P);for(let G=1,Q=Z.length;G<Q;G++){let Y=Z[G],W=X[D0]();z[R].push(W),z[n2](f+G,W),this._bindValue(W,Y,q),this._setProperties(W,Y),this._bindItems(W,Y)}}_createOccurrences(P){if(!this.emptyMerge)return;let{occur:Z}=P;if(!Z||Z.initial<=1)return;let q=P[L1](),X=P[d1];if(!(q[X]instanceof T))return;let z;z=P.name?q[X].children.filter((G)=>G.name===P.name).length:q[X].children.length;let R=q[MZ](P)+1,f=Z.initial-z;if(f){let G=P[D0]();G[s4](G.occur),G.occur=null,q[X].push(G),q[n2](R,G);for(let Q=1;Q<f;Q++){let Y=G[D0]();q[X].push(Y),q[n2](R+Q,Y)}}}_getOccurInfo(P){let{name:Z,occur:q}=P;if(!q||!Z)return[1,1];let X=q.max===-1?1/0:q.max;return[q.min,X]}_setAndBind(P,Z){this._setProperties(P,Z),this._bindItems(P,Z),this._bindElement(P,Z)}_bindElement(P,Z){let q=[];this._createOccurrences(P);for(let X of P[S8]()){if(X[v0])continue;if(this._mergeMode===void 0&&X[d1]==="subform"){this._mergeMode=X.mergeMode==="consumeData";let W=Z[S8]();if(W.length>0)this._bindOccurrences(X,[W[0]],null);else if(this.emptyMerge){let $=Z[B8]===zR?-1:Z[B8],_=X[v0]=new X4($,X.name||"root");Z[Q8](_),this._bindElement(X,_)}continue}if(!X[E5]())continue;let z=!1,R=null,f=null,G=null;if(X.bind){switch(X.bind.match){case"none":this._setAndBind(X,Z);continue;case"global":z=!0;break;case"dataRef":if(!X.bind.ref){v(`XFA - ref is empty in node ${X[d1]}.`),this._setAndBind(X,Z);continue}f=X.bind.ref}X.bind.picture&&(R=X.bind.picture[a])}let[Q,Y]=this._getOccurInfo(X);if(f){if(G=D4(this.root,Z,f,!0,!1),G===null){if(G=HV(this.data,Z,f),!G)continue;this._isConsumeData()&&(G[e0]=!0),this._setAndBind(X,G);continue}this._isConsumeData()&&(G=G.filter((W)=>!W[e0])),G.length>Y?G=G.slice(0,Y):G.length===0&&(G=null),G&&this._isConsumeData()&&G.forEach((W)=>{W[e0]=!0})}else{if(!X.name){this._setAndBind(X,Z);continue}if(this._isConsumeData()){let W=[];for(;W.length<Y;){let $=this._findDataByNameToConsume(X.name,X[u7](),Z,z);if(!$)break;$[e0]=!0,W.push($)}G=W.length>0?W:null}else{if(G=Z[I7](X.name,!1,this.emptyMerge).next().value,!G){if(Q===0){q.push(X);continue}let W=Z[B8]===zR?-1:Z[B8];G=X[v0]=new X4(W,X.name),this.emptyMerge&&(G[e0]=!0),Z[Q8](G),this._setAndBind(X,G);continue}this.emptyMerge&&(G[e0]=!0),G=[G]}}G?this._bindOccurrences(X,G,R):Q>0?this._setAndBind(X,Z):q.push(X)}q.forEach((X)=>X[L1]()[s4](X))}}class ZW{constructor(P,Z){this.data=Z,this.dataset=P.datasets||null}serialize(P){let Z=[[-1,this.data[S8]()]];for(;Z.length>0;){let X=Z.at(-1),[z,R]=X;if(z+1===R.length){Z.pop();continue}let f=R[++X[0]],G=P.get(f[a1]);if(G)f[$0](G);else{let Y=f[PQ]();for(let W of Y.values()){let $=P.get(W[a1]);if($){W[$0]($);break}}}let Q=f[S8]();Q.length>0&&Z.push([-1,Q])}let q=['<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">'];if(this.dataset)for(let X of this.dataset[S8]())X[d1]!=="data"&&X[V7](q);return this.data[V7](q),q.push("</xfa:datasets>"),q.join("")}}function yV(P,Z,q){let X=Object.create(null);if(!P)return X;let z=Object.create(null);for(let[R,f]of P.split(";").map((G)=>G.split(":",2))){let G=SV.get(R);if(G==="")continue;let Q=f;G&&(Q=typeof G=="string"?G:G(f,z)),R.endsWith("scale")?X.transform=X.transform?`${X[R]} ${Q}`:Q:X[R.replaceAll(/-([a-zA-Z])/g,(Y,W)=>W.toUpperCase())]=Q}if(X.fontFamily&&BQ({typeface:X.fontFamily,weight:X.fontWeight||"normal",posture:X.fontStyle||"normal",size:z.fontSize||0},Z,Z[e1].fontFinder,X),q&&X.verticalAlign&&X.verticalAlign!=="0px"&&X.fontSize){let G=$1(X.fontSize);X.fontSize=M1(G*0.583),X.verticalAlign=M1(Math.sign($1(X.verticalAlign))*G*0.333)}return q&&X.fontSize&&(X.fontSize=`calc(${X.fontSize} * var(--total-scale-factor))`),JQ(X),X}class pJ{constructor(P=null){this._namespaceStack=[],this._nsAgnosticLevel=0,this._namespacePrefixes=new Map,this._namespaces=new Map,this._nextNsId=Math.max(...Object.values(j8).map(({id:Z})=>Z)),this._currentNamespace=P||new TZ(++this._nextNsId)}buildRoot(P){return new SJ(P)}build({nsPrefix:P,name:Z,attributes:q,namespace:X,prefixes:z}){let R=X!==null;if(R&&(this._namespaceStack.push(this._currentNamespace),this._currentNamespace=this._searchNamespace(X)),z&&this._addNamespacePrefix(z),q.hasOwnProperty(j5)){let Q=RR.datasets,Y=q[j5],W=null;for(let[$,_]of Object.entries(Y))if(this._getNamespaceToUse($)===Q){W={xfa:_};break}W?q[j5]=W:delete q[j5]}let f=this._getNamespaceToUse(P),G=f?.[g0](Z,q)||new mJ;return G[j7]()&&this._nsAgnosticLevel++,(R||z||G[j7]())&&(G[a2]={hasNamespace:R,prefixes:z,nsAgnostic:G[j7]()}),G}isNsAgnostic(){return this._nsAgnosticLevel>0}_searchNamespace(P){let Z=this._namespaces.get(P);if(Z)return Z;for(let[q,{check:X}]of Object.entries(j8))if(X(P)){if(Z=RR[q],Z)return this._namespaces.set(P,Z),Z;break}return Z=new TZ(++this._nextNsId),this._namespaces.set(P,Z),Z}_addNamespacePrefix(P){for(let{prefix:Z,value:q}of P){let X=this._searchNamespace(q),z=this._namespacePrefixes.get(Z);z||(z=[],this._namespacePrefixes.set(Z,z)),z.push(X)}}_getNamespaceToUse(P){if(!P)return this._currentNamespace;let Z=this._namespacePrefixes.get(P);return Z?.length>0?Z.at(-1):(v(`Unknown namespace prefix: ${P}.`),null)}clean(P){let{hasNamespace:Z,prefixes:q,nsAgnostic:X}=P;Z&&(this._currentNamespace=this._namespaceStack.pop()),q&&q.forEach(({prefix:z})=>{this._namespacePrefixes.get(z).pop()}),X&&this._nsAgnosticLevel--}}class X2{constructor(P){try{this.root=new h3().parse(X2._createDocument(P));let Z=new PW(this.root);this.form=Z.bind(),this.dataHandler=new ZW(this.root,Z.getData()),this.form[e1].template=this.form}catch(Z){v(`XFA - an error occurred during parsing and binding: ${Z}`)}}isValid(){return!(!this.root||!this.form)}_createPagesHelper(){let P=this.form[XQ]();return new Promise((Z,q)=>{let X=()=>{try{let z=P.next();z.done?Z(z.value):setTimeout(X,0)}catch(z){q(z)}};setTimeout(X,0)})}async _createPages(){try{this.pages=await this._createPagesHelper(),this.dims=this.pages.children.map((P)=>{let{width:Z,height:q}=P.attributes.style;return[0,0,parseInt(Z),parseInt(q)]})}catch(P){v(`XFA - an error occurred during layout: ${P}`)}}getBoundingBox(P){return this.dims[P]}async getNumPages(){return this.pages||await this._createPages(),this.dims.length}setImages(P){this.form[e1].images=P}setFonts(P){this.form[e1].fontFinder=new zQ(P);let Z=[];for(let q of this.form[e1].usedTypefaces)q=WP(q),this.form[e1].fontFinder.find(q)||Z.push(q);return Z.length>0?Z:null}appendFonts(P,Z){this.form[e1].fontFinder.add(P,Z)}async getPages(){this.pages||await this._createPages();let P=this.pages;return this.pages=null,P}serializeData(P){return this.dataHandler.serialize(P)}static _createDocument(P){return P["/xdp:xdp"]?Object.values(P).join(""):P["xdp:xdp"]}static getRichTextAsHtml(P){if(!P||typeof P!="string")return null;try{let Z=new h3(b6,!0).parse(P);if(!["body","xhtml"].includes(Z[d1])){let R=b6.body({});R[Q8](Z),Z=R}let q=Z[x1]();if(!q.success)return null;let{html:X}=q,{attributes:z}=X;return z&&(z.class&&(z.class=z.class.filter((R)=>!R.startsWith("xfa"))),z.dir="auto"),{html:X,str:Z[A8]()}}catch(Z){v(`XFA - an error occurred during parsing of rich text: ${Z}`)}return null}}class P4{static createGlobals(P){return Promise.all([P.ensureCatalog("acroForm"),P.ensureDoc("xfaDatasets"),P.ensureCatalog("structTreeRoot"),P.ensureCatalog("baseUrl"),P.ensureCatalog("attachments"),P.ensureCatalog("globalColorSpaceCache")]).then(([Z,q,X,z,R,f])=>({pdfManager:P,acroForm:Z instanceof S?Z:S.empty,xfaDatasets:q,structTreeRoot:X,baseUrl:z,attachments:R,globalColorSpaceCache:f}),(Z)=>(v(`createGlobals: "${Z}".`),null))}static async create(P,Z,q,X,z,R,f,G){let Q=z?await this._getPageIndex(P,Z,q.pdfManager):null;return q.pdfManager.ensure(this,"_create",[P,Z,q,X,z,R,f,Q,G])}static _create(P,Z,q,X,z=!1,R=null,f=null,G=null,Q=null){let Y=P.fetchIfRef(Z);if(!(Y instanceof S))return;let W=Y.get("Subtype");if(W=W instanceof t?W.name:null,f&&!f.has(C8[W.toUpperCase()]))return null;let{acroForm:$,pdfManager:_}=q,J=Z instanceof f1?Z.toString():`annot_${X.createObjId()}`,U={xref:P,ref:Z,dict:Y,subtype:W,id:J,annotationGlobals:q,collectFields:z,orphanFields:R,needAppearances:!z&&$.get("NeedAppearances")===!0,pageIndex:G,evaluatorOptions:_.evaluatorOptions,pageRef:Q};switch(W){case"Link":return new uJ(U);case"Text":return new EJ(U);case"Widget":let K=N0({dict:Y,key:"FT"});switch(K=K instanceof t?K.name:null,K){case"Tx":return new yJ(U);case"Btn":return new DJ(U);case"Ch":return new wJ(U);case"Sig":return new iq(U)}return v(`Unimplemented widget field type "${K}", falling back to base field type.`),new E0(U);case"Popup":return new bP(U);case"FreeText":return new i2(U);case"Line":return new gJ(U);case"Square":return new dJ(U);case"Circle":return new cJ(U);case"PolyLine":return new tq(U);case"Polygon":return new eq(U);case"Caret":return new sJ(U);case"Ink":return new i5(U);case"Highlight":return new t2(U);case"Underline":return new hJ(U);case"Squiggly":return new rJ(U);case"StrikeOut":return new lJ(U);case"Stamp":return new _5(U);case"FileAttachment":return new oJ(U);default:return z||v(W?`Unimplemented annotation type "${W}", falling back to base annotation.`:"Annotation is missing the required /Subtype."),new p6(U)}}static async _getPageIndex(P,Z,q){try{let X=await P.fetchIfRefAsync(Z);if(!(X instanceof S))return-1;let z=X.getRaw("P");if(z instanceof f1)try{return await q.ensureCatalog("getPageIndex",[z])}catch(f){v1(`_getPageIndex -- not a valid page reference: "${f}".`)}if(X.has("Kids"))return-1;let R=await q.ensureDoc("numPages");for(let f=0;f<R;f++){let G=await q.getPage(f),Q=await q.ensure(G,"annotations");for(let Y of Q)if(Y instanceof f1&&V3(Y,Z))return f}}catch(X){v(`_getPageIndex: "${X}".`)}return-1}static generateImages(P,Z,q){if(!q)return v("generateImages: OffscreenCanvas is not supported, cannot save or print some annotations with images."),null;let X;for(let{bitmapId:z,bitmap:R}of P)R&&(X||=new Map,X.set(z,_5.createImage(R,Z)));return X}static async saveNewAnnotations(P,Z,q,X,z){let R=P.xref,f,G=[],{isOffscreenCanvasSupported:Q}=P.options;for(let Y of q)if(!Y.deleted)switch(Y.annotationType){case sX:if(!f){let $=new S(R);$.setIfName("BaseFont","Helvetica"),$.setIfName("Type","Font"),$.setIfName("Subtype","Type1"),$.setIfName("Encoding","WinAnsiEncoding"),f=R.getNewTemporaryRef(),z.put(f,{data:$})}G.push(i2.createNewAnnotation(R,Y,z,{evaluator:P,task:Z,baseFontRef:f}));break;case hX:Y.quadPoints?G.push(t2.createNewAnnotation(R,Y,z)):G.push(i5.createNewAnnotation(R,Y,z));break;case lX:G.push(i5.createNewAnnotation(R,Y,z));break;case rX:let W=Q?await X?.get(Y.bitmapId):null;if(W?.imageStream){let{imageStream:$,smaskStream:_}=W;if(_){let U=R.getNewTemporaryRef();z.put(U,{data:_}),$.dict.set("SMask",U)}let J=W.imageRef=R.getNewTemporaryRef();z.put(J,{data:$}),W.imageStream=W.smaskStream=null}G.push(_5.createNewAnnotation(R,Y,z,{image:W}));break;case oX:G.push(_5.createNewAnnotation(R,Y,z,{}))}return{annotations:(await Promise.all(G)).flat()}}static async printNewAnnotations(P,Z,q,X,z){if(!X)return null;let{options:R,xref:f}=Z,G=[];for(let Q of X)if(!Q.deleted)switch(Q.annotationType){case sX:G.push(i2.createNewPrintAnnotation(P,f,Q,{evaluator:Z,task:q,evaluatorOptions:R}));break;case hX:Q.quadPoints?G.push(t2.createNewPrintAnnotation(P,f,Q,{evaluatorOptions:R})):G.push(i5.createNewPrintAnnotation(P,f,Q,{evaluatorOptions:R}));break;case lX:G.push(i5.createNewPrintAnnotation(P,f,Q,{evaluatorOptions:R}));break;case rX:let Y=R.isOffscreenCanvasSupported?await z?.get(Q.bitmapId):null;if(Y?.imageStream){let{imageStream:W,smaskStream:$}=Y;$&&W.dict.set("SMask",$),Y.imageRef=new v6(W,W.length),Y.imageStream=Y.smaskStream=null}G.push(_5.createNewPrintAnnotation(P,f,Q,{image:Y,evaluatorOptions:R}));break;case oX:G.push(_5.createNewPrintAnnotation(P,f,Q,{evaluatorOptions:R}))}return Promise.all(G)}}function v5(P,Z=new Uint8ClampedArray(3)){if(!Array.isArray(P))return Z;let q=Z||new Uint8ClampedArray(3);switch(P.length){case 0:return null;case 1:return g1.gray.getRgbItem(P,0,q,0),q;case 3:return g1.rgb.getRgbItem(P,0,q,0),q;case 4:return g1.cmyk.getRgbItem(P,0,q,0),q;default:return Z}}function g8(P,Z=null){return P&&Array.from(P,(q)=>q/255)||Z}function z2(P,Z){let q=P.getArray("QuadPoints");if(!e8(q,null)||q.length===0||q.length%8>0)return null;let X=new Float32Array(q.length);for(let z=0,R=q.length;z<R;z+=8){let[f,G,Q,Y,W,$,_,J]=q.slice(z,z+8),U=Math.min(f,Q,W,_),K=Math.max(f,Q,W,_),I=Math.min(G,Y,$,J),B=Math.max(G,Y,$,J);if(Z!==null&&(U<Z[0]||K>Z[2]||I<Z[1]||B>Z[3]))return null;X.set([U,B,K,B,U,I,K,I],z)}return X}function NZ(P,Z,q){let X=new Float32Array([1/0,1/0,-1/0,-1/0]);s1.axialAlignedBoundingBox(Z,q,X);let[z,R,f,G]=X;if(z===f||R===G)return[1,0,0,1,P[0],P[1]];let Q=(P[2]-P[0])/(f-z),Y=(P[3]-P[1])/(G-R);return[Q,0,0,Y,P[0]-z*Q,P[1]-R*Y]}class p6{constructor(P){let{dict:Z,xref:q,annotationGlobals:X,ref:z,orphanFields:R}=P,f=R?.get(z);f&&Z.set("Parent",f),this.setTitle(Z.get("T")),this.setContents(Z.get("Contents")),this.setModificationDate(Z.get("M")),this.setFlags(Z.get("F")),this.setRectangle(Z.getArray("Rect")),this.setColor(Z.getArray("C")),this.setBorderStyle(Z),this.setAppearance(Z),this.setOptionalContent(Z);let G=Z.get("MK");this.setBorderAndBackgroundColors(G),this.setRotation(G,Z),this.ref=P.ref instanceof f1?P.ref:null,this._streams=[],this.appearance&&this._streams.push(this.appearance);let Q=!!(this.flags&_B),Y=!!(this.flags&JB);if(this.data={annotationFlags:this.flags,borderStyle:this.borderStyle,color:this.color,backgroundColor:this.backgroundColor,borderColor:this.borderColor,rotation:this.rotation,contentsObj:this._contents,hasAppearance:!!this.appearance,id:P.id,modificationDate:this.modificationDate,rect:this.rectangle,subtype:P.subtype,hasOwnCanvas:!1,noRotate:!!(this.flags&$B),noHTML:Q&&Y,isEditable:!1,structParent:-1},X.structTreeRoot){let $=Z.get("StructParent");this.data.structParent=$=Number.isInteger($)&&$>=0?$:-1,X.structTreeRoot.addAnnotationIdToPage(P.pageRef,$)}if(P.collectFields){let $=Z.get("Kids");if(Array.isArray($)){let _=[];for(let J of $)J instanceof f1&&_.push(J.toString());_.length!==0&&(this.data.kidIds=_)}this.data.actions=qP(q,Z,oR),this.data.fieldName=this._constructFieldName(Z),this.data.pageIndex=P.pageIndex}let W=Z.get("IT");W instanceof t&&(this.data.it=W.name),this._isOffscreenCanvasSupported=P.evaluatorOptions.isOffscreenCanvasSupported,this._fallbackFontDict=null,this._needAppearances=!1}_hasFlag(P,Z){return!!(P&Z)}_buildFlags(P,Z){let{flags:q}=this;if(P===void 0){if(Z===void 0)return;return Z?-5&q:-3&q|K2}return P?(q|=K2,Z?-33&q|W7:-3&q|X3):(q&=-35,Z?-5&q:q|K2)}_isViewable(P){return!this._hasFlag(P,U2)&&!this._hasFlag(P,X3)}_isPrintable(P){return this._hasFlag(P,K2)&&!this._hasFlag(P,W7)&&!this._hasFlag(P,U2)}mustBeViewed(P,Z){let q=P?.get(this.data.id)?.noView;return q!==void 0?!q:this.viewable&&!this._hasFlag(this.flags,W7)}mustBePrinted(P){let Z=P?.get(this.data.id)?.noPrint;return Z!==void 0?!Z:this.printable}mustBeViewedWhenEditing(P,Z=null){return P?!this.data.isEditable:!Z?.has(this.data.id)}get viewable(){return this.data.quadPoints!==null&&(this.flags===0||this._isViewable(this.flags))}get printable(){return this.data.quadPoints!==null&&(this.flags!==0&&this._isPrintable(this.flags))}_parseStringHelper(P){let Z=typeof P=="string"?E1(P):"";return{str:Z,dir:Z&&sG(Z).dir==="rtl"?"rtl":"ltr"}}setDefaultAppearance(P){let{dict:Z,annotationGlobals:q}=P,X=N0({dict:Z,key:"DA"})||q.acroForm.get("DA");this._defaultAppearance=typeof X=="string"?X:"",this.data.defaultAppearanceData=Mq(this._defaultAppearance)}setTitle(P){this._title=this._parseStringHelper(P)}setContents(P){this._contents=this._parseStringHelper(P)}setModificationDate(P){this.modificationDate=typeof P=="string"?P:null}setFlags(P){this.flags=Number.isInteger(P)&&P>0?P:0,this.flags&U2&&this.constructor.name!=="Annotation"&&(this.flags^=U2)}hasFlag(P){return this._hasFlag(this.flags,P)}setRectangle(P){this.rectangle=k4(P,[0,0,0,0])}setColor(P){this.color=v5(P)}setLineEndings(P){if(this.lineEndings=["None","None"],Array.isArray(P)&&P.length===2)for(let Z=0;Z<2;Z++){let q=P[Z];if(q instanceof t)switch(q.name){case"None":continue;case"Square":case"Circle":case"Diamond":case"OpenArrow":case"ClosedArrow":case"Butt":case"ROpenArrow":case"RClosedArrow":case"Slash":this.lineEndings[Z]=q.name;continue}v(`Ignoring invalid lineEnding: ${q}`)}}setRotation(P,Z){this.rotation=0;let q=P instanceof S?P.get("R")||0:Z.get("Rotate")||0;Number.isInteger(q)&&q!==0&&(q%=360,q<0&&(q+=360),q%90==0&&(this.rotation=q))}setBorderAndBackgroundColors(P){P instanceof S?(this.borderColor=v5(P.getArray("BC"),null),this.backgroundColor=v5(P.getArray("BG"),null)):this.borderColor=this.backgroundColor=null}setBorderStyle(P){if(this.borderStyle=new OJ,P instanceof S)if(P.has("BS")){let Z=P.get("BS");if(Z instanceof S){let q=Z.get("Type");q&&!G8(q,"Border")||(this.borderStyle.setWidth(Z.get("W"),this.rectangle),this.borderStyle.setStyle(Z.get("S")),this.borderStyle.setDashArray(Z.getArray("D")))}}else if(P.has("Border")){let Z=P.getArray("Border");Array.isArray(Z)&&Z.length>=3&&(this.borderStyle.setHorizontalCornerRadius(Z[0]),this.borderStyle.setVerticalCornerRadius(Z[1]),this.borderStyle.setWidth(Z[2],this.rectangle),Z.length===4&&this.borderStyle.setDashArray(Z[3],!0))}else this.borderStyle.setWidth(0)}setAppearance(P){this.appearance=null;let Z=P.get("AP");if(!(Z instanceof S))return;let q=Z.get("N");if(q instanceof T1)return void(this.appearance=q);if(!(q instanceof S))return;let X=P.get("AS");if(!(X instanceof t&&q.has(X.name)))return;let z=q.get(X.name);z instanceof T1&&(this.appearance=z)}setOptionalContent(P){this.oc=null;let Z=P.get("OC");Z instanceof t?v("setOptionalContent: Support for /Name-entry is not implemented."):Z instanceof S&&(this.oc=Z)}async loadResources(P,Z){let q=await Z.dict.getAsync("Resources");return q&&await M6.load(q,P,q.xref),q}async getOperatorList(P,Z,q,X){let{hasOwnCanvas:z,id:R,rect:f}=this.data,G=this.appearance,Q=!!(z&&q&Z3);if(Q&&(this.width===0||this.height===0))return this.data.hasOwnCanvas=!1,{opList:new p8,separateForm:!1,separateCanvas:!1};if(!G){if(!Q)return{opList:new p8,separateForm:!1,separateCanvas:!1};G=new o8(""),G.dict=new S}let Y=G.dict,W=await this.loadResources(g9,G),$=c9(Y.getArray("BBox"),[0,0,1,1]),_=g4(Y.getArray("Matrix"),w0),J=NZ(f,$,_),U=new p8,K;return this.oc&&(K=await P.parseMarkedContentProps(this.oc,null)),K!==void 0&&U.addOp(i0,["OC",K]),U.addOp(Uf,[R,f,J,_,Q]),await P.getOperatorList({stream:G,task:Z,resources:W,operatorList:U,fallbackFontDict:this._fallbackFontDict}),U.addOp(Kf,[]),K!==void 0&&U.addOp(B6,[]),this.reset(),{opList:U,separateForm:!1,separateCanvas:Q}}async save(P,Z,q,X){return null}get overlaysTextContent(){return!1}get hasTextContent(){return!1}async extractTextContent(P,Z,q){if(!this.appearance)return;let X=await this.loadResources(d9,this.appearance),z=[],R=[],f=null,G={desiredSize:Math.Infinity,ready:!0,enqueue(Q,Y){for(let W of Q.items)W.str!==void 0&&(f||=W.transform.slice(-2),R.push(W.str),W.hasEOL&&(z.push(R.join("").trimEnd()),R.length=0))}};if(await P.getTextContent({stream:this.appearance,task:Z,resources:X,includeMarkedContent:!0,keepWhiteSpace:!0,sink:G,viewBox:q}),this.reset(),R.length&&z.push(R.join("").trimEnd()),z.length>1||z[0]){let Q=this.appearance.dict,Y=c9(Q.getArray("BBox"),null),W=g4(Q.getArray("Matrix"),null);this.data.textPosition=this._transformPoint(f,Y,W),this.data.textContent=z}}_transformPoint(P,Z,q){let{rect:X}=this.data;Z||=[0,0,1,1],q||=[1,0,0,1,0,0];let z=NZ(X,Z,q);z[4]-=X[0],z[5]-=X[1];let R=P.slice();return s1.applyTransform(R,z),s1.applyTransform(R,q),R}getFieldObject(){return this.data.kidIds?{id:this.data.id,actions:this.data.actions,name:this.data.fieldName,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,type:"",kidIds:this.data.kidIds,page:this.data.pageIndex,rotation:this.rotation}:null}reset(){for(let P of this._streams)P.reset()}_constructFieldName(P){if(!P.has("T")&&!P.has("Parent"))return v("Unknown field name, falling back to empty field name."),"";if(!P.has("Parent"))return E1(P.get("T"));let Z=[];P.has("T")&&Z.unshift(E1(P.get("T")));let q=P,X=new J8;for(P.objId&&X.put(P.objId);q.has("Parent")&&(q=q.get("Parent"),q instanceof S&&(!q.objId||!X.has(q.objId)));)q.objId&&X.put(q.objId),q.has("T")&&Z.unshift(E1(q.get("T")));return Z.join(".")}get width(){return this.data.rect[2]-this.data.rect[0]}get height(){return this.data.rect[3]-this.data.rect[1]}}class OJ{constructor(){this.width=1,this.rawWidth=1,this.style=nX,this.dashArray=[3],this.horizontalCornerRadius=0,this.verticalCornerRadius=0}setWidth(P,Z=[0,0,0,0]){if(P instanceof t)this.width=0;else if(typeof P=="number"){if(P>0){this.rawWidth=P;let q=(Z[2]-Z[0])/2,X=(Z[3]-Z[1])/2;q>0&&X>0&&(P>q||P>X)&&(v(`AnnotationBorderStyle.setWidth - ignoring width: ${P}`),P=1)}this.width=P}}setStyle(P){if(P instanceof t)switch(P.name){case"S":this.style=nX;break;case"D":this.style=bB;break;case"B":this.style=kB;break;case"I":this.style=CB;break;case"U":this.style=TB}}setDashArray(P,Z=!1){if(Array.isArray(P)){let q=!0,X=!0;for(let z of P){if(!(+z>=0)){q=!1;break}z>0&&(X=!1)}P.length===0||q&&!X?(this.dashArray=P,Z&&this.setStyle(t.get("D"))):this.width=0}else P&&(this.width=0)}setHorizontalCornerRadius(P){Number.isInteger(P)&&(this.horizontalCornerRadius=P)}setVerticalCornerRadius(P){Number.isInteger(P)&&(this.verticalCornerRadius=P)}}function w4(P,Z,q){let X=1732584193,z=-271733879,R=-1732584194,f=271733878,G=q+72&-64,Q=new Uint8Array(G),Y,W;for(Y=0;Y<q;++Y)Q[Y]=P[Z++];Q[Y++]=128;let $=G-8;Y<$&&(Y=$),Q[Y++]=q<<3&255,Q[Y++]=q>>5&255,Q[Y++]=q>>13&255,Q[Y++]=q>>21&255,Q[Y++]=q>>>29&255,Y+=3;let _=new Int32Array(16),{k:J,r:U}=wV;for(Y=0;Y<G;){for(W=0;W<16;++W,Y+=4)_[W]=Q[Y]|Q[Y+1]<<8|Q[Y+2]<<16|Q[Y+3]<<24;let K,I,B=X,j=z,V=R,H=f;for(W=0;W<64;++W){W<16?(K=j&V|~j&H,I=W):W<32?(K=H&j|~H&V,I=5*W+1&15):W<48?(K=j^V^H,I=3*W+5&15):(K=V^(j|~H),I=7*W&15);let M=H,x=B+K+J[W]+_[I]|0,A=U[W];H=V,V=j,j=j+(x<<A|x>>>32-A)|0,B=M}X=X+B|0,z=z+j|0,R=R+V|0,f=f+H|0}return new Uint8Array([255&X,X>>8&255,X>>16&255,X>>>24&255,255&z,z>>8&255,z>>16&255,z>>>24&255,255&R,R>>8&255,R>>16&255,R>>>24&255,255&f,f>>8&255,f>>16&255,f>>>24&255])}function fR(P){try{return k7(P)}catch(Z){return v(`UTF-8 decoding failed: "${Z}".`),P}}class nJ{constructor(P){if(P.datasets)this.node=new P2({hasAttributes:!0}).parseFromString(P.datasets).documentElement;else{let Z=new aJ({hasAttributes:!0});try{Z.parseFromString(P["xdp:xdp"])}catch{}this.node=Z.node}}getValue(P){if(!this.node||!P)return"";let Z=this.node.searchNode(Af(P),0);if(!Z)return"";return Z.firstChild?.nodeName==="value"?Z.children.map((X)=>fR(X.textContent)):fR(Z.textContent)}}class iJ{#P;#Z=1/0;#X=1/0;#q=-1/0;#z=-1/0;#R=null;#G=[];#f=[];#Q=-1;#Y=!1;constructor(P){this.#P=P;let Z=P.data.quadPoints;if(Z){for(let q=0,X=Z.length;q<X;q+=8)this.#Z=Math.min(this.#Z,Z[q]),this.#q=Math.max(this.#q,Z[q+2]),this.#X=Math.min(this.#X,Z[q+5]),this.#z=Math.max(this.#z,Z[q+1]);Z.length>8&&(this.#R=Z)}else[this.#Z,this.#X,this.#q,this.#z]=P.data.rect}overlaps(P){return!(this.#Z>=P.#q||this.#q<=P.#Z||this.#X>=P.#z||this.#z<=P.#X)}#_(P,Z){if(this.#Z>=P||this.#q<=P||this.#X>=Z||this.#z<=Z)return!1;let q=this.#R;if(!q)return!0;if(this.#Q>=0){let X=this.#Q;if(!(q[X]>=P||q[X+2]<=P||q[X+5]>=Z||q[X+1]<=Z))return!0;this.#Q=-1}for(let X=0,z=q.length;X<z;X+=8)if(!(q[X]>=P||q[X+2]<=P||q[X+5]>=Z||q[X+1]<=Z))return this.#Q=X,!0;return!1}addGlyph(P,Z,q){return this.#_(P,Z)?(this.#f.length>0&&(this.#G.push(this.#f.join("")),this.#f.length=0),this.#G.push(q),this.#Y=!0,!0):(this.disableExtraChars(),!1)}addExtraChar(P){this.#Y&&this.#f.push(P)}disableExtraChars(){this.#Y&&(this.#Y=!1,this.#f.length=0)}setText(){this.#P.data.overlaidText=this.#G.join("")}}class tJ{#P=new Map;constructor(P){for(let Z of P){if(!Z.data.quadPoints&&!Z.data.rect)continue;let q=new iJ(Z);for(let[X,z]of this.#P)X.overlaps(q)&&(z?z.add(q):this.#P.set(X,new Set([q])));this.#P.set(q,null)}}addGlyph(P,Z,q,X){let z=P[4]+Z/2,R=P[5]+q/2,f;for(let[G,Q]of this.#P)f?f.has(G)?G.addGlyph(z,R,X):G.disableExtraChars():G.addGlyph(z,R,X)&&(f=Q)}addExtraChar(P){for(let Z of this.#P.keys())Z.addExtraChar(P)}setText(){for(let P of this.#P.keys())P.setText()}}class R1{constructor(P,Z){this.high=0|P,this.low=0|Z}and(P){this.high&=P.high,this.low&=P.low}xor(P){this.high^=P.high,this.low^=P.low}shiftRight(P){P>=32?(this.low=this.high>>>P-32|0,this.high=0):(this.low=this.low>>>P|this.high<<32-P,this.high=this.high>>>P|0)}rotateRight(P){let Z,q;32&P?(q=this.low,Z=this.high):(Z=this.low,q=this.high),P&=31,this.low=Z>>>P|q<<32-P,this.high=q>>>P|Z<<32-P}not(){this.high=~this.high,this.low=~this.low}add(P){let Z=(this.low>>>0)+(P.low>>>0),q=(this.high>>>0)+(P.high>>>0);Z>4294967295&&(q+=1),this.low=0|Z,this.high=0|q}copyTo(P,Z){P[Z]=this.high>>>24&255,P[Z+1]=this.high>>16&255,P[Z+2]=this.high>>8&255,P[Z+3]=255&this.high,P[Z+4]=this.low>>>24&255,P[Z+5]=this.low>>16&255,P[Z+6]=this.low>>8&255,P[Z+7]=255&this.low}assign(P){this.high=P.high,this.low=P.low}}function uV(P,Z,q,X,z){P.assign(Z),P.and(q),z.assign(Z),z.not(),z.and(X),P.xor(z)}function gV(P,Z,q,X,z){P.assign(Z),P.and(q),z.assign(Z),z.and(X),P.xor(z),z.assign(q),z.and(X),P.xor(z)}function dV(P,Z,q){P.assign(Z),P.rotateRight(28),q.assign(Z),q.rotateRight(34),P.xor(q),q.assign(Z),q.rotateRight(39),P.xor(q)}function cV(P,Z,q){P.assign(Z),P.rotateRight(14),q.assign(Z),q.rotateRight(18),P.xor(q),q.assign(Z),q.rotateRight(41),P.xor(q)}function sV(P,Z,q){P.assign(Z),P.rotateRight(1),q.assign(Z),q.rotateRight(8),P.xor(q),q.assign(Z),q.shiftRight(7),P.xor(q)}function hV(P,Z,q){P.assign(Z),P.rotateRight(19),q.assign(Z),q.rotateRight(61),P.xor(q),q.assign(Z),q.shiftRight(6),P.xor(q)}function eJ(P,Z,q,X=!1){let z,R,f,G,Q,Y,W,$;X?(z=new R1(3418070365,3238371032),R=new R1(1654270250,914150663),f=new R1(2438529370,812702999),G=new R1(355462360,4144912697),Q=new R1(1731405415,4290775857),Y=new R1(2394180231,1750603025),W=new R1(3675008525,1694076839),$=new R1(1203062813,3204075428)):(z=new R1(1779033703,4089235720),R=new R1(3144134277,2227873595),f=new R1(1013904242,4271175723),G=new R1(2773480762,1595750129),Q=new R1(1359893119,2917565137),Y=new R1(2600822924,725511199),W=new R1(528734635,4215389547),$=new R1(1541459225,327033209));let _=128*Math.ceil((q+17)/128),J=new Uint8Array(_),U,K;for(U=0;U<q;++U)J[U]=P[Z++];J[U++]=128;let I=_-16;U<I&&(U=I),U+=11,J[U++]=q>>>29&255,J[U++]=q>>21&255,J[U++]=q>>13&255,J[U++]=q>>5&255,J[U++]=q<<3&255;let B=Array(80);for(U=0;U<80;U++)B[U]=new R1(0,0);let{k:j}=EV,V=new R1(0,0),H=new R1(0,0),M=new R1(0,0),x=new R1(0,0),A=new R1(0,0),k=new R1(0,0),b=new R1(0,0),O=new R1(0,0),p=new R1(0,0),D=new R1(0,0),n=new R1(0,0),F=new R1(0,0),l,C;for(U=0;U<_;){for(K=0;K<16;++K)B[K].high=J[U]<<24|J[U+1]<<16|J[U+2]<<8|J[U+3],B[K].low=J[U+4]<<24|J[U+5]<<16|J[U+6]<<8|J[U+7],U+=8;for(K=16;K<80;++K)l=B[K],hV(l,B[K-2],F),l.add(B[K-7]),sV(n,B[K-15],F),l.add(n),l.add(B[K-16]);for(V.assign(z),H.assign(R),M.assign(f),x.assign(G),A.assign(Q),k.assign(Y),b.assign(W),O.assign($),K=0;K<80;++K)p.assign(O),cV(n,A,F),p.add(n),uV(n,A,k,b,F),p.add(n),p.add(j[K]),p.add(B[K]),dV(D,V,F),gV(n,V,H,M,F),D.add(n),l=O,O=b,b=k,k=A,x.add(p),A=x,x=M,M=H,H=V,l.assign(p),l.add(D),V=l;z.add(V),R.add(H),f.add(M),G.add(x),Q.add(A),Y.add(k),W.add(b),$.add(O)}return X?(C=new Uint8Array(48),z.copyTo(C,0),R.copyTo(C,8),f.copyTo(C,16),G.copyTo(C,24),Q.copyTo(C,32),Y.copyTo(C,40)):(C=new Uint8Array(64),z.copyTo(C,0),R.copyTo(C,8),f.copyTo(C,16),G.copyTo(C,24),Q.copyTo(C,32),Y.copyTo(C,40),W.copyTo(C,48),$.copyTo(C,56)),C}function rV(P,Z,q){return eJ(P,Z,q,!0)}function z4(P,Z){return P>>>Z|P<<32-Z}function oV(P,Z,q){return P&Z^~P&q}function aV(P,Z,q){return P&Z^P&q^Z&q}function nV(P){return z4(P,2)^z4(P,13)^z4(P,22)}function iV(P){return z4(P,6)^z4(P,11)^z4(P,25)}function tV(P){return z4(P,7)^z4(P,18)^P>>>3}function eV(P){return z4(P,17)^z4(P,19)^P>>>10}function vZ(P,Z,q){let X=1779033703,z=3144134277,R=1013904242,f=2773480762,G=1359893119,Q=2600822924,Y=528734635,W=1541459225,$=64*Math.ceil((q+9)/64),_=new Uint8Array($),J,U;for(J=0;J<q;++J)_[J]=P[Z++];_[J++]=128;let K=$-8;J<K&&(J=K),J+=3,_[J++]=q>>>29&255,_[J++]=q>>21&255,_[J++]=q>>13&255,_[J++]=q>>5&255,_[J++]=q<<3&255;let I=new Uint32Array(64),{k:B}=lV;for(J=0;J<$;){for(U=0;U<16;++U)I[U]=_[J]<<24|_[J+1]<<16|_[J+2]<<8|_[J+3],J+=4;for(U=16;U<64;++U)I[U]=eV(I[U-2])+I[U-7]+tV(I[U-15])+I[U-16]|0;let j,V,H=X,M=z,x=R,A=f,k=G,b=Q,O=Y,p=W;for(U=0;U<64;++U)j=p+iV(k)+oV(k,b,O)+B[U]+I[U],V=nV(H)+aV(H,M,x),p=O,O=b,b=k,k=A+j|0,A=x,x=M,M=H,H=j+V|0;X=X+H|0,z=z+M|0,R=R+x|0,f=f+A|0,G=G+k|0,Q=Q+b|0,Y=Y+O|0,W=W+p|0}return new Uint8Array([X>>24&255,X>>16&255,X>>8&255,255&X,z>>24&255,z>>16&255,z>>8&255,255&z,R>>24&255,R>>16&255,R>>8&255,255&R,f>>24&255,f>>16&255,f>>8&255,255&f,G>>24&255,G>>16&255,G>>8&255,255&G,Q>>24&255,Q>>16&255,Q>>8&255,255&Q,Y>>24&255,Y>>16&255,Y>>8&255,255&Y,W>>24&255,W>>16&255,W>>8&255,255&W])}class p4{constructor(P){this.a=0,this.b=0;let Z=new Uint8Array(256),q=P.length;for(let X=0;X<256;++X)Z[X]=X;for(let X=0,z=0;X<256;++X){let R=Z[X];z=z+R+P[X%q]&255,Z[X]=Z[z],Z[z]=R}this.s=Z}encryptBlock(P){let Z=this.a,q=this.b,X=this.s,z=P.length,R=new Uint8Array(z);for(let f=0;f<z;++f){Z=Z+1&255;let G=X[Z];q=q+G&255;let Q=X[q];X[Z]=Q,X[q]=G,R[f]=P[f]^X[G+Q&255]}return this.a=Z,this.b=q,R}decryptBlock(P){return this.encryptBlock(P)}encrypt(P){return this.encryptBlock(P)}}class ZU{decryptBlock(P){return P}encrypt(P){return P}}class kP{_s=new Uint8Array([99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22]);_inv_s=new Uint8Array([82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125]);_mix=new Uint32Array([0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795]);_mixCol=new Uint8Array(256).map((P,Z)=>Z<128?Z<<1:Z<<1^27);constructor(){this.buffer=new Uint8Array(16),this.bufferPosition=0}_expandKey(P){O1("Cannot call `_expandKey` on the base class")}_decrypt(P,Z){let q,X,z,R=new Uint8Array(16);R.set(P);for(let f=0,G=this._keySize;f<16;++f,++G)R[f]^=Z[G];for(let f=this._cyclesOfRepetition-1;f>=1;--f){q=R[13],R[13]=R[9],R[9]=R[5],R[5]=R[1],R[1]=q,q=R[14],X=R[10],R[14]=R[6],R[10]=R[2],R[6]=q,R[2]=X,q=R[15],X=R[11],z=R[7],R[15]=R[3],R[11]=q,R[7]=X,R[3]=z;for(let G=0;G<16;++G)R[G]=this._inv_s[R[G]];for(let G=0,Q=16*f;G<16;++G,++Q)R[G]^=Z[Q];for(let G=0;G<16;G+=4){let Q=this._mix[R[G]],Y=this._mix[R[G+1]],W=this._mix[R[G+2]],$=this._mix[R[G+3]];q=Q^Y>>>8^Y<<24^W>>>16^W<<16^$>>>24^$<<8,R[G]=q>>>24&255,R[G+1]=q>>16&255,R[G+2]=q>>8&255,R[G+3]=255&q}}q=R[13],R[13]=R[9],R[9]=R[5],R[5]=R[1],R[1]=q,q=R[14],X=R[10],R[14]=R[6],R[10]=R[2],R[6]=q,R[2]=X,q=R[15],X=R[11],z=R[7],R[15]=R[3],R[11]=q,R[7]=X,R[3]=z;for(let f=0;f<16;++f)R[f]=this._inv_s[R[f]],R[f]^=Z[f];return R}_encrypt(P,Z){let q=this._s,X,z,R,f=new Uint8Array(16);f.set(P);for(let G=0;G<16;++G)f[G]^=Z[G];for(let G=1;G<this._cyclesOfRepetition;G++){for(let Q=0;Q<16;++Q)f[Q]=q[f[Q]];R=f[1],f[1]=f[5],f[5]=f[9],f[9]=f[13],f[13]=R,R=f[2],z=f[6],f[2]=f[10],f[6]=f[14],f[10]=R,f[14]=z,R=f[3],z=f[7],X=f[11],f[3]=f[15],f[7]=R,f[11]=z,f[15]=X;for(let Q=0;Q<16;Q+=4){let Y=f[Q],W=f[Q+1],$=f[Q+2],_=f[Q+3];X=Y^W^$^_,f[Q]^=X^this._mixCol[Y^W],f[Q+1]^=X^this._mixCol[W^$],f[Q+2]^=X^this._mixCol[$^_],f[Q+3]^=X^this._mixCol[_^Y]}for(let Q=0,Y=16*G;Q<16;++Q,++Y)f[Q]^=Z[Y]}for(let G=0;G<16;++G)f[G]=q[f[G]];R=f[1],f[1]=f[5],f[5]=f[9],f[9]=f[13],f[13]=R,R=f[2],z=f[6],f[2]=f[10],f[6]=f[14],f[10]=R,f[14]=z,R=f[3],z=f[7],X=f[11],f[3]=f[15],f[7]=R,f[11]=z,f[15]=X;for(let G=0,Q=this._keySize;G<16;++G,++Q)f[G]^=Z[Q];return f}_decryptBlock2(P,Z){let q=P.length,X=this.buffer,z=this.bufferPosition,R=[],f=this.iv;for(let Y=0;Y<q;++Y){if(X[z]=P[Y],++z,z<16)continue;let W=this._decrypt(X,this._key);for(let $=0;$<16;++$)W[$]^=f[$];f=X,R.push(W),X=new Uint8Array(16),z=0}if(this.buffer=X,this.bufferLength=z,this.iv=f,R.length===0)return new Uint8Array(0);let G=16*R.length;if(Z){let Y=R.at(-1),W=Y[15];if(W<=16){for(let $=15,_=16-W;$>=_;--$)if(Y[$]!==W){W=0;break}G-=W,R[R.length-1]=Y.subarray(0,16-W)}}let Q=new Uint8Array(G);for(let Y=0,W=0,$=R.length;Y<$;++Y,W+=16)Q.set(R[Y],W);return Q}decryptBlock(P,Z,q=null){let X=P.length,z=this.buffer,R=this.bufferPosition;if(q)this.iv=q;else{for(let f=0;R<16&&f<X;++f,++R)z[R]=P[f];if(R<16)return this.bufferLength=R,new Uint8Array(0);this.iv=z,P=P.subarray(16)}return this.buffer=new Uint8Array(16),this.bufferLength=0,this.decryptBlock=this._decryptBlock2,this.decryptBlock(P,Z)}encrypt(P,Z){let q=P.length,X=this.buffer,z=this.bufferPosition,R=[];Z||=new Uint8Array(16);for(let Q=0;Q<q;++Q){if(X[z]=P[Q],++z,z<16)continue;for(let W=0;W<16;++W)X[W]^=Z[W];let Y=this._encrypt(X,this._key);Z=Y,R.push(Y),X=new Uint8Array(16),z=0}if(this.buffer=X,this.bufferLength=z,this.iv=Z,R.length===0)return new Uint8Array(0);let f=16*R.length,G=new Uint8Array(f);for(let Q=0,Y=0,W=R.length;Q<W;++Q,Y+=16)G.set(R[Q],Y);return G}}class ZX{_hash(P,Z,q){O1("Abstract method `_hash` called")}checkOwnerPassword(P,Z,q,X){let z=new Uint8Array(P.length+56);return z.set(P,0),z.set(Z,P.length),z.set(q,P.length+Z.length),C7(this._hash(P,z,q),X)}checkUserPassword(P,Z,q){let X=new Uint8Array(P.length+8);return X.set(P,0),X.set(Z,P.length),C7(this._hash(P,X,[]),q)}getOwnerKey(P,Z,q,X){let z=new Uint8Array(P.length+56);z.set(P,0),z.set(Z,P.length),z.set(q,P.length+Z.length);let R=this._hash(P,z,q);return new r3(R).decryptBlock(X,!1,new Uint8Array(16))}getUserKey(P,Z,q){let X=new Uint8Array(P.length+8);X.set(P,0),X.set(Z,P.length);let z=this._hash(P,X,[]);return new r3(z).decryptBlock(q,!1,new Uint8Array(16))}}class FZ{constructor(P,Z){this.StringCipherConstructor=P,this.StreamCipherConstructor=Z}createStream(P,Z){let q=new this.StreamCipherConstructor;return new PU(P,Z,function(X,z){return q.decryptBlock(X,z)})}decryptString(P){let Z=new this.StringCipherConstructor,q=w8(P);return q=Z.decryptBlock(q,!0),W0(q)}encryptString(P){let Z=new this.StringCipherConstructor;if(Z instanceof kP){let X=16-P.length%16;P+=String.fromCharCode(X).repeat(X);let z=new Uint8Array(16);crypto.getRandomValues(z);let R=w8(P);R=Z.encrypt(R,z);let f=new Uint8Array(16+R.length);return f.set(z),f.set(R,16),W0(f)}let q=w8(P);return q=Z.encrypt(q),W0(q)}}class R6{static get _defaultPasswordBytes(){return q1(this,"_defaultPasswordBytes",new Uint8Array([40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122]))}#P(P,Z,q,X,z,R,f,G,Q,Y,W,$){if(Z){let J=Math.min(127,Z.length);Z=Z.subarray(0,J)}else Z=[];let _=P===6?new XU:new qU;return _.checkUserPassword(Z,G,f)?_.getUserKey(Z,Q,W):Z.length&&_.checkOwnerPassword(Z,X,R,q)?_.getOwnerKey(Z,z,R,Y):null}#Z(P,Z,q,X,z,R,f,G){let Q=40+q.length+P.length,Y=new Uint8Array(Q),W,$,_=0;if(Z)for($=Math.min(32,Z.length);_<$;++_)Y[_]=Z[_];for(W=0;_<32;)Y[_++]=R6._defaultPasswordBytes[W++];Y.set(q,_),_+=q.length,Y[_++]=255&z,Y[_++]=z>>8&255,Y[_++]=z>>16&255,Y[_++]=z>>>24&255,Y.set(P,_),_+=P.length,R>=4&&!G&&(Y.fill(255,_,_+4),_+=4);let J=w4(Y,0,_),U=f>>3;if(R>=3)for(W=0;W<50;++W)J=w4(J,0,U);let K=J.subarray(0,U),I,B;if(R>=3){_=0,Y.set(R6._defaultPasswordBytes,_),_+=32,Y.set(P,_),_+=P.length,I=new p4(K),B=I.encryptBlock(w4(Y,0,_)),$=K.length;let j=new Uint8Array($);for(W=1;W<=19;++W){for(let V=0;V<$;++V)j[V]=K[V]^W;I=new p4(j),B=I.encryptBlock(B)}}else I=new p4(K),B=I.encryptBlock(R6._defaultPasswordBytes);return B.every((j,V)=>X[V]===j)?K:null}#X(P,Z,q,X){let z=new Uint8Array(32),R=0,f=Math.min(32,P.length);for(;R<f;++R)z[R]=P[R];let G=0;for(;R<32;)z[R++]=R6._defaultPasswordBytes[G++];let Q=w4(z,0,R),Y=X>>3;if(q>=3)for(G=0;G<50;++G)Q=w4(Q,0,Q.length);let W,$;if(q>=3){$=Z;let _=new Uint8Array(Y);for(G=19;G>=0;G--){for(let J=0;J<Y;++J)_[J]=Q[J]^G;W=new p4(_),$=W.encryptBlock($)}}else W=new p4(Q.subarray(0,Y)),$=W.encryptBlock(Z);return $}#q(P,Z,q,X=!1){let z=q.length,R=new Uint8Array(z+9);R.set(q);let f=z;return R[f++]=255&P,R[f++]=P>>8&255,R[f++]=P>>16&255,R[f++]=255&Z,R[f++]=Z>>8&255,X&&(R[f++]=115,R[f++]=65,R[f++]=108,R[f++]=84),w4(R,0,f).subarray(0,Math.min(z+5,16))}#z(P,Z,q,X,z){if(!(Z instanceof t))throw new s("Invalid crypt filter name.");let R=this,f=P.get(Z.name),G=f?.get("CFM");if(!G||G.name==="None")return function(){return new ZU};if(G.name==="V2")return function(){return new p4(R.#q(q,X,z,!1))};if(G.name==="AESV2")return function(){return new PX(R.#q(q,X,z,!0))};if(G.name==="AESV3")return function(){return new r3(z)};throw new s("Unknown crypto method")}constructor(P,Z,q){let X=P.get("Filter");if(!G8(X,"Standard"))throw new s("unknown encryption method");this.filterName=X.name,this.dict=P;let z=P.get("V");if(!Number.isInteger(z)||z!==1&&z!==2&&z!==4&&z!==5)throw new s("unsupported encryption algorithm");this.algorithm=z;let R=P.get("Length");if(!R)if(z<=3)R=40;else{let I=P.get("CF"),B=P.get("StmF");if(I instanceof S&&B instanceof t)I.suppressEncryption=!0,R=I.get(B.name)?.get("Length")||128,R<40&&(R<<=3)}if(!Number.isInteger(R)||R<40||R%8!=0)throw new s("invalid key length");let f=w8(P.get("O")),G=w8(P.get("U")),Q=f.subarray(0,32),Y=G.subarray(0,32),W=P.get("P"),$=P.get("R"),_=(z===4||z===5)&&P.get("EncryptMetadata")!==!1;this.encryptMetadata=_;let J=w8(Z),U,K;if(q){if($===6)try{q=E9(q)}catch{v("CipherTransformFactory: Unable to convert UTF8 encoded password.")}U=w8(q)}if(z!==5)K=this.#Z(J,U,Q,Y,W,$,R,_);else{let I=f.subarray(32,40),B=f.subarray(40,48),j=G.subarray(0,48),V=G.subarray(32,40),H=G.subarray(40,48),M=w8(P.get("OE")),x=w8(P.get("UE")),A=w8(P.get("Perms"));K=this.#P($,U,Q,I,B,j,Y,V,H,M,x,A)}if(!K){if(!q)throw new L7("No password given",nB);let I=this.#X(U,Q,$,R);K=this.#Z(J,I,Q,Y,W,$,R,_)}if(!K)throw new L7("Incorrect Password",iB);if(z===4&&K.length<16?(this.encryptionKey=new Uint8Array(16),this.encryptionKey.set(K)):this.encryptionKey=K,z>=4){let I=P.get("CF");I instanceof S&&(I.suppressEncryption=!0),this.cf=I,this.stmf=P.get("StmF")||t.get("Identity"),this.strf=P.get("StrF")||t.get("Identity"),this.eff=P.get("EFF")||this.stmf}}createCipherTransform(P,Z){if(this.algorithm===4||this.algorithm===5)return new FZ(this.#z(this.cf,this.strf,P,Z,this.encryptionKey),this.#z(this.cf,this.stmf,P,Z,this.encryptionKey));let q=this.#q(P,Z,this.encryptionKey,!1),X=function(){return new p4(q)};return new FZ(X,X)}}class zU{constructor(P,Z){this.stream=P,this.pdfManager=Z,this.entries=[],this._xrefStms=new Set,this._cacheMap=new Map,this._pendingRefs=new J8,this._newPersistentRefNum=null,this._newTemporaryRefNum=null,this._persistentRefsCache=null}getNewPersistentRef(P){this._newPersistentRefNum===null&&(this._newPersistentRefNum=this.entries.length||1);let Z=this._newPersistentRefNum++;return this._cacheMap.set(Z,P),f1.get(Z,0)}getNewTemporaryRef(){if(this._newTemporaryRefNum===null&&(this._newTemporaryRefNum=this.entries.length||1,this._newPersistentRefNum)){this._persistentRefsCache=new Map;for(let P=this._newTemporaryRefNum;P<this._newPersistentRefNum;P++)this._persistentRefsCache.set(P,this._cacheMap.get(P)),this._cacheMap.delete(P)}return f1.get(this._newTemporaryRefNum++,0)}resetNewTemporaryRef(){if(this._newTemporaryRefNum=null,this._persistentRefsCache)for(let[P,Z]of this._persistentRefsCache)this._cacheMap.set(P,Z);this._persistentRefsCache=null}setStartXRef(P){this.startXRefQueue=[P]}parse(P=!1){let Z,q,X;P?(v("Indexing all PDF objects"),Z=this.indexObjects()):Z=this.readXRef(),Z.assignXref(this),this.trailer=Z;try{q=Z.get("Encrypt")}catch(z){if(z instanceof q8)throw z;v(`XRef.parse - Invalid "Encrypt" reference: "${z}".`)}if(q instanceof S){let z=Z.get("ID"),R=z?.length?z[0]:"";q.suppressEncryption=!0,this.encrypt=new R6(q,R,this.pdfManager.password)}try{X=Z.get("Root")}catch(z){if(z instanceof q8)throw z;v(`XRef.parse - Invalid "Root" reference: "${z}".`)}if(X instanceof S)try{if(X.get("Pages")instanceof S)return void(this.root=X)}catch(z){if(z instanceof q8)throw z;v(`XRef.parse - Invalid "Pages" reference: "${z}".`)}if(!P)throw new L5;throw new b7("Invalid Root reference.")}processXRefTable(P){if("tableState"in this||(this.tableState={entryNum:0,streamPos:P.lexer.stream.pos,parserBuf1:P.buf1,parserBuf2:P.buf2}),!b8(this.readXRefTable(P),"trailer"))throw new s("Invalid XRef table: could not find trailer dictionary");let Z=P.getObj();if(Z instanceof S||!Z.dict||(Z=Z.dict),!(Z instanceof S))throw new s("Invalid XRef table: could not parse trailer dictionary");return delete this.tableState,Z}readXRefTable(P){let Z=P.lexer.stream,q=this.tableState,X;for(Z.pos=q.streamPos,P.buf1=q.parserBuf1,P.buf2=q.parserBuf2;;){if(!("firstEntryNum"in q)||!("entryCount"in q)){if(b8(X=P.getObj(),"trailer"))break;q.firstEntryNum=X,q.entryCount=P.getObj()}let{firstEntryNum:z,entryCount:R}=q;if(!Number.isInteger(z)||!Number.isInteger(R))throw new s("Invalid XRef table: wrong types in subsection header");for(let f=q.entryNum;f<R;f++){q.streamPos=Z.pos,q.entryNum=f,q.parserBuf1=P.buf1,q.parserBuf2=P.buf2;let G={};G.offset=P.getObj(),G.gen=P.getObj();let Q=P.getObj();if(Q instanceof H8)switch(Q.cmd){case"f":G.free=!0;break;case"n":G.uncompressed=!0}if(!Number.isInteger(G.offset)||!Number.isInteger(G.gen)||!G.free&&!G.uncompressed)throw new s(`Invalid entry in XRef subsection: ${z}, ${R}`);f===0&&G.free&&z===1&&(z=0),this.entries[f+z]||(this.entries[f+z]=G)}q.entryNum=0,q.streamPos=Z.pos,q.parserBuf1=P.buf1,q.parserBuf2=P.buf2,delete q.firstEntryNum,delete q.entryCount}if(this.entries[0]&&!this.entries[0].free)throw new s("Invalid XRef table: unexpected first object");return X}processXRefStream(P){if(!("streamState"in this)){let{dict:Z,pos:q}=P,X=Z.get("W"),z=Z.get("Index")||[0,Z.get("Size")];this.streamState={entryRanges:z,byteWidths:X,entryNum:0,streamPos:q}}return this.readXRefStream(P),delete this.streamState,P.dict}readXRefStream(P){let Z=this.streamState;P.pos=Z.streamPos;let[q,X,z]=Z.byteWidths,R=Z.entryRanges;for(;R.length>0;){let[f,G]=R;if(!Number.isInteger(f)||!Number.isInteger(G))throw new s(`Invalid XRef range fields: ${f}, ${G}`);if(!Number.isInteger(q)||!Number.isInteger(X)||!Number.isInteger(z))throw new s(`Invalid XRef entry fields length: ${f}, ${G}`);for(let Q=Z.entryNum;Q<G;++Q){Z.entryNum=Q,Z.streamPos=P.pos;let Y=0,W=0,$=0;for(let J=0;J<q;++J){let U=P.getByte();if(U===-1)throw new s("Invalid XRef byteWidths 'type'.");Y=Y<<8|U}q===0&&(Y=1);for(let J=0;J<X;++J){let U=P.getByte();if(U===-1)throw new s("Invalid XRef byteWidths 'offset'.");W=W<<8|U}for(let J=0;J<z;++J){let U=P.getByte();if(U===-1)throw new s("Invalid XRef byteWidths 'generation'.");$=$<<8|U}let _={};switch(_.offset=W,_.gen=$,Y){case 0:_.free=!0;break;case 1:_.uncompressed=!0;break;case 2:break;default:throw new s(`Invalid XRef entry type: ${Y}`)}this.entries[f+Q]||(this.entries[f+Q]=_)}Z.entryNum=0,Z.streamPos=P.pos,R.splice(0,2)}}indexObjects(){function P(V,H){let M="",x=V[H];for(;x!==10&&x!==13&&x!==60&&!(++H>=V.length);)M+=String.fromCharCode(x),x=V[H];return M}function Z(V,H,M){let x=M.length,A=V.length,k=0;for(;H<A;){let b=0;for(;b<x&&V[H+b]===M[b];)++b;if(b>=x)break;H++,k++}return k}let q=/\b(endobj|\d+\s+\d+\s+obj|xref|trailer\s*<<)\b/g,X=/\b(startxref|\d+\s+\d+\s+obj)\b/g,z=/^(\d+)\s+(\d+)\s+obj\b/,R=new Uint8Array([116,114,97,105,108,101,114]),f=new Uint8Array([115,116,97,114,116,120,114,101,102]),G=new Uint8Array([47,88,82,101,102]);this.entries.length=0,this._cacheMap.clear();let Q=this.stream;Q.pos=0;let Y=Q.getBytes(),W=W0(Y),$=Y.length,_=Q.start,J=[],U=[];for(;_<$;){let V=Y[_];if(V===9||V===10||V===13||V===32){++_;continue}if(V===37){do{if(++_,_>=$)break;V=Y[_]}while(V!==10&&V!==13);continue}let H=P(Y,_),M;if(H.startsWith("xref")&&(H.length===4||/\s/.test(H[4])))_+=Z(Y,_,R),J.push(_),_+=Z(Y,_,f);else if(M=z.exec(H)){let x=0|M[1],A=0|M[2],k=_+H.length,b,O=!1;if(this.entries[x]){if(this.entries[x].gen===A)try{new U4({lexer:new T0(Q.makeSubStream(k))}).getObj(),O=!0}catch(F){F instanceof x3?v(`indexObjects -- checking object (${H}): "${F}".`):O=!0}}else O=!0;O&&(this.entries[x]={offset:_-Q.start,gen:A,uncompressed:!0}),q.lastIndex=k;let p=q.exec(W);if(p)b=q.lastIndex+1-_,p[1]!=="endobj"&&(v(`indexObjects: Found "${p[1]}" inside of another "obj", caused by missing "endobj" -- trying to recover.`),b-=p[1].length+1);else b=$-_;let D=Y.subarray(_,_+b),n=Z(D,0,G);n<b&&D[n+5]<64&&(U.push(_-Q.start),this._xrefStms.add(_-Q.start)),_+=b}else if(H.startsWith("trailer")&&(H.length===7||/\s/.test(H[7]))){J.push(_);let x=_+H.length,A;X.lastIndex=x;let k=X.exec(W);if(k)A=X.lastIndex+1-_,k[1]!=="startxref"&&(v(`indexObjects: Found "${k[1]}" after "trailer", caused by missing "startxref" -- trying to recover.`),A-=k[1].length+1);else A=$-_;_+=A}else _+=H.length+1}for(let V of U)this.startXRefQueue.push(V),this.readXRef(!0);let K=[],I,B,j=!1;for(let V of J){Q.pos=V;let H=new U4({lexer:new T0(Q),xref:this,allowStreams:!0,recoveryMode:!0});if(!b8(H.getObj(),"trailer"))continue;let M=H.getObj();M instanceof S&&(K.push(M),M.has("Encrypt")&&(j=!0))}for(let V of[...K,"genFallback",...K]){if(V==="genFallback"){if(!B)break;this._generationFallback=!0;continue}let H=!1;try{let M=V.get("Root");if(!(M instanceof S))continue;let x=M.get("Pages");if(!(x instanceof S))continue;let A=x.get("Count");Number.isInteger(A)&&(H=!0)}catch(M){B=M;continue}if(H&&(!j||V.has("Encrypt"))&&V.has("ID"))return V;I=V}if(I)return I;if(this.topDict)return this.topDict;if(!K.length)for(let V in this.entries){if(!Object.hasOwn(this.entries,V))continue;let H=this.entries[V],M=f1.get(parseInt(V),H.gen),x;try{x=this.fetch(M)}catch{continue}if(x instanceof T1&&(x=x.dict),x instanceof S&&x.has("Root"))return x}throw new b7("Invalid PDF structure.")}readXRef(P=!1){let Z=this.stream,q=new Set;for(;this.startXRefQueue.length;){try{let X=this.startXRefQueue[0];if(q.has(X)){v("readXRef - skipping XRef table since it was already parsed."),this.startXRefQueue.shift();continue}q.add(X),Z.pos=X+Z.start;let z=new U4({lexer:new T0(Z),xref:this,allowStreams:!0}),R,f=z.getObj();if(b8(f,"xref"))R=this.processXRefTable(z),this.topDict||(this.topDict=R),f=R.get("XRefStm"),Number.isInteger(f)&&!this._xrefStms.has(f)&&(this._xrefStms.add(f),this.startXRefQueue.push(f));else{if(!Number.isInteger(f))throw new s("Invalid XRef stream header");if(!(Number.isInteger(z.getObj())&&b8(z.getObj(),"obj")&&(f=z.getObj())instanceof T1))throw new s("Invalid XRef stream");if(R=this.processXRefStream(f),this.topDict||(this.topDict=R),!R)throw new s("Failed to read XRef stream")}f=R.get("Prev"),Number.isInteger(f)?this.startXRefQueue.push(f):f instanceof f1&&this.startXRefQueue.push(f.num)}catch(X){if(X instanceof q8)throw X;v1("(while reading XRef): "+X)}this.startXRefQueue.shift()}if(this.topDict)return this.topDict;if(!P)throw new L5}getEntry(P){let Z=this.entries[P];return Z&&!Z.free&&Z.offset?Z:null}fetchIfRef(P,Z=!1){return P instanceof f1?this.fetch(P,Z):P}fetch(P,Z=!1){if(!(P instanceof f1))throw Error("ref object is not a reference");let q=P.num,X=this._cacheMap.get(q);if(X!==void 0)return X instanceof S&&!X.objId&&(X.objId=P.toString()),X;let z=this.getEntry(q);if(z===null)return z;if(this._pendingRefs.has(P))return this._pendingRefs.remove(P),v(`Ignoring circular reference: ${P}.`),eB;this._pendingRefs.put(P);try{z=z.uncompressed?this.fetchUncompressed(P,z,Z):this.fetchCompressed(P,z,Z),this._pendingRefs.remove(P)}catch(R){throw this._pendingRefs.remove(P),R}return z instanceof S?z.objId=P.toString():z instanceof T1&&(z.dict.objId=P.toString()),z}fetchUncompressed(P,Z,q=!1){let{gen:X,num:z}=P;if(Z.gen!==X){let W=`Inconsistent generation in XRef: ${P}`;if(this._generationFallback&&Z.gen<X)return v(W),this.fetchUncompressed(f1.get(z,Z.gen),Z,q);throw new V4(W)}let R=this.stream.makeSubStream(Z.offset+this.stream.start),f=new U4({lexer:new T0(R),xref:this,allowStreams:!0}),G=f.getObj(),Q=f.getObj(),Y=f.getObj();if(G!==z||Q!==X||!(Y instanceof H8))throw new V4(`Bad (uncompressed) XRef entry: ${P}`);if(Y.cmd!=="obj"){if(Y.cmd.startsWith("obj")&&(z=parseInt(Y.cmd.substring(3),10),!Number.isNaN(z)))return z;throw new V4(`Bad (uncompressed) XRef entry: ${P}`)}return(Z=this.encrypt&&!q?f.getObj(this.encrypt.createCipherTransform(z,X)):f.getObj())instanceof T1||this._cacheMap.set(z,Z),Z}fetchCompressed(P,Z,q=!1){let X=Z.offset,z=this.fetch(f1.get(X,0));if(!(z instanceof T1))throw new s("bad ObjStm stream");let R=z.dict.get("First"),f=z.dict.get("N");if(!Number.isInteger(R)||!Number.isInteger(f))throw new s("invalid first and n parameters for ObjStm stream");let G=new U4({lexer:new T0(z),xref:this,allowStreams:!0}),Q=Array(f),Y=Array(f);for(let _=0;_<f;++_){let J=G.getObj();if(!Number.isInteger(J))throw new s(`invalid object number in the ObjStm stream: ${J}`);let U=G.getObj();if(!Number.isInteger(U))throw new s(`invalid object offset in the ObjStm stream: ${U}`);Q[_]=J;let K=this.getEntry(J);K?.offset===X&&K.gen!==_&&(K.gen=_),Y[_]=U}let W=(z.start||0)+R,$=Array(f);for(let _=0;_<f;++_){let J=_<f-1?Y[_+1]-Y[_]:void 0;if(J<0)throw new s("Invalid offset in the ObjStm stream.");G=new U4({lexer:new T0(z.makeSubStream(W+Y[_],J,z.dict)),xref:this,allowStreams:!0});let U=G.getObj();if($[_]=U,U instanceof T1)continue;let K=Q[_],I=this.entries[K];I&&I.offset===X&&I.gen===_&&this._cacheMap.set(K,U)}if((Z=$[Z.gen])===void 0)throw new V4(`Bad (compressed) XRef entry: ${P}`);return Z}async fetchIfRefAsync(P,Z){return P instanceof f1?this.fetchAsync(P,Z):P}async fetchAsync(P,Z){try{return this.fetch(P,Z)}catch(q){if(!(q instanceof q8))throw q;return await this.pdfManager.requestRange(q.begin,q.end),this.fetchAsync(P,Z)}}getCatalogObj(){return this.root}}class SZ{#P=!1;#Z=null;constructor({pdfManager:P,xref:Z,pageIndex:q,pageDict:X,ref:z,globalIdFactory:R,fontCache:f,builtInCMapCache:G,standardFontDataCache:Q,globalColorSpaceCache:Y,globalImageCache:W,systemFontCache:$,nonBlendModesSet:_,xfaFactory:J}){this.pdfManager=P,this.pageIndex=q,this.pageDict=X,this.xref=Z,this.ref=z,this.fontCache=f,this.builtInCMapCache=G,this.standardFontDataCache=Q,this.globalColorSpaceCache=Y,this.globalImageCache=W,this.systemFontCache=$,this.nonBlendModesSet=_,this.evaluatorOptions=P.evaluatorOptions,this.xfaFactory=J;let U={obj:0};this._localIdFactory=class extends R{static createObjId(){return`p${q}_${++U.obj}`}static getPageObjId(){return`p${z.toString()}`}}}#X(P){return new x6({xref:this.xref,handler:P,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalColorSpaceCache:this.globalColorSpaceCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions})}#q(P,Z=!1){let q=N0({dict:this.pageDict,key:P,getArray:Z,stopWhenFound:!1});return Array.isArray(q)?q.length!==1&&q[0]instanceof S?S.merge({xref:this.xref,dictArray:q}):q[0]:q}get content(){return this.pageDict.getArray("Contents")}get resources(){let P=this.#q("Resources");return q1(this,"resources",P instanceof S?P:S.empty)}#z(P){if(this.xfaData)return this.xfaData.bbox;let Z=k4(this.#q(P,!0),null);if(Z){if(Z[2]-Z[0]>0&&Z[3]-Z[1]>0)return Z;v(`Empty, or invalid, /${P} entry.`)}return null}get mediaBox(){return q1(this,"mediaBox",this.#z("MediaBox")||Px)}get cropBox(){return q1(this,"cropBox",this.#z("CropBox")||this.mediaBox)}get userUnit(){let P=this.pageDict.get("UserUnit");return q1(this,"userUnit",typeof P=="number"&&P>0?P:1)}get view(){let{cropBox:P,mediaBox:Z}=this;if(P!==Z&&!C7(P,Z)){let q=s1.intersect(P,Z);if(q&&q[2]-q[0]>0&&q[3]-q[1]>0)return q1(this,"view",q);v("Empty /CropBox and /MediaBox intersection.")}return q1(this,"view",Z)}get rotate(){let P=this.#q("Rotate")||0;return P%90!=0?P=0:P>=360?P%=360:P<0&&(P=(P%360+360)%360),q1(this,"rotate",P)}#R(P,Z){if(!this.evaluatorOptions.ignoreErrors)throw P;v(`getContentStream - ignoring sub-stream (${Z}): "${P}".`)}async getContentStream(){let P=await this.pdfManager.ensure(this,"content");return P instanceof T1?P:Array.isArray(P)?new uf(P,this.#R.bind(this)):new A3}get xfaData(){return q1(this,"xfaData",this.xfaFactory?{bbox:this.xfaFactory.getBoundingBox(this.pageIndex)}:null)}async#G(P,Z,q){let X=[];for(let z of P)if(z.id){let R=f1.fromString(z.id);if(!R){v(`A non-linked annotation cannot be modified: ${z.id}`);continue}if(z.deleted){if(Z.put(R,R),z.popupRef){let f=f1.fromString(z.popupRef);f&&Z.put(f,f)}continue}if(z.popup?.deleted){let f=f1.fromString(z.popupRef);f&&Z.put(f,f)}q?.put(R),z.ref=R,X.push(this.xref.fetchAsync(R).then((f)=>{f instanceof S&&(z.oldAnnotation=f.clone())},()=>{v(`Cannot fetch \`oldAnnotation\` for: ${R}.`)})),delete z.id}await Promise.all(X)}async saveNewAnnotations(P,Z,q,X,z){if(this.xfaFactory)throw Error("XFA: Cannot save new annotations.");let R=this.#X(P),f=new t8,G=new J8;await this.#G(q,f,G);let Q=this.pageDict,Y=this.annotations.filter((_)=>!(_ instanceof f1&&f.has(_))),W=await P4.saveNewAnnotations(R,Z,q,X,z);for(let{ref:_}of W.annotations)_ instanceof f1&&!G.has(_)&&Y.push(_);let $=Q.clone();$.set("Annots",Y),z.put(this.ref,{data:$});for(let _ of f)z.put(_,{data:null})}async save(P,Z,q,X){let z=this.#X(P),R=await this._parsedAnnotations,f=[];for(let G of R)f.push(G.save(z,Z,q,X).catch(function(Q){return v(`save - ignoring annotation data during "${Z.name}" task: "${Q}".`),null}));return Promise.all(f)}async loadResources(P){await(this.#Z??=this.pdfManager.ensure(this,"resources")),await M6.load(this.resources,P,this.xref)}async#f(P,Z){let q=P?.get("Resources");return q instanceof S&&q.size?(await M6.load(q,Z,this.xref),S.merge({xref:this.xref,dictArray:[q,this.resources],mergeSubDicts:!0})):this.resources}async getOperatorList({handler:P,sink:Z,task:q,intent:X,cacheKey:z,annotationStorage:R=null,modifiedIds:f=null}){let G=this.getContentStream(),Q=this.loadResources(g9),Y=this.#X(P),W=this.xfaFactory?null:bf(R),$=W?.get(this.pageIndex),_=Promise.resolve(null),J=null;if($){let p=this.pdfManager.ensureDoc("annotationGlobals"),D,n=new Set;for(let{bitmapId:l,bitmap:C}of $)!l||C||n.has(l)||n.add(l);let{isOffscreenCanvasSupported:F}=this.evaluatorOptions;if(n.size>0){let l=$.slice();for(let[C,L]of R)C.startsWith(rR)&&L.bitmap&&n.has(L.bitmapId)&&l.push(L);D=P4.generateImages(l,this.xref,F)}else D=P4.generateImages($,this.xref,F);J=new J8,_=Promise.all([p,this.#G($,J,null)]).then(([l])=>l?P4.printNewAnnotations(l,Y,q,$,D):null)}let U=Promise.all([G,Q]).then(async([p])=>{let D=await this.#f(p.dict,g9),n=new p8(X,Z);return P.send("StartRenderPage",{transparency:Y.hasBlendModes(D,this.nonBlendModesSet),pageIndex:this.pageIndex,cacheKey:z}),await Y.getOperatorList({stream:p,task:q,resources:D,operatorList:n}),n}),[K,I,B]=await Promise.all([U,this._parsedAnnotations,_]);if(B){I=I.filter((p)=>!(p.ref&&J.has(p.ref)));for(let p=0,D=B.length;p<D;p++){let n=B[p];if(n.refToReplace){let F=I.findIndex((l)=>l.ref&&V3(l.ref,n.refToReplace));F>=0&&(I.splice(F,1,n),B.splice(p--,1),D--)}}I=I.concat(B)}if(I.length===0||X&RB)return K.flush(!0),{length:K.totalLength};let j=!!(X&hR),V=!!(X&fB),H=!!(X&gX),M=!!(X&Z3),x=!!(X&dX),A=[];for(let p of I)(H||M&&p.mustBeViewed(R,j)&&p.mustBeViewedWhenEditing(V,f)||x&&p.mustBePrinted(R))&&A.push(p.getOperatorList(Y,q,X,R).catch(function(D){return v(`getOperatorList - ignoring annotation data during "${q.name}" task: "${D}".`),{opList:null,separateForm:!1,separateCanvas:!1}}));let k=await Promise.all(A),b=!1,O=!1;for(let{opList:p,separateForm:D,separateCanvas:n}of k)K.addOpList(p),b||=D,O||=n;return K.flush(!0,{form:b,canvas:O}),{length:K.totalLength}}async extractTextContent({handler:P,task:Z,includeMarkedContent:q,disableNormalization:X,sink:z,intersector:R=null}){let f=this.getContentStream(),G=this.loadResources(d9),Q=this.pdfManager.ensureCatalog("lang"),[Y,,W]=await Promise.all([f,G,Q]),$=await this.#f(Y.dict,d9);return this.#X(P).getTextContent({stream:Y,task:Z,resources:$,includeMarkedContent:q,disableNormalization:X,sink:z,viewBox:this.view,lang:W,intersector:R})}async getStructTree(){let P=await this.pdfManager.ensureCatalog("structTreeRoot");if(!P)return null;await this._parsedAnnotations;try{let Z=await this.pdfManager.ensure(this,"_parseStructTree",[P]);return await this.pdfManager.ensure(Z,"serializable")}catch(Z){return v(`getStructTree: "${Z}".`),null}}_parseStructTree(P){let Z=new kq(P,this.pageDict);return Z.parse(this.ref),Z}async getAnnotationsData(P,Z,q){let X=await this._parsedAnnotations;if(X.length===0)return X;let z=[],R=[],f,G=!!(q&gX),Q=!!(q&Z3),Y=!!(q&dX),W=[];for(let $ of X){let _=G||Q&&$.viewable;(_||Y&&$.printable)&&z.push($.data),$.hasTextContent&&_?(f??=this.#X(P),R.push($.extractTextContent(f,Z,[-1/0,-1/0,1/0,1/0]).catch(function(J){v(`getAnnotationsData - ignoring textContent during "${Z.name}" task: "${J}".`)}))):$.overlaysTextContent&&_&&W.push($)}if(W.length>0){let $=new tJ(W);R.push(this.extractTextContent({handler:P,task:Z,includeMarkedContent:!1,disableNormalization:!1,sink:null,viewBox:this.view,lang:null,intersector:$}).then(()=>{$.setText()}))}return await Promise.all(R),z}get annotations(){let P=this.#q("Annots");return q1(this,"annotations",Array.isArray(P)?P:[])}get _parsedAnnotations(){let P=this.pdfManager.ensure(this,"annotations").then(async(Z)=>{if(Z.length===0)return Z;let[q,X]=await Promise.all([this.pdfManager.ensureDoc("annotationGlobals"),this.pdfManager.ensureDoc("fieldObjects")]);if(!q)return[];let z=X?.orphanFields,R=[];for(let Y of Z)R.push(P4.create(this.xref,Y,q,this._localIdFactory,!1,z,null,this.ref).catch(function(W){return v(`_parsedAnnotations: "${W}".`),null}));let f=[],G,Q;for(let Y of await Promise.all(R))Y&&(Y instanceof E0?(Q||=[]).push(Y):Y instanceof bP?(G||=[]).push(Y):f.push(Y));return Q&&f.push(...Q),G&&f.push(...G),f});return this.#P=!0,q1(this,"_parsedAnnotations",P)}get jsActions(){return q1(this,"jsActions",qP(this.xref,this.pageDict,vB))}async collectAnnotationsByType(P,Z,q,X,z){let{pageIndex:R}=this;if(this.#P){let G=await this._parsedAnnotations;for(let{data:Q}of G)q&&!q.has(Q.annotationType)||(Q.pageIndex=R,X.push(Promise.resolve(Q)));return}let f=await this.pdfManager.ensure(this,"annotations");for(let G of f)X.push(P4.create(this.xref,G,z,this._localIdFactory,!1,null,q,this.ref).then(async(Q)=>{if(!Q)return null;if(Q.data.pageIndex=R,Q.hasTextContent&&Q.viewable){let Y=this.#X(P);await Q.extractTextContent(Y,Z,[-1/0,-1/0,1/0,1/0])}return Q.data}).catch(function(Q){return v(`collectAnnotationsByType: "${Q}".`),null}))}}function $9(P,Z,q=1024,X=!1){let z=Z.length,R=P.peekBytes(q),f=R.length-z;if(f<=0)return!1;if(X){let G=z-1,Q=R.length-1;for(;Q>=G;){let Y=0;for(;Y<z&&R[Q-Y]===Z[G-Y];)Y++;if(Y>=z)return P.pos+=Q-G,!0;Q--}}else{let G=0;for(;G<=f;){let Q=0;for(;Q<z&&R[G+Q]===Z[Q];)Q++;if(Q>=z)return P.pos+=G,!0;G++}}return!1}class qX{#P=new Map;#Z=null;constructor(P,Z){if(Z.length<=0)throw new b7("The PDF file is empty, i.e. its size is zero bytes.");this.pdfManager=P,this.stream=Z,this.xref=new zU(Z,P);let q={font:0};this._globalIdFactory=class{static getDocId(){return`g_${P.docId}`}static createFontId(){return"f"+ ++q.font}static createObjId(){O1("Abstract method `createObjId` called.")}static getPageObjId(){O1("Abstract method `getPageObjId` called.")}}}parse(P){this.xref.parse(P),this.catalog=new H6(this.pdfManager,this.xref)}get linearization(){let P=null;try{P=XG.create(this.stream)}catch(Z){if(Z instanceof q8)throw Z;v1(Z)}return q1(this,"linearization",P)}get startXRef(){let P=this.stream,Z=0;if(this.linearization){if(P.reset(),$9(P,Zx)){P.skip(6);let q=P.peekByte();for(;M0(q);)P.pos++,q=P.peekByte();Z=P.pos-P.start}}else{let X=QR.length,z=!1,R=P.end;for(;!z&&R>0;)R-=1024-X,R<0&&(R=0),P.pos=R,z=$9(P,QR,1024,!0);if(z){let f;P.skip(9);do f=P.getByte();while(M0(f));let G="";for(;f>=32&&f<=57;)G+=String.fromCharCode(f),f=P.getByte();Z=parseInt(G,10),isNaN(Z)&&(Z=0)}}return q1(this,"startXRef",Z)}checkHeader(){let P=this.stream;if(P.reset(),!$9(P,GR))return;P.moveStart(),P.skip(GR.length);let Z,q="";for(;(Z=P.getByte())>32&&q.length<7;)q+=String.fromCharCode(Z);Hf.test(q)?this.#Z=q:v(`Invalid PDF header version: ${q}`)}parseStartXRef(){this.xref.setStartXRef(this.startXRef)}get numPages(){let P=0;return P=this.catalog.hasActualNumPages?this.catalog.numPages:this.xfaFactory?this.xfaFactory.getNumPages():this.linearization?this.linearization.numPages:this.catalog.numPages,q1(this,"numPages",P)}#X(P,Z=0){return!!Array.isArray(P)&&P.every((q)=>{if(!((q=this.xref.fetchIfRef(q))instanceof S))return!1;if(q.has("Kids"))return++Z>10?(v("#hasOnlyDocumentSignatures: maximum recursion depth reached"),!1):this.#X(q.get("Kids"),Z);let X=G8(q.get("FT"),"Sig"),z=q.get("Rect"),R=Array.isArray(z)&&z.every((f)=>f===0);return X&&R})}#q(P,Z,q=new J8){if(Array.isArray(P))for(let X of P){if(X instanceof f1){if(q.has(X))continue;q.put(X)}if(X=this.xref.fetchIfRef(X),!(X instanceof S))continue;if(X.has("Kids")){this.#q(X.get("Kids"),Z,q);continue}if(!G8(X.get("FT"),"Sig"))continue;let z=X.get("V");if(!(z instanceof S))continue;let R=z.get("SubFilter");R instanceof t&&Z.add(R.name)}}get _xfaStreams(){let{acroForm:P}=this.catalog;if(!P)return null;let Z=P.get("XFA"),q=new Map(["xdp:xdp","template","datasets","config","connectionSet","localeSet","stylesheet","/xdp:xdp"].map((X)=>[X,null]));if(Z instanceof T1&&!Z.isEmpty)return q.set("xdp:xdp",Z),q;if(!Array.isArray(Z)||Z.length===0)return null;for(let X=0,z=Z.length;X<z;X+=2){let R;if(R=X===0?"xdp:xdp":X===z-2?"/xdp:xdp":Z[X],!q.has(R))continue;let f=this.xref.fetchIfRef(Z[X+1]);f instanceof T1&&!f.isEmpty&&q.set(R,f)}return q}get xfaDatasets(){let P=this._xfaStreams;if(!P)return q1(this,"xfaDatasets",null);for(let Z of["datasets","xdp:xdp"]){let q=P.get(Z);if(q)try{let X=k7(q.getString());return q1(this,"xfaDatasets",new nJ({[Z]:X}))}catch{v("XFA - Invalid utf-8 string.");break}}return q1(this,"xfaDatasets",null)}get xfaData(){let P=this._xfaStreams;if(!P)return null;let Z=Object.create(null);for(let[q,X]of P)if(X)try{Z[q]=k7(X.getString())}catch{return v("XFA - Invalid utf-8 string."),null}return Z}get xfaFactory(){let P;return this.pdfManager.enableXfa&&this.catalog.needsRendering&&this.formInfo.hasXfa&&!this.formInfo.hasAcroForm&&(P=this.xfaData),q1(this,"xfaFactory",P?new X2(P):null)}get isPureXfa(){return!!this.xfaFactory&&this.xfaFactory.isValid()}get htmlForXfa(){return this.xfaFactory?this.xfaFactory.getPages():null}async#z(){let P=await this.pdfManager.ensureCatalog("xfaImages");P&&this.xfaFactory.setImages(P)}async#R(P,Z){let q=await this.pdfManager.ensureCatalog("acroForm");if(!q)return;let X=await q.getAsync("DR");if(!(X instanceof S))return;await M6.load(X,["Font"],this.xref);let z=X.get("Font");if(!(z instanceof S))return;let R=Object.assign(Object.create(null),this.pdfManager.evaluatorOptions,{useSystemFonts:!1}),{builtInCMapCache:f,fontCache:G,standardFontDataCache:Q}=this.catalog,Y=new x6({xref:this.xref,handler:P,pageIndex:-1,idFactory:this._globalIdFactory,fontCache:G,builtInCMapCache:f,standardFontDataCache:Q,options:R}),W=new p8,$=[],_={get font(){return $.at(-1)},set font(B){$.push(B)},clone(){return this}},J=(B,j,V)=>Y.handleSetFont(X,[t.get(B),1],null,W,Z,_,j,V).catch((H)=>(v(`loadXfaFonts: "${H}".`),null)),U=[];for(let[B,j]of z){let V=j.get("FontDescriptor");if(!(V instanceof S))continue;let H=V.get("FontFamily");H=H.replaceAll(/[ ]+(\d)/g,"$1");let M={fontFamily:H,fontWeight:V.get("FontWeight"),italicAngle:-V.get("ItalicAngle")};XI(M)&&U.push(J(B,null,M))}await Promise.all(U);let K=this.xfaFactory.setFonts($);if(!K)return;R.ignoreErrors=!0,U.length=0,$.length=0;let I=new Set;for(let B of K)jq(`${B}-Regular`)||I.add(B);I.size&&K.push("PdfJS-Fallback");for(let B of K)if(!I.has(B))for(let j of[{name:"Regular",fontWeight:400,italicAngle:0},{name:"Bold",fontWeight:700,italicAngle:0},{name:"Italic",fontWeight:400,italicAngle:12},{name:"BoldItalic",fontWeight:700,italicAngle:12}]){let V=`${B}-${j.name}`;U.push(J(V,mG(V),{fontFamily:B,fontWeight:j.fontWeight,italicAngle:j.italicAngle}))}await Promise.all(U),this.xfaFactory.appendFonts($,I)}loadXfaResources(P,Z){return Promise.all([this.#R(P,Z).catch(()=>{}),this.#z()])}serializeXfaData(P){return this.xfaFactory?this.xfaFactory.serializeData(P):null}get version(){return this.catalog.version||this.#Z}get formInfo(){let P={hasFields:!1,hasAcroForm:!1,hasXfa:!1,hasSignatures:!1},{acroForm:Z}=this.catalog;if(!Z)return q1(this,"formInfo",P);try{let q=Z.get("Fields"),X=Array.isArray(q)&&q.length>0;P.hasFields=X;let z=Z.get("XFA");P.hasXfa=Array.isArray(z)&&z.length>0||z instanceof T1&&!z.isEmpty;let R=!!(1&Z.get("SigFlags")),f=R&&this.#X(q);P.hasAcroForm=X&&!f,P.hasSignatures=R}catch(q){if(q instanceof q8)throw q;v(`Cannot fetch form information: "${q}".`)}return q1(this,"formInfo",P)}get documentInfo(){let{catalog:P,formInfo:Z,xref:q}=this,X={PDFFormatVersion:this.version,Language:P.lang,EncryptFilterName:q.encrypt?.filterName??null,IsLinearized:!!this.linearization,IsAcroFormPresent:Z.hasAcroForm,IsXFAPresent:Z.hasXfa,IsCollectionPresent:!!P.collection,IsSignaturesPresent:Z.hasSignatures},z;try{z=q.trailer.get("Info")}catch(R){if(R instanceof q8)throw R;v1("The document information dictionary is invalid.")}if(!(z instanceof S))return q1(this,"documentInfo",X);for(let[R,f]of z){switch(R){case"Title":case"Author":case"Subject":case"Keywords":case"Creator":case"Producer":case"CreationDate":case"ModDate":if(typeof f=="string"){X[R]=E1(f);continue}break;case"Trapped":if(f instanceof t){X[R]=f;continue}break;default:let G;switch(typeof f){case"string":G=E1(f);break;case"number":case"boolean":G=f;break;default:f instanceof t&&(G=f)}if(G===void 0){v(`Bad value, for custom key "${R}", in Info: ${f}.`);continue}X.Custom??=Object.create(null),X.Custom[R]=G;continue}v(`Bad value, for key "${R}", in Info: ${f}.`)}return q1(this,"documentInfo",X)}get fingerprints(){let P="\x00".repeat(16);function Z(R){return typeof R=="string"&&R.length===16&&R!==P}let q=this.xref.trailer.get("ID"),X,z;return Array.isArray(q)&&Z(q[0])?(X=w8(q[0]),q[1]!==q[0]&&Z(q[1])&&(z=w8(q[1]))):X=w4(this.stream.getByteRange(0,1024),0,1024),q1(this,"fingerprints",[eX(X),z?eX(z):null])}async#G(P){let{catalog:Z,linearization:q,xref:X}=this,z=f1.get(q.objectNumberFirst,0);try{let R=await X.fetchAsync(z);if(R instanceof S){let f=R.getRaw("Type");if(f instanceof f1&&(f=await X.fetchAsync(f)),G8(f,"Page")||!R.has("Type")&&!R.has("Kids")&&R.has("Contents"))return Z.pageKidsCountCache.has(z)||Z.pageKidsCountCache.put(z,1),Z.pageIndexCache.has(z)||Z.pageIndexCache.put(z,0),[R,z]}throw new s("The Linearization dictionary doesn't point to a valid Page dictionary.")}catch(R){return v(`_getLinearizationPage: "${R.message}".`),Z.getPageDict(P)}}getPage(P){let Z=this.#P.get(P);if(Z)return Z;let{catalog:q,linearization:X,xfaFactory:z}=this,R;return R=z?Promise.resolve([S.empty,null]):X?.pageFirst===P?this.#G(P):q.getPageDict(P),R=R.then(([f,G])=>new SZ({pdfManager:this.pdfManager,xref:this.xref,pageIndex:P,pageDict:f,ref:G,globalIdFactory:this._globalIdFactory,fontCache:q.fontCache,builtInCMapCache:q.builtInCMapCache,standardFontDataCache:q.standardFontDataCache,globalColorSpaceCache:q.globalColorSpaceCache,globalImageCache:q.globalImageCache,systemFontCache:q.systemFontCache,nonBlendModesSet:q.nonBlendModesSet,xfaFactory:z})),this.#P.set(P,R),R}async checkFirstPage(P=!1){if(!P)try{await this.getPage(0)}catch(Z){if(Z instanceof V4)throw this.#P.delete(0),await this.cleanup(),new L5}}async checkLastPage(P=!1){let{catalog:Z,pdfManager:q}=this,X;Z.setActualNumPages();try{if(await Promise.all([q.ensureDoc("xfaFactory"),q.ensureDoc("linearization"),q.ensureCatalog("numPages")]),this.xfaFactory)return;if(X=this.linearization?this.linearization.numPages:Z.numPages,!Number.isInteger(X))throw new s("Page count is not an integer.");if(X<=1)return;await this.getPage(X-1)}catch(z){if(this.#P.delete(X-1),await this.cleanup(),z instanceof V4&&!P)throw new L5;let R;v(`checkLastPage - invalid /Pages tree /Count: ${X}.`);try{R=await Z.getAllPageDicts(P)}catch(f){if(f instanceof V4&&!P)throw new L5;return void Z.setActualNumPages(1)}for(let[f,[G,Q]]of R){let Y;G instanceof Error?(Y=Promise.reject(G),Y.catch(()=>{})):Y=Promise.resolve(new SZ({pdfManager:q,xref:this.xref,pageIndex:f,pageDict:G,ref:Q,globalIdFactory:this._globalIdFactory,fontCache:Z.fontCache,builtInCMapCache:Z.builtInCMapCache,standardFontDataCache:Z.standardFontDataCache,globalColorSpaceCache:this.globalColorSpaceCache,globalImageCache:Z.globalImageCache,systemFontCache:Z.systemFontCache,nonBlendModesSet:Z.nonBlendModesSet,xfaFactory:null})),this.#P.set(f,Y)}Z.setActualNumPages(R.size)}}async fontFallback(P,Z){let{catalog:q,pdfManager:X}=this;for(let z of await Promise.all(q.fontCache))if(z.loadedName===P)return void z.fallback(Z,X.evaluatorOptions)}async cleanup(P=!1){return this.catalog?this.catalog.cleanup(P):Lq()}async#f(P,Z,q,X,z,R,f){let{xref:G}=this;if(!(q instanceof f1)||R.has(q))return;R.put(q);let Q=await G.fetchAsync(q);if(!(Q instanceof S))return;let Y=await Q.getAsync("Subtype");if(Y=Y instanceof t?Y.name:null,Y==="Link")return;if(Q.has("T")){let $=E1(await Q.getAsync("T"));P=P===""?$:`${P}.${$}`}else{let $=Q;for(;;){if($=$.getRaw("Parent")||Z,$ instanceof f1){if(R.has($))break;$=await G.fetchAsync($)}if(!($ instanceof S))break;if($.has("T")){let _=E1(await $.getAsync("T"));P=P===""?_:`${P}.${_}`;break}}}if(Z&&!Q.has("Parent")&&G8(Q.get("Subtype"),"Widget")&&f.put(q,Z),X.has(P)||X.set(P,[]),X.get(P).push(P4.create(G,q,z,null,!0,f,null,null).then(($)=>$?.getFieldObject()).catch(function($){return v(`#collectFieldObjects: "${$}".`),null})),!Q.has("Kids"))return;let W=await Q.getAsync("Kids");if(Array.isArray(W))for(let $ of W)await this.#f(P,q,$,X,z,R,f)}get fieldObjects(){return q1(this,"fieldObjects",this.pdfManager.ensureDoc("formInfo").then(async(P)=>{if(!P.hasFields)return null;let Z=await this.annotationGlobals;if(!Z)return null;let{acroForm:q}=Z,X=new J8,z=Object.create(null),R=new Map,f=new t8;for(let Q of q.get("Fields"))await this.#f("",null,Q,R,Z,X,f);let G=[];for(let[Q,Y]of R)G.push(Promise.all(Y).then((W)=>{(W=W.filter(($)=>!!$)).length>0&&(z[Q]=W)}));return await Promise.all(G),{allFields:Zq(z)>0?z:null,orphanFields:f}}))}get hasJSActions(){return q1(this,"hasJSActions",this.pdfManager.ensureDoc("_parseHasJSActions"))}async _parseHasJSActions(){let[P,Z]=await Promise.all([this.pdfManager.ensureCatalog("jsActions"),this.pdfManager.ensureDoc("fieldObjects")]);return!!P||!!Z?.allFields&&Object.values(Z.allFields).some((q)=>q.some((X)=>X.actions!==null))}get calculationOrderIds(){let P=this.catalog.acroForm?.get("CO");if(!Array.isArray(P)||P.length===0)return q1(this,"calculationOrderIds",null);let Z=[];for(let q of P)q instanceof f1&&Z.push(q.toString());return q1(this,"calculationOrderIds",Z.length?Z:null)}get annotationGlobals(){return q1(this,"annotationGlobals",P4.createGlobals(this.pdfManager))}}class XX{constructor({docBaseUrl:P,docId:Z,enableXfa:q,evaluatorOptions:X,handler:z,password:R}){this._docBaseUrl=function(G){if(G){let Q=j3(G);if(Q)return Q.href;v(`Invalid absolute docBaseUrl: "${G}".`)}return null}(P),this._docId=Z,this._password=R,this.enableXfa=q,X.isOffscreenCanvasSupported&&=P0.isOffscreenCanvasSupported,X.isImageDecoderSupported&&=P0.isImageDecoderSupported,this.evaluatorOptions=Object.freeze(X),G0.setOptions(X),v6.setOptions(X),p8.setOptions(X);let f={...X,handler:z};i7.setOptions(f),M4.setOptions(f),T7.setOptions(f)}get docId(){return this._docId}get password(){return this._password}get docBaseUrl(){return this._docBaseUrl}ensureDoc(P,Z){return this.ensure(this.pdfDocument,P,Z)}ensureXRef(P,Z){return this.ensure(this.pdfDocument.xref,P,Z)}ensureCatalog(P,Z){return this.ensure(this.pdfDocument.catalog,P,Z)}getPage(P){return this.pdfDocument.getPage(P)}fontFallback(P,Z){return this.pdfDocument.fontFallback(P,Z)}cleanup(P=!1){return this.pdfDocument.cleanup(P)}async ensure(P,Z,q){O1("Abstract method `ensure` called")}requestRange(P,Z){O1("Abstract method `requestRange` called")}requestLoadedStream(P=!1){O1("Abstract method `requestLoadedStream` called")}sendProgressiveData(P){O1("Abstract method `sendProgressiveData` called")}updatePassword(P){this._password=P}terminate(P){O1("Abstract method `terminate` called")}}function BR(){}function K0(P){if(P instanceof y8||P instanceof b7||P instanceof L7||P instanceof iX||P instanceof gP)return P;switch(P instanceof Error||typeof P=="object"&&P!==null||O1('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),P.name){case"AbortException":return new y8(P.message);case"InvalidPDFException":return new b7(P.message);case"PasswordException":return new L7(P.message,P.code);case"ResponseException":return new iX(P.message,P.status,P.missing);case"UnknownErrorException":return new gP(P.message,P.details)}return new gP(P.message,P.toString())}async function jR(P,Z,q,{encrypt:X=null}){let z=X?.createCipherTransform(P.num,P.gen);q.push(`${P.num} ${P.gen} obj
|
|
12
|
+
`),Z instanceof S?await CP(Z,q,z):Z instanceof T1?await fU(Z,q,z):(Array.isArray(Z)||ArrayBuffer.isView(Z))&&await GU(Z,q,z),q.push(`
|
|
13
|
+
endobj
|
|
14
|
+
`)}async function CP(P,Z,q){Z.push("<<");for(let X of P.getKeys())Z.push(` /${qq(X)} `),await QU(P.getRaw(X),Z,q);Z.push(">>")}async function fU(P,Z,q){let X=P.getBytes(),{dict:z}=P,[R,f]=await Promise.all([z.getAsync("Filter"),z.getAsync("DecodeParms")]),G=G8(Array.isArray(R)?await z.xref.fetchIfRefAsync(R[0]):R,"FlateDecode");if(X.length>=256||G)try{let Y=new CompressionStream("deflate"),W=Y.writable.getWriter();await W.ready,W.write(X).then(async()=>{await W.ready,await W.close()}).catch(()=>{});let $=await new Response(Y.readable).arrayBuffer(),_,J;X=new Uint8Array($),R?G||(_=Array.isArray(R)?[t.get("FlateDecode"),...R]:[t.get("FlateDecode"),R],f&&(J=Array.isArray(f)?[null,...f]:[null,f])):_=t.get("FlateDecode"),_&&z.set("Filter",_),J&&z.set("DecodeParms",J)}catch(Y){v1(`writeStream - cannot compress data: "${Y}".`)}let Q=W0(X);q&&(Q=q.encryptString(Q)),z.set("Length",Q.length),await CP(z,Z,q),Z.push(` stream
|
|
15
|
+
`,Q,`
|
|
16
|
+
endstream`)}async function GU(P,Z,q){Z.push("[");let X=!0;for(let z of P)X?X=!1:Z.push(" "),await QU(z,Z,q);Z.push("]")}async function QU(P,Z,q){P instanceof t?Z.push(`/${qq(P.name)}`):P instanceof f1?Z.push(`${P.num} ${P.gen} R`):Array.isArray(P)||ArrayBuffer.isView(P)?await GU(P,Z,q):typeof P=="string"?(q&&(P=q.encryptString(P)),Z.push(`(${j6(P)})`)):typeof P=="number"?Z.push(p1(P)):typeof P=="boolean"?Z.push(P.toString()):P instanceof S?await CP(P,Z,q):P instanceof T1?await fU(P,Z,q):P===null?Z.push("null"):v(`Unhandled value in writer: ${typeof P}, please file a bug.`)}function U9(P,Z,q,X){for(let z=Z+q-1;z>q-1;z--)X[z]=255&P,P>>=8;return q+Z}function YU(P,Z,q){let X=P.length;for(let z=0;z<X;z++)q[Z+z]=255&P.charCodeAt(z);return Z+X}function qx({xfaData:P,xfaDatasetsRef:Z,changes:q,xref:X}){if(P===null)P=function(R,f){let G=new P2({hasAttributes:!0}).parseFromString(R);for(let{xfa:Y}of f){if(!Y)continue;let{path:W,value:$}=Y;if(!W)continue;let _=Af(W),J=G.documentElement.searchNode(_,0);!J&&_.length>1&&(J=G.documentElement.searchNode([_.at(-1)],0)),J?J.childNodes=Array.isArray($)?$.map((U)=>new _6("value",U)):[new _6("#text",$)]:v(`Node not found for path: ${W}`)}let Q=[];return G.documentElement.dump(Q),Q.join("")}(X.fetchIfRef(Z).getString(),q);let z=new o8(P);z.dict=new S(X),z.dict.setIfName("Type","EmbeddedFile"),q.put(Z,{data:z})}function VR(P){let Z=[];for(let{ref:q}of P)q.num===Z.at(-2)+Z.at(-1)?Z[Z.length-1]+=1:Z.push(q.num,1);return Z}function xR(P,Z,q){if(Array.isArray(Z.fileIds)&&Z.fileIds.length>0){let X=function(z,R){let f=Math.floor(Date.now()/1000),G=R.filename||"",Q=[f.toString(),G,z.toString(),...R.infoMap.values()],Y=Math.sumPrecise(Q.map((_)=>_.length)),W=new Uint8Array(Y),$=0;for(let _ of Q)$=YU(_,$,W);return W0(w4(W,0,W.length))}(P,Z);q.set("ID",[Z.fileIds[0],X])}}async function Xx({originalData:P,xrefInfo:Z,changes:q,xref:X=null,hasXfa:z=!1,xfaDatasetsRef:R=null,hasXfaDatasetsEntry:f=!1,needAppearances:G,acroFormRef:Q=null,acroForm:Y=null,xfaData:W=null,useXrefStream:$=!1}){await async function({xref:H,acroForm:M,acroFormRef:x,hasXfa:A,hasXfaDatasetsEntry:k,xfaDatasetsRef:b,needAppearances:O,changes:p}){if(!A||k||b||v("XFA - Cannot save it"),!O&&(!A||!b||k))return;let D=M.clone();if(A&&!k){let n=M.get("XFA").slice();n.splice(2,0,"datasets"),n.splice(3,0,b),D.set("XFA",n)}O&&D.set("NeedAppearances",!0),p.put(x,{data:D})}({xref:X,acroForm:Y,acroFormRef:Q,hasXfa:z,hasXfaDatasetsEntry:f,xfaDatasetsRef:R,needAppearances:G,changes:q}),z&&qx({xfaData:W,xfaDatasetsRef:R,changes:q,xref:X});let _=function(H,M,x){let A=new S(null);A.set("Prev",H.startXRef);let k=H.newRef;return x?(M.put(k,{data:""}),A.set("Size",k.num+1),A.setIfName("Type","XRef")):A.set("Size",k.num),H.rootRef!==null&&A.set("Root",H.rootRef),H.infoRef!==null&&A.set("Info",H.infoRef),H.encryptRef!==null&&A.set("Encrypt",H.encryptRef),A}(Z,q,$),J=[],U=await async function(H,M,x=[]){let A=[];for(let[k,{data:b}]of H.items())b!==null&&typeof b!="string"?(await jR(k,b,x,M),A.push({ref:k,data:x.join("")}),x.length=0):A.push({ref:k,data:b});return A.sort((k,b)=>k.ref.num-b.ref.num)}(q,X,J),K=P.length,I=P.at(-1);I!==10&&I!==13&&(J.push(`
|
|
17
|
+
`),K+=1);for(let{data:H}of U)H!==null&&J.push(H);await($?async function(H,M,x,A,k){let b=[],O=0,p=0;for(let{ref:L,data:m}of x){let d;O=Math.max(O,M),m!==null?(d=Math.min(L.gen,65535),b.push([1,M,d]),M+=m.length):(d=Math.min(L.gen+1,65535),b.push([0,0,d])),p=Math.max(p,d)}A.set("Index",VR(x));let D=[1,Zz(O),Zz(p)];A.set("W",D),xR(M,H,A);let n=Math.sumPrecise(D),F=new Uint8Array(n*b.length),l=new Y8(F);l.dict=A;let C=0;for(let[L,m,d]of b)C=U9(L,D[0],C,F),C=U9(m,D[1],C,F),C=U9(d,D[2],C,F);await jR(H.newRef,l,k,{}),k.push(`startxref
|
|
18
|
+
`,M.toString(),`
|
|
19
|
+
%%EOF
|
|
20
|
+
`)}(Z,K,U,_,J):async function(H,M,x,A,k){k.push(`xref
|
|
21
|
+
`);let b=VR(x),O=0;for(let{ref:p,data:D}of x)p.num===b[O]&&(k.push(`${b[O]} ${b[O+1]}
|
|
22
|
+
`),O+=2),D!==null?(k.push(`${M.toString().padStart(10,"0")} ${Math.min(p.gen,65535).toString().padStart(5,"0")} n\r
|
|
23
|
+
`),M+=D.length):k.push(`0000000000 ${Math.min(p.gen+1,65535).toString().padStart(5,"0")} f\r
|
|
24
|
+
`);xR(M,H,A),k.push(`trailer
|
|
25
|
+
`),await CP(A,k),k.push(`
|
|
26
|
+
startxref
|
|
27
|
+
`,M.toString(),`
|
|
28
|
+
%%EOF
|
|
29
|
+
`)}(Z,K,U,_,J));let B=P.length+Math.sumPrecise(J.map((H)=>H.length)),j=new Uint8Array(B);j.set(P);let V=P.length;for(let H of J)V=YU(H,V,j);return j}class WU{constructor(P){this._msgHandler=P,this._contentLength=null,this._fullRequestReader=null,this._rangeRequestReaders=[]}getFullReader(){return t1(!this._fullRequestReader,"PDFWorkerStream.getFullReader can only be called once."),this._fullRequestReader=new $U(this._msgHandler),this._fullRequestReader}getRangeReader(P,Z){let q=new _U(P,Z,this._msgHandler);return this._rangeRequestReaders.push(q),q}cancelAllRequests(P){this._fullRequestReader?.cancel(P);for(let Z of this._rangeRequestReaders.slice(0))Z.cancel(P)}}class $U{constructor(P){this._msgHandler=P,this.onProgress=null,this._contentLength=null,this._isRangeSupported=!1,this._isStreamingSupported=!1;let Z=this._msgHandler.sendWithStream("GetReader");this._reader=Z.getReader(),this._headersReady=this._msgHandler.sendWithPromise("ReaderHeadersReady").then((q)=>{this._isStreamingSupported=q.isStreamingSupported,this._isRangeSupported=q.isRangeSupported,this._contentLength=q.contentLength})}get headersReady(){return this._headersReady}get contentLength(){return this._contentLength}get isStreamingSupported(){return this._isStreamingSupported}get isRangeSupported(){return this._isRangeSupported}async read(){let{value:P,done:Z}=await this._reader.read();return Z?{value:void 0,done:!0}:{value:P.buffer,done:!1}}cancel(P){this._reader.cancel(P)}}class _U{constructor(P,Z,q){this._msgHandler=q,this.onProgress=null;let X=this._msgHandler.sendWithStream("GetRangeReader",{begin:P,end:Z});this._reader=X.getReader()}get isStreamingSupported(){return!1}async read(){let{value:P,done:Z}=await this._reader.read();return Z?{value:void 0,done:!0}:{value:P.buffer,done:!1}}cancel(P){this._reader.cancel(P)}}class Y4{constructor(P){this.name=P,this.terminated=!1,this._capability=Promise.withResolvers()}get finished(){return this._capability.promise}finish(){this._capability.resolve()}terminate(){this.terminated=!0}ensureNotTerminated(){if(this.terminated)throw Error("Worker task was terminated")}}function Vx(P){Number.isInteger(P)&&(TP=P)}function xx(){return TP}function NP(P){TP>=R2.INFOS&&console.info(`Info: ${P}`)}function y1(P){TP>=R2.WARNINGS&&console.warn(`Warning: ${P}`)}function X8(P){throw Error(P)}function o1(P,Z){P||X8(Z)}function RX(P,Z=null,q=null){if(!P)return null;if(q&&typeof P=="string"){if(q.addDefaultProtocol&&P.startsWith("www."))P.match(/\./g)?.length>=2&&(P=`http://${P}`);if(q.tryConvertEncoding)try{P=decodeURIComponent(escape(P))}catch{}}let X=Z?URL.parse(P,Z):URL.parse(P);return function(z){switch(z?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(X)?X:null}function fX(P,Z,q=!1){let X=URL.parse(P);return X?(X.hash=Z,X.href):q&&RX(P,"http://example.com")?P.split("#",1)[0]+(Z?`#${Z}`:""):""}function D1(P,Z,q,X=!1){return Object.defineProperty(P,Z,{value:q,enumerable:!X,configurable:!0,writable:!1}),q}function jU(P){typeof P=="object"&&P?.length!==void 0||X8("Invalid argument for bytesToString");let Z=P.length,q=8192;if(Z<q)return String.fromCharCode.apply(null,P);let X=[];for(let z=0;z<Z;z+=q){let R=Math.min(z+q,Z),f=P.subarray(z,R);X.push(String.fromCharCode.apply(null,f))}return X.join("")}function f2(P){typeof P!="string"&&X8("Invalid argument for stringToBytes");let Z=P.length,q=new Uint8Array(Z);for(let X=0;X<Z;++X)q[X]=255&P.charCodeAt(X);return q}class k8{static get isLittleEndian(){return D1(this,"isLittleEndian",function(){let P=new Uint8Array(4);return P[0]=1,new Uint32Array(P.buffer,0,1)[0]===1}())}static get isEvalSupported(){return D1(this,"isEvalSupported",function(){try{return Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return D1(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get isImageDecoderSupported(){return D1(this,"isImageDecoderSupported",typeof ImageDecoder<"u")}static get platform(){let{platform:P,userAgent:Z}=navigator;return D1(this,"platform",{isAndroid:Z.includes("Android"),isLinux:P.includes("Linux"),isMac:P.includes("Mac"),isWindows:P.includes("Win"),isFirefox:Z.includes("Firefox")})}static get isCSSRoundSupported(){return D1(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}}class j1{static makeHexColor(P,Z,q){return`#${I9[P]}${I9[Z]}${I9[q]}`}static domMatrixToTransform(P){return[P.a,P.b,P.c,P.d,P.e,P.f]}static scaleMinMax(P,Z){let q;P[0]?(P[0]<0&&(q=Z[0],Z[0]=Z[2],Z[2]=q),Z[0]*=P[0],Z[2]*=P[0],P[3]<0&&(q=Z[1],Z[1]=Z[3],Z[3]=q),Z[1]*=P[3],Z[3]*=P[3]):(q=Z[0],Z[0]=Z[1],Z[1]=q,q=Z[2],Z[2]=Z[3],Z[3]=q,P[1]<0&&(q=Z[1],Z[1]=Z[3],Z[3]=q),Z[1]*=P[1],Z[3]*=P[1],P[2]<0&&(q=Z[0],Z[0]=Z[2],Z[2]=q),Z[0]*=P[2],Z[2]*=P[2]),Z[0]+=P[4],Z[1]+=P[5],Z[2]+=P[4],Z[3]+=P[5]}static transform(P,Z){return[P[0]*Z[0]+P[2]*Z[1],P[1]*Z[0]+P[3]*Z[1],P[0]*Z[2]+P[2]*Z[3],P[1]*Z[2]+P[3]*Z[3],P[0]*Z[4]+P[2]*Z[5]+P[4],P[1]*Z[4]+P[3]*Z[5]+P[5]]}static multiplyByDOMMatrix(P,Z){return[P[0]*Z.a+P[2]*Z.b,P[1]*Z.a+P[3]*Z.b,P[0]*Z.c+P[2]*Z.d,P[1]*Z.c+P[3]*Z.d,P[0]*Z.e+P[2]*Z.f+P[4],P[1]*Z.e+P[3]*Z.f+P[5]]}static applyTransform(P,Z,q=0){let X=P[q],z=P[q+1];P[q]=X*Z[0]+z*Z[2]+Z[4],P[q+1]=X*Z[1]+z*Z[3]+Z[5]}static applyTransformToBezier(P,Z,q=0){let X=Z[0],z=Z[1],R=Z[2],f=Z[3],G=Z[4],Q=Z[5];for(let Y=0;Y<6;Y+=2){let W=P[q+Y],$=P[q+Y+1];P[q+Y]=W*X+$*R+G,P[q+Y+1]=W*z+$*f+Q}}static applyInverseTransform(P,Z){let q=P[0],X=P[1],z=Z[0]*Z[3]-Z[1]*Z[2];P[0]=(q*Z[3]-X*Z[2]+Z[2]*Z[5]-Z[4]*Z[3])/z,P[1]=(-q*Z[1]+X*Z[0]+Z[4]*Z[1]-Z[5]*Z[0])/z}static axialAlignedBoundingBox(P,Z,q){let X=Z[0],z=Z[1],R=Z[2],f=Z[3],G=Z[4],Q=Z[5],Y=P[0],W=P[1],$=P[2],_=P[3],J=X*Y+G,U=J,K=X*$+G,I=K,B=f*W+Q,j=B,V=f*_+Q,H=V;if(z!==0||R!==0){let M=z*Y,x=z*$,A=R*W,k=R*_;J+=A,I+=A,K+=k,U+=k,B+=M,H+=M,V+=x,j+=x}q[0]=Math.min(q[0],J,K,U,I),q[1]=Math.min(q[1],B,V,j,H),q[2]=Math.max(q[2],J,K,U,I),q[3]=Math.max(q[3],B,V,j,H)}static inverseTransform(P){let Z=P[0]*P[3]-P[1]*P[2];return[P[3]/Z,-P[1]/Z,-P[2]/Z,P[0]/Z,(P[2]*P[5]-P[4]*P[3])/Z,(P[4]*P[1]-P[5]*P[0])/Z]}static singularValueDecompose2dScale(P,Z){let q=P[0],X=P[1],z=P[2],R=P[3],f=q**2+X**2,G=q*z+X*R,Q=z**2+R**2,Y=(f+Q)/2,W=Math.sqrt(Y**2-(f*Q-G**2));Z[0]=Math.sqrt(Y+W||1),Z[1]=Math.sqrt(Y-W||1)}static normalizeRect(P){let Z=P.slice(0);return P[0]>P[2]&&(Z[0]=P[2],Z[2]=P[0]),P[1]>P[3]&&(Z[1]=P[3],Z[3]=P[1]),Z}static intersect(P,Z){let q=Math.max(Math.min(P[0],P[2]),Math.min(Z[0],Z[2])),X=Math.min(Math.max(P[0],P[2]),Math.max(Z[0],Z[2]));if(q>X)return null;let z=Math.max(Math.min(P[1],P[3]),Math.min(Z[1],Z[3])),R=Math.min(Math.max(P[1],P[3]),Math.max(Z[1],Z[3]));return z>R?null:[q,z,X,R]}static pointBoundingBox(P,Z,q){q[0]=Math.min(q[0],P),q[1]=Math.min(q[1],Z),q[2]=Math.max(q[2],P),q[3]=Math.max(q[3],Z)}static rectBoundingBox(P,Z,q,X,z){z[0]=Math.min(z[0],P,q),z[1]=Math.min(z[1],Z,X),z[2]=Math.max(z[2],P,q),z[3]=Math.max(z[3],Z,X)}static#P(P,Z,q,X,z,R,f,G,Q,Y){if(Q<=0||Q>=1)return;let W=1-Q,$=Q*Q,_=$*Q,J=W*(W*(W*P+3*Q*Z)+3*$*q)+_*X,U=W*(W*(W*z+3*Q*R)+3*$*f)+_*G;Y[0]=Math.min(Y[0],J),Y[1]=Math.min(Y[1],U),Y[2]=Math.max(Y[2],J),Y[3]=Math.max(Y[3],U)}static#Z(P,Z,q,X,z,R,f,G,Q,Y,W,$){if(Math.abs(Q)<0.000000000001)return void(Math.abs(Y)>=0.000000000001&&this.#P(P,Z,q,X,z,R,f,G,-W/Y,$));let _=Y**2-4*W*Q;if(_<0)return;let J=Math.sqrt(_),U=2*Q;this.#P(P,Z,q,X,z,R,f,G,(-Y+J)/U,$),this.#P(P,Z,q,X,z,R,f,G,(-Y-J)/U,$)}static bezierBoundingBox(P,Z,q,X,z,R,f,G,Q){Q[0]=Math.min(Q[0],P,f),Q[1]=Math.min(Q[1],Z,G),Q[2]=Math.max(Q[2],P,f),Q[3]=Math.max(Q[3],Z,G),this.#Z(P,q,z,f,Z,X,R,G,3*(3*(q-z)-P+f),6*(P-2*q+z),3*(q-P),Q),this.#Z(P,q,z,f,Z,X,R,G,3*(3*(X-R)-Z+G),6*(Z-2*X+R),3*(X-Z),Q)}}function VU(P){return j9||(j9=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,AR=new Map([["ſt","ſt"]])),P.replaceAll(j9,(Z,q,X)=>q?q.normalize("NFKC"):AR.get(X))}function GX(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();let P=new Uint8Array(32);return crypto.getRandomValues(P),jU(P)}function l8(P,Z,q){return Math.min(Math.max(P,Z),q)}function xU(P){return Uint8Array.prototype.toBase64?P.toBase64():btoa(jU(P))}class r7{static textContent(P){let Z=[],q={items:Z,styles:Object.create(null)};return function X(z){if(!z)return;let R=null,f=z.name;if(f==="#text")R=z.value;else{if(!r7.shouldBuildText(f))return;z?.attributes?.textContent?R=z.attributes.textContent:z.value&&(R=z.value)}if(R!==null&&Z.push({str:R}),z.children)for(let G of z.children)X(G)}(P),q}static shouldBuildText(P){return!(P==="textarea"||P==="input"||P==="option"||P==="select")}}class vP{static setupStorage(P,Z,q,X,z){let R=X.getValue(Z,{value:null});switch(q.name){case"textarea":if(R.value!==null&&(P.textContent=R.value),z==="print")break;P.addEventListener("input",(f)=>{X.setValue(Z,{value:f.target.value})});break;case"input":if(q.attributes.type==="radio"||q.attributes.type==="checkbox"){if(R.value===q.attributes.xfaOn?P.setAttribute("checked",!0):R.value===q.attributes.xfaOff&&P.removeAttribute("checked"),z==="print")break;P.addEventListener("change",(f)=>{X.setValue(Z,{value:f.target.checked?f.target.getAttribute("xfaOn"):f.target.getAttribute("xfaOff")})})}else{if(R.value!==null&&P.setAttribute("value",R.value),z==="print")break;P.addEventListener("input",(f)=>{X.setValue(Z,{value:f.target.value})})}break;case"select":if(R.value!==null){P.setAttribute("value",R.value);for(let f of q.children)f.attributes.value===R.value?f.attributes.selected=!0:f.attributes.hasOwnProperty("selected")&&delete f.attributes.selected}P.addEventListener("input",(f)=>{let G=f.target.options,Q=G.selectedIndex===-1?"":G[G.selectedIndex].value;X.setValue(Z,{value:Q})})}}static setAttributes({html:P,element:Z,storage:q=null,intent:X,linkService:z}){let{attributes:R}=Z,f=P instanceof HTMLAnchorElement;R.type==="radio"&&(R.name=`${R.name}-${X}`);for(let[G,Q]of Object.entries(R))if(Q!=null)switch(G){case"class":Q.length&&P.setAttribute(G,Q.join(" "));break;case"dataId":break;case"id":P.setAttribute("data-element-id",Q);break;case"style":Object.assign(P.style,Q);break;case"textContent":P.textContent=Q;break;default:(!f||G!=="href"&&G!=="newWindow")&&P.setAttribute(G,Q)}f&&z.addLinkAttributes(P,R.href,R.newWindow),q&&R.dataId&&this.setupStorage(P,R.dataId,Z,q)}static render(P){let{annotationStorage:Z,linkService:q,xfaHtml:X}=P,z=P.intent||"display",R=document.createElement(X.name);X.attributes&&this.setAttributes({html:R,element:X,intent:z,linkService:q});let f=z!=="richText",G=P.div;if(G.append(R),P.viewport){let W=`matrix(${P.viewport.transform.join(",")})`;G.style.transform=W}f&&G.setAttribute("class","xfaLayer xfaFont");let Q=[];if(X.children.length===0){if(X.value){let W=document.createTextNode(X.value);R.append(W),f&&r7.shouldBuildText(X.name)&&Q.push(W)}return{textDivs:Q}}let Y=[[X,-1,R]];for(;Y.length>0;){let[W,$,_]=Y.at(-1);if($+1===W.children.length){Y.pop();continue}let J=W.children[++Y.at(-1)[1]];if(J===null)continue;let{name:U}=J;if(U==="#text"){let I=document.createTextNode(J.value);Q.push(I),_.append(I);continue}let K=J?.attributes?.xmlns?document.createElementNS(J.attributes.xmlns,U):document.createElement(U);if(_.append(K),J.attributes&&this.setAttributes({html:K,element:J,storage:Z,intent:z,linkService:q}),J.children?.length>0)Y.push([J,-1,K]);else if(J.value){let I=document.createTextNode(J.value);f&&r7.shouldBuildText(U)&&Q.push(I),K.append(I)}}for(let W of G.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))W.setAttribute("readOnly",!0);return{textDivs:Q}}static update(P){let Z=`matrix(${P.viewport.transform.join(",")})`;P.div.style.transform=Z,P.div.hidden=!1}}async function O6(P,Z="text"){if(G7(P,document.baseURI)){let q=await fetch(P);if(!q.ok)throw Error(q.statusText);switch(Z){case"arraybuffer":return q.arrayBuffer();case"blob":return q.blob();case"json":return q.json()}return q.text()}return new Promise((q,X)=>{let z=new XMLHttpRequest;z.open("GET",P,!0),z.responseType=Z,z.onreadystatechange=()=>{if(z.readyState===XMLHttpRequest.DONE)if(z.status!==200&&z.status!==0)X(Error(z.statusText));else{switch(Z){case"arraybuffer":case"blob":case"json":return void q(z.response)}q(z.responseText)}},z.send(null)})}class G2{constructor({viewBox:P,userUnit:Z,scale:q,rotation:X,offsetX:z=0,offsetY:R=0,dontFlip:f=!1}){this.viewBox=P,this.userUnit=Z,this.scale=q,this.rotation=X,this.offsetX=z,this.offsetY=R,q*=Z;let G=(P[2]+P[0])/2,Q=(P[3]+P[1])/2,Y,W,$,_,J,U,K,I;switch((X%=360)<0&&(X+=360),X){case 180:Y=-1,W=0,$=0,_=1;break;case 90:Y=0,W=1,$=1,_=0;break;case 270:Y=0,W=-1,$=-1,_=0;break;case 0:Y=1,W=0,$=0,_=-1;break;default:throw Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}f&&($=-$,_=-_),Y===0?(J=Math.abs(Q-P[1])*q+z,U=Math.abs(G-P[0])*q+R,K=(P[3]-P[1])*q,I=(P[2]-P[0])*q):(J=Math.abs(G-P[0])*q+z,U=Math.abs(Q-P[1])*q+R,K=(P[2]-P[0])*q,I=(P[3]-P[1])*q),this.transform=[Y*q,W*q,$*q,_*q,J-Y*q*G-$*q*Q,U-W*q*G-_*q*Q],this.width=K,this.height=I}get rawDims(){let P=this.viewBox;return D1(this,"rawDims",{pageWidth:P[2]-P[0],pageHeight:P[3]-P[1],pageX:P[0],pageY:P[1]})}clone({scale:P=this.scale,rotation:Z=this.rotation,offsetX:q=this.offsetX,offsetY:X=this.offsetY,dontFlip:z=!1}={}){return new G2({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:P,rotation:Z,offsetX:q,offsetY:X,dontFlip:z})}convertToViewportPoint(P,Z){let q=[P,Z];return j1.applyTransform(q,this.transform),q}convertToViewportRectangle(P){let Z=[P[0],P[1]];j1.applyTransform(Z,this.transform);let q=[P[2],P[3]];return j1.applyTransform(q,this.transform),[Z[0],Z[1],q[0],q[1]]}convertToPdfPoint(P,Z){let q=[P,Z];return j1.applyInverseTransform(q,this.transform),q}}function Y2(P){let Z=P.length,q=0;for(;q<Z&&P[q].trim()==="";)q++;return P.substring(q,q+5).toLowerCase()==="data:"}function FP(P){return typeof P=="string"&&/\.pdf$/i.test(P)}function HU(P){return[P]=P.split(/[#?]/,1),P.substring(P.lastIndexOf("/")+1)}function MU(P,Z="document.pdf"){if(typeof P!="string")return Z;if(Y2(P))return y1('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),Z;let q=((f)=>{try{return new URL(f)}catch{try{return new URL(decodeURIComponent(f))}catch{try{return new URL(f,"https://foo.bar")}catch{try{return new URL(decodeURIComponent(f),"https://foo.bar")}catch{return null}}}}})(P);if(!q)return Z;let X=(f)=>{try{let G=decodeURIComponent(f);return G.includes("/")?(G=G.split("/").at(-1),G.test(/^\.pdf$/i)?G:f):G}catch{return f}},z=/\.pdf$/i,R=q.pathname.split("/").at(-1);if(z.test(R))return X(R);if(q.searchParams.size>0){let f=Array.from(q.searchParams.values()).reverse();for(let Q of f)if(z.test(Q))return X(Q);let G=Array.from(q.searchParams.keys()).reverse();for(let Q of G)if(z.test(Q))return X(Q)}if(q.hash){let f=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i.exec(q.hash);if(f)return X(f[0])}return Z}class yZ{started=Object.create(null);times=[];time(P){P in this.started&&y1(`Timer is already running for ${P}`),this.started[P]=Date.now()}timeEnd(P){P in this.started||y1(`Timer has not been started for ${P}`),this.times.push({name:P,start:this.started[P],end:Date.now()}),delete this.started[P]}toString(){let P=[],Z=0;for(let{name:q}of this.times)Z=Math.max(q.length,Z);for(let{name:q,start:X,end:z}of this.times)P.push(`${q.padEnd(Z)} ${z-X}ms
|
|
30
|
+
`);return P.join("")}}function G7(P,Z){let q=Z?URL.parse(P,Z):URL.parse(P);return q?.protocol==="http:"||q?.protocol==="https:"}function A0(P){P.preventDefault()}function _8(P){P.preventDefault(),P.stopPropagation()}class l7{static#P;static toDateObject(P){if(P instanceof Date)return P;if(!P||typeof P!="string")return null;this.#P||=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?");let Z=this.#P.exec(P);if(!Z)return null;let q=parseInt(Z[1],10),X=parseInt(Z[2],10);X=X>=1&&X<=12?X-1:0;let z=parseInt(Z[3],10);z=z>=1&&z<=31?z:1;let R=parseInt(Z[4],10);R=R>=0&&R<=23?R:0;let f=parseInt(Z[5],10);f=f>=0&&f<=59?f:0;let G=parseInt(Z[6],10);G=G>=0&&G<=59?G:0;let Q=Z[7]||"Z",Y=parseInt(Z[8],10);Y=Y>=0&&Y<=23?Y:0;let W=parseInt(Z[9],10)||0;return W=W>=0&&W<=59?W:0,Q==="-"?(R+=Y,f+=W):Q==="+"&&(R-=Y,f-=W),new Date(Date.UTC(q,X,z,R,f,G))}}function AU(P,{scale:Z=1,rotation:q=0}){let{width:X,height:z}=P.attributes.style,R=[0,0,parseInt(X),parseInt(z)];return new G2({viewBox:R,userUnit:1,scale:Z,rotation:q})}function T6(P){if(P.startsWith("#")){let Z=parseInt(P.slice(1),16);return[(16711680&Z)>>16,(65280&Z)>>8,255&Z]}return P.startsWith("rgb(")?P.slice(4,-1).split(",").map((Z)=>parseInt(Z)):P.startsWith("rgba(")?P.slice(5,-1).split(",").map((Z)=>parseInt(Z)).slice(0,3):(y1(`Not a valid color format: "${P}"`),[0,0,0])}function $8(P){let{a:Z,b:q,c:X,d:z,e:R,f}=P.getTransform();return[Z,q,X,z,R,f]}function s0(P){let{a:Z,b:q,c:X,d:z,e:R,f}=P.getTransform().invertSelf();return[Z,q,X,z,R,f]}function i4(P,Z,q=!1,X=!0){if(Z instanceof G2){let{pageWidth:z,pageHeight:R}=Z.rawDims,{style:f}=P,G=k8.isCSSRoundSupported,Q=`var(--total-scale-factor) * ${z}px`,Y=`var(--total-scale-factor) * ${R}px`,W=G?`round(down, ${Q}, var(--scale-round-x))`:`calc(${Q})`,$=G?`round(down, ${Y}, var(--scale-round-y))`:`calc(${Y})`;q&&Z.rotation%180!=0?(f.width=$,f.height=W):(f.width=W,f.height=$)}X&&P.setAttribute("data-main-rotation",Z.rotation)}class u0{constructor(){let{pixelRatio:P}=u0;this.sx=P,this.sy=P}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}limitCanvas(P,Z,q,X,z=-1){let R=1/0,f=1/0,G=1/0;(q=u0.capPixels(q,z))>0&&(R=Math.sqrt(q/(P*Z))),X!==-1&&(f=X/P,G=X/Z);let Q=Math.min(R,f,G);return(this.sx>Q||this.sy>Q)&&(this.sx=Q,this.sy=Q,!0)}static get pixelRatio(){return globalThis.devicePixelRatio||1}static capPixels(P,Z){if(Z>=0){let q=Math.ceil(window.screen.availWidth*window.screen.availHeight*this.pixelRatio**2*(1+Z/100));return P>0?Math.min(P,q):q}return P}}class LU{static get isDarkMode(){return D1(this,"isDarkMode",!!window?.matchMedia?.("(prefers-color-scheme: dark)").matches)}}class YX{static get commentForegroundColor(){let P=document.createElement("span");P.classList.add("comment","sidebar");let{style:Z}=P;Z.width=Z.height="0",Z.display="none",Z.color="var(--comment-fg-color)",document.body.append(P);let{color:q}=window.getComputedStyle(P);return P.remove(),D1(this,"commentForegroundColor",T6(q))}}function bU(P,Z,q,X){let z=255*(1-(X=Math.min(Math.max(X??1,0),1)));return[P=Math.round(P*X+z),Z=Math.round(Z*X+z),q=Math.round(q*X+z)]}function LR(P,Z){let q=P[0]/255,X=P[1]/255,z=P[2]/255,R=Math.max(q,X,z),f=Math.min(q,X,z),G=(R+f)/2;if(R===f)Z[0]=Z[1]=0;else{let Q=R-f;switch(Z[1]=G<0.5?Q/(R+f):Q/(2-R-f),R){case q:Z[0]=60*((X-z)/Q+(X<z?6:0));break;case X:Z[0]=60*((z-q)/Q+2);break;case z:Z[0]=60*((q-X)/Q+4)}}Z[2]=G}function DZ(P,Z){let q=P[0],X=P[1],z=P[2],R=(1-Math.abs(2*z-1))*X,f=R*(1-Math.abs(q/60%2-1)),G=z-R/2;switch(Math.floor(q/60)){case 0:Z[0]=R+G,Z[1]=f+G,Z[2]=G;break;case 1:Z[0]=f+G,Z[1]=R+G,Z[2]=G;break;case 2:Z[0]=G,Z[1]=R+G,Z[2]=f+G;break;case 3:Z[0]=G,Z[1]=f+G,Z[2]=R+G;break;case 4:Z[0]=f+G,Z[1]=G,Z[2]=R+G;break;case 5:case 6:Z[0]=R+G,Z[1]=G,Z[2]=f+G}}function bR(P){return P<=0.03928?P/12.92:((P+0.055)/1.055)**2.4}function kR(P,Z,q){DZ(P,q),q.map(bR);let X=0.2126*q[0]+0.7152*q[1]+0.0722*q[2];DZ(Z,q),q.map(bR);let z=0.2126*q[0]+0.7152*q[1]+0.0722*q[2];return X>z?(X+0.05)/(z+0.05):(z+0.05)/(X+0.05)}function kU(P,Z){let q=P[0]+256*P[1]+65536*P[2]+16777216*Z[0]+4294967296*Z[1]+1099511627776*Z[2],X=CR.get(q);if(X)return X;let z=new Float32Array(9),R=z.subarray(0,3),f=z.subarray(3,6);LR(P,f);let G=z.subarray(6,9);LR(Z,G);let Q=G[2]<0.5,Y=Q?12:4.5;if(f[2]=Q?Math.sqrt(f[2]):1-Math.sqrt(1-f[2]),kR(f,G,R)<Y){let W,$;Q?(W=f[2],$=1):(W=0,$=f[2]);let _=0.005;for(;$-W>_;){let J=f[2]=(W+$)/2;Q===kR(f,G,R)<Y?W=J:$=J}f[2]=Q?$:W}return DZ(f,R),X=j1.makeHexColor(Math.round(255*R[0]),Math.round(255*R[1]),Math.round(255*R[2])),CR.set(q,X),X}function WX({html:P,dir:Z,className:q},X){let z=document.createDocumentFragment();if(typeof P=="string"){let R=document.createElement("p");R.dir=Z||"auto";let f=P.split(/(?:\r\n?|\n)/);for(let G=0,Q=f.length;G<Q;++G){let Y=f[G];R.append(document.createTextNode(Y)),G<Q-1&&R.append(document.createElement("br"))}z.append(R)}else vP.render({xfaHtml:P,div:z,intent:"richText"});z.firstChild.classList.add("richText",q),X.append(z)}class H7{#P=null;#Z=null;#X;#q=null;#z=null;#R=null;#G=null;#f=null;static#Q=null;constructor(P){this.#X=P,H7.#Q||=Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button",signature:"pdfjs-editor-remove-signature-button"})}render(){let P=this.#P=document.createElement("div");P.classList.add("editToolbar","hidden"),P.setAttribute("role","toolbar");let Z=this.#X._uiManager._signal;Z instanceof AbortSignal&&!Z.aborted&&(P.addEventListener("contextmenu",A0,{signal:Z}),P.addEventListener("pointerdown",H7.#Y,{signal:Z}));let q=this.#q=document.createElement("div");q.className="buttons",P.append(q);let X=this.#X.toolbarPosition;if(X){let{style:z}=P,R=this.#X._uiManager.direction==="ltr"?1-X[0]:X[0];z.insetInlineEnd=100*R+"%",z.top=`calc(${100*X[1]}% + var(--editor-toolbar-vert-offset))`}return P}get div(){return this.#P}static#Y(P){P.stopPropagation()}#_(P){this.#X._focusEventsAllowed=!1,_8(P)}#$(P){this.#X._focusEventsAllowed=!0,_8(P)}#J(P){let Z=this.#X._uiManager._signal;return Z instanceof AbortSignal&&!Z.aborted&&(P.addEventListener("focusin",this.#_.bind(this),{capture:!0,signal:Z}),P.addEventListener("focusout",this.#$.bind(this),{capture:!0,signal:Z}),P.addEventListener("contextmenu",A0,{signal:Z}),!0)}hide(){this.#P.classList.add("hidden"),this.#Z?.hideDropdown()}show(){this.#P.classList.remove("hidden"),this.#z?.shown(),this.#R?.shown()}addDeleteButton(){let{editorType:P,_uiManager:Z}=this.#X,q=document.createElement("button");q.classList.add("basic","deleteButton"),q.tabIndex=0,q.setAttribute("data-l10n-id",H7.#Q[P]),this.#J(q)&&q.addEventListener("click",(X)=>{Z.delete()},{signal:Z._signal}),this.#q.append(q)}get#B(){let P=document.createElement("div");return P.className="divider",P}async addAltText(P){let Z=await P.render();this.#J(Z),this.#q.append(Z,this.#B),this.#z=P}addComment(P,Z=null){if(this.#R)return;let q=P.renderForToolbar();if(!q)return;this.#J(q);let X=this.#G=this.#B;Z?(this.#q.insertBefore(q,Z),this.#q.insertBefore(X,Z)):this.#q.append(q,X),this.#R=P,P.toolbar=this}addColorPicker(P){if(this.#Z)return;this.#Z=P;let Z=P.renderButton();this.#J(Z),this.#q.append(Z,this.#B)}async addEditSignatureButton(P){let Z=this.#f=await P.renderEditButton(this.#X);this.#J(Z),this.#q.append(Z,this.#B)}removeButton(P){if(P==="comment")this.#R?.removeToolbarCommentButton(),this.#R=null,this.#G?.remove(),this.#G=null}async addButton(P,Z){switch(P){case"colorPicker":this.addColorPicker(Z);break;case"altText":await this.addAltText(Z);break;case"editSignature":await this.addEditSignatureButton(Z);break;case"delete":this.addDeleteButton();break;case"comment":this.addComment(Z)}}async addButtonBefore(P,Z,q){let X=this.#q.querySelector(q);X&&P==="comment"&&this.addComment(Z,X)}updateEditSignatureButton(P){this.#f&&(this.#f.title=P)}remove(){this.#P.remove(),this.#Z?.destroy(),this.#Z=null}}class CU{#P=null;#Z=null;#X;constructor(P){this.#X=P}#q(){let P=this.#Z=document.createElement("div");P.className="editToolbar",P.setAttribute("role","toolbar");let Z=this.#X._signal;Z instanceof AbortSignal&&!Z.aborted&&P.addEventListener("contextmenu",A0,{signal:Z});let q=this.#P=document.createElement("div");return q.className="buttons",P.append(q),this.#X.hasCommentManager()&&this.#R("commentButton","pdfjs-comment-floating-button","pdfjs-comment-floating-button-label",()=>{this.#X.commentSelection("floating_button")}),this.#R("highlightButton","pdfjs-highlight-floating-button1","pdfjs-highlight-floating-button-label",()=>{this.#X.highlightSelection("floating_button")}),P}#z(P,Z){let q=0,X=0;for(let z of P){let R=z.y+z.height;if(R<q)continue;let f=z.x+(Z?z.width:0);R>q?(X=f,q=R):Z?f>X&&(X=f):f<X&&(X=f)}return[Z?1-X:X,q]}show(P,Z,q){let[X,z]=this.#z(Z,q),{style:R}=this.#Z||=this.#q();P.append(this.#Z),R.insetInlineEnd=100*X+"%",R.top=`calc(${100*z}% + var(--editor-toolbar-vert-offset))`}hide(){this.#Z.remove()}#R(P,Z,q,X){let z=document.createElement("button");z.classList.add("basic",P),z.tabIndex=0,z.setAttribute("data-l10n-id",Z);let R=document.createElement("span");z.append(R),R.className="visuallyHidden",R.setAttribute("data-l10n-id",q);let f=this.#X._signal;f instanceof AbortSignal&&!f.aborted&&(z.addEventListener("contextmenu",A0,{signal:f}),z.addEventListener("click",X,{signal:f})),this.#P.append(z)}}function TU(P,Z,q){for(let X of q)Z.addEventListener(X,P[X].bind(P))}class NU{#P=0;get id(){return`${s7}${this.#P++}`}}class $X{#P=GX();#Z=0;#X=null;static get _isSVGFittingCanvas(){let P=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),Z=new Image;return Z.src='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',D1(this,"_isSVGFittingCanvas",Z.decode().then(()=>(P.drawImage(Z,0,0,1,1,0,0,1,3),new Uint32Array(P.getImageData(0,0,1,1).data.buffer)[0]===0)))}async#q(P,Z){this.#X||=new Map;let q=this.#X.get(P);if(q===null)return null;if(q?.bitmap)return q.refCounter+=1,q;try{let X;if(q||={bitmap:null,id:`image_${this.#P}_${this.#Z++}`,refCounter:0,isSvg:!1},typeof Z=="string"?(q.url=Z,X=await O6(Z,"blob")):Z instanceof File?X=q.file=Z:Z instanceof Blob&&(X=Z),X.type==="image/svg+xml"){let z=$X._isSVGFittingCanvas,R=new FileReader,f=new Image,G=new Promise((Q,Y)=>{f.onload=()=>{q.bitmap=f,q.isSvg=!0,Q()},R.onload=async()=>{let W=q.svgUrl=R.result;f.src=await z?`${W}#svgView(preserveAspectRatio(none))`:W},f.onerror=R.onerror=Y});R.readAsDataURL(X),await G}else q.bitmap=await createImageBitmap(X);q.refCounter=1}catch(X){y1(X),q=null}return this.#X.set(P,q),q&&this.#X.set(q.id,q),q}async getFromFile(P){let{lastModified:Z,name:q,size:X,type:z}=P;return this.#q(`${Z}_${q}_${X}_${z}`,P)}async getFromUrl(P){return this.#q(P,P)}async getFromBlob(P,Z){let q=await Z;return this.#q(P,q)}async getFromId(P){this.#X||=new Map;let Z=this.#X.get(P);if(!Z)return null;if(Z.bitmap)return Z.refCounter+=1,Z;if(Z.file)return this.getFromFile(Z.file);if(Z.blobPromise){let{blobPromise:q}=Z;return delete Z.blobPromise,this.getFromBlob(Z.id,q)}return this.getFromUrl(Z.url)}getFromCanvas(P,Z){this.#X||=new Map;let q=this.#X.get(P);if(q?.bitmap)return q.refCounter+=1,q;let X=new OffscreenCanvas(Z.width,Z.height);return X.getContext("2d").drawImage(Z,0,0),q={bitmap:X.transferToImageBitmap(),id:`image_${this.#P}_${this.#Z++}`,refCounter:1,isSvg:!1},this.#X.set(P,q),this.#X.set(q.id,q),q}getSvgUrl(P){let Z=this.#X.get(P);return Z?.isSvg?Z.svgUrl:null}deleteId(P){this.#X||=new Map;let Z=this.#X.get(P);if(!Z)return;if(Z.refCounter-=1,Z.refCounter!==0)return;let{bitmap:q}=Z;if(!Z.url&&!Z.file){let X=new OffscreenCanvas(q.width,q.height);X.getContext("bitmaprenderer").transferFromImageBitmap(q),Z.blobPromise=X.convertToBlob()}q.close?.(),Z.bitmap=null}isValidId(P){return P.startsWith(`image_${this.#P}_`)}}class vU{#P=[];#Z=!1;#X;#q=-1;constructor(P=128){this.#X=P}add({cmd:P,undo:Z,post:q,mustExec:X,type:z=NaN,overwriteIfSameType:R=!1,keepUndo:f=!1}){if(X&&P(),this.#Z)return;let G={cmd:P,undo:Z,post:q,type:z};if(this.#q===-1)return this.#P.length>0&&(this.#P.length=0),this.#q=0,void this.#P.push(G);if(R&&this.#P[this.#q].type===z)return f&&(G.undo=this.#P[this.#q].undo),void(this.#P[this.#q]=G);let Q=this.#q+1;Q===this.#X?this.#P.splice(0,1):(this.#q=Q,Q<this.#P.length&&this.#P.splice(Q)),this.#P.push(G)}undo(){if(this.#q===-1)return;this.#Z=!0;let{undo:P,post:Z}=this.#P[this.#q];P(),Z?.(),this.#Z=!1,this.#q-=1}redo(){if(this.#q<this.#P.length-1){this.#q+=1,this.#Z=!0;let{cmd:P,post:Z}=this.#P[this.#q];P(),Z?.(),this.#Z=!1}}hasSomethingToUndo(){return this.#q!==-1}hasSomethingToRedo(){return this.#q<this.#P.length-1}cleanType(P){if(this.#q!==-1){for(let Z=this.#q;Z>=0;Z--)if(this.#P[Z].type!==P)return this.#P.splice(Z+1,this.#q-Z),void(this.#q=Z);this.#P.length=0,this.#q=-1}}destroy(){this.#P=null}}class y6{constructor(P){this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;let{isMac:Z}=k8.platform;for(let[q,X,z={}]of P)for(let R of q){let f=R.startsWith("mac+");Z&&f?(this.callbacks.set(R.slice(4),{callback:X,options:z}),this.allKeys.add(R.split("+").at(-1))):Z||f||(this.callbacks.set(R,{callback:X,options:z}),this.allKeys.add(R.split("+").at(-1)))}}#P(P){P.altKey&&this.buffer.push("alt"),P.ctrlKey&&this.buffer.push("ctrl"),P.metaKey&&this.buffer.push("meta"),P.shiftKey&&this.buffer.push("shift"),this.buffer.push(P.key);let Z=this.buffer.join("+");return this.buffer.length=0,Z}exec(P,Z){if(!this.allKeys.has(Z.key))return;let q=this.callbacks.get(this.#P(Z));if(!q)return;let{callback:X,options:{bubbles:z=!1,args:R=[],checker:f=null}}=q;f&&!f(P,Z)||(X.bind(P,...R,Z)(),z||_8(Z))}}class T4{#P=new AbortController;#Z=null;#X=null;#q=new Map;#z=new Map;#R=null;#G=null;#f=null;#Q=new vU;#Y=null;#_=null;#$=null;#J=0;#B=new Set;#K=null;#W=null;#U=new Set;_editorUndoBar=null;#I=!1;#V=!1;#j=!1;#b=null;#A=null;#x=null;#C=null;#M=!1;#L=null;#v=new NU;#T=!1;#N=!1;#D=!1;#S=null;#p=null;#w=null;#O=null;#s=null;#k=m1.NONE;#H=new Set;#m=null;#E=null;#g=null;#l=null;#r=null;#o={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1};#d=[0,0];#y=null;#h=null;#t=null;#e=null;#u=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){let P=T4.prototype,Z=(R)=>R.#h.contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&R.hasSomethingToControl(),q=(R,{target:f})=>{if(f instanceof HTMLInputElement){let{type:G}=f;return G!=="text"&&G!=="number"}return!0},X=this.TRANSLATE_SMALL,z=this.TRANSLATE_BIG;return D1(this,"_keyboardManager",new y6([[["ctrl+a","mac+meta+a"],P.selectAll,{checker:q}],[["ctrl+z","mac+meta+z"],P.undo,{checker:q}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],P.redo,{checker:q}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],P.delete,{checker:q}],[["Enter","mac+Enter"],P.addNewEditorFromKeyboard,{checker:(R,{target:f})=>!(f instanceof HTMLButtonElement)&&R.#h.contains(f)&&!R.isEnterHandled}],[[" ","mac+ "],P.addNewEditorFromKeyboard,{checker:(R,{target:f})=>!(f instanceof HTMLButtonElement)&&R.#h.contains(document.activeElement)}],[["Escape","mac+Escape"],P.unselectAll],[["ArrowLeft","mac+ArrowLeft"],P.translateSelectedEditors,{args:[-X,0],checker:Z}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],P.translateSelectedEditors,{args:[-z,0],checker:Z}],[["ArrowRight","mac+ArrowRight"],P.translateSelectedEditors,{args:[X,0],checker:Z}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],P.translateSelectedEditors,{args:[z,0],checker:Z}],[["ArrowUp","mac+ArrowUp"],P.translateSelectedEditors,{args:[0,-X],checker:Z}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],P.translateSelectedEditors,{args:[0,-z],checker:Z}],[["ArrowDown","mac+ArrowDown"],P.translateSelectedEditors,{args:[0,X],checker:Z}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],P.translateSelectedEditors,{args:[0,z],checker:Z}]]))}constructor(P,Z,q,X,z,R,f,G,Q,Y,W,$,_,J,U,K){let I=this._signal=this.#P.signal;this.#h=P,this.#t=Z,this.#e=q,this.#R=X,this.#Y=z,this.#E=R,this.#r=G,this._eventBus=f,f._on("editingaction",this.onEditingAction.bind(this),{signal:I}),f._on("pagechanging",this.onPageChanging.bind(this),{signal:I}),f._on("scalechanging",this.onScaleChanging.bind(this),{signal:I}),f._on("rotationchanging",this.onRotationChanging.bind(this),{signal:I}),f._on("setpreference",this.onSetPreference.bind(this),{signal:I}),f._on("switchannotationeditorparams",(B)=>this.updateParams(B.type,B.value),{signal:I}),window.addEventListener("pointerdown",()=>{this.#N=!0},{capture:!0,signal:I}),window.addEventListener("pointerup",()=>{this.#N=!1},{capture:!0,signal:I}),this.#Q1(),this.#_1(),this.#Z1(),this.#G=G.annotationStorage,this.#b=G.filterFactory,this.#g=Q,this.#C=Y||null,this.#I=W,this.#V=$,this.#j=_,this.#s=J||null,this.viewParameters={realScale:n4.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=U||null,this._supportsPinchToZoom=K!==!1,z?.setSidebarUiManager(this)}destroy(){this.#u?.resolve(),this.#u=null,this.#P?.abort(),this.#P=null,this._signal=null;for(let P of this.#z.values())P.destroy();this.#z.clear(),this.#q.clear(),this.#U.clear(),this.#O?.clear(),this.#Z=null,this.#H.clear(),this.#Q.destroy(),this.#R?.destroy(),this.#Y?.destroy(),this.#E?.destroy(),this.#L?.hide(),this.#L=null,this.#w?.destroy(),this.#w=null,this.#X=null,this.#A&&(clearTimeout(this.#A),this.#A=null),this.#y&&(clearTimeout(this.#y),this.#y=null),this._editorUndoBar?.destroy(),this.#r=null}combinedSignal(P){return AbortSignal.any([this._signal,P.signal])}get mlManager(){return this.#s}get useNewAltTextFlow(){return this.#V}get useNewAltTextWhenAddingImage(){return this.#j}get hcmFilter(){return D1(this,"hcmFilter",this.#g?this.#b.addHCMFilter(this.#g.foreground,this.#g.background):"none")}get direction(){return D1(this,"direction",getComputedStyle(this.#h).direction)}get _highlightColors(){return D1(this,"_highlightColors",this.#C?new Map(this.#C.split(",").map((P)=>((P=P.split("=").map((Z)=>Z.trim()))[1]=P[1].toUpperCase(),P))):null)}get highlightColors(){let{_highlightColors:P}=this;if(!P)return D1(this,"highlightColors",null);let Z=new Map,q=!!this.#g;for(let[X,z]of P){let R=X.endsWith("_HCM");q&&R?Z.set(X.replace("_HCM",""),z):q||R||Z.set(X,z)}return D1(this,"highlightColors",Z)}get highlightColorNames(){return D1(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,(P)=>P.reverse())):null)}getNonHCMColor(P){if(!this._highlightColors)return P;let Z=this.highlightColorNames.get(P);return this._highlightColors.get(Z)||P}getNonHCMColorName(P){return this.highlightColorNames.get(P)||P}setCurrentDrawingSession(P){P?(this.unselectAll(),this.disableUserSelect(!0)):this.disableUserSelect(!1),this.#$=P}setMainHighlightColorPicker(P){this.#w=P}editAltText(P,Z=!1){this.#R?.editAltText(this,P,Z)}hasCommentManager(){return!!this.#Y}editComment(P,Z,q,X){this.#Y?.showDialog(this,P,Z,q,X)}selectComment(P,Z){this.#z.get(P)?.getEditorByUID(Z)?.toggleComment(!0,!0)}updateComment(P){this.#Y?.updateComment(P.getData())}updatePopupColor(P){this.#Y?.updatePopupColor(P)}removeComment(P){this.#Y?.removeComments([P.uid])}toggleComment(P,Z,q=void 0){this.#Y?.toggleCommentPopup(P,Z,q)}makeCommentColor(P,Z){return P&&this.#Y?.makeCommentColor(P,Z)||null}getCommentDialogElement(){return this.#Y?.dialogElement||null}async waitForEditorsRendered(P){if(this.#z.has(P-1))return;let{resolve:Z,promise:q}=Promise.withResolvers(),X=(z)=>{z.pageNumber===P&&(this._eventBus._off("editorsrendered",X),Z())};this._eventBus.on("editorsrendered",X),await q}getSignature(P){this.#E?.getSignature({uiManager:this,editor:P})}get signatureManager(){return this.#E}switchToMode(P,Z){this._eventBus.on("annotationeditormodechanged",Z,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:P})}setPreference(P,Z){this._eventBus.dispatch("setpreference",{source:this,name:P,value:Z})}onSetPreference({name:P,value:Z}){if(P==="enableNewAltTextWhenAddingImage")this.#j=Z}onPageChanging({pageNumber:P}){this.#J=P-1}focusMainContainer(){this.#h.focus()}findParent(P,Z){for(let q of this.#z.values()){let{x:X,y:z,width:R,height:f}=q.div.getBoundingClientRect();if(P>=X&&P<=X+R&&Z>=z&&Z<=z+f)return q}return null}disableUserSelect(P=!1){this.#t.classList.toggle("noUserSelect",P)}addShouldRescale(P){this.#U.add(P)}removeShouldRescale(P){this.#U.delete(P)}onScaleChanging({scale:P}){this.commitOrRemove(),this.viewParameters.realScale=P*n4.PDF_TO_CSS_UNITS;for(let Z of this.#U)Z.onScaleChanging();this.#$?.onScaleChanging()}onRotationChanging({pagesRotation:P}){this.commitOrRemove(),this.viewParameters.rotation=P}#i({anchorNode:P}){return P.nodeType===Node.TEXT_NODE?P.parentElement:P}#P1(P){let{currentLayer:Z}=this;if(Z.hasTextLayer(P))return Z;for(let q of this.#z.values())if(q.hasTextLayer(P))return q;return null}highlightSelection(P="",Z=!1){let q=document.getSelection();if(!q||q.isCollapsed)return;let{anchorNode:X,anchorOffset:z,focusNode:R,focusOffset:f}=q,G=q.toString(),Q=this.#i(q).closest(".textLayer"),Y=this.getSelectionBoxes(Q);if(!Y)return;q.empty();let W=this.#P1(Q),$=this.#k===m1.NONE,_=()=>{let J=W?.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:P,boxes:Y,anchorNode:X,anchorOffset:z,focusNode:R,focusOffset:f,text:G});$&&this.showAllEditors("highlight",!0,!0),Z&&J?.editComment()};$?this.switchToMode(m1.HIGHLIGHT,_):_()}commentSelection(P=""){this.highlightSelection(P,!0)}#f1(){let P=document.getSelection();if(!P||P.isCollapsed)return;let Z=this.#i(P).closest(".textLayer"),q=this.getSelectionBoxes(Z);q&&(this.#L||=new CU(this),this.#L.show(Z,q,this.direction==="ltr"))}getAndRemoveDataFromAnnotationStorage(P){if(!this.#G)return null;let Z=`${s7}${P}`,q=this.#G.getRawValue(Z);return q&&this.#G.remove(Z),q}addToAnnotationStorage(P){P.isEmpty()||!this.#G||this.#G.has(P.id)||this.#G.setValue(P.id,P)}a11yAlert(P,Z=null){let q=this.#e;q&&(q.setAttribute("data-l10n-id",P),Z?q.setAttribute("data-l10n-args",JSON.stringify(Z)):q.removeAttribute("data-l10n-args"))}#G1(){let P=document.getSelection();if(!P||P.isCollapsed)return void(this.#m&&(this.#L?.hide(),this.#m=null,this.#F({hasSelectedText:!1})));let{anchorNode:Z}=P;if(Z===this.#m)return;let q=this.#i(P).closest(".textLayer");if(q){if(this.#L?.hide(),this.#m=Z,this.#F({hasSelectedText:!0}),(this.#k===m1.HIGHLIGHT||this.#k===m1.NONE)&&(this.#k===m1.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),this.#M=this.isShiftKeyDown,!this.isShiftKeyDown)){let X=this.#k===m1.HIGHLIGHT?this.#P1(q):null;if(X?.toggleDrawing(),this.#N){let z=new AbortController,R=this.combinedSignal(z),f=(G)=>{G.type==="pointerup"&&G.button!==0||(z.abort(),X?.toggleDrawing(!0),G.type==="pointerup"&&this.#a("main_toolbar"))};window.addEventListener("pointerup",f,{signal:R}),window.addEventListener("blur",f,{signal:R})}else X?.toggleDrawing(!0),this.#a("main_toolbar")}}else this.#m&&(this.#L?.hide(),this.#m=null,this.#F({hasSelectedText:!1}))}#a(P=""){this.#k===m1.HIGHLIGHT?this.highlightSelection(P):this.#I&&this.#f1()}#Q1(){document.addEventListener("selectionchange",this.#G1.bind(this),{signal:this._signal})}#Y1(){if(this.#x)return;this.#x=new AbortController;let P=this.combinedSignal(this.#x);window.addEventListener("focus",this.focus.bind(this),{signal:P}),window.addEventListener("blur",this.blur.bind(this),{signal:P})}#W1(){this.#x?.abort(),this.#x=null}blur(){if(this.isShiftKeyDown=!1,this.#M&&(this.#M=!1,this.#a("main_toolbar")),!this.hasSelection)return;let{activeElement:P}=document;for(let Z of this.#H)if(Z.div.contains(P)){this.#p=[Z,P],Z._focusEventsAllowed=!1;break}}focus(){if(!this.#p)return;let[P,Z]=this.#p;this.#p=null,Z.addEventListener("focusin",()=>{P._focusEventsAllowed=!0},{once:!0,signal:this._signal}),Z.focus()}#Z1(){if(this.#S)return;this.#S=new AbortController;let P=this.combinedSignal(this.#S);window.addEventListener("keydown",this.keydown.bind(this),{signal:P}),window.addEventListener("keyup",this.keyup.bind(this),{signal:P})}#$1(){this.#S?.abort(),this.#S=null}#q1(){if(this.#_)return;this.#_=new AbortController;let P=this.combinedSignal(this.#_);document.addEventListener("copy",this.copy.bind(this),{signal:P}),document.addEventListener("cut",this.cut.bind(this),{signal:P}),document.addEventListener("paste",this.paste.bind(this),{signal:P})}#X1(){this.#_?.abort(),this.#_=null}#_1(){let P=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:P}),document.addEventListener("drop",this.drop.bind(this),{signal:P})}addEditListeners(){this.#Z1(),this.#q1()}removeEditListeners(){this.#$1(),this.#X1()}dragOver(P){for(let{type:Z}of P.dataTransfer.items)for(let q of this.#W)if(q.isHandlingMimeForPasting(Z))return P.dataTransfer.dropEffect="copy",void P.preventDefault()}drop(P){for(let Z of P.dataTransfer.items)for(let q of this.#W)if(q.isHandlingMimeForPasting(Z.type))return q.paste(Z,this.currentLayer),void P.preventDefault()}copy(P){if(P.preventDefault(),this.#Z?.commitOrRemove(),!this.hasSelection)return;let Z=[];for(let q of this.#H){let X=q.serialize(!0);X&&Z.push(X)}Z.length!==0&&P.clipboardData.setData("application/pdfjs",JSON.stringify(Z))}cut(P){this.copy(P),this.delete()}async paste(P){P.preventDefault();let{clipboardData:Z}=P;for(let z of Z.items)for(let R of this.#W)if(R.isHandlingMimeForPasting(z.type))return void R.paste(z,this.currentLayer);let q=Z.getData("application/pdfjs");if(!q)return;try{q=JSON.parse(q)}catch(z){return void y1(`paste: "${z.message}".`)}if(!Array.isArray(q))return;this.unselectAll();let X=this.currentLayer;try{let z=[];for(let G of q){let Q=await X.deserialize(G);if(!Q)return;z.push(Q)}let R=()=>{for(let G of z)this.#z1(G);this.#R1(z)},f=()=>{for(let G of z)G.remove()};this.addCommands({cmd:R,undo:f,mustExec:!0})}catch(z){y1(`paste: "${z.message}".`)}}keydown(P){this.isShiftKeyDown||P.key!=="Shift"||(this.isShiftKeyDown=!0),this.#k===m1.NONE||this.isEditorHandlingKeyboard||T4._keyboardManager.exec(this,P)}keyup(P){this.isShiftKeyDown&&P.key==="Shift"&&(this.isShiftKeyDown=!1,this.#M&&(this.#M=!1,this.#a("main_toolbar")))}onEditingAction({name:P}){switch(P){case"undo":case"redo":case"delete":case"selectAll":this[P]();break;case"highlightSelection":this.highlightSelection("context_menu");break;case"commentSelection":this.commentSelection("context_menu")}}#F(P){Object.entries(P).some(([Z,q])=>this.#o[Z]!==q)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#o,P)}),this.#k===m1.HIGHLIGHT&&P.hasSelectedEditor===!1&&this.#c([[h1.HIGHLIGHT_FREE,!0]]))}#c(P){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:P})}setEditingState(P){P?(this.#Y1(),this.#q1(),this.#F({isEditing:this.#k!==m1.NONE,isEmpty:this.#n(),hasSomethingToUndo:this.#Q.hasSomethingToUndo(),hasSomethingToRedo:this.#Q.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#W1(),this.#X1(),this.#F({isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(P){if(!this.#W){this.#W=P;for(let Z of this.#W)this.#c(Z.defaultPropertiesToUpdate)}}getId(){return this.#v.id}get currentLayer(){return this.#z.get(this.#J)}getLayer(P){return this.#z.get(P)}get currentPageIndex(){return this.#J}addLayer(P){this.#z.set(P.pageIndex,P),this.#T?P.enable():P.disable()}removeLayer(P){this.#z.delete(P.pageIndex)}async updateMode(P,Z=null,q=!1,X=!1,z=!1){if(this.#k!==P&&(!this.#u||(await this.#u.promise,this.#u))){if(this.#u=Promise.withResolvers(),this.#$?.commitOrRemove(),this.#k===m1.POPUP&&this.#Y?.hideSidebar(),this.#Y?.destroyPopup(),this.#k=P,P===m1.NONE){this.setEditingState(!1),this.#U1();for(let R of this.#q.values())R.hideStandaloneCommentButton();return this._editorUndoBar?.hide(),this.toggleComment(null),void this.#u.resolve()}for(let R of this.#q.values())R.addStandaloneCommentButton();P===m1.SIGNATURE&&await this.#E?.loadSignatures(),this.setEditingState(!0),await this.#J1(),this.unselectAll();for(let R of this.#z.values())R.updateMode(P);if(P===m1.POPUP){this.#X||=await this.#r.getAnnotationsByType(new Set(this.#W.map((G)=>G._editorType)));let R=new Set,f=[];for(let G of this.#q.values()){let{annotationElementId:Q,hasComment:Y,deleted:W}=G;Q&&R.add(Q),Y&&!W&&f.push(G.getData())}for(let G of this.#X){let{id:Q,popupRef:Y,contentsObj:W}=G;Y&&W?.str&&!R.has(Q)&&!this.#B.has(Q)&&f.push(G)}this.#Y?.showSidebar(f)}if(!Z)return q&&this.addNewEditorFromKeyboard(),void this.#u.resolve();for(let R of this.#q.values())R.uid===Z?(this.setSelected(R),z?R.editComment():X?R.enterInEditMode():R.focus()):R.unselect();this.#u.resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(P){P.mode!==this.#k&&this._eventBus.dispatch("switchannotationeditormode",{source:this,...P})}updateParams(P,Z){if(this.#W){switch(P){case h1.CREATE:return void this.currentLayer.addNewEditor(Z);case h1.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(this.#l||=new Map).set(P,Z),this.showAllEditors("highlight",Z)}if(this.hasSelection)for(let q of this.#H)q.updateParams(P,Z);else for(let q of this.#W)q.updateDefaultParams(P,Z)}}showAllEditors(P,Z,q=!1){for(let X of this.#q.values())X.editorType===P&&X.show(Z);(this.#l?.get(h1.HIGHLIGHT_SHOW_ALL)??!0)!==Z&&this.#c([[h1.HIGHLIGHT_SHOW_ALL,Z]])}enableWaiting(P=!1){if(this.#D!==P){this.#D=P;for(let Z of this.#z.values())P?Z.disableClick():Z.enableClick(),Z.div.classList.toggle("waiting",P)}}async#J1(){if(!this.#T){this.#T=!0;let P=[];for(let Z of this.#z.values())P.push(Z.enable());await Promise.all(P);for(let Z of this.#q.values())Z.enable()}}#U1(){if(this.unselectAll(),this.#T){this.#T=!1;for(let P of this.#z.values())P.disable();for(let P of this.#q.values())P.disable()}}*getEditors(P){for(let Z of this.#q.values())Z.pageIndex===P&&(yield Z)}getEditor(P){return this.#q.get(P)}addEditor(P){this.#q.set(P.id,P)}removeEditor(P){P.div.contains(document.activeElement)&&(this.#A&&clearTimeout(this.#A),this.#A=setTimeout(()=>{this.focusMainContainer(),this.#A=null},0)),this.#q.delete(P.id),P.annotationElementId&&this.#O?.delete(P.annotationElementId),this.unselect(P),P.annotationElementId&&this.#B.has(P.annotationElementId)||this.#G?.remove(P.id)}addDeletedAnnotationElement(P){this.#B.add(P.annotationElementId),this.addChangedExistingAnnotation(P),P.deleted=!0}isDeletedAnnotationElement(P){return this.#B.has(P)}removeDeletedAnnotationElement(P){this.#B.delete(P.annotationElementId),this.removeChangedExistingAnnotation(P),P.deleted=!1}#z1(P){let Z=this.#z.get(P.pageIndex);Z?Z.addOrRebuild(P):(this.addEditor(P),this.addToAnnotationStorage(P))}setActiveEditor(P){this.#Z!==P&&(this.#Z=P,P&&this.#c(P.propertiesToUpdate))}get#K1(){let P=null;for(P of this.#H);return P}updateUI(P){this.#K1===P&&this.#c(P.propertiesToUpdate)}updateUIForDefaultProperties(P){this.#c(P.defaultPropertiesToUpdate)}toggleSelected(P){if(this.#H.has(P))return this.#H.delete(P),P.unselect(),void this.#F({hasSelectedEditor:this.hasSelection});this.#H.add(P),P.select(),this.#c(P.propertiesToUpdate),this.#F({hasSelectedEditor:!0})}setSelected(P){this.updateToolbar({mode:P.mode,editId:P.id}),this.#$?.commitOrRemove();for(let Z of this.#H)Z!==P&&Z.unselect();this.#H.clear(),this.#H.add(P),P.select(),this.#c(P.propertiesToUpdate),this.#F({hasSelectedEditor:!0})}isSelected(P){return this.#H.has(P)}get firstSelectedEditor(){return this.#H.values().next().value}unselect(P){P.unselect(),this.#H.delete(P),this.#F({hasSelectedEditor:this.hasSelection})}get hasSelection(){return this.#H.size!==0}get isEnterHandled(){return this.#H.size===1&&this.firstSelectedEditor.isEnterHandled}undo(){this.#Q.undo(),this.#F({hasSomethingToUndo:this.#Q.hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#n()}),this._editorUndoBar?.hide()}redo(){this.#Q.redo(),this.#F({hasSomethingToUndo:!0,hasSomethingToRedo:this.#Q.hasSomethingToRedo(),isEmpty:this.#n()})}addCommands(P){this.#Q.add(P),this.#F({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#n()})}cleanUndoStack(P){this.#Q.cleanType(P)}#n(){if(this.#q.size===0)return!0;if(this.#q.size===1)for(let P of this.#q.values())return P.isEmpty();return!1}delete(){this.commitOrRemove();let P=this.currentLayer?.endDrawingSession(!0);if(!this.hasSelection&&!P)return;let Z=P?[P]:[...this.#H],q=()=>{for(let X of Z)this.#z1(X)};this.addCommands({cmd:()=>{this._editorUndoBar?.show(q,Z.length===1?Z[0].editorType:Z.length);for(let X of Z)X.remove()},undo:q,mustExec:!0})}commitOrRemove(){this.#Z?.commitOrRemove()}hasSomethingToControl(){return this.#Z||this.hasSelection}#R1(P){for(let Z of this.#H)Z.unselect();this.#H.clear();for(let Z of P)Z.isEmpty()||(this.#H.add(Z),Z.select());this.#F({hasSelectedEditor:this.hasSelection})}selectAll(){for(let P of this.#H)P.commit();this.#R1(this.#q.values())}unselectAll(){if((!this.#Z||(this.#Z.commitOrRemove(),this.#k===m1.NONE))&&!this.#$?.commitOrRemove()&&this.hasSelection){for(let P of this.#H)P.unselect();this.#H.clear(),this.#F({hasSelectedEditor:!1})}}translateSelectedEditors(P,Z,q=!1){if(q||this.commitOrRemove(),!this.hasSelection)return;this.#d[0]+=P,this.#d[1]+=Z;let[X,z]=this.#d,R=[...this.#H];this.#y&&clearTimeout(this.#y),this.#y=setTimeout(()=>{this.#y=null,this.#d[0]=this.#d[1]=0,this.addCommands({cmd:()=>{for(let f of R)this.#q.has(f.id)&&(f.translateInPage(X,z),f.translationDone())},undo:()=>{for(let f of R)this.#q.has(f.id)&&(f.translateInPage(-X,-z),f.translationDone())},mustExec:!1})},1000);for(let f of R)f.translateInPage(P,Z),f.translationDone()}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),this.#K=new Map;for(let P of this.#H)this.#K.set(P,{savedX:P.x,savedY:P.y,savedPageIndex:P.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!this.#K)return!1;this.disableUserSelect(!1);let P=this.#K;this.#K=null;let Z=!1;for(let[{x:X,y:z,pageIndex:R},f]of P)f.newX=X,f.newY=z,f.newPageIndex=R,Z||=X!==f.savedX||z!==f.savedY||R!==f.savedPageIndex;if(!Z)return!1;let q=(X,z,R,f)=>{if(this.#q.has(X.id)){let G=this.#z.get(f);G?X._setParentAndPosition(G,z,R):(X.pageIndex=f,X.x=z,X.y=R)}};return this.addCommands({cmd:()=>{for(let[X,{newX:z,newY:R,newPageIndex:f}]of P)q(X,z,R,f)},undo:()=>{for(let[X,{savedX:z,savedY:R,savedPageIndex:f}]of P)q(X,z,R,f)},mustExec:!0}),!0}dragSelectedEditors(P,Z){if(this.#K)for(let q of this.#K.keys())q.drag(P,Z)}rebuild(P){if(P.parent===null){let Z=this.getLayer(P.pageIndex);Z?(Z.changeParent(P),Z.addOrRebuild(P)):(this.addEditor(P),this.addToAnnotationStorage(P),P.rebuild())}else P.parent.addOrRebuild(P)}get isEditorHandlingKeyboard(){return this.getActive()?.shouldGetKeyboardEvents()||this.#H.size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(P){return this.#Z===P}getActive(){return this.#Z}getMode(){return this.#k}isEditingMode(){return this.#k!==m1.NONE}get imageManager(){return D1(this,"imageManager",new $X)}getSelectionBoxes(P){if(!P)return null;let Z=document.getSelection();for(let Q=0,Y=Z.rangeCount;Q<Y;Q++)if(!P.contains(Z.getRangeAt(Q).commonAncestorContainer))return null;let{x:q,y:X,width:z,height:R}=P.getBoundingClientRect(),f;switch(P.getAttribute("data-main-rotation")){case"90":f=(Q,Y,W,$)=>({x:(Y-X)/R,y:1-(Q+W-q)/z,width:$/R,height:W/z});break;case"180":f=(Q,Y,W,$)=>({x:1-(Q+W-q)/z,y:1-(Y+$-X)/R,width:W/z,height:$/R});break;case"270":f=(Q,Y,W,$)=>({x:1-(Y+$-X)/R,y:(Q-q)/z,width:$/R,height:W/z});break;default:f=(Q,Y,W,$)=>({x:(Q-q)/z,y:(Y-X)/R,width:W/z,height:$/R})}let G=[];for(let Q=0,Y=Z.rangeCount;Q<Y;Q++){let W=Z.getRangeAt(Q);if(!W.collapsed)for(let{x:$,y:_,width:J,height:U}of W.getClientRects())J!==0&&U!==0&&G.push(f($,_,J,U))}return G.length===0?null:G}addChangedExistingAnnotation({annotationElementId:P,id:Z}){(this.#f||=new Map).set(P,Z)}removeChangedExistingAnnotation({annotationElementId:P}){this.#f?.delete(P)}renderAnnotationElement(P){let Z=this.#f?.get(P.data.id);if(!Z)return;let q=this.#G.getRawValue(Z);q&&(this.#k!==m1.NONE||q.hasBeenModified)&&q.renderAnnotationElement(P)}setMissingCanvas(P,Z,q){let X=this.#O?.get(P);X&&(X.setCanvas(Z,q),this.#O.delete(P))}addMissingCanvas(P,Z){(this.#O||=new Map).set(P,Z)}}class o0{#P=null;#Z=!1;#X=null;#q=null;#z=null;#R=null;#G=!1;#f=null;#Q=null;#Y=null;#_=null;#$=!1;static#J=null;static _l10n=null;constructor(P){this.#Q=P,this.#$=P._uiManager.useNewAltTextFlow,o0.#J||=Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"})}static initialize(P){o0._l10n??=P}async render(){let P=this.#X=document.createElement("button");P.className="altText",P.tabIndex="0";let Z=this.#q=document.createElement("span");P.append(Z),this.#$?(P.classList.add("new"),P.setAttribute("data-l10n-id",o0.#J.missing),Z.setAttribute("data-l10n-id",o0.#J["missing-label"])):(P.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),Z.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));let q=this.#Q._uiManager._signal;P.addEventListener("contextmenu",A0,{signal:q}),P.addEventListener("pointerdown",(z)=>z.stopPropagation(),{signal:q});let X=(z)=>{z.preventDefault(),this.#Q._uiManager.editAltText(this.#Q),this.#$&&this.#Q._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:this.#B}})};return P.addEventListener("click",X,{capture:!0,signal:q}),P.addEventListener("keydown",(z)=>{z.target===P&&z.key==="Enter"&&(this.#G=!0,X(z))},{signal:q}),await this.#K(),P}get#B(){return(this.#P?"added":this.#P===null&&this.guessedText&&"review")||"missing"}finish(){this.#X&&(this.#X.focus({focusVisible:this.#G}),this.#G=!1)}isEmpty(){return this.#$?this.#P===null:!this.#P&&!this.#Z}hasData(){return this.#$?this.#P!==null||!!this.#Y:this.isEmpty()}get guessedText(){return this.#Y}async setGuessedText(P){this.#P===null&&(this.#Y=P,this.#_=await o0._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:P}),this.#K())}toggleAltTextBadge(P=!1){if(!this.#$||this.#P)return this.#f?.remove(),void(this.#f=null);if(!this.#f){let Z=this.#f=document.createElement("div");Z.className="noAltTextBadge",this.#Q.div.append(Z)}this.#f.classList.toggle("hidden",!P)}serialize(P){let Z=this.#P;return P||this.#Y!==Z||(Z=this.#_),{altText:Z,decorative:this.#Z,guessedText:this.#Y,textWithDisclaimer:this.#_}}get data(){return{altText:this.#P,decorative:this.#Z}}set data({altText:P,decorative:Z,guessedText:q,textWithDisclaimer:X,cancel:z=!1}){q&&(this.#Y=q,this.#_=X),this.#P===P&&this.#Z===Z||(z||(this.#P=P,this.#Z=Z),this.#K())}toggle(P=!1){this.#X&&(!P&&this.#R&&(clearTimeout(this.#R),this.#R=null),this.#X.disabled=!P)}shown(){this.#Q._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:this.#B}})}destroy(){this.#X?.remove(),this.#X=null,this.#q=null,this.#z=null,this.#f?.remove(),this.#f=null}async#K(){let P=this.#X;if(!P)return;if(this.#$){if(P.classList.toggle("done",!!this.#P),P.setAttribute("data-l10n-id",o0.#J[this.#B]),this.#q?.setAttribute("data-l10n-id",o0.#J[`${this.#B}-label`]),!this.#P)return void this.#z?.remove()}else{if(!this.#P&&!this.#Z)return P.classList.remove("done"),void this.#z?.remove();P.classList.add("done"),P.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let Z=this.#z;if(!Z){this.#z=Z=document.createElement("span"),Z.className="tooltip",Z.setAttribute("role","tooltip"),Z.id=`alt-text-tooltip-${this.#Q.id}`;let X=100,z=this.#Q._uiManager._signal;z.addEventListener("abort",()=>{clearTimeout(this.#R),this.#R=null},{once:!0}),P.addEventListener("mouseenter",()=>{this.#R=setTimeout(()=>{this.#R=null,this.#z.classList.add("show"),this.#Q._reportTelemetry({action:"alt_text_tooltip"})},X)},{signal:z}),P.addEventListener("mouseleave",()=>{this.#R&&(clearTimeout(this.#R),this.#R=null),this.#z?.classList.remove("show")},{signal:z})}this.#Z?Z.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(Z.removeAttribute("data-l10n-id"),Z.textContent=this.#P),Z.parentNode||P.append(Z),this.#Q.getElementForAltText()?.setAttribute("aria-describedby",Z.id)}}class Q7{#P=null;#Z=null;#X=!1;#q=null;#z=null;#R=null;#G=null;#f=null;#Q=!1;#Y=null;constructor(P){this.#q=P}renderForToolbar(){let P=this.#Z=document.createElement("button");return P.className="comment",this.#_(P,!1)}renderForStandalone(){let P=this.#P=document.createElement("button");P.className="annotationCommentButton";let Z=this.#q.commentButtonPosition;if(Z){let{style:q}=P;q.insetInlineEnd=`calc(${100*(this.#q._uiManager.direction==="ltr"?1-Z[0]:Z[0])}% - var(--comment-button-dim))`,q.top=`calc(${100*Z[1]}% - var(--comment-button-dim))`;let X=this.#q.commentButtonColor;X&&(q.backgroundColor=X)}return this.#_(P,!0)}focusButton(){setTimeout(()=>{(this.#P??this.#Z)?.focus()},0)}onUpdatedColor(){if(!this.#P)return;let P=this.#q.commentButtonColor;P&&(this.#P.style.backgroundColor=P),this.#q._uiManager.updatePopupColor(this.#q)}get commentButtonWidth(){return(this.#P?.getBoundingClientRect().width??0)/this.#q.parent.boundingClientRect.width}get commentPopupPositionInLayer(){if(this.#Y)return this.#Y;if(!this.#P)return null;let{x:P,y:Z,height:q}=this.#P.getBoundingClientRect(),{x:X,y:z,width:R,height:f}=this.#q.parent.boundingClientRect;return[(P-X)/R,(Z+q-z)/f]}set commentPopupPositionInLayer(P){this.#Y=P}hasDefaultPopupPosition(){return this.#Y===null}removeStandaloneCommentButton(){this.#P?.remove(),this.#P=null}removeToolbarCommentButton(){this.#Z?.remove(),this.#Z=null}setCommentButtonStates({selected:P,hasPopup:Z}){this.#P&&(this.#P.classList.toggle("selected",P),this.#P.ariaExpanded=Z)}#_(P,Z){if(!this.#q._uiManager.hasCommentManager())return null;P.tabIndex="0",P.ariaHasPopup="dialog",Z?(P.ariaControls="commentPopup",P.setAttribute("data-l10n-id","pdfjs-show-comment-button")):(P.ariaControlsElements=[this.#q._uiManager.getCommentDialogElement()],P.setAttribute("data-l10n-id","pdfjs-editor-edit-comment-button"));let q=this.#q._uiManager._signal;if(!(q instanceof AbortSignal)||q.aborted)return P;P.addEventListener("contextmenu",A0,{signal:q}),Z&&(P.addEventListener("focusin",(z)=>{this.#q._focusEventsAllowed=!1,_8(z)},{capture:!0,signal:q}),P.addEventListener("focusout",(z)=>{this.#q._focusEventsAllowed=!0,_8(z)},{capture:!0,signal:q})),P.addEventListener("pointerdown",(z)=>z.stopPropagation(),{signal:q});let X=(z)=>{z.preventDefault(),P===this.#Z?this.edit():this.#q.toggleComment(!0)};return P.addEventListener("click",X,{capture:!0,signal:q}),P.addEventListener("keydown",(z)=>{z.target===P&&z.key==="Enter"&&(this.#X=!0,X(z))},{signal:q}),P.addEventListener("pointerenter",()=>{this.#q.toggleComment(!1,!0)},{signal:q}),P.addEventListener("pointerleave",()=>{this.#q.toggleComment(!1,!1)},{signal:q}),P}edit(P){let Z=this.commentPopupPositionInLayer,q,X;if(Z)[q,X]=Z;else{[q,X]=this.#q.commentButtonPosition;let{width:Y,height:W,x:$,y:_}=this.#q;q=$+q*Y,X=_+X*W}let z=this.#q.parent.boundingClientRect,{x:R,y:f,width:G,height:Q}=z;this.#q._uiManager.editComment(this.#q,R+q*G,f+X*Q,{...P,parentDimensions:z})}finish(){this.#Z&&(this.#Z.focus({focusVisible:this.#X}),this.#X=!1)}isDeleted(){return this.#Q||this.#G===""}isEmpty(){return this.#G===null}hasBeenEdited(){return this.isDeleted()||this.#G!==this.#z}serialize(){return this.data}get data(){return{text:this.#G,richText:this.#R,date:this.#f,deleted:this.isDeleted()}}set data(P){if(P!==this.#G&&(this.#R=null),P===null)return this.#G="",void(this.#Q=!0);this.#G=P,this.#f=new Date,this.#Q=!1}setInitialText(P,Z=null){this.#z=P,this.data=P,this.#f=null,this.#R=Z}shown(){}destroy(){this.#Z?.remove(),this.#Z=null,this.#P?.remove(),this.#P=null,this.#G="",this.#R=null,this.#f=null,this.#q=null,this.#X=!1,this.#Q=!1}}class W2{#P;#Z=!1;#X=null;#q;#z;#R;#G;#f=null;#Q;#Y=null;#_;#$=null;constructor({container:P,isPinchingDisabled:Z=null,isPinchingStopped:q=null,onPinchStart:X=null,onPinching:z=null,onPinchEnd:R=null,signal:f}){this.#P=P,this.#X=q,this.#q=Z,this.#z=X,this.#R=z,this.#G=R,this.#_=new AbortController,this.#Q=AbortSignal.any([f,this.#_.signal]),P.addEventListener("touchstart",this.#J.bind(this),{passive:!1,signal:this.#Q})}get MIN_TOUCH_DISTANCE_TO_PINCH(){return 35/u0.pixelRatio}#J(P){if(this.#q?.())return;if(P.touches.length===1){if(this.#f)return;let X=this.#f=new AbortController,z=AbortSignal.any([this.#Q,X.signal]),R=this.#P,f={capture:!0,signal:z,passive:!1},G=(Q)=>{Q.pointerType==="touch"&&(this.#f?.abort(),this.#f=null)};return R.addEventListener("pointerdown",(Q)=>{Q.pointerType==="touch"&&(_8(Q),G(Q))},f),R.addEventListener("pointerup",G,f),void R.addEventListener("pointercancel",G,f)}if(!this.#$){this.#$=new AbortController;let X=AbortSignal.any([this.#Q,this.#$.signal]),z=this.#P,R={signal:X,capture:!1,passive:!1};z.addEventListener("touchmove",this.#B.bind(this),R);let f=this.#K.bind(this);z.addEventListener("touchend",f,R),z.addEventListener("touchcancel",f,R),R.capture=!0,z.addEventListener("pointerdown",_8,R),z.addEventListener("pointermove",_8,R),z.addEventListener("pointercancel",_8,R),z.addEventListener("pointerup",_8,R),this.#z?.()}if(_8(P),P.touches.length!==2||this.#X?.())return void(this.#Y=null);let[Z,q]=P.touches;Z.identifier>q.identifier&&([Z,q]=[q,Z]),this.#Y={touch0X:Z.screenX,touch0Y:Z.screenY,touch1X:q.screenX,touch1Y:q.screenY}}#B(P){if(!this.#Y||P.touches.length!==2)return;_8(P);let[Z,q]=P.touches;Z.identifier>q.identifier&&([Z,q]=[q,Z]);let{screenX:X,screenY:z}=Z,{screenX:R,screenY:f}=q,G=this.#Y,{touch0X:Q,touch0Y:Y,touch1X:W,touch1Y:$}=G,_=W-Q,J=$-Y,U=R-X,K=f-z,I=Math.hypot(U,K)||1,B=Math.hypot(_,J)||1;if(!this.#Z&&Math.abs(B-I)<=W2.MIN_TOUCH_DISTANCE_TO_PINCH)return;if(G.touch0X=X,G.touch0Y=z,G.touch1X=R,G.touch1Y=f,!this.#Z)return void(this.#Z=!0);let j=[(X+R)/2,(z+f)/2];this.#R?.(j,B,I)}#K(P){P.touches.length>=2||(this.#$&&(this.#$.abort(),this.#$=null,this.#G?.()),this.#Y&&(_8(P),this.#Y=null,this.#Z=!1))}destroy(){this.#_?.abort(),this.#_=null,this.#f?.abort(),this.#f=null}}class JX{constructor(P){this.h1=P?4294967295&P:TR,this.h2=P?4294967295&P:TR}update(P){let Z,q;if(typeof P=="string"){Z=new Uint8Array(2*P.length),q=0;for(let U=0,K=P.length;U<K;U++){let I=P.charCodeAt(U);I<=255?Z[q++]=I:(Z[q++]=I>>>8,Z[q++]=255&I)}}else{if(!ArrayBuffer.isView(P))throw Error("Invalid data format, must be a string or TypedArray.");Z=P.slice(),q=Z.byteLength}let X=q>>2,z=q-4*X,R=new Uint32Array(Z.buffer,0,X),f=0,G=0,Q=this.h1,Y=this.h2,W=3432918353,$=461845907,_=11601,J=13715;for(let U=0;U<X;U++)1&U?(f=R[U],f=f*W&k0|f*_&m4,f=f<<15|f>>>17,f=f*$&k0|f*J&m4,Q^=f,Q=Q<<13|Q>>>19,Q=5*Q+3864292196):(G=R[U],G=G*W&k0|G*_&m4,G=G<<15|G>>>17,G=G*$&k0|G*J&m4,Y^=G,Y=Y<<13|Y>>>19,Y=5*Y+3864292196);switch(f=0,z){case 3:f^=Z[4*X+2]<<16;case 2:f^=Z[4*X+1]<<8;case 1:f^=Z[4*X],f=f*W&k0|f*_&m4,f=f<<15|f>>>17,f=f*$&k0|f*J&m4,1&X?Q^=f:Y^=f}this.h1=Q,this.h2=Y}hexdigest(){let P=this.h1,Z=this.h2;return P^=Z>>>1,P=3981806797*P&k0|36045*P&m4,Z=4283543511*Z&k0|(2950163797*(Z<<16|P>>>16)&k0)>>>16,P^=Z>>>1,P=444984403*P&k0|60499*P&m4,Z=3301882366*Z&k0|(3120437893*(Z<<16|P>>>16)&k0)>>>16,P^=Z>>>1,(P>>>0).toString(16).padStart(8,"0")+(Z>>>0).toString(16).padStart(8,"0")}}class SU{#P=new Set;constructor({ownerDocument:P=globalThis.document,styleElement:Z=null}){this._document=P,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(P){this.nativeFontFaces.add(P),this._document.fonts.add(P)}removeNativeFontFace(P){this.nativeFontFaces.delete(P),this._document.fonts.delete(P)}insertRule(P){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));let Z=this.styleElement.sheet;Z.insertRule(P,Z.cssRules.length)}clear(){for(let P of this.nativeFontFaces)this._document.fonts.delete(P);this.nativeFontFaces.clear(),this.#P.clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:P,disableFontFace:Z,_inspectFont:q}){if(P&&!this.#P.has(P.loadedName)){if(o1(!Z,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){let{loadedName:X,src:z,style:R}=P,f=new FontFace(X,z,R);this.addNativeFontFace(f);try{await f.load(),this.#P.add(X),q?.(P)}catch{y1(`Cannot load system font: ${P.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(f)}return}X8("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(P){if(P.attached||P.missingFile&&!P.systemFontInfo)return;if(P.attached=!0,P.systemFontInfo)return void await this.loadSystemFont(P);if(this.isFontLoadingAPISupported){let q=P.createNativeFontFace();if(q){this.addNativeFontFace(q);try{await q.loaded}catch(X){throw y1(`Failed to load font '${q.family}': '${X}'.`),P.disableFontFace=!0,X}}return}let Z=P.createFontFaceRule();if(Z){if(this.insertRule(Z),this.isSyncFontLoadingSupported)return;await new Promise((q)=>{let X=this._queueLoadingCallback(q);this._prepareFontLoadEvent(P,X)})}}get isFontLoadingAPISupported(){return D1(this,"isFontLoadingAPISupported",!!this._document?.fonts)}get isSyncFontLoadingSupported(){return D1(this,"isSyncFontLoadingSupported",z0||k8.platform.isFirefox)}_queueLoadingCallback(P){let{loadingRequests:Z}=this,q={done:!1,complete:function(){for(o1(!q.done,"completeRequest() cannot be called twice."),q.done=!0;Z.length>0&&Z[0].done;){let X=Z.shift();setTimeout(X.callback,0)}},callback:P};return Z.push(q),q}get _loadTestFont(){return D1(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(P,Z){function q(I,B){return I.charCodeAt(B)<<24|I.charCodeAt(B+1)<<16|I.charCodeAt(B+2)<<8|255&I.charCodeAt(B+3)}function X(I,B,j,V){return I.substring(0,B)+V+I.substring(B+j)}let z,R,f=this._document.createElement("canvas");f.width=1,f.height=1;let G=f.getContext("2d"),Q=0,Y=`lt${Date.now()}${this.loadTestFontId++}`,W=this._loadTestFont;W=X(W,976,Y.length,Y);let $=1482184792,_=q(W,16);for(z=0,R=Y.length-3;z<R;z+=4)_=_-$+q(Y,z)|0;var J;z<Y.length&&(_=_-$+q(Y+"XXX",z)|0),W=X(W,16,4,(J=_,String.fromCharCode(J>>24&255,J>>16&255,J>>8&255,255&J)));let U=`@font-face {font-family:"${Y}";src:${`url(data:font/opentype;base64,${btoa(W)});`}}`;this.insertRule(U);let K=this._document.createElement("div");K.style.visibility="hidden",K.style.width=K.style.height="10px",K.style.position="absolute",K.style.top=K.style.left="0px";for(let I of[P.loadedName,Y]){let B=this._document.createElement("span");B.textContent="Hi",B.style.fontFamily=I,K.append(B)}this._document.body.append(K),function I(B,j){if(++Q>30)return y1("Load test font never loaded."),void j();G.font="30px "+B,G.fillText(".",0,20),G.getImageData(0,0,1,1).data[3]>0?j():setTimeout(I.bind(null,B,j))}(Y,()=>{K.remove(),Z.complete()})}}class mU{#P;constructor(P,Z=null,q,X){this.compiledGlyphs=Object.create(null),this.#P=P,this._inspectFont=Z,q&&Object.assign(this,q),X&&(this.charProcOperatorList=X)}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let P;if(this.cssFontInfo){let Z={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(Z.style=`oblique ${this.cssFontInfo.italicAngle}deg`),P=new FontFace(this.cssFontInfo.fontFamily,this.data,Z)}else P=new FontFace(this.loadedName,this.data,{});return this._inspectFont?.(this),P}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;let P=`url(data:${this.mimetype};base64,${xU(this.data)});`,Z;if(this.cssFontInfo){let q=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(q+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),Z=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${q}src:${P}}`}else Z=`@font-face {font-family:"${this.loadedName}";src:${P}}`;return this._inspectFont?.(this,P),Z}getPathGenerator(P,Z){if(this.compiledGlyphs[Z]!==void 0)return this.compiledGlyphs[Z];let q=this.loadedName+"_path_"+Z,X;try{X=P.get(q)}catch(R){y1(`getPathGenerator - ignoring character: "${R}".`)}let z=new Path2D(X||"");return this.fontExtraProperties||P.delete(q),this.compiledGlyphs[Z]=z}get black(){return this.#P.black}get bold(){return this.#P.bold}get disableFontFace(){return this.#P.disableFontFace??!1}get fontExtraProperties(){return this.#P.fontExtraProperties??!1}get isInvalidPDFjsFont(){return this.#P.isInvalidPDFjsFont}get isType3Font(){return this.#P.isType3Font}get italic(){return this.#P.italic}get missingFile(){return this.#P.missingFile}get remeasure(){return this.#P.remeasure}get vertical(){return this.#P.vertical}get ascent(){return this.#P.ascent}get defaultWidth(){return this.#P.defaultWidth}get descent(){return this.#P.descent}get bbox(){return this.#P.bbox}get fontMatrix(){return this.#P.fontMatrix}get fallbackName(){return this.#P.fallbackName}get loadedName(){return this.#P.loadedName}get mimetype(){return this.#P.mimetype}get name(){return this.#P.name}get data(){return this.#P.data}clearData(){this.#P.clearData()}get cssFontInfo(){return this.#P.cssFontInfo}get systemFontInfo(){return this.#P.systemFontInfo}get defaultVMetrics(){return this.#P.defaultVMetrics}}function m2(P){if(typeof P!="string")return null;if(P.endsWith("/"))return P;throw Error(`Invalid factory url: "${P}" must include trailing slash.`)}class OU{#P=new Map;#Z=Promise.resolve();postMessage(P,Z){let q={data:structuredClone(P,Z?{transfer:Z}:null)};this.#Z.then(()=>{for(let[X]of this.#P)X.call(this,q)})}addEventListener(P,Z,q=null){let X=null;if(q?.signal instanceof AbortSignal){let{signal:z}=q;if(z.aborted)return void y1("LoopbackPort - cannot use an `aborted` signal.");let R=()=>this.removeEventListener(P,Z);X=()=>z.removeEventListener("abort",R),z.addEventListener("abort",R)}this.#P.set(Z,X)}removeEventListener(P,Z){this.#P.get(Z)?.(),this.#P.delete(Z)}terminate(){for(let[,P]of this.#P)P?.();this.#P.clear()}}function yR(){}function R0(P){if(P instanceof f4||P instanceof h7||P instanceof OZ||P instanceof C6||P instanceof P3)return P;switch(P instanceof Error||typeof P=="object"&&P!==null||X8('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),P.name){case"AbortException":return new f4(P.message);case"InvalidPDFException":return new h7(P.message);case"PasswordException":return new OZ(P.message,P.code);case"ResponseException":return new C6(P.message,P.status,P.missing);case"UnknownErrorException":return new P3(P.message,P.details)}return new P3(P.message,P.toString())}class f6{#P=new AbortController;constructor(P,Z,q){this.sourceName=P,this.targetName=Z,this.comObj=q,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),q.addEventListener("message",this.#Z.bind(this),{signal:this.#P.signal})}#Z({data:P}){if(P.targetName!==this.sourceName)return;if(P.stream)return void this.#q(P);if(P.callback){let q=P.callbackId,X=this.callbackCapabilities[q];if(!X)throw Error(`Cannot resolve callback ${q}`);if(delete this.callbackCapabilities[q],P.callback===NR)X.resolve(P.data);else{if(P.callback!==vR)throw Error("Unexpected callback case");X.reject(R0(P.reason))}return}let Z=this.actionHandler[P.action];if(!Z)throw Error(`Unknown action from worker: ${P.action}`);if(P.callbackId){let q=this.sourceName,X=P.sourceName,z=this.comObj;return void Promise.try(Z,P.data).then(function(R){z.postMessage({sourceName:q,targetName:X,callback:NR,callbackId:P.callbackId,data:R})},function(R){z.postMessage({sourceName:q,targetName:X,callback:vR,callbackId:P.callbackId,reason:R0(R)})})}P.streamId?this.#X(P):Z(P.data)}on(P,Z){let q=this.actionHandler;if(q[P])throw Error(`There is already an actionName called "${P}"`);q[P]=Z}send(P,Z,q){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:P,data:Z},q)}sendWithPromise(P,Z,q){let X=this.callbackId++,z=Promise.withResolvers();this.callbackCapabilities[X]=z;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:P,callbackId:X,data:Z},q)}catch(R){z.reject(R)}return z.promise}sendWithStream(P,Z,q,X){let z=this.streamId++,R=this.sourceName,f=this.targetName,G=this.comObj;return new ReadableStream({start:(Q)=>{let Y=Promise.withResolvers();return this.streamControllers[z]={controller:Q,startCall:Y,pullCall:null,cancelCall:null,isClosed:!1},G.postMessage({sourceName:R,targetName:f,action:P,streamId:z,data:Z,desiredSize:Q.desiredSize},X),Y.promise},pull:(Q)=>{let Y=Promise.withResolvers();return this.streamControllers[z].pullCall=Y,G.postMessage({sourceName:R,targetName:f,stream:OR,streamId:z,desiredSize:Q.desiredSize}),Y.promise},cancel:(Q)=>{o1(Q instanceof Error,"cancel must have a valid reason");let Y=Promise.withResolvers();return this.streamControllers[z].cancelCall=Y,this.streamControllers[z].isClosed=!0,G.postMessage({sourceName:R,targetName:f,stream:FR,streamId:z,reason:R0(Q)}),Y.promise}},q)}#X(P){let Z=P.streamId,q=this.sourceName,X=P.sourceName,z=this.comObj,R=this,f=this.actionHandler[P.action],G={enqueue(Q,Y=1,W){if(this.isCancelled)return;let $=this.desiredSize;this.desiredSize-=Y,$>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),z.postMessage({sourceName:q,targetName:X,stream:mR,streamId:Z,chunk:Q},W)},close(){this.isCancelled||(this.isCancelled=!0,z.postMessage({sourceName:q,targetName:X,stream:SR,streamId:Z}),delete R.streamSinks[Z])},error(Q){o1(Q instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,z.postMessage({sourceName:q,targetName:X,stream:pR,streamId:Z,reason:R0(Q)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:P.desiredSize,ready:null};G.sinkCapability.resolve(),G.ready=G.sinkCapability.promise,this.streamSinks[Z]=G,Promise.try(f,P.data,G).then(function(){z.postMessage({sourceName:q,targetName:X,stream:x9,streamId:Z,success:!0})},function(Q){z.postMessage({sourceName:q,targetName:X,stream:x9,streamId:Z,reason:R0(Q)})})}#q(P){let Z=P.streamId,q=this.sourceName,X=P.sourceName,z=this.comObj,R=this.streamControllers[Z],f=this.streamSinks[Z];switch(P.stream){case x9:P.success?R.startCall.resolve():R.startCall.reject(R0(P.reason));break;case p2:P.success?R.pullCall.resolve():R.pullCall.reject(R0(P.reason));break;case OR:if(!f){z.postMessage({sourceName:q,targetName:X,stream:p2,streamId:Z,success:!0});break}f.desiredSize<=0&&P.desiredSize>0&&f.sinkCapability.resolve(),f.desiredSize=P.desiredSize,Promise.try(f.onPull||yR).then(function(){z.postMessage({sourceName:q,targetName:X,stream:p2,streamId:Z,success:!0})},function(Q){z.postMessage({sourceName:q,targetName:X,stream:p2,streamId:Z,reason:R0(Q)})});break;case mR:if(o1(R,"enqueue should have stream controller"),R.isClosed)break;R.controller.enqueue(P.chunk);break;case SR:if(o1(R,"close should have stream controller"),R.isClosed)break;R.isClosed=!0,R.controller.close(),this.#z(R,Z);break;case pR:o1(R,"error should have stream controller"),R.controller.error(R0(P.reason)),this.#z(R,Z);break;case V9:P.success?R.cancelCall.resolve():R.cancelCall.reject(R0(P.reason)),this.#z(R,Z);break;case FR:if(!f)break;let G=R0(P.reason);Promise.try(f.onCancel||yR,G).then(function(){z.postMessage({sourceName:q,targetName:X,stream:V9,streamId:Z,success:!0})},function(Q){z.postMessage({sourceName:q,targetName:X,stream:V9,streamId:Z,reason:R0(Q)})}),f.sinkCapability.reject(G),f.isCancelled=!0,delete this.streamSinks[Z];break;default:throw Error("Unexpected stream case")}}async#z(P,Z){await Promise.allSettled([P.startCall?.promise,P.pullCall?.promise,P.cancelCall?.promise]),delete this.streamControllers[Z]}destroy(){this.#P?.abort(),this.#P=null}}class KX{#P=!1;constructor({enableHWA:P=!1}){this.#P=P}create(P,Z){if(P<=0||Z<=0)throw Error("Invalid canvas size");let q=this._createCanvas(P,Z);return{canvas:q,context:q.getContext("2d",{willReadFrequently:!this.#P})}}reset(P,Z,q){if(!P.canvas)throw Error("Canvas is not specified");if(Z<=0||q<=0)throw Error("Invalid canvas size");P.canvas.width=Z,P.canvas.height=q}destroy(P){if(!P.canvas)throw Error("Canvas is not specified");P.canvas.width=0,P.canvas.height=0,P.canvas=null,P.context=null}_createCanvas(P,Z){X8("Abstract method `_createCanvas` called.")}}class BX{constructor({baseUrl:P=null,isCompressed:Z=!0}){this.baseUrl=P,this.isCompressed=Z}async fetch({name:P}){if(!this.baseUrl)throw Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!P)throw Error("CMap name must be specified.");let Z=this.baseUrl+P+(this.isCompressed?".bcmap":"");return this._fetch(Z).then((q)=>({cMapData:q,isCompressed:this.isCompressed})).catch((q)=>{throw Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${Z}`)})}async _fetch(P){X8("Abstract method `_fetch` called.")}}class IX{addFilter(P){return"none"}addHCMFilter(P,Z){return"none"}addAlphaFilter(P){return"none"}addLuminosityFilter(P){return"none"}addHighlightHCMFilter(P,Z,q,X,z){return"none"}destroy(P=!1){}}class jX{constructor({baseUrl:P=null}){this.baseUrl=P}async fetch({filename:P}){if(!this.baseUrl)throw Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!P)throw Error("Font filename must be specified.");let Z=`${this.baseUrl}${P}`;return this._fetch(Z).catch((q)=>{throw Error(`Unable to load font data at: ${Z}`)})}async _fetch(P){X8("Abstract method `_fetch` called.")}}class VX{constructor({baseUrl:P=null}){this.baseUrl=P}async fetch({filename:P}){if(!this.baseUrl)throw Error("Ensure that the `wasmUrl` API parameter is provided.");if(!P)throw Error("Wasm filename must be specified.");let Z=`${this.baseUrl}${P}`;return this._fetch(Z).catch((q)=>{throw Error(`Unable to load wasm data at: ${Z}`)})}async _fetch(P){X8("Abstract method `_fetch` called.")}}async function xX(P){let Z=process.getBuiltinModule("fs"),q=await Z.promises.readFile(P);return new Uint8Array(q)}function O2(P,Z,q,X,z,R){P[4*Z+0]=Math.min(P[4*Z+0],q),P[4*Z+1]=Math.min(P[4*Z+1],X),P[4*Z+2]=Math.max(P[4*Z+2],z),P[4*Z+3]=Math.max(P[4*Z+3],R)}class cU{#P;#Z;constructor(P,Z){this.#P=P,this.#Z=Z}get length(){return this.#P.length}isEmpty(P){return this.#P[P]===cZ}minX(P){return this.#Z[4*P+0]/256}minY(P){return this.#Z[4*P+1]/256}maxX(P){return(this.#Z[4*P+2]+1)/256}maxY(P){return(this.#Z[4*P+3]+1)/256}}class sU{#P={__proto__:null};#Z={__proto__:null,transform:[],moveText:[],sameLineText:[],[l5]:[]};#X=new Map;#q=[];#z=[];#R=[[1,0,0,1,0,0]];#G=[-1/0,-1/0,1/0,1/0];#f=new Float64Array([1/0,1/0,-1/0,-1/0]);#Q=-1;#Y=new Set;#_=new Map;#$=new Map;#J;#B;#K;#W;#U;constructor(P,Z,q=!1){this.#J=P.width,this.#B=P.height,this.#I(Z),q&&(this.#U=new Map)}growOperationsCount(P){P>=this.#W.length&&this.#I(P,this.#W)}#I(P,Z){let q=new ArrayBuffer(4*P);this.#K=new Uint8ClampedArray(q),this.#W=new Uint32Array(q),Z&&Z.length>0?(this.#W.set(Z),this.#W.fill(cZ,Z.length)):this.#W.fill(cZ)}save(P){return this.#P={__proto__:this.#P},this.#Z={__proto__:this.#Z,transform:{__proto__:this.#Z.transform},moveText:{__proto__:this.#Z.moveText},sameLineText:{__proto__:this.#Z.sameLineText},[l5]:{__proto__:this.#Z[l5]}},this.#G={__proto__:this.#G},this.#q.push(P),this}restore(P){let Z=Object.getPrototypeOf(this.#P);if(Z===null)return this;this.#P=Z,this.#Z=Object.getPrototypeOf(this.#Z),this.#G=Object.getPrototypeOf(this.#G);let q=this.#q.pop();return q!==void 0&&(y2(this.#U,P)?.dependencies.add(q),this.#W[P]=this.#W[q]),this}recordOpenMarker(P){return this.#q.push(P),this}getOpenMarker(){return this.#q.length===0?null:this.#q.at(-1)}recordCloseMarker(P){let Z=this.#q.pop();return Z!==void 0&&(y2(this.#U,P)?.dependencies.add(Z),this.#W[P]=this.#W[Z]),this}beginMarkedContent(P){return this.#z.push(P),this}endMarkedContent(P){let Z=this.#z.pop();return Z!==void 0&&(y2(this.#U,P)?.dependencies.add(Z),this.#W[P]=this.#W[Z]),this}pushBaseTransform(P){return this.#R.push(j1.multiplyByDOMMatrix(this.#R.at(-1),P.getTransform())),this}popBaseTransform(){return this.#R.length>1&&this.#R.pop(),this}recordSimpleData(P,Z){return this.#P[P]=Z,this}recordIncrementalData(P,Z){return this.#Z[P].push(Z),this}resetIncrementalData(P,Z){return this.#Z[P].length=0,this}recordNamedData(P,Z){return this.#X.set(P,Z),this}recordSimpleDataFromNamed(P,Z,q){this.#P[P]=this.#X.get(Z)??q}recordFutureForcedDependency(P,Z){return this.recordIncrementalData(l5,Z),this}inheritSimpleDataAsFutureForcedDependencies(P){for(let Z of P)Z in this.#P&&this.recordFutureForcedDependency(Z,this.#P[Z]);return this}inheritPendingDependenciesAsFutureForcedDependencies(){for(let P of this.#Y)this.recordFutureForcedDependency(l5,P);return this}resetBBox(P){return this.#Q!==P&&(this.#Q=P,this.#f[0]=1/0,this.#f[1]=1/0,this.#f[2]=-1/0,this.#f[3]=-1/0),this}recordClipBox(P,Z,q,X,z,R){let f=j1.multiplyByDOMMatrix(this.#R.at(-1),Z.getTransform()),G=[1/0,1/0,-1/0,-1/0];j1.axialAlignedBoundingBox([q,z,X,R],f,G);let Q=j1.intersect(this.#G,G);return Q?(this.#G[0]=Q[0],this.#G[1]=Q[1],this.#G[2]=Q[2],this.#G[3]=Q[3]):(this.#G[0]=this.#G[1]=1/0,this.#G[2]=this.#G[3]=-1/0),this}recordBBox(P,Z,q,X,z,R){let f=this.#G;if(f[0]===1/0)return this;let G=j1.multiplyByDOMMatrix(this.#R.at(-1),Z.getTransform());if(f[0]===-1/0)return j1.axialAlignedBoundingBox([q,z,X,R],G,this.#f),this;let Q=[1/0,1/0,-1/0,-1/0];return j1.axialAlignedBoundingBox([q,z,X,R],G,Q),this.#f[0]=Math.min(this.#f[0],Math.max(Q[0],f[0])),this.#f[1]=Math.min(this.#f[1],Math.max(Q[1],f[1])),this.#f[2]=Math.max(this.#f[2],Math.min(Q[2],f[2])),this.#f[3]=Math.max(this.#f[3],Math.min(Q[3],f[3])),this}recordCharacterBBox(P,Z,q,X=1,z=0,R=0,f){let G=q.bbox,Q,Y;if(G&&(Q=G[2]!==G[0]&&G[3]!==G[1]&&this.#$.get(q),Q!==!1&&(Y=[0,0,0,0],j1.axialAlignedBoundingBox(G,q.fontMatrix,Y),X===1&&z===0&&R===0||j1.scaleMinMax([X,0,0,-X,z,R],Y),Q)))return this.recordBBox(P,Z,Y[0],Y[2],Y[1],Y[3]);if(!f)return this.recordFullPageBBox(P);let W=f();return G&&Y&&Q===void 0&&(Q=Y[0]<=z-W.actualBoundingBoxLeft&&Y[2]>=z+W.actualBoundingBoxRight&&Y[1]<=R-W.actualBoundingBoxAscent&&Y[3]>=R+W.actualBoundingBoxDescent,this.#$.set(q,Q),Q)?this.recordBBox(P,Z,Y[0],Y[2],Y[1],Y[3]):this.recordBBox(P,Z,z-W.actualBoundingBoxLeft,z+W.actualBoundingBoxRight,R-W.actualBoundingBoxAscent,R+W.actualBoundingBoxDescent)}recordFullPageBBox(P){return this.#f[0]=Math.max(0,this.#G[0]),this.#f[1]=Math.max(0,this.#G[1]),this.#f[2]=Math.min(this.#J,this.#G[2]),this.#f[3]=Math.min(this.#B,this.#G[3]),this}getSimpleIndex(P){return this.#P[P]}recordDependencies(P,Z){let q=this.#Y,X=this.#P,z=this.#Z;for(let R of Z)R in this.#P?q.add(X[R]):(R in z)&&z[R].forEach(q.add,q);return this}recordNamedDependency(P,Z){return this.#X.has(Z)&&this.#Y.add(this.#X.get(Z)),this}recordOperation(P,Z=!1){if(this.recordDependencies(P,[l5]),this.#U){let q=y2(this.#U,P),{dependencies:X}=q;this.#Y.forEach(X.add,X),this.#q.forEach(X.add,X),this.#z.forEach(X.add,X),X.delete(P),q.isRenderingOperation=!0}if(this.#Q===P){let q=DR(256*this.#f[0]/this.#J),X=DR(256*this.#f[1]/this.#B),z=wR(256*this.#f[2]/this.#J),R=wR(256*this.#f[3]/this.#B);O2(this.#K,P,q,X,z,R);for(let f of this.#Y)f!==P&&O2(this.#K,f,q,X,z,R);for(let f of this.#q)f!==P&&O2(this.#K,f,q,X,z,R);for(let f of this.#z)f!==P&&O2(this.#K,f,q,X,z,R);Z||(this.#Y.clear(),this.#Q=-1)}return this}recordShowTextOperation(P,Z=!1){let q=Array.from(this.#Y);this.recordOperation(P,Z),this.recordIncrementalData("sameLineText",P);for(let X of q)this.recordIncrementalData("sameLineText",X);return this}bboxToClipBoxDropOperation(P,Z=!1){return this.#Q===P&&(this.#Q=-1,this.#G[0]=Math.max(this.#G[0],this.#f[0]),this.#G[1]=Math.max(this.#G[1],this.#f[1]),this.#G[2]=Math.min(this.#G[2],this.#f[2]),this.#G[3]=Math.min(this.#G[3],this.#f[3]),Z||this.#Y.clear()),this}_takePendingDependencies(){let P=this.#Y;return this.#Y=new Set,P}_extractOperation(P){let Z=this.#_.get(P);return this.#_.delete(P),Z}_pushPendingDependencies(P){for(let Z of P)this.#Y.add(Z)}take(){return this.#$.clear(),new cU(this.#W,this.#K)}takeDebugMetadata(){return this.#U}}class a3{#P;#Z;#X;#q=0;#z=0;constructor(P,Z,q){if(P instanceof a3&&P.#X===!!q)return P;this.#P=P,this.#Z=Z,this.#X=!!q}growOperationsCount(){throw Error("Unreachable")}save(P){return this.#z++,this.#P.save(this.#Z),this}restore(P){return this.#z>0&&(this.#P.restore(this.#Z),this.#z--),this}recordOpenMarker(P){return this.#q++,this}getOpenMarker(){return this.#q>0?this.#Z:this.#P.getOpenMarker()}recordCloseMarker(P){return this.#q--,this}beginMarkedContent(P){return this}endMarkedContent(P){return this}pushBaseTransform(P){return this.#P.pushBaseTransform(P),this}popBaseTransform(){return this.#P.popBaseTransform(),this}recordSimpleData(P,Z){return this.#P.recordSimpleData(P,this.#Z),this}recordIncrementalData(P,Z){return this.#P.recordIncrementalData(P,this.#Z),this}resetIncrementalData(P,Z){return this.#P.resetIncrementalData(P,this.#Z),this}recordNamedData(P,Z){return this}recordSimpleDataFromNamed(P,Z,q){return this.#P.recordSimpleDataFromNamed(P,Z,this.#Z),this}recordFutureForcedDependency(P,Z){return this.#P.recordFutureForcedDependency(P,this.#Z),this}inheritSimpleDataAsFutureForcedDependencies(P){return this.#P.inheritSimpleDataAsFutureForcedDependencies(P),this}inheritPendingDependenciesAsFutureForcedDependencies(){return this.#P.inheritPendingDependenciesAsFutureForcedDependencies(),this}resetBBox(P){return this.#X||this.#P.resetBBox(this.#Z),this}recordClipBox(P,Z,q,X,z,R){return this.#X||this.#P.recordClipBox(this.#Z,Z,q,X,z,R),this}recordBBox(P,Z,q,X,z,R){return this.#X||this.#P.recordBBox(this.#Z,Z,q,X,z,R),this}recordCharacterBBox(P,Z,q,X,z,R,f){return this.#X||this.#P.recordCharacterBBox(this.#Z,Z,q,X,z,R,f),this}recordFullPageBBox(P){return this.#X||this.#P.recordFullPageBBox(this.#Z),this}getSimpleIndex(P){return this.#P.getSimpleIndex(P)}recordDependencies(P,Z){return this.#P.recordDependencies(this.#Z,Z),this}recordNamedDependency(P,Z){return this.#P.recordNamedDependency(this.#Z,Z),this}recordOperation(P){return this.#P.recordOperation(this.#Z,!0),this}recordShowTextOperation(P){return this.#P.recordShowTextOperation(this.#Z,!0),this}bboxToClipBoxDropOperation(P){return this.#X||this.#P.bboxToClipBoxDropOperation(this.#Z,!0),this}take(){throw Error("Unreachable")}takeDebugMetadata(){throw Error("Unreachable")}}function sZ(P,Z){if(!Z)return;let q=Z[2]-Z[0],X=Z[3]-Z[1],z=new Path2D;z.rect(Z[0],Z[1],q,X),P.clip(z)}class mP{isModifyingCurrentTransform(){return!1}getPattern(){X8("Abstract method `getPattern` called.")}}function A9(P,Z,q,X,z,R,f,G){let{coords:Q,colors:Y}=Z,W=P.data,$=4*P.width,_;Q[q+1]>Q[X+1]&&(_=q,q=X,X=_,_=R,R=f,f=_),Q[X+1]>Q[z+1]&&(_=X,X=z,z=_,_=f,f=G,G=_),Q[q+1]>Q[X+1]&&(_=q,q=X,X=_,_=R,R=f,f=_);let J=(Q[q]+Z.offsetX)*Z.scaleX,U=(Q[q+1]+Z.offsetY)*Z.scaleY,K=(Q[X]+Z.offsetX)*Z.scaleX,I=(Q[X+1]+Z.offsetY)*Z.scaleY,B=(Q[z]+Z.offsetX)*Z.scaleX,j=(Q[z+1]+Z.offsetY)*Z.scaleY;if(U>=j)return;let V=Y[R],H=Y[R+1],M=Y[R+2],x=Y[f],A=Y[f+1],k=Y[f+2],b=Y[G],O=Y[G+1],p=Y[G+2],D=Math.round(U),n=Math.round(j),F,l,C,L,m,d,e,E;for(let y=D;y<=n;y++){if(y<I){let o=y<U?0:(U-y)/(U-I);F=J-(J-K)*o,l=V-(V-x)*o,C=H-(H-A)*o,L=M-(M-k)*o}else{let o;o=y>j?1:I===j?0:(I-y)/(I-j),F=K-(K-B)*o,l=x-(x-b)*o,C=A-(A-O)*o,L=k-(k-p)*o}let N;N=y<U?0:y>j?1:(U-y)/(U-j),m=J-(J-B)*N,d=V-(V-b)*N,e=H-(H-O)*N,E=M-(M-p)*N;let h=Math.round(Math.min(F,m)),w=Math.round(Math.max(F,m)),c=$*y+4*h;for(let o=h;o<=w;o++)N=(F-o)/(F-m),N<0?N=0:N>1&&(N=1),W[c++]=l-(l-d)*N|0,W[c++]=C-(C-e)*N|0,W[c++]=L-(L-E)*N|0,W[c++]=255}}function bx(P,Z,q){let{coords:X,colors:z}=Z,R,f;switch(Z.type){case"lattice":let G=Z.verticesPerRow,Q=Math.floor(X.length/G)-1,Y=G-1;for(R=0;R<Q;R++){let W=R*G;for(let $=0;$<Y;$++,W++)A9(P,q,X[W],X[W+1],X[W+G],z[W],z[W+1],z[W+G]),A9(P,q,X[W+G+1],X[W+1],X[W+G],z[W+G+1],z[W+1],z[W+G])}break;case"triangles":for(R=0,f=X.length;R<f;R+=3)A9(P,q,X[R],X[R+1],X[R+2],z[R],z[R+1],z[R+2]);break;default:throw Error("illegal figure")}}class HX{static MAX_PATTERN_SIZE=3000;constructor(P,Z,q,X){this.color=P[1],this.operatorList=P[2],this.matrix=P[3],this.bbox=P[4],this.xstep=P[5],this.ystep=P[6],this.paintType=P[7],this.tilingType=P[8],this.ctx=Z,this.canvasGraphicsFactory=q,this.baseTransform=X}createPatternCanvas(P,Z){let{bbox:q,operatorList:X,paintType:z,tilingType:R,color:f,canvasGraphicsFactory:G}=this,{xstep:Q,ystep:Y}=this;Q=Math.abs(Q),Y=Math.abs(Y),NP("TilingType: "+R);let W=q[0],$=q[1],_=q[2],J=q[3],U=_-W,K=J-$,I=new Float32Array(2);j1.singularValueDecompose2dScale(this.matrix,I);let[B,j]=I;j1.singularValueDecompose2dScale(this.baseTransform,I);let V=B*I[0],H=j*I[1],M=U,x=K,A=!1,k=!1,b=Math.ceil(Q*V),O=Math.ceil(Y*H);b>=Math.ceil(U*V)?M=Q:A=!0,O>=Math.ceil(K*H)?x=Y:k=!0;let p=this.getSizeAndScale(M,this.ctx.canvas.width,V),D=this.getSizeAndScale(x,this.ctx.canvas.height,H),n=P.cachedCanvases.getCanvas("pattern",p.size,D.size),F=n.context,l=G.createCanvasGraphics(F,Z);if(l.groupLevel=P.groupLevel,this.setFillAndStrokeStyleToContext(l,z,f),F.translate(-p.scale*W,-D.scale*$),l.transform(0,p.scale,0,0,D.scale,0,0),F.save(),l.dependencyTracker?.save(),this.clipBbox(l,W,$,_,J),l.baseTransform=$8(l.ctx),l.executeOperatorList(X),l.endDrawing(),l.dependencyTracker?.restore(),F.restore(),A||k){let C=n.canvas;A&&(M=Q),k&&(x=Y);let L=this.getSizeAndScale(M,this.ctx.canvas.width,V),m=this.getSizeAndScale(x,this.ctx.canvas.height,H),d=L.size,e=m.size,E=P.cachedCanvases.getCanvas("pattern-workaround",d,e),y=E.context,N=A?Math.floor(U/Q):0,h=k?Math.floor(K/Y):0;for(let w=0;w<=N;w++)for(let c=0;c<=h;c++)y.drawImage(C,d*w,e*c,d,e,0,0,d,e);return{canvas:E.canvas,scaleX:L.scale,scaleY:m.scale,offsetX:W,offsetY:$}}return{canvas:n.canvas,scaleX:p.scale,scaleY:D.scale,offsetX:W,offsetY:$}}getSizeAndScale(P,Z,q){let X=Math.max(HX.MAX_PATTERN_SIZE,Z),z=Math.ceil(P*q);return z>=X?z=X:q=z/P,{scale:q,size:z}}clipBbox(P,Z,q,X,z){let R=X-Z,f=z-q;P.ctx.rect(Z,q,R,f),j1.axialAlignedBoundingBox([Z,q,X,z],$8(P.ctx),P.current.minMax),P.clip(),P.endPath()}setFillAndStrokeStyleToContext(P,Z,q){let{ctx:X,current:z}=P;switch(Z){case kx:let{fillStyle:R,strokeStyle:f}=this.ctx;X.fillStyle=z.fillColor=R,X.strokeStyle=z.strokeColor=f;break;case Cx:X.fillStyle=X.strokeStyle=q,z.fillColor=z.strokeColor=q;break;default:throw new IU(`Unsupported paint type: ${Z}`)}}isModifyingCurrentTransform(){return!1}getPattern(P,Z,q,X,z){let R=q;X!==A7&&(R=j1.transform(R,Z.baseTransform),this.matrix&&(R=j1.transform(R,this.matrix)));let f=this.createPatternCanvas(Z,z),G=new DOMMatrix(R);G=G.translate(f.offsetX,f.offsetY),G=G.scale(1/f.scaleX,1/f.scaleY);let Q=P.createPattern(f.canvas,"repeat");return Q.setTransform(G),Q}}function Tx({src:P,srcPos:Z=0,dest:q,width:X,height:z,nonBlackColor:R=4294967295,inverseDecode:f=!1}){let G=k8.isLittleEndian?4278190080:255,[Q,Y]=f?[R,G]:[G,R],W=X>>3,$=7&X,_=P.length;q=new Uint32Array(q.buffer);let J=0;for(let U=0;U<z;U++){for(let I=Z+W;Z<I;Z++){let B=Z<_?P[Z]:255;q[J++]=128&B?Y:Q,q[J++]=64&B?Y:Q,q[J++]=32&B?Y:Q,q[J++]=16&B?Y:Q,q[J++]=8&B?Y:Q,q[J++]=4&B?Y:Q,q[J++]=2&B?Y:Q,q[J++]=1&B?Y:Q}if($===0)continue;let K=Z<_?P[Z++]:255;for(let I=0;I<$;I++)q[J++]=K&1<<7-I?Y:Q}return{srcPos:Z,destPos:J}}class oU{constructor(P){this.canvasFactory=P,this.cache=Object.create(null)}getCanvas(P,Z,q){let X;return this.cache[P]!==void 0?(X=this.cache[P],this.canvasFactory.reset(X,Z,q)):(X=this.canvasFactory.create(Z,q),this.cache[P]=X),X}delete(P){delete this.cache[P]}clear(){for(let P in this.cache){let Z=this.cache[P];this.canvasFactory.destroy(Z),delete this.cache[P]}}}function D2(P,Z,q,X,z,R,f,G,Q,Y){let[W,$,_,J,U,K]=$8(P);if($===0&&_===0){let I=f*W+U,B=Math.round(I),j=G*J+K,V=Math.round(j),H=(f+Q)*W+U,M=Math.abs(Math.round(H)-B)||1,x=(G+Y)*J+K,A=Math.abs(Math.round(x)-V)||1;return P.setTransform(Math.sign(W),0,0,Math.sign(J),B,V),P.drawImage(Z,q,X,z,R,0,0,M,A),P.setTransform(W,$,_,J,U,K),[M,A]}if(W===0&&J===0){let I=G*_+U,B=Math.round(I),j=f*$+K,V=Math.round(j),H=(G+Y)*_+U,M=Math.abs(Math.round(H)-B)||1,x=(f+Q)*$+K,A=Math.abs(Math.round(x)-V)||1;return P.setTransform(0,Math.sign($),Math.sign(_),0,B,V),P.drawImage(Z,q,X,z,R,0,0,A,M),P.setTransform(W,$,_,J,U,K),[A,M]}return P.drawImage(Z,q,X,z,R,f,G,Q,Y),[Math.hypot(W,$)*Q,Math.hypot(_,J)*Y]}class hZ{alphaIsShape=!1;fontSize=0;fontSizeScale=1;textMatrix=null;textMatrixScale=1;fontMatrix=pZ;leading=0;x=0;y=0;lineX=0;lineY=0;charSpacing=0;wordSpacing=0;textHScale=1;textRenderingMode=e2;textRise=0;fillColor="#000000";strokeColor="#000000";patternFill=!1;patternStroke=!1;fillAlpha=1;strokeAlpha=1;lineWidth=1;activeSMask=null;transferMaps="none";constructor(P,Z,q){q?.(this),this.clipBox=new Float32Array([0,0,P,Z]),this.minMax=G6.slice()}clone(){let P=Object.create(this);return P.clipBox=this.clipBox.slice(),P.minMax=this.minMax.slice(),P}getPathBoundingBox(P=V5,Z=null){let q=this.minMax.slice();if(P===M7){Z||X8("Stroke bounding box must include transform."),j1.singularValueDecompose2dScale(Z,V0);let X=V0[0]*this.lineWidth/2,z=V0[1]*this.lineWidth/2;q[0]-=X,q[1]-=z,q[2]+=X,q[3]+=z}return q}updateClipFromPath(){let P=j1.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(P||[0,0,0,0])}isEmptyClip(){return this.minMax[0]===1/0}startNewPathAndClipBox(P){this.clipBox.set(P,0),this.minMax.set(G6,0)}getClippedPathBoundingBox(P=V5,Z=null){return j1.intersect(this.clipBox,this.getPathBoundingBox(P,Z))}}function uR(P,Z){if(Z instanceof ImageData)return void P.putImageData(Z,0,0);let{height:q,width:X}=Z,z=q%f0,R=(q-z)/f0,f=z===0?R:R+1,G=P.createImageData(X,f0),Q,Y=0,W=Z.data,$=G.data,_,J,U,K;if(Z.kind===x7.GRAYSCALE_1BPP){let I=W.byteLength,B=new Uint32Array($.buffer,0,$.byteLength>>2),j=B.length,V=X+7>>3,M=k8.isLittleEndian?4278190080:255;for(_=0;_<f;_++){for(U=_<R?f0:z,Q=0,J=0;J<U;J++){let x=I-Y,A=0,k=x>V?X:8*x-7,b=-8&k,O=0,p=0;for(;A<b;A+=8)p=W[Y++],B[Q++]=128&p?4294967295:M,B[Q++]=64&p?4294967295:M,B[Q++]=32&p?4294967295:M,B[Q++]=16&p?4294967295:M,B[Q++]=8&p?4294967295:M,B[Q++]=4&p?4294967295:M,B[Q++]=2&p?4294967295:M,B[Q++]=1&p?4294967295:M;for(;A<k;A++)O===0&&(p=W[Y++],O=128),B[Q++]=p&O?4294967295:M,O>>=1}for(;Q<j;)B[Q++]=0;P.putImageData(G,0,_*f0)}}else if(Z.kind===x7.RGBA_32BPP){for(J=0,K=X*f0*4,_=0;_<R;_++)$.set(W.subarray(Y,Y+K)),Y+=K,P.putImageData(G,0,J),J+=f0;_<f&&(K=X*z*4,$.set(W.subarray(Y,Y+K)),P.putImageData(G,0,J))}else{if(Z.kind!==x7.RGB_24BPP)throw Error(`bad image kind: ${Z.kind}`);for(U=f0,K=X*U,_=0;_<f;_++){for(_>=R&&(U=z,K=X*U),Q=0,J=K;J--;)$[Q++]=W[Y++],$[Q++]=W[Y++],$[Q++]=W[Y++],$[Q++]=255;P.putImageData(G,0,_*f0)}}}function gR(P,Z){if(Z.bitmap)return void P.drawImage(Z.bitmap,0,0);let{height:q,width:X}=Z,z=q%f0,R=(q-z)/f0,f=z===0?R:R+1,G=P.createImageData(X,f0),Q=0,Y=Z.data,W=G.data;for(let $=0;$<f;$++){let _=$<R?f0:z;({srcPos:Q}=Tx({src:Y,srcPos:Q,dest:W,width:X,height:_,nonBlackColor:0})),P.putImageData(G,0,$*f0)}}function i6(P,Z){let q=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(let X of q)P[X]!==void 0&&(Z[X]=P[X]);P.setLineDash!==void 0&&(Z.setLineDash(P.getLineDash()),Z.lineDashOffset=P.lineDashOffset)}function w2(P){P.strokeStyle=P.fillStyle="#000000",P.fillRule="nonzero",P.globalAlpha=1,P.lineWidth=1,P.lineCap="butt",P.lineJoin="miter",P.miterLimit=10,P.globalCompositeOperation="source-over",P.font="10px sans-serif",P.setLineDash!==void 0&&(P.setLineDash([]),P.lineDashOffset=0);let{filter:Z}=P;Z!=="none"&&Z!==""&&(P.filter="none")}function dR(P,Z){if(Z)return!0;j1.singularValueDecompose2dScale(P,V0);let q=Math.fround(u0.pixelRatio*n4.PDF_TO_CSS_UNITS);return V0[0]<=q&&V0[1]<=q}class J6{constructor(P,Z,q,X,z,{optionalContentConfig:R,markedContentStack:f=null},G,Q,Y){this.ctx=P,this.current=new hZ(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=Z,this.objs=q,this.canvasFactory=X,this.filterFactory=z,this.groupStack=[],this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=f||[],this.optionalContentConfig=R,this.cachedCanvases=new oU(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=G,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=Q,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map,this.dependencyTracker=Y??null}getObject(P,Z,q=null){return typeof Z=="string"?(this.dependencyTracker?.recordNamedDependency(P,Z),Z.startsWith("g_")?this.commonObjs.get(Z):this.objs.get(Z)):q}beginDrawing({transform:P,viewport:Z,transparency:q=!1,background:X=null}){let z=this.ctx.canvas.width,R=this.ctx.canvas.height,f=this.ctx.fillStyle;if(this.ctx.fillStyle=X||"#ffffff",this.ctx.fillRect(0,0,z,R),this.ctx.fillStyle=f,q){let G=this.cachedCanvases.getCanvas("transparent",z,R);this.compositeCtx=this.ctx,this.transparentCanvas=G.canvas,this.ctx=G.context,this.ctx.save(),this.ctx.transform(...$8(this.compositeCtx))}this.ctx.save(),w2(this.ctx),P&&(this.ctx.transform(...P),this.outputScaleX=P[0],this.outputScaleY=P[0]),this.ctx.transform(...Z.transform),this.viewportScale=Z.scale,this.baseTransform=$8(this.ctx)}executeOperatorList(P,Z,q,X,z){let{argsArray:R,fnArray:f}=P,G=Z||0,Q=R.length;if(Q===G)return G;let Y=Q-G>10&&typeof q=="function",W=Y?Date.now()+15:0,$=0,_=this.commonObjs,J=this.objs,U,K;for(;;){if(X!==void 0&&G===X.nextBreakPoint)return X.breakIt(G,q),G;if(!z||z(G))if(U=f[G],K=R[G]??null,U!==k6.dependency)K===null?this[U](G):this[U](G,...K);else for(let I of K){this.dependencyTracker?.recordNamedData(I,G);let B=I.startsWith("g_")?_:J;if(!B.has(I))return B.get(I,q),G}if(G++,G===Q)return G;if(Y&&++$>10){if(Date.now()>W)return q(),G;$=0}}}#P(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}endDrawing(){this.#P(),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(let P of this._cachedBitmapsMap.values()){for(let Z of P.values())typeof HTMLCanvasElement<"u"&&Z instanceof HTMLCanvasElement&&(Z.width=Z.height=0);P.clear()}this._cachedBitmapsMap.clear(),this.#Z()}#Z(){if(this.pageColors){let P=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(P!=="none"){let Z=this.ctx.filter;this.ctx.filter=P,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=Z}}}_scaleImage(P,Z){let q=P.width??P.displayWidth,X=P.height??P.displayHeight,z,R,f=Math.max(Math.hypot(Z[0],Z[1]),1),G=Math.max(Math.hypot(Z[2],Z[3]),1),Q=q,Y=X,W="prescale1";for(;f>2&&Q>1||G>2&&Y>1;){let $=Q,_=Y;f>2&&Q>1&&($=Q>=16384?Math.floor(Q/2)-1||1:Math.ceil(Q/2),f/=Q/$),G>2&&Y>1&&(_=Y>=16384?Math.floor(Y/2)-1||1:Math.ceil(Y)/2,G/=Y/_),z=this.cachedCanvases.getCanvas(W,$,_),R=z.context,R.clearRect(0,0,$,_),R.drawImage(P,0,0,Q,Y,0,0,$,_),P=z.canvas,Q=$,Y=_,W=W==="prescale1"?"prescale2":"prescale1"}return{img:P,paintWidth:Q,paintHeight:Y}}_createMaskCanvas(P,Z){let q=this.ctx,{width:X,height:z}=Z,R=this.current.fillColor,f=this.current.patternFill,G=$8(q),Q,Y,W,$;if((Z.bitmap||Z.data)&&Z.count>1){let b=Z.bitmap||Z.data.buffer;Y=JSON.stringify(f?G:[G.slice(0,4),R]),Q=this._cachedBitmapsMap.get(b),Q||(Q=new Map,this._cachedBitmapsMap.set(b,Q));let O=Q.get(Y);if(O&&!f){let p=Math.round(Math.min(G[0],G[2])+G[4]),D=Math.round(Math.min(G[1],G[3])+G[5]);return this.dependencyTracker?.recordDependencies(P,M9),{canvas:O,offsetX:p,offsetY:D}}W=O}W||($=this.cachedCanvases.getCanvas("maskCanvas",X,z),gR($.context,Z));let _=j1.transform(G,[1/X,0,0,-1/z,0,0]);_=j1.transform(_,[1,0,0,1,0,-z]);let J=G6.slice();j1.axialAlignedBoundingBox([0,0,X,z],_,J);let[U,K,I,B]=J,j=Math.round(I-U)||1,V=Math.round(B-K)||1,H=this.cachedCanvases.getCanvas("fillCanvas",j,V),M=H.context,x=U,A=K;M.translate(-x,-A),M.transform(..._),W||(W=this._scaleImage($.canvas,s0(M)),W=W.img,Q&&f&&Q.set(Y,W)),M.imageSmoothingEnabled=dR($8(M),Z.interpolate),D2(M,W,0,0,W.width,W.height,0,0,X,z),M.globalCompositeOperation="source-in";let k=j1.transform(s0(M),[1,0,0,1,-x,-A]);return M.fillStyle=f?R.getPattern(q,this,k,V5,P):R,M.fillRect(0,0,X,z),Q&&!f&&(this.cachedCanvases.delete("fillCanvas"),Q.set(Y,H.canvas)),this.dependencyTracker?.recordDependencies(P,M9),{canvas:H.canvas,offsetX:Math.round(x),offsetY:Math.round(A)}}setLineWidth(P,Z){this.dependencyTracker?.recordSimpleData("lineWidth",P),Z!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=Z,this.ctx.lineWidth=Z}setLineCap(P,Z){this.dependencyTracker?.recordSimpleData("lineCap",P),this.ctx.lineCap=Nx[Z]}setLineJoin(P,Z){this.dependencyTracker?.recordSimpleData("lineJoin",P),this.ctx.lineJoin=vx[Z]}setMiterLimit(P,Z){this.dependencyTracker?.recordSimpleData("miterLimit",P),this.ctx.miterLimit=Z}setDash(P,Z,q){this.dependencyTracker?.recordSimpleData("dash",P);let X=this.ctx;X.setLineDash!==void 0&&(X.setLineDash(Z),X.lineDashOffset=q)}setRenderingIntent(P,Z){}setFlatness(P,Z){}setGState(P,Z){for(let[q,X]of Z)switch(q){case"LW":this.setLineWidth(P,X);break;case"LC":this.setLineCap(P,X);break;case"LJ":this.setLineJoin(P,X);break;case"ML":this.setMiterLimit(P,X);break;case"D":this.setDash(P,X[0],X[1]);break;case"RI":this.setRenderingIntent(P,X);break;case"FL":this.setFlatness(P,X);break;case"Font":this.setFont(P,X[0],X[1]);break;case"CA":this.dependencyTracker?.recordSimpleData("strokeAlpha",P),this.current.strokeAlpha=X;break;case"ca":this.dependencyTracker?.recordSimpleData("fillAlpha",P),this.ctx.globalAlpha=this.current.fillAlpha=X;break;case"BM":this.dependencyTracker?.recordSimpleData("globalCompositeOperation",P),this.ctx.globalCompositeOperation=X;break;case"SMask":this.dependencyTracker?.recordSimpleData("SMask",P),this.current.activeSMask=X?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.dependencyTracker?.recordSimpleData("filter",P),this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(X)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){let P=this.inSMaskMode;this.current.activeSMask&&!P?this.beginSMaskMode():!this.current.activeSMask&&P&&this.endSMaskMode()}beginSMaskMode(P){if(this.inSMaskMode)throw Error("beginSMaskMode called while already in smask mode");let Z=this.ctx.canvas.width,q=this.ctx.canvas.height,X="smaskGroupAt"+this.groupLevel,z=this.cachedCanvases.getCanvas(X,Z,q);this.suspendedCtx=this.ctx;let R=this.ctx=z.context;R.setTransform(this.suspendedCtx.getTransform()),i6(this.suspendedCtx,R),function(f,G){if(f._removeMirroring)throw Error("Context is already forwarding operations.");f.__originalSave=f.save,f.__originalRestore=f.restore,f.__originalRotate=f.rotate,f.__originalScale=f.scale,f.__originalTranslate=f.translate,f.__originalTransform=f.transform,f.__originalSetTransform=f.setTransform,f.__originalResetTransform=f.resetTransform,f.__originalClip=f.clip,f.__originalMoveTo=f.moveTo,f.__originalLineTo=f.lineTo,f.__originalBezierCurveTo=f.bezierCurveTo,f.__originalRect=f.rect,f.__originalClosePath=f.closePath,f.__originalBeginPath=f.beginPath,f._removeMirroring=()=>{f.save=f.__originalSave,f.restore=f.__originalRestore,f.rotate=f.__originalRotate,f.scale=f.__originalScale,f.translate=f.__originalTranslate,f.transform=f.__originalTransform,f.setTransform=f.__originalSetTransform,f.resetTransform=f.__originalResetTransform,f.clip=f.__originalClip,f.moveTo=f.__originalMoveTo,f.lineTo=f.__originalLineTo,f.bezierCurveTo=f.__originalBezierCurveTo,f.rect=f.__originalRect,f.closePath=f.__originalClosePath,f.beginPath=f.__originalBeginPath,delete f._removeMirroring},f.save=function(){G.save(),this.__originalSave()},f.restore=function(){G.restore(),this.__originalRestore()},f.translate=function(Q,Y){G.translate(Q,Y),this.__originalTranslate(Q,Y)},f.scale=function(Q,Y){G.scale(Q,Y),this.__originalScale(Q,Y)},f.transform=function(Q,Y,W,$,_,J){G.transform(Q,Y,W,$,_,J),this.__originalTransform(Q,Y,W,$,_,J)},f.setTransform=function(Q,Y,W,$,_,J){G.setTransform(Q,Y,W,$,_,J),this.__originalSetTransform(Q,Y,W,$,_,J)},f.resetTransform=function(){G.resetTransform(),this.__originalResetTransform()},f.rotate=function(Q){G.rotate(Q),this.__originalRotate(Q)},f.clip=function(Q){G.clip(Q),this.__originalClip(Q)},f.moveTo=function(Q,Y){G.moveTo(Q,Y),this.__originalMoveTo(Q,Y)},f.lineTo=function(Q,Y){G.lineTo(Q,Y),this.__originalLineTo(Q,Y)},f.bezierCurveTo=function(Q,Y,W,$,_,J){G.bezierCurveTo(Q,Y,W,$,_,J),this.__originalBezierCurveTo(Q,Y,W,$,_,J)},f.rect=function(Q,Y,W,$){G.rect(Q,Y,W,$),this.__originalRect(Q,Y,W,$)},f.closePath=function(){G.closePath(),this.__originalClosePath()},f.beginPath=function(){G.beginPath(),this.__originalBeginPath()}}(R,this.suspendedCtx),this.setGState(P,[["BM","source-over"]])}endSMaskMode(){if(!this.inSMaskMode)throw Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),i6(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(P){if(!this.current.activeSMask)return;P?(P[0]=Math.floor(P[0]),P[1]=Math.floor(P[1]),P[2]=Math.ceil(P[2]),P[3]=Math.ceil(P[3])):P=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];let Z=this.current.activeSMask,q=this.suspendedCtx;this.composeSMask(q,Z,this.ctx,P),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(P,Z,q,X){let z=X[0],R=X[1],f=X[2]-z,G=X[3]-R;f!==0&&G!==0&&(this.genericComposeSMask(Z.context,q,f,G,Z.subtype,Z.backdrop,Z.transferMap,z,R,Z.offsetX,Z.offsetY),P.save(),P.globalAlpha=1,P.globalCompositeOperation="source-over",P.setTransform(1,0,0,1,0,0),P.drawImage(q.canvas,0,0),P.restore())}genericComposeSMask(P,Z,q,X,z,R,f,G,Q,Y,W){let $=P.canvas,_=G-Y,J=Q-W;if(R)if(_<0||J<0||_+q>$.width||J+X>$.height){let K=this.cachedCanvases.getCanvas("maskExtension",q,X),I=K.context;I.drawImage($,-_,-J),I.globalCompositeOperation="destination-atop",I.fillStyle=R,I.fillRect(0,0,q,X),I.globalCompositeOperation="source-over",$=K.canvas,_=J=0}else{P.save(),P.globalAlpha=1,P.setTransform(1,0,0,1,0,0);let K=new Path2D;K.rect(_,J,q,X),P.clip(K),P.globalCompositeOperation="destination-atop",P.fillStyle=R,P.fillRect(_,J,q,X),P.restore()}Z.save(),Z.globalAlpha=1,Z.setTransform(1,0,0,1,0,0),z==="Alpha"&&f?Z.filter=this.filterFactory.addAlphaFilter(f):z==="Luminosity"&&(Z.filter=this.filterFactory.addLuminosityFilter(f));let U=new Path2D;U.rect(G,Q,q,X),Z.clip(U),Z.globalCompositeOperation="destination-in",Z.drawImage($,_,J,q,X,G,Q,q,X),Z.restore()}save(P){this.inSMaskMode&&i6(this.ctx,this.suspendedCtx),this.ctx.save();let Z=this.current;this.stateStack.push(Z),this.current=Z.clone(),this.dependencyTracker?.save(P)}restore(P){this.dependencyTracker?.restore(P),this.stateStack.length!==0?(this.current=this.stateStack.pop(),this.ctx.restore(),this.inSMaskMode&&i6(this.suspendedCtx,this.ctx),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null):this.inSMaskMode&&this.endSMaskMode()}transform(P,Z,q,X,z,R,f){this.dependencyTracker?.recordIncrementalData("transform",P),this.ctx.transform(Z,q,X,z,R,f),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(P,Z,q,X){let[z]=q;if(!X)return z||=q[0]=new Path2D,void this[Z](P,z);if(this.dependencyTracker!==null){let R=Z===k6.stroke?this.current.lineWidth/2:0;this.dependencyTracker.resetBBox(P).recordBBox(P,this.ctx,X[0]-R,X[2]+R,X[1]-R,X[3]+R).recordDependencies(P,["transform"])}if(!(z instanceof Path2D)){let R=q[0]=new Path2D;for(let f=0,G=z.length;f<G;)switch(z[f++]){case Kx:R.moveTo(z[f++],z[f++]);break;case Bx:R.lineTo(z[f++],z[f++]);break;case Ix:R.bezierCurveTo(z[f++],z[f++],z[f++],z[f++],z[f++],z[f++]);break;case jx:R.closePath();break;default:y1(`Unrecognized drawing path operator: ${z[f-1]}`)}z=R}j1.axialAlignedBoundingBox(X,$8(this.ctx),this.current.minMax),this[Z](P,z),this._pathStartIdx=P}closePath(P){this.ctx.closePath()}stroke(P,Z,q=!0){let X=this.ctx,z=this.current.strokeColor;if(X.globalAlpha=this.current.strokeAlpha,this.contentVisible)if(typeof z=="object"&&z?.getPattern){let R=z.isModifyingCurrentTransform()?X.getTransform():null;if(X.save(),X.strokeStyle=z.getPattern(X,this,s0(X),M7,P),R){let f=new Path2D;f.addPath(Z,X.getTransform().invertSelf().multiplySelf(R)),Z=f}this.rescaleAndStroke(Z,!1),X.restore()}else this.rescaleAndStroke(Z,!0);this.dependencyTracker?.recordDependencies(P,ER),q&&this.consumePath(P,Z,this.current.getClippedPathBoundingBox(M7,$8(this.ctx))),X.globalAlpha=this.current.fillAlpha}closeStroke(P,Z){this.stroke(P,Z)}fill(P,Z,q=!0){let X=this.ctx,z=this.current.fillColor,R=!1;if(this.current.patternFill){let G=z.isModifyingCurrentTransform()?X.getTransform():null;if(this.dependencyTracker?.save(P),X.save(),X.fillStyle=z.getPattern(X,this,s0(X),V5,P),G){let Q=new Path2D;Q.addPath(Z,X.getTransform().invertSelf().multiplySelf(G)),Z=Q}R=!0}let f=this.current.getClippedPathBoundingBox();this.contentVisible&&f!==null&&(this.pendingEOFill?(X.fill(Z,"evenodd"),this.pendingEOFill=!1):X.fill(Z)),this.dependencyTracker?.recordDependencies(P,H9),R&&(X.restore(),this.dependencyTracker?.restore(P)),q&&this.consumePath(P,Z,f)}eoFill(P,Z){this.pendingEOFill=!0,this.fill(P,Z)}fillStroke(P,Z){this.fill(P,Z,!1),this.stroke(P,Z,!1),this.consumePath(P,Z)}eoFillStroke(P,Z){this.pendingEOFill=!0,this.fillStroke(P,Z)}closeFillStroke(P,Z){this.fillStroke(P,Z)}closeEOFillStroke(P,Z){this.pendingEOFill=!0,this.fillStroke(P,Z)}endPath(P,Z){this.consumePath(P,Z)}rawFillPath(P,Z){this.ctx.fill(Z),this.dependencyTracker?.recordDependencies(P,Mx).recordOperation(P)}clip(P){this.dependencyTracker?.recordFutureForcedDependency("clipMode",P),this.pendingClip=Fx}eoClip(P){this.dependencyTracker?.recordFutureForcedDependency("clipMode",P),this.pendingClip=cR}beginText(P){this.current.textMatrix=null,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0,this.dependencyTracker?.recordOpenMarker(P).resetIncrementalData("sameLineText").resetIncrementalData("moveText",P)}endText(P){let Z=this.pendingTextPaths,q=this.ctx;if(this.dependencyTracker){let{dependencyTracker:X}=this;Z!==void 0&&X.recordFutureForcedDependency("textClip",X.getOpenMarker()).recordFutureForcedDependency("textClip",P),X.recordCloseMarker(P)}if(Z!==void 0){let X=new Path2D,z=q.getTransform().invertSelf();for(let{transform:R,x:f,y:G,fontSize:Q,path:Y}of Z)Y&&X.addPath(Y,new DOMMatrix(R).preMultiplySelf(z).translate(f,G).scale(Q,-Q));q.clip(X)}delete this.pendingTextPaths}setCharSpacing(P,Z){this.dependencyTracker?.recordSimpleData("charSpacing",P),this.current.charSpacing=Z}setWordSpacing(P,Z){this.dependencyTracker?.recordSimpleData("wordSpacing",P),this.current.wordSpacing=Z}setHScale(P,Z){this.dependencyTracker?.recordSimpleData("hScale",P),this.current.textHScale=Z/100}setLeading(P,Z){this.dependencyTracker?.recordSimpleData("leading",P),this.current.leading=-Z}setFont(P,Z,q){this.dependencyTracker?.recordSimpleData("font",P).recordSimpleDataFromNamed("fontObj",Z,P);let X=this.commonObjs.get(Z),z=this.current;if(!X)throw Error(`Can't find font for ${Z}`);if(z.fontMatrix=X.fontMatrix||pZ,z.fontMatrix[0]!==0&&z.fontMatrix[3]!==0||y1("Invalid font matrix for font "+Z),q<0?(q=-q,z.fontDirection=-1):z.fontDirection=1,this.current.font=X,this.current.fontSize=q,X.isType3Font)return;let R=X.loadedName||"sans-serif",f=X.systemFontInfo?.css||`"${R}", ${X.fallbackName}`,G="normal";X.black?G="900":X.bold&&(G="bold");let Q=X.italic?"italic":"normal",Y=q;q<16?Y=16:q>100&&(Y=100),this.current.fontSizeScale=q/Y,this.ctx.font=`${Q} ${G} ${Y}px ${f}`}setTextRenderingMode(P,Z){this.dependencyTracker?.recordSimpleData("textRenderingMode",P),this.current.textRenderingMode=Z}setTextRise(P,Z){this.dependencyTracker?.recordSimpleData("textRise",P),this.current.textRise=Z}moveText(P,Z,q){this.dependencyTracker?.resetIncrementalData("sameLineText").recordIncrementalData("moveText",P),this.current.x=this.current.lineX+=Z,this.current.y=this.current.lineY+=q}setLeadingMoveText(P,Z,q){this.setLeading(P,-q),this.moveText(P,Z,q)}setTextMatrix(P,Z){this.dependencyTracker?.recordSimpleData("textMatrix",P);let{current:q}=this;q.textMatrix=Z,q.textMatrixScale=Math.hypot(Z[0],Z[1]),q.x=q.lineX=0,q.y=q.lineY=0}nextLine(P){this.moveText(P,0,this.current.leading),this.dependencyTracker?.recordIncrementalData("moveText",this.dependencyTracker.getSimpleIndex("leading")??P)}#X(P,Z,q){let X=new Path2D;return X.addPath(P,new DOMMatrix(q).invertSelf().multiplySelf(Z)),X}paintChar(P,Z,q,X,z,R){let f=this.ctx,G=this.current,Q=G.font,Y=G.textRenderingMode,W=G.fontSize/G.fontSizeScale,$=Y&HR,_=!!(Y&MR),J=G.patternFill&&!Q.missingFile,U=G.patternStroke&&!Q.missingFile,K;if((Q.disableFontFace||_||J||U)&&!Q.missingFile&&(K=Q.getPathGenerator(this.commonObjs,Z)),K&&(Q.disableFontFace||J||U)){let I;if(f.save(),f.translate(q,X),f.scale(W,-W),this.dependencyTracker?.recordCharacterBBox(P,f,Q),$===e2||$===n6)if(z){I=f.getTransform(),f.setTransform(...z);let B=this.#X(K,I,z);f.fill(B)}else f.fill(K);if($===B9||$===n6)if(R){I||=f.getTransform(),f.setTransform(...R);let{a:B,b:j,c:V,d:H}=I,M=j1.inverseTransform(R),x=j1.transform([B,j,V,H,0,0],M);j1.singularValueDecompose2dScale(x,V0),f.lineWidth*=Math.max(V0[0],V0[1])/W,f.stroke(this.#X(K,I,R))}else f.lineWidth/=W,f.stroke(K);f.restore()}else $!==e2&&$!==n6||(f.fillText(Z,q,X),this.dependencyTracker?.recordCharacterBBox(P,f,Q,W,q,X,()=>f.measureText(Z))),$!==B9&&$!==n6||(this.dependencyTracker&&this.dependencyTracker?.recordCharacterBBox(P,f,Q,W,q,X,()=>f.measureText(Z)).recordDependencies(P,ER),f.strokeText(Z,q,X));if(_)(this.pendingTextPaths||=[]).push({transform:$8(f),x:q,y:X,fontSize:W,path:K}),this.dependencyTracker?.recordCharacterBBox(P,f,Q,W,q,X)}get isFontSubpixelAAEnabled(){let{context:P}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);P.scale(1.5,1),P.fillText("I",0,10);let Z=P.getImageData(0,0,10,10).data,q=!1;for(let X=3;X<Z.length;X+=4)if(Z[X]>0&&Z[X]<255){q=!0;break}return D1(this,"isFontSubpixelAAEnabled",q)}showText(P,Z){this.dependencyTracker&&(this.dependencyTracker.recordDependencies(P,Ax).resetBBox(P),this.current.textRenderingMode&MR&&this.dependencyTracker.recordFutureForcedDependency("textClip",P).inheritPendingDependenciesAsFutureForcedDependencies());let q=this.current,X=q.font;if(X.isType3Font)return this.showType3Text(P,Z),void this.dependencyTracker?.recordShowTextOperation(P);let z=q.fontSize;if(z===0)return void this.dependencyTracker?.recordOperation(P);let R=this.ctx,f=q.fontSizeScale,G=q.charSpacing,Q=q.wordSpacing,Y=q.fontDirection,W=q.textHScale*Y,$=Z.length,_=X.vertical,J=_?1:-1,U=X.defaultVMetrics,K=z*q.fontMatrix[0],I=q.textRenderingMode===e2&&!X.disableFontFace&&!q.patternFill,B,j;if(R.save(),q.textMatrix&&R.transform(...q.textMatrix),R.translate(q.x,q.y+q.textRise),Y>0?R.scale(W,-1):R.scale(W,1),q.patternFill){R.save();let A=q.fillColor.getPattern(R,this,s0(R),V5,P);B=$8(R),R.restore(),R.fillStyle=A}if(q.patternStroke){R.save();let A=q.strokeColor.getPattern(R,this,s0(R),M7,P);j=$8(R),R.restore(),R.strokeStyle=A}let{lineWidth:V,textMatrixScale:H}=q;if(H===0||V===0){let A=q.textRenderingMode&HR;A!==B9&&A!==n6||(V=this.getSinglePixelWidth())}else V/=H;if(f!==1&&(R.scale(f,f),V/=f),R.lineWidth=V,X.isInvalidPDFjsFont){let A=[],k=0;for(let O of Z)A.push(O.unicode),k+=O.width;let b=A.join("");if(R.fillText(b,0,0),this.dependencyTracker!==null){let O=R.measureText(b);this.dependencyTracker.recordBBox(P,this.ctx,-O.actualBoundingBoxLeft,O.actualBoundingBoxRight,-O.actualBoundingBoxAscent,O.actualBoundingBoxDescent).recordShowTextOperation(P)}return q.x+=k*K*W,R.restore(),void this.compose()}let M,x=0;for(M=0;M<$;++M){let A=Z[M];if(typeof A=="number"){x+=J*A*z/1000;continue}let k=!1,b=(A.isSpace?Q:0)+G,O=A.fontChar,p=A.accent,D,n,F,l=A.width;if(_){let C=A.vmetric||U,L=-(A.vmetric?C[1]:0.5*l)*K,m=C[2]*K;l=C?-C[0]:l,D=L/f,n=(x+m)/f}else D=x/f,n=0;if(X.remeasure&&l>0){F=R.measureText(O);let C=1000*F.width/z*f;if(l<C&&this.isFontSubpixelAAEnabled){let L=l/C;k=!0,R.save(),R.scale(L,1),D/=L}else l!==C&&(D+=(l-C)/2000*z/f)}if(this.contentVisible&&(A.isInFont||X.missingFile)){if(I&&!p)R.fillText(O,D,n),this.dependencyTracker?.recordCharacterBBox(P,R,F?{bbox:null}:X,z/f,D,n,()=>F??R.measureText(O));else if(this.paintChar(P,O,D,n,B,j),p){let C=D+z*p.offset.x/f,L=n-z*p.offset.y/f;this.paintChar(P,p.fontChar,C,L,B,j)}}x+=_?l*K-b*Y:l*K+b*Y,k&&R.restore()}_?q.y-=x:q.x+=x*W,R.restore(),this.compose(),this.dependencyTracker?.recordShowTextOperation(P)}showType3Text(P,Z){let q=this.ctx,X=this.current,z=X.font,R=X.fontSize,f=X.fontDirection,G=z.vertical?1:-1,Q=X.charSpacing,Y=X.wordSpacing,W=X.textHScale*f,$=X.fontMatrix||pZ,_=Z.length,J,U,K,I;if(X.textRenderingMode===Wx||R===0)return;this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,q.save(),X.textMatrix&&q.transform(...X.textMatrix),q.translate(X.x,X.y+X.textRise),q.scale(W,f);let B=this.dependencyTracker;for(this.dependencyTracker=B?new a3(B,P):null,J=0;J<_;++J){if(U=Z[J],typeof U=="number"){I=G*U*R/1000,this.ctx.translate(I,0),X.x+=I*W;continue}let j=(U.isSpace?Y:0)+Q,V=z.charProcOperatorList[U.operatorListId];V?this.contentVisible&&(this.save(),q.scale(R,R),q.transform(...$),this.executeOperatorList(V),this.restore()):y1(`Type3 character "${U.operatorListId}" is not available.`);let H=[U.width,0];j1.applyTransform(H,$),K=H[0]*R+j,q.translate(K,0),X.x+=K*W}q.restore(),B&&(this.dependencyTracker=B)}setCharWidth(P,Z,q){}setCharWidthAndBounds(P,Z,q,X,z,R,f){let G=new Path2D;G.rect(X,z,R-X,f-z),this.ctx.clip(G),this.dependencyTracker?.recordBBox(P,this.ctx,X,R,z,f).recordClipBox(P,this.ctx,X,R,z,f),this.endPath(P)}getColorN_Pattern(P,Z){let q;if(Z[0]==="TilingPattern"){let X=this.baseTransform||$8(this.ctx),z={createCanvasGraphics:(R,f)=>new J6(R,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack},void 0,void 0,this.dependencyTracker?new a3(this.dependencyTracker,f,!0):null)};q=new HX(Z,this.ctx,z,X)}else q=this._getPattern(P,Z[1],Z[2]);return q}setStrokeColorN(P,...Z){this.dependencyTracker?.recordSimpleData("strokeColor",P),this.current.strokeColor=this.getColorN_Pattern(P,Z),this.current.patternStroke=!0}setFillColorN(P,...Z){this.dependencyTracker?.recordSimpleData("fillColor",P),this.current.fillColor=this.getColorN_Pattern(P,Z),this.current.patternFill=!0}setStrokeRGBColor(P,Z){this.dependencyTracker?.recordSimpleData("strokeColor",P),this.ctx.strokeStyle=this.current.strokeColor=Z,this.current.patternStroke=!1}setStrokeTransparent(P){this.dependencyTracker?.recordSimpleData("strokeColor",P),this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(P,Z){this.dependencyTracker?.recordSimpleData("fillColor",P),this.ctx.fillStyle=this.current.fillColor=Z,this.current.patternFill=!1}setFillTransparent(P){this.dependencyTracker?.recordSimpleData("fillColor",P),this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(P,Z,q=null){let X;return this.cachedPatterns.has(Z)?X=this.cachedPatterns.get(Z):(X=function(z){switch(z[0]){case"RadialAxial":return new hU(z);case"Mesh":return new rU(z);case"Dummy":return new lU}throw Error(`Unknown IR type: ${z[0]}`)}(this.getObject(P,Z)),this.cachedPatterns.set(Z,X)),q&&(X.matrix=q),X}shadingFill(P,Z){if(!this.contentVisible)return;let q=this.ctx;this.save(P);let X=this._getPattern(P,Z);q.fillStyle=X.getPattern(q,this,s0(q),A7,P);let z=s0(q);if(z){let{width:R,height:f}=q.canvas,G=G6.slice();j1.axialAlignedBoundingBox([0,0,R,f],z,G);let[Q,Y,W,$]=G;this.ctx.fillRect(Q,Y,W-Q,$-Y)}else this.ctx.fillRect(-10000000000,-10000000000,20000000000,20000000000);this.dependencyTracker?.resetBBox(P).recordFullPageBBox(P).recordDependencies(P,Lx).recordDependencies(P,H9).recordOperation(P),this.compose(this.current.getClippedPathBoundingBox()),this.restore(P)}beginInlineImage(){X8("Should not call beginInlineImage")}beginImageData(){X8("Should not call beginImageData")}paintFormXObjectBegin(P,Z,q){if(this.contentVisible&&(this.save(P),this.baseTransformStack.push(this.baseTransform),Z&&this.transform(P,...Z),this.baseTransform=$8(this.ctx),q)){j1.axialAlignedBoundingBox(q,this.baseTransform,this.current.minMax);let[X,z,R,f]=q,G=new Path2D;G.rect(X,z,R-X,f-z),this.ctx.clip(G),this.dependencyTracker?.recordClipBox(P,this.ctx,X,R,z,f),this.endPath(P)}}paintFormXObjectEnd(P){this.contentVisible&&(this.restore(P),this.baseTransform=this.baseTransformStack.pop())}beginGroup(P,Z){if(!this.contentVisible)return;this.save(P),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);let q=this.ctx;Z.isolated||NP("TODO: Support non-isolated groups."),Z.knockout&&y1("Knockout groups not supported.");let X=$8(q);if(Z.matrix&&q.transform(...Z.matrix),!Z.bbox)throw Error("Bounding box is required.");let z=G6.slice();j1.axialAlignedBoundingBox(Z.bbox,$8(q),z);let R=[0,0,q.canvas.width,q.canvas.height];z=j1.intersect(z,R)||[0,0,0,0];let f=Math.floor(z[0]),G=Math.floor(z[1]),Q=Math.max(Math.ceil(z[2])-f,1),Y=Math.max(Math.ceil(z[3])-G,1);this.current.startNewPathAndClipBox([0,0,Q,Y]);let W="groupAt"+this.groupLevel;Z.smask&&(W+="_smask_"+this.smaskCounter++%2);let $=this.cachedCanvases.getCanvas(W,Q,Y),_=$.context;_.translate(-f,-G),_.transform(...X);let J=new Path2D,[U,K,I,B]=Z.bbox;if(J.rect(U,K,I-U,B-K),Z.matrix){let j=new Path2D;j.addPath(J,new DOMMatrix(Z.matrix)),J=j}_.clip(J),Z.smask&&this.smaskStack.push({canvas:$.canvas,context:_,offsetX:f,offsetY:G,subtype:Z.smask.subtype,backdrop:Z.smask.backdrop,transferMap:Z.smask.transferMap||null,startTransformInverse:null}),Z.smask&&!this.dependencyTracker||(q.setTransform(1,0,0,1,0,0),q.translate(f,G),q.save()),i6(q,_),this.ctx=_,this.dependencyTracker?.inheritSimpleDataAsFutureForcedDependencies(["fillAlpha","strokeAlpha","globalCompositeOperation"]).pushBaseTransform(q),this.setGState(P,[["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(q),this.groupLevel++}endGroup(P,Z){if(!this.contentVisible)return;this.groupLevel--;let q=this.ctx,X=this.groupStack.pop();if(this.ctx=X,this.ctx.imageSmoothingEnabled=!1,this.dependencyTracker?.popBaseTransform(),Z.smask)this.tempSMask=this.smaskStack.pop(),this.restore(P),this.dependencyTracker&&this.ctx.restore();else{this.ctx.restore();let z=$8(this.ctx);this.restore(P),this.ctx.save(),this.ctx.setTransform(...z);let R=G6.slice();j1.axialAlignedBoundingBox([0,0,q.canvas.width,q.canvas.height],z,R),this.ctx.drawImage(q.canvas,0,0),this.ctx.restore(),this.compose(R)}}beginAnnotation(P,Z,q,X,z,R){if(this.#P(),w2(this.ctx),this.ctx.save(),this.save(P),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),q){let f=q[2]-q[0],G=q[3]-q[1];if(R&&this.annotationCanvasMap){(X=X.slice())[4]-=q[0],X[5]-=q[1],(q=q.slice())[0]=q[1]=0,q[2]=f,q[3]=G,j1.singularValueDecompose2dScale($8(this.ctx),V0);let{viewportScale:Q}=this,Y=Math.ceil(f*this.outputScaleX*Q),W=Math.ceil(G*this.outputScaleY*Q);this.annotationCanvas=this.canvasFactory.create(Y,W);let{canvas:$,context:_}=this.annotationCanvas;this.annotationCanvasMap.set(Z,$),this.annotationCanvas.savedCtx=this.ctx,this.ctx=_,this.ctx.save(),this.ctx.setTransform(V0[0],0,0,-V0[1],0,G*V0[1]),w2(this.ctx)}else{w2(this.ctx),this.endPath(P);let Q=new Path2D;Q.rect(q[0],q[1],f,G),this.ctx.clip(Q)}}this.current=new hZ(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(P,...X),this.transform(P,...z)}endAnnotation(P){this.annotationCanvas&&(this.ctx.restore(),this.#Z(),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(P,Z){if(!this.contentVisible)return;let q=Z.count;(Z=this.getObject(P,Z.data,Z)).count=q;let X=this.ctx,z=this._createMaskCanvas(P,Z),R=z.canvas;X.save(),X.setTransform(1,0,0,1,0,0),X.drawImage(R,z.offsetX,z.offsetY),this.dependencyTracker?.resetBBox(P).recordBBox(P,this.ctx,z.offsetX,z.offsetX+R.width,z.offsetY,z.offsetY+R.height).recordOperation(P),X.restore(),this.compose()}paintImageMaskXObjectRepeat(P,Z,q,X=0,z=0,R,f){if(!this.contentVisible)return;Z=this.getObject(P,Z.data,Z);let G=this.ctx;G.save();let Q=$8(G);G.transform(q,X,z,R,0,0);let Y=this._createMaskCanvas(P,Z);G.setTransform(1,0,0,1,Y.offsetX-Q[4],Y.offsetY-Q[5]),this.dependencyTracker?.resetBBox(P);for(let W=0,$=f.length;W<$;W+=2){let _=j1.transform(Q,[q,X,z,R,f[W],f[W+1]]);G.drawImage(Y.canvas,_[4],_[5]),this.dependencyTracker?.recordBBox(P,this.ctx,_[4],_[4]+Y.canvas.width,_[5],_[5]+Y.canvas.height)}G.restore(),this.compose(),this.dependencyTracker?.recordOperation(P)}paintImageMaskXObjectGroup(P,Z){if(!this.contentVisible)return;let q=this.ctx,X=this.current.fillColor,z=this.current.patternFill;this.dependencyTracker?.resetBBox(P).recordDependencies(P,M9);for(let R of Z){let{data:f,width:G,height:Q,transform:Y}=R,W=this.cachedCanvases.getCanvas("maskCanvas",G,Q),$=W.context;$.save(),gR($,this.getObject(P,f,R)),$.globalCompositeOperation="source-in",$.fillStyle=z?X.getPattern($,this,s0(q),V5,P):X,$.fillRect(0,0,G,Q),$.restore(),q.save(),q.transform(...Y),q.scale(1,-1),D2(q,W.canvas,0,0,G,Q,0,-1,1,1),this.dependencyTracker?.recordBBox(P,q,0,G,0,Q),q.restore()}this.compose(),this.dependencyTracker?.recordOperation(P)}paintImageXObject(P,Z){if(!this.contentVisible)return;let q=this.getObject(P,Z);q?this.paintInlineImageXObject(P,q):y1("Dependent image isn't ready yet")}paintImageXObjectRepeat(P,Z,q,X,z){if(!this.contentVisible)return;let R=this.getObject(P,Z);if(!R)return void y1("Dependent image isn't ready yet");let{width:f,height:G}=R,Q=[];for(let Y=0,W=z.length;Y<W;Y+=2)Q.push({transform:[q,0,0,X,z[Y],z[Y+1]],x:0,y:0,w:f,h:G});this.paintInlineImageXObjectGroup(P,R,Q)}applyTransferMapsToCanvas(P){return this.current.transferMaps!=="none"&&(P.filter=this.current.transferMaps,P.drawImage(P.canvas,0,0),P.filter="none"),P.canvas}applyTransferMapsToBitmap(P){if(this.current.transferMaps==="none")return P.bitmap;let{bitmap:Z,width:q,height:X}=P,z=this.cachedCanvases.getCanvas("inlineImage",q,X),R=z.context;return R.filter=this.current.transferMaps,R.drawImage(Z,0,0),R.filter="none",z.canvas}paintInlineImageXObject(P,Z){if(!this.contentVisible)return;let{width:q,height:X}=Z,z=this.ctx;this.save(P);let{filter:R}=z,f;if(R!=="none"&&R!==""&&(z.filter="none"),z.scale(1/q,-1/X),Z.bitmap)f=this.applyTransferMapsToBitmap(Z);else if(typeof HTMLElement=="function"&&Z instanceof HTMLElement||!Z.data)f=Z;else{let Q=this.cachedCanvases.getCanvas("inlineImage",q,X).context;uR(Q,Z),f=this.applyTransferMapsToCanvas(Q)}let G=this._scaleImage(f,s0(z));z.imageSmoothingEnabled=dR($8(z),Z.interpolate),this.dependencyTracker?.resetBBox(P).recordBBox(P,z,0,q,-X,0).recordDependencies(P,Hx).recordOperation(P),D2(z,G.img,0,0,G.paintWidth,G.paintHeight,0,-X,q,X),this.compose(),this.restore(P)}paintInlineImageXObjectGroup(P,Z,q){if(!this.contentVisible)return;let X=this.ctx,z;if(Z.bitmap)z=Z.bitmap;else{let{width:R,height:f}=Z,G=this.cachedCanvases.getCanvas("inlineImage",R,f).context;uR(G,Z),z=this.applyTransferMapsToCanvas(G)}this.dependencyTracker?.resetBBox(P);for(let R of q)X.save(),X.transform(...R.transform),X.scale(1,-1),D2(X,z,R.x,R.y,R.w,R.h,0,-1,1,1),this.dependencyTracker?.recordBBox(P,X,0,1,-1,0),X.restore();this.dependencyTracker?.recordOperation(P),this.compose()}paintSolidColorImageMask(P){this.contentVisible&&(this.dependencyTracker?.resetBBox(P).recordBBox(P,this.ctx,0,1,0,1).recordDependencies(P,H9).recordOperation(P),this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(P,Z){}markPointProps(P,Z,q){}beginMarkedContent(P,Z){this.dependencyTracker?.beginMarkedContent(P),this.markedContentStack.push({visible:!0})}beginMarkedContentProps(P,Z,q){this.dependencyTracker?.beginMarkedContent(P),Z==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(q)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(P){this.dependencyTracker?.endMarkedContent(P),this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(P){}endCompat(P){}consumePath(P,Z,q){let X=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(q);let z=this.ctx;this.pendingClip?(X||(this.pendingClip===cR?z.clip(Z,"evenodd"):z.clip(Z)),this.pendingClip=null,this.dependencyTracker?.bboxToClipBoxDropOperation(P).recordFutureForcedDependency("clipPath",P)):this.dependencyTracker?.recordOperation(P),this.current.startNewPathAndClipBox(this.current.clipBox)}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){let P=$8(this.ctx);if(P[1]===0&&P[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(P[0]),Math.abs(P[3]));else{let Z=Math.abs(P[0]*P[3]-P[2]*P[1]),q=Math.hypot(P[0],P[2]),X=Math.hypot(P[1],P[3]);this._cachedGetSinglePixelWidth=Math.max(q,X)/Z}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){let{lineWidth:P}=this.current,{a:Z,b:q,c:X,d:z}=this.ctx.getTransform(),R,f;if(q===0&&X===0){let G=Math.abs(Z),Q=Math.abs(z);if(G===Q)if(P===0)R=f=1/G;else{let Y=G*P;R=f=Y<1?1/Y:1}else if(P===0)R=1/G,f=1/Q;else{let Y=G*P,W=Q*P;R=Y<1?1/Y:1,f=W<1?1/W:1}}else{let G=Math.abs(Z*z-q*X),Q=Math.hypot(Z,q),Y=Math.hypot(X,z);if(P===0)R=Y/G,f=Q/G;else{let W=P*G;R=Y>W?Y/W:1,f=Q>W?Q/W:1}}this._cachedScaleForStroking[0]=R,this._cachedScaleForStroking[1]=f}return this._cachedScaleForStroking}rescaleAndStroke(P,Z){let{ctx:q,current:{lineWidth:X}}=this,[z,R]=this.getScaleForStroking();if(z===R)return q.lineWidth=(X||1)*z,void q.stroke(P);let f=q.getLineDash();Z&&q.save(),q.scale(z,R),L9.a=1/z,L9.d=1/R;let G=new Path2D;if(G.addPath(P,L9),f.length>0){let Q=Math.max(z,R);q.setLineDash(f.map((Y)=>Y/Q)),q.lineDashOffset/=Q}q.lineWidth=X||1,q.stroke(G),Z&&q.restore()}isContentVisible(){for(let P=this.markedContentStack.length-1;P>=0;P--)if(!this.markedContentStack[P].visible)return!1;return!0}}class F5{static#P=null;static#Z="";static get workerPort(){return this.#P}static set workerPort(P){if(!(typeof Worker<"u"&&P instanceof Worker)&&P!==null)throw Error("Invalid `workerPort` type.");this.#P=P}static get workerSrc(){return this.#Z}static set workerSrc(P){if(typeof P!="string")throw Error("Invalid `workerSrc` type.");this.#Z=P}}class nU{#P=!1;#Z=!1;#X=!1;#q=!0;constructor(P,{name:Z,intent:q,usage:X,rbGroups:z}){this.#P=!!(P&zX),this.#Z=!!(P&l3),this.name=Z,this.intent=q,this.usage=X,this.rbGroups=z}get visible(){if(this.#X)return this.#q;if(!this.#q)return!1;let{print:P,view:Z}=this.usage;return this.#P?Z?.viewState!=="OFF":!this.#Z||P?.printState!=="OFF"}_setVisible(P,Z,q=!1){P!==t5&&X8("Internal method `_setVisible` called."),this.#X=q,this.#q=Z}}class tU{constructor(P,{disableRange:Z=!1,disableStream:q=!1}){o1(P,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');let{length:X,initialData:z,progressiveDone:R,contentDispositionFilename:f}=P;if(this._queuedChunks=[],this._progressiveDone=R,this._contentDispositionFilename=f,z?.length>0){let G=z instanceof Uint8Array&&z.byteLength===z.buffer.byteLength?z.buffer:new Uint8Array(z).buffer;this._queuedChunks.push(G)}this._pdfDataRangeTransport=P,this._isStreamingSupported=!q,this._isRangeSupported=!Z,this._contentLength=X,this._fullRequestReader=null,this._rangeReaders=[],P.addRangeListener((G,Q)=>{this._onReceiveData({begin:G,chunk:Q})}),P.addProgressListener((G,Q)=>{this._onProgress({loaded:G,total:Q})}),P.addProgressiveReadListener((G)=>{this._onReceiveData({chunk:G})}),P.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),P.transportReady()}_onReceiveData({begin:P,chunk:Z}){let q=Z instanceof Uint8Array&&Z.byteLength===Z.buffer.byteLength?Z.buffer:new Uint8Array(Z).buffer;if(P===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(q):this._queuedChunks.push(q);else o1(this._rangeReaders.some(function(X){return X._begin===P&&(X._enqueue(q),!0)}),"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(P){P.total===void 0?this._rangeReaders[0]?.onProgress?.({loaded:P.loaded}):this._fullRequestReader?.onProgress?.({loaded:P.loaded,total:P.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(P){let Z=this._rangeReaders.indexOf(P);Z>=0&&this._rangeReaders.splice(Z,1)}getFullReader(){o1(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");let P=this._queuedChunks;return this._queuedChunks=null,new eU(this,P,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(P,Z){if(Z<=this._progressiveDataLength)return null;let q=new PK(this,P,Z);return this._pdfDataRangeTransport.requestDataRange(P,Z),this._rangeReaders.push(q),q}cancelAllRequests(P){this._fullRequestReader?.cancel(P);for(let Z of this._rangeReaders.slice(0))Z.cancel(P);this._pdfDataRangeTransport.abort()}}class eU{constructor(P,Z,q=!1,X=null){this._stream=P,this._done=q||!1,this._filename=FP(X)?X:null,this._queuedChunks=Z||[],this._loaded=0;for(let z of this._queuedChunks)this._loaded+=z.byteLength;this._requests=[],this._headersReady=Promise.resolve(),P._fullRequestReader=this,this.onProgress=null}_enqueue(P){if(!this._done){if(this._requests.length>0)this._requests.shift().resolve({value:P,done:!1});else this._queuedChunks.push(P);this._loaded+=P.byteLength}}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};let P=Promise.withResolvers();return this._requests.push(P),P.promise}cancel(P){this._done=!0;for(let Z of this._requests)Z.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class PK{constructor(P,Z,q){this._stream=P,this._begin=Z,this._end=q,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(P){if(!this._done){if(this._requests.length===0)this._queuedChunk=P;else{this._requests.shift().resolve({value:P,done:!1});for(let Z of this._requests)Z.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){let Z=this._queuedChunk;return this._queuedChunk=null,{value:Z,done:!1}}if(this._done)return{value:void 0,done:!0};let P=Promise.withResolvers();return this._requests.push(P),P.promise}cancel(P){this._done=!0;for(let Z of this._requests)Z.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function ZK(P,Z){let q=new Headers;if(!P||!Z||typeof Z!="object")return q;for(let X in Z){let z=Z[X];z!==void 0&&q.append(X,z)}return q}function pP(P){return URL.parse(P)?.origin??null}function qK({responseHeaders:P,isHttp:Z,rangeChunkSize:q,disableRange:X}){let z={allowRangeRequests:!1,suggestedLength:void 0},R=parseInt(P.get("Content-Length"),10);if(!Number.isInteger(R))return z;if(z.suggestedLength=R,R<=2*q)return z;if(X||!Z)return z;if(P.get("Accept-Ranges")!=="bytes")return z;return(P.get("Content-Encoding")||"identity")!=="identity"||(z.allowRangeRequests=!0),z}function XK(P){let Z=P.get("Content-Disposition");if(Z){let q=function(X){let z=!0,R=f("filename\\*","i").exec(X);if(R){R=R[1];let _=Y(R);return _=unescape(_),_=W(_),_=$(_),Q(_)}if(R=function(_){let J=[],U,K=f("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(U=K.exec(_))!==null;){let[,B,j,V]=U;if(B=parseInt(B,10),B in J){if(B===0)break}else J[B]=[j,V]}let I=[];for(let B=0;B<J.length&&B in J;++B){let[j,V]=J[B];V=Y(V),j&&(V=unescape(V),B===0&&(V=W(V))),I.push(V)}return I.join("")}(X),R)return Q($(R));if(R=f("filename","i").exec(X),R){R=R[1];let _=Y(R);return _=$(_),Q(_)}function f(_,J){return new RegExp("(?:^|;)\\s*"+_+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',J)}function G(_,J){if(_){if(!/^[\x00-\xFF]+$/.test(J))return J;try{let U=new TextDecoder(_,{fatal:!0}),K=f2(J);J=U.decode(K),z=!1}catch{}}return J}function Q(_){return z&&/[\x80-\xff]/.test(_)&&(_=G("utf-8",_),z&&(_=G("iso-8859-1",_))),_}function Y(_){if(_.startsWith('"')){let J=_.slice(1).split("\\\"");for(let U=0;U<J.length;++U){let K=J[U].indexOf('"');K!==-1&&(J[U]=J[U].slice(0,K),J.length=U+1),J[U]=J[U].replaceAll(/\\(.)/g,"$1")}_=J.join('"')}return _}function W(_){let J=_.indexOf("'");return J===-1?_:G(_.slice(0,J),_.slice(J+1).replace(/^[^']*'/,""))}function $(_){return!_.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(_)?_:_.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(J,U,K,I){if(K==="q"||K==="Q")return G(U,I=(I=I.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,function(B,j){return String.fromCharCode(parseInt(j,16))}));try{I=atob(I)}catch{}return G(U,I)})}return""}(Z);if(q.includes("%"))try{q=decodeURIComponent(q)}catch{}if(FP(q))return q}return null}function $2(P,Z){return new C6(`Unexpected server response (${P}) while retrieving PDF "${Z}".`,P,P===404||P===0&&Z.startsWith("file:"))}function zK(P){return P===200||P===206}function RK(P,Z,q){return{method:"GET",headers:P,signal:q.signal,mode:"cors",credentials:Z?"include":"same-origin",redirect:"follow"}}function fK(P){return P instanceof Uint8Array?P.buffer:P instanceof ArrayBuffer?P:(y1(`getArrayBuffer - unexpected data format: ${P}`),new Uint8Array(P).buffer)}class GK{_responseOrigin=null;constructor(P){this.source=P,this.isHttp=/^https?:/i.test(P.url),this.headers=ZK(this.isHttp,P.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return o1(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new QK(this),this._fullRequestReader}getRangeReader(P,Z){if(Z<=this._progressiveDataLength)return null;let q=new YK(this,P,Z);return this._rangeRequestReaders.push(q),q}cancelAllRequests(P){this._fullRequestReader?.cancel(P);for(let Z of this._rangeRequestReaders.slice(0))Z.cancel(P)}}class QK{constructor(P){this._stream=P,this._reader=null,this._loaded=0,this._filename=null;let Z=P.source;this._withCredentials=Z.withCredentials||!1,this._contentLength=Z.length,this._headersCapability=Promise.withResolvers(),this._disableRange=Z.disableRange||!1,this._rangeChunkSize=Z.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!Z.disableStream,this._isRangeSupported=!Z.disableRange;let q=new Headers(P.headers),X=Z.url;fetch(X,RK(q,this._withCredentials,this._abortController)).then((z)=>{if(P._responseOrigin=pP(z.url),!zK(z.status))throw $2(z.status,X);this._reader=z.body.getReader(),this._headersCapability.resolve();let R=z.headers,{allowRangeRequests:f,suggestedLength:G}=qK({responseHeaders:R,isHttp:P.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=f,this._contentLength=G||this._contentLength,this._filename=XK(R),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new f4("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;let{value:P,done:Z}=await this._reader.read();return Z?{value:P,done:Z}:(this._loaded+=P.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:fK(P),done:!1})}cancel(P){this._reader?.cancel(P),this._abortController.abort()}}class YK{constructor(P,Z,q){this._stream=P,this._reader=null,this._loaded=0;let X=P.source;this._withCredentials=X.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!X.disableStream,this._abortController=new AbortController;let z=new Headers(P.headers);z.append("Range",`bytes=${Z}-${q-1}`);let R=X.url;fetch(R,RK(z,this._withCredentials,this._abortController)).then((f)=>{let G=pP(f.url);if(G!==P._responseOrigin)throw Error(`Expected range response-origin "${G}" to match "${P._responseOrigin}".`);if(!zK(f.status))throw $2(f.status,R);this._readCapability.resolve(),this._reader=f.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;let{value:P,done:Z}=await this._reader.read();return Z?{value:P,done:Z}:(this._loaded+=P.byteLength,this.onProgress?.({loaded:this._loaded}),{value:fK(P),done:!1})}cancel(P){this._reader?.cancel(P),this._abortController.abort()}}class WK{_responseOrigin=null;constructor({url:P,httpHeaders:Z,withCredentials:q}){this.url=P,this.isHttp=/^https?:/i.test(P),this.headers=ZK(this.isHttp,Z),this.withCredentials=q||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}request(P){let Z=new XMLHttpRequest,q=this.currXhrId++,X=this.pendingRequests[q]={xhr:Z};Z.open("GET",this.url),Z.withCredentials=this.withCredentials;for(let[z,R]of this.headers)Z.setRequestHeader(z,R);return this.isHttp&&"begin"in P&&"end"in P?(Z.setRequestHeader("Range",`bytes=${P.begin}-${P.end-1}`),X.expectedStatus=206):X.expectedStatus=200,Z.responseType="arraybuffer",o1(P.onError,"Expected `onError` callback to be provided."),Z.onerror=()=>{P.onError(Z.status)},Z.onreadystatechange=this.onStateChange.bind(this,q),Z.onprogress=this.onProgress.bind(this,q),X.onHeadersReceived=P.onHeadersReceived,X.onDone=P.onDone,X.onError=P.onError,X.onProgress=P.onProgress,Z.send(null),q}onProgress(P,Z){let q=this.pendingRequests[P];q&&q.onProgress?.(Z)}onStateChange(P,Z){let q=this.pendingRequests[P];if(!q)return;let X=q.xhr;if(X.readyState>=2&&q.onHeadersReceived&&(q.onHeadersReceived(),delete q.onHeadersReceived),X.readyState!==4)return;if(!(P in this.pendingRequests))return;if(delete this.pendingRequests[P],X.status===0&&this.isHttp)return void q.onError(X.status);let z=X.status||200;if(!(z===200&&q.expectedStatus===206)&&z!==q.expectedStatus)return void q.onError(X.status);let R=function(f){let G=f.response;return typeof G!="string"?G:f2(G).buffer}(X);if(z===206){let f=X.getResponseHeader("Content-Range"),G=/bytes (\d+)-(\d+)\/(\d+)/.exec(f);G?q.onDone({begin:parseInt(G[1],10),chunk:R}):(y1('Missing or invalid "Content-Range" header.'),q.onError(0))}else R?q.onDone({begin:0,chunk:R}):q.onError(X.status)}getRequestXhr(P){return this.pendingRequests[P].xhr}isPendingRequest(P){return P in this.pendingRequests}abortRequest(P){let Z=this.pendingRequests[P].xhr;delete this.pendingRequests[P],Z.abort()}}class $K{constructor(P){this._source=P,this._manager=new WK(P),this._rangeChunkSize=P.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(P){let Z=this._rangeRequestReaders.indexOf(P);Z>=0&&this._rangeRequestReaders.splice(Z,1)}getFullReader(){return o1(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new _K(this._manager,this._source),this._fullRequestReader}getRangeReader(P,Z){let q=new JK(this._manager,P,Z);return q.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(q),q}cancelAllRequests(P){this._fullRequestReader?.cancel(P);for(let Z of this._rangeRequestReaders.slice(0))Z.cancel(P)}}class _K{constructor(P,Z){this._manager=P,this._url=Z.url,this._fullRequestId=P.request({onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._headersCapability=Promise.withResolvers(),this._disableRange=Z.disableRange||!1,this._contentLength=Z.length,this._rangeChunkSize=Z.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){let P=this._fullRequestId,Z=this._manager.getRequestXhr(P);this._manager._responseOrigin=pP(Z.responseURL);let q=Z.getAllResponseHeaders(),X=new Headers(q?q.trimStart().replace(/[^\S ]+$/,"").split(/[\r\n]+/).map((f)=>{let[G,...Q]=f.split(": ");return[G,Q.join(": ")]}):[]),{allowRangeRequests:z,suggestedLength:R}=qK({responseHeaders:X,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});z&&(this._isRangeSupported=!0),this._contentLength=R||this._contentLength,this._filename=XK(X),this._isRangeSupported&&this._manager.abortRequest(P),this._headersCapability.resolve()}_onDone(P){if(P)if(this._requests.length>0)this._requests.shift().resolve({value:P.chunk,done:!1});else this._cachedChunks.push(P.chunk);if(this._done=!0,!(this._cachedChunks.length>0)){for(let Z of this._requests)Z.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(P){this._storedError=$2(P,this._url),this._headersCapability.reject(this._storedError);for(let Z of this._requests)Z.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(P){this.onProgress?.({loaded:P.loaded,total:P.lengthComputable?P.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}async read(){if(await this._headersCapability.promise,this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};let P=Promise.withResolvers();return this._requests.push(P),P.promise}cancel(P){this._done=!0,this._headersCapability.reject(P);for(let Z of this._requests)Z.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class JK{constructor(P,Z,q){this._manager=P,this._url=P.url,this._requestId=P.request({begin:Z,end:q,onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_onHeadersReceived(){let P=pP(this._manager.getRequestXhr(this._requestId)?.responseURL);P!==this._manager._responseOrigin&&(this._storedError=Error(`Expected range response-origin "${P}" to match "${this._manager._responseOrigin}".`),this._onError(0))}_close(){this.onClosed?.(this)}_onDone(P){let Z=P.chunk;if(this._requests.length>0)this._requests.shift().resolve({value:Z,done:!1});else this._queuedChunk=Z;this._done=!0;for(let q of this._requests)q.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(P){this._storedError??=$2(P,this._url);for(let Z of this._requests)Z.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(P){this.isStreamingSupported||this.onProgress?.({loaded:P.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){let Z=this._queuedChunk;return this._queuedChunk=null,{value:Z,done:!1}}if(this._done)return{value:void 0,done:!0};let P=Promise.withResolvers();return this._requests.push(P),P.promise}cancel(P){this._done=!0;for(let Z of this._requests)Z.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}class UK{constructor(P){this.source=P,this.url=function(Z){if(Sx.test(Z))return new URL(Z);let q=process.getBuiltinModule("url");return new URL(q.pathToFileURL(Z))}(P.url),o1(this.url.protocol==="file:","PDFNodeStream only supports file:// URLs."),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return o1(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=new KK(this),this._fullRequestReader}getRangeReader(P,Z){if(Z<=this._progressiveDataLength)return null;let q=new BK(this,P,Z);return this._rangeRequestReaders.push(q),q}cancelAllRequests(P){this._fullRequestReader?.cancel(P);for(let Z of this._rangeRequestReaders.slice(0))Z.cancel(P)}}class KK{constructor(P){this._url=P.url,this._done=!1,this._storedError=null,this.onProgress=null;let Z=P.source;this._contentLength=Z.length,this._loaded=0,this._filename=null,this._disableRange=Z.disableRange||!1,this._rangeChunkSize=Z.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!Z.disableStream,this._isRangeSupported=!Z.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers();let q=process.getBuiltinModule("fs");q.promises.lstat(this._url).then((X)=>{this._contentLength=X.size,this._setReadableStream(q.createReadStream(this._url)),this._headersCapability.resolve()},(X)=>{X.code==="ENOENT"&&(X=$2(0,this._url.href)),this._storedError=X,this._headersCapability.reject(X)})}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;let P=this._readableStream.read();if(P===null)return this._readCapability=Promise.withResolvers(),this.read();return this._loaded+=P.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(P).buffer,done:!1}}cancel(P){this._readableStream?this._readableStream.destroy(P):this._error(P)}_error(P){this._storedError=P,this._readCapability.resolve()}_setReadableStream(P){this._readableStream=P,P.on("readable",()=>{this._readCapability.resolve()}),P.on("end",()=>{P.destroy(),this._done=!0,this._readCapability.resolve()}),P.on("error",(Z)=>{this._error(Z)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new f4("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class BK{constructor(P,Z,q){this._url=P.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();let X=P.source;this._isStreamingSupported=!X.disableStream;let z=process.getBuiltinModule("fs");this._setReadableStream(z.createReadStream(this._url,{start:Z,end:q-1}))}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;let P=this._readableStream.read();if(P===null)return this._readCapability=Promise.withResolvers(),this.read();return this._loaded+=P.length,this.onProgress?.({loaded:this._loaded}),{value:new Uint8Array(P).buffer,done:!1}}cancel(P){this._readableStream?this._readableStream.destroy(P):this._error(P)}_error(P){this._storedError=P,this._readCapability.resolve()}_setReadableStream(P){this._readableStream=P,P.on("readable",()=>{this._readCapability.resolve()}),P.on("end",()=>{P.destroy(),this._done=!0,this._readCapability.resolve()}),P.on("error",(Z)=>{this._error(Z)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function IK(P={}){typeof P=="string"||P instanceof URL?P={url:P}:(P instanceof ArrayBuffer||ArrayBuffer.isView(P))&&(P={data:P});let Z=new AX,{docId:q}=Z,X=P.url?function(r){if(r instanceof URL)return r.href;if(typeof r=="string"){if(z0)return r;let Z1=URL.parse(r,window.location);if(Z1)return Z1.href}throw Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}(P.url):null,z=P.data?function(r){if(z0&&typeof Buffer<"u"&&r instanceof Buffer)throw Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(r instanceof Uint8Array&&r.byteLength===r.buffer.byteLength)return r;if(typeof r=="string")return f2(r);if(r instanceof ArrayBuffer||ArrayBuffer.isView(r)||typeof r=="object"&&!isNaN(r?.length))return new Uint8Array(r);throw Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}(P.data):null,R=P.httpHeaders||null,f=P.withCredentials===!0,G=P.password??null,Q=P.range instanceof OP?P.range:null,Y=Number.isInteger(P.rangeChunkSize)&&P.rangeChunkSize>0?P.rangeChunkSize:65536,W=P.worker instanceof v8?P.worker:null,$=P.verbosity,_=typeof P.docBaseUrl!="string"||Y2(P.docBaseUrl)?null:P.docBaseUrl,J=m2(P.cMapUrl),U=P.cMapPacked!==!1,K=P.CMapReaderFactory||(z0?uU:uZ),I=m2(P.iccUrl),B=m2(P.standardFontDataUrl),j=P.StandardFontDataFactory||(z0?gU:gZ),V=m2(P.wasmUrl),H=P.WasmFactory||(z0?dU:dZ),M=P.stopAtErrors!==!0,x=Number.isInteger(P.maxImageSize)&&P.maxImageSize>-1?P.maxImageSize:-1,A=P.isEvalSupported!==!1,k=typeof P.isOffscreenCanvasSupported=="boolean"?P.isOffscreenCanvasSupported:!z0,b=typeof P.isImageDecoderSupported=="boolean"?P.isImageDecoderSupported:!z0&&(k8.platform.isFirefox||!globalThis.chrome),O=Number.isInteger(P.canvasMaxAreaInBytes)?P.canvasMaxAreaInBytes:-1,p=typeof P.disableFontFace=="boolean"?P.disableFontFace:z0,D=P.fontExtraProperties===!0,n=P.enableXfa===!0,F=P.ownerDocument||globalThis.document,l=P.disableRange===!0,C=P.disableStream===!0,L=P.disableAutoFetch===!0,m=P.pdfBug===!0,d=P.CanvasFactory||(z0?EU:yU),e=P.FilterFactory||(z0?wU:DU),E=P.enableHWA===!0,y=P.useWasm!==!1,N=Q?Q.length:P.length??NaN,h=typeof P.useSystemFonts=="boolean"?P.useSystemFonts:!z0&&!p,w=typeof P.useWorkerFetch=="boolean"?P.useWorkerFetch:!!(K===uZ&&j===gZ&&H===dZ&&J&&B&&V&&G7(J,document.baseURI)&&G7(B,document.baseURI)&&G7(V,document.baseURI));Vx($);let c={canvasFactory:new d({ownerDocument:F,enableHWA:E}),filterFactory:new e({docId:q,ownerDocument:F}),cMapReaderFactory:w?null:new K({baseUrl:J,isCompressed:U}),standardFontDataFactory:w?null:new j({baseUrl:B}),wasmFactory:w?null:new H({baseUrl:V})};W||(W=v8.create({verbosity:$,port:F5.workerPort}),Z._worker=W);let o={docId:q,apiVersion:"5.4.296",data:z,password:G,disableAutoFetch:L,rangeChunkSize:Y,length:N,docBaseUrl:_,enableXfa:n,evaluatorOptions:{maxImageSize:x,disableFontFace:p,ignoreErrors:M,isEvalSupported:A,isOffscreenCanvasSupported:k,isImageDecoderSupported:b,canvasMaxAreaInBytes:O,fontExtraProperties:D,useSystemFonts:h,useWasm:y,useWorkerFetch:w,cMapUrl:J,iccUrl:I,standardFontDataUrl:B,wasmUrl:V}},G1={ownerDocument:F,pdfBug:m,styleElement:null,loadingParams:{disableAutoFetch:L,enableXfa:n}};return W.promise.then(function(){if(Z.destroyed)throw Error("Loading aborted");if(W.destroyed)throw Error("Worker was destroyed");let r=W.messageHandler.sendWithPromise("GetDocRequest",o,z?[z.buffer]:null),Z1;if(Q)Z1=new tU(Q,{disableRange:l,disableStream:C});else if(!z){if(!X)throw Error("getDocument - no `url` parameter provided.");Z1=new((G7(X))?GK:z0?UK:$K)({url:X,length:N,httpHeaders:R,withCredentials:f,rangeChunkSize:Y,disableRange:l,disableStream:C})}return r.then((z1)=>{if(Z.destroyed)throw Error("Loading aborted");if(W.destroyed)throw Error("Worker was destroyed");let V1=new f6(q,z1,W.port),U1=new xK(V1,Z,Z1,G1,c,E);Z._transport=U1,V1.send("Ready",null)})}).catch(Z._capability.reject),Z}class AX{static#P=0;_capability=Promise.withResolvers();_transport=null;_worker=null;docId="d"+AX.#P++;destroyed=!1;onPassword=null;onProgress=null;get promise(){return this._capability.promise}async destroy(){this.destroyed=!0;try{this._worker?.port&&(this._worker._pendingDestroy=!0),await this._transport?.destroy()}catch(P){throw this._worker?.port&&delete this._worker._pendingDestroy,P}this._transport=null,this._worker?.destroy(),this._worker=null}async getData(){return this._transport.getData()}}class OP{#P=Promise.withResolvers();#Z=[];#X=[];#q=[];#z=[];constructor(P,Z,q=!1,X=null){this.length=P,this.initialData=Z,this.progressiveDone=q,this.contentDispositionFilename=X}addRangeListener(P){this.#z.push(P)}addProgressListener(P){this.#q.push(P)}addProgressiveReadListener(P){this.#X.push(P)}addProgressiveDoneListener(P){this.#Z.push(P)}onDataRange(P,Z){for(let q of this.#z)q(P,Z)}onDataProgress(P,Z){this.#P.promise.then(()=>{for(let q of this.#q)q(P,Z)})}onDataProgressiveRead(P){this.#P.promise.then(()=>{for(let Z of this.#X)Z(P)})}onDataProgressiveDone(){this.#P.promise.then(()=>{for(let P of this.#Z)P()})}transportReady(){this.#P.resolve()}requestDataRange(P,Z){X8("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}class jK{constructor(P,Z){this._pdfInfo=P,this._transport=Z}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return D1(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(P){return this._transport.getPage(P)}getPageIndex(P){return this._transport.getPageIndex(P)}getDestinations(){return this._transport.getDestinations()}getDestination(P){return this._transport.getDestination(P)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getAnnotationsByType(P,Z){return this._transport.getAnnotationsByType(P,Z)}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:P="display"}={}){let{renderingIntent:Z}=this._transport.getRenderingIntent(P);return this._transport.getOptionalContentConfig(Z)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(P=!1){return this._transport.startCleanup(P||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(P){return this._transport.cachedPageNumber(P)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}class VK{#P=!1;constructor(P,Z,q,X=!1){this._pageIndex=P,this._pageInfo=Z,this._transport=q,this._stats=X?new yZ:null,this._pdfBug=X,this.commonObjs=q.commonObjs,this.objs=new MX,this._intentStates=new Map,this.destroyed=!1,this.recordedBBoxes=null}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:P,rotation:Z=this.rotate,offsetX:q=0,offsetY:X=0,dontFlip:z=!1}={}){return new G2({viewBox:this.view,userUnit:this.userUnit,scale:P,rotation:Z,offsetX:q,offsetY:X,dontFlip:z})}getAnnotations({intent:P="display"}={}){let{renderingIntent:Z}=this._transport.getRenderingIntent(P);return this._transport.getAnnotations(this._pageIndex,Z)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return D1(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render({canvasContext:P,canvas:Z=P.canvas,viewport:q,intent:X="display",annotationMode:z=j4.ENABLE,transform:R=null,background:f=null,optionalContentConfigPromise:G=null,annotationCanvasMap:Q=null,pageColors:Y=null,printAnnotationStorage:W=null,isEditing:$=!1,recordOperations:_=!1,operationsFilter:J=null}){this._stats?.time("Overall");let U=this._transport.getRenderingIntent(X,z,W,$),{renderingIntent:K,cacheKey:I}=U;this.#P=!1,G||=this._transport.getOptionalContentConfig(K);let B=this._intentStates.get(I);B||(B=Object.create(null),this._intentStates.set(I,B)),B.streamReaderCancelTimeout&&(clearTimeout(B.streamReaderCancelTimeout),B.streamReaderCancelTimeout=null);let j=!!(K&l3);B.displayReadyCapability||(B.displayReadyCapability=Promise.withResolvers(),B.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(U));let V=Boolean(this._pdfBug&&globalThis.StepperManager?.enabled),H=!this.recordedBBoxes&&(_||V),M=(k)=>{if(B.renderTasks.delete(x),H){let b=x.gfx?.dependencyTracker.take();b&&(x.stepper&&x.stepper.setOperatorBBoxes(b,x.gfx.dependencyTracker.takeDebugMetadata()),_&&(this.recordedBBoxes=b))}j&&(this.#P=!0),this.#Z(),k?(x.capability.reject(k),this._abortOperatorList({intentState:B,reason:k instanceof Error?k:Error(k)})):x.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),globalThis.Stats?.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},x=new Q6({callback:M,params:{canvas:Z,canvasContext:P,dependencyTracker:H?new sU(Z,B.operatorList.length,V):null,viewport:q,transform:R,background:f},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:Q,operatorList:B.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!j,pdfBug:this._pdfBug,pageColors:Y,enableHWA:this._transport.enableHWA,operationsFilter:J});(B.renderTasks||=new Set).add(x);let A=x.task;return Promise.all([B.displayReadyCapability.promise,G]).then(([k,b])=>{if(this.destroyed)M();else{if(this._stats?.time("Rendering"),!(b.renderingIntent&K))throw Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");x.initializeGraphics({transparency:k,optionalContentConfig:b}),x.operatorListChanged()}}).catch(M),A}getOperatorList({intent:P="display",annotationMode:Z=j4.ENABLE,printAnnotationStorage:q=null,isEditing:X=!1}={}){let z=this._transport.getRenderingIntent(P,Z,q,X,!0),R,f=this._intentStates.get(z.cacheKey);return f||(f=Object.create(null),this._intentStates.set(z.cacheKey,f)),f.opListReadCapability||(R=Object.create(null),R.operatorListChanged=function(){f.operatorList.lastChunk&&(f.opListReadCapability.resolve(f.operatorList),f.renderTasks.delete(R))},f.opListReadCapability=Promise.withResolvers(),(f.renderTasks||=new Set).add(R),f.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(z)),f.opListReadCapability.promise}streamTextContent({includeMarkedContent:P=!1,disableNormalization:Z=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:P===!0,disableNormalization:Z===!0},{highWaterMark:100,size:(q)=>q.items.length})}getTextContent(P={}){if(this._transport._htmlForXfa)return this.getXfa().then((q)=>r7.textContent(q));let Z=this.streamTextContent(P);return new Promise(function(q,X){let z=Z.getReader(),R={items:[],styles:Object.create(null),lang:null};(function f(){z.read().then(function({value:G,done:Q}){Q?q(R):(R.lang??=G.lang,Object.assign(R.styles,G.styles),R.items.push(...G.items),f())},X)})()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;let P=[];for(let Z of this._intentStates.values())if(this._abortOperatorList({intentState:Z,reason:Error("Page was destroyed."),force:!0}),!Z.opListReadCapability)for(let q of Z.renderTasks)P.push(q.completed),q.cancel();return this.objs.clear(),this.#P=!1,Promise.all(P)}cleanup(P=!1){this.#P=!0;let Z=this.#Z();return P&&Z&&(this._stats&&=new yZ),Z}#Z(){if(!this.#P||this.destroyed)return!1;for(let{renderTasks:P,operatorList:Z}of this._intentStates.values())if(P.size>0||!Z.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),this.#P=!1,!0}_startRenderPage(P,Z){let q=this._intentStates.get(Z);q&&(this._stats?.timeEnd("Page Request"),q.displayReadyCapability?.resolve(P))}_renderPageChunk(P,Z){for(let q=0,X=P.length;q<X;q++)Z.operatorList.fnArray.push(P.fnArray[q]),Z.operatorList.argsArray.push(P.argsArray[q]);Z.operatorList.lastChunk=P.lastChunk,Z.operatorList.separateAnnots=P.separateAnnots;for(let q of Z.renderTasks)q.operatorListChanged();P.lastChunk&&this.#Z()}_pumpOperatorList({renderingIntent:P,cacheKey:Z,annotationStorageSerializable:q,modifiedIds:X}){let{map:z,transfer:R}=q,f=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:P,cacheKey:Z,annotationStorage:z,modifiedIds:X},R).getReader(),G=this._intentStates.get(Z);G.streamReader=f;let Q=()=>{f.read().then(({value:Y,done:W})=>{W?G.streamReader=null:this._transport.destroyed||(this._renderPageChunk(Y,G),Q())},(Y)=>{if(G.streamReader=null,!this._transport.destroyed){if(G.operatorList){G.operatorList.lastChunk=!0;for(let W of G.renderTasks)W.operatorListChanged();this.#Z()}if(G.displayReadyCapability)G.displayReadyCapability.reject(Y);else{if(!G.opListReadCapability)throw Y;G.opListReadCapability.reject(Y)}}})};Q()}_abortOperatorList({intentState:P,reason:Z,force:q=!1}){if(P.streamReader){if(P.streamReaderCancelTimeout&&(clearTimeout(P.streamReaderCancelTimeout),P.streamReaderCancelTimeout=null),!q){if(P.renderTasks.size>0)return;if(Z instanceof Q2){let X=100;return Z.extraDelay>0&&Z.extraDelay<1000&&(X+=Z.extraDelay),void(P.streamReaderCancelTimeout=setTimeout(()=>{P.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:P,reason:Z,force:!0})},X))}}if(P.streamReader.cancel(new f4(Z.message)).catch(()=>{}),P.streamReader=null,!this._transport.destroyed){for(let[X,z]of this._intentStates)if(z===P){this._intentStates.delete(X);break}this.cleanup()}}}get stats(){return this._stats}}class xK{#P=new Map;#Z=new Map;#X=new Map;#q=new Map;#z=null;constructor(P,Z,q,X,z,R){this.messageHandler=P,this.loadingTask=Z,this.commonObjs=new MX,this.fontLoader=new SU({ownerDocument:X.ownerDocument,styleElement:X.styleElement}),this.loadingParams=X.loadingParams,this._params=X,this.canvasFactory=z.canvasFactory,this.filterFactory=z.filterFactory,this.cMapReaderFactory=z.cMapReaderFactory,this.standardFontDataFactory=z.standardFontDataFactory,this.wasmFactory=z.wasmFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=q,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.enableHWA=R,this.setupMessageHandler()}#R(P,Z=null){let q=this.#P.get(P);if(q)return q;let X=this.messageHandler.sendWithPromise(P,Z);return this.#P.set(P,X),X}get annotationStorage(){return D1(this,"annotationStorage",new SP)}getRenderingIntent(P,Z=j4.ENABLE,q=null,X=!1,z=!1){let R=zX,f=wZ;switch(P){case"any":R=zx;break;case"display":break;case"print":R=l3;break;default:y1(`getRenderingIntent - invalid intent: ${P}`)}let G=R&l3&&q instanceof UX?q:this.annotationStorage;switch(Z){case j4.DISABLE:R+=Gx;break;case j4.ENABLE:break;case j4.ENABLE_FORMS:R+=Rx;break;case j4.ENABLE_STORAGE:R+=fx,f=G.serializable;break;default:y1(`getRenderingIntent - invalid annotationMode: ${Z}`)}X&&(R+=Qx),z&&(R+=Yx);let{ids:Q,hash:Y}=G.modifiedIds;return{renderingIntent:R,cacheKey:[R,f.hash,Y].join("_"),annotationStorageSerializable:f,modifiedIds:Q}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),this.#z?.reject(Error("Worker was destroyed during onPassword callback"));let P=[];for(let q of this.#Z.values())P.push(q._destroy());this.#Z.clear(),this.#X.clear(),this.#q.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();let Z=this.messageHandler.sendWithPromise("Terminate",null);return P.push(Z),Promise.all(P).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),this.#P.clear(),this.filterFactory.destroy(),s8.cleanup(),this._networkStream?.cancelAllRequests(new f4("Worker was terminated.")),this.messageHandler?.destroy(),this.messageHandler=null,this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){let{messageHandler:P,loadingTask:Z}=this;P.on("GetReader",(q,X)=>{o1(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=(z)=>{this._lastProgress={loaded:z.loaded,total:z.total}},X.onPull=()=>{this._fullReader.read().then(function({value:z,done:R}){R?X.close():(o1(z instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),X.enqueue(new Uint8Array(z),1,[z]))}).catch((z)=>{X.error(z)})},X.onCancel=(z)=>{this._fullReader.cancel(z),X.ready.catch((R)=>{if(!this.destroyed)throw R})}}),P.on("ReaderHeadersReady",async(q)=>{await this._fullReader.headersReady;let{isStreamingSupported:X,isRangeSupported:z,contentLength:R}=this._fullReader;return X&&z||(this._lastProgress&&Z.onProgress?.(this._lastProgress),this._fullReader.onProgress=(f)=>{Z.onProgress?.({loaded:f.loaded,total:f.total})}),{isStreamingSupported:X,isRangeSupported:z,contentLength:R}}),P.on("GetRangeReader",(q,X)=>{o1(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");let z=this._networkStream.getRangeReader(q.begin,q.end);z?(X.onPull=()=>{z.read().then(function({value:R,done:f}){f?X.close():(o1(R instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),X.enqueue(new Uint8Array(R),1,[R]))}).catch((R)=>{X.error(R)})},X.onCancel=(R)=>{z.cancel(R),X.ready.catch((f)=>{if(!this.destroyed)throw f})}):X.close()}),P.on("GetDoc",({pdfInfo:q})=>{this._numPages=q.numPages,this._htmlForXfa=q.htmlForXfa,delete q.htmlForXfa,Z._capability.resolve(new jK(q,this))}),P.on("DocException",(q)=>{Z._capability.reject(R0(q))}),P.on("PasswordRequest",(q)=>{this.#z=Promise.withResolvers();try{if(!Z.onPassword)throw R0(q);let X=(z)=>{z instanceof Error?this.#z.reject(z):this.#z.resolve({password:z})};Z.onPassword(X,q.code)}catch(X){this.#z.reject(X)}return this.#z.promise}),P.on("DataLoaded",(q)=>{Z.onProgress?.({loaded:q.length,total:q.length}),this.downloadInfoCapability.resolve(q)}),P.on("StartRenderPage",(q)=>{if(this.destroyed)return;this.#Z.get(q.pageIndex)._startRenderPage(q.transparency,q.cacheKey)}),P.on("commonobj",([q,X,z])=>{if(this.destroyed)return null;if(this.commonObjs.has(q))return null;switch(X){case"Font":if("error"in z){let Y=z.error;y1(`Error during font loading: ${Y}`),this.commonObjs.resolve(q,Y);break}let R=new Z8(z),f=this._params.pdfBug&&globalThis.FontInspector?.enabled?(Y,W)=>globalThis.FontInspector.fontAdded(Y,W):null,G=new mU(R,f,z.extra,z.charProcOperatorList);this.fontLoader.bind(G).catch(()=>P.sendWithPromise("FontFallback",{id:q})).finally(()=>{!G.fontExtraProperties&&G.data&&G.clearData(),this.commonObjs.resolve(q,G)});break;case"CopyLocalImage":let{imageRef:Q}=z;o1(Q,"The imageRef must be defined.");for(let Y of this.#Z.values())for(let[,W]of Y.objs)if(W?.ref===Q)return W.dataLen?(this.commonObjs.resolve(q,structuredClone(W)),W.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(q,z);break;default:throw Error(`Got unknown common object type ${X}`)}return null}),P.on("obj",([q,X,z,R])=>{if(this.destroyed)return;let f=this.#Z.get(X);if(!f.objs.has(q))if(f._intentStates.size!==0)switch(z){case"Image":case"Pattern":f.objs.resolve(q,R);break;default:throw Error(`Got unknown object type ${z}`)}else R?.bitmap?.close()}),P.on("DocProgress",(q)=>{this.destroyed||Z.onProgress?.({loaded:q.loaded,total:q.total})}),P.on("FetchBinaryData",async(q)=>{if(this.destroyed)throw Error("Worker was destroyed.");let X=this[q.type];if(!X)throw Error(`${q.type} not initialized, see the \`useWorkerFetch\` parameter.`);return X.fetch(q)})}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&y1("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");let{map:P,transfer:Z}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:P,filename:this._fullReader?.filename??null},Z).finally(()=>{this.annotationStorage.resetModified()})}getPage(P){if(!Number.isInteger(P)||P<=0||P>this._numPages)return Promise.reject(Error("Invalid page request."));let Z=P-1,q=this.#X.get(Z);if(q)return q;let X=this.messageHandler.sendWithPromise("GetPage",{pageIndex:Z}).then((z)=>{if(this.destroyed)throw Error("Transport destroyed");z.refStr&&this.#q.set(z.refStr,P);let R=new VK(Z,z,this,this._params.pdfBug);return this.#Z.set(Z,R),R});return this.#X.set(Z,X),X}getPageIndex(P){return EZ(P)?this.messageHandler.sendWithPromise("GetPageIndex",{num:P.num,gen:P.gen}):Promise.reject(Error("Invalid pageIndex request."))}getAnnotations(P,Z){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:P,intent:Z})}getFieldObjects(){return this.#R("GetFieldObjects")}hasJSActions(){return this.#R("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(P){return typeof P!="string"?Promise.reject(Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:P})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getAnnotationsByType(P,Z){return this.messageHandler.sendWithPromise("GetAnnotationsByType",{types:P,pageIndexesToSkip:Z})}getDocJSActions(){return this.#R("GetDocJSActions")}getPageJSActions(P){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:P})}getStructTree(P){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:P})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(P){return this.#R("GetOptionalContentConfig").then((Z)=>new iU(Z,P))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){let Z=this.#P.get("GetMetadata");if(Z)return Z;let q=this.messageHandler.sendWithPromise("GetMetadata",null).then((X)=>({info:X[0],metadata:X[1]?new aU(X[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null}));return this.#P.set("GetMetadata",q),q}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(P=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(let Z of this.#Z.values())if(!Z.cleanup())throw Error(`startCleanup: Page ${Z.pageNumber} is currently rendering.`);this.commonObjs.clear(),P||this.fontLoader.clear(),this.#P.clear(),this.filterFactory.destroy(!0),s8.cleanup()}}cachedPageNumber(P){if(!EZ(P))return null;let Z=P.gen===0?`${P.num}R`:`${P.num}R${P.gen}`;return this.#q.get(Z)??null}}class HK{#P=null;onContinue=null;onError=null;constructor(P){this.#P=P}get promise(){return this.#P.capability.promise}cancel(P=0){this.#P.cancel(null,P)}get separateAnnots(){let{separateAnnots:P}=this.#P.operatorList;if(!P)return!1;let{annotationCanvasMap:Z}=this.#P;return P.form||P.canvas&&Z?.size>0}}class B0{#P=null;#Z=null;#X;#q=null;#z=!1;#R=!1;#G=null;#f;#Q=null;#Y=null;static#_=null;static get _keyboardManager(){return D1(this,"_keyboardManager",new y6([[["Escape","mac+Escape"],B0.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],B0.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],B0.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],B0.prototype._moveToPrevious],[["Home","mac+Home"],B0.prototype._moveToBeginning],[["End","mac+End"],B0.prototype._moveToEnd]]))}constructor({editor:P=null,uiManager:Z=null}){P?(this.#R=!1,this.#G=P):this.#R=!0,this.#Y=P?._uiManager||Z,this.#f=this.#Y._eventBus,this.#X=P?.color?.toUpperCase()||this.#Y?.highlightColors.values().next().value||"#FFFF98",B0.#_||=Object.freeze({blue:"pdfjs-editor-colorpicker-blue",green:"pdfjs-editor-colorpicker-green",pink:"pdfjs-editor-colorpicker-pink",red:"pdfjs-editor-colorpicker-red",yellow:"pdfjs-editor-colorpicker-yellow"})}renderButton(){let P=this.#P=document.createElement("button");P.className="colorPicker",P.tabIndex="0",P.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),P.ariaHasPopup="true",this.#G&&(P.ariaControls=`${this.#G.id}_colorpicker_dropdown`);let Z=this.#Y._signal;P.addEventListener("click",this.#K.bind(this),{signal:Z}),P.addEventListener("keydown",this.#B.bind(this),{signal:Z});let q=this.#Z=document.createElement("span");return q.className="swatch",q.ariaHidden="true",q.style.backgroundColor=this.#X,P.append(q),P}renderMainDropdown(){let P=this.#q=this.#$();return P.ariaOrientation="horizontal",P.ariaLabelledBy="highlightColorPickerLabel",P}#$(){let P=document.createElement("div"),Z=this.#Y._signal;P.addEventListener("contextmenu",A0,{signal:Z}),P.className="dropdown",P.role="listbox",P.ariaMultiSelectable="false",P.ariaOrientation="vertical",P.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown"),this.#G&&(P.id=`${this.#G.id}_colorpicker_dropdown`);for(let[q,X]of this.#Y.highlightColors){let z=document.createElement("button");z.tabIndex="0",z.role="option",z.setAttribute("data-color",X),z.title=q,z.setAttribute("data-l10n-id",B0.#_[q]);let R=document.createElement("span");z.append(R),R.className="swatch",R.style.backgroundColor=X,z.ariaSelected=X===this.#X,z.addEventListener("click",this.#J.bind(this,X),{signal:Z}),P.append(z)}return P.addEventListener("keydown",this.#B.bind(this),{signal:Z}),P}#J(P,Z){Z.stopPropagation(),this.#f.dispatch("switchannotationeditorparams",{source:this,type:h1.HIGHLIGHT_COLOR,value:P}),this.updateColor(P)}_colorSelectFromKeyboard(P){if(P.target===this.#P)return void this.#K(P);let Z=P.target.getAttribute("data-color");Z&&this.#J(Z,P)}_moveToNext(P){this.#U?P.target!==this.#P?P.target.nextSibling?.focus():this.#q.firstChild?.focus():this.#K(P)}_moveToPrevious(P){P.target!==this.#q?.firstChild&&P.target!==this.#P?(this.#U||this.#K(P),P.target.previousSibling?.focus()):this.#U&&this._hideDropdownFromKeyboard()}_moveToBeginning(P){this.#U?this.#q.firstChild?.focus():this.#K(P)}_moveToEnd(P){this.#U?this.#q.lastChild?.focus():this.#K(P)}#B(P){B0._keyboardManager.exec(this,P)}#K(P){if(this.#U)return void this.hideDropdown();if(this.#z=P.detail===0,this.#Q||(this.#Q=new AbortController,window.addEventListener("pointerdown",this.#W.bind(this),{signal:this.#Y.combinedSignal(this.#Q)})),this.#P.ariaExpanded="true",this.#q)return void this.#q.classList.remove("hidden");let Z=this.#q=this.#$();this.#P.append(Z)}#W(P){this.#q?.contains(P.target)||this.hideDropdown()}hideDropdown(){this.#q?.classList.add("hidden"),this.#P.ariaExpanded="false",this.#Q?.abort(),this.#Q=null}get#U(){return this.#q&&!this.#q.classList.contains("hidden")}_hideDropdownFromKeyboard(){this.#R||(this.#U?(this.hideDropdown(),this.#P.focus({preventScroll:!0,focusVisible:this.#z})):this.#G?.unselect())}updateColor(P){if(this.#Z&&(this.#Z.style.backgroundColor=P),!this.#q)return;let Z=this.#Y.highlightColors.values();for(let q of this.#q.children)q.ariaSelected=Z.next().value===P.toUpperCase()}destroy(){this.#P?.remove(),this.#P=null,this.#Z=null,this.#q?.remove(),this.#q=null}}class o7{#P=null;#Z=null;#X=null;static#q=null;constructor(P){this.#Z=P,this.#X=P._uiManager,o7.#q||=Object.freeze({freetext:"pdfjs-editor-color-picker-free-text-input",ink:"pdfjs-editor-color-picker-ink-input"})}renderButton(){if(this.#P)return this.#P;let{editorType:P,colorType:Z,colorValue:q}=this.#Z,X=this.#P=document.createElement("input");return X.type="color",X.value=q||"#000000",X.className="basicColorPicker",X.tabIndex=0,X.setAttribute("data-l10n-id",o7.#q[P]),X.addEventListener("input",()=>{this.#X.updateParams(Z,X.value)},{signal:this.#X._signal}),X}update(P){this.#P&&(this.#P.value=P)}destroy(){this.#P?.remove(),this.#P=null}hideDropdown(){}}function sR(P){return Math.floor(255*Math.max(0,Math.min(1,P))).toString(16).padStart(2,"0")}function e6(P){return Math.max(0,Math.min(255,255*P))}class rZ{static CMYK_G([P,Z,q,X]){return["G",1-Math.min(1,0.3*P+0.59*q+0.11*Z+X)]}static G_CMYK([P]){return["CMYK",0,0,0,1-P]}static G_RGB([P]){return["RGB",P,P,P]}static G_rgb([P]){return[P=e6(P),P,P]}static G_HTML([P]){let Z=sR(P);return`#${Z}${Z}${Z}`}static RGB_G([P,Z,q]){return["G",0.3*P+0.59*Z+0.11*q]}static RGB_rgb(P){return P.map(e6)}static RGB_HTML(P){return`#${P.map(sR).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([P,Z,q,X]){return["RGB",1-Math.min(1,P+X),1-Math.min(1,q+X),1-Math.min(1,Z+X)]}static CMYK_rgb([P,Z,q,X]){return[e6(1-Math.min(1,P+X)),e6(1-Math.min(1,q+X)),e6(1-Math.min(1,Z+X))]}static CMYK_HTML(P){let Z=this.CMYK_RGB(P).slice(1);return this.RGB_HTML(Z)}static RGB_CMYK([P,Z,q]){let X=1-P,z=1-Z,R=1-q;return["CMYK",X,z,R,Math.min(X,z,R)]}}class LK{create(P,Z,q=!1){if(P<=0||Z<=0)throw Error("Invalid SVG dimensions");let X=this._createSVG("svg:svg");return X.setAttribute("version","1.1"),q||(X.setAttribute("width",`${P}px`),X.setAttribute("height",`${Z}px`)),X.setAttribute("preserveAspectRatio","none"),X.setAttribute("viewBox",`0 0 ${P} ${Z}`),X}createElement(P){if(typeof P!="string")throw Error("Invalid SVG element type");return this._createSVG(P)}_createSVG(P){X8("Abstract method `_createSVG` called.")}}class lZ{static create(P){switch(P.data.annotationType){case V8.LINK:return new yP(P);case V8.TEXT:return new kK(P);case V8.WIDGET:switch(P.data.fieldType){case"Tx":return new CK(P);case"Btn":return P.data.radioButton?new LX(P):P.data.checkBox?new NK(P):new vK(P);case"Ch":return new FK(P);case"Sig":return new TK(P)}return new P5(P);case V8.POPUP:return new n3(P);case V8.FREETEXT:return new bX(P);case V8.LINE:return new mK(P);case V8.SQUARE:return new pK(P);case V8.CIRCLE:return new OK(P);case V8.POLYLINE:return new kX(P);case V8.CARET:return new DK(P);case V8.INK:return new DP(P);case V8.POLYGON:return new yK(P);case V8.HIGHLIGHT:return new CX(P);case V8.UNDERLINE:return new wK(P);case V8.SQUIGGLY:return new EK(P);case V8.STRIKEOUT:return new uK(P);case V8.STAMP:return new TX(P);case V8.FILEATTACHMENT:return new gK(P);default:return new U8(P)}}}class U8{#P=null;#Z=!1;#X=null;constructor(P,{isRenderable:Z=!1,ignoreBorder:q=!1,createQuadrilaterals:X=!1}={}){this.isRenderable=Z,this.data=P.data,this.layer=P.layer,this.linkService=P.linkService,this.downloadManager=P.downloadManager,this.imageResourcesPath=P.imageResourcesPath,this.renderForms=P.renderForms,this.svgFactory=P.svgFactory,this.annotationStorage=P.annotationStorage,this.enableComment=P.enableComment,this.enableScripting=P.enableScripting,this.hasJSActions=P.hasJSActions,this._fieldObjects=P.fieldObjects,this.parent=P.parent,Z&&(this.container=this._createContainer(q)),X&&this._createQuadrilaterals()}static _hasPopupData({contentsObj:P,richText:Z}){return!(!P?.str&&!Z?.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return U8._hasPopupData(this.data)||this.enableComment&&!!this.commentText}get commentData(){let{data:P}=this,Z=this.annotationStorage?.getEditor(P.id);return Z?Z.getData():P}get hasCommentButton(){return this.enableComment&&this.hasPopupElement}get commentButtonPosition(){let P=this.annotationStorage?.getEditor(this.data.id);if(P)return P.commentButtonPositionInPage;let{quadPoints:Z,inkLists:q,rect:X}=this.data,z=-1/0,R=-1/0;if(Z?.length>=8){for(let f=0;f<Z.length;f+=8)Z[f+1]>R?(R=Z[f+1],z=Z[f+2]):Z[f+1]===R&&(z=Math.max(z,Z[f+2]));return[z,R]}if(q?.length>=1){for(let f of q)for(let G=0,Q=f.length;G<Q;G+=2)f[G+1]>R?(R=f[G+1],z=f[G]):f[G+1]===R&&(z=Math.max(z,f[G]));if(z!==1/0)return[z,R]}return X?[X[2],X[3]]:null}_normalizePoint(P){let{page:{view:Z},viewport:{rawDims:{pageWidth:q,pageHeight:X,pageX:z,pageY:R}}}=this.parent;return P[1]=Z[3]-P[1]+Z[1],P[0]=100*(P[0]-z)/q,P[1]=100*(P[1]-R)/X,P}get commentText(){let{data:P}=this;return this.annotationStorage.getRawValue(`${s7}${P.id}`)?.popup?.contents||P.contentsObj?.str||""}set commentText(P){let{data:Z}=this,q={deleted:!P,contents:P||""};this.annotationStorage.updateEditor(Z.id,{popup:q})||this.annotationStorage.setValue(`${s7}${Z.id}`,{id:Z.id,annotationType:Z.annotationType,pageIndex:this.parent.page._pageIndex,popup:q,popupRef:Z.popupRef,modificationDate:new Date}),P||this.removePopup()}removePopup(){(this.#X?.popup||this.popup)?.remove(),this.#X=this.popup=null}updateEdited(P){if(!this.container)return;P.rect&&(this.#P||={rect:this.data.rect.slice(0)});let{rect:Z,popup:q}=P;Z&&this.#q(Z);let X=this.#X?.popup||this.popup;!X&&q?.text&&(this._createPopup(q),X=this.#X.popup),X&&(X.updateEdited(P),q?.deleted&&(X.remove(),this.#X=null,this.popup=null))}resetEdited(){this.#P&&(this.#q(this.#P.rect),this.#X?.popup.resetEdited(),this.#P=null)}#q(P){let{container:{style:Z},data:{rect:q,rotation:X},parent:{viewport:{rawDims:{pageWidth:z,pageHeight:R,pageX:f,pageY:G}}}}=this;q?.splice(0,4,...P),Z.left=100*(P[0]-f)/z+"%",Z.top=100*(R-P[3]+G)/R+"%",X===0?(Z.width=100*(P[2]-P[0])/z+"%",Z.height=100*(P[3]-P[1])/R+"%"):this.setRotation(X)}_createContainer(P){let{data:Z,parent:{page:q,viewport:X}}=this,z=document.createElement("section");z.setAttribute("data-annotation-id",Z.id),this instanceof P5||this instanceof yP||(z.tabIndex=0);let{style:R}=z;if(R.zIndex=this.parent.zIndex,this.parent.zIndex+=2,Z.alternativeText&&(z.title=Z.alternativeText),Z.noRotate&&z.classList.add("norotate"),!Z.rect||this instanceof n3){let{rotation:U}=Z;return Z.hasOwnCanvas||U===0||this.setRotation(U,z),z}let{width:f,height:G}=this;if(!P&&Z.borderStyle.width>0){R.borderWidth=`${Z.borderStyle.width}px`;let U=Z.borderStyle.horizontalCornerRadius,K=Z.borderStyle.verticalCornerRadius;if(U>0||K>0){let B=`calc(${U}px * var(--total-scale-factor)) / calc(${K}px * var(--total-scale-factor))`;R.borderRadius=B}else if(this instanceof LX){let B=`calc(${f}px * var(--total-scale-factor)) / calc(${G}px * var(--total-scale-factor))`;R.borderRadius=B}switch(Z.borderStyle.style){case KU:R.borderStyle="solid";break;case $x:R.borderStyle="dashed";break;case _x:y1("Unimplemented border style: beveled");break;case Jx:y1("Unimplemented border style: inset");break;case Ux:R.borderBottomStyle="solid"}let I=Z.borderColor||null;I?(this.#Z=!0,R.borderColor=j1.makeHexColor(0|I[0],0|I[1],0|I[2])):R.borderWidth=0}let Q=j1.normalizeRect([Z.rect[0],q.view[3]-Z.rect[1]+q.view[1],Z.rect[2],q.view[3]-Z.rect[3]+q.view[1]]),{pageWidth:Y,pageHeight:W,pageX:$,pageY:_}=X.rawDims;R.left=100*(Q[0]-$)/Y+"%",R.top=100*(Q[1]-_)/W+"%";let{rotation:J}=Z;return Z.hasOwnCanvas||J===0?(R.width=100*f/Y+"%",R.height=100*G/W+"%"):this.setRotation(J,z),z}setRotation(P,Z=this.container){if(!this.data.rect)return;let{pageWidth:q,pageHeight:X}=this.parent.viewport.rawDims,{width:z,height:R}=this;P%180!=0&&([z,R]=[R,z]),Z.style.width=100*z/q+"%",Z.style.height=100*R/X+"%",Z.setAttribute("data-main-rotation",(360-P)%360)}get _commonActions(){let P=(Z,q,X)=>{let z=X.detail[Z],R=z[0],f=z.slice(1);X.target.style[q]=rZ[`${R}_HTML`](f),this.annotationStorage.setValue(this.data.id,{[q]:rZ[`${R}_rgb`](f)})};return D1(this,"_commonActions",{display:(Z)=>{let{display:q}=Z.detail,X=q%2==1;this.container.style.visibility=X?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:X,noPrint:q===1||q===2})},print:(Z)=>{this.annotationStorage.setValue(this.data.id,{noPrint:!Z.detail.print})},hidden:(Z)=>{let{hidden:q}=Z.detail;this.container.style.visibility=q?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:q,noView:q})},focus:(Z)=>{setTimeout(()=>Z.target.focus({preventScroll:!1}),0)},userName:(Z)=>{Z.target.title=Z.detail.userName},readonly:(Z)=>{Z.target.disabled=Z.detail.readonly},required:(Z)=>{this._setRequired(Z.target,Z.detail.required)},bgColor:(Z)=>{P("bgColor","backgroundColor",Z)},fillColor:(Z)=>{P("fillColor","backgroundColor",Z)},fgColor:(Z)=>{P("fgColor","color",Z)},textColor:(Z)=>{P("textColor","color",Z)},borderColor:(Z)=>{P("borderColor","borderColor",Z)},strokeColor:(Z)=>{P("strokeColor","borderColor",Z)},rotation:(Z)=>{let q=Z.detail.rotation;this.setRotation(q),this.annotationStorage.setValue(this.data.id,{rotation:q})}})}_dispatchEventFromSandbox(P,Z){let q=this._commonActions;for(let X of Object.keys(Z.detail))(P[X]||q[X])?.(Z)}_setDefaultPropertiesFromJS(P){if(!this.enableScripting)return;let Z=this.annotationStorage.getRawValue(this.data.id);if(!Z)return;let q=this._commonActions;for(let[X,z]of Object.entries(Z)){let R=q[X];if(R)R({detail:{[X]:z},target:P}),delete Z[X]}}_createQuadrilaterals(){if(!this.container)return;let{quadPoints:P}=this.data;if(!P)return;let[Z,q,X,z]=this.data.rect.map((U)=>Math.fround(U));if(P.length===8){let[U,K,I,B]=P.subarray(2,6);if(X===U&&z===K&&Z===I&&q===B)return}let{style:R}=this.container,f;if(this.#Z){let{borderColor:U,borderWidth:K}=R;R.borderWidth=0,f=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${U}" stroke-width="${K}">`],this.container.classList.add("hasBorder")}let G=X-Z,Q=z-q,{svgFactory:Y}=this,W=Y.createElement("svg");W.classList.add("quadrilateralsContainer"),W.setAttribute("width",0),W.setAttribute("height",0),W.role="none";let $=Y.createElement("defs");W.append($);let _=Y.createElement("clipPath"),J=`clippath_${this.data.id}`;_.setAttribute("id",J),_.setAttribute("clipPathUnits","objectBoundingBox"),$.append(_);for(let U=2,K=P.length;U<K;U+=8){let I=P[U],B=P[U+1],j=P[U+2],V=P[U+3],H=Y.createElement("rect"),M=(j-Z)/G,x=(z-B)/Q,A=(I-j)/G,k=(B-V)/Q;H.setAttribute("x",M),H.setAttribute("y",x),H.setAttribute("width",A),H.setAttribute("height",k),_.append(H),f?.push(`<rect vector-effect="non-scaling-stroke" x="${M}" y="${x}" width="${A}" height="${k}"/>`)}this.#Z&&(f.push("</g></svg>')"),R.backgroundImage=f.join("")),this.container.append(W),this.container.style.clipPath=`url(#${J})`}_createPopup(P=null){let{data:Z}=this,q,X;P?(q={str:P.text},X=P.date):(q=Z.contentsObj,X=Z.modificationDate);let z=this.#X=new n3({data:{color:Z.color,titleObj:Z.titleObj,modificationDate:X,contentsObj:q,richText:Z.richText,parentRect:Z.rect,borderStyle:0,id:`popup_${Z.id}`,rotation:Z.rotation,noRotate:!0},linkService:this.linkService,parent:this.parent,elements:[this]});this.parent._commentManager||this.parent.div.append(z.render())}get hasPopupElement(){return!!(this.#X||this.popup||this.data.popupRef)}get extraPopupElement(){return this.#X}render(){X8("Abstract method `AnnotationElement.render` called")}_getElementsByName(P,Z=null){let q=[];if(this._fieldObjects){let X=this._fieldObjects[P];if(X)for(let{page:z,id:R,exportValues:f}of X){if(z===-1)continue;if(R===Z)continue;let G=typeof f=="string"?f:null,Q=document.querySelector(`[data-element-id="${R}"]`);!Q||D5.has(Q)?q.push({id:R,exportValue:G,domElement:Q}):y1(`_getElementsByName - element not allowed: ${R}`)}return q}for(let X of document.getElementsByName(P)){let{exportValue:z}=X,R=X.getAttribute("data-element-id");R!==Z&&(D5.has(X)&&q.push({id:R,exportValue:z,domElement:X}))}return q}show(){this.container&&(this.container.hidden=!1),this.popup?.maybeShow()}hide(){this.container&&(this.container.hidden=!0),this.popup?.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){let P=this.getElementsToTriggerPopup();if(Array.isArray(P))for(let Z of P)Z.classList.add("highlightArea");else P.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;let{annotationEditorType:P,data:{id:Z}}=this;this.container.addEventListener("dblclick",()=>{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:P,editId:Z,mustEnterInEditMode:!0})})}get width(){return this.data.rect[2]-this.data.rect[0]}get height(){return this.data.rect[3]-this.data.rect[1]}}class SK{#P=null;#Z=this.#s.bind(this);#X=this.#E.bind(this);#q=this.#m.bind(this);#z=this.#H.bind(this);#R=null;#G=null;#f=null;#Q=null;#Y=null;#_=null;#$=null;#J=!1;#B=null;#K=null;#W=null;#U=null;#I=null;#V=null;#j=null;#b=null;#A=null;#x=null;#C=!1;#M=null;#L=null;constructor({container:P,color:Z,elements:q,titleObj:X,modificationDate:z,contentsObj:R,richText:f,parent:G,rect:Q,parentRect:Y,open:W,commentManager:$=null}){this.#G=P,this.#A=X,this.#f=R,this.#b=f,this.#_=G,this.#R=Z,this.#j=Q,this.#$=Y,this.#Y=q,this.#P=$,this.#M=q[0],this.#Q=l7.toDateObject(z),this.trigger=q.flatMap((_)=>_.getElementsToTriggerPopup()),$?this.renderCommentButton():(this.#v(),this.#G.hidden=!0,W&&this.#H())}#v(){if(this.#K)return;this.#K=new AbortController;let{signal:P}=this.#K;for(let Z of this.trigger)Z.addEventListener("click",this.#z,{signal:P}),Z.addEventListener("pointerenter",this.#q,{signal:P}),Z.addEventListener("pointerleave",this.#X,{signal:P}),Z.classList.add("popupTriggerArea");for(let Z of this.#Y)Z.container?.addEventListener("keydown",this.#Z,{signal:P})}#T(){let P=this.#Y.find((Z)=>Z.hasCommentButton);P&&(this.#I=P._normalizePoint(P.commentButtonPosition))}renderCommentButton(){if(this.#U)return;if(this.#I||this.#T(),!this.#I)return;let{signal:P}=this.#K=new AbortController,Z=!!this.#M.extraPopupElement,q=()=>{this.#P.toggleCommentPopup(this,!0,void 0,!Z)},X=()=>{this.#P.toggleCommentPopup(this,!1,!0,!Z)},z=()=>{this.#P.toggleCommentPopup(this,!1,!1)};if(Z){this.#U=this.#M.container;for(let R of this.trigger)R.ariaHasPopup="dialog",R.ariaControls="commentPopup",R.addEventListener("keydown",this.#Z,{signal:P}),R.addEventListener("click",q,{signal:P}),R.addEventListener("pointerenter",X,{signal:P}),R.addEventListener("pointerleave",z,{signal:P}),R.classList.add("popupTriggerArea")}else{let R=this.#U=document.createElement("button");R.className="annotationCommentButton";let f=this.#M.container;R.style.zIndex=f.style.zIndex+1,R.tabIndex=0,R.ariaHasPopup="dialog",R.ariaControls="commentPopup",R.setAttribute("data-l10n-id","pdfjs-show-comment-button"),this.#D(),this.#N(),R.addEventListener("keydown",this.#Z,{signal:P}),R.addEventListener("click",q,{signal:P}),R.addEventListener("pointerenter",X,{signal:P}),R.addEventListener("pointerleave",z,{signal:P}),f.after(R)}}#N(){if(this.#M.extraPopupElement&&!this.#M.editor)return;this.renderCommentButton();let[P,Z]=this.#I,{style:q}=this.#U;q.left=`calc(${P}%)`,q.top=`calc(${Z}% - var(--comment-button-dim))`}#D(){this.#M.extraPopupElement||(this.renderCommentButton(),this.#U.style.backgroundColor=this.commentButtonColor||"")}get commentButtonColor(){let{color:P,opacity:Z}=this.#M.commentData;return P?this.#_._commentManager.makeCommentColor(P,Z):null}focusCommentButton(){setTimeout(()=>{this.#U?.focus()},0)}getData(){let{richText:P,color:Z,opacity:q,creationDate:X,modificationDate:z}=this.#M.commentData;return{contentsObj:{str:this.comment},richText:P,color:Z,opacity:q,creationDate:X,modificationDate:z}}get elementBeforePopup(){return this.#U}get comment(){return this.#L||=this.#M.commentText,this.#L}set comment(P){P!==this.comment&&(this.#M.commentText=this.#L=P)}get parentBoundingClientRect(){return this.#M.layer.getBoundingClientRect()}setCommentButtonStates({selected:P,hasPopup:Z}){this.#U&&(this.#U.classList.toggle("selected",P),this.#U.ariaExpanded=Z)}setSelectedCommentButton(P){this.#U.classList.toggle("selected",P)}get commentPopupPosition(){if(this.#V)return this.#V;let{x:P,y:Z,height:q}=this.#U.getBoundingClientRect(),{x:X,y:z,width:R,height:f}=this.#M.layer.getBoundingClientRect();return[(P-X)/R,(Z+q-z)/f]}set commentPopupPosition(P){this.#V=P}hasDefaultPopupPosition(){return this.#V===null}get commentButtonPosition(){return this.#I}get commentButtonWidth(){return this.#U.getBoundingClientRect().width/this.parentBoundingClientRect.width}editComment(P){let[Z,q]=this.#V||this.commentButtonPosition.map((Q)=>Q/100),X=this.parentBoundingClientRect,{x:z,y:R,width:f,height:G}=X;this.#P.showDialog(null,this,z+Z*f,R+q*G,{...P,parentDimensions:X})}render(){if(this.#B)return;let P=this.#B=document.createElement("div");if(P.className="popup",this.#R){let q=P.style.outlineColor=j1.makeHexColor(...this.#R);P.style.backgroundColor=`color-mix(in srgb, ${q} 30%, white)`}let Z=document.createElement("span");if(Z.className="header",this.#A?.str){let q=document.createElement("span");q.className="title",Z.append(q),{dir:q.dir,str:q.textContent}=this.#A}if(P.append(Z),this.#Q){let q=document.createElement("time");q.className="popupDate",q.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),q.setAttribute("data-l10n-args",JSON.stringify({dateObj:this.#Q.valueOf()})),q.dateTime=this.#Q.toISOString(),Z.append(q)}WX({html:this.#S||this.#f.str,dir:this.#f?.dir,className:"popupContent"},P),this.#G.append(P)}get#S(){let P=this.#b,Z=this.#f;return!P?.str||Z?.str&&Z.str!==P.str?null:this.#b.html||null}get#p(){return this.#S?.attributes?.style?.fontSize||0}get#w(){return this.#S?.attributes?.style?.color||null}#O(P){let Z=[],q={str:P,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:Z}]}},X={style:{color:this.#w,fontSize:this.#p?`calc(${this.#p}px * var(--total-scale-factor))`:""}};for(let z of P.split(`
|
|
31
|
+
`))Z.push({name:"span",value:z,attributes:X});return q}#s(P){P.altKey||P.shiftKey||P.ctrlKey||P.metaKey||(P.key==="Enter"||P.key==="Escape"&&this.#J)&&this.#H()}updateEdited({rect:P,popup:Z,deleted:q}){if(this.#P)return q?(this.remove(),this.#L=null):Z&&(Z.deleted?this.remove():(this.#D(),this.#L=Z.text)),void(P&&(this.#I=null,this.#T(),this.#N()));q||Z?.deleted?this.remove():(this.#v(),this.#x||={contentsObj:this.#f,richText:this.#b},P&&(this.#W=null),Z&&Z.text&&(this.#b=this.#O(Z.text),this.#Q=l7.toDateObject(Z.date),this.#f=null),this.#B?.remove(),this.#B=null)}resetEdited(){this.#x&&({contentsObj:this.#f,richText:this.#b}=this.#x,this.#x=null,this.#B?.remove(),this.#B=null,this.#W=null)}remove(){if(this.#K?.abort(),this.#K=null,this.#B?.remove(),this.#B=null,this.#C=!1,this.#J=!1,this.#U?.remove(),this.#U=null,this.trigger)for(let P of this.trigger)P.classList.remove("popupTriggerArea")}#k(){if(this.#W!==null)return;let{page:{view:P},viewport:{rawDims:{pageWidth:Z,pageHeight:q,pageX:X,pageY:z}}}=this.#_,R=!!this.#$,f=R?this.#$:this.#j;for(let _ of this.#Y)if(!f||j1.intersect(_.data.rect,f)!==null){f=_.data.rect,R=!0;break}let G=j1.normalizeRect([f[0],P[3]-f[1]+P[1],f[2],P[3]-f[3]+P[1]]),Q=R?f[2]-f[0]+5:0,Y=G[0]+Q,W=G[1];this.#W=[100*(Y-X)/Z,100*(W-z)/q];let{style:$}=this.#G;$.left=`${this.#W[0]}%`,$.top=`${this.#W[1]}%`}#H(){this.#P?this.#P.toggleCommentPopup(this,!1):(this.#J=!this.#J,this.#J?(this.#m(),this.#G.addEventListener("click",this.#z),this.#G.addEventListener("keydown",this.#Z)):(this.#E(),this.#G.removeEventListener("click",this.#z),this.#G.removeEventListener("keydown",this.#Z)))}#m(){this.#B||this.render(),this.isVisible?this.#J&&this.#G.classList.add("focused"):(this.#k(),this.#G.hidden=!1,this.#G.style.zIndex=parseInt(this.#G.style.zIndex)+1000)}#E(){this.#G.classList.remove("focused"),!this.#J&&this.isVisible&&(this.#G.hidden=!0,this.#G.style.zIndex=parseInt(this.#G.style.zIndex)-1000)}forceHide(){this.#C=this.isVisible,this.#C&&(this.#G.hidden=!0)}maybeShow(){this.#P||(this.#v(),this.#C&&(this.#B||this.#m(),this.#C=!1,this.#G.hidden=!1))}get isVisible(){return!this.#P&&this.#G.hidden===!1}}class wP{#P=null;#Z=null;#X=null;#q=new Map;#z=null;#R=null;constructor({div:P,accessibilityManager:Z,annotationCanvasMap:q,annotationEditorUIManager:X,page:z,viewport:R,structTreeLayer:f,commentManager:G,linkService:Q,annotationStorage:Y}){this.div=P,this.#P=Z,this.#Z=q,this.#z=f||null,this.#R=Q||null,this.#X=Y||new SP,this.page=z,this.viewport=R,this.zIndex=0,this._annotationEditorUIManager=X,this._commentManager=G||null}hasEditableAnnotations(){return this.#q.size>0}async#G(P,Z,q){let X=P.firstChild||P,z=X.id=`${QX}${Z}`,R=await this.#z?.getAriaAttributes(z);if(R)for(let[f,G]of R)X.setAttribute(f,G);q?q.at(-1).container.after(P):(this.div.append(P),this.#P?.moveElementInDOM(this.div,P,X,!1))}async render(P){let{annotations:Z}=P,q=this.div;i4(q,this.viewport);let X=new Map,z={data:null,layer:q,linkService:this.#R,downloadManager:P.downloadManager,imageResourcesPath:P.imageResourcesPath||"",renderForms:P.renderForms!==!1,svgFactory:new N6,annotationStorage:this.#X,enableComment:P.enableComment===!0,enableScripting:P.enableScripting===!0,hasJSActions:P.hasJSActions,fieldObjects:P.fieldObjects,parent:this,elements:null};for(let R of Z){if(R.noHTML)continue;let f=R.annotationType===V8.POPUP;if(f){let Y=X.get(R.id);if(!Y)continue;z.elements=Y}else if(R.rect[2]===R.rect[0]||R.rect[3]===R.rect[1])continue;z.data=R;let G=lZ.create(z);if(!G.isRenderable)continue;if(!f&&R.popupRef){let Y=X.get(R.popupRef);Y?Y.push(G):X.set(R.popupRef,[G])}let Q=G.render();R.hidden&&(Q.style.visibility="hidden"),await this.#G(Q,R.id,z.elements),G.extraPopupElement?.popup?.renderCommentButton(),G._isEditable&&(this.#q.set(G.data.id,G),this._annotationEditorUIManager?.renderAnnotationElement(G))}this.#f()}async addLinkAnnotations(P){let Z={data:null,layer:this.div,linkService:this.#R,svgFactory:new N6,parent:this};for(let q of P){q.borderStyle||=wP._defaultBorderStyle,Z.data=q;let X=lZ.create(Z);if(!X.isRenderable)continue;let z=X.render();await this.#G(z,q.id,null)}}update({viewport:P}){let Z=this.div;this.viewport=P,i4(Z,{rotation:P.rotation}),this.#f(),Z.hidden=!1}#f(){if(!this.#Z)return;let P=this.div;for(let[Z,q]of this.#Z){let X=P.querySelector(`[data-annotation-id="${Z}"]`);if(!X)continue;q.className="annotationContent";let{firstChild:z}=X;z?z.nodeName==="CANVAS"?z.replaceWith(q):z.classList.contains("annotationContent")?z.after(q):z.before(q):X.append(q);let R=this.#q.get(Z);R&&(R._hasNoCanvas?(this._annotationEditorUIManager?.setMissingCanvas(Z,X.id,q),R._hasNoCanvas=!1):R.canvas=q)}this.#Z.clear()}getEditableAnnotations(){return Array.from(this.#q.values())}getEditableAnnotation(P){return this.#q.get(P)}addFakeAnnotation(P){let{div:Z}=this,{id:q,rotation:X}=P,z=new bK({data:{id:q,rect:P.getPDFRect(),rotation:X},editor:P,layer:Z,parent:this,enableComment:!!this._commentManager,linkService:this.#R,annotationStorage:this.#X}),R=z.render();return Z.append(R),this.#P?.moveElementInDOM(Z,R,R,!1),z.createOrUpdatePopup(),z}static get _defaultBorderStyle(){return D1(this,"_defaultBorderStyle",Object.freeze({width:1,rawWidth:1,style:KU,dashArray:[3],horizontalCornerRadius:0,verticalCornerRadius:0}))}}class I1{static PRECISION=0.0001;toSVGPath(){X8("Abstract method `toSVGPath` must be implemented.")}get box(){X8("Abstract getter `box` must be implemented.")}serialize(P,Z){X8("Abstract method `serialize` must be implemented.")}static _rescale(P,Z,q,X,z,R){R||=new Float32Array(P.length);for(let f=0,G=P.length;f<G;f+=2)R[f]=Z+P[f]*X,R[f+1]=q+P[f+1]*z;return R}static _rescaleAndSwap(P,Z,q,X,z,R){R||=new Float32Array(P.length);for(let f=0,G=P.length;f<G;f+=2)R[f]=Z+P[f+1]*X,R[f+1]=q+P[f]*z;return R}static _translate(P,Z,q,X){X||=new Float32Array(P.length);for(let z=0,R=P.length;z<R;z+=2)X[z]=Z+P[z],X[z+1]=q+P[z+1];return X}static svgRound(P){return Math.round(1e4*P)}static _normalizePoint(P,Z,q,X,z){switch(z){case 90:return[1-Z/q,P/X];case 180:return[1-P/q,1-Z/X];case 270:return[Z/q,1-P/X];default:return[P/q,Z/X]}}static _normalizePagePoint(P,Z,q){switch(q){case 90:return[1-Z,P];case 180:return[1-P,1-Z];case 270:return[Z,1-P];default:return[P,Z]}}static createBezierPoints(P,Z,q,X,z,R){return[(P+5*q)/6,(Z+5*X)/6,(5*q+z)/6,(5*X+R)/6,(q+z)/2,(X+R)/2]}}class i3{#P;#Z;#X;#q=[];#z=[];constructor(P,Z=0,q=0,X=!0){let z=[1/0,1/0,-1/0,-1/0];for(let{x:U,y:K,width:I,height:B}of P){let j=Math.floor((U-Z)/0.0001)*0.0001,V=Math.ceil((U+I+Z)/0.0001)*0.0001,H=Math.floor((K-Z)/0.0001)*0.0001,M=Math.ceil((K+B+Z)/0.0001)*0.0001,x=[j,H,M,!0],A=[V,H,M,!1];this.#q.push(x,A),j1.rectBoundingBox(j,H,V,M,z)}let f=z[2]-z[0]+2*q,G=z[3]-z[1]+2*q,Q=z[0]-q,Y=z[1]-q,W=X?-1/0:1/0,$=1/0,_=this.#q.at(X?-1:-2),J=[_[0],_[2]];for(let U of this.#q){let[K,I,B,j]=U;!j&&X?I<$?($=I,W=K):I===$&&(W=Math.max(W,K)):j&&!X&&(I<$?($=I,W=K):I===$&&(W=Math.min(W,K))),U[0]=(K-Q)/f,U[1]=(I-Y)/G,U[2]=(B-Y)/G}this.#P=new Float32Array([Q,Y,f,G]),this.#Z=[W,$],this.#X=J}getOutlines(){this.#q.sort((Z,q)=>Z[0]-q[0]||Z[1]-q[1]||Z[2]-q[2]);let P=[];for(let Z of this.#q)Z[3]?(P.push(...this.#Y(Z)),this.#f(Z)):(this.#Q(Z),P.push(...this.#Y(Z)));return this.#R(P)}#R(P){let Z=[],q=new Set;for(let R of P){let[f,G,Q]=R;Z.push([f,G,R],[f,Q,R])}Z.sort((R,f)=>R[1]-f[1]||R[0]-f[0]);for(let R=0,f=Z.length;R<f;R+=2){let G=Z[R][2],Q=Z[R+1][2];G.push(Q),Q.push(G),q.add(G),q.add(Q)}let X=[],z;for(;q.size>0;){let R=q.values().next().value,[f,G,Q,Y,W]=R;q.delete(R);let $=f,_=G;for(z=[f,Q],X.push(z);;){let J;if(q.has(Y))J=Y;else{if(!q.has(W))break;J=W}q.delete(J),[f,G,Q,Y,W]=J,$!==f&&(z.push($,_,f,_===G?G:Q),$=f),_=_===G?Q:G}z.push($,_)}return new dK(X,this.#P,this.#Z,this.#X)}#G(P){let Z=this.#z,q=0,X=Z.length-1;for(;q<=X;){let z=q+X>>1,R=Z[z][0];if(R===P)return z;R<P?q=z+1:X=z-1}return X+1}#f([,P,Z]){let q=this.#G(P);this.#z.splice(q,0,[P,Z])}#Q([,P,Z]){let q=this.#G(P);for(let X=q;X<this.#z.length;X++){let[z,R]=this.#z[X];if(z!==P)break;if(z===P&&R===Z)return void this.#z.splice(X,1)}for(let X=q-1;X>=0;X--){let[z,R]=this.#z[X];if(z!==P)break;if(z===P&&R===Z)return void this.#z.splice(X,1)}}#Y(P){let[Z,q,X]=P,z=[[Z,q,X]],R=this.#G(X);for(let f=0;f<R;f++){let[G,Q]=this.#z[f];for(let Y=0,W=z.length;Y<W;Y++){let[,$,_]=z[Y];if(!(Q<=$||_<=G))if($>=G)if(_>Q)z[Y][1]=Q;else{if(W===1)return[];z.splice(Y,1),Y--,W--}else z[Y][2]=G,_>Q&&z.push([Z,Q,_])}}return z}}class vX{#P=Object.create(null);updateProperty(P,Z){this[P]=Z,this.updateSVGProperty(P,Z)}updateProperties(P){if(P)for(let[Z,q]of Object.entries(P))Z.startsWith("_")||this.updateProperty(Z,q)}updateSVGProperty(P,Z){this.#P[P]=Z}toSVGProperties(){let P=this.#P;return this.#P=Object.create(null),{root:P}}reset(){this.#P=Object.create(null)}updateAll(P=this){this.updateProperties(P)}clone(){X8("Not implemented")}}class sK{#P=new Float64Array(6);#Z;#X;#q;#z;#R;#G="";#f=0;#Q=new D6;#Y;#_;constructor(P,Z,q,X,z,R){this.#Y=q,this.#_=X,this.#q=z,this.#z=R,[P,Z]=this.#$(P,Z);let f=this.#Z=[NaN,NaN,NaN,NaN,P,Z];this.#R=[P,Z],this.#X=[{line:f,points:this.#R}],this.#P.set(f,0)}updateProperty(P,Z){P==="stroke-width"&&(this.#z=Z)}#$(P,Z){return I1._normalizePoint(P,Z,this.#Y,this.#_,this.#q)}isEmpty(){return!this.#X||this.#X.length===0}isCancellable(){return this.#R.length<=10}add(P,Z){[P,Z]=this.#$(P,Z);let[q,X,z,R]=this.#P.subarray(2,6),f=P-z,G=Z-R;return Math.hypot(this.#Y*f,this.#_*G)<=2?null:(this.#R.push(P,Z),isNaN(q)?(this.#P.set([z,R,P,Z],2),this.#Z.push(NaN,NaN,NaN,NaN,P,Z),{path:{d:this.toSVGPath()}}):(isNaN(this.#P[0])&&this.#Z.splice(6,6),this.#P.set([q,X,z,R,P,Z],0),this.#Z.push(...I1.createBezierPoints(q,X,z,R,P,Z)),{path:{d:this.toSVGPath()}}))}end(P,Z){return this.add(P,Z)||(this.#R.length===2?{path:{d:this.toSVGPath()}}:null)}startNew(P,Z,q,X,z){this.#Y=q,this.#_=X,this.#q=z,[P,Z]=this.#$(P,Z);let R=this.#Z=[NaN,NaN,NaN,NaN,P,Z];this.#R=[P,Z];let f=this.#X.at(-1);return f&&(f.line=new Float32Array(f.line),f.points=new Float32Array(f.points)),this.#X.push({line:R,points:this.#R}),this.#P.set(R,0),this.#f=0,this.toSVGPath(),null}getLastElement(){return this.#X.at(-1)}setLastElement(P){return this.#X?(this.#X.push(P),this.#Z=P.line,this.#R=P.points,this.#f=0,{path:{d:this.toSVGPath()}}):this.#Q.setLastElement(P)}removeLastElement(){if(!this.#X)return this.#Q.removeLastElement();this.#X.pop(),this.#G="";for(let P=0,Z=this.#X.length;P<Z;P++){let{line:q,points:X}=this.#X[P];this.#Z=q,this.#R=X,this.#f=0,this.toSVGPath()}return{path:{d:this.#G}}}toSVGPath(){let P=I1.svgRound(this.#Z[4]),Z=I1.svgRound(this.#Z[5]);if(this.#R.length===2)return this.#G=`${this.#G} M ${P} ${Z} Z`,this.#G;if(this.#R.length<=6){let X=this.#G.lastIndexOf("M");this.#G=`${this.#G.slice(0,X)} M ${P} ${Z}`,this.#f=6}if(this.#R.length===4){let X=I1.svgRound(this.#Z[10]),z=I1.svgRound(this.#Z[11]);return this.#G=`${this.#G} L ${X} ${z}`,this.#f=12,this.#G}let q=[];this.#f===0&&(q.push(`M ${P} ${Z}`),this.#f=6);for(let X=this.#f,z=this.#Z.length;X<z;X+=6){let[R,f,G,Q,Y,W]=this.#Z.slice(X,X+6).map(I1.svgRound);q.push(`C${R} ${f} ${G} ${Q} ${Y} ${W}`)}return this.#G+=q.join(" "),this.#f=this.#Z.length,this.#G}getOutlines(P,Z,q,X){let z=this.#X.at(-1);return z.line=new Float32Array(z.line),z.points=new Float32Array(z.points),this.#Q.build(this.#X,P,Z,q,this.#q,this.#z,X),this.#P=null,this.#Z=null,this.#X=null,this.#G=null,this.#Q}get defaultSVGProperties(){return{root:{viewBox:"0 0 10000 10000"},rootClass:{draw:!0},bbox:[0,0,1,1]}}}class N8{#P=null;#Z=new Map;#X=new Map;static#q=0;constructor({pageIndex:P}){this.pageIndex=P}setParent(P){if(this.#P){if(this.#P!==P){if(this.#Z.size>0)for(let Z of this.#Z.values())Z.remove(),P.append(Z);this.#P=P}}else this.#P=P}static get _svgFactory(){return D1(this,"_svgFactory",new N6)}static#z(P,[Z,q,X,z]){let{style:R}=P;R.top=100*q+"%",R.left=100*Z+"%",R.width=100*X+"%",R.height=100*z+"%"}#R(){let P=N8._svgFactory.create(1,1,!0);return this.#P.append(P),P.setAttribute("aria-hidden",!0),P}#G(P,Z){let q=N8._svgFactory.createElement("clipPath");P.append(q);let X=`clip_${Z}`;q.setAttribute("id",X),q.setAttribute("clipPathUnits","objectBoundingBox");let z=N8._svgFactory.createElement("use");return q.append(z),z.setAttribute("href",`#${Z}`),z.classList.add("clip"),X}#f(P,Z){for(let[q,X]of Object.entries(Z))X===null?P.removeAttribute(q):P.setAttribute(q,X)}draw(P,Z=!1,q=!1){let X=N8.#q++,z=this.#R(),R=N8._svgFactory.createElement("defs");z.append(R);let f=N8._svgFactory.createElement("path");R.append(f);let G=`path_p${this.pageIndex}_${X}`;f.setAttribute("id",G),f.setAttribute("vector-effect","non-scaling-stroke"),Z&&this.#X.set(X,f);let Q=q?this.#G(R,G):null,Y=N8._svgFactory.createElement("use");return z.append(Y),Y.setAttribute("href",`#${G}`),this.updateProperties(z,P),this.#Z.set(X,z),{id:X,clipPathId:`url(#${Q})`}}drawOutline(P,Z){let q=N8.#q++,X=this.#R(),z=N8._svgFactory.createElement("defs");X.append(z);let R=N8._svgFactory.createElement("path");z.append(R);let f=`path_p${this.pageIndex}_${q}`,G;if(R.setAttribute("id",f),R.setAttribute("vector-effect","non-scaling-stroke"),Z){let W=N8._svgFactory.createElement("mask");z.append(W),G=`mask_p${this.pageIndex}_${q}`,W.setAttribute("id",G),W.setAttribute("maskUnits","objectBoundingBox");let $=N8._svgFactory.createElement("rect");W.append($),$.setAttribute("width","1"),$.setAttribute("height","1"),$.setAttribute("fill","white");let _=N8._svgFactory.createElement("use");W.append(_),_.setAttribute("href",`#${f}`),_.setAttribute("stroke","none"),_.setAttribute("fill","black"),_.setAttribute("fill-rule","nonzero"),_.classList.add("mask")}let Q=N8._svgFactory.createElement("use");X.append(Q),Q.setAttribute("href",`#${f}`),G&&Q.setAttribute("mask",`url(#${G})`);let Y=Q.cloneNode();return X.append(Y),Q.classList.add("mainOutline"),Y.classList.add("secondaryOutline"),this.updateProperties(X,P),this.#Z.set(q,X),q}finalizeDraw(P,Z){this.#X.delete(P),this.updateProperties(P,Z)}updateProperties(P,Z){if(!Z)return;let{root:q,bbox:X,rootClass:z,path:R}=Z,f=typeof P=="number"?this.#Z.get(P):P;if(f){if(q&&this.#f(f,q),X&&N8.#z(f,X),z){let{classList:G}=f;for(let[Q,Y]of Object.entries(z))G.toggle(Q,Y)}if(R){let G=f.firstChild.firstChild;this.#f(G,R)}}}updateParent(P,Z){if(Z===this)return;let q=this.#Z.get(P);q&&(Z.#P.append(q),this.#Z.delete(P),Z.#Z.set(P,q))}remove(P){this.#X.delete(P),this.#P!==null&&(this.#Z.get(P).remove(),this.#Z.delete(P))}destroy(){this.#P=null;for(let P of this.#Z.values())P.remove();this.#Z.clear(),this.#X.clear()}}var zB,H5,M5=1.35,EX=0.35,uX=0.25925925925925924,gX=1,Z3=2,dX=4,cX=8,hR=16,RB=64,fB=128,GB=256,rR="pdfjs_internal_editor_",sX=3,hX=9,rX=13,lX=15,oX=101,aX,QB=0,YB=4,q3=1,Y7=2,J4=3,C8,lR="Group",WB="R",U2=1,W7=2,K2=4,$B=16,X3=32,_B=128,JB=512,UB=1,KB=2,BB=4096,IB=8192,jB=32768,VB=65536,xB=131072,HB=1048576,MB=2097152,AB=8388608,LB=16777216,nX=1,bB=2,kB=3,CB=4,TB=5,oR,NB,vB,aR=1,b9=5,FB=1,nR=2,SB=3,mB=4,pB=5,iR=6,tR=7,OB=8,I5=9,O0=10,Q0=11,$4=12,z3=13,k9=14,C9=15,T9=16,N9=17,v9=18,F9=19,oZ=20,R3=21,S9=22,eR=23,aZ=24,nZ=25,f3=26,G3=27,m9=28,yB=29,DB=30,Q3=31,Y3=32,p9=33,O9=34,Pf=35,Zf=36,h4=37,qf=38,Xf=39,zf=40,Rf=41,S5=42,u2=43,B4=44,W3=45,$3=46,_3=47,ff=48,y9=49,iZ=50,PP=51,tZ=52,J3=53,ZP=54,U3=55,eZ=56,a7=57,O4=58,n0=59,Pq=60,n7=61,K3=62,wB=63,EB=64,Gf=65,D9=66,Qf=67,Yf=68,Wf=69,i0=70,B6=71,$f=72,_f=73,Jf=74,uB=75,gB=76,dB=77,Uf=80,Kf=81,I6=83,cB=84,w9=85,B3=86,Bf=87,sB=88,hB=89,rB=90,A5=91,lB=92,oB=93,aB=94,P7=0,Q5=1,g2=2,B2=3,nB=1,iB=2,I3,Z0,L7,gP,b7,iX,s,y8,Y6,s1=class{static makeHexColor(P,Z,q){return`#${Y6[P]}${Y6[Z]}${Y6[q]}`}static domMatrixToTransform(P){return[P.a,P.b,P.c,P.d,P.e,P.f]}static scaleMinMax(P,Z){let q;P[0]?(P[0]<0&&(q=Z[0],Z[0]=Z[2],Z[2]=q),Z[0]*=P[0],Z[2]*=P[0],P[3]<0&&(q=Z[1],Z[1]=Z[3],Z[3]=q),Z[1]*=P[3],Z[3]*=P[3]):(q=Z[0],Z[0]=Z[1],Z[1]=q,q=Z[2],Z[2]=Z[3],Z[3]=q,P[1]<0&&(q=Z[1],Z[1]=Z[3],Z[3]=q),Z[1]*=P[1],Z[3]*=P[1],P[2]<0&&(q=Z[0],Z[0]=Z[2],Z[2]=q),Z[0]*=P[2],Z[2]*=P[2]),Z[0]+=P[4],Z[1]+=P[5],Z[2]+=P[4],Z[3]+=P[5]}static transform(P,Z){return[P[0]*Z[0]+P[2]*Z[1],P[1]*Z[0]+P[3]*Z[1],P[0]*Z[2]+P[2]*Z[3],P[1]*Z[2]+P[3]*Z[3],P[0]*Z[4]+P[2]*Z[5]+P[4],P[1]*Z[4]+P[3]*Z[5]+P[5]]}static multiplyByDOMMatrix(P,Z){return[P[0]*Z.a+P[2]*Z.b,P[1]*Z.a+P[3]*Z.b,P[0]*Z.c+P[2]*Z.d,P[1]*Z.c+P[3]*Z.d,P[0]*Z.e+P[2]*Z.f+P[4],P[1]*Z.e+P[3]*Z.f+P[5]]}static applyTransform(P,Z,q=0){let X=P[q],z=P[q+1];P[q]=X*Z[0]+z*Z[2]+Z[4],P[q+1]=X*Z[1]+z*Z[3]+Z[5]}static applyTransformToBezier(P,Z,q=0){let X=Z[0],z=Z[1],R=Z[2],f=Z[3],G=Z[4],Q=Z[5];for(let Y=0;Y<6;Y+=2){let W=P[q+Y],$=P[q+Y+1];P[q+Y]=W*X+$*R+G,P[q+Y+1]=W*z+$*f+Q}}static applyInverseTransform(P,Z){let q=P[0],X=P[1],z=Z[0]*Z[3]-Z[1]*Z[2];P[0]=(q*Z[3]-X*Z[2]+Z[2]*Z[5]-Z[4]*Z[3])/z,P[1]=(-q*Z[1]+X*Z[0]+Z[4]*Z[1]-Z[5]*Z[0])/z}static axialAlignedBoundingBox(P,Z,q){let X=Z[0],z=Z[1],R=Z[2],f=Z[3],G=Z[4],Q=Z[5],Y=P[0],W=P[1],$=P[2],_=P[3],J=X*Y+G,U=J,K=X*$+G,I=K,B=f*W+Q,j=B,V=f*_+Q,H=V;if(z!==0||R!==0){let M=z*Y,x=z*$,A=R*W,k=R*_;J+=A,I+=A,K+=k,U+=k,B+=M,H+=M,V+=x,j+=x}q[0]=Math.min(q[0],J,K,U,I),q[1]=Math.min(q[1],B,V,j,H),q[2]=Math.max(q[2],J,K,U,I),q[3]=Math.max(q[3],B,V,j,H)}static inverseTransform(P){let Z=P[0]*P[3]-P[1]*P[2];return[P[3]/Z,-P[1]/Z,-P[2]/Z,P[0]/Z,(P[2]*P[5]-P[4]*P[3])/Z,(P[4]*P[1]-P[5]*P[0])/Z]}static singularValueDecompose2dScale(P,Z){let q=P[0],X=P[1],z=P[2],R=P[3],f=q**2+X**2,G=q*z+X*R,Q=z**2+R**2,Y=(f+Q)/2,W=Math.sqrt(Y**2-(f*Q-G**2));Z[0]=Math.sqrt(Y+W||1),Z[1]=Math.sqrt(Y-W||1)}static normalizeRect(P){let Z=P.slice(0);return P[0]>P[2]&&(Z[0]=P[2],Z[2]=P[0]),P[1]>P[3]&&(Z[1]=P[3],Z[3]=P[1]),Z}static intersect(P,Z){let q=Math.max(Math.min(P[0],P[2]),Math.min(Z[0],Z[2])),X=Math.min(Math.max(P[0],P[2]),Math.max(Z[0],Z[2]));if(q>X)return null;let z=Math.max(Math.min(P[1],P[3]),Math.min(Z[1],Z[3])),R=Math.min(Math.max(P[1],P[3]),Math.max(Z[1],Z[3]));return z>R?null:[q,z,X,R]}static pointBoundingBox(P,Z,q){q[0]=Math.min(q[0],P),q[1]=Math.min(q[1],Z),q[2]=Math.max(q[2],P),q[3]=Math.max(q[3],Z)}static rectBoundingBox(P,Z,q,X,z){z[0]=Math.min(z[0],P,q),z[1]=Math.min(z[1],Z,X),z[2]=Math.max(z[2],P,q),z[3]=Math.max(z[3],Z,X)}static#P(P,Z,q,X,z,R,f,G,Q,Y){if(Q<=0||Q>=1)return;let W=1-Q,$=Q*Q,_=$*Q,J=W*(W*(W*P+3*Q*Z)+3*$*q)+_*X,U=W*(W*(W*z+3*Q*R)+3*$*f)+_*G;Y[0]=Math.min(Y[0],J),Y[1]=Math.min(Y[1],U),Y[2]=Math.max(Y[2],J),Y[3]=Math.max(Y[3],U)}static#Z(P,Z,q,X,z,R,f,G,Q,Y,W,$){if(Math.abs(Q)<0.000000000001)return void(Math.abs(Y)>=0.000000000001&&this.#P(P,Z,q,X,z,R,f,G,-W/Y,$));let _=Y**2-4*W*Q;if(_<0)return;let J=Math.sqrt(_),U=2*Q;this.#P(P,Z,q,X,z,R,f,G,(-Y+J)/U,$),this.#P(P,Z,q,X,z,R,f,G,(-Y-J)/U,$)}static bezierBoundingBox(P,Z,q,X,z,R,f,G,Q){Q[0]=Math.min(Q[0],P,f),Q[1]=Math.min(Q[1],Z,G),Q[2]=Math.max(Q[2],P,f),Q[3]=Math.max(Q[3],Z,G),this.#Z(P,q,z,f,Z,X,R,G,3*(3*(q-z)-P+f),6*(P-2*q+z),3*(q-P),Q),this.#Z(P,q,z,f,Z,X,R,G,3*(3*(X-R)-Z+G),6*(Z-2*X+R),3*(X-Z),Q)}},tB,dP=null,tX=null,eB,F8,If,jf,d2,Vf=function(){return Vf},S,J8,t8,Hf,u9=2147483647,w0,g9,d9,q8,x3,V4,L5,cP,ZI,i8,Cf,Z7=null,h9=0,hP,RI,m8,Nf,r9,vf,Ff,Sf,mf,Xq,pf,c8,Of,M4,T7,Y8,o8,A3,Df,G0,QI,a8,uf,I0,L3,zq,$7,I2=4017,j2=799,V2=3406,x2=2276,H2=1567,M2=3784,d5=5793,A2=2896,v6,q7,J5,gf,p8,c5=16,sf,hf,G4=-1,zz,Rz,fz,Gz,Qz,Yz,rf,Wz,KI,BI,II,jI,n9,VI,z8,$z,xI,_z,HI,s2=17,Uz,PG,ZG,t9,e9,qG,s5,CI,lP=16777215,b5,GG,OI,Gq,A4,N7,Qq,Yq,l0,yI,DI,oP,EI,ZZ,F7=!0,qZ=1,QG=2,k3=4,Kz=32,Bz,uI,gI,dI,cI,h2,aP=391,h5,sI,hI,S7,rI,m7,nP,p7,lI,zZ,Jq,RZ,Iz,oI,aI,KG,BG,tI,eI,Zj,qj,Xj,zj,Rj,fj,tP,xz,Hz,Gj,Qj,Q4,Y5=1000,Yj,Wj,$Z=2,l2=3,LG=4,bG=5,kG=6,CG=7,NG,FG,y4,SG,Uj,Kj,Bj,Ij,jj,Vj,xj,Hj,Mj,Aj,Lj,bj,kj,Cj,Tj,Nj,u6,g6,d6,c6,s6,h6,r6,l6,vj,Fj,Sj,mj,pj,Oj,yj,Dj,wj,Ej,uj,gj,dj,cj,sj,hj,rj,r8,_Z,Vq,yG,JZ,DG,wG,EG,gG,r4,GP,dG,KZ,BZ,ij,tj,v4,c1,yz,Dz,ZV,W5,U5,K5,B5,J7,qV,uz=3285377520,b0=4294901760,F4=65535,XV=class{constructor(P){this.h1=P?4294967295&P:uz,this.h2=P?4294967295&P:uz}update(P){let Z,q;if(typeof P=="string"){Z=new Uint8Array(2*P.length),q=0;for(let U=0,K=P.length;U<K;U++){let I=P.charCodeAt(U);I<=255?Z[q++]=I:(Z[q++]=I>>>8,Z[q++]=255&I)}}else{if(!ArrayBuffer.isView(P))throw Error("Invalid data format, must be a string or TypedArray.");Z=P.slice(),q=Z.byteLength}let X=q>>2,z=q-4*X,R=new Uint32Array(Z.buffer,0,X),f=0,G=0,Q=this.h1,Y=this.h2,W=3432918353,$=461845907,_=11601,J=13715;for(let U=0;U<X;U++)1&U?(f=R[U],f=f*W&b0|f*_&F4,f=f<<15|f>>>17,f=f*$&b0|f*J&F4,Q^=f,Q=Q<<13|Q>>>19,Q=5*Q+3864292196):(G=R[U],G=G*W&b0|G*_&F4,G=G<<15|G>>>17,G=G*$&b0|G*J&F4,Y^=G,Y=Y<<13|Y>>>19,Y=5*Y+3864292196);switch(f=0,z){case 3:f^=Z[4*X+2]<<16;case 2:f^=Z[4*X+1]<<8;case 1:f^=Z[4*X],f=f*W&b0|f*_&F4,f=f<<15|f>>>17,f=f*$&b0|f*J&F4,1&X?Q^=f:Y^=f}this.h1=Q,this.h2=Y}hexdigest(){let P=this.h1,Z=this.h2;return P^=Z>>>1,P=3981806797*P&b0|36045*P&F4,Z=4283543511*Z&b0|(2950163797*(Z<<16|P>>>16)&b0)>>>16,P^=Z>>>1,P=444984403*P&b0|60499*P&F4,Z=3301882366*Z&b0|(3120437893*(Z<<16|P>>>16)&b0)>>>16,P^=Z>>>1,(P>>>0).toString(16).padStart(8,"0")+(Z>>>0).toString(16).padStart(8,"0")}},zV,RV=1,fV=2,dz,lG,oG,GV,QV,$5,w7,K7=0,YV=-2,WV=-3,sz=-4,$V=-5,hz=-6,rz=-9,P2,nG=1,iG=2,VZ=3,tG=4,xZ=5,v3,QP,k5,Q8,a4,F0,X6,a2,D0,e0,a,v0,A6,u,P8,Z2,HZ,PQ,C5,YP,E7,B7,Cq,u8,I7,S8,L6,K4,I8,L1,K8,e1,u7,n5,MZ,n2,Tq,E5,z6,E4,j7,L4,C4,g7,d7,UV,B8,d1,j5,q4,AZ,b4,R4,Y0,F6,s4,ZQ,R7,H4,LZ,qQ,$0,y0,A8,XQ,x1,V7,u1,a1,g0,j8,KV,BV,az,IV,S3=0,m3=1,vq=2,jV=3,VV=4,GQ,nz,T2,G5,r5,N1,f9,S4,G9,iz,Q9,tz,Y9,f7,N2,C0,o6,a6,W9,kZ=0,YQ,g,T,_P,X4,f8,r1,F1,S0,M8,Fq,ez,X1,N5="http://www.w3.org/2000/svg",MV,AV,LV,MQ,Dq,AQ,LQ,bQ,kQ,p3,CQ,TQ,wq,NQ,Eq,uq,vQ,FQ,SQ,mQ,pQ,gq,dq,OQ,yQ,DQ,VP,cq,wQ,EQ,uQ,gQ,dQ,cQ,sQ,hQ,sq,m6,rQ,lQ,oQ,aQ,nQ,iQ,tQ,bV,eQ,PY,hq,ZY,qY,xP,XY,zY,RY,fY,GY,QY,YY,WY,$Y,_Y,JY,O3,UY,KY,BY,IY,jY,VY,xY,HY,MY,AY,LY,bY,kY,CY,rq,y5,c7,TY,NY,vY,FY,SY,mY,pY,OY,lq,yY,DY,y3,wY,EY,uY,gY,dY,cY,oq,HP,sY,hY,rY,MP,aq,nq,lY,oY,aY,nY,iY,AP,tY,LP,eY,D3,zR,P1,qW,XW,zW,RW,fW,GW,QW,YW,WW,$W,_W,JW,UW,KW,BW,IW,jW,VW,xW,HW,MW,AW,LW,bW,kW,CW,TW,NW,vW,FW,SW,mW,pW,OW,yW,DW,wW,EW,uW,gW,dW,cW,sW,hW,rW,lW,oW,aW,nW,iW,tW,eW,P$,Z$,q$,X$,z$,R$,f$,G$,Q$,Y$,W$,$$,_$,J$,U$,K$,B$,I$,j$,V$,x$,H$,M$,A$,L$,b$,k$,C$,T$,N$,v$,F$,S$,m$,p$,O$,y$,D$,w$,E$,u$,g$,d$,c$,s$,h$,r$,l$,kV,o$,a$,n$,i$,t$,e$,P_,Z_,q_,X_,z_,R_,f_,G_,Q_,Y_,W_,$_,__,J_,U_,K_,B_,I_,j_,V_,x_,H_,M_,A_,L_,b_,k_,C_,T_,N_,v_,F_,w3,m0,S_,m_,p_,O_,y_,D_,w_,E_,u_,g_,d_,c_,E3,CZ,s_,h_,u3,W8,r_,l_,o_,a_,n_,i_,t_,e_,PJ,ZJ,qJ,XJ,zJ,RJ,fJ,GJ,QJ,YJ,WJ,$J,_J,JJ,UJ,KJ,g3,CV,BJ,d3,TV,IJ,c3,NV,jJ,s3,vV,F2,FV,SV,mV,pV,OV,DV,_0,VJ,xJ,HJ,MJ,AJ,LJ,bJ,kJ,CJ,TJ,NJ,vJ,FJ,b6,RR,TZ,SJ,mJ,h3,X0,E0,yJ,DJ,wJ,iq,EJ,uJ,bP,i2,gJ,dJ,cJ,tq,eq,sJ,i5,t2,hJ,rJ,lJ,_5,oJ,wV,aJ,EV,lV,PU,PX,r3,qU,XU,Px,GR,QR,Zx,mZ,RU,YR=1,WR=2,$R=1,_9=2,_R=3,JR=4,UR=5,KR=6,S2=7,J9=8,IR=class{#P=new AbortController;constructor(P,Z,q){this.sourceName=P,this.targetName=Z,this.comObj=q,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),q.addEventListener("message",this.#Z.bind(this),{signal:this.#P.signal})}#Z({data:P}){if(P.targetName!==this.sourceName)return;if(P.stream)return void this.#q(P);if(P.callback){let q=P.callbackId,X=this.callbackCapabilities[q];if(!X)throw Error(`Cannot resolve callback ${q}`);if(delete this.callbackCapabilities[q],P.callback===YR)X.resolve(P.data);else{if(P.callback!==WR)throw Error("Unexpected callback case");X.reject(K0(P.reason))}return}let Z=this.actionHandler[P.action];if(!Z)throw Error(`Unknown action from worker: ${P.action}`);if(P.callbackId){let q=this.sourceName,X=P.sourceName,z=this.comObj;return void Promise.try(Z,P.data).then(function(R){z.postMessage({sourceName:q,targetName:X,callback:YR,callbackId:P.callbackId,data:R})},function(R){z.postMessage({sourceName:q,targetName:X,callback:WR,callbackId:P.callbackId,reason:K0(R)})})}P.streamId?this.#X(P):Z(P.data)}on(P,Z){let q=this.actionHandler;if(q[P])throw Error(`There is already an actionName called "${P}"`);q[P]=Z}send(P,Z,q){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:P,data:Z},q)}sendWithPromise(P,Z,q){let X=this.callbackId++,z=Promise.withResolvers();this.callbackCapabilities[X]=z;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:P,callbackId:X,data:Z},q)}catch(R){z.reject(R)}return z.promise}sendWithStream(P,Z,q,X){let z=this.streamId++,R=this.sourceName,f=this.targetName,G=this.comObj;return new ReadableStream({start:(Q)=>{let Y=Promise.withResolvers();return this.streamControllers[z]={controller:Q,startCall:Y,pullCall:null,cancelCall:null,isClosed:!1},G.postMessage({sourceName:R,targetName:f,action:P,streamId:z,data:Z,desiredSize:Q.desiredSize},X),Y.promise},pull:(Q)=>{let Y=Promise.withResolvers();return this.streamControllers[z].pullCall=Y,G.postMessage({sourceName:R,targetName:f,stream:KR,streamId:z,desiredSize:Q.desiredSize}),Y.promise},cancel:(Q)=>{t1(Q instanceof Error,"cancel must have a valid reason");let Y=Promise.withResolvers();return this.streamControllers[z].cancelCall=Y,this.streamControllers[z].isClosed=!0,G.postMessage({sourceName:R,targetName:f,stream:$R,streamId:z,reason:K0(Q)}),Y.promise}},q)}#X(P){let Z=P.streamId,q=this.sourceName,X=P.sourceName,z=this.comObj,R=this,f=this.actionHandler[P.action],G={enqueue(Q,Y=1,W){if(this.isCancelled)return;let $=this.desiredSize;this.desiredSize-=Y,$>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),z.postMessage({sourceName:q,targetName:X,stream:JR,streamId:Z,chunk:Q},W)},close(){this.isCancelled||(this.isCancelled=!0,z.postMessage({sourceName:q,targetName:X,stream:_R,streamId:Z}),delete R.streamSinks[Z])},error(Q){t1(Q instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,z.postMessage({sourceName:q,targetName:X,stream:UR,streamId:Z,reason:K0(Q)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:P.desiredSize,ready:null};G.sinkCapability.resolve(),G.ready=G.sinkCapability.promise,this.streamSinks[Z]=G,Promise.try(f,P.data,G).then(function(){z.postMessage({sourceName:q,targetName:X,stream:J9,streamId:Z,success:!0})},function(Q){z.postMessage({sourceName:q,targetName:X,stream:J9,streamId:Z,reason:K0(Q)})})}#q(P){let Z=P.streamId,q=this.sourceName,X=P.sourceName,z=this.comObj,R=this.streamControllers[Z],f=this.streamSinks[Z];switch(P.stream){case J9:P.success?R.startCall.resolve():R.startCall.reject(K0(P.reason));break;case S2:P.success?R.pullCall.resolve():R.pullCall.reject(K0(P.reason));break;case KR:if(!f){z.postMessage({sourceName:q,targetName:X,stream:S2,streamId:Z,success:!0});break}f.desiredSize<=0&&P.desiredSize>0&&f.sinkCapability.resolve(),f.desiredSize=P.desiredSize,Promise.try(f.onPull||BR).then(function(){z.postMessage({sourceName:q,targetName:X,stream:S2,streamId:Z,success:!0})},function(Q){z.postMessage({sourceName:q,targetName:X,stream:S2,streamId:Z,reason:K0(Q)})});break;case JR:if(t1(R,"enqueue should have stream controller"),R.isClosed)break;R.controller.enqueue(P.chunk);break;case _R:if(t1(R,"close should have stream controller"),R.isClosed)break;R.isClosed=!0,R.controller.close(),this.#z(R,Z);break;case UR:t1(R,"error should have stream controller"),R.controller.error(K0(P.reason)),this.#z(R,Z);break;case _9:P.success?R.cancelCall.resolve():R.cancelCall.reject(K0(P.reason)),this.#z(R,Z);break;case $R:if(!f)break;let G=K0(P.reason);Promise.try(f.onCancel||BR,G).then(function(){z.postMessage({sourceName:q,targetName:X,stream:_9,streamId:Z,success:!0})},function(Q){z.postMessage({sourceName:q,targetName:X,stream:_9,streamId:Z,reason:K0(Q)})}),f.sinkCapability.reject(G),f.isCancelled=!0,delete this.streamSinks[Z];break;default:throw Error("Unexpected stream case")}}async#z(P,Z){await Promise.allSettled([P.startCall?.promise,P.pullCall?.promise,P.cancelCall?.promise]),delete this.streamControllers[Z]}destroy(){this.#P?.abort(),this.#P=null}},JU,z0,pZ,K9=1.35,zx=1,zX=2,l3=4,Rx=16,fx=32,Gx=64,Qx=128,Yx=256,j4,s7="pdfjs_internal_editor_",m1,h1,UU,e2=0,B9=1,n6=2,Wx=3,HR=3,MR=4,x7,V8,KU=1,$x=2,_x=3,Jx=4,Ux=5,R2,k6,Kx=0,Bx=1,Ix=2,jx=3,BU,TP,u5,OZ,P3,h7,C6,IU,f4,I9,j9=null,AR=null,QX="pdfjs_internal_id_",W4="http://www.w3.org/2000/svg",n4,Q2,o3,CR,_X,b1,FU,TR=3285377520,k0=4294901760,m4=65535,wZ,SP,UX,EZ=(P)=>typeof P=="object"&&Number.isInteger(P?.num)&&P.num>=0&&Number.isInteger(P?.gen)&&P.gen>=0,pU,NR=1,vR=2,FR=1,V9=2,SR=3,mR=4,pR=5,OR=6,p2=7,x9=8,yU,uZ,DU,gZ,dZ,wU,EU,uU,gU,dU,l5="__forcedDependency",DR,wR,cZ,y2=(P,Z)=>{if(!P)return;let q=P.get(Z);return q||(q={dependencies:new Set,isRenderingOperation:!1},P.set(Z,q)),q},ER,H9,Hx,Mx,Ax,Lx,M9,V5="Fill",M7="Stroke",A7="Shading",hU,rU,lU,kx=1,Cx=2,f0=16,L9,V0,G6,Nx,vx,Fx,cR,U6,K6,Z8,aU,t5,iU,Sx,t6,MX,s8,v8,Q6,MK="5.4.296",AK="f56dc8601",N6,D5,mx,bK,yP,kK,P5,CK,TK,NK,LX,vK,FK,n3,bX,mK,pK,OK,kX,yK,DK,DP,CX,wK,EK,uK,TX,gK,E2,T8,x5,NX,dK,t3,cK,x8,C1,D6,EP,FX,e3,u4,SX,mX,r0,hK,a0;var lK=XB(()=>{globalThis.DOMMatrix===void 0&&(globalThis.DOMMatrix=class{}),globalThis.FinalizationRegistry===void 0&&(globalThis.FinalizationRegistry=class{register(){}unregister(){}}),globalThis.navigator??={},globalThis.navigator.platform??="",globalThis.navigator.userAgent??="",Promise.withResolvers===void 0&&(Promise.withResolvers=function(){let P,Z;return{promise:new Promise((q,X)=>{P=q,Z=X}),resolve:P,reject:Z}});zB=!(typeof process!="object"||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&process.type!=="browser"),H5=[0.001,0,0,0.001,0,0],aX={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},C8={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},oR={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"},NB={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},vB={O:"PageOpen",C:"PageClose"},I3=aR;Z0=function(){function P(Z,q){this.message=Z,this.name=q}return P.prototype=Error(),P.constructor=P,P}(),L7=class extends Z0{constructor(P,Z){super(P,"PasswordException"),this.code=Z}},gP=class extends Z0{constructor(P,Z){super(P,"UnknownErrorException"),this.details=Z}},b7=class extends Z0{constructor(P){super(P,"InvalidPDFException")}},iX=class extends Z0{constructor(P,Z,q){super(P,"ResponseException"),this.status=Z,this.missing=q}},s=class extends Z0{constructor(P){super(P,"FormatError")}},y8=class extends Z0{constructor(P){super(P,"AbortException")}};Y6=Array.from(Array(256).keys(),(P)=>P.toString(16).padStart(2,"0")),tB=[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];typeof Promise.try!="function"&&(Promise.try=function(P,...Z){return new Promise((q)=>{q(P(...Z))})}),typeof Math.sumPrecise!="function"&&(Math.sumPrecise=function(P){return P.reduce((Z,q)=>Z+q,0)});eB=Symbol("CIRCULAR_REF"),F8=Symbol("EOF"),If=Object.create(null),jf=Object.create(null),d2=Object.create(null);S=class S{constructor(P=null){this._map=new Map,this.xref=P,this.objId=null,this.suppressEncryption=!1,this.__nonSerializable__=Vf}assignXref(P){this.xref=P}get size(){return this._map.size}get(P,Z,q){let X=this._map.get(P);return X===void 0&&Z!==void 0&&(X=this._map.get(Z),X===void 0&&q!==void 0&&(X=this._map.get(q))),X instanceof f1&&this.xref?this.xref.fetch(X,this.suppressEncryption):X}async getAsync(P,Z,q){let X=this._map.get(P);return X===void 0&&Z!==void 0&&(X=this._map.get(Z),X===void 0&&q!==void 0&&(X=this._map.get(q))),X instanceof f1&&this.xref?this.xref.fetchAsync(X,this.suppressEncryption):X}getArray(P,Z,q){let X=this._map.get(P);if(X===void 0&&Z!==void 0&&(X=this._map.get(Z),X===void 0&&q!==void 0&&(X=this._map.get(q))),X instanceof f1&&this.xref&&(X=this.xref.fetch(X,this.suppressEncryption)),Array.isArray(X)){X=X.slice();for(let z=0,R=X.length;z<R;z++)X[z]instanceof f1&&this.xref&&(X[z]=this.xref.fetch(X[z],this.suppressEncryption))}return X}getRaw(P){return this._map.get(P)}getKeys(){return[...this._map.keys()]}getRawValues(){return[...this._map.values()]}set(P,Z){this._map.set(P,Z)}setIfNotExists(P,Z){this.has(P)||this.set(P,Z)}setIfNumber(P,Z){typeof Z=="number"&&this.set(P,Z)}setIfArray(P,Z){(Array.isArray(Z)||ArrayBuffer.isView(Z))&&this.set(P,Z)}setIfDefined(P,Z){Z!=null&&this.set(P,Z)}setIfName(P,Z){typeof Z=="string"?this.set(P,t.get(Z)):Z instanceof t&&this.set(P,Z)}has(P){return this._map.has(P)}*[Symbol.iterator](){for(let[P,Z]of this._map)yield[P,Z instanceof f1&&this.xref?this.xref.fetch(Z,this.suppressEncryption):Z]}static get empty(){let P=new S(null);return P.set=(Z,q)=>{O1("Should not call `set` on the empty dictionary.")},q1(this,"empty",P)}static merge({xref:P,dictArray:Z,mergeSubDicts:q=!1}){let X=new S(P),z=new Map;for(let R of Z)if(R instanceof S)for(let[f,G]of R._map){let Q=z.get(f);if(Q===void 0)Q=[],z.set(f,Q);else if(!(q&&G instanceof S))continue;Q.push(G)}for(let[R,f]of z){if(f.length===1||!(f[0]instanceof S)){X._map.set(R,f[0]);continue}let G=new S(P);for(let Q of f)for(let[Y,W]of Q._map)G._map.has(Y)||G._map.set(Y,W);G.size>0&&X._map.set(R,G)}return z.clear(),X.size>0?X:S.empty}clone(){let P=new S(this.xref);for(let Z of this.getKeys())P.set(Z,this.getRaw(Z));return P}delete(P){this._map.delete(P)}};J8=class J8{constructor(P=null){this._set=new Set(P?._set)}has(P){return this._set.has(P.toString())}put(P){this._set.add(P.toString())}remove(P){this._set.delete(P.toString())}[Symbol.iterator](){return this._set.values()}clear(){this._set.clear()}};t8=class t8{constructor(){this._map=new Map}get size(){return this._map.size}get(P){return this._map.get(P.toString())}has(P){return this._map.has(P.toString())}put(P,Z){this._map.set(P.toString(),Z)}putAlias(P,Z){this._map.set(P.toString(),this.get(Z))}[Symbol.iterator](){return this._map.values()}clear(){this._map.clear()}*values(){yield*this._map.values()}*items(){for(let[P,Z]of this._map)yield[f1.fromString(P),Z]}};Hf=/^[1-9]\.\d$/,w0=[1,0,0,1,0,0],g9=["ColorSpace","ExtGState","Font","Pattern","Properties","Shading","XObject"],d9=["ExtGState","Font","Properties","XObject"];q8=class q8 extends Z0{constructor(P,Z){super(`Missing data [${P}, ${Z})`,"MissingDataException"),this.begin=P,this.end=Z}};x3=class x3 extends Z0{constructor(P){super(P,"ParserEOFException")}};V4=class V4 extends Z0{constructor(P){super(P,"XRefEntryException")}};L5=class L5 extends Z0{constructor(P){super(P,"XRefParseException")}};cP=["","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"];ZI={60:"<",62:">",38:"&",34:""",39:"'"};Cf=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&Cf.decode();hP=Object.freeze({RGB8:0,0:"RGB8",RGBA8:1,1:"RGBA8",BGRA8:2,2:"BGRA8",Gray8:3,3:"Gray8",GrayA8:4,4:"GrayA8",CMYK:5,5:"CMYK"}),RI=Object.freeze({Perceptual:0,0:"Perceptual",RelativeColorimetric:1,1:"RelativeColorimetric",Saturation:2,2:"Saturation",AbsoluteColorimetric:3,3:"AbsoluteColorimetric"});m8=class m8{static#P=new Uint8ClampedArray(3);constructor(P,Z){this.name=P,this.numComps=Z}getRgb(P,Z,q=new Uint8ClampedArray(3)){return this.getRgbItem(P,Z,q,0),q}getRgbHex(P,Z){let q=this.getRgb(P,Z,m8.#P);return s1.makeHexColor(q[0],q[1],q[2])}getRgbItem(P,Z,q,X){O1("Should not call ColorSpace.getRgbItem")}getRgbBuffer(P,Z,q,X,z,R,f){O1("Should not call ColorSpace.getRgbBuffer")}getOutputLength(P,Z){O1("Should not call ColorSpace.getOutputLength")}isPassthrough(P){return!1}isDefaultDecode(P,Z){return m8.isDefaultDecode(P,this.numComps)}fillRgb(P,Z,q,X,z,R,f,G,Q){let Y=Z*q,W=null,$=1<<f,_=q!==z||Z!==X;if(this.isPassthrough(f))W=G;else if(this.numComps===1&&Y>$&&this.name!=="DeviceGray"&&this.name!=="DeviceRGB"){let J=f<=8?new Uint8Array($):new Uint16Array($);for(let K=0;K<$;K++)J[K]=K;let U=new Uint8ClampedArray(3*$);if(this.getRgbBuffer(J,0,$,U,0,f,0),_){W=new Uint8Array(3*Y);let K=0;for(let I=0;I<Y;++I){let B=3*G[I];W[K++]=U[B],W[K++]=U[B+1],W[K++]=U[B+2]}}else{let K=0;for(let I=0;I<Y;++I){let B=3*G[I];P[K++]=U[B],P[K++]=U[B+1],P[K++]=U[B+2],K+=Q}}}else _?(W=new Uint8ClampedArray(3*Y),this.getRgbBuffer(G,0,Y,W,0,f,0)):this.getRgbBuffer(G,0,X*R,P,0,f,Q);if(W)if(_)(function(J,U,K,I,B,j,V){V=V!==1?0:V;let H=K/B,M=I/j,x,A=0,k=new Uint16Array(B),b=3*K;for(let O=0;O<B;O++)k[O]=3*Math.floor(O*H);for(let O=0;O<j;O++){let p=Math.floor(O*M)*b;for(let D=0;D<B;D++)x=p+k[D],U[A++]=J[x++],U[A++]=J[x++],U[A++]=J[x++],A+=V}})(W,P,Z,q,X,z,Q);else{let J=0,U=0;for(let K=0,I=X*R;K<I;K++)P[J++]=W[U++],P[J++]=W[U++],P[J++]=W[U++],J+=Q}}get usesZeroToOneRange(){return q1(this,"usesZeroToOneRange",!0)}static isDefaultDecode(P,Z){if(!Array.isArray(P))return!0;if(2*Z!==P.length)return v("The decode map is not the correct length"),!0;for(let q=0,X=P.length;q<X;q+=2)if(P[q]!==0||P[q+1]!==1)return!1;return!0}};Nf=class Nf extends m8{constructor(P,Z,q){super("Alternate",P),this.base=Z,this.tintFn=q,this.tmpBuf=new Float32Array(Z.numComps)}getRgbItem(P,Z,q,X){let z=this.tmpBuf;this.tintFn(P,Z,z,0),this.base.getRgbItem(z,0,q,X)}getRgbBuffer(P,Z,q,X,z,R,f){let G=this.tintFn,Q=this.base,Y=1/((1<<R)-1),W=Q.numComps,$=Q.usesZeroToOneRange,_=(Q.isPassthrough(8)||!$)&&f===0,J=_?z:0,U=_?X:new Uint8ClampedArray(W*q),K=this.numComps,I=new Float32Array(K),B=new Float32Array(W),j,V;for(j=0;j<q;j++){for(V=0;V<K;V++)I[V]=P[Z++]*Y;if(G(I,0,B,0),$)for(V=0;V<W;V++)U[J++]=255*B[V];else Q.getRgbItem(B,0,U,J),J+=W}_||Q.getRgbBuffer(U,0,q,X,z,8,f)}getOutputLength(P,Z){return this.base.getOutputLength(P*this.base.numComps/this.numComps,Z)}};r9=class r9 extends m8{constructor(P){super("Pattern",null),this.base=P}isDefaultDecode(P,Z){O1("Should not call PatternCS.isDefaultDecode")}};vf=class vf extends m8{constructor(P,Z,q){super("Indexed",1),this.base=P,this.highVal=Z;let X=P.numComps*(Z+1);if(this.lookup=new Uint8Array(X),q instanceof T1){let z=q.getBytes(X);this.lookup.set(z)}else{if(typeof q!="string")throw new s(`IndexedCS - unrecognized lookup table: ${q}`);for(let z=0;z<X;++z)this.lookup[z]=255&q.charCodeAt(z)}}getRgbItem(P,Z,q,X){let{base:z,highVal:R,lookup:f}=this,G=E8(Math.round(P[Z]),0,R)*z.numComps;z.getRgbBuffer(f,G,1,q,X,8,0)}getRgbBuffer(P,Z,q,X,z,R,f){let{base:G,highVal:Q,lookup:Y}=this,{numComps:W}=G,$=G.getOutputLength(W,f);for(let _=0;_<q;++_){let J=E8(Math.round(P[Z++]),0,Q)*W;G.getRgbBuffer(Y,J,1,X,z,8,f),z+=$}}getOutputLength(P,Z){return this.base.getOutputLength(P*this.base.numComps,Z)}isDefaultDecode(P,Z){return!Array.isArray(P)||(P.length!==2?(v("Decode map length is not correct"),!0):!Number.isInteger(Z)||Z<1?(v("Bits per component is not correct"),!0):P[0]===0&&P[1]===(1<<Z)-1)}};Ff=class Ff extends m8{constructor(){super("DeviceGray",1)}getRgbItem(P,Z,q,X){let z=255*P[Z];q[X]=q[X+1]=q[X+2]=z}getRgbBuffer(P,Z,q,X,z,R,f){let G=255/((1<<R)-1),Q=Z,Y=z;for(let W=0;W<q;++W){let $=G*P[Q++];X[Y++]=$,X[Y++]=$,X[Y++]=$,Y+=f}}getOutputLength(P,Z){return P*(3+Z)}};Sf=class Sf extends m8{constructor(){super("DeviceRGB",3)}getRgbItem(P,Z,q,X){q[X]=255*P[Z],q[X+1]=255*P[Z+1],q[X+2]=255*P[Z+2]}getRgbBuffer(P,Z,q,X,z,R,f){if(R===8&&f===0)return void X.set(P.subarray(Z,Z+3*q),z);let G=255/((1<<R)-1),Q=Z,Y=z;for(let W=0;W<q;++W)X[Y++]=G*P[Q++],X[Y++]=G*P[Q++],X[Y++]=G*P[Q++],Y+=f}getOutputLength(P,Z){return P*(3+Z)/3|0}isPassthrough(P){return P===8}};mf=class mf extends m8{constructor(){super("DeviceRGBA",4)}getOutputLength(P,Z){return 4*P}isPassthrough(P){return P===8}fillRgb(P,Z,q,X,z,R,f,G,Q){q!==z||Z!==X?function(Y,W,$,_,J,U,K){let I=$/J,B=_/U,j=0,V=new Uint16Array(J);if(K===1){for(let A=0;A<J;A++)V[A]=Math.floor(A*I);let H=new Uint32Array(Y.buffer),M=new Uint32Array(W.buffer),x=P0.isLittleEndian?16777215:4294967040;for(let A=0;A<U;A++){let k=H.subarray(Math.floor(A*B)*$);for(let b=0;b<J;b++)M[j++]|=k[V[b]]&x}}else{let M=$*4;for(let x=0;x<J;x++)V[x]=Math.floor(x*I)*4;for(let x=0;x<U;x++){let A=Y.subarray(Math.floor(x*B)*M);for(let k=0;k<J;k++){let b=V[k];W[j++]=A[b],W[j++]=A[b+1],W[j++]=A[b+2]}}}}(G,P,Z,q,X,z,Q):function(Y,W,$){if($===1){let _=new Uint32Array(Y.buffer),J=new Uint32Array(W.buffer),U=P0.isLittleEndian?16777215:4294967040;for(let K=0,I=_.length;K<I;K++)J[K]|=_[K]&U}else{let _=0;for(let J=0,U=Y.length;J<U;J+=4)W[_++]=Y[J],W[_++]=Y[J+1],W[_++]=Y[J+2]}}(G,P,Q)}};Xq=class Xq extends m8{constructor(){super("DeviceCMYK",4)}#P(P,Z,q,X,z){let R=P[Z]*q,f=P[Z+1]*q,G=P[Z+2]*q,Q=P[Z+3]*q;X[z]=255+R*(-4.387332384609988*R+54.48615194189176*f+18.82290502165302*G+212.25662451639585*Q-285.2331026137004)+f*(1.7149763477362134*f-5.6096736904047315*G+-17.873870861415444*Q-5.497006427196366)+G*(-2.5217340131683033*G-21.248923337353073*Q+17.5119270841813)+Q*(-21.86122147463605*Q-189.48180835922747),X[z+1]=255+R*(8.841041422036149*R+60.118027045597366*f+6.871425592049007*G+31.159100130055922*Q-79.2970844816548)+f*(-15.310361306967817*f+17.575251261109482*G+131.35250912493976*Q-190.9453302588951)+G*(4.444339102852739*G+9.8632861493405*Q-24.86741582555878)+Q*(-20.737325471181034*Q-187.80453709719578),X[z+2]=255+R*(0.8842522430003296*R+8.078677503112928*f+30.89978309703729*G-0.23883238689178934*Q-14.183576799673286)+f*(10.49593273432072*f+63.02378494754052*G+50.606957656360734*Q-112.23884253719248)+G*(0.03296041114873217*G+115.60384449646641*Q-193.58209356861505)+Q*(-22.33816807309886*Q-180.12613974708367)}getRgbItem(P,Z,q,X){this.#P(P,Z,1,q,X)}getRgbBuffer(P,Z,q,X,z,R,f){let G=1/((1<<R)-1);for(let Q=0;Q<q;Q++)this.#P(P,Z,G,X,z),Z+=4,z+=3+f}getOutputLength(P,Z){return P/4*(3+Z)|0}};pf=class pf extends m8{constructor(P,Z,q){if(super("CalGray",1),!P)throw new s("WhitePoint missing - required for color space CalGray");if([this.XW,this.YW,this.ZW]=P,[this.XB,this.YB,this.ZB]=Z||[0,0,0],this.G=q||1,this.XW<0||this.ZW<0||this.YW!==1)throw new s(`Invalid WhitePoint components for ${this.name}, no fallback available`);(this.XB<0||this.YB<0||this.ZB<0)&&(v1(`Invalid BlackPoint for ${this.name}, falling back to default.`),this.XB=this.YB=this.ZB=0),this.XB===0&&this.YB===0&&this.ZB===0||v(`${this.name}, BlackPoint: XB: ${this.XB}, YB: ${this.YB}, ZB: ${this.ZB}, only default values are supported.`),this.G<1&&(v1(`Invalid Gamma: ${this.G} for ${this.name}, falling back to default.`),this.G=1)}#P(P,Z,q,X,z){let R=(P[Z]*z)**this.G,f=this.YW*R,G=Math.max(295.8*f**0.3333333333333333-40.8,0);q[X]=G,q[X+1]=G,q[X+2]=G}getRgbItem(P,Z,q,X){this.#P(P,Z,q,X,1)}getRgbBuffer(P,Z,q,X,z,R,f){let G=1/((1<<R)-1);for(let Q=0;Q<q;++Q)this.#P(P,Z,X,z,G),Z+=1,z+=3+f}getOutputLength(P,Z){return P*(3+Z)}};c8=class c8 extends m8{static#P=new Float32Array([0.8951,0.2664,-0.1614,-0.7502,1.7135,0.0367,0.0389,-0.0685,1.0296]);static#Z=new Float32Array([0.9869929,-0.1470543,0.1599627,0.4323053,0.5183603,0.0492912,-0.0085287,0.0400428,0.9684867]);static#X=new Float32Array([3.2404542,-1.5371385,-0.4985314,-0.969266,1.8760108,0.041556,0.0556434,-0.2040259,1.0572252]);static#q=new Float32Array([1,1,1]);static#z=new Float32Array(3);static#R=new Float32Array(3);static#G=new Float32Array(3);static#f=0.0011070564598794539;constructor(P,Z,q,X){if(super("CalRGB",3),!P)throw new s("WhitePoint missing - required for color space CalRGB");let[z,R,f]=this.whitePoint=P,[G,Q,Y]=this.blackPoint=Z||new Float32Array(3);if([this.GR,this.GG,this.GB]=q||new Float32Array([1,1,1]),[this.MXA,this.MYA,this.MZA,this.MXB,this.MYB,this.MZB,this.MXC,this.MYC,this.MZC]=X||new Float32Array([1,0,0,0,1,0,0,0,1]),z<0||f<0||R!==1)throw new s(`Invalid WhitePoint components for ${this.name}, no fallback available`);(G<0||Q<0||Y<0)&&(v1(`Invalid BlackPoint for ${this.name} [${G}, ${Q}, ${Y}], falling back to default.`),this.blackPoint=new Float32Array(3)),(this.GR<0||this.GG<0||this.GB<0)&&(v1(`Invalid Gamma [${this.GR}, ${this.GG}, ${this.GB}] for ${this.name}, falling back to default.`),this.GR=this.GG=this.GB=1)}#Q(P,Z,q){q[0]=P[0]*Z[0]+P[1]*Z[1]+P[2]*Z[2],q[1]=P[3]*Z[0]+P[4]*Z[1]+P[5]*Z[2],q[2]=P[6]*Z[0]+P[7]*Z[1]+P[8]*Z[2]}#Y(P,Z,q){q[0]=1*Z[0]/P[0],q[1]=1*Z[1]/P[1],q[2]=1*Z[2]/P[2]}#_(P,Z,q){q[0]=0.95047*Z[0]/P[0],q[1]=1*Z[1]/P[1],q[2]=1.08883*Z[2]/P[2]}#$(P){return P<=0.0031308?E8(12.92*P,0,1):P>=0.99554525?1:E8(1.055*P**0.4166666666666667-0.055,0,1)}#J(P){return P<0?-this.#J(-P):P>8?((P+16)/116)**3:P*c8.#f}#B(P,Z,q){if(P[0]===0&&P[1]===0&&P[2]===0)return q[0]=Z[0],q[1]=Z[1],void(q[2]=Z[2]);let X=this.#J(0),z=(1-X)/(1-this.#J(P[0])),R=1-z,f=(1-X)/(1-this.#J(P[1])),G=1-f,Q=(1-X)/(1-this.#J(P[2])),Y=1-Q;q[0]=Z[0]*z+R,q[1]=Z[1]*f+G,q[2]=Z[2]*Q+Y}#K(P,Z,q){if(P[0]===1&&P[2]===1)return q[0]=Z[0],q[1]=Z[1],void(q[2]=Z[2]);let X=q;this.#Q(c8.#P,Z,X);let z=c8.#z;this.#Y(P,X,z),this.#Q(c8.#Z,z,q)}#W(P,Z,q){let X=q;this.#Q(c8.#P,Z,X);let z=c8.#z;this.#_(P,X,z),this.#Q(c8.#Z,z,q)}#U(P,Z,q,X,z){let R=E8(P[Z]*z,0,1),f=E8(P[Z+1]*z,0,1),G=E8(P[Z+2]*z,0,1),Q=R===1?1:R**this.GR,Y=f===1?1:f**this.GG,W=G===1?1:G**this.GB,$=this.MXA*Q+this.MXB*Y+this.MXC*W,_=this.MYA*Q+this.MYB*Y+this.MYC*W,J=this.MZA*Q+this.MZB*Y+this.MZC*W,U=c8.#R;U[0]=$,U[1]=_,U[2]=J;let K=c8.#G;this.#K(this.whitePoint,U,K);let I=c8.#R;this.#B(this.blackPoint,K,I);let B=c8.#G;this.#W(c8.#q,I,B);let j=c8.#R;this.#Q(c8.#X,B,j),q[X]=255*this.#$(j[0]),q[X+1]=255*this.#$(j[1]),q[X+2]=255*this.#$(j[2])}getRgbItem(P,Z,q,X){this.#U(P,Z,q,X,1)}getRgbBuffer(P,Z,q,X,z,R,f){let G=1/((1<<R)-1);for(let Q=0;Q<q;++Q)this.#U(P,Z,X,z,G),Z+=3,z+=3+f}getOutputLength(P,Z){return P*(3+Z)/3|0}};Of=class Of extends m8{constructor(P,Z,q){if(super("Lab",3),!P)throw new s("WhitePoint missing - required for color space Lab");if([this.XW,this.YW,this.ZW]=P,[this.amin,this.amax,this.bmin,this.bmax]=q||[-100,100,-100,100],[this.XB,this.YB,this.ZB]=Z||[0,0,0],this.XW<0||this.ZW<0||this.YW!==1)throw new s("Invalid WhitePoint components, no fallback available");(this.XB<0||this.YB<0||this.ZB<0)&&(v1("Invalid BlackPoint, falling back to default"),this.XB=this.YB=this.ZB=0),(this.amin>this.amax||this.bmin>this.bmax)&&(v1("Invalid Range, falling back to defaults"),this.amin=-100,this.amax=100,this.bmin=-100,this.bmax=100)}#P(P){return P>=0.20689655172413793?P**3:0.12841854934601665*(P-0.13793103448275862)}#Z(P,Z,q,X){return q+P*(X-q)/Z}#X(P,Z,q,X,z){let R=P[Z],f=P[Z+1],G=P[Z+2];q!==!1&&(R=this.#Z(R,q,0,100),f=this.#Z(f,q,this.amin,this.amax),G=this.#Z(G,q,this.bmin,this.bmax)),f>this.amax?f=this.amax:f<this.amin&&(f=this.amin),G>this.bmax?G=this.bmax:G<this.bmin&&(G=this.bmin);let Q=(R+16)/116,Y=Q+f/500,W=Q-G/200,$=this.XW*this.#P(Y),_=this.YW*this.#P(Q),J=this.ZW*this.#P(W),U,K,I;this.ZW<1?(U=3.1339*$+-1.617*_+-0.4906*J,K=-0.9785*$+1.916*_+0.0333*J,I=0.072*$+-0.229*_+1.4057*J):(U=3.2406*$+-1.5372*_+-0.4986*J,K=-0.9689*$+1.8758*_+0.0415*J,I=0.0557*$+-0.204*_+1.057*J),X[z]=255*Math.sqrt(U),X[z+1]=255*Math.sqrt(K),X[z+2]=255*Math.sqrt(I)}getRgbItem(P,Z,q,X){this.#X(P,Z,!1,q,X)}getRgbBuffer(P,Z,q,X,z,R,f){let G=(1<<R)-1;for(let Q=0;Q<q;Q++)this.#X(P,Z,G,X,z),Z+=3,z+=3+f}getOutputLength(P,Z){return P*(3+Z)/3|0}isDefaultDecode(P,Z){return!0}get usesZeroToOneRange(){return q1(this,"usesZeroToOneRange",!1)}};M4=class M4 extends m8{#P;#Z;static#X=!0;static#q=null;static#z=null;constructor(P,Z,q){if(!M4.isUsable)throw Error("No ICC color space support");let X;switch(super(Z,q),q){case 1:X=hP.Gray8,this.#Z=(z,R,f)=>function(G,Q,Y){i8.qcms_convert_one(G,Q,Y)}(this.#P,255*z[R],f);break;case 3:X=hP.RGB8,this.#Z=(z,R,f)=>function(G,Q,Y,W,$){i8.qcms_convert_three(G,Q,Y,W,$)}(this.#P,255*z[R],255*z[R+1],255*z[R+2],f);break;case 4:X=hP.CMYK,this.#Z=(z,R,f)=>function(G,Q,Y,W,$,_){i8.qcms_convert_four(G,Q,Y,W,$,_)}(this.#P,255*z[R],255*z[R+1],255*z[R+2],255*z[R+3],f);break;default:throw Error(`Unsupported number of components: ${q}`)}if(this.#P=function(z,R,f){let G=qz(z,i8.__wbindgen_malloc),Q=h9;return i8.qcms_transformer_from_memory(G,Q,R,f)>>>0}(P,X,RI.Perceptual),!this.#P)throw Error("Failed to create ICC color space");M4.#z||=new FinalizationRegistry((z)=>{(function(R){i8.qcms_drop_transformer(R)})(z)}),M4.#z.register(this,this.#P)}getRgbHex(P,Z){return this.#Z(P,Z,!0),L8._cssColor}getRgbItem(P,Z,q,X){L8._destBuffer=q,L8._destOffset=X,L8._destLength=3,this.#Z(P,Z,!1),L8._destBuffer=null}getRgbBuffer(P,Z,q,X,z,R,f){if(P=P.subarray(Z,Z+q*this.numComps),R!==8){let G=255/((1<<R)-1);for(let Q=0,Y=P.length;Q<Y;Q++)P[Q]*=G}L8._mustAddAlpha=f&&X.buffer===P.buffer,L8._destBuffer=X,L8._destOffset=z,L8._destLength=q*(3+f),function(G,Q){let Y=qz(Q,i8.__wbindgen_malloc),W=h9;i8.qcms_convert_array(G,Y,W)}(this.#P,P),L8._mustAddAlpha=!1,L8._destBuffer=null}getOutputLength(P,Z){return P/this.numComps*(3+Z)|0}static setOptions({useWasm:P,useWorkerFetch:Z,wasmUrl:q}){Z?(this.#X=P,this.#q=q):this.#X=!1}static get isUsable(){let P=!1;if(this.#X)if(this.#q)try{this._module=GI({module:yf(`${this.#q}qcms_bg.wasm`)}),P=!!this._module,L8._memory=this._module.memory,L8._makeHexColor=s1.makeHexColor}catch(Z){v(`ICCBased color space: "${Z}".`)}else v("No ICC color space support due to missing `wasmUrl` API option");return q1(this,"isUsable",P)}};T7=class T7 extends M4{static#P;constructor(){super(new Uint8Array(yf(`${T7.#P}CGATS001Compat-v2-micro.icc`)),"DeviceCMYK",4)}static setOptions({iccUrl:P}){this.#P=P}static get isUsable(){let P=!1;return M4.isUsable&&(this.#P?P=!0:v("No CMYK ICC profile support due to missing `iccUrl` API option")),q1(this,"isUsable",P)}};Y8=class Y8 extends T1{constructor(P,Z,q,X){super(),this.bytes=P instanceof Uint8Array?P:new Uint8Array(P),this.start=Z||0,this.pos=this.start,this.end=Z+q||this.bytes.length,this.dict=X}get length(){return this.end-this.start}get isEmpty(){return this.length===0}getByte(){return this.pos>=this.end?-1:this.bytes[this.pos++]}getBytes(P){let Z=this.bytes,q=this.pos,X=this.end;if(!P)return Z.subarray(q,X);let z=q+P;return z>X&&(z=X),this.pos=z,Z.subarray(q,z)}getByteRange(P,Z){return P<0&&(P=0),Z>this.end&&(Z=this.end),this.bytes.subarray(P,Z)}reset(){this.pos=this.start}moveStart(){this.start=this.pos}makeSubStream(P,Z,q=null){return new Y8(this.bytes.buffer,P,Z,q)}};o8=class o8 extends Y8{constructor(P){super(w8(P))}};A3=class A3 extends Y8{constructor(){super(new Uint8Array(0))}};Df=class Df extends Y8{constructor(P,Z,q){super(new Uint8Array(P),0,P,null),this.chunkSize=Z,this._loadedChunks=new Set,this.numChunks=Math.ceil(P/Z),this.manager=q,this.progressiveDataLength=0,this.lastSuccessfulEnsureByteChunk=-1}getMissingChunks(){let P=[];for(let Z=0,q=this.numChunks;Z<q;++Z)this._loadedChunks.has(Z)||P.push(Z);return P}get numChunksLoaded(){return this._loadedChunks.size}get isDataLoaded(){return this.numChunksLoaded===this.numChunks}onReceiveData(P,Z){let q=this.chunkSize;if(P%q!==0)throw Error(`Bad begin offset: ${P}`);let X=P+Z.byteLength;if(X%q!==0&&X!==this.bytes.length)throw Error(`Bad end offset: ${X}`);this.bytes.set(new Uint8Array(Z),P);let z=Math.floor(P/q),R=Math.floor((X-1)/q)+1;for(let f=z;f<R;++f)this._loadedChunks.add(f)}onReceiveProgressiveData(P){let Z=this.progressiveDataLength,q=Math.floor(Z/this.chunkSize);this.bytes.set(new Uint8Array(P),Z),Z+=P.byteLength,this.progressiveDataLength=Z;let X=Z>=this.end?this.numChunks:Math.floor(Z/this.chunkSize);for(let z=q;z<X;++z)this._loadedChunks.add(z)}ensureByte(P){if(P<this.progressiveDataLength)return;let Z=Math.floor(P/this.chunkSize);if(!(Z>this.numChunks)&&Z!==this.lastSuccessfulEnsureByteChunk){if(!this._loadedChunks.has(Z))throw new q8(P,P+1);this.lastSuccessfulEnsureByteChunk=Z}}ensureRange(P,Z){if(P>=Z)return;if(Z<=this.progressiveDataLength)return;let q=Math.floor(P/this.chunkSize);if(q>this.numChunks)return;let X=Math.min(Math.floor((Z-1)/this.chunkSize)+1,this.numChunks);for(let z=q;z<X;++z)if(!this._loadedChunks.has(z))throw new q8(P,Z)}nextEmptyChunk(P){let Z=this.numChunks;for(let q=0;q<Z;++q){let X=(P+q)%Z;if(!this._loadedChunks.has(X))return X}return null}hasChunk(P){return this._loadedChunks.has(P)}getByte(){let P=this.pos;return P>=this.end?-1:(P>=this.progressiveDataLength&&this.ensureByte(P),this.bytes[this.pos++])}getBytes(P){let Z=this.bytes,q=this.pos,X=this.end;if(!P)return X>this.progressiveDataLength&&this.ensureRange(q,X),Z.subarray(q,X);let z=q+P;return z>X&&(z=X),z>this.progressiveDataLength&&this.ensureRange(q,z),this.pos=z,Z.subarray(q,z)}getByteRange(P,Z){return P<0&&(P=0),Z>this.end&&(Z=this.end),Z>this.progressiveDataLength&&this.ensureRange(P,Z),this.bytes.subarray(P,Z)}makeSubStream(P,Z,q=null){function X(){}Z?P+Z>this.progressiveDataLength&&this.ensureRange(P,P+Z):P>=this.progressiveDataLength&&this.ensureByte(P),X.prototype=Object.create(this),X.prototype.getMissingChunks=function(){let R=this.chunkSize,f=Math.floor(this.start/R),G=Math.floor((this.end-1)/R)+1,Q=[];for(let Y=f;Y<G;++Y)this._loadedChunks.has(Y)||Q.push(Y);return Q},Object.defineProperty(X.prototype,"isDataLoaded",{get(){return this.numChunksLoaded===this.numChunks||this.getMissingChunks().length===0},configurable:!0});let z=new X;return z.pos=z.start=P,z.end=P+Z||this.end,z.dict=q,z}getBaseStreams(){return[this]}};G0=class G0{static#P=2048;static#Z=P0.isImageDecoderSupported;constructor(P,Z){this._imgData=P,this._isMask=Z}static get canUseImageDecoder(){return q1(this,"canUseImageDecoder",this.#Z?ImageDecoder.isTypeSupported("image/bmp"):Promise.resolve(!1))}static needsToBeResized(P,Z){if(P<=this.#P&&Z<=this.#P)return!1;let{MAX_DIM:q}=this;if(P>q||Z>q)return!0;let X=P*Z;if(this._hasMaxArea)return X>this.MAX_AREA;if(X<this.#P**2)return!1;if(this._areGoodDims(P,Z))return this.#P=Math.max(this.#P,Math.floor(Math.sqrt(P*Z))),!1;return this.#P=this._guessMax(this.#P,q,128,0),X>(this.MAX_AREA=this.#P**2)}static getReducePowerForJPX(P,Z,q){let X=P*Z,z=1073741824/(4*q);if(!this.needsToBeResized(P,Z))return X>z?Math.ceil(Math.log2(X/z)):0;let{MAX_DIM:R,MAX_AREA:f}=this,G=Math.max(P/R,Z/R,Math.sqrt(X/Math.min(z,f)));return Math.ceil(Math.log2(G))}static get MAX_DIM(){return q1(this,"MAX_DIM",this._guessMax(2048,65537,0,1))}static get MAX_AREA(){return this._hasMaxArea=!0,q1(this,"MAX_AREA",this._guessMax(this.#P,this.MAX_DIM,128,0)**2)}static set MAX_AREA(P){P>=0&&(this._hasMaxArea=!0,q1(this,"MAX_AREA",P))}static setOptions({canvasMaxAreaInBytes:P=-1,isImageDecoderSupported:Z=!1}){this._hasMaxArea||(this.MAX_AREA=P>>2),this.#Z=Z}static _areGoodDims(P,Z){try{let q=new OffscreenCanvas(P,Z),X=q.getContext("2d");X.fillRect(0,0,1,1);let z=X.getImageData(0,0,1,1).data[3];return q.width=q.height=1,z!==0}catch{return!1}}static _guessMax(P,Z,q,X){for(;P+q+1<Z;){let z=Math.floor((P+Z)/2),R=X||z;this._areGoodDims(z,R)?P=z:Z=z}return P}static async createImage(P,Z=!1){return new G0(P,Z)._createImage()}async _createImage(){let{_imgData:P}=this,{width:Z,height:q}=P;if(Z*q*4>u9){let B=this.#X();if(B)return B}let X=this._encodeBMP(),z,R;await G0.canUseImageDecoder?(z=new ImageDecoder({data:X,type:"image/bmp",preferAnimation:!1,transfer:[X.buffer]}),R=z.decode().catch((B)=>(v(`BMP image decoding failed: ${B}`),createImageBitmap(new Blob([this._encodeBMP().buffer],{type:"image/bmp"})))).finally(()=>{z.close()})):R=createImageBitmap(new Blob([X.buffer],{type:"image/bmp"}));let{MAX_AREA:f,MAX_DIM:G}=G0,Q=Math.max(Z/G,q/G,Math.sqrt(Z*q/f)),Y=Math.max(Q,2),W=Math.round(10*(Q+1.25))/10/Y,$=Math.floor(Math.log2(W)),_=Array($+2).fill(2);_[0]=Y,_.splice(-1,1,W/(1<<$));let J=Z,U=q,K=await R,I=K.image||K;for(let B of _){let j=J,V=U;J=Math.floor(J/B)-1,U=Math.floor(U/B)-1;let H=new OffscreenCanvas(J,U);H.getContext("2d").drawImage(I,0,0,j,V,0,0,J,U),I.close(),I=H.transferToImageBitmap()}return P.data=null,P.bitmap=I,P.width=J,P.height=U,P}#X(){let{_imgData:P}=this,{data:Z,width:q,height:X,kind:z}=P,R=q*X*4,f=Math.ceil(Math.log2(R/u9)),G=q>>f,Q=X>>f,Y,W=X;try{Y=new Uint8Array(R)}catch{let j=Math.floor(Math.log2(R+1));for(;;)try{Y=new Uint8Array(2**j-1);break}catch{j-=1}W=Math.floor((2**j-1)/(4*q));let V=q*W*4;V<Y.length&&(Y=new Uint8Array(V))}let $=new Uint32Array(Y.buffer),_=new Uint32Array(G*Q),J=0,U=0,K=Math.ceil(X/W),I=X%W===0?X:X%W;for(let j=0;j<K;j++){let V=j<K-1?W:I;({srcPos:J}=Ef({kind:z,src:Z,dest:$,width:q,height:V,inverseDecode:this._isMask,srcPos:J}));for(let H=0,M=V>>f;H<M;H++){let x=$.subarray((H<<f)*q);for(let A=0;A<G;A++)_[U++]=x[A<<f]}}if(G0.needsToBeResized(G,Q))return P.data=_,P.width=G,P.height=Q,P.kind=J4,null;let B=new OffscreenCanvas(G,Q);return B.getContext("2d",{willReadFrequently:!0}).putImageData(new ImageData(new Uint8ClampedArray(_.buffer),G,Q),0,0),P.data=null,P.bitmap=B.transferToImageBitmap(),P.width=G,P.height=Q,P}_encodeBMP(){let{width:P,height:Z,kind:q}=this._imgData,X,z=this._imgData.data,R=new Uint8Array(0),f=R,G=0;switch(q){case q3:{X=1,R=new Uint8Array(this._isMask?[255,255,255,255,0,0,0,0]:[0,0,0,0,255,255,255,255]);let U=P+7>>3,K=U+3&-4;if(U!==K){let I=new Uint8Array(K*Z),B=0;for(let j=0,V=Z*U;j<V;j+=U,B+=K)I.set(z.subarray(j,j+U),B);z=I}break}case Y7:if(X=24,3&P){let U=3*P,K=U+3&-4,I=K-U,B=new Uint8Array(K*Z),j=0;for(let V=0,H=Z*U;V<H;V+=U){let M=z.subarray(V,V+U);for(let x=0;x<U;x+=3)B[j++]=M[x+2],B[j++]=M[x+1],B[j++]=M[x];j+=I}z=B}else for(let U=0,K=z.length;U<K;U+=3){let I=z[U];z[U]=z[U+2],z[U+2]=I}break;case J4:X=32,G=3,f=new Uint8Array(68);let J=new DataView(f.buffer);P0.isLittleEndian?(J.setUint32(0,255,!0),J.setUint32(4,65280,!0),J.setUint32(8,16711680,!0),J.setUint32(12,4278190080,!0)):(J.setUint32(0,4278190080,!0),J.setUint32(4,16711680,!0),J.setUint32(8,65280,!0),J.setUint32(12,255,!0));break;default:throw Error("invalid format")}let Q=0,Y=40+f.length,W=14+Y+R.length+z.length,$=new Uint8Array(W),_=new DataView($.buffer);return _.setUint16(Q,19778,!0),Q+=2,_.setUint32(Q,W,!0),Q+=4,_.setUint32(Q,0,!0),Q+=4,_.setUint32(Q,14+Y+R.length,!0),Q+=4,_.setUint32(Q,Y,!0),Q+=4,_.setInt32(Q,P,!0),Q+=4,_.setInt32(Q,-Z,!0),Q+=4,_.setUint16(Q,1,!0),Q+=2,_.setUint16(Q,X,!0),Q+=2,_.setUint32(Q,G,!0),Q+=4,_.setUint32(Q,0,!0),Q+=4,_.setInt32(Q,0,!0),Q+=4,_.setInt32(Q,0,!0),Q+=4,_.setUint32(Q,R.length/4,!0),Q+=4,_.setUint32(Q,0,!0),Q+=4,$.set(f,Q),Q+=f.length,$.set(R,Q),Q+=R.length,$.set(z,Q),$}};QI=new Uint8Array(0);a8=class a8 extends T1{constructor(P){if(super(),this._rawMinBufferLength=P||0,this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=QI,this.minBufferLength=512,P)for(;this.minBufferLength<P;)this.minBufferLength*=2}get isEmpty(){for(;!this.eof&&this.bufferLength===0;)this.readBlock();return this.bufferLength===0}ensureBuffer(P){let Z=this.buffer;if(P<=Z.byteLength)return Z;let q=this.minBufferLength;for(;q<P;)q*=2;let X=new Uint8Array(q);return X.set(Z),this.buffer=X}getByte(){let P=this.pos;for(;this.bufferLength<=P;){if(this.eof)return-1;this.readBlock()}return this.buffer[this.pos++]}getBytes(P,Z=null){let q=this.pos,X;if(P){for(this.ensureBuffer(q+P),X=q+P;!this.eof&&this.bufferLength<X;)this.readBlock(Z);let z=this.bufferLength;X>z&&(X=z)}else{for(;!this.eof;)this.readBlock(Z);X=this.bufferLength}return this.pos=X,this.buffer.subarray(q,X)}async getImageData(P,Z){if(!this.canAsyncDecodeImageFromBuffer)return this.isAsyncDecoder?this.decodeImage(null,Z):this.getBytes(P,Z);let q=await this.stream.asyncGetBytes();return this.decodeImage(q,Z)}reset(){this.pos=0}makeSubStream(P,Z,q=null){if(Z===void 0)for(;!this.eof;)this.readBlock();else{let X=P+Z;for(;this.bufferLength<=X&&!this.eof;)this.readBlock()}return new Y8(this.buffer,P,Z,q)}getBaseStreams(){return this.str?this.str.getBaseStreams():null}};uf=class uf extends a8{constructor(P,Z=null){P=P.filter((X)=>X instanceof T1);let q=0;for(let X of P)q+=X instanceof a8?X._rawMinBufferLength:X.length;super(q),this.streams=P,this._onError=Z}readBlock(){let P=this.streams;if(P.length===0)return void(this.eof=!0);let Z=P.shift(),q;try{q=Z.getBytes()}catch(R){if(this._onError)return void this._onError(R,Z.dict?.objId);throw R}let X=this.bufferLength,z=X+q.length;this.ensureBuffer(z).set(q,X),this.bufferLength=z}getBaseStreams(){let P=[];for(let Z of this.streams){let q=Z.getBaseStreams();q&&P.push(...q)}return P.length>0?P:null}};I0=class I0 extends Z0{constructor(P){super(P,"JpegError")}};L3=class L3 extends Z0{constructor(P,Z){super(P,"DNLMarkerError"),this.scanLines=Z}};zq=class zq extends Z0{constructor(P){super(P,"EOIMarkerError")}};$7=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);v6=class v6 extends a8{static#P=P0.isImageDecoderSupported;constructor(P,Z,q){super(Z),this.stream=P,this.dict=P.dict,this.maybeLength=Z,this.params=q}static get canUseImageDecoder(){return q1(this,"canUseImageDecoder",this.#P?ImageDecoder.isTypeSupported("image/jpeg"):Promise.resolve(!1))}static setOptions({isImageDecoderSupported:P=!1}){this.#P=P}get bytes(){return q1(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(P){}readBlock(){this.decodeImage()}get jpegOptions(){let P={decodeTransform:void 0,colorTransform:void 0},Z=this.dict.getArray("D","Decode");if((this.forceRGBA||this.forceRGB)&&Array.isArray(Z)){let q=this.dict.get("BPC","BitsPerComponent")||8,X=Z.length,z=new Int32Array(X),R=!1,f=(1<<q)-1;for(let G=0;G<X;G+=2)z[G]=256*(Z[G+1]-Z[G])|0,z[G+1]=Z[G]*f|0,z[G]===256&&z[G+1]===0||(R=!0);R&&(P.decodeTransform=z)}if(this.params instanceof S){let q=this.params.get("ColorTransform");Number.isInteger(q)&&(P.colorTransform=q)}return q1(this,"jpegOptions",P)}#Z(P){for(let Z=0,q=P.length-1;Z<q;Z++)if(P[Z]===255&&P[Z+1]===216){Z>0&&(P=P.subarray(Z));break}return P}decodeImage(P){if(this.eof)return this.buffer;P=this.#Z(P||this.bytes);let Z=new a9(this.jpegOptions);Z.parse(P);let q=Z.getData({width:this.drawWidth,height:this.drawHeight,forceRGBA:this.forceRGBA,forceRGB:this.forceRGB,isSourcePDF:!0});return this.buffer=q,this.bufferLength=q.length,this.eof=!0,this.buffer}get canAsyncDecodeImageFromBuffer(){return this.stream.isAsync}async getTransferableImage(){if(!await v6.canUseImageDecoder)return null;let P=this.jpegOptions;if(P.decodeTransform)return null;let Z;try{let q=this.canAsyncDecodeImageFromBuffer&&await this.stream.asyncGetBytes()||this.bytes;if(!q)return null;let X=this.#Z(q),z=a9.canUseImageDecoder(X,P.colorTransform);return z?(z.exifStart&&(X=X.slice(),X.fill(0,z.exifStart,z.exifEnd)),Z=new ImageDecoder({data:X,type:"image/jpeg",preferAnimation:!1}),(await Z.decode()).image):null}catch(q){return v(`getTransferableImage - failed: "${q}".`),null}finally{Z?.close()}}};q7=class q7 extends Z0{constructor(P){super(P,"JpxError")}};J5=[];w6(J5,[O0,$4,B3,Q0],null,function(P,Z){let q=P.fnArray,X=(Z-(P.iCurr-3))%4;switch(X){case 0:return q[Z]===O0;case 1:return q[Z]===$4;case 2:return q[Z]===B3;case 3:return q[Z]===Q0}throw Error(`iterateInlineImageGroup - invalid pos: ${X}`)},function(P,Z){let{fnArray:q,argsArray:X,iCurr:z}=P,R=z-3,f=z-2,G=z-1,Q=Math.min(Math.floor((Z-R)/4),200);if(Q<10)return Z-(Z-R)%4;let Y=0,W=[],$=0,_=1,J=1;for(let V=0;V<Q;V++){let H=X[f+(V<<2)],M=X[G+(V<<2)][0];_+M.width>1000&&(Y=Math.max(Y,_),J+=$+2,_=0,$=0),W.push({transform:H,x:_,y:J,w:M.width,h:M.height}),_+=M.width+2,$=Math.max($,M.height)}let U=Math.max(Y,_)+1,K=J+$+1,I=new Uint8Array(U*K*4),B=U<<2;for(let V=0;V<Q;V++){let H=X[G+(V<<2)][0].data,M=W[V].w<<2,x=0,A=W[V].x+W[V].y*U<<2;I.set(H.subarray(0,M),A-B);for(let k=0,b=W[V].h;k<b;k++)I.set(H.subarray(x,x+M),A),x+=M,A+=B;for(I.set(H.subarray(x-M,x),A);A>=0;)H[A-4]=H[A],H[A-3]=H[A+1],H[A-2]=H[A+2],H[A-1]=H[A+3],H[A+M]=H[A+M-4],H[A+M+1]=H[A+M-3],H[A+M+2]=H[A+M-2],H[A+M+3]=H[A+M-1],A-=B}let j={width:U,height:K};if(P.isOffscreenCanvasSupported){let V=new OffscreenCanvas(U,K);V.getContext("2d").putImageData(new ImageData(new Uint8ClampedArray(I.buffer),U,K),0,0),j.bitmap=V.transferToImageBitmap(),j.data=null}else j.kind=J4,j.data=I;return q.splice(R,4*Q,Bf),X.splice(R,4*Q,[j,W]),R+1}),w6(J5,[O0,$4,I6,Q0],null,function(P,Z){let q=P.fnArray,X=(Z-(P.iCurr-3))%4;switch(X){case 0:return q[Z]===O0;case 1:return q[Z]===$4;case 2:return q[Z]===I6;case 3:return q[Z]===Q0}throw Error(`iterateImageMaskGroup - invalid pos: ${X}`)},function(P,Z){let{fnArray:q,argsArray:X,iCurr:z}=P,R=z-3,f=z-2,G=z-1,Q=Math.floor((Z-R)/4);if(Q<10)return Z-(Z-R)%4;let Y,W,$=!1,_=X[G][0],J=X[f][0],U=X[f][1],K=X[f][2],I=X[f][3];if(U===K){$=!0,Y=f+4;let B=G+4;for(let j=1;j<Q;j++,Y+=4,B+=4)if(W=X[Y],X[B][0]!==_||W[0]!==J||W[1]!==U||W[2]!==K||W[3]!==I){j<10?$=!1:Q=j;break}}if($){Q=Math.min(Q,1000);let B=new Float32Array(2*Q);Y=f;for(let j=0;j<Q;j++,Y+=4)W=X[Y],B[j<<1]=W[4],B[1+(j<<1)]=W[5];q.splice(R,4*Q,hB),X.splice(R,4*Q,[_,J,U,K,I,B])}else{Q=Math.min(Q,100);let B=[];for(let j=0;j<Q;j++){W=X[f+(j<<2)];let V=X[G+(j<<2)][0];B.push({data:V.data,width:V.width,height:V.height,interpolate:V.interpolate,count:V.count,transform:W})}q.splice(R,4*Q,cB),X.splice(R,4*Q,[B])}return R+1}),w6(J5,[O0,$4,w9,Q0],function(P){let Z=P.argsArray,q=P.iCurr-2;return Z[q][1]===0&&Z[q][2]===0},function(P,Z){let{fnArray:q,argsArray:X}=P,z=(Z-(P.iCurr-3))%4;switch(z){case 0:return q[Z]===O0;case 1:if(q[Z]!==$4)return!1;let R=P.iCurr-2,f=X[R][0],G=X[R][3];return X[Z][0]===f&&X[Z][1]===0&&X[Z][2]===0&&X[Z][3]===G;case 2:if(q[Z]!==w9)return!1;let Q=X[P.iCurr-1][0];return X[Z][0]===Q;case 3:return q[Z]===Q0}throw Error(`iterateImageGroup - invalid pos: ${z}`)},function(P,Z){let{fnArray:q,argsArray:X,iCurr:z}=P,R=z-3,f=z-2,G=X[z-1][0],Q=X[f][0],Y=X[f][3],W=Math.min(Math.floor((Z-R)/4),1000);if(W<3)return Z-(Z-R)%4;let $=new Float32Array(2*W),_=f;for(let U=0;U<W;U++,_+=4){let K=X[_];$[U<<1]=K[4],$[1+(U<<1)]=K[5]}let J=[G,Q,Y,$];return q.splice(R,4*W,sB),X.splice(R,4*W,J),R+1}),w6(J5,[Q3,h4,S5,B4,Y3],null,function(P,Z){let{fnArray:q,argsArray:X}=P,z=(Z-(P.iCurr-4))%5;switch(z){case 0:return q[Z]===Q3;case 1:return q[Z]===h4;case 2:return q[Z]===S5;case 3:if(q[Z]!==B4)return!1;let R=P.iCurr-3,f=X[R][0],G=X[R][1];return X[Z][0]===f&&X[Z][1]===G;case 4:return q[Z]===Y3}throw Error(`iterateShowTextGroup - invalid pos: ${z}`)},function(P,Z){let{fnArray:q,argsArray:X,iCurr:z}=P,R=z-4,f=z-3,G=z-2,Q=z-1,Y=z,W=X[f][0],$=X[f][1],_=Math.min(Math.floor((Z-R)/5),1000);if(_<3)return Z-(Z-R)%5;let J=R;R>=4&&q[R-4]===q[f]&&q[R-3]===q[G]&&q[R-2]===q[Q]&&q[R-1]===q[Y]&&X[R-4][0]===W&&X[R-4][1]===$&&(_++,J-=5);let U=J+4;for(let K=1;K<_;K++)q.splice(U,3),X.splice(U,3),U+=2;return U+1}),w6(J5,[O0,$4,A5,Q0],(P)=>{let Z=P.argsArray,q=Z[P.iCurr-1][0];if(q!==oZ&&q!==R3&&q!==aZ&&q!==nZ&&q!==f3&&q!==G3)return!0;let X=Z[P.iCurr-2];return X[0]===1&&X[1]===0&&X[2]===0&&X[3]===1},()=>!1,(P,Z)=>{let{fnArray:q,argsArray:X}=P,z=P.iCurr,R=z-3,f=z-2,G=X[z-1],Q=X[f],[,[Y],W]=G;if(W){s1.scaleMinMax(Q,W);for(let $=0,_=Y.length;$<_;)switch(Y[$++]){case P7:case Q5:s1.applyTransform(Y,Q,$),$+=2;break;case g2:s1.applyTransformToBezier(Y,Q,$),$+=6}}return q.splice(R,4,A5),X.splice(R,4,G),R+1});gf=class gf extends Rq{constructor(P){super(P),this.state=null,this.context={iCurr:0,fnArray:P.fnArray,argsArray:P.argsArray,isOffscreenCanvasSupported:p8.isOffscreenCanvasSupported},this.match=null,this.lastProcessed=0}_optimize(){let P=this.queue.fnArray,Z=this.lastProcessed,q=P.length,X=this.state,z=this.match;if(!X&&!z&&Z+1===q&&!J5[P[Z]])return void(this.lastProcessed=q);let R=this.context;for(;Z<q;){if(z){if((0,z.iterateFn)(R,Z)){Z++;continue}if(Z=(0,z.processFn)(R,Z+1),q=P.length,z=null,X=null,Z>=q)break}X=(X||J5)[P[Z]],X&&!Array.isArray(X)?(R.iCurr=Z,Z++,!X.checkFn||(0,X.checkFn)(R)?(z=X,X=null):X=null):Z++}this.state=X,this.match=z,this.lastProcessed=Z}flush(){for(;this.match;){let P=this.queue.fnArray.length;this.lastProcessed=(0,this.match.processFn)(this.context,P),this.match=null,this.state=null,this._optimize()}}reset(){this.state=null,this.match=null,this.lastProcessed=0}};p8=class p8{static CHUNK_SIZE=1000;static CHUNK_SIZE_ABOUT=this.CHUNK_SIZE-5;static isOffscreenCanvasSupported=!1;constructor(P=0,Z){this._streamSink=Z,this.fnArray=[],this.argsArray=[],this.optimizer=!Z||P&GB?new Rq(this):new gf(this),this.dependencies=new Set,this._totalLength=0,this.weight=0,this._resolved=Z?null:Promise.resolve()}static setOptions({isOffscreenCanvasSupported:P}){this.isOffscreenCanvasSupported=P}get length(){return this.argsArray.length}get ready(){return this._resolved||this._streamSink.ready}get totalLength(){return this._totalLength+this.length}addOp(P,Z){this.optimizer.push(P,Z),this.weight++,this._streamSink&&(this.weight>=p8.CHUNK_SIZE||this.weight>=p8.CHUNK_SIZE_ABOUT&&(P===Q0||P===Y3))&&this.flush()}addImageOps(P,Z,q,X=!1){X&&(this.addOp(O0),this.addOp(I5,[[["SMask",!1]]])),q!==void 0&&this.addOp(i0,["OC",q]),this.addOp(P,Z),q!==void 0&&this.addOp(B6,[]),X&&this.addOp(Q0)}addDependency(P){this.dependencies.has(P)||(this.dependencies.add(P),this.addOp(FB,[P]))}addDependencies(P){for(let Z of P)this.addDependency(Z)}addOpList(P){if(P instanceof p8){for(let Z of P.dependencies)this.dependencies.add(Z);for(let Z=0,q=P.length;Z<q;Z++)this.addOp(P.fnArray[Z],P.argsArray[Z])}else v('addOpList - ignoring invalid "opList" parameter.')}getIR(){return{fnArray:this.fnArray,argsArray:this.argsArray,length:this.length}}get _transfers(){let P=[],{fnArray:Z,argsArray:q,length:X}=this;for(let z=0;z<X;z++)switch(Z[z]){case B3:case Bf:case I6:{let{bitmap:G,data:Q}=q[z][0];(G||Q?.buffer)&&P.push(G||Q.buffer);break}case A5:{let[,[G],Q]=q[z];G&&P.push(G.buffer,Q.buffer);break}case Jf:let[R,f]=q[z];R&&P.push(R.buffer),f&&P.push(f.buffer);break;case S5:P.push(q[z][0].buffer)}return P}flush(P=!1,Z=null){this.optimizer.flush();let q=this.length;this._totalLength+=q,this._streamSink.enqueue({fnArray:this.fnArray,argsArray:this.argsArray,lastChunk:P,separateAnnots:Z,length:q},1,this._transfers),this.dependencies.clear(),this.fnArray.length=0,this.argsArray.length=0,this.weight=0,this.optimizer.reset()}};sf=class sf extends a8{constructor(P,Z){Z&&(Z*=0.8),super(Z),this.str=P,this.dict=P.dict,this.input=new Uint8Array(5)}readBlock(){let P=this.str,Z=P.getByte();for(;M0(Z);)Z=P.getByte();if(Z===-1||Z===126)return void(this.eof=!0);let q=this.bufferLength,X,z;if(Z===122){for(X=this.ensureBuffer(q+4),z=0;z<4;++z)X[q+z]=0;this.bufferLength+=4}else{let R=this.input;for(R[0]=Z,z=1;z<5;++z){for(Z=P.getByte();M0(Z);)Z=P.getByte();if(R[z]=Z,Z===-1||Z===126)break}if(X=this.ensureBuffer(q+z-1),this.bufferLength+=z-1,z<5){for(;z<5;++z)R[z]=117;this.eof=!0}let f=0;for(z=0;z<5;++z)f=85*f+(R[z]-33);for(z=3;z>=0;--z)X[q+z]=255&f,f>>=8}}};hf=class hf extends a8{constructor(P,Z){Z&&(Z*=0.5),super(Z),this.str=P,this.dict=P.dict,this.firstDigit=-1}readBlock(){let P=this.str.getBytes(8000);if(!P.length)return void(this.eof=!0);let Z=P.length+1>>1,q=this.ensureBuffer(this.bufferLength+Z),X=this.bufferLength,z=this.firstDigit;for(let R of P){let f;if(R>=48&&R<=57)f=15&R;else{if(!(R>=65&&R<=70||R>=97&&R<=102)){if(R===62){this.eof=!0;break}continue}f=9+(15&R)}z<0?z=f:(q[X++]=z<<4|f,z=-1)}z>=0&&this.eof&&(q[X++]=z<<4,z=-1),this.firstDigit=z,this.bufferLength=X}};zz=[[-1,-1],[-1,-1],[7,8],[7,7],[6,6],[6,6],[6,5],[6,5],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2]],Rz=[[-1,-1],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[12,1984],[12,2048],[12,2112],[12,2176],[12,2240],[12,2304],[11,1856],[11,1856],[11,1920],[11,1920],[12,2368],[12,2432],[12,2496],[12,2560]],fz=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[8,29],[8,29],[8,30],[8,30],[8,45],[8,45],[8,46],[8,46],[7,22],[7,22],[7,22],[7,22],[7,23],[7,23],[7,23],[7,23],[8,47],[8,47],[8,48],[8,48],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[7,20],[7,20],[7,20],[7,20],[8,33],[8,33],[8,34],[8,34],[8,35],[8,35],[8,36],[8,36],[8,37],[8,37],[8,38],[8,38],[7,19],[7,19],[7,19],[7,19],[8,31],[8,31],[8,32],[8,32],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[8,53],[8,53],[8,54],[8,54],[7,26],[7,26],[7,26],[7,26],[8,39],[8,39],[8,40],[8,40],[8,41],[8,41],[8,42],[8,42],[8,43],[8,43],[8,44],[8,44],[7,21],[7,21],[7,21],[7,21],[7,28],[7,28],[7,28],[7,28],[8,61],[8,61],[8,62],[8,62],[8,63],[8,63],[8,0],[8,0],[8,320],[8,320],[8,384],[8,384],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[7,27],[7,27],[7,27],[7,27],[8,59],[8,59],[8,60],[8,60],[9,1472],[9,1536],[9,1600],[9,1728],[7,18],[7,18],[7,18],[7,18],[7,24],[7,24],[7,24],[7,24],[8,49],[8,49],[8,50],[8,50],[8,51],[8,51],[8,52],[8,52],[7,25],[7,25],[7,25],[7,25],[8,55],[8,55],[8,56],[8,56],[8,57],[8,57],[8,58],[8,58],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[8,448],[8,448],[8,512],[8,512],[9,704],[9,768],[8,640],[8,640],[8,576],[8,576],[9,832],[9,896],[9,960],[9,1024],[9,1088],[9,1152],[9,1216],[9,1280],[9,1344],[9,1408],[7,256],[7,256],[7,256],[7,256],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7]],Gz=[[-1,-1],[-1,-1],[12,-2],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[11,1792],[11,1792],[12,1984],[12,1984],[12,2048],[12,2048],[12,2112],[12,2112],[12,2176],[12,2176],[12,2240],[12,2240],[12,2304],[12,2304],[11,1856],[11,1856],[11,1856],[11,1856],[11,1920],[11,1920],[11,1920],[11,1920],[12,2368],[12,2368],[12,2432],[12,2432],[12,2496],[12,2496],[12,2560],[12,2560],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[12,52],[12,52],[13,640],[13,704],[13,768],[13,832],[12,55],[12,55],[12,56],[12,56],[13,1280],[13,1344],[13,1408],[13,1472],[12,59],[12,59],[12,60],[12,60],[13,1536],[13,1600],[11,24],[11,24],[11,24],[11,24],[11,25],[11,25],[11,25],[11,25],[13,1664],[13,1728],[12,320],[12,320],[12,384],[12,384],[12,448],[12,448],[13,512],[13,576],[12,53],[12,53],[12,54],[12,54],[13,896],[13,960],[13,1024],[13,1088],[13,1152],[13,1216],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64]],Qz=[[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[11,23],[11,23],[12,50],[12,51],[12,44],[12,45],[12,46],[12,47],[12,57],[12,58],[12,61],[12,256],[10,16],[10,16],[10,16],[10,16],[10,17],[10,17],[10,17],[10,17],[12,48],[12,49],[12,62],[12,63],[12,30],[12,31],[12,32],[12,33],[12,40],[12,41],[11,22],[11,22],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[12,128],[12,192],[12,26],[12,27],[12,28],[12,29],[11,19],[11,19],[11,20],[11,20],[12,34],[12,35],[12,36],[12,37],[12,38],[12,39],[11,21],[11,21],[12,42],[12,43],[10,0],[10,0],[10,0],[10,0],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12]],Yz=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[6,9],[6,8],[5,7],[5,7],[4,6],[4,6],[4,6],[4,6],[4,5],[4,5],[4,5],[4,5],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2]];rf=class rf extends a8{constructor(P,Z,q){super(Z),this.str=P,this.dict=P.dict,q instanceof S||(q=S.empty);let X={next:()=>P.getByte()};this.ccittFaxDecoder=new fq(X,{K:q.get("K"),EndOfLine:q.get("EndOfLine"),EncodedByteAlign:q.get("EncodedByteAlign"),Columns:q.get("Columns"),Rows:q.get("Rows"),EndOfBlock:q.get("EndOfBlock"),BlackIs1:q.get("BlackIs1")})}readBlock(){for(;!this.eof;){let P=this.ccittFaxDecoder.readNextChar();if(P===-1)return void(this.eof=!0);this.ensureBuffer(this.bufferLength+1),this.buffer[this.bufferLength++]=P}}};Wz=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),KI=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),BI=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),II=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,590000,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],jI=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];n9=class n9 extends a8{constructor(P,Z){super(Z),this.str=P,this.dict=P.dict;let q=P.getByte(),X=P.getByte();if(q===-1||X===-1)throw new s(`Invalid header in flate stream: ${q}, ${X}`);if((15&q)!=8)throw new s(`Unknown compression method in flate stream: ${q}, ${X}`);if(((q<<8)+X)%31!=0)throw new s(`Bad FCHECK in flate stream: ${q}, ${X}`);if(32&X)throw new s(`FDICT bit set in flate stream: ${q}, ${X}`);this.codeSize=0,this.codeBuf=0}async getImageData(P,Z){let q=await this.asyncGetBytes();return q?q.length<=P?q:q.subarray(0,P):this.getBytes(P)}async asyncGetBytes(){this.str.reset();let P=this.str.getBytes();try{let{readable:Z,writable:q}=new DecompressionStream("deflate"),X=q.getWriter();await X.ready,X.write(P).then(async()=>{await X.ready,await X.close()}).catch(()=>{});let z=[],R=0;for await(let Q of Z)z.push(Q),R+=Q.byteLength;let f=new Uint8Array(R),G=0;for(let Q of z)f.set(Q,G),G+=Q.byteLength;return f}catch{return this.str=new Y8(P,2,P.length,this.str.dict),this.reset(),null}}get isAsync(){return!0}getBits(P){let Z=this.str,q,X=this.codeSize,z=this.codeBuf;for(;X<P;){if((q=Z.getByte())===-1)throw new s("Bad encoding in flate stream");z|=q<<X,X+=8}return q=z&(1<<P)-1,this.codeBuf=z>>P,this.codeSize=X-=P,q}getCode(P){let Z=this.str,q=P[0],X=P[1],z,R=this.codeSize,f=this.codeBuf;for(;R<X&&(z=Z.getByte())!==-1;)f|=z<<R,R+=8;let G=q[f&(1<<X)-1],Q=G>>16,Y=65535&G;if(Q<1||R<Q)throw new s("Bad encoding in flate stream");return this.codeBuf=f>>Q,this.codeSize=R-Q,Y}generateHuffmanTable(P){let Z=P.length,q,X=0;for(q=0;q<Z;++q)P[q]>X&&(X=P[q]);let z=1<<X,R=new Int32Array(z);for(let f=1,G=0,Q=2;f<=X;++f,G<<=1,Q<<=1)for(let Y=0;Y<Z;++Y)if(P[Y]===f){let W=0,$=G;for(q=0;q<f;++q)W=W<<1|1&$,$>>=1;for(q=W;q<z;q+=Q)R[q]=f<<16|Y;++G}return[R,X]}#P(P){v1(P),this.eof=!0}readBlock(){let P,Z,q,X=this.str;try{Z=this.getBits(3)}catch(Q){return void this.#P(Q.message)}if(1&Z&&(this.eof=!0),Z>>=1,Z===0){let Q;if((Q=X.getByte())===-1)return void this.#P("Bad block header in flate stream");let Y=Q;if((Q=X.getByte())===-1)return void this.#P("Bad block header in flate stream");if(Y|=Q<<8,(Q=X.getByte())===-1)return void this.#P("Bad block header in flate stream");let W=Q;if((Q=X.getByte())===-1)return void this.#P("Bad block header in flate stream");if(W|=Q<<8,W!==(65535&~Y)&&(Y!==0||W!==0))throw new s("Bad uncompressed block length in flate stream");this.codeBuf=0,this.codeSize=0;let $=this.bufferLength,_=$+Y;if(P=this.ensureBuffer(_),this.bufferLength=_,Y===0)X.peekByte()===-1&&(this.eof=!0);else{let J=X.getBytes(Y);P.set(J,$),J.length<Y&&(this.eof=!0)}return}let z,R;if(Z===1)z=II,R=jI;else{if(Z!==2)throw new s("Unknown block type in flate stream");{let Q=this.getBits(5)+257,Y=this.getBits(5)+1,W=this.getBits(4)+4,$=new Uint8Array(Wz.length),_;for(_=0;_<W;++_)$[Wz[_]]=this.getBits(3);let J=this.generateHuffmanTable($);q=0,_=0;let U=Q+Y,K=new Uint8Array(U),I,B,j;for(;_<U;){let V=this.getCode(J);if(V===16)I=2,B=3,j=q;else if(V===17)I=3,B=3,j=q=0;else{if(V!==18){K[_++]=q=V;continue}I=7,B=11,j=q=0}let H=this.getBits(I)+B;for(;H-- >0;)K[_++]=j}z=this.generateHuffmanTable(K.subarray(0,Q)),R=this.generateHuffmanTable(K.subarray(Q,U))}}P=this.buffer;let f=P?P.length:0,G=this.bufferLength;for(;;){let Q=this.getCode(z);if(Q<256){G+1>=f&&(P=this.ensureBuffer(G+1),f=P.length),P[G++]=Q;continue}if(Q===256)return void(this.bufferLength=G);Q-=257,Q=KI[Q];let Y=Q>>16;Y>0&&(Y=this.getBits(Y)),q=(65535&Q)+Y,Q=this.getCode(R),Q=BI[Q],Y=Q>>16,Y>0&&(Y=this.getBits(Y));let W=(65535&Q)+Y;G+q>=f&&(P=this.ensureBuffer(G+q),f=P.length);for(let $=0;$<q;++$,++G)P[G]=P[G-W]}}};VI=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];z8=class z8 extends Z0{constructor(P){super(P,"Jbig2Error")}};$z=["SymbolDictionary",null,null,null,"IntermediateTextRegion",null,"ImmediateTextRegion","ImmediateLosslessTextRegion",null,null,null,null,null,null,null,null,"PatternDictionary",null,null,null,"IntermediateHalftoneRegion",null,"ImmediateHalftoneRegion","ImmediateLosslessHalftoneRegion",null,null,null,null,null,null,null,null,null,null,null,null,"IntermediateGenericRegion",null,"ImmediateGenericRegion","ImmediateLosslessGenericRegion","IntermediateGenericRefinementRegion",null,"ImmediateGenericRefinementRegion","ImmediateLosslessGenericRefinementRegion",null,null,null,null,"PageInformation","EndOfPage","EndOfStripe","EndOfFile","Profiles","Tables",null,null,null,null,null,null,null,null,"Extension"],xI=[[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:2,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-2,y:0},{x:-1,y:0}],[{x:-3,y:-1},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}]],_z=[{coding:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:-1,y:1},{x:0,y:1},{x:1,y:1}]},{coding:[{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:0,y:1},{x:1,y:1}]}],HI=[39717,1941,229,405];Uz={};PG=class PG extends a8{constructor(P,Z,q){super(Z),this.stream=P,this.dict=P.dict,this.maybeLength=Z,this.params=q}get bytes(){return q1(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(P){}readBlock(){this.decodeImage()}decodeImage(P){if(this.eof)return this.buffer;P||=this.bytes;let Z=new ef,q=[];if(this.params instanceof S){let R=this.params.get("JBIG2Globals");if(R instanceof T1){let f=R.getBytes();q.push({data:f,start:0,end:f.length})}}q.push({data:P,start:0,end:P.length});let X=Z.parseChunks(q),z=X.length;for(let R=0;R<z;R++)X[R]^=255;return this.buffer=X,this.bufferLength=z,this.eof=!0,this.buffer}get canAsyncDecodeImageFromBuffer(){return this.stream.isAsync}};ZG=class ZG extends a8{constructor(P,Z,q){super(Z),this.stream=P,this.dict=P.dict,this.maybeLength=Z,this.params=q}get bytes(){return q1(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(P){}readBlock(P){O1("JpxStream.readBlock")}get isAsyncDecoder(){return!0}async decodeImage(P,Z){return this.eof||(P||=this.bytes,this.buffer=await i7.decode(P,Z),this.bufferLength=this.buffer.length,this.eof=!0),this.buffer}get canAsyncDecodeImageFromBuffer(){return this.stream.isAsync}};t9=class t9 extends a8{constructor(P,Z,q){super(Z),this.str=P,this.dict=P.dict,this.cachedData=0,this.bitsCached=0;let X=4096,z={earlyChange:q,codeLength:9,nextCode:258,dictionaryValues:new Uint8Array(X),dictionaryLengths:new Uint16Array(X),dictionaryPrevCodes:new Uint16Array(X),currentSequence:new Uint8Array(X),currentSequenceLength:0};for(let R=0;R<256;++R)z.dictionaryValues[R]=R,z.dictionaryLengths[R]=1;this.lzwState=z}readBits(P){let Z=this.bitsCached,q=this.cachedData;for(;Z<P;){let X=this.str.getByte();if(X===-1)return this.eof=!0,null;q=q<<8|X,Z+=8}return this.bitsCached=Z-=P,this.cachedData=q,this.lastCode=null,q>>>Z&(1<<P)-1}readBlock(){let P,Z,q,X=1024,z=this.lzwState;if(!z)return;let{earlyChange:R,nextCode:f,dictionaryValues:G,dictionaryLengths:Q,dictionaryPrevCodes:Y,codeLength:W,prevCode:$,currentSequence:_,currentSequenceLength:J}=z,U=0,K=this.bufferLength,I=this.ensureBuffer(this.bufferLength+X);for(P=0;P<512;P++){let B=this.readBits(W),j=J>0;if(B<256)_[0]=B,J=1;else{if(!(B>=258)){if(B===256){W=9,f=258,J=0;continue}this.eof=!0,delete this.lzwState;break}if(B<f)for(J=Q[B],Z=J-1,q=B;Z>=0;Z--)_[Z]=G[q],q=Y[q];else _[J++]=_[0]}if(j&&(Y[f]=$,Q[f]=Q[$]+1,G[f]=_[0],f++,W=f+R&f+R-1?W:0|Math.min(Math.log(f+R)/0.6931471805599453+1,12)),$=B,U+=J,X<U){do X+=512;while(X<U);I=this.ensureBuffer(this.bufferLength+X)}for(Z=0;Z<J;Z++)I[K++]=_[Z]}z.nextCode=f,z.codeLength=W,z.prevCode=$,z.currentSequenceLength=J,this.bufferLength=K}};e9=class e9 extends a8{constructor(P,Z,q){if(super(Z),!(q instanceof S))return P;let X=this.predictor=q.get("Predictor")||1;if(X<=1)return P;if(X!==2&&(X<10||X>15))throw new s(`Unsupported predictor: ${X}`);this.readBlock=X===2?this.readBlockTiff:this.readBlockPng,this.str=P,this.dict=P.dict;let z=this.colors=q.get("Colors")||1,R=this.bits=q.get("BPC","BitsPerComponent")||8,f=this.columns=q.get("Columns")||1;return this.pixBytes=z*R+7>>3,this.rowBytes=f*z*R+7>>3,this}readBlockTiff(){let P=this.rowBytes,Z=this.bufferLength,q=this.ensureBuffer(Z+P),X=this.bits,z=this.colors,R=this.str.getBytes(P);if(this.eof=!R.length,this.eof)return;let f,G=0,Q=0,Y=0,W=0,$=Z;if(X===1&&z===1)for(f=0;f<P;++f){let _=R[f]^G;_^=_>>1,_^=_>>2,_^=_>>4,G=(1&_)<<7,q[$++]=_}else if(X===8){for(f=0;f<z;++f)q[$++]=R[f];for(;f<P;++f)q[$]=q[$-z]+R[f],$++}else if(X===16){let _=2*z;for(f=0;f<_;++f)q[$++]=R[f];for(;f<P;f+=2){let J=((255&R[f])<<8)+(255&R[f+1])+((255&q[$-_])<<8)+(255&q[$-_+1]);q[$++]=J>>8&255,q[$++]=255&J}}else{let _=new Uint8Array(z+1),J=(1<<X)-1,U=0,K=Z,I=this.columns;for(f=0;f<I;++f)for(let B=0;B<z;++B)Y<X&&(G=G<<8|255&R[U++],Y+=8),_[B]=_[B]+(G>>Y-X)&J,Y-=X,Q=Q<<X|_[B],W+=X,W>=8&&(q[K++]=Q>>W-8&255,W-=8);W>0&&(q[K++]=(Q<<8-W)+(G&(1<<8-W)-1))}this.bufferLength+=P}readBlockPng(){let P=this.rowBytes,Z=this.pixBytes,q=this.str.getByte(),X=this.str.getBytes(P);if(this.eof=!X.length,this.eof)return;let z=this.bufferLength,R=this.ensureBuffer(z+P),f=R.subarray(z-P,z);f.length===0&&(f=new Uint8Array(P));let G,Q,Y,W=z;switch(q){case 0:for(G=0;G<P;++G)R[W++]=X[G];break;case 1:for(G=0;G<Z;++G)R[W++]=X[G];for(;G<P;++G)R[W]=R[W-Z]+X[G]&255,W++;break;case 2:for(G=0;G<P;++G)R[W++]=f[G]+X[G]&255;break;case 3:for(G=0;G<Z;++G)R[W++]=(f[G]>>1)+X[G];for(;G<P;++G)R[W]=(f[G]+R[W-Z]>>1)+X[G]&255,W++;break;case 4:for(G=0;G<Z;++G)Q=f[G],Y=X[G],R[W++]=Q+Y;for(;G<P;++G){Q=f[G];let $=f[G-Z],_=R[W-Z],J=_+Q-$,U=J-_;U<0&&(U=-U);let K=J-Q;K<0&&(K=-K);let I=J-$;I<0&&(I=-I),Y=X[G],R[W++]=U<=K&&U<=I?_+Y:K<=I?Q+Y:$+Y}break;default:throw new s(`Unsupported predictor: ${q}`)}this.bufferLength+=P}};qG=class qG extends a8{constructor(P,Z){super(Z),this.str=P,this.dict=P.dict}readBlock(){let P=this.str.getBytes(2);if(!P||P.length<2||P[0]===128)return void(this.eof=!0);let Z,q=this.bufferLength,X=P[0];if(X<128){if(Z=this.ensureBuffer(q+X+1),Z[q++]=P[1],X>0){let z=this.str.getBytes(X);Z.set(z,q),q+=X}}else X=257-X,Z=this.ensureBuffer(q+X+1),Z.fill(P[1],q,q+X),q+=X;this.bufferLength=q}};s5=[1,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,2,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];CI=["Adobe-GB1-UCS2","Adobe-CNS1-UCS2","Adobe-Japan1-UCS2","Adobe-Korea1-UCS2","78-EUC-H","78-EUC-V","78-H","78-RKSJ-H","78-RKSJ-V","78-V","78ms-RKSJ-H","78ms-RKSJ-V","83pv-RKSJ-H","90ms-RKSJ-H","90ms-RKSJ-V","90msp-RKSJ-H","90msp-RKSJ-V","90pv-RKSJ-H","90pv-RKSJ-V","Add-H","Add-RKSJ-H","Add-RKSJ-V","Add-V","Adobe-CNS1-0","Adobe-CNS1-1","Adobe-CNS1-2","Adobe-CNS1-3","Adobe-CNS1-4","Adobe-CNS1-5","Adobe-CNS1-6","Adobe-GB1-0","Adobe-GB1-1","Adobe-GB1-2","Adobe-GB1-3","Adobe-GB1-4","Adobe-GB1-5","Adobe-Japan1-0","Adobe-Japan1-1","Adobe-Japan1-2","Adobe-Japan1-3","Adobe-Japan1-4","Adobe-Japan1-5","Adobe-Japan1-6","Adobe-Korea1-0","Adobe-Korea1-1","Adobe-Korea1-2","B5-H","B5-V","B5pc-H","B5pc-V","CNS-EUC-H","CNS-EUC-V","CNS1-H","CNS1-V","CNS2-H","CNS2-V","ETHK-B5-H","ETHK-B5-V","ETen-B5-H","ETen-B5-V","ETenms-B5-H","ETenms-B5-V","EUC-H","EUC-V","Ext-H","Ext-RKSJ-H","Ext-RKSJ-V","Ext-V","GB-EUC-H","GB-EUC-V","GB-H","GB-V","GBK-EUC-H","GBK-EUC-V","GBK2K-H","GBK2K-V","GBKp-EUC-H","GBKp-EUC-V","GBT-EUC-H","GBT-EUC-V","GBT-H","GBT-V","GBTpc-EUC-H","GBTpc-EUC-V","GBpc-EUC-H","GBpc-EUC-V","H","HKdla-B5-H","HKdla-B5-V","HKdlb-B5-H","HKdlb-B5-V","HKgccs-B5-H","HKgccs-B5-V","HKm314-B5-H","HKm314-B5-V","HKm471-B5-H","HKm471-B5-V","HKscs-B5-H","HKscs-B5-V","Hankaku","Hiragana","KSC-EUC-H","KSC-EUC-V","KSC-H","KSC-Johab-H","KSC-Johab-V","KSC-V","KSCms-UHC-H","KSCms-UHC-HW-H","KSCms-UHC-HW-V","KSCms-UHC-V","KSCpc-EUC-H","KSCpc-EUC-V","Katakana","NWP-H","NWP-V","RKSJ-H","RKSJ-V","Roman","UniCNS-UCS2-H","UniCNS-UCS2-V","UniCNS-UTF16-H","UniCNS-UTF16-V","UniCNS-UTF32-H","UniCNS-UTF32-V","UniCNS-UTF8-H","UniCNS-UTF8-V","UniGB-UCS2-H","UniGB-UCS2-V","UniGB-UTF16-H","UniGB-UTF16-V","UniGB-UTF32-H","UniGB-UTF32-V","UniGB-UTF8-H","UniGB-UTF8-V","UniJIS-UCS2-H","UniJIS-UCS2-HW-H","UniJIS-UCS2-HW-V","UniJIS-UCS2-V","UniJIS-UTF16-H","UniJIS-UTF16-V","UniJIS-UTF32-H","UniJIS-UTF32-V","UniJIS-UTF8-H","UniJIS-UTF8-V","UniJIS2004-UTF16-H","UniJIS2004-UTF16-V","UniJIS2004-UTF32-H","UniJIS2004-UTF32-V","UniJIS2004-UTF8-H","UniJIS2004-UTF8-V","UniJISPro-UCS2-HW-V","UniJISPro-UCS2-V","UniJISPro-UTF8-V","UniJISX0213-UTF32-H","UniJISX0213-UTF32-V","UniJISX02132004-UTF32-H","UniJISX02132004-UTF32-V","UniKS-UCS2-H","UniKS-UCS2-V","UniKS-UTF16-H","UniKS-UTF16-V","UniKS-UTF32-H","UniKS-UTF32-V","UniKS-UTF8-H","UniKS-UTF8-V","V","WP-Symbol"];b5=class b5 extends zP{constructor(P,Z){super(),this.vertical=P,this.addCodespaceRange(Z,0,65535)}mapCidRange(P,Z,q){O1("should not call mapCidRange")}mapBfRange(P,Z,q){O1("should not call mapBfRange")}mapBfRangeToArray(P,Z,q){O1("should not call mapBfRangeToArray")}mapOne(P,Z){O1("should not call mapCidOne")}lookup(P){return Number.isInteger(P)&&P<=65535?P:void 0}contains(P){return Number.isInteger(P)&&P<=65535}forEach(P){for(let Z=0;Z<=65535;Z++)P(Z,Z)}charCodeOf(P){return Number.isInteger(P)&&P<=65535?P:-1}getMap(){let P=Array(65536);for(let Z=0;Z<=65535;Z++)P[Z]=Z;return P}get length(){return 65536}get isIdentityCMap(){O1("should not access .isIdentityCMap")}};GG=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],OI=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","centoldstyle","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","","threequartersemdash","","questionsmall","","","","","Ethsmall","","","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","","","","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hypheninferior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","asuperior","centsuperior","","","","","Aacutesmall","Agravesmall","Acircumflexsmall","Adieresissmall","Atildesmall","Aringsmall","Ccedillasmall","Eacutesmall","Egravesmall","Ecircumflexsmall","Edieresissmall","Iacutesmall","Igravesmall","Icircumflexsmall","Idieresissmall","Ntildesmall","Oacutesmall","Ogravesmall","Ocircumflexsmall","Odieresissmall","Otildesmall","Uacutesmall","Ugravesmall","Ucircumflexsmall","Udieresissmall","","eightsuperior","fourinferior","threeinferior","sixinferior","eightinferior","seveninferior","Scaronsmall","","centinferior","twoinferior","","Dieresissmall","","Caronsmall","osuperior","fiveinferior","","commainferior","periodinferior","Yacutesmall","","dollarinferior","","","Thornsmall","","nineinferior","zeroinferior","Zcaronsmall","AEsmall","Oslashsmall","questiondownsmall","oneinferior","Lslashsmall","","","","","","","Cedillasmall","","","","","","OEsmall","figuredash","hyphensuperior","","","","","exclamdownsmall","","Ydieresissmall","","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","ninesuperior","zerosuperior","","esuperior","rsuperior","tsuperior","","","isuperior","ssuperior","dsuperior","","","","","","lsuperior","Ogoneksmall","Brevesmall","Macronsmall","bsuperior","nsuperior","msuperior","commasuperior","periodsuperior","Dotaccentsmall","Ringsmall","","","",""],Gq=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","space","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron"],A4=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls","","","",""],N7=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","bullet","Euro","bullet","quotesinglbase","florin","quotedblbase","ellipsis","dagger","daggerdbl","circumflex","perthousand","Scaron","guilsinglleft","OE","bullet","Zcaron","bullet","bullet","quoteleft","quoteright","quotedblleft","quotedblright","bullet","endash","emdash","tilde","trademark","scaron","guilsinglright","oe","bullet","zcaron","Ydieresis","space","exclamdown","cent","sterling","currency","yen","brokenbar","section","dieresis","copyright","ordfeminine","guillemotleft","logicalnot","hyphen","registered","macron","degree","plusminus","twosuperior","threesuperior","acute","mu","paragraph","periodcentered","cedilla","onesuperior","ordmasculine","guillemotright","onequarter","onehalf","threequarters","questiondown","Agrave","Aacute","Acircumflex","Atilde","Adieresis","Aring","AE","Ccedilla","Egrave","Eacute","Ecircumflex","Edieresis","Igrave","Iacute","Icircumflex","Idieresis","Eth","Ntilde","Ograve","Oacute","Ocircumflex","Otilde","Odieresis","multiply","Oslash","Ugrave","Uacute","Ucircumflex","Udieresis","Yacute","Thorn","germandbls","agrave","aacute","acircumflex","atilde","adieresis","aring","ae","ccedilla","egrave","eacute","ecircumflex","edieresis","igrave","iacute","icircumflex","idieresis","eth","ntilde","ograve","oacute","ocircumflex","otilde","odieresis","divide","oslash","ugrave","uacute","ucircumflex","udieresis","yacute","thorn","ydieresis"],Qq=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","universal","numbersign","existential","percent","ampersand","suchthat","parenleft","parenright","asteriskmath","plus","comma","minus","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","congruent","Alpha","Beta","Chi","Delta","Epsilon","Phi","Gamma","Eta","Iota","theta1","Kappa","Lambda","Mu","Nu","Omicron","Pi","Theta","Rho","Sigma","Tau","Upsilon","sigma1","Omega","Xi","Psi","Zeta","bracketleft","therefore","bracketright","perpendicular","underscore","radicalex","alpha","beta","chi","delta","epsilon","phi","gamma","eta","iota","phi1","kappa","lambda","mu","nu","omicron","pi","theta","rho","sigma","tau","upsilon","omega1","omega","xi","psi","zeta","braceleft","bar","braceright","similar","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Euro","Upsilon1","minute","lessequal","fraction","infinity","florin","club","diamond","heart","spade","arrowboth","arrowleft","arrowup","arrowright","arrowdown","degree","plusminus","second","greaterequal","multiply","proportional","partialdiff","bullet","divide","notequal","equivalence","approxequal","ellipsis","arrowvertex","arrowhorizex","carriagereturn","aleph","Ifraktur","Rfraktur","weierstrass","circlemultiply","circleplus","emptyset","intersection","union","propersuperset","reflexsuperset","notsubset","propersubset","reflexsubset","element","notelement","angle","gradient","registerserif","copyrightserif","trademarkserif","product","radical","dotmath","logicalnot","logicaland","logicalor","arrowdblboth","arrowdblleft","arrowdblup","arrowdblright","arrowdbldown","lozenge","angleleft","registersans","copyrightsans","trademarksans","summation","parenlefttp","parenleftex","parenleftbt","bracketlefttp","bracketleftex","bracketleftbt","bracelefttp","braceleftmid","braceleftbt","braceex","","angleright","integral","integraltp","integralex","integralbt","parenrighttp","parenrightex","parenrightbt","bracketrighttp","bracketrightex","bracketrightbt","bracerighttp","bracerightmid","bracerightbt",""],Yq=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","a1","a2","a202","a3","a4","a5","a119","a118","a117","a11","a12","a13","a14","a15","a16","a105","a17","a18","a19","a20","a21","a22","a23","a24","a25","a26","a27","a28","a6","a7","a8","a9","a10","a29","a30","a31","a32","a33","a34","a35","a36","a37","a38","a39","a40","a41","a42","a43","a44","a45","a46","a47","a48","a49","a50","a51","a52","a53","a54","a55","a56","a57","a58","a59","a60","a61","a62","a63","a64","a65","a66","a67","a68","a69","a70","a71","a72","a73","a74","a203","a75","a204","a76","a77","a78","a79","a81","a82","a83","a84","a97","a98","a99","a100","","a89","a90","a93","a94","a91","a92","a205","a85","a206","a86","a87","a88","a95","a96","","","","","","","","","","","","","","","","","","","","a101","a102","a103","a104","a106","a107","a108","a112","a111","a110","a109","a120","a121","a122","a123","a124","a125","a126","a127","a128","a129","a130","a131","a132","a133","a134","a135","a136","a137","a138","a139","a140","a141","a142","a143","a144","a145","a146","a147","a148","a149","a150","a151","a152","a153","a154","a155","a156","a157","a158","a159","a160","a161","a163","a164","a196","a165","a192","a166","a167","a168","a169","a170","a171","a172","a173","a162","a174","a175","a176","a177","a178","a179","a193","a180","a199","a181","a200","a182","","a201","a183","a184","a197","a185","a194","a198","a186","a195","a187","a188","a189","a190","a191",""];l0=R8(function(P){P.A=65,P.AE=198,P.AEacute=508,P.AEmacron=482,P.AEsmall=63462,P.Aacute=193,P.Aacutesmall=63457,P.Abreve=258,P.Abreveacute=7854,P.Abrevecyrillic=1232,P.Abrevedotbelow=7862,P.Abrevegrave=7856,P.Abrevehookabove=7858,P.Abrevetilde=7860,P.Acaron=461,P.Acircle=9398,P.Acircumflex=194,P.Acircumflexacute=7844,P.Acircumflexdotbelow=7852,P.Acircumflexgrave=7846,P.Acircumflexhookabove=7848,P.Acircumflexsmall=63458,P.Acircumflextilde=7850,P.Acute=63177,P.Acutesmall=63412,P.Acyrillic=1040,P.Adblgrave=512,P.Adieresis=196,P.Adieresiscyrillic=1234,P.Adieresismacron=478,P.Adieresissmall=63460,P.Adotbelow=7840,P.Adotmacron=480,P.Agrave=192,P.Agravesmall=63456,P.Ahookabove=7842,P.Aiecyrillic=1236,P.Ainvertedbreve=514,P.Alpha=913,P.Alphatonos=902,P.Amacron=256,P.Amonospace=65313,P.Aogonek=260,P.Aring=197,P.Aringacute=506,P.Aringbelow=7680,P.Aringsmall=63461,P.Asmall=63329,P.Atilde=195,P.Atildesmall=63459,P.Aybarmenian=1329,P.B=66,P.Bcircle=9399,P.Bdotaccent=7682,P.Bdotbelow=7684,P.Becyrillic=1041,P.Benarmenian=1330,P.Beta=914,P.Bhook=385,P.Blinebelow=7686,P.Bmonospace=65314,P.Brevesmall=63220,P.Bsmall=63330,P.Btopbar=386,P.C=67,P.Caarmenian=1342,P.Cacute=262,P.Caron=63178,P.Caronsmall=63221,P.Ccaron=268,P.Ccedilla=199,P.Ccedillaacute=7688,P.Ccedillasmall=63463,P.Ccircle=9400,P.Ccircumflex=264,P.Cdot=266,P.Cdotaccent=266,P.Cedillasmall=63416,P.Chaarmenian=1353,P.Cheabkhasiancyrillic=1212,P.Checyrillic=1063,P.Chedescenderabkhasiancyrillic=1214,P.Chedescendercyrillic=1206,P.Chedieresiscyrillic=1268,P.Cheharmenian=1347,P.Chekhakassiancyrillic=1227,P.Cheverticalstrokecyrillic=1208,P.Chi=935,P.Chook=391,P.Circumflexsmall=63222,P.Cmonospace=65315,P.Coarmenian=1361,P.Csmall=63331,P.D=68,P.DZ=497,P.DZcaron=452,P.Daarmenian=1332,P.Dafrican=393,P.Dcaron=270,P.Dcedilla=7696,P.Dcircle=9401,P.Dcircumflexbelow=7698,P.Dcroat=272,P.Ddotaccent=7690,P.Ddotbelow=7692,P.Decyrillic=1044,P.Deicoptic=1006,P.Delta=8710,P.Deltagreek=916,P.Dhook=394,P.Dieresis=63179,P.DieresisAcute=63180,P.DieresisGrave=63181,P.Dieresissmall=63400,P.Digammagreek=988,P.Djecyrillic=1026,P.Dlinebelow=7694,P.Dmonospace=65316,P.Dotaccentsmall=63223,P.Dslash=272,P.Dsmall=63332,P.Dtopbar=395,P.Dz=498,P.Dzcaron=453,P.Dzeabkhasiancyrillic=1248,P.Dzecyrillic=1029,P.Dzhecyrillic=1039,P.E=69,P.Eacute=201,P.Eacutesmall=63465,P.Ebreve=276,P.Ecaron=282,P.Ecedillabreve=7708,P.Echarmenian=1333,P.Ecircle=9402,P.Ecircumflex=202,P.Ecircumflexacute=7870,P.Ecircumflexbelow=7704,P.Ecircumflexdotbelow=7878,P.Ecircumflexgrave=7872,P.Ecircumflexhookabove=7874,P.Ecircumflexsmall=63466,P.Ecircumflextilde=7876,P.Ecyrillic=1028,P.Edblgrave=516,P.Edieresis=203,P.Edieresissmall=63467,P.Edot=278,P.Edotaccent=278,P.Edotbelow=7864,P.Efcyrillic=1060,P.Egrave=200,P.Egravesmall=63464,P.Eharmenian=1335,P.Ehookabove=7866,P.Eightroman=8551,P.Einvertedbreve=518,P.Eiotifiedcyrillic=1124,P.Elcyrillic=1051,P.Elevenroman=8554,P.Emacron=274,P.Emacronacute=7702,P.Emacrongrave=7700,P.Emcyrillic=1052,P.Emonospace=65317,P.Encyrillic=1053,P.Endescendercyrillic=1186,P.Eng=330,P.Enghecyrillic=1188,P.Enhookcyrillic=1223,P.Eogonek=280,P.Eopen=400,P.Epsilon=917,P.Epsilontonos=904,P.Ercyrillic=1056,P.Ereversed=398,P.Ereversedcyrillic=1069,P.Escyrillic=1057,P.Esdescendercyrillic=1194,P.Esh=425,P.Esmall=63333,P.Eta=919,P.Etarmenian=1336,P.Etatonos=905,P.Eth=208,P.Ethsmall=63472,P.Etilde=7868,P.Etildebelow=7706,P.Euro=8364,P.Ezh=439,P.Ezhcaron=494,P.Ezhreversed=440,P.F=70,P.Fcircle=9403,P.Fdotaccent=7710,P.Feharmenian=1366,P.Feicoptic=996,P.Fhook=401,P.Fitacyrillic=1138,P.Fiveroman=8548,P.Fmonospace=65318,P.Fourroman=8547,P.Fsmall=63334,P.G=71,P.GBsquare=13191,P.Gacute=500,P.Gamma=915,P.Gammaafrican=404,P.Gangiacoptic=1002,P.Gbreve=286,P.Gcaron=486,P.Gcedilla=290,P.Gcircle=9404,P.Gcircumflex=284,P.Gcommaaccent=290,P.Gdot=288,P.Gdotaccent=288,P.Gecyrillic=1043,P.Ghadarmenian=1346,P.Ghemiddlehookcyrillic=1172,P.Ghestrokecyrillic=1170,P.Gheupturncyrillic=1168,P.Ghook=403,P.Gimarmenian=1331,P.Gjecyrillic=1027,P.Gmacron=7712,P.Gmonospace=65319,P.Grave=63182,P.Gravesmall=63328,P.Gsmall=63335,P.Gsmallhook=667,P.Gstroke=484,P.H=72,P.H18533=9679,P.H18543=9642,P.H18551=9643,P.H22073=9633,P.HPsquare=13259,P.Haabkhasiancyrillic=1192,P.Hadescendercyrillic=1202,P.Hardsigncyrillic=1066,P.Hbar=294,P.Hbrevebelow=7722,P.Hcedilla=7720,P.Hcircle=9405,P.Hcircumflex=292,P.Hdieresis=7718,P.Hdotaccent=7714,P.Hdotbelow=7716,P.Hmonospace=65320,P.Hoarmenian=1344,P.Horicoptic=1000,P.Hsmall=63336,P.Hungarumlaut=63183,P.Hungarumlautsmall=63224,P.Hzsquare=13200,P.I=73,P.IAcyrillic=1071,P.IJ=306,P.IUcyrillic=1070,P.Iacute=205,P.Iacutesmall=63469,P.Ibreve=300,P.Icaron=463,P.Icircle=9406,P.Icircumflex=206,P.Icircumflexsmall=63470,P.Icyrillic=1030,P.Idblgrave=520,P.Idieresis=207,P.Idieresisacute=7726,P.Idieresiscyrillic=1252,P.Idieresissmall=63471,P.Idot=304,P.Idotaccent=304,P.Idotbelow=7882,P.Iebrevecyrillic=1238,P.Iecyrillic=1045,P.Ifraktur=8465,P.Igrave=204,P.Igravesmall=63468,P.Ihookabove=7880,P.Iicyrillic=1048,P.Iinvertedbreve=522,P.Iishortcyrillic=1049,P.Imacron=298,P.Imacroncyrillic=1250,P.Imonospace=65321,P.Iniarmenian=1339,P.Iocyrillic=1025,P.Iogonek=302,P.Iota=921,P.Iotaafrican=406,P.Iotadieresis=938,P.Iotatonos=906,P.Ismall=63337,P.Istroke=407,P.Itilde=296,P.Itildebelow=7724,P.Izhitsacyrillic=1140,P.Izhitsadblgravecyrillic=1142,P.J=74,P.Jaarmenian=1345,P.Jcircle=9407,P.Jcircumflex=308,P.Jecyrillic=1032,P.Jheharmenian=1355,P.Jmonospace=65322,P.Jsmall=63338,P.K=75,P.KBsquare=13189,P.KKsquare=13261,P.Kabashkircyrillic=1184,P.Kacute=7728,P.Kacyrillic=1050,P.Kadescendercyrillic=1178,P.Kahookcyrillic=1219,P.Kappa=922,P.Kastrokecyrillic=1182,P.Kaverticalstrokecyrillic=1180,P.Kcaron=488,P.Kcedilla=310,P.Kcircle=9408,P.Kcommaaccent=310,P.Kdotbelow=7730,P.Keharmenian=1364,P.Kenarmenian=1343,P.Khacyrillic=1061,P.Kheicoptic=998,P.Khook=408,P.Kjecyrillic=1036,P.Klinebelow=7732,P.Kmonospace=65323,P.Koppacyrillic=1152,P.Koppagreek=990,P.Ksicyrillic=1134,P.Ksmall=63339,P.L=76,P.LJ=455,P.LL=63167,P.Lacute=313,P.Lambda=923,P.Lcaron=317,P.Lcedilla=315,P.Lcircle=9409,P.Lcircumflexbelow=7740,P.Lcommaaccent=315,P.Ldot=319,P.Ldotaccent=319,P.Ldotbelow=7734,P.Ldotbelowmacron=7736,P.Liwnarmenian=1340,P.Lj=456,P.Ljecyrillic=1033,P.Llinebelow=7738,P.Lmonospace=65324,P.Lslash=321,P.Lslashsmall=63225,P.Lsmall=63340,P.M=77,P.MBsquare=13190,P.Macron=63184,P.Macronsmall=63407,P.Macute=7742,P.Mcircle=9410,P.Mdotaccent=7744,P.Mdotbelow=7746,P.Menarmenian=1348,P.Mmonospace=65325,P.Msmall=63341,P.Mturned=412,P.Mu=924,P.N=78,P.NJ=458,P.Nacute=323,P.Ncaron=327,P.Ncedilla=325,P.Ncircle=9411,P.Ncircumflexbelow=7754,P.Ncommaaccent=325,P.Ndotaccent=7748,P.Ndotbelow=7750,P.Nhookleft=413,P.Nineroman=8552,P.Nj=459,P.Njecyrillic=1034,P.Nlinebelow=7752,P.Nmonospace=65326,P.Nowarmenian=1350,P.Nsmall=63342,P.Ntilde=209,P.Ntildesmall=63473,P.Nu=925,P.O=79,P.OE=338,P.OEsmall=63226,P.Oacute=211,P.Oacutesmall=63475,P.Obarredcyrillic=1256,P.Obarreddieresiscyrillic=1258,P.Obreve=334,P.Ocaron=465,P.Ocenteredtilde=415,P.Ocircle=9412,P.Ocircumflex=212,P.Ocircumflexacute=7888,P.Ocircumflexdotbelow=7896,P.Ocircumflexgrave=7890,P.Ocircumflexhookabove=7892,P.Ocircumflexsmall=63476,P.Ocircumflextilde=7894,P.Ocyrillic=1054,P.Odblacute=336,P.Odblgrave=524,P.Odieresis=214,P.Odieresiscyrillic=1254,P.Odieresissmall=63478,P.Odotbelow=7884,P.Ogoneksmall=63227,P.Ograve=210,P.Ogravesmall=63474,P.Oharmenian=1365,P.Ohm=8486,P.Ohookabove=7886,P.Ohorn=416,P.Ohornacute=7898,P.Ohorndotbelow=7906,P.Ohorngrave=7900,P.Ohornhookabove=7902,P.Ohorntilde=7904,P.Ohungarumlaut=336,P.Oi=418,P.Oinvertedbreve=526,P.Omacron=332,P.Omacronacute=7762,P.Omacrongrave=7760,P.Omega=8486,P.Omegacyrillic=1120,P.Omegagreek=937,P.Omegaroundcyrillic=1146,P.Omegatitlocyrillic=1148,P.Omegatonos=911,P.Omicron=927,P.Omicrontonos=908,P.Omonospace=65327,P.Oneroman=8544,P.Oogonek=490,P.Oogonekmacron=492,P.Oopen=390,P.Oslash=216,P.Oslashacute=510,P.Oslashsmall=63480,P.Osmall=63343,P.Ostrokeacute=510,P.Otcyrillic=1150,P.Otilde=213,P.Otildeacute=7756,P.Otildedieresis=7758,P.Otildesmall=63477,P.P=80,P.Pacute=7764,P.Pcircle=9413,P.Pdotaccent=7766,P.Pecyrillic=1055,P.Peharmenian=1354,P.Pemiddlehookcyrillic=1190,P.Phi=934,P.Phook=420,P.Pi=928,P.Piwrarmenian=1363,P.Pmonospace=65328,P.Psi=936,P.Psicyrillic=1136,P.Psmall=63344,P.Q=81,P.Qcircle=9414,P.Qmonospace=65329,P.Qsmall=63345,P.R=82,P.Raarmenian=1356,P.Racute=340,P.Rcaron=344,P.Rcedilla=342,P.Rcircle=9415,P.Rcommaaccent=342,P.Rdblgrave=528,P.Rdotaccent=7768,P.Rdotbelow=7770,P.Rdotbelowmacron=7772,P.Reharmenian=1360,P.Rfraktur=8476,P.Rho=929,P.Ringsmall=63228,P.Rinvertedbreve=530,P.Rlinebelow=7774,P.Rmonospace=65330,P.Rsmall=63346,P.Rsmallinverted=641,P.Rsmallinvertedsuperior=694,P.S=83,P.SF010000=9484,P.SF020000=9492,P.SF030000=9488,P.SF040000=9496,P.SF050000=9532,P.SF060000=9516,P.SF070000=9524,P.SF080000=9500,P.SF090000=9508,P.SF100000=9472,P.SF110000=9474,P.SF190000=9569,P.SF200000=9570,P.SF210000=9558,P.SF220000=9557,P.SF230000=9571,P.SF240000=9553,P.SF250000=9559,P.SF260000=9565,P.SF270000=9564,P.SF280000=9563,P.SF360000=9566,P.SF370000=9567,P.SF380000=9562,P.SF390000=9556,P.SF400000=9577,P.SF410000=9574,P.SF420000=9568,P.SF430000=9552,P.SF440000=9580,P.SF450000=9575,P.SF460000=9576,P.SF470000=9572,P.SF480000=9573,P.SF490000=9561,P.SF500000=9560,P.SF510000=9554,P.SF520000=9555,P.SF530000=9579,P.SF540000=9578,P.Sacute=346,P.Sacutedotaccent=7780,P.Sampigreek=992,P.Scaron=352,P.Scarondotaccent=7782,P.Scaronsmall=63229,P.Scedilla=350,P.Schwa=399,P.Schwacyrillic=1240,P.Schwadieresiscyrillic=1242,P.Scircle=9416,P.Scircumflex=348,P.Scommaaccent=536,P.Sdotaccent=7776,P.Sdotbelow=7778,P.Sdotbelowdotaccent=7784,P.Seharmenian=1357,P.Sevenroman=8550,P.Shaarmenian=1351,P.Shacyrillic=1064,P.Shchacyrillic=1065,P.Sheicoptic=994,P.Shhacyrillic=1210,P.Shimacoptic=1004,P.Sigma=931,P.Sixroman=8549,P.Smonospace=65331,P.Softsigncyrillic=1068,P.Ssmall=63347,P.Stigmagreek=986,P.T=84,P.Tau=932,P.Tbar=358,P.Tcaron=356,P.Tcedilla=354,P.Tcircle=9417,P.Tcircumflexbelow=7792,P.Tcommaaccent=354,P.Tdotaccent=7786,P.Tdotbelow=7788,P.Tecyrillic=1058,P.Tedescendercyrillic=1196,P.Tenroman=8553,P.Tetsecyrillic=1204,P.Theta=920,P.Thook=428,P.Thorn=222,P.Thornsmall=63486,P.Threeroman=8546,P.Tildesmall=63230,P.Tiwnarmenian=1359,P.Tlinebelow=7790,P.Tmonospace=65332,P.Toarmenian=1337,P.Tonefive=444,P.Tonesix=388,P.Tonetwo=423,P.Tretroflexhook=430,P.Tsecyrillic=1062,P.Tshecyrillic=1035,P.Tsmall=63348,P.Twelveroman=8555,P.Tworoman=8545,P.U=85,P.Uacute=218,P.Uacutesmall=63482,P.Ubreve=364,P.Ucaron=467,P.Ucircle=9418,P.Ucircumflex=219,P.Ucircumflexbelow=7798,P.Ucircumflexsmall=63483,P.Ucyrillic=1059,P.Udblacute=368,P.Udblgrave=532,P.Udieresis=220,P.Udieresisacute=471,P.Udieresisbelow=7794,P.Udieresiscaron=473,P.Udieresiscyrillic=1264,P.Udieresisgrave=475,P.Udieresismacron=469,P.Udieresissmall=63484,P.Udotbelow=7908,P.Ugrave=217,P.Ugravesmall=63481,P.Uhookabove=7910,P.Uhorn=431,P.Uhornacute=7912,P.Uhorndotbelow=7920,P.Uhorngrave=7914,P.Uhornhookabove=7916,P.Uhorntilde=7918,P.Uhungarumlaut=368,P.Uhungarumlautcyrillic=1266,P.Uinvertedbreve=534,P.Ukcyrillic=1144,P.Umacron=362,P.Umacroncyrillic=1262,P.Umacrondieresis=7802,P.Umonospace=65333,P.Uogonek=370,P.Upsilon=933,P.Upsilon1=978,P.Upsilonacutehooksymbolgreek=979,P.Upsilonafrican=433,P.Upsilondieresis=939,P.Upsilondieresishooksymbolgreek=980,P.Upsilonhooksymbol=978,P.Upsilontonos=910,P.Uring=366,P.Ushortcyrillic=1038,P.Usmall=63349,P.Ustraightcyrillic=1198,P.Ustraightstrokecyrillic=1200,P.Utilde=360,P.Utildeacute=7800,P.Utildebelow=7796,P.V=86,P.Vcircle=9419,P.Vdotbelow=7806,P.Vecyrillic=1042,P.Vewarmenian=1358,P.Vhook=434,P.Vmonospace=65334,P.Voarmenian=1352,P.Vsmall=63350,P.Vtilde=7804,P.W=87,P.Wacute=7810,P.Wcircle=9420,P.Wcircumflex=372,P.Wdieresis=7812,P.Wdotaccent=7814,P.Wdotbelow=7816,P.Wgrave=7808,P.Wmonospace=65335,P.Wsmall=63351,P.X=88,P.Xcircle=9421,P.Xdieresis=7820,P.Xdotaccent=7818,P.Xeharmenian=1341,P.Xi=926,P.Xmonospace=65336,P.Xsmall=63352,P.Y=89,P.Yacute=221,P.Yacutesmall=63485,P.Yatcyrillic=1122,P.Ycircle=9422,P.Ycircumflex=374,P.Ydieresis=376,P.Ydieresissmall=63487,P.Ydotaccent=7822,P.Ydotbelow=7924,P.Yericyrillic=1067,P.Yerudieresiscyrillic=1272,P.Ygrave=7922,P.Yhook=435,P.Yhookabove=7926,P.Yiarmenian=1349,P.Yicyrillic=1031,P.Yiwnarmenian=1362,P.Ymonospace=65337,P.Ysmall=63353,P.Ytilde=7928,P.Yusbigcyrillic=1130,P.Yusbigiotifiedcyrillic=1132,P.Yuslittlecyrillic=1126,P.Yuslittleiotifiedcyrillic=1128,P.Z=90,P.Zaarmenian=1334,P.Zacute=377,P.Zcaron=381,P.Zcaronsmall=63231,P.Zcircle=9423,P.Zcircumflex=7824,P.Zdot=379,P.Zdotaccent=379,P.Zdotbelow=7826,P.Zecyrillic=1047,P.Zedescendercyrillic=1176,P.Zedieresiscyrillic=1246,P.Zeta=918,P.Zhearmenian=1338,P.Zhebrevecyrillic=1217,P.Zhecyrillic=1046,P.Zhedescendercyrillic=1174,P.Zhedieresiscyrillic=1244,P.Zlinebelow=7828,P.Zmonospace=65338,P.Zsmall=63354,P.Zstroke=437,P.a=97,P.aabengali=2438,P.aacute=225,P.aadeva=2310,P.aagujarati=2694,P.aagurmukhi=2566,P.aamatragurmukhi=2622,P.aarusquare=13059,P.aavowelsignbengali=2494,P.aavowelsigndeva=2366,P.aavowelsigngujarati=2750,P.abbreviationmarkarmenian=1375,P.abbreviationsigndeva=2416,P.abengali=2437,P.abopomofo=12570,P.abreve=259,P.abreveacute=7855,P.abrevecyrillic=1233,P.abrevedotbelow=7863,P.abrevegrave=7857,P.abrevehookabove=7859,P.abrevetilde=7861,P.acaron=462,P.acircle=9424,P.acircumflex=226,P.acircumflexacute=7845,P.acircumflexdotbelow=7853,P.acircumflexgrave=7847,P.acircumflexhookabove=7849,P.acircumflextilde=7851,P.acute=180,P.acutebelowcmb=791,P.acutecmb=769,P.acutecomb=769,P.acutedeva=2388,P.acutelowmod=719,P.acutetonecmb=833,P.acyrillic=1072,P.adblgrave=513,P.addakgurmukhi=2673,P.adeva=2309,P.adieresis=228,P.adieresiscyrillic=1235,P.adieresismacron=479,P.adotbelow=7841,P.adotmacron=481,P.ae=230,P.aeacute=509,P.aekorean=12624,P.aemacron=483,P.afii00208=8213,P.afii08941=8356,P.afii10017=1040,P.afii10018=1041,P.afii10019=1042,P.afii10020=1043,P.afii10021=1044,P.afii10022=1045,P.afii10023=1025,P.afii10024=1046,P.afii10025=1047,P.afii10026=1048,P.afii10027=1049,P.afii10028=1050,P.afii10029=1051,P.afii10030=1052,P.afii10031=1053,P.afii10032=1054,P.afii10033=1055,P.afii10034=1056,P.afii10035=1057,P.afii10036=1058,P.afii10037=1059,P.afii10038=1060,P.afii10039=1061,P.afii10040=1062,P.afii10041=1063,P.afii10042=1064,P.afii10043=1065,P.afii10044=1066,P.afii10045=1067,P.afii10046=1068,P.afii10047=1069,P.afii10048=1070,P.afii10049=1071,P.afii10050=1168,P.afii10051=1026,P.afii10052=1027,P.afii10053=1028,P.afii10054=1029,P.afii10055=1030,P.afii10056=1031,P.afii10057=1032,P.afii10058=1033,P.afii10059=1034,P.afii10060=1035,P.afii10061=1036,P.afii10062=1038,P.afii10063=63172,P.afii10064=63173,P.afii10065=1072,P.afii10066=1073,P.afii10067=1074,P.afii10068=1075,P.afii10069=1076,P.afii10070=1077,P.afii10071=1105,P.afii10072=1078,P.afii10073=1079,P.afii10074=1080,P.afii10075=1081,P.afii10076=1082,P.afii10077=1083,P.afii10078=1084,P.afii10079=1085,P.afii10080=1086,P.afii10081=1087,P.afii10082=1088,P.afii10083=1089,P.afii10084=1090,P.afii10085=1091,P.afii10086=1092,P.afii10087=1093,P.afii10088=1094,P.afii10089=1095,P.afii10090=1096,P.afii10091=1097,P.afii10092=1098,P.afii10093=1099,P.afii10094=1100,P.afii10095=1101,P.afii10096=1102,P.afii10097=1103,P.afii10098=1169,P.afii10099=1106,P.afii10100=1107,P.afii10101=1108,P.afii10102=1109,P.afii10103=1110,P.afii10104=1111,P.afii10105=1112,P.afii10106=1113,P.afii10107=1114,P.afii10108=1115,P.afii10109=1116,P.afii10110=1118,P.afii10145=1039,P.afii10146=1122,P.afii10147=1138,P.afii10148=1140,P.afii10192=63174,P.afii10193=1119,P.afii10194=1123,P.afii10195=1139,P.afii10196=1141,P.afii10831=63175,P.afii10832=63176,P.afii10846=1241,P.afii299=8206,P.afii300=8207,P.afii301=8205,P.afii57381=1642,P.afii57388=1548,P.afii57392=1632,P.afii57393=1633,P.afii57394=1634,P.afii57395=1635,P.afii57396=1636,P.afii57397=1637,P.afii57398=1638,P.afii57399=1639,P.afii57400=1640,P.afii57401=1641,P.afii57403=1563,P.afii57407=1567,P.afii57409=1569,P.afii57410=1570,P.afii57411=1571,P.afii57412=1572,P.afii57413=1573,P.afii57414=1574,P.afii57415=1575,P.afii57416=1576,P.afii57417=1577,P.afii57418=1578,P.afii57419=1579,P.afii57420=1580,P.afii57421=1581,P.afii57422=1582,P.afii57423=1583,P.afii57424=1584,P.afii57425=1585,P.afii57426=1586,P.afii57427=1587,P.afii57428=1588,P.afii57429=1589,P.afii57430=1590,P.afii57431=1591,P.afii57432=1592,P.afii57433=1593,P.afii57434=1594,P.afii57440=1600,P.afii57441=1601,P.afii57442=1602,P.afii57443=1603,P.afii57444=1604,P.afii57445=1605,P.afii57446=1606,P.afii57448=1608,P.afii57449=1609,P.afii57450=1610,P.afii57451=1611,P.afii57452=1612,P.afii57453=1613,P.afii57454=1614,P.afii57455=1615,P.afii57456=1616,P.afii57457=1617,P.afii57458=1618,P.afii57470=1607,P.afii57505=1700,P.afii57506=1662,P.afii57507=1670,P.afii57508=1688,P.afii57509=1711,P.afii57511=1657,P.afii57512=1672,P.afii57513=1681,P.afii57514=1722,P.afii57519=1746,P.afii57534=1749,P.afii57636=8362,P.afii57645=1470,P.afii57658=1475,P.afii57664=1488,P.afii57665=1489,P.afii57666=1490,P.afii57667=1491,P.afii57668=1492,P.afii57669=1493,P.afii57670=1494,P.afii57671=1495,P.afii57672=1496,P.afii57673=1497,P.afii57674=1498,P.afii57675=1499,P.afii57676=1500,P.afii57677=1501,P.afii57678=1502,P.afii57679=1503,P.afii57680=1504,P.afii57681=1505,P.afii57682=1506,P.afii57683=1507,P.afii57684=1508,P.afii57685=1509,P.afii57686=1510,P.afii57687=1511,P.afii57688=1512,P.afii57689=1513,P.afii57690=1514,P.afii57694=64298,P.afii57695=64299,P.afii57700=64331,P.afii57705=64287,P.afii57716=1520,P.afii57717=1521,P.afii57718=1522,P.afii57723=64309,P.afii57793=1460,P.afii57794=1461,P.afii57795=1462,P.afii57796=1467,P.afii57797=1464,P.afii57798=1463,P.afii57799=1456,P.afii57800=1458,P.afii57801=1457,P.afii57802=1459,P.afii57803=1474,P.afii57804=1473,P.afii57806=1465,P.afii57807=1468,P.afii57839=1469,P.afii57841=1471,P.afii57842=1472,P.afii57929=700,P.afii61248=8453,P.afii61289=8467,P.afii61352=8470,P.afii61573=8236,P.afii61574=8237,P.afii61575=8238,P.afii61664=8204,P.afii63167=1645,P.afii64937=701,P.agrave=224,P.agujarati=2693,P.agurmukhi=2565,P.ahiragana=12354,P.ahookabove=7843,P.aibengali=2448,P.aibopomofo=12574,P.aideva=2320,P.aiecyrillic=1237,P.aigujarati=2704,P.aigurmukhi=2576,P.aimatragurmukhi=2632,P.ainarabic=1593,P.ainfinalarabic=65226,P.aininitialarabic=65227,P.ainmedialarabic=65228,P.ainvertedbreve=515,P.aivowelsignbengali=2504,P.aivowelsigndeva=2376,P.aivowelsigngujarati=2760,P.akatakana=12450,P.akatakanahalfwidth=65393,P.akorean=12623,P.alef=1488,P.alefarabic=1575,P.alefdageshhebrew=64304,P.aleffinalarabic=65166,P.alefhamzaabovearabic=1571,P.alefhamzaabovefinalarabic=65156,P.alefhamzabelowarabic=1573,P.alefhamzabelowfinalarabic=65160,P.alefhebrew=1488,P.aleflamedhebrew=64335,P.alefmaddaabovearabic=1570,P.alefmaddaabovefinalarabic=65154,P.alefmaksuraarabic=1609,P.alefmaksurafinalarabic=65264,P.alefmaksurainitialarabic=65267,P.alefmaksuramedialarabic=65268,P.alefpatahhebrew=64302,P.alefqamatshebrew=64303,P.aleph=8501,P.allequal=8780,P.alpha=945,P.alphatonos=940,P.amacron=257,P.amonospace=65345,P.ampersand=38,P.ampersandmonospace=65286,P.ampersandsmall=63270,P.amsquare=13250,P.anbopomofo=12578,P.angbopomofo=12580,P.angbracketleft=12296,P.angbracketright=12297,P.angkhankhuthai=3674,P.angle=8736,P.anglebracketleft=12296,P.anglebracketleftvertical=65087,P.anglebracketright=12297,P.anglebracketrightvertical=65088,P.angleleft=9001,P.angleright=9002,P.angstrom=8491,P.anoteleia=903,P.anudattadeva=2386,P.anusvarabengali=2434,P.anusvaradeva=2306,P.anusvaragujarati=2690,P.aogonek=261,P.apaatosquare=13056,P.aparen=9372,P.apostrophearmenian=1370,P.apostrophemod=700,P.apple=63743,P.approaches=8784,P.approxequal=8776,P.approxequalorimage=8786,P.approximatelyequal=8773,P.araeaekorean=12686,P.araeakorean=12685,P.arc=8978,P.arighthalfring=7834,P.aring=229,P.aringacute=507,P.aringbelow=7681,P.arrowboth=8596,P.arrowdashdown=8675,P.arrowdashleft=8672,P.arrowdashright=8674,P.arrowdashup=8673,P.arrowdblboth=8660,P.arrowdbldown=8659,P.arrowdblleft=8656,P.arrowdblright=8658,P.arrowdblup=8657,P.arrowdown=8595,P.arrowdownleft=8601,P.arrowdownright=8600,P.arrowdownwhite=8681,P.arrowheaddownmod=709,P.arrowheadleftmod=706,P.arrowheadrightmod=707,P.arrowheadupmod=708,P.arrowhorizex=63719,P.arrowleft=8592,P.arrowleftdbl=8656,P.arrowleftdblstroke=8653,P.arrowleftoverright=8646,P.arrowleftwhite=8678,P.arrowright=8594,P.arrowrightdblstroke=8655,P.arrowrightheavy=10142,P.arrowrightoverleft=8644,P.arrowrightwhite=8680,P.arrowtableft=8676,P.arrowtabright=8677,P.arrowup=8593,P.arrowupdn=8597,P.arrowupdnbse=8616,P.arrowupdownbase=8616,P.arrowupleft=8598,P.arrowupleftofdown=8645,P.arrowupright=8599,P.arrowupwhite=8679,P.arrowvertex=63718,P.asciicircum=94,P.asciicircummonospace=65342,P.asciitilde=126,P.asciitildemonospace=65374,P.ascript=593,P.ascriptturned=594,P.asmallhiragana=12353,P.asmallkatakana=12449,P.asmallkatakanahalfwidth=65383,P.asterisk=42,P.asteriskaltonearabic=1645,P.asteriskarabic=1645,P.asteriskmath=8727,P.asteriskmonospace=65290,P.asterisksmall=65121,P.asterism=8258,P.asuperior=63209,P.asymptoticallyequal=8771,P.at=64,P.atilde=227,P.atmonospace=65312,P.atsmall=65131,P.aturned=592,P.aubengali=2452,P.aubopomofo=12576,P.audeva=2324,P.augujarati=2708,P.augurmukhi=2580,P.aulengthmarkbengali=2519,P.aumatragurmukhi=2636,P.auvowelsignbengali=2508,P.auvowelsigndeva=2380,P.auvowelsigngujarati=2764,P.avagrahadeva=2365,P.aybarmenian=1377,P.ayin=1506,P.ayinaltonehebrew=64288,P.ayinhebrew=1506,P.b=98,P.babengali=2476,P.backslash=92,P.backslashmonospace=65340,P.badeva=2348,P.bagujarati=2732,P.bagurmukhi=2604,P.bahiragana=12400,P.bahtthai=3647,P.bakatakana=12496,P.bar=124,P.barmonospace=65372,P.bbopomofo=12549,P.bcircle=9425,P.bdotaccent=7683,P.bdotbelow=7685,P.beamedsixteenthnotes=9836,P.because=8757,P.becyrillic=1073,P.beharabic=1576,P.behfinalarabic=65168,P.behinitialarabic=65169,P.behiragana=12409,P.behmedialarabic=65170,P.behmeeminitialarabic=64671,P.behmeemisolatedarabic=64520,P.behnoonfinalarabic=64621,P.bekatakana=12505,P.benarmenian=1378,P.bet=1489,P.beta=946,P.betasymbolgreek=976,P.betdagesh=64305,P.betdageshhebrew=64305,P.bethebrew=1489,P.betrafehebrew=64332,P.bhabengali=2477,P.bhadeva=2349,P.bhagujarati=2733,P.bhagurmukhi=2605,P.bhook=595,P.bihiragana=12403,P.bikatakana=12499,P.bilabialclick=664,P.bindigurmukhi=2562,P.birusquare=13105,P.blackcircle=9679,P.blackdiamond=9670,P.blackdownpointingtriangle=9660,P.blackleftpointingpointer=9668,P.blackleftpointingtriangle=9664,P.blacklenticularbracketleft=12304,P.blacklenticularbracketleftvertical=65083,P.blacklenticularbracketright=12305,P.blacklenticularbracketrightvertical=65084,P.blacklowerlefttriangle=9699,P.blacklowerrighttriangle=9698,P.blackrectangle=9644,P.blackrightpointingpointer=9658,P.blackrightpointingtriangle=9654,P.blacksmallsquare=9642,P.blacksmilingface=9787,P.blacksquare=9632,P.blackstar=9733,P.blackupperlefttriangle=9700,P.blackupperrighttriangle=9701,P.blackuppointingsmalltriangle=9652,P.blackuppointingtriangle=9650,P.blank=9251,P.blinebelow=7687,P.block=9608,P.bmonospace=65346,P.bobaimaithai=3610,P.bohiragana=12412,P.bokatakana=12508,P.bparen=9373,P.bqsquare=13251,P.braceex=63732,P.braceleft=123,P.braceleftbt=63731,P.braceleftmid=63730,P.braceleftmonospace=65371,P.braceleftsmall=65115,P.bracelefttp=63729,P.braceleftvertical=65079,P.braceright=125,P.bracerightbt=63742,P.bracerightmid=63741,P.bracerightmonospace=65373,P.bracerightsmall=65116,P.bracerighttp=63740,P.bracerightvertical=65080,P.bracketleft=91,P.bracketleftbt=63728,P.bracketleftex=63727,P.bracketleftmonospace=65339,P.bracketlefttp=63726,P.bracketright=93,P.bracketrightbt=63739,P.bracketrightex=63738,P.bracketrightmonospace=65341,P.bracketrighttp=63737,P.breve=728,P.brevebelowcmb=814,P.brevecmb=774,P.breveinvertedbelowcmb=815,P.breveinvertedcmb=785,P.breveinverteddoublecmb=865,P.bridgebelowcmb=810,P.bridgeinvertedbelowcmb=826,P.brokenbar=166,P.bstroke=384,P.bsuperior=63210,P.btopbar=387,P.buhiragana=12406,P.bukatakana=12502,P.bullet=8226,P.bulletinverse=9688,P.bulletoperator=8729,P.bullseye=9678,P.c=99,P.caarmenian=1390,P.cabengali=2458,P.cacute=263,P.cadeva=2330,P.cagujarati=2714,P.cagurmukhi=2586,P.calsquare=13192,P.candrabindubengali=2433,P.candrabinducmb=784,P.candrabindudeva=2305,P.candrabindugujarati=2689,P.capslock=8682,P.careof=8453,P.caron=711,P.caronbelowcmb=812,P.caroncmb=780,P.carriagereturn=8629,P.cbopomofo=12568,P.ccaron=269,P.ccedilla=231,P.ccedillaacute=7689,P.ccircle=9426,P.ccircumflex=265,P.ccurl=597,P.cdot=267,P.cdotaccent=267,P.cdsquare=13253,P.cedilla=184,P.cedillacmb=807,P.cent=162,P.centigrade=8451,P.centinferior=63199,P.centmonospace=65504,P.centoldstyle=63394,P.centsuperior=63200,P.chaarmenian=1401,P.chabengali=2459,P.chadeva=2331,P.chagujarati=2715,P.chagurmukhi=2587,P.chbopomofo=12564,P.cheabkhasiancyrillic=1213,P.checkmark=10003,P.checyrillic=1095,P.chedescenderabkhasiancyrillic=1215,P.chedescendercyrillic=1207,P.chedieresiscyrillic=1269,P.cheharmenian=1395,P.chekhakassiancyrillic=1228,P.cheverticalstrokecyrillic=1209,P.chi=967,P.chieuchacirclekorean=12919,P.chieuchaparenkorean=12823,P.chieuchcirclekorean=12905,P.chieuchkorean=12618,P.chieuchparenkorean=12809,P.chochangthai=3594,P.chochanthai=3592,P.chochingthai=3593,P.chochoethai=3596,P.chook=392,P.cieucacirclekorean=12918,P.cieucaparenkorean=12822,P.cieuccirclekorean=12904,P.cieuckorean=12616,P.cieucparenkorean=12808,P.cieucuparenkorean=12828,P.circle=9675,P.circlecopyrt=169,P.circlemultiply=8855,P.circleot=8857,P.circleplus=8853,P.circlepostalmark=12342,P.circlewithlefthalfblack=9680,P.circlewithrighthalfblack=9681,P.circumflex=710,P.circumflexbelowcmb=813,P.circumflexcmb=770,P.clear=8999,P.clickalveolar=450,P.clickdental=448,P.clicklateral=449,P.clickretroflex=451,P.club=9827,P.clubsuitblack=9827,P.clubsuitwhite=9831,P.cmcubedsquare=13220,P.cmonospace=65347,P.cmsquaredsquare=13216,P.coarmenian=1409,P.colon=58,P.colonmonetary=8353,P.colonmonospace=65306,P.colonsign=8353,P.colonsmall=65109,P.colontriangularhalfmod=721,P.colontriangularmod=720,P.comma=44,P.commaabovecmb=787,P.commaaboverightcmb=789,P.commaaccent=63171,P.commaarabic=1548,P.commaarmenian=1373,P.commainferior=63201,P.commamonospace=65292,P.commareversedabovecmb=788,P.commareversedmod=701,P.commasmall=65104,P.commasuperior=63202,P.commaturnedabovecmb=786,P.commaturnedmod=699,P.compass=9788,P.congruent=8773,P.contourintegral=8750,P.control=8963,P.controlACK=6,P.controlBEL=7,P.controlBS=8,P.controlCAN=24,P.controlCR=13,P.controlDC1=17,P.controlDC2=18,P.controlDC3=19,P.controlDC4=20,P.controlDEL=127,P.controlDLE=16,P.controlEM=25,P.controlENQ=5,P.controlEOT=4,P.controlESC=27,P.controlETB=23,P.controlETX=3,P.controlFF=12,P.controlFS=28,P.controlGS=29,P.controlHT=9,P.controlLF=10,P.controlNAK=21,P.controlNULL=0,P.controlRS=30,P.controlSI=15,P.controlSO=14,P.controlSOT=2,P.controlSTX=1,P.controlSUB=26,P.controlSYN=22,P.controlUS=31,P.controlVT=11,P.copyright=169,P.copyrightsans=63721,P.copyrightserif=63193,P.cornerbracketleft=12300,P.cornerbracketlefthalfwidth=65378,P.cornerbracketleftvertical=65089,P.cornerbracketright=12301,P.cornerbracketrighthalfwidth=65379,P.cornerbracketrightvertical=65090,P.corporationsquare=13183,P.cosquare=13255,P.coverkgsquare=13254,P.cparen=9374,P.cruzeiro=8354,P.cstretched=663,P.curlyand=8911,P.curlyor=8910,P.currency=164,P.cyrBreve=63185,P.cyrFlex=63186,P.cyrbreve=63188,P.cyrflex=63189,P.d=100,P.daarmenian=1380,P.dabengali=2470,P.dadarabic=1590,P.dadeva=2342,P.dadfinalarabic=65214,P.dadinitialarabic=65215,P.dadmedialarabic=65216,P.dagesh=1468,P.dageshhebrew=1468,P.dagger=8224,P.daggerdbl=8225,P.dagujarati=2726,P.dagurmukhi=2598,P.dahiragana=12384,P.dakatakana=12480,P.dalarabic=1583,P.dalet=1491,P.daletdagesh=64307,P.daletdageshhebrew=64307,P.dalethebrew=1491,P.dalfinalarabic=65194,P.dammaarabic=1615,P.dammalowarabic=1615,P.dammatanaltonearabic=1612,P.dammatanarabic=1612,P.danda=2404,P.dargahebrew=1447,P.dargalefthebrew=1447,P.dasiapneumatacyrilliccmb=1157,P.dblGrave=63187,P.dblanglebracketleft=12298,P.dblanglebracketleftvertical=65085,P.dblanglebracketright=12299,P.dblanglebracketrightvertical=65086,P.dblarchinvertedbelowcmb=811,P.dblarrowleft=8660,P.dblarrowright=8658,P.dbldanda=2405,P.dblgrave=63190,P.dblgravecmb=783,P.dblintegral=8748,P.dbllowline=8215,P.dbllowlinecmb=819,P.dbloverlinecmb=831,P.dblprimemod=698,P.dblverticalbar=8214,P.dblverticallineabovecmb=782,P.dbopomofo=12553,P.dbsquare=13256,P.dcaron=271,P.dcedilla=7697,P.dcircle=9427,P.dcircumflexbelow=7699,P.dcroat=273,P.ddabengali=2465,P.ddadeva=2337,P.ddagujarati=2721,P.ddagurmukhi=2593,P.ddalarabic=1672,P.ddalfinalarabic=64393,P.dddhadeva=2396,P.ddhabengali=2466,P.ddhadeva=2338,P.ddhagujarati=2722,P.ddhagurmukhi=2594,P.ddotaccent=7691,P.ddotbelow=7693,P.decimalseparatorarabic=1643,P.decimalseparatorpersian=1643,P.decyrillic=1076,P.degree=176,P.dehihebrew=1453,P.dehiragana=12391,P.deicoptic=1007,P.dekatakana=12487,P.deleteleft=9003,P.deleteright=8998,P.delta=948,P.deltaturned=397,P.denominatorminusonenumeratorbengali=2552,P.dezh=676,P.dhabengali=2471,P.dhadeva=2343,P.dhagujarati=2727,P.dhagurmukhi=2599,P.dhook=599,P.dialytikatonos=901,P.dialytikatonoscmb=836,P.diamond=9830,P.diamondsuitwhite=9826,P.dieresis=168,P.dieresisacute=63191,P.dieresisbelowcmb=804,P.dieresiscmb=776,P.dieresisgrave=63192,P.dieresistonos=901,P.dihiragana=12386,P.dikatakana=12482,P.dittomark=12291,P.divide=247,P.divides=8739,P.divisionslash=8725,P.djecyrillic=1106,P.dkshade=9619,P.dlinebelow=7695,P.dlsquare=13207,P.dmacron=273,P.dmonospace=65348,P.dnblock=9604,P.dochadathai=3598,P.dodekthai=3604,P.dohiragana=12393,P.dokatakana=12489,P.dollar=36,P.dollarinferior=63203,P.dollarmonospace=65284,P.dollaroldstyle=63268,P.dollarsmall=65129,P.dollarsuperior=63204,P.dong=8363,P.dorusquare=13094,P.dotaccent=729,P.dotaccentcmb=775,P.dotbelowcmb=803,P.dotbelowcomb=803,P.dotkatakana=12539,P.dotlessi=305,P.dotlessj=63166,P.dotlessjstrokehook=644,P.dotmath=8901,P.dottedcircle=9676,P.doubleyodpatah=64287,P.doubleyodpatahhebrew=64287,P.downtackbelowcmb=798,P.downtackmod=725,P.dparen=9375,P.dsuperior=63211,P.dtail=598,P.dtopbar=396,P.duhiragana=12389,P.dukatakana=12485,P.dz=499,P.dzaltone=675,P.dzcaron=454,P.dzcurl=677,P.dzeabkhasiancyrillic=1249,P.dzecyrillic=1109,P.dzhecyrillic=1119,P.e=101,P.eacute=233,P.earth=9793,P.ebengali=2447,P.ebopomofo=12572,P.ebreve=277,P.ecandradeva=2317,P.ecandragujarati=2701,P.ecandravowelsigndeva=2373,P.ecandravowelsigngujarati=2757,P.ecaron=283,P.ecedillabreve=7709,P.echarmenian=1381,P.echyiwnarmenian=1415,P.ecircle=9428,P.ecircumflex=234,P.ecircumflexacute=7871,P.ecircumflexbelow=7705,P.ecircumflexdotbelow=7879,P.ecircumflexgrave=7873,P.ecircumflexhookabove=7875,P.ecircumflextilde=7877,P.ecyrillic=1108,P.edblgrave=517,P.edeva=2319,P.edieresis=235,P.edot=279,P.edotaccent=279,P.edotbelow=7865,P.eegurmukhi=2575,P.eematragurmukhi=2631,P.efcyrillic=1092,P.egrave=232,P.egujarati=2703,P.eharmenian=1383,P.ehbopomofo=12573,P.ehiragana=12360,P.ehookabove=7867,P.eibopomofo=12575,P.eight=56,P.eightarabic=1640,P.eightbengali=2542,P.eightcircle=9319,P.eightcircleinversesansserif=10129,P.eightdeva=2414,P.eighteencircle=9329,P.eighteenparen=9349,P.eighteenperiod=9369,P.eightgujarati=2798,P.eightgurmukhi=2670,P.eighthackarabic=1640,P.eighthangzhou=12328,P.eighthnotebeamed=9835,P.eightideographicparen=12839,P.eightinferior=8328,P.eightmonospace=65304,P.eightoldstyle=63288,P.eightparen=9339,P.eightperiod=9359,P.eightpersian=1784,P.eightroman=8567,P.eightsuperior=8312,P.eightthai=3672,P.einvertedbreve=519,P.eiotifiedcyrillic=1125,P.ekatakana=12456,P.ekatakanahalfwidth=65396,P.ekonkargurmukhi=2676,P.ekorean=12628,P.elcyrillic=1083,P.element=8712,P.elevencircle=9322,P.elevenparen=9342,P.elevenperiod=9362,P.elevenroman=8570,P.ellipsis=8230,P.ellipsisvertical=8942,P.emacron=275,P.emacronacute=7703,P.emacrongrave=7701,P.emcyrillic=1084,P.emdash=8212,P.emdashvertical=65073,P.emonospace=65349,P.emphasismarkarmenian=1371,P.emptyset=8709,P.enbopomofo=12579,P.encyrillic=1085,P.endash=8211,P.endashvertical=65074,P.endescendercyrillic=1187,P.eng=331,P.engbopomofo=12581,P.enghecyrillic=1189,P.enhookcyrillic=1224,P.enspace=8194,P.eogonek=281,P.eokorean=12627,P.eopen=603,P.eopenclosed=666,P.eopenreversed=604,P.eopenreversedclosed=606,P.eopenreversedhook=605,P.eparen=9376,P.epsilon=949,P.epsilontonos=941,P.equal=61,P.equalmonospace=65309,P.equalsmall=65126,P.equalsuperior=8316,P.equivalence=8801,P.erbopomofo=12582,P.ercyrillic=1088,P.ereversed=600,P.ereversedcyrillic=1101,P.escyrillic=1089,P.esdescendercyrillic=1195,P.esh=643,P.eshcurl=646,P.eshortdeva=2318,P.eshortvowelsigndeva=2374,P.eshreversedloop=426,P.eshsquatreversed=645,P.esmallhiragana=12359,P.esmallkatakana=12455,P.esmallkatakanahalfwidth=65386,P.estimated=8494,P.esuperior=63212,P.eta=951,P.etarmenian=1384,P.etatonos=942,P.eth=240,P.etilde=7869,P.etildebelow=7707,P.etnahtafoukhhebrew=1425,P.etnahtafoukhlefthebrew=1425,P.etnahtahebrew=1425,P.etnahtalefthebrew=1425,P.eturned=477,P.eukorean=12641,P.euro=8364,P.evowelsignbengali=2503,P.evowelsigndeva=2375,P.evowelsigngujarati=2759,P.exclam=33,P.exclamarmenian=1372,P.exclamdbl=8252,P.exclamdown=161,P.exclamdownsmall=63393,P.exclammonospace=65281,P.exclamsmall=63265,P.existential=8707,P.ezh=658,P.ezhcaron=495,P.ezhcurl=659,P.ezhreversed=441,P.ezhtail=442,P.f=102,P.fadeva=2398,P.fagurmukhi=2654,P.fahrenheit=8457,P.fathaarabic=1614,P.fathalowarabic=1614,P.fathatanarabic=1611,P.fbopomofo=12552,P.fcircle=9429,P.fdotaccent=7711,P.feharabic=1601,P.feharmenian=1414,P.fehfinalarabic=65234,P.fehinitialarabic=65235,P.fehmedialarabic=65236,P.feicoptic=997,P.female=9792,P.ff=64256,P.f_f=64256,P.ffi=64259,P.f_f_i=64259,P.ffl=64260,P.f_f_l=64260,P.fi=64257,P.f_i=64257,P.fifteencircle=9326,P.fifteenparen=9346,P.fifteenperiod=9366,P.figuredash=8210,P.filledbox=9632,P.filledrect=9644,P.finalkaf=1498,P.finalkafdagesh=64314,P.finalkafdageshhebrew=64314,P.finalkafhebrew=1498,P.finalmem=1501,P.finalmemhebrew=1501,P.finalnun=1503,P.finalnunhebrew=1503,P.finalpe=1507,P.finalpehebrew=1507,P.finaltsadi=1509,P.finaltsadihebrew=1509,P.firsttonechinese=713,P.fisheye=9673,P.fitacyrillic=1139,P.five=53,P.fivearabic=1637,P.fivebengali=2539,P.fivecircle=9316,P.fivecircleinversesansserif=10126,P.fivedeva=2411,P.fiveeighths=8541,P.fivegujarati=2795,P.fivegurmukhi=2667,P.fivehackarabic=1637,P.fivehangzhou=12325,P.fiveideographicparen=12836,P.fiveinferior=8325,P.fivemonospace=65301,P.fiveoldstyle=63285,P.fiveparen=9336,P.fiveperiod=9356,P.fivepersian=1781,P.fiveroman=8564,P.fivesuperior=8309,P.fivethai=3669,P.fl=64258,P.f_l=64258,P.florin=402,P.fmonospace=65350,P.fmsquare=13209,P.fofanthai=3615,P.fofathai=3613,P.fongmanthai=3663,P.forall=8704,P.four=52,P.fourarabic=1636,P.fourbengali=2538,P.fourcircle=9315,P.fourcircleinversesansserif=10125,P.fourdeva=2410,P.fourgujarati=2794,P.fourgurmukhi=2666,P.fourhackarabic=1636,P.fourhangzhou=12324,P.fourideographicparen=12835,P.fourinferior=8324,P.fourmonospace=65300,P.fournumeratorbengali=2551,P.fouroldstyle=63284,P.fourparen=9335,P.fourperiod=9355,P.fourpersian=1780,P.fourroman=8563,P.foursuperior=8308,P.fourteencircle=9325,P.fourteenparen=9345,P.fourteenperiod=9365,P.fourthai=3668,P.fourthtonechinese=715,P.fparen=9377,P.fraction=8260,P.franc=8355,P.g=103,P.gabengali=2455,P.gacute=501,P.gadeva=2327,P.gafarabic=1711,P.gaffinalarabic=64403,P.gafinitialarabic=64404,P.gafmedialarabic=64405,P.gagujarati=2711,P.gagurmukhi=2583,P.gahiragana=12364,P.gakatakana=12460,P.gamma=947,P.gammalatinsmall=611,P.gammasuperior=736,P.gangiacoptic=1003,P.gbopomofo=12557,P.gbreve=287,P.gcaron=487,P.gcedilla=291,P.gcircle=9430,P.gcircumflex=285,P.gcommaaccent=291,P.gdot=289,P.gdotaccent=289,P.gecyrillic=1075,P.gehiragana=12370,P.gekatakana=12466,P.geometricallyequal=8785,P.gereshaccenthebrew=1436,P.gereshhebrew=1523,P.gereshmuqdamhebrew=1437,P.germandbls=223,P.gershayimaccenthebrew=1438,P.gershayimhebrew=1524,P.getamark=12307,P.ghabengali=2456,P.ghadarmenian=1394,P.ghadeva=2328,P.ghagujarati=2712,P.ghagurmukhi=2584,P.ghainarabic=1594,P.ghainfinalarabic=65230,P.ghaininitialarabic=65231,P.ghainmedialarabic=65232,P.ghemiddlehookcyrillic=1173,P.ghestrokecyrillic=1171,P.gheupturncyrillic=1169,P.ghhadeva=2394,P.ghhagurmukhi=2650,P.ghook=608,P.ghzsquare=13203,P.gihiragana=12366,P.gikatakana=12462,P.gimarmenian=1379,P.gimel=1490,P.gimeldagesh=64306,P.gimeldageshhebrew=64306,P.gimelhebrew=1490,P.gjecyrillic=1107,P.glottalinvertedstroke=446,P.glottalstop=660,P.glottalstopinverted=662,P.glottalstopmod=704,P.glottalstopreversed=661,P.glottalstopreversedmod=705,P.glottalstopreversedsuperior=740,P.glottalstopstroke=673,P.glottalstopstrokereversed=674,P.gmacron=7713,P.gmonospace=65351,P.gohiragana=12372,P.gokatakana=12468,P.gparen=9378,P.gpasquare=13228,P.gradient=8711,P.grave=96,P.gravebelowcmb=790,P.gravecmb=768,P.gravecomb=768,P.gravedeva=2387,P.gravelowmod=718,P.gravemonospace=65344,P.gravetonecmb=832,P.greater=62,P.greaterequal=8805,P.greaterequalorless=8923,P.greatermonospace=65310,P.greaterorequivalent=8819,P.greaterorless=8823,P.greateroverequal=8807,P.greatersmall=65125,P.gscript=609,P.gstroke=485,P.guhiragana=12368,P.guillemotleft=171,P.guillemotright=187,P.guilsinglleft=8249,P.guilsinglright=8250,P.gukatakana=12464,P.guramusquare=13080,P.gysquare=13257,P.h=104,P.haabkhasiancyrillic=1193,P.haaltonearabic=1729,P.habengali=2489,P.hadescendercyrillic=1203,P.hadeva=2361,P.hagujarati=2745,P.hagurmukhi=2617,P.haharabic=1581,P.hahfinalarabic=65186,P.hahinitialarabic=65187,P.hahiragana=12399,P.hahmedialarabic=65188,P.haitusquare=13098,P.hakatakana=12495,P.hakatakanahalfwidth=65418,P.halantgurmukhi=2637,P.hamzaarabic=1569,P.hamzalowarabic=1569,P.hangulfiller=12644,P.hardsigncyrillic=1098,P.harpoonleftbarbup=8636,P.harpoonrightbarbup=8640,P.hasquare=13258,P.hatafpatah=1458,P.hatafpatah16=1458,P.hatafpatah23=1458,P.hatafpatah2f=1458,P.hatafpatahhebrew=1458,P.hatafpatahnarrowhebrew=1458,P.hatafpatahquarterhebrew=1458,P.hatafpatahwidehebrew=1458,P.hatafqamats=1459,P.hatafqamats1b=1459,P.hatafqamats28=1459,P.hatafqamats34=1459,P.hatafqamatshebrew=1459,P.hatafqamatsnarrowhebrew=1459,P.hatafqamatsquarterhebrew=1459,P.hatafqamatswidehebrew=1459,P.hatafsegol=1457,P.hatafsegol17=1457,P.hatafsegol24=1457,P.hatafsegol30=1457,P.hatafsegolhebrew=1457,P.hatafsegolnarrowhebrew=1457,P.hatafsegolquarterhebrew=1457,P.hatafsegolwidehebrew=1457,P.hbar=295,P.hbopomofo=12559,P.hbrevebelow=7723,P.hcedilla=7721,P.hcircle=9431,P.hcircumflex=293,P.hdieresis=7719,P.hdotaccent=7715,P.hdotbelow=7717,P.he=1492,P.heart=9829,P.heartsuitblack=9829,P.heartsuitwhite=9825,P.hedagesh=64308,P.hedageshhebrew=64308,P.hehaltonearabic=1729,P.heharabic=1607,P.hehebrew=1492,P.hehfinalaltonearabic=64423,P.hehfinalalttwoarabic=65258,P.hehfinalarabic=65258,P.hehhamzaabovefinalarabic=64421,P.hehhamzaaboveisolatedarabic=64420,P.hehinitialaltonearabic=64424,P.hehinitialarabic=65259,P.hehiragana=12408,P.hehmedialaltonearabic=64425,P.hehmedialarabic=65260,P.heiseierasquare=13179,P.hekatakana=12504,P.hekatakanahalfwidth=65421,P.hekutaarusquare=13110,P.henghook=615,P.herutusquare=13113,P.het=1495,P.hethebrew=1495,P.hhook=614,P.hhooksuperior=689,P.hieuhacirclekorean=12923,P.hieuhaparenkorean=12827,P.hieuhcirclekorean=12909,P.hieuhkorean=12622,P.hieuhparenkorean=12813,P.hihiragana=12402,P.hikatakana=12498,P.hikatakanahalfwidth=65419,P.hiriq=1460,P.hiriq14=1460,P.hiriq21=1460,P.hiriq2d=1460,P.hiriqhebrew=1460,P.hiriqnarrowhebrew=1460,P.hiriqquarterhebrew=1460,P.hiriqwidehebrew=1460,P.hlinebelow=7830,P.hmonospace=65352,P.hoarmenian=1392,P.hohipthai=3627,P.hohiragana=12411,P.hokatakana=12507,P.hokatakanahalfwidth=65422,P.holam=1465,P.holam19=1465,P.holam26=1465,P.holam32=1465,P.holamhebrew=1465,P.holamnarrowhebrew=1465,P.holamquarterhebrew=1465,P.holamwidehebrew=1465,P.honokhukthai=3630,P.hookabovecomb=777,P.hookcmb=777,P.hookpalatalizedbelowcmb=801,P.hookretroflexbelowcmb=802,P.hoonsquare=13122,P.horicoptic=1001,P.horizontalbar=8213,P.horncmb=795,P.hotsprings=9832,P.house=8962,P.hparen=9379,P.hsuperior=688,P.hturned=613,P.huhiragana=12405,P.huiitosquare=13107,P.hukatakana=12501,P.hukatakanahalfwidth=65420,P.hungarumlaut=733,P.hungarumlautcmb=779,P.hv=405,P.hyphen=45,P.hypheninferior=63205,P.hyphenmonospace=65293,P.hyphensmall=65123,P.hyphensuperior=63206,P.hyphentwo=8208,P.i=105,P.iacute=237,P.iacyrillic=1103,P.ibengali=2439,P.ibopomofo=12583,P.ibreve=301,P.icaron=464,P.icircle=9432,P.icircumflex=238,P.icyrillic=1110,P.idblgrave=521,P.ideographearthcircle=12943,P.ideographfirecircle=12939,P.ideographicallianceparen=12863,P.ideographiccallparen=12858,P.ideographiccentrecircle=12965,P.ideographicclose=12294,P.ideographiccomma=12289,P.ideographiccommaleft=65380,P.ideographiccongratulationparen=12855,P.ideographiccorrectcircle=12963,P.ideographicearthparen=12847,P.ideographicenterpriseparen=12861,P.ideographicexcellentcircle=12957,P.ideographicfestivalparen=12864,P.ideographicfinancialcircle=12950,P.ideographicfinancialparen=12854,P.ideographicfireparen=12843,P.ideographichaveparen=12850,P.ideographichighcircle=12964,P.ideographiciterationmark=12293,P.ideographiclaborcircle=12952,P.ideographiclaborparen=12856,P.ideographicleftcircle=12967,P.ideographiclowcircle=12966,P.ideographicmedicinecircle=12969,P.ideographicmetalparen=12846,P.ideographicmoonparen=12842,P.ideographicnameparen=12852,P.ideographicperiod=12290,P.ideographicprintcircle=12958,P.ideographicreachparen=12867,P.ideographicrepresentparen=12857,P.ideographicresourceparen=12862,P.ideographicrightcircle=12968,P.ideographicsecretcircle=12953,P.ideographicselfparen=12866,P.ideographicsocietyparen=12851,P.ideographicspace=12288,P.ideographicspecialparen=12853,P.ideographicstockparen=12849,P.ideographicstudyparen=12859,P.ideographicsunparen=12848,P.ideographicsuperviseparen=12860,P.ideographicwaterparen=12844,P.ideographicwoodparen=12845,P.ideographiczero=12295,P.ideographmetalcircle=12942,P.ideographmooncircle=12938,P.ideographnamecircle=12948,P.ideographsuncircle=12944,P.ideographwatercircle=12940,P.ideographwoodcircle=12941,P.ideva=2311,P.idieresis=239,P.idieresisacute=7727,P.idieresiscyrillic=1253,P.idotbelow=7883,P.iebrevecyrillic=1239,P.iecyrillic=1077,P.ieungacirclekorean=12917,P.ieungaparenkorean=12821,P.ieungcirclekorean=12903,P.ieungkorean=12615,P.ieungparenkorean=12807,P.igrave=236,P.igujarati=2695,P.igurmukhi=2567,P.ihiragana=12356,P.ihookabove=7881,P.iibengali=2440,P.iicyrillic=1080,P.iideva=2312,P.iigujarati=2696,P.iigurmukhi=2568,P.iimatragurmukhi=2624,P.iinvertedbreve=523,P.iishortcyrillic=1081,P.iivowelsignbengali=2496,P.iivowelsigndeva=2368,P.iivowelsigngujarati=2752,P.ij=307,P.ikatakana=12452,P.ikatakanahalfwidth=65394,P.ikorean=12643,P.ilde=732,P.iluyhebrew=1452,P.imacron=299,P.imacroncyrillic=1251,P.imageorapproximatelyequal=8787,P.imatragurmukhi=2623,P.imonospace=65353,P.increment=8710,P.infinity=8734,P.iniarmenian=1387,P.integral=8747,P.integralbottom=8993,P.integralbt=8993,P.integralex=63733,P.integraltop=8992,P.integraltp=8992,P.intersection=8745,P.intisquare=13061,P.invbullet=9688,P.invcircle=9689,P.invsmileface=9787,P.iocyrillic=1105,P.iogonek=303,P.iota=953,P.iotadieresis=970,P.iotadieresistonos=912,P.iotalatin=617,P.iotatonos=943,P.iparen=9380,P.irigurmukhi=2674,P.ismallhiragana=12355,P.ismallkatakana=12451,P.ismallkatakanahalfwidth=65384,P.issharbengali=2554,P.istroke=616,P.isuperior=63213,P.iterationhiragana=12445,P.iterationkatakana=12541,P.itilde=297,P.itildebelow=7725,P.iubopomofo=12585,P.iucyrillic=1102,P.ivowelsignbengali=2495,P.ivowelsigndeva=2367,P.ivowelsigngujarati=2751,P.izhitsacyrillic=1141,P.izhitsadblgravecyrillic=1143,P.j=106,P.jaarmenian=1393,P.jabengali=2460,P.jadeva=2332,P.jagujarati=2716,P.jagurmukhi=2588,P.jbopomofo=12560,P.jcaron=496,P.jcircle=9433,P.jcircumflex=309,P.jcrossedtail=669,P.jdotlessstroke=607,P.jecyrillic=1112,P.jeemarabic=1580,P.jeemfinalarabic=65182,P.jeeminitialarabic=65183,P.jeemmedialarabic=65184,P.jeharabic=1688,P.jehfinalarabic=64395,P.jhabengali=2461,P.jhadeva=2333,P.jhagujarati=2717,P.jhagurmukhi=2589,P.jheharmenian=1403,P.jis=12292,P.jmonospace=65354,P.jparen=9381,P.jsuperior=690,P.k=107,P.kabashkircyrillic=1185,P.kabengali=2453,P.kacute=7729,P.kacyrillic=1082,P.kadescendercyrillic=1179,P.kadeva=2325,P.kaf=1499,P.kafarabic=1603,P.kafdagesh=64315,P.kafdageshhebrew=64315,P.kaffinalarabic=65242,P.kafhebrew=1499,P.kafinitialarabic=65243,P.kafmedialarabic=65244,P.kafrafehebrew=64333,P.kagujarati=2709,P.kagurmukhi=2581,P.kahiragana=12363,P.kahookcyrillic=1220,P.kakatakana=12459,P.kakatakanahalfwidth=65398,P.kappa=954,P.kappasymbolgreek=1008,P.kapyeounmieumkorean=12657,P.kapyeounphieuphkorean=12676,P.kapyeounpieupkorean=12664,P.kapyeounssangpieupkorean=12665,P.karoriisquare=13069,P.kashidaautoarabic=1600,P.kashidaautonosidebearingarabic=1600,P.kasmallkatakana=12533,P.kasquare=13188,P.kasraarabic=1616,P.kasratanarabic=1613,P.kastrokecyrillic=1183,P.katahiraprolongmarkhalfwidth=65392,P.kaverticalstrokecyrillic=1181,P.kbopomofo=12558,P.kcalsquare=13193,P.kcaron=489,P.kcedilla=311,P.kcircle=9434,P.kcommaaccent=311,P.kdotbelow=7731,P.keharmenian=1412,P.kehiragana=12369,P.kekatakana=12465,P.kekatakanahalfwidth=65401,P.kenarmenian=1391,P.kesmallkatakana=12534,P.kgreenlandic=312,P.khabengali=2454,P.khacyrillic=1093,P.khadeva=2326,P.khagujarati=2710,P.khagurmukhi=2582,P.khaharabic=1582,P.khahfinalarabic=65190,P.khahinitialarabic=65191,P.khahmedialarabic=65192,P.kheicoptic=999,P.khhadeva=2393,P.khhagurmukhi=2649,P.khieukhacirclekorean=12920,P.khieukhaparenkorean=12824,P.khieukhcirclekorean=12906,P.khieukhkorean=12619,P.khieukhparenkorean=12810,P.khokhaithai=3586,P.khokhonthai=3589,P.khokhuatthai=3587,P.khokhwaithai=3588,P.khomutthai=3675,P.khook=409,P.khorakhangthai=3590,P.khzsquare=13201,P.kihiragana=12365,P.kikatakana=12461,P.kikatakanahalfwidth=65399,P.kiroguramusquare=13077,P.kiromeetorusquare=13078,P.kirosquare=13076,P.kiyeokacirclekorean=12910,P.kiyeokaparenkorean=12814,P.kiyeokcirclekorean=12896,P.kiyeokkorean=12593,P.kiyeokparenkorean=12800,P.kiyeoksioskorean=12595,P.kjecyrillic=1116,P.klinebelow=7733,P.klsquare=13208,P.kmcubedsquare=13222,P.kmonospace=65355,P.kmsquaredsquare=13218,P.kohiragana=12371,P.kohmsquare=13248,P.kokaithai=3585,P.kokatakana=12467,P.kokatakanahalfwidth=65402,P.kooposquare=13086,P.koppacyrillic=1153,P.koreanstandardsymbol=12927,P.koroniscmb=835,P.kparen=9382,P.kpasquare=13226,P.ksicyrillic=1135,P.ktsquare=13263,P.kturned=670,P.kuhiragana=12367,P.kukatakana=12463,P.kukatakanahalfwidth=65400,P.kvsquare=13240,P.kwsquare=13246,P.l=108,P.labengali=2482,P.lacute=314,P.ladeva=2354,P.lagujarati=2738,P.lagurmukhi=2610,P.lakkhangyaothai=3653,P.lamaleffinalarabic=65276,P.lamalefhamzaabovefinalarabic=65272,P.lamalefhamzaaboveisolatedarabic=65271,P.lamalefhamzabelowfinalarabic=65274,P.lamalefhamzabelowisolatedarabic=65273,P.lamalefisolatedarabic=65275,P.lamalefmaddaabovefinalarabic=65270,P.lamalefmaddaaboveisolatedarabic=65269,P.lamarabic=1604,P.lambda=955,P.lambdastroke=411,P.lamed=1500,P.lameddagesh=64316,P.lameddageshhebrew=64316,P.lamedhebrew=1500,P.lamfinalarabic=65246,P.lamhahinitialarabic=64714,P.laminitialarabic=65247,P.lamjeeminitialarabic=64713,P.lamkhahinitialarabic=64715,P.lamlamhehisolatedarabic=65010,P.lammedialarabic=65248,P.lammeemhahinitialarabic=64904,P.lammeeminitialarabic=64716,P.largecircle=9711,P.lbar=410,P.lbelt=620,P.lbopomofo=12556,P.lcaron=318,P.lcedilla=316,P.lcircle=9435,P.lcircumflexbelow=7741,P.lcommaaccent=316,P.ldot=320,P.ldotaccent=320,P.ldotbelow=7735,P.ldotbelowmacron=7737,P.leftangleabovecmb=794,P.lefttackbelowcmb=792,P.less=60,P.lessequal=8804,P.lessequalorgreater=8922,P.lessmonospace=65308,P.lessorequivalent=8818,P.lessorgreater=8822,P.lessoverequal=8806,P.lesssmall=65124,P.lezh=622,P.lfblock=9612,P.lhookretroflex=621,P.lira=8356,P.liwnarmenian=1388,P.lj=457,P.ljecyrillic=1113,P.ll=63168,P.lladeva=2355,P.llagujarati=2739,P.llinebelow=7739,P.llladeva=2356,P.llvocalicbengali=2529,P.llvocalicdeva=2401,P.llvocalicvowelsignbengali=2531,P.llvocalicvowelsigndeva=2403,P.lmiddletilde=619,P.lmonospace=65356,P.lmsquare=13264,P.lochulathai=3628,P.logicaland=8743,P.logicalnot=172,P.logicalnotreversed=8976,P.logicalor=8744,P.lolingthai=3621,P.longs=383,P.lowlinecenterline=65102,P.lowlinecmb=818,P.lowlinedashed=65101,P.lozenge=9674,P.lparen=9383,P.lslash=322,P.lsquare=8467,P.lsuperior=63214,P.ltshade=9617,P.luthai=3622,P.lvocalicbengali=2444,P.lvocalicdeva=2316,P.lvocalicvowelsignbengali=2530,P.lvocalicvowelsigndeva=2402,P.lxsquare=13267,P.m=109,P.mabengali=2478,P.macron=175,P.macronbelowcmb=817,P.macroncmb=772,P.macronlowmod=717,P.macronmonospace=65507,P.macute=7743,P.madeva=2350,P.magujarati=2734,P.magurmukhi=2606,P.mahapakhhebrew=1444,P.mahapakhlefthebrew=1444,P.mahiragana=12414,P.maichattawalowleftthai=63637,P.maichattawalowrightthai=63636,P.maichattawathai=3659,P.maichattawaupperleftthai=63635,P.maieklowleftthai=63628,P.maieklowrightthai=63627,P.maiekthai=3656,P.maiekupperleftthai=63626,P.maihanakatleftthai=63620,P.maihanakatthai=3633,P.maitaikhuleftthai=63625,P.maitaikhuthai=3655,P.maitholowleftthai=63631,P.maitholowrightthai=63630,P.maithothai=3657,P.maithoupperleftthai=63629,P.maitrilowleftthai=63634,P.maitrilowrightthai=63633,P.maitrithai=3658,P.maitriupperleftthai=63632,P.maiyamokthai=3654,P.makatakana=12510,P.makatakanahalfwidth=65423,P.male=9794,P.mansyonsquare=13127,P.maqafhebrew=1470,P.mars=9794,P.masoracirclehebrew=1455,P.masquare=13187,P.mbopomofo=12551,P.mbsquare=13268,P.mcircle=9436,P.mcubedsquare=13221,P.mdotaccent=7745,P.mdotbelow=7747,P.meemarabic=1605,P.meemfinalarabic=65250,P.meeminitialarabic=65251,P.meemmedialarabic=65252,P.meemmeeminitialarabic=64721,P.meemmeemisolatedarabic=64584,P.meetorusquare=13133,P.mehiragana=12417,P.meizierasquare=13182,P.mekatakana=12513,P.mekatakanahalfwidth=65426,P.mem=1502,P.memdagesh=64318,P.memdageshhebrew=64318,P.memhebrew=1502,P.menarmenian=1396,P.merkhahebrew=1445,P.merkhakefulahebrew=1446,P.merkhakefulalefthebrew=1446,P.merkhalefthebrew=1445,P.mhook=625,P.mhzsquare=13202,P.middledotkatakanahalfwidth=65381,P.middot=183,P.mieumacirclekorean=12914,P.mieumaparenkorean=12818,P.mieumcirclekorean=12900,P.mieumkorean=12609,P.mieumpansioskorean=12656,P.mieumparenkorean=12804,P.mieumpieupkorean=12654,P.mieumsioskorean=12655,P.mihiragana=12415,P.mikatakana=12511,P.mikatakanahalfwidth=65424,P.minus=8722,P.minusbelowcmb=800,P.minuscircle=8854,P.minusmod=727,P.minusplus=8723,P.minute=8242,P.miribaarusquare=13130,P.mirisquare=13129,P.mlonglegturned=624,P.mlsquare=13206,P.mmcubedsquare=13219,P.mmonospace=65357,P.mmsquaredsquare=13215,P.mohiragana=12418,P.mohmsquare=13249,P.mokatakana=12514,P.mokatakanahalfwidth=65427,P.molsquare=13270,P.momathai=3617,P.moverssquare=13223,P.moverssquaredsquare=13224,P.mparen=9384,P.mpasquare=13227,P.mssquare=13235,P.msuperior=63215,P.mturned=623,P.mu=181,P.mu1=181,P.muasquare=13186,P.muchgreater=8811,P.muchless=8810,P.mufsquare=13196,P.mugreek=956,P.mugsquare=13197,P.muhiragana=12416,P.mukatakana=12512,P.mukatakanahalfwidth=65425,P.mulsquare=13205,P.multiply=215,P.mumsquare=13211,P.munahhebrew=1443,P.munahlefthebrew=1443,P.musicalnote=9834,P.musicalnotedbl=9835,P.musicflatsign=9837,P.musicsharpsign=9839,P.mussquare=13234,P.muvsquare=13238,P.muwsquare=13244,P.mvmegasquare=13241,P.mvsquare=13239,P.mwmegasquare=13247,P.mwsquare=13245,P.n=110,P.nabengali=2472,P.nabla=8711,P.nacute=324,P.nadeva=2344,P.nagujarati=2728,P.nagurmukhi=2600,P.nahiragana=12394,P.nakatakana=12490,P.nakatakanahalfwidth=65413,P.napostrophe=329,P.nasquare=13185,P.nbopomofo=12555,P.nbspace=160,P.ncaron=328,P.ncedilla=326,P.ncircle=9437,P.ncircumflexbelow=7755,P.ncommaaccent=326,P.ndotaccent=7749,P.ndotbelow=7751,P.nehiragana=12397,P.nekatakana=12493,P.nekatakanahalfwidth=65416,P.newsheqelsign=8362,P.nfsquare=13195,P.ngabengali=2457,P.ngadeva=2329,P.ngagujarati=2713,P.ngagurmukhi=2585,P.ngonguthai=3591,P.nhiragana=12435,P.nhookleft=626,P.nhookretroflex=627,P.nieunacirclekorean=12911,P.nieunaparenkorean=12815,P.nieuncieuckorean=12597,P.nieuncirclekorean=12897,P.nieunhieuhkorean=12598,P.nieunkorean=12596,P.nieunpansioskorean=12648,P.nieunparenkorean=12801,P.nieunsioskorean=12647,P.nieuntikeutkorean=12646,P.nihiragana=12395,P.nikatakana=12491,P.nikatakanahalfwidth=65414,P.nikhahitleftthai=63641,P.nikhahitthai=3661,P.nine=57,P.ninearabic=1641,P.ninebengali=2543,P.ninecircle=9320,P.ninecircleinversesansserif=10130,P.ninedeva=2415,P.ninegujarati=2799,P.ninegurmukhi=2671,P.ninehackarabic=1641,P.ninehangzhou=12329,P.nineideographicparen=12840,P.nineinferior=8329,P.ninemonospace=65305,P.nineoldstyle=63289,P.nineparen=9340,P.nineperiod=9360,P.ninepersian=1785,P.nineroman=8568,P.ninesuperior=8313,P.nineteencircle=9330,P.nineteenparen=9350,P.nineteenperiod=9370,P.ninethai=3673,P.nj=460,P.njecyrillic=1114,P.nkatakana=12531,P.nkatakanahalfwidth=65437,P.nlegrightlong=414,P.nlinebelow=7753,P.nmonospace=65358,P.nmsquare=13210,P.nnabengali=2467,P.nnadeva=2339,P.nnagujarati=2723,P.nnagurmukhi=2595,P.nnnadeva=2345,P.nohiragana=12398,P.nokatakana=12494,P.nokatakanahalfwidth=65417,P.nonbreakingspace=160,P.nonenthai=3603,P.nonuthai=3609,P.noonarabic=1606,P.noonfinalarabic=65254,P.noonghunnaarabic=1722,P.noonghunnafinalarabic=64415,P.nooninitialarabic=65255,P.noonjeeminitialarabic=64722,P.noonjeemisolatedarabic=64587,P.noonmedialarabic=65256,P.noonmeeminitialarabic=64725,P.noonmeemisolatedarabic=64590,P.noonnoonfinalarabic=64653,P.notcontains=8716,P.notelement=8713,P.notelementof=8713,P.notequal=8800,P.notgreater=8815,P.notgreaternorequal=8817,P.notgreaternorless=8825,P.notidentical=8802,P.notless=8814,P.notlessnorequal=8816,P.notparallel=8742,P.notprecedes=8832,P.notsubset=8836,P.notsucceeds=8833,P.notsuperset=8837,P.nowarmenian=1398,P.nparen=9385,P.nssquare=13233,P.nsuperior=8319,P.ntilde=241,P.nu=957,P.nuhiragana=12396,P.nukatakana=12492,P.nukatakanahalfwidth=65415,P.nuktabengali=2492,P.nuktadeva=2364,P.nuktagujarati=2748,P.nuktagurmukhi=2620,P.numbersign=35,P.numbersignmonospace=65283,P.numbersignsmall=65119,P.numeralsigngreek=884,P.numeralsignlowergreek=885,P.numero=8470,P.nun=1504,P.nundagesh=64320,P.nundageshhebrew=64320,P.nunhebrew=1504,P.nvsquare=13237,P.nwsquare=13243,P.nyabengali=2462,P.nyadeva=2334,P.nyagujarati=2718,P.nyagurmukhi=2590,P.o=111,P.oacute=243,P.oangthai=3629,P.obarred=629,P.obarredcyrillic=1257,P.obarreddieresiscyrillic=1259,P.obengali=2451,P.obopomofo=12571,P.obreve=335,P.ocandradeva=2321,P.ocandragujarati=2705,P.ocandravowelsigndeva=2377,P.ocandravowelsigngujarati=2761,P.ocaron=466,P.ocircle=9438,P.ocircumflex=244,P.ocircumflexacute=7889,P.ocircumflexdotbelow=7897,P.ocircumflexgrave=7891,P.ocircumflexhookabove=7893,P.ocircumflextilde=7895,P.ocyrillic=1086,P.odblacute=337,P.odblgrave=525,P.odeva=2323,P.odieresis=246,P.odieresiscyrillic=1255,P.odotbelow=7885,P.oe=339,P.oekorean=12634,P.ogonek=731,P.ogonekcmb=808,P.ograve=242,P.ogujarati=2707,P.oharmenian=1413,P.ohiragana=12362,P.ohookabove=7887,P.ohorn=417,P.ohornacute=7899,P.ohorndotbelow=7907,P.ohorngrave=7901,P.ohornhookabove=7903,P.ohorntilde=7905,P.ohungarumlaut=337,P.oi=419,P.oinvertedbreve=527,P.okatakana=12458,P.okatakanahalfwidth=65397,P.okorean=12631,P.olehebrew=1451,P.omacron=333,P.omacronacute=7763,P.omacrongrave=7761,P.omdeva=2384,P.omega=969,P.omega1=982,P.omegacyrillic=1121,P.omegalatinclosed=631,P.omegaroundcyrillic=1147,P.omegatitlocyrillic=1149,P.omegatonos=974,P.omgujarati=2768,P.omicron=959,P.omicrontonos=972,P.omonospace=65359,P.one=49,P.onearabic=1633,P.onebengali=2535,P.onecircle=9312,P.onecircleinversesansserif=10122,P.onedeva=2407,P.onedotenleader=8228,P.oneeighth=8539,P.onefitted=63196,P.onegujarati=2791,P.onegurmukhi=2663,P.onehackarabic=1633,P.onehalf=189,P.onehangzhou=12321,P.oneideographicparen=12832,P.oneinferior=8321,P.onemonospace=65297,P.onenumeratorbengali=2548,P.oneoldstyle=63281,P.oneparen=9332,P.oneperiod=9352,P.onepersian=1777,P.onequarter=188,P.oneroman=8560,P.onesuperior=185,P.onethai=3665,P.onethird=8531,P.oogonek=491,P.oogonekmacron=493,P.oogurmukhi=2579,P.oomatragurmukhi=2635,P.oopen=596,P.oparen=9386,P.openbullet=9702,P.option=8997,P.ordfeminine=170,P.ordmasculine=186,P.orthogonal=8735,P.oshortdeva=2322,P.oshortvowelsigndeva=2378,P.oslash=248,P.oslashacute=511,P.osmallhiragana=12361,P.osmallkatakana=12457,P.osmallkatakanahalfwidth=65387,P.ostrokeacute=511,P.osuperior=63216,P.otcyrillic=1151,P.otilde=245,P.otildeacute=7757,P.otildedieresis=7759,P.oubopomofo=12577,P.overline=8254,P.overlinecenterline=65098,P.overlinecmb=773,P.overlinedashed=65097,P.overlinedblwavy=65100,P.overlinewavy=65099,P.overscore=175,P.ovowelsignbengali=2507,P.ovowelsigndeva=2379,P.ovowelsigngujarati=2763,P.p=112,P.paampssquare=13184,P.paasentosquare=13099,P.pabengali=2474,P.pacute=7765,P.padeva=2346,P.pagedown=8671,P.pageup=8670,P.pagujarati=2730,P.pagurmukhi=2602,P.pahiragana=12401,P.paiyannoithai=3631,P.pakatakana=12497,P.palatalizationcyrilliccmb=1156,P.palochkacyrillic=1216,P.pansioskorean=12671,P.paragraph=182,P.parallel=8741,P.parenleft=40,P.parenleftaltonearabic=64830,P.parenleftbt=63725,P.parenleftex=63724,P.parenleftinferior=8333,P.parenleftmonospace=65288,P.parenleftsmall=65113,P.parenleftsuperior=8317,P.parenlefttp=63723,P.parenleftvertical=65077,P.parenright=41,P.parenrightaltonearabic=64831,P.parenrightbt=63736,P.parenrightex=63735,P.parenrightinferior=8334,P.parenrightmonospace=65289,P.parenrightsmall=65114,P.parenrightsuperior=8318,P.parenrighttp=63734,P.parenrightvertical=65078,P.partialdiff=8706,P.paseqhebrew=1472,P.pashtahebrew=1433,P.pasquare=13225,P.patah=1463,P.patah11=1463,P.patah1d=1463,P.patah2a=1463,P.patahhebrew=1463,P.patahnarrowhebrew=1463,P.patahquarterhebrew=1463,P.patahwidehebrew=1463,P.pazerhebrew=1441,P.pbopomofo=12550,P.pcircle=9439,P.pdotaccent=7767,P.pe=1508,P.pecyrillic=1087,P.pedagesh=64324,P.pedageshhebrew=64324,P.peezisquare=13115,P.pefinaldageshhebrew=64323,P.peharabic=1662,P.peharmenian=1402,P.pehebrew=1508,P.pehfinalarabic=64343,P.pehinitialarabic=64344,P.pehiragana=12410,P.pehmedialarabic=64345,P.pekatakana=12506,P.pemiddlehookcyrillic=1191,P.perafehebrew=64334,P.percent=37,P.percentarabic=1642,P.percentmonospace=65285,P.percentsmall=65130,P.period=46,P.periodarmenian=1417,P.periodcentered=183,P.periodhalfwidth=65377,P.periodinferior=63207,P.periodmonospace=65294,P.periodsmall=65106,P.periodsuperior=63208,P.perispomenigreekcmb=834,P.perpendicular=8869,P.perthousand=8240,P.peseta=8359,P.pfsquare=13194,P.phabengali=2475,P.phadeva=2347,P.phagujarati=2731,P.phagurmukhi=2603,P.phi=966,P.phi1=981,P.phieuphacirclekorean=12922,P.phieuphaparenkorean=12826,P.phieuphcirclekorean=12908,P.phieuphkorean=12621,P.phieuphparenkorean=12812,P.philatin=632,P.phinthuthai=3642,P.phisymbolgreek=981,P.phook=421,P.phophanthai=3614,P.phophungthai=3612,P.phosamphaothai=3616,P.pi=960,P.pieupacirclekorean=12915,P.pieupaparenkorean=12819,P.pieupcieuckorean=12662,P.pieupcirclekorean=12901,P.pieupkiyeokkorean=12658,P.pieupkorean=12610,P.pieupparenkorean=12805,P.pieupsioskiyeokkorean=12660,P.pieupsioskorean=12612,P.pieupsiostikeutkorean=12661,P.pieupthieuthkorean=12663,P.pieuptikeutkorean=12659,P.pihiragana=12404,P.pikatakana=12500,P.pisymbolgreek=982,P.piwrarmenian=1411,P.planckover2pi=8463,P.planckover2pi1=8463,P.plus=43,P.plusbelowcmb=799,P.pluscircle=8853,P.plusminus=177,P.plusmod=726,P.plusmonospace=65291,P.plussmall=65122,P.plussuperior=8314,P.pmonospace=65360,P.pmsquare=13272,P.pohiragana=12413,P.pointingindexdownwhite=9759,P.pointingindexleftwhite=9756,P.pointingindexrightwhite=9758,P.pointingindexupwhite=9757,P.pokatakana=12509,P.poplathai=3611,P.postalmark=12306,P.postalmarkface=12320,P.pparen=9387,P.precedes=8826,P.prescription=8478,P.primemod=697,P.primereversed=8245,P.product=8719,P.projective=8965,P.prolongedkana=12540,P.propellor=8984,P.propersubset=8834,P.propersuperset=8835,P.proportion=8759,P.proportional=8733,P.psi=968,P.psicyrillic=1137,P.psilipneumatacyrilliccmb=1158,P.pssquare=13232,P.puhiragana=12407,P.pukatakana=12503,P.pvsquare=13236,P.pwsquare=13242,P.q=113,P.qadeva=2392,P.qadmahebrew=1448,P.qafarabic=1602,P.qaffinalarabic=65238,P.qafinitialarabic=65239,P.qafmedialarabic=65240,P.qamats=1464,P.qamats10=1464,P.qamats1a=1464,P.qamats1c=1464,P.qamats27=1464,P.qamats29=1464,P.qamats33=1464,P.qamatsde=1464,P.qamatshebrew=1464,P.qamatsnarrowhebrew=1464,P.qamatsqatanhebrew=1464,P.qamatsqatannarrowhebrew=1464,P.qamatsqatanquarterhebrew=1464,P.qamatsqatanwidehebrew=1464,P.qamatsquarterhebrew=1464,P.qamatswidehebrew=1464,P.qarneyparahebrew=1439,P.qbopomofo=12561,P.qcircle=9440,P.qhook=672,P.qmonospace=65361,P.qof=1511,P.qofdagesh=64327,P.qofdageshhebrew=64327,P.qofhebrew=1511,P.qparen=9388,P.quarternote=9833,P.qubuts=1467,P.qubuts18=1467,P.qubuts25=1467,P.qubuts31=1467,P.qubutshebrew=1467,P.qubutsnarrowhebrew=1467,P.qubutsquarterhebrew=1467,P.qubutswidehebrew=1467,P.question=63,P.questionarabic=1567,P.questionarmenian=1374,P.questiondown=191,P.questiondownsmall=63423,P.questiongreek=894,P.questionmonospace=65311,P.questionsmall=63295,P.quotedbl=34,P.quotedblbase=8222,P.quotedblleft=8220,P.quotedblmonospace=65282,P.quotedblprime=12318,P.quotedblprimereversed=12317,P.quotedblright=8221,P.quoteleft=8216,P.quoteleftreversed=8219,P.quotereversed=8219,P.quoteright=8217,P.quoterightn=329,P.quotesinglbase=8218,P.quotesingle=39,P.quotesinglemonospace=65287,P.r=114,P.raarmenian=1404,P.rabengali=2480,P.racute=341,P.radeva=2352,P.radical=8730,P.radicalex=63717,P.radoverssquare=13230,P.radoverssquaredsquare=13231,P.radsquare=13229,P.rafe=1471,P.rafehebrew=1471,P.ragujarati=2736,P.ragurmukhi=2608,P.rahiragana=12425,P.rakatakana=12521,P.rakatakanahalfwidth=65431,P.ralowerdiagonalbengali=2545,P.ramiddlediagonalbengali=2544,P.ramshorn=612,P.ratio=8758,P.rbopomofo=12566,P.rcaron=345,P.rcedilla=343,P.rcircle=9441,P.rcommaaccent=343,P.rdblgrave=529,P.rdotaccent=7769,P.rdotbelow=7771,P.rdotbelowmacron=7773,P.referencemark=8251,P.reflexsubset=8838,P.reflexsuperset=8839,P.registered=174,P.registersans=63720,P.registerserif=63194,P.reharabic=1585,P.reharmenian=1408,P.rehfinalarabic=65198,P.rehiragana=12428,P.rekatakana=12524,P.rekatakanahalfwidth=65434,P.resh=1512,P.reshdageshhebrew=64328,P.reshhebrew=1512,P.reversedtilde=8765,P.reviahebrew=1431,P.reviamugrashhebrew=1431,P.revlogicalnot=8976,P.rfishhook=638,P.rfishhookreversed=639,P.rhabengali=2525,P.rhadeva=2397,P.rho=961,P.rhook=637,P.rhookturned=635,P.rhookturnedsuperior=693,P.rhosymbolgreek=1009,P.rhotichookmod=734,P.rieulacirclekorean=12913,P.rieulaparenkorean=12817,P.rieulcirclekorean=12899,P.rieulhieuhkorean=12608,P.rieulkiyeokkorean=12602,P.rieulkiyeoksioskorean=12649,P.rieulkorean=12601,P.rieulmieumkorean=12603,P.rieulpansioskorean=12652,P.rieulparenkorean=12803,P.rieulphieuphkorean=12607,P.rieulpieupkorean=12604,P.rieulpieupsioskorean=12651,P.rieulsioskorean=12605,P.rieulthieuthkorean=12606,P.rieultikeutkorean=12650,P.rieulyeorinhieuhkorean=12653,P.rightangle=8735,P.righttackbelowcmb=793,P.righttriangle=8895,P.rihiragana=12426,P.rikatakana=12522,P.rikatakanahalfwidth=65432,P.ring=730,P.ringbelowcmb=805,P.ringcmb=778,P.ringhalfleft=703,P.ringhalfleftarmenian=1369,P.ringhalfleftbelowcmb=796,P.ringhalfleftcentered=723,P.ringhalfright=702,P.ringhalfrightbelowcmb=825,P.ringhalfrightcentered=722,P.rinvertedbreve=531,P.rittorusquare=13137,P.rlinebelow=7775,P.rlongleg=636,P.rlonglegturned=634,P.rmonospace=65362,P.rohiragana=12429,P.rokatakana=12525,P.rokatakanahalfwidth=65435,P.roruathai=3619,P.rparen=9389,P.rrabengali=2524,P.rradeva=2353,P.rragurmukhi=2652,P.rreharabic=1681,P.rrehfinalarabic=64397,P.rrvocalicbengali=2528,P.rrvocalicdeva=2400,P.rrvocalicgujarati=2784,P.rrvocalicvowelsignbengali=2500,P.rrvocalicvowelsigndeva=2372,P.rrvocalicvowelsigngujarati=2756,P.rsuperior=63217,P.rtblock=9616,P.rturned=633,P.rturnedsuperior=692,P.ruhiragana=12427,P.rukatakana=12523,P.rukatakanahalfwidth=65433,P.rupeemarkbengali=2546,P.rupeesignbengali=2547,P.rupiah=63197,P.ruthai=3620,P.rvocalicbengali=2443,P.rvocalicdeva=2315,P.rvocalicgujarati=2699,P.rvocalicvowelsignbengali=2499,P.rvocalicvowelsigndeva=2371,P.rvocalicvowelsigngujarati=2755,P.s=115,P.sabengali=2488,P.sacute=347,P.sacutedotaccent=7781,P.sadarabic=1589,P.sadeva=2360,P.sadfinalarabic=65210,P.sadinitialarabic=65211,P.sadmedialarabic=65212,P.sagujarati=2744,P.sagurmukhi=2616,P.sahiragana=12373,P.sakatakana=12469,P.sakatakanahalfwidth=65403,P.sallallahoualayhewasallamarabic=65018,P.samekh=1505,P.samekhdagesh=64321,P.samekhdageshhebrew=64321,P.samekhhebrew=1505,P.saraaathai=3634,P.saraaethai=3649,P.saraaimaimalaithai=3652,P.saraaimaimuanthai=3651,P.saraamthai=3635,P.saraathai=3632,P.saraethai=3648,P.saraiileftthai=63622,P.saraiithai=3637,P.saraileftthai=63621,P.saraithai=3636,P.saraothai=3650,P.saraueeleftthai=63624,P.saraueethai=3639,P.saraueleftthai=63623,P.sarauethai=3638,P.sarauthai=3640,P.sarauuthai=3641,P.sbopomofo=12569,P.scaron=353,P.scarondotaccent=7783,P.scedilla=351,P.schwa=601,P.schwacyrillic=1241,P.schwadieresiscyrillic=1243,P.schwahook=602,P.scircle=9442,P.scircumflex=349,P.scommaaccent=537,P.sdotaccent=7777,P.sdotbelow=7779,P.sdotbelowdotaccent=7785,P.seagullbelowcmb=828,P.second=8243,P.secondtonechinese=714,P.section=167,P.seenarabic=1587,P.seenfinalarabic=65202,P.seeninitialarabic=65203,P.seenmedialarabic=65204,P.segol=1462,P.segol13=1462,P.segol1f=1462,P.segol2c=1462,P.segolhebrew=1462,P.segolnarrowhebrew=1462,P.segolquarterhebrew=1462,P.segoltahebrew=1426,P.segolwidehebrew=1462,P.seharmenian=1405,P.sehiragana=12379,P.sekatakana=12475,P.sekatakanahalfwidth=65406,P.semicolon=59,P.semicolonarabic=1563,P.semicolonmonospace=65307,P.semicolonsmall=65108,P.semivoicedmarkkana=12444,P.semivoicedmarkkanahalfwidth=65439,P.sentisquare=13090,P.sentosquare=13091,P.seven=55,P.sevenarabic=1639,P.sevenbengali=2541,P.sevencircle=9318,P.sevencircleinversesansserif=10128,P.sevendeva=2413,P.seveneighths=8542,P.sevengujarati=2797,P.sevengurmukhi=2669,P.sevenhackarabic=1639,P.sevenhangzhou=12327,P.sevenideographicparen=12838,P.seveninferior=8327,P.sevenmonospace=65303,P.sevenoldstyle=63287,P.sevenparen=9338,P.sevenperiod=9358,P.sevenpersian=1783,P.sevenroman=8566,P.sevensuperior=8311,P.seventeencircle=9328,P.seventeenparen=9348,P.seventeenperiod=9368,P.seventhai=3671,P.sfthyphen=173,P.shaarmenian=1399,P.shabengali=2486,P.shacyrillic=1096,P.shaddaarabic=1617,P.shaddadammaarabic=64609,P.shaddadammatanarabic=64606,P.shaddafathaarabic=64608,P.shaddakasraarabic=64610,P.shaddakasratanarabic=64607,P.shade=9618,P.shadedark=9619,P.shadelight=9617,P.shademedium=9618,P.shadeva=2358,P.shagujarati=2742,P.shagurmukhi=2614,P.shalshelethebrew=1427,P.shbopomofo=12565,P.shchacyrillic=1097,P.sheenarabic=1588,P.sheenfinalarabic=65206,P.sheeninitialarabic=65207,P.sheenmedialarabic=65208,P.sheicoptic=995,P.sheqel=8362,P.sheqelhebrew=8362,P.sheva=1456,P.sheva115=1456,P.sheva15=1456,P.sheva22=1456,P.sheva2e=1456,P.shevahebrew=1456,P.shevanarrowhebrew=1456,P.shevaquarterhebrew=1456,P.shevawidehebrew=1456,P.shhacyrillic=1211,P.shimacoptic=1005,P.shin=1513,P.shindagesh=64329,P.shindageshhebrew=64329,P.shindageshshindot=64300,P.shindageshshindothebrew=64300,P.shindageshsindot=64301,P.shindageshsindothebrew=64301,P.shindothebrew=1473,P.shinhebrew=1513,P.shinshindot=64298,P.shinshindothebrew=64298,P.shinsindot=64299,P.shinsindothebrew=64299,P.shook=642,P.sigma=963,P.sigma1=962,P.sigmafinal=962,P.sigmalunatesymbolgreek=1010,P.sihiragana=12375,P.sikatakana=12471,P.sikatakanahalfwidth=65404,P.siluqhebrew=1469,P.siluqlefthebrew=1469,P.similar=8764,P.sindothebrew=1474,P.siosacirclekorean=12916,P.siosaparenkorean=12820,P.sioscieuckorean=12670,P.sioscirclekorean=12902,P.sioskiyeokkorean=12666,P.sioskorean=12613,P.siosnieunkorean=12667,P.siosparenkorean=12806,P.siospieupkorean=12669,P.siostikeutkorean=12668,P.six=54,P.sixarabic=1638,P.sixbengali=2540,P.sixcircle=9317,P.sixcircleinversesansserif=10127,P.sixdeva=2412,P.sixgujarati=2796,P.sixgurmukhi=2668,P.sixhackarabic=1638,P.sixhangzhou=12326,P.sixideographicparen=12837,P.sixinferior=8326,P.sixmonospace=65302,P.sixoldstyle=63286,P.sixparen=9337,P.sixperiod=9357,P.sixpersian=1782,P.sixroman=8565,P.sixsuperior=8310,P.sixteencircle=9327,P.sixteencurrencydenominatorbengali=2553,P.sixteenparen=9347,P.sixteenperiod=9367,P.sixthai=3670,P.slash=47,P.slashmonospace=65295,P.slong=383,P.slongdotaccent=7835,P.smileface=9786,P.smonospace=65363,P.sofpasuqhebrew=1475,P.softhyphen=173,P.softsigncyrillic=1100,P.sohiragana=12381,P.sokatakana=12477,P.sokatakanahalfwidth=65407,P.soliduslongoverlaycmb=824,P.solidusshortoverlaycmb=823,P.sorusithai=3625,P.sosalathai=3624,P.sosothai=3595,P.sosuathai=3626,P.space=32,P.spacehackarabic=32,P.spade=9824,P.spadesuitblack=9824,P.spadesuitwhite=9828,P.sparen=9390,P.squarebelowcmb=827,P.squarecc=13252,P.squarecm=13213,P.squarediagonalcrosshatchfill=9641,P.squarehorizontalfill=9636,P.squarekg=13199,P.squarekm=13214,P.squarekmcapital=13262,P.squareln=13265,P.squarelog=13266,P.squaremg=13198,P.squaremil=13269,P.squaremm=13212,P.squaremsquared=13217,P.squareorthogonalcrosshatchfill=9638,P.squareupperlefttolowerrightfill=9639,P.squareupperrighttolowerleftfill=9640,P.squareverticalfill=9637,P.squarewhitewithsmallblack=9635,P.srsquare=13275,P.ssabengali=2487,P.ssadeva=2359,P.ssagujarati=2743,P.ssangcieuckorean=12617,P.ssanghieuhkorean=12677,P.ssangieungkorean=12672,P.ssangkiyeokkorean=12594,P.ssangnieunkorean=12645,P.ssangpieupkorean=12611,P.ssangsioskorean=12614,P.ssangtikeutkorean=12600,P.ssuperior=63218,P.sterling=163,P.sterlingmonospace=65505,P.strokelongoverlaycmb=822,P.strokeshortoverlaycmb=821,P.subset=8834,P.subsetnotequal=8842,P.subsetorequal=8838,P.succeeds=8827,P.suchthat=8715,P.suhiragana=12377,P.sukatakana=12473,P.sukatakanahalfwidth=65405,P.sukunarabic=1618,P.summation=8721,P.sun=9788,P.superset=8835,P.supersetnotequal=8843,P.supersetorequal=8839,P.svsquare=13276,P.syouwaerasquare=13180,P.t=116,P.tabengali=2468,P.tackdown=8868,P.tackleft=8867,P.tadeva=2340,P.tagujarati=2724,P.tagurmukhi=2596,P.taharabic=1591,P.tahfinalarabic=65218,P.tahinitialarabic=65219,P.tahiragana=12383,P.tahmedialarabic=65220,P.taisyouerasquare=13181,P.takatakana=12479,P.takatakanahalfwidth=65408,P.tatweelarabic=1600,P.tau=964,P.tav=1514,P.tavdages=64330,P.tavdagesh=64330,P.tavdageshhebrew=64330,P.tavhebrew=1514,P.tbar=359,P.tbopomofo=12554,P.tcaron=357,P.tccurl=680,P.tcedilla=355,P.tcheharabic=1670,P.tchehfinalarabic=64379,P.tchehinitialarabic=64380,P.tchehmedialarabic=64381,P.tcircle=9443,P.tcircumflexbelow=7793,P.tcommaaccent=355,P.tdieresis=7831,P.tdotaccent=7787,P.tdotbelow=7789,P.tecyrillic=1090,P.tedescendercyrillic=1197,P.teharabic=1578,P.tehfinalarabic=65174,P.tehhahinitialarabic=64674,P.tehhahisolatedarabic=64524,P.tehinitialarabic=65175,P.tehiragana=12390,P.tehjeeminitialarabic=64673,P.tehjeemisolatedarabic=64523,P.tehmarbutaarabic=1577,P.tehmarbutafinalarabic=65172,P.tehmedialarabic=65176,P.tehmeeminitialarabic=64676,P.tehmeemisolatedarabic=64526,P.tehnoonfinalarabic=64627,P.tekatakana=12486,P.tekatakanahalfwidth=65411,P.telephone=8481,P.telephoneblack=9742,P.telishagedolahebrew=1440,P.telishaqetanahebrew=1449,P.tencircle=9321,P.tenideographicparen=12841,P.tenparen=9341,P.tenperiod=9361,P.tenroman=8569,P.tesh=679,P.tet=1496,P.tetdagesh=64312,P.tetdageshhebrew=64312,P.tethebrew=1496,P.tetsecyrillic=1205,P.tevirhebrew=1435,P.tevirlefthebrew=1435,P.thabengali=2469,P.thadeva=2341,P.thagujarati=2725,P.thagurmukhi=2597,P.thalarabic=1584,P.thalfinalarabic=65196,P.thanthakhatlowleftthai=63640,P.thanthakhatlowrightthai=63639,P.thanthakhatthai=3660,P.thanthakhatupperleftthai=63638,P.theharabic=1579,P.thehfinalarabic=65178,P.thehinitialarabic=65179,P.thehmedialarabic=65180,P.thereexists=8707,P.therefore=8756,P.theta=952,P.theta1=977,P.thetasymbolgreek=977,P.thieuthacirclekorean=12921,P.thieuthaparenkorean=12825,P.thieuthcirclekorean=12907,P.thieuthkorean=12620,P.thieuthparenkorean=12811,P.thirteencircle=9324,P.thirteenparen=9344,P.thirteenperiod=9364,P.thonangmonthothai=3601,P.thook=429,P.thophuthaothai=3602,P.thorn=254,P.thothahanthai=3607,P.thothanthai=3600,P.thothongthai=3608,P.thothungthai=3606,P.thousandcyrillic=1154,P.thousandsseparatorarabic=1644,P.thousandsseparatorpersian=1644,P.three=51,P.threearabic=1635,P.threebengali=2537,P.threecircle=9314,P.threecircleinversesansserif=10124,P.threedeva=2409,P.threeeighths=8540,P.threegujarati=2793,P.threegurmukhi=2665,P.threehackarabic=1635,P.threehangzhou=12323,P.threeideographicparen=12834,P.threeinferior=8323,P.threemonospace=65299,P.threenumeratorbengali=2550,P.threeoldstyle=63283,P.threeparen=9334,P.threeperiod=9354,P.threepersian=1779,P.threequarters=190,P.threequartersemdash=63198,P.threeroman=8562,P.threesuperior=179,P.threethai=3667,P.thzsquare=13204,P.tihiragana=12385,P.tikatakana=12481,P.tikatakanahalfwidth=65409,P.tikeutacirclekorean=12912,P.tikeutaparenkorean=12816,P.tikeutcirclekorean=12898,P.tikeutkorean=12599,P.tikeutparenkorean=12802,P.tilde=732,P.tildebelowcmb=816,P.tildecmb=771,P.tildecomb=771,P.tildedoublecmb=864,P.tildeoperator=8764,P.tildeoverlaycmb=820,P.tildeverticalcmb=830,P.timescircle=8855,P.tipehahebrew=1430,P.tipehalefthebrew=1430,P.tippigurmukhi=2672,P.titlocyrilliccmb=1155,P.tiwnarmenian=1407,P.tlinebelow=7791,P.tmonospace=65364,P.toarmenian=1385,P.tohiragana=12392,P.tokatakana=12488,P.tokatakanahalfwidth=65412,P.tonebarextrahighmod=741,P.tonebarextralowmod=745,P.tonebarhighmod=742,P.tonebarlowmod=744,P.tonebarmidmod=743,P.tonefive=445,P.tonesix=389,P.tonetwo=424,P.tonos=900,P.tonsquare=13095,P.topatakthai=3599,P.tortoiseshellbracketleft=12308,P.tortoiseshellbracketleftsmall=65117,P.tortoiseshellbracketleftvertical=65081,P.tortoiseshellbracketright=12309,P.tortoiseshellbracketrightsmall=65118,P.tortoiseshellbracketrightvertical=65082,P.totaothai=3605,P.tpalatalhook=427,P.tparen=9391,P.trademark=8482,P.trademarksans=63722,P.trademarkserif=63195,P.tretroflexhook=648,P.triagdn=9660,P.triaglf=9668,P.triagrt=9658,P.triagup=9650,P.ts=678,P.tsadi=1510,P.tsadidagesh=64326,P.tsadidageshhebrew=64326,P.tsadihebrew=1510,P.tsecyrillic=1094,P.tsere=1461,P.tsere12=1461,P.tsere1e=1461,P.tsere2b=1461,P.tserehebrew=1461,P.tserenarrowhebrew=1461,P.tserequarterhebrew=1461,P.tserewidehebrew=1461,P.tshecyrillic=1115,P.tsuperior=63219,P.ttabengali=2463,P.ttadeva=2335,P.ttagujarati=2719,P.ttagurmukhi=2591,P.tteharabic=1657,P.ttehfinalarabic=64359,P.ttehinitialarabic=64360,P.ttehmedialarabic=64361,P.tthabengali=2464,P.tthadeva=2336,P.tthagujarati=2720,P.tthagurmukhi=2592,P.tturned=647,P.tuhiragana=12388,P.tukatakana=12484,P.tukatakanahalfwidth=65410,P.tusmallhiragana=12387,P.tusmallkatakana=12483,P.tusmallkatakanahalfwidth=65391,P.twelvecircle=9323,P.twelveparen=9343,P.twelveperiod=9363,P.twelveroman=8571,P.twentycircle=9331,P.twentyhangzhou=21316,P.twentyparen=9351,P.twentyperiod=9371,P.two=50,P.twoarabic=1634,P.twobengali=2536,P.twocircle=9313,P.twocircleinversesansserif=10123,P.twodeva=2408,P.twodotenleader=8229,P.twodotleader=8229,P.twodotleadervertical=65072,P.twogujarati=2792,P.twogurmukhi=2664,P.twohackarabic=1634,P.twohangzhou=12322,P.twoideographicparen=12833,P.twoinferior=8322,P.twomonospace=65298,P.twonumeratorbengali=2549,P.twooldstyle=63282,P.twoparen=9333,P.twoperiod=9353,P.twopersian=1778,P.tworoman=8561,P.twostroke=443,P.twosuperior=178,P.twothai=3666,P.twothirds=8532,P.u=117,P.uacute=250,P.ubar=649,P.ubengali=2441,P.ubopomofo=12584,P.ubreve=365,P.ucaron=468,P.ucircle=9444,P.ucircumflex=251,P.ucircumflexbelow=7799,P.ucyrillic=1091,P.udattadeva=2385,P.udblacute=369,P.udblgrave=533,P.udeva=2313,P.udieresis=252,P.udieresisacute=472,P.udieresisbelow=7795,P.udieresiscaron=474,P.udieresiscyrillic=1265,P.udieresisgrave=476,P.udieresismacron=470,P.udotbelow=7909,P.ugrave=249,P.ugujarati=2697,P.ugurmukhi=2569,P.uhiragana=12358,P.uhookabove=7911,P.uhorn=432,P.uhornacute=7913,P.uhorndotbelow=7921,P.uhorngrave=7915,P.uhornhookabove=7917,P.uhorntilde=7919,P.uhungarumlaut=369,P.uhungarumlautcyrillic=1267,P.uinvertedbreve=535,P.ukatakana=12454,P.ukatakanahalfwidth=65395,P.ukcyrillic=1145,P.ukorean=12636,P.umacron=363,P.umacroncyrillic=1263,P.umacrondieresis=7803,P.umatragurmukhi=2625,P.umonospace=65365,P.underscore=95,P.underscoredbl=8215,P.underscoremonospace=65343,P.underscorevertical=65075,P.underscorewavy=65103,P.union=8746,P.universal=8704,P.uogonek=371,P.uparen=9392,P.upblock=9600,P.upperdothebrew=1476,P.upsilon=965,P.upsilondieresis=971,P.upsilondieresistonos=944,P.upsilonlatin=650,P.upsilontonos=973,P.uptackbelowcmb=797,P.uptackmod=724,P.uragurmukhi=2675,P.uring=367,P.ushortcyrillic=1118,P.usmallhiragana=12357,P.usmallkatakana=12453,P.usmallkatakanahalfwidth=65385,P.ustraightcyrillic=1199,P.ustraightstrokecyrillic=1201,P.utilde=361,P.utildeacute=7801,P.utildebelow=7797,P.uubengali=2442,P.uudeva=2314,P.uugujarati=2698,P.uugurmukhi=2570,P.uumatragurmukhi=2626,P.uuvowelsignbengali=2498,P.uuvowelsigndeva=2370,P.uuvowelsigngujarati=2754,P.uvowelsignbengali=2497,P.uvowelsigndeva=2369,P.uvowelsigngujarati=2753,P.v=118,P.vadeva=2357,P.vagujarati=2741,P.vagurmukhi=2613,P.vakatakana=12535,P.vav=1493,P.vavdagesh=64309,P.vavdagesh65=64309,P.vavdageshhebrew=64309,P.vavhebrew=1493,P.vavholam=64331,P.vavholamhebrew=64331,P.vavvavhebrew=1520,P.vavyodhebrew=1521,P.vcircle=9445,P.vdotbelow=7807,P.vecyrillic=1074,P.veharabic=1700,P.vehfinalarabic=64363,P.vehinitialarabic=64364,P.vehmedialarabic=64365,P.vekatakana=12537,P.venus=9792,P.verticalbar=124,P.verticallineabovecmb=781,P.verticallinebelowcmb=809,P.verticallinelowmod=716,P.verticallinemod=712,P.vewarmenian=1406,P.vhook=651,P.vikatakana=12536,P.viramabengali=2509,P.viramadeva=2381,P.viramagujarati=2765,P.visargabengali=2435,P.visargadeva=2307,P.visargagujarati=2691,P.vmonospace=65366,P.voarmenian=1400,P.voicediterationhiragana=12446,P.voicediterationkatakana=12542,P.voicedmarkkana=12443,P.voicedmarkkanahalfwidth=65438,P.vokatakana=12538,P.vparen=9393,P.vtilde=7805,P.vturned=652,P.vuhiragana=12436,P.vukatakana=12532,P.w=119,P.wacute=7811,P.waekorean=12633,P.wahiragana=12431,P.wakatakana=12527,P.wakatakanahalfwidth=65436,P.wakorean=12632,P.wasmallhiragana=12430,P.wasmallkatakana=12526,P.wattosquare=13143,P.wavedash=12316,P.wavyunderscorevertical=65076,P.wawarabic=1608,P.wawfinalarabic=65262,P.wawhamzaabovearabic=1572,P.wawhamzaabovefinalarabic=65158,P.wbsquare=13277,P.wcircle=9446,P.wcircumflex=373,P.wdieresis=7813,P.wdotaccent=7815,P.wdotbelow=7817,P.wehiragana=12433,P.weierstrass=8472,P.wekatakana=12529,P.wekorean=12638,P.weokorean=12637,P.wgrave=7809,P.whitebullet=9702,P.whitecircle=9675,P.whitecircleinverse=9689,P.whitecornerbracketleft=12302,P.whitecornerbracketleftvertical=65091,P.whitecornerbracketright=12303,P.whitecornerbracketrightvertical=65092,P.whitediamond=9671,P.whitediamondcontainingblacksmalldiamond=9672,P.whitedownpointingsmalltriangle=9663,P.whitedownpointingtriangle=9661,P.whiteleftpointingsmalltriangle=9667,P.whiteleftpointingtriangle=9665,P.whitelenticularbracketleft=12310,P.whitelenticularbracketright=12311,P.whiterightpointingsmalltriangle=9657,P.whiterightpointingtriangle=9655,P.whitesmallsquare=9643,P.whitesmilingface=9786,P.whitesquare=9633,P.whitestar=9734,P.whitetelephone=9743,P.whitetortoiseshellbracketleft=12312,P.whitetortoiseshellbracketright=12313,P.whiteuppointingsmalltriangle=9653,P.whiteuppointingtriangle=9651,P.wihiragana=12432,P.wikatakana=12528,P.wikorean=12639,P.wmonospace=65367,P.wohiragana=12434,P.wokatakana=12530,P.wokatakanahalfwidth=65382,P.won=8361,P.wonmonospace=65510,P.wowaenthai=3623,P.wparen=9394,P.wring=7832,P.wsuperior=695,P.wturned=653,P.wynn=447,P.x=120,P.xabovecmb=829,P.xbopomofo=12562,P.xcircle=9447,P.xdieresis=7821,P.xdotaccent=7819,P.xeharmenian=1389,P.xi=958,P.xmonospace=65368,P.xparen=9395,P.xsuperior=739,P.y=121,P.yaadosquare=13134,P.yabengali=2479,P.yacute=253,P.yadeva=2351,P.yaekorean=12626,P.yagujarati=2735,P.yagurmukhi=2607,P.yahiragana=12420,P.yakatakana=12516,P.yakatakanahalfwidth=65428,P.yakorean=12625,P.yamakkanthai=3662,P.yasmallhiragana=12419,P.yasmallkatakana=12515,P.yasmallkatakanahalfwidth=65388,P.yatcyrillic=1123,P.ycircle=9448,P.ycircumflex=375,P.ydieresis=255,P.ydotaccent=7823,P.ydotbelow=7925,P.yeharabic=1610,P.yehbarreearabic=1746,P.yehbarreefinalarabic=64431,P.yehfinalarabic=65266,P.yehhamzaabovearabic=1574,P.yehhamzaabovefinalarabic=65162,P.yehhamzaaboveinitialarabic=65163,P.yehhamzaabovemedialarabic=65164,P.yehinitialarabic=65267,P.yehmedialarabic=65268,P.yehmeeminitialarabic=64733,P.yehmeemisolatedarabic=64600,P.yehnoonfinalarabic=64660,P.yehthreedotsbelowarabic=1745,P.yekorean=12630,P.yen=165,P.yenmonospace=65509,P.yeokorean=12629,P.yeorinhieuhkorean=12678,P.yerahbenyomohebrew=1450,P.yerahbenyomolefthebrew=1450,P.yericyrillic=1099,P.yerudieresiscyrillic=1273,P.yesieungkorean=12673,P.yesieungpansioskorean=12675,P.yesieungsioskorean=12674,P.yetivhebrew=1434,P.ygrave=7923,P.yhook=436,P.yhookabove=7927,P.yiarmenian=1397,P.yicyrillic=1111,P.yikorean=12642,P.yinyang=9775,P.yiwnarmenian=1410,P.ymonospace=65369,P.yod=1497,P.yoddagesh=64313,P.yoddageshhebrew=64313,P.yodhebrew=1497,P.yodyodhebrew=1522,P.yodyodpatahhebrew=64287,P.yohiragana=12424,P.yoikorean=12681,P.yokatakana=12520,P.yokatakanahalfwidth=65430,P.yokorean=12635,P.yosmallhiragana=12423,P.yosmallkatakana=12519,P.yosmallkatakanahalfwidth=65390,P.yotgreek=1011,P.yoyaekorean=12680,P.yoyakorean=12679,P.yoyakthai=3618,P.yoyingthai=3597,P.yparen=9396,P.ypogegrammeni=890,P.ypogegrammenigreekcmb=837,P.yr=422,P.yring=7833,P.ysuperior=696,P.ytilde=7929,P.yturned=654,P.yuhiragana=12422,P.yuikorean=12684,P.yukatakana=12518,P.yukatakanahalfwidth=65429,P.yukorean=12640,P.yusbigcyrillic=1131,P.yusbigiotifiedcyrillic=1133,P.yuslittlecyrillic=1127,P.yuslittleiotifiedcyrillic=1129,P.yusmallhiragana=12421,P.yusmallkatakana=12517,P.yusmallkatakanahalfwidth=65389,P.yuyekorean=12683,P.yuyeokorean=12682,P.yyabengali=2527,P.yyadeva=2399,P.z=122,P.zaarmenian=1382,P.zacute=378,P.zadeva=2395,P.zagurmukhi=2651,P.zaharabic=1592,P.zahfinalarabic=65222,P.zahinitialarabic=65223,P.zahiragana=12374,P.zahmedialarabic=65224,P.zainarabic=1586,P.zainfinalarabic=65200,P.zakatakana=12470,P.zaqefgadolhebrew=1429,P.zaqefqatanhebrew=1428,P.zarqahebrew=1432,P.zayin=1494,P.zayindagesh=64310,P.zayindageshhebrew=64310,P.zayinhebrew=1494,P.zbopomofo=12567,P.zcaron=382,P.zcircle=9449,P.zcircumflex=7825,P.zcurl=657,P.zdot=380,P.zdotaccent=380,P.zdotbelow=7827,P.zecyrillic=1079,P.zedescendercyrillic=1177,P.zedieresiscyrillic=1247,P.zehiragana=12380,P.zekatakana=12476,P.zero=48,P.zeroarabic=1632,P.zerobengali=2534,P.zerodeva=2406,P.zerogujarati=2790,P.zerogurmukhi=2662,P.zerohackarabic=1632,P.zeroinferior=8320,P.zeromonospace=65296,P.zerooldstyle=63280,P.zeropersian=1776,P.zerosuperior=8304,P.zerothai=3664,P.zerowidthjoiner=65279,P.zerowidthnonjoiner=8204,P.zerowidthspace=8203,P.zeta=950,P.zhbopomofo=12563,P.zhearmenian=1386,P.zhebrevecyrillic=1218,P.zhecyrillic=1078,P.zhedescendercyrillic=1175,P.zhedieresiscyrillic=1245,P.zihiragana=12376,P.zikatakana=12472,P.zinorhebrew=1454,P.zlinebelow=7829,P.zmonospace=65370,P.zohiragana=12382,P.zokatakana=12478,P.zparen=9397,P.zretroflexhook=656,P.zstroke=438,P.zuhiragana=12378,P.zukatakana=12474,P[".notdef"]=0,P.angbracketleftbig=9001,P.angbracketleftBig=9001,P.angbracketleftbigg=9001,P.angbracketleftBigg=9001,P.angbracketrightBig=9002,P.angbracketrightbig=9002,P.angbracketrightBigg=9002,P.angbracketrightbigg=9002,P.arrowhookleft=8618,P.arrowhookright=8617,P.arrowlefttophalf=8636,P.arrowleftbothalf=8637,P.arrownortheast=8599,P.arrownorthwest=8598,P.arrowrighttophalf=8640,P.arrowrightbothalf=8641,P.arrowsoutheast=8600,P.arrowsouthwest=8601,P.backslashbig=8726,P.backslashBig=8726,P.backslashBigg=8726,P.backslashbigg=8726,P.bardbl=8214,P.bracehtipdownleft=65079,P.bracehtipdownright=65079,P.bracehtipupleft=65080,P.bracehtipupright=65080,P.braceleftBig=123,P.braceleftbig=123,P.braceleftbigg=123,P.braceleftBigg=123,P.bracerightBig=125,P.bracerightbig=125,P.bracerightbigg=125,P.bracerightBigg=125,P.bracketleftbig=91,P.bracketleftBig=91,P.bracketleftbigg=91,P.bracketleftBigg=91,P.bracketrightBig=93,P.bracketrightbig=93,P.bracketrightbigg=93,P.bracketrightBigg=93,P.ceilingleftbig=8968,P.ceilingleftBig=8968,P.ceilingleftBigg=8968,P.ceilingleftbigg=8968,P.ceilingrightbig=8969,P.ceilingrightBig=8969,P.ceilingrightbigg=8969,P.ceilingrightBigg=8969,P.circledotdisplay=8857,P.circledottext=8857,P.circlemultiplydisplay=8855,P.circlemultiplytext=8855,P.circleplusdisplay=8853,P.circleplustext=8853,P.contintegraldisplay=8750,P.contintegraltext=8750,P.coproductdisplay=8720,P.coproducttext=8720,P.floorleftBig=8970,P.floorleftbig=8970,P.floorleftbigg=8970,P.floorleftBigg=8970,P.floorrightbig=8971,P.floorrightBig=8971,P.floorrightBigg=8971,P.floorrightbigg=8971,P.hatwide=770,P.hatwider=770,P.hatwidest=770,P.intercal=7488,P.integraldisplay=8747,P.integraltext=8747,P.intersectiondisplay=8898,P.intersectiontext=8898,P.logicalanddisplay=8743,P.logicalandtext=8743,P.logicalordisplay=8744,P.logicalortext=8744,P.parenleftBig=40,P.parenleftbig=40,P.parenleftBigg=40,P.parenleftbigg=40,P.parenrightBig=41,P.parenrightbig=41,P.parenrightBigg=41,P.parenrightbigg=41,P.prime=8242,P.productdisplay=8719,P.producttext=8719,P.radicalbig=8730,P.radicalBig=8730,P.radicalBigg=8730,P.radicalbigg=8730,P.radicalbt=8730,P.radicaltp=8730,P.radicalvertex=8730,P.slashbig=47,P.slashBig=47,P.slashBigg=47,P.slashbigg=47,P.summationdisplay=8721,P.summationtext=8721,P.tildewide=732,P.tildewider=732,P.tildewidest=732,P.uniondisplay=8899,P.unionmultidisplay=8846,P.unionmultitext=8846,P.unionsqdisplay=8852,P.unionsqtext=8852,P.uniontext=8899,P.vextenddouble=8741,P.vextendsingle=8739}),yI=R8(function(P){P.space=32,P.a1=9985,P.a2=9986,P.a202=9987,P.a3=9988,P.a4=9742,P.a5=9990,P.a119=9991,P.a118=9992,P.a117=9993,P.a11=9755,P.a12=9758,P.a13=9996,P.a14=9997,P.a15=9998,P.a16=9999,P.a105=1e4,P.a17=10001,P.a18=10002,P.a19=10003,P.a20=10004,P.a21=10005,P.a22=10006,P.a23=10007,P.a24=10008,P.a25=10009,P.a26=10010,P.a27=10011,P.a28=10012,P.a6=10013,P.a7=10014,P.a8=10015,P.a9=10016,P.a10=10017,P.a29=10018,P.a30=10019,P.a31=10020,P.a32=10021,P.a33=10022,P.a34=10023,P.a35=9733,P.a36=10025,P.a37=10026,P.a38=10027,P.a39=10028,P.a40=10029,P.a41=10030,P.a42=10031,P.a43=10032,P.a44=10033,P.a45=10034,P.a46=10035,P.a47=10036,P.a48=10037,P.a49=10038,P.a50=10039,P.a51=10040,P.a52=10041,P.a53=10042,P.a54=10043,P.a55=10044,P.a56=10045,P.a57=10046,P.a58=10047,P.a59=10048,P.a60=10049,P.a61=10050,P.a62=10051,P.a63=10052,P.a64=10053,P.a65=10054,P.a66=10055,P.a67=10056,P.a68=10057,P.a69=10058,P.a70=10059,P.a71=9679,P.a72=10061,P.a73=9632,P.a74=10063,P.a203=10064,P.a75=10065,P.a204=10066,P.a76=9650,P.a77=9660,P.a78=9670,P.a79=10070,P.a81=9687,P.a82=10072,P.a83=10073,P.a84=10074,P.a97=10075,P.a98=10076,P.a99=10077,P.a100=10078,P.a101=10081,P.a102=10082,P.a103=10083,P.a104=10084,P.a106=10085,P.a107=10086,P.a108=10087,P.a112=9827,P.a111=9830,P.a110=9829,P.a109=9824,P.a120=9312,P.a121=9313,P.a122=9314,P.a123=9315,P.a124=9316,P.a125=9317,P.a126=9318,P.a127=9319,P.a128=9320,P.a129=9321,P.a130=10102,P.a131=10103,P.a132=10104,P.a133=10105,P.a134=10106,P.a135=10107,P.a136=10108,P.a137=10109,P.a138=10110,P.a139=10111,P.a140=10112,P.a141=10113,P.a142=10114,P.a143=10115,P.a144=10116,P.a145=10117,P.a146=10118,P.a147=10119,P.a148=10120,P.a149=10121,P.a150=10122,P.a151=10123,P.a152=10124,P.a153=10125,P.a154=10126,P.a155=10127,P.a156=10128,P.a157=10129,P.a158=10130,P.a159=10131,P.a160=10132,P.a161=8594,P.a163=8596,P.a164=8597,P.a196=10136,P.a165=10137,P.a192=10138,P.a166=10139,P.a167=10140,P.a168=10141,P.a169=10142,P.a170=10143,P.a171=10144,P.a172=10145,P.a173=10146,P.a162=10147,P.a174=10148,P.a175=10149,P.a176=10150,P.a177=10151,P.a178=10152,P.a179=10153,P.a193=10154,P.a180=10155,P.a199=10156,P.a181=10157,P.a200=10158,P.a182=10159,P.a201=10161,P.a183=10162,P.a184=10163,P.a197=10164,P.a185=10165,P.a194=10166,P.a198=10167,P.a186=10168,P.a195=10169,P.a187=10170,P.a188=10171,P.a189=10172,P.a190=10173,P.a191=10174,P.a89=10088,P.a90=10089,P.a93=10090,P.a94=10091,P.a91=10092,P.a92=10093,P.a205=10094,P.a85=10095,P.a206=10096,P.a86=10097,P.a87=10098,P.a88=10099,P.a95=10100,P.a96=10101,P[".notdef"]=0}),DI=R8(function(P){P[63721]=169,P[63193]=169,P[63720]=174,P[63194]=174,P[63722]=8482,P[63195]=8482,P[63729]=9127,P[63730]=9128,P[63731]=9129,P[63740]=9131,P[63741]=9132,P[63742]=9133,P[63726]=9121,P[63727]=9122,P[63728]=9123,P[63737]=9124,P[63738]=9125,P[63739]=9126,P[63723]=9115,P[63724]=9116,P[63725]=9117,P[63734]=9118,P[63735]=9119,P[63736]=9120});oP=[[0,127],[128,255],[256,383],[384,591],[592,687,7424,7551,7552,7615],[688,767,42752,42783],[768,879,7616,7679],[880,1023],[11392,11519],[1024,1279,1280,1327,11744,11775,42560,42655],[1328,1423],[1424,1535],[42240,42559],[1536,1791,1872,1919],[1984,2047],[2304,2431],[2432,2559],[2560,2687],[2688,2815],[2816,2943],[2944,3071],[3072,3199],[3200,3327],[3328,3455],[3584,3711],[3712,3839],[4256,4351,11520,11567],[6912,7039],[4352,4607],[7680,7935,11360,11391,42784,43007],[7936,8191],[8192,8303,11776,11903],[8304,8351],[8352,8399],[8400,8447],[8448,8527],[8528,8591],[8592,8703,10224,10239,10496,10623,11008,11263],[8704,8959,10752,11007,10176,10223,10624,10751],[8960,9215],[9216,9279],[9280,9311],[9312,9471],[9472,9599],[9600,9631],[9632,9727],[9728,9983],[9984,10175],[12288,12351],[12352,12447],[12448,12543,12784,12799],[12544,12591,12704,12735],[12592,12687],[43072,43135],[12800,13055],[13056,13311],[44032,55215],[55296,57343],[67840,67871],[19968,40959,11904,12031,12032,12255,12272,12287,13312,19903,131072,173791,12688,12703],[57344,63743],[12736,12783,63744,64255,194560,195103],[64256,64335],[64336,65023],[65056,65071],[65040,65055],[65104,65135],[65136,65279],[65280,65519],[65520,65535],[3840,4095],[1792,1871],[1920,1983],[3456,3583],[4096,4255],[4608,4991,4992,5023,11648,11743],[5024,5119],[5120,5759],[5760,5791],[5792,5887],[6016,6143],[6144,6319],[10240,10495],[40960,42127],[5888,5919,5920,5951,5952,5983,5984,6015],[66304,66351],[66352,66383],[66560,66639],[118784,119039,119040,119295,119296,119375],[119808,120831],[1044480,1048573],[65024,65039,917760,917999],[917504,917631],[6400,6479],[6480,6527],[6528,6623],[6656,6687],[11264,11359],[11568,11647],[19904,19967],[43008,43055],[65536,65663,65664,65791,65792,65855],[65856,65935],[66432,66463],[66464,66527],[66640,66687],[66688,66735],[67584,67647],[68096,68191],[119552,119647],[73728,74751,74752,74879],[119648,119679],[7040,7103],[7168,7247],[7248,7295],[43136,43231],[43264,43311],[43312,43359],[43520,43615],[65936,65999],[66000,66047],[66208,66271,66176,66207,67872,67903],[127024,127135,126976,127023]];EI=new RegExp("^(\\s)|(\\p{Mn})|(\\p{Cf})$","u"),ZZ=new Map,Bz=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];uI=R8((P)=>{P[8211]=65074,P[8212]=65073,P[8229]=65072,P[8230]=65049,P[12289]=65041,P[12290]=65042,P[12296]=65087,P[12297]=65088,P[12298]=65085,P[12299]=65086,P[12300]=65089,P[12301]=65090,P[12302]=65091,P[12303]=65092,P[12304]=65083,P[12305]=65084,P[12308]=65081,P[12309]=65082,P[12310]=65047,P[12311]=65048,P[65103]=65076,P[65281]=65045,P[65288]=65077,P[65289]=65078,P[65292]=65040,P[65306]=65043,P[65307]=65044,P[65311]=65046,P[65339]=65095,P[65341]=65096,P[65343]=65075,P[65371]=65079,P[65373]=65080}),gI=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron"],dI=[".notdef","space","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],cI=[".notdef","space","dollaroldstyle","dollarsuperior","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","hyphensuperior","colonmonetary","onefitted","rupiah","centoldstyle","figuredash","hypheninferior","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior"],h2=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],h5=[null,{id:"hstem",min:2,stackClearing:!0,stem:!0},null,{id:"vstem",min:2,stackClearing:!0,stem:!0},{id:"vmoveto",min:1,stackClearing:!0},{id:"rlineto",min:2,resetStack:!0},{id:"hlineto",min:1,resetStack:!0},{id:"vlineto",min:1,resetStack:!0},{id:"rrcurveto",min:6,resetStack:!0},null,{id:"callsubr",min:1,undefStack:!0},{id:"return",min:0,undefStack:!0},null,null,{id:"endchar",min:0,stackClearing:!0},null,null,null,{id:"hstemhm",min:2,stackClearing:!0,stem:!0},{id:"hintmask",min:0,stackClearing:!0},{id:"cntrmask",min:0,stackClearing:!0},{id:"rmoveto",min:2,stackClearing:!0},{id:"hmoveto",min:1,stackClearing:!0},{id:"vstemhm",min:2,stackClearing:!0,stem:!0},{id:"rcurveline",min:8,resetStack:!0},{id:"rlinecurve",min:8,resetStack:!0},{id:"vvcurveto",min:4,resetStack:!0},{id:"hhcurveto",min:4,resetStack:!0},null,{id:"callgsubr",min:1,undefStack:!0},{id:"vhcurveto",min:4,resetStack:!0},{id:"hvcurveto",min:4,resetStack:!0}],sI=[null,null,null,{id:"and",min:2,stackDelta:-1},{id:"or",min:2,stackDelta:-1},{id:"not",min:1,stackDelta:0},null,null,null,{id:"abs",min:1,stackDelta:0},{id:"add",min:2,stackDelta:-1,stackFn(P,Z){P[Z-2]=P[Z-2]+P[Z-1]}},{id:"sub",min:2,stackDelta:-1,stackFn(P,Z){P[Z-2]=P[Z-2]-P[Z-1]}},{id:"div",min:2,stackDelta:-1,stackFn(P,Z){P[Z-2]=P[Z-2]/P[Z-1]}},null,{id:"neg",min:1,stackDelta:0,stackFn(P,Z){P[Z-1]=-P[Z-1]}},{id:"eq",min:2,stackDelta:-1},null,null,{id:"drop",min:1,stackDelta:-1},null,{id:"put",min:2,stackDelta:-2},{id:"get",min:1,stackDelta:0},{id:"ifelse",min:4,stackDelta:-3},{id:"random",min:0,stackDelta:1},{id:"mul",min:2,stackDelta:-1,stackFn(P,Z){P[Z-2]=P[Z-2]*P[Z-1]}},null,{id:"sqrt",min:1,stackDelta:0},{id:"dup",min:1,stackDelta:1},{id:"exch",min:2,stackDelta:0},{id:"index",min:2,stackDelta:0},{id:"roll",min:3,stackDelta:-2},null,null,null,{id:"hflex",min:7,resetStack:!0},{id:"flex",min:13,resetStack:!0},{id:"hflex1",min:9,resetStack:!0},{id:"flex1",min:11,resetStack:!0}];hI=[[[12,30],"ROS",["sid","sid","num"],null],[[12,20],"SyntheticBase","num",null],[0,"version","sid",null],[1,"Notice","sid",null],[[12,0],"Copyright","sid",null],[2,"FullName","sid",null],[3,"FamilyName","sid",null],[4,"Weight","sid",null],[[12,1],"isFixedPitch","num",0],[[12,2],"ItalicAngle","num",0],[[12,3],"UnderlinePosition","num",-100],[[12,4],"UnderlineThickness","num",50],[[12,5],"PaintType","num",0],[[12,6],"CharstringType","num",2],[[12,7],"FontMatrix",["num","num","num","num","num","num"],[0.001,0,0,0.001,0,0]],[13,"UniqueID","num",null],[5,"FontBBox",["num","num","num","num"],[0,0,0,0]],[[12,8],"StrokeWidth","num",0],[14,"XUID","array",null],[15,"charset","offset",0],[16,"Encoding","offset",0],[17,"CharStrings","offset",0],[18,"Private",["offset","offset"],null],[[12,21],"PostScript","sid",null],[[12,22],"BaseFontName","sid",null],[[12,23],"BaseFontBlend","delta",null],[[12,31],"CIDFontVersion","num",0],[[12,32],"CIDFontRevision","num",0],[[12,33],"CIDFontType","num",0],[[12,34],"CIDCount","num",8720],[[12,35],"UIDBase","num",null],[[12,37],"FDSelect","offset",null],[[12,36],"FDArray","offset",null],[[12,38],"FontName","sid",null]];S7=class S7 extends _q{static get tables(){return q1(this,"tables",this.createTables(hI))}constructor(P){super(S7.tables,P),this.privateDict=null}};rI=[[6,"BlueValues","delta",null],[7,"OtherBlues","delta",null],[8,"FamilyBlues","delta",null],[9,"FamilyOtherBlues","delta",null],[[12,9],"BlueScale","num",0.039625],[[12,10],"BlueShift","num",7],[[12,11],"BlueFuzz","num",1],[10,"StdHW","num",null],[11,"StdVW","num",null],[[12,12],"StemSnapH","delta",null],[[12,13],"StemSnapV","delta",null],[[12,14],"ForceBold","num",0],[[12,17],"LanguageGroup","num",0],[[12,18],"ExpansionFactor","num",0.06],[[12,19],"initialRandomSeed","num",0],[20,"defaultWidthX","num",0],[21,"nominalWidthX","num",0],[19,"Subrs","offset",null]];m7=class m7 extends _q{static get tables(){return q1(this,"tables",this.createTables(rI))}constructor(P){super(m7.tables,P),this.subrsIndex=null}};nP={ISO_ADOBE:0,EXPERT:1,EXPERT_SUBSET:2};p7=R8(function(P){P["Times-Roman"]="Times-Roman",P.Helvetica="Helvetica",P.Courier="Courier",P.Symbol="Symbol",P["Times-Bold"]="Times-Bold",P["Helvetica-Bold"]="Helvetica-Bold",P["Courier-Bold"]="Courier-Bold",P.ZapfDingbats="ZapfDingbats",P["Times-Italic"]="Times-Italic",P["Helvetica-Oblique"]="Helvetica-Oblique",P["Courier-Oblique"]="Courier-Oblique",P["Times-BoldItalic"]="Times-BoldItalic",P["Helvetica-BoldOblique"]="Helvetica-BoldOblique",P["Courier-BoldOblique"]="Courier-BoldOblique",P.ArialNarrow="Helvetica",P["ArialNarrow-Bold"]="Helvetica-Bold",P["ArialNarrow-BoldItalic"]="Helvetica-BoldOblique",P["ArialNarrow-Italic"]="Helvetica-Oblique",P.ArialBlack="Helvetica",P["ArialBlack-Bold"]="Helvetica-Bold",P["ArialBlack-BoldItalic"]="Helvetica-BoldOblique",P["ArialBlack-Italic"]="Helvetica-Oblique",P["Arial-Black"]="Helvetica",P["Arial-Black-Bold"]="Helvetica-Bold",P["Arial-Black-BoldItalic"]="Helvetica-BoldOblique",P["Arial-Black-Italic"]="Helvetica-Oblique",P.Arial="Helvetica",P["Arial-Bold"]="Helvetica-Bold",P["Arial-BoldItalic"]="Helvetica-BoldOblique",P["Arial-Italic"]="Helvetica-Oblique",P.ArialMT="Helvetica",P["Arial-BoldItalicMT"]="Helvetica-BoldOblique",P["Arial-BoldMT"]="Helvetica-Bold",P["Arial-ItalicMT"]="Helvetica-Oblique",P["Arial-BoldItalicMT-BoldItalic"]="Helvetica-BoldOblique",P["Arial-BoldMT-Bold"]="Helvetica-Bold",P["Arial-ItalicMT-Italic"]="Helvetica-Oblique",P.ArialUnicodeMS="Helvetica",P["ArialUnicodeMS-Bold"]="Helvetica-Bold",P["ArialUnicodeMS-BoldItalic"]="Helvetica-BoldOblique",P["ArialUnicodeMS-Italic"]="Helvetica-Oblique",P["Courier-BoldItalic"]="Courier-BoldOblique",P["Courier-Italic"]="Courier-Oblique",P.CourierNew="Courier",P["CourierNew-Bold"]="Courier-Bold",P["CourierNew-BoldItalic"]="Courier-BoldOblique",P["CourierNew-Italic"]="Courier-Oblique",P["CourierNewPS-BoldItalicMT"]="Courier-BoldOblique",P["CourierNewPS-BoldMT"]="Courier-Bold",P["CourierNewPS-ItalicMT"]="Courier-Oblique",P.CourierNewPSMT="Courier",P["Helvetica-BoldItalic"]="Helvetica-BoldOblique",P["Helvetica-Italic"]="Helvetica-Oblique",P["HelveticaLTStd-Bold"]="Helvetica-Bold",P["Symbol-Bold"]="Symbol",P["Symbol-BoldItalic"]="Symbol",P["Symbol-Italic"]="Symbol",P.TimesNewRoman="Times-Roman",P["TimesNewRoman-Bold"]="Times-Bold",P["TimesNewRoman-BoldItalic"]="Times-BoldItalic",P["TimesNewRoman-Italic"]="Times-Italic",P.TimesNewRomanPS="Times-Roman",P["TimesNewRomanPS-Bold"]="Times-Bold",P["TimesNewRomanPS-BoldItalic"]="Times-BoldItalic",P["TimesNewRomanPS-BoldItalicMT"]="Times-BoldItalic",P["TimesNewRomanPS-BoldMT"]="Times-Bold",P["TimesNewRomanPS-Italic"]="Times-Italic",P["TimesNewRomanPS-ItalicMT"]="Times-Italic",P.TimesNewRomanPSMT="Times-Roman",P["TimesNewRomanPSMT-Bold"]="Times-Bold",P["TimesNewRomanPSMT-BoldItalic"]="Times-BoldItalic",P["TimesNewRomanPSMT-Italic"]="Times-Italic"}),lI=R8(function(P){P.Courier="FoxitFixed.pfb",P["Courier-Bold"]="FoxitFixedBold.pfb",P["Courier-BoldOblique"]="FoxitFixedBoldItalic.pfb",P["Courier-Oblique"]="FoxitFixedItalic.pfb",P.Helvetica="LiberationSans-Regular.ttf",P["Helvetica-Bold"]="LiberationSans-Bold.ttf",P["Helvetica-BoldOblique"]="LiberationSans-BoldItalic.ttf",P["Helvetica-Oblique"]="LiberationSans-Italic.ttf",P["Times-Roman"]="FoxitSerif.pfb",P["Times-Bold"]="FoxitSerifBold.pfb",P["Times-BoldItalic"]="FoxitSerifBoldItalic.pfb",P["Times-Italic"]="FoxitSerifItalic.pfb",P.Symbol="FoxitSymbol.pfb",P.ZapfDingbats="FoxitDingbats.pfb",P["LiberationSans-Regular"]="LiberationSans-Regular.ttf",P["LiberationSans-Bold"]="LiberationSans-Bold.ttf",P["LiberationSans-Italic"]="LiberationSans-Italic.ttf",P["LiberationSans-BoldItalic"]="LiberationSans-BoldItalic.ttf"}),zZ=R8(function(P){P.Calibri="Helvetica",P["Calibri-Bold"]="Helvetica-Bold",P["Calibri-BoldItalic"]="Helvetica-BoldOblique",P["Calibri-Italic"]="Helvetica-Oblique",P.CenturyGothic="Helvetica",P["CenturyGothic-Bold"]="Helvetica-Bold",P["CenturyGothic-BoldItalic"]="Helvetica-BoldOblique",P["CenturyGothic-Italic"]="Helvetica-Oblique",P.ComicSansMS="Comic Sans MS",P["ComicSansMS-Bold"]="Comic Sans MS-Bold",P["ComicSansMS-BoldItalic"]="Comic Sans MS-BoldItalic",P["ComicSansMS-Italic"]="Comic Sans MS-Italic",P.GillSansMT="Helvetica",P["GillSansMT-Bold"]="Helvetica-Bold",P["GillSansMT-BoldItalic"]="Helvetica-BoldOblique",P["GillSansMT-Italic"]="Helvetica-Oblique",P.Impact="Helvetica",P["ItcSymbol-Bold"]="Helvetica-Bold",P["ItcSymbol-BoldItalic"]="Helvetica-BoldOblique",P["ItcSymbol-Book"]="Helvetica",P["ItcSymbol-BookItalic"]="Helvetica-Oblique",P["ItcSymbol-Medium"]="Helvetica",P["ItcSymbol-MediumItalic"]="Helvetica-Oblique",P.LucidaConsole="Courier",P["LucidaConsole-Bold"]="Courier-Bold",P["LucidaConsole-BoldItalic"]="Courier-BoldOblique",P["LucidaConsole-Italic"]="Courier-Oblique",P["LucidaSans-Demi"]="Helvetica-Bold",P["MS-Gothic"]="MS Gothic",P["MS-Gothic-Bold"]="MS Gothic-Bold",P["MS-Gothic-BoldItalic"]="MS Gothic-BoldItalic",P["MS-Gothic-Italic"]="MS Gothic-Italic",P["MS-Mincho"]="MS Mincho",P["MS-Mincho-Bold"]="MS Mincho-Bold",P["MS-Mincho-BoldItalic"]="MS Mincho-BoldItalic",P["MS-Mincho-Italic"]="MS Mincho-Italic",P["MS-PGothic"]="MS PGothic",P["MS-PGothic-Bold"]="MS PGothic-Bold",P["MS-PGothic-BoldItalic"]="MS PGothic-BoldItalic",P["MS-PGothic-Italic"]="MS PGothic-Italic",P["MS-PMincho"]="MS PMincho",P["MS-PMincho-Bold"]="MS PMincho-Bold",P["MS-PMincho-BoldItalic"]="MS PMincho-BoldItalic",P["MS-PMincho-Italic"]="MS PMincho-Italic",P.NuptialScript="Times-Italic",P.SegoeUISymbol="Helvetica"}),Jq=R8(function(P){P["Adobe Jenson"]=!0,P["Adobe Text"]=!0,P.Albertus=!0,P.Aldus=!0,P.Alexandria=!0,P.Algerian=!0,P["American Typewriter"]=!0,P.Antiqua=!0,P.Apex=!0,P.Arno=!0,P.Aster=!0,P.Aurora=!0,P.Baskerville=!0,P.Bell=!0,P.Bembo=!0,P["Bembo Schoolbook"]=!0,P.Benguiat=!0,P["Berkeley Old Style"]=!0,P["Bernhard Modern"]=!0,P["Berthold City"]=!0,P.Bodoni=!0,P["Bauer Bodoni"]=!0,P["Book Antiqua"]=!0,P.Bookman=!0,P["Bordeaux Roman"]=!0,P["Californian FB"]=!0,P.Calisto=!0,P.Calvert=!0,P.Capitals=!0,P.Cambria=!0,P.Cartier=!0,P.Caslon=!0,P.Catull=!0,P.Centaur=!0,P["Century Old Style"]=!0,P["Century Schoolbook"]=!0,P.Chaparral=!0,P["Charis SIL"]=!0,P.Cheltenham=!0,P["Cholla Slab"]=!0,P.Clarendon=!0,P.Clearface=!0,P.Cochin=!0,P.Colonna=!0,P["Computer Modern"]=!0,P["Concrete Roman"]=!0,P.Constantia=!0,P["Cooper Black"]=!0,P.Corona=!0,P.Ecotype=!0,P.Egyptienne=!0,P.Elephant=!0,P.Excelsior=!0,P.Fairfield=!0,P["FF Scala"]=!0,P.Folkard=!0,P.Footlight=!0,P.FreeSerif=!0,P["Friz Quadrata"]=!0,P.Garamond=!0,P.Gentium=!0,P.Georgia=!0,P.Gloucester=!0,P["Goudy Old Style"]=!0,P["Goudy Schoolbook"]=!0,P["Goudy Pro Font"]=!0,P.Granjon=!0,P["Guardian Egyptian"]=!0,P.Heather=!0,P.Hercules=!0,P["High Tower Text"]=!0,P.Hiroshige=!0,P["Hoefler Text"]=!0,P["Humana Serif"]=!0,P.Imprint=!0,P["Ionic No. 5"]=!0,P.Janson=!0,P.Joanna=!0,P.Korinna=!0,P.Lexicon=!0,P.LiberationSerif=!0,P["Liberation Serif"]=!0,P["Linux Libertine"]=!0,P.Literaturnaya=!0,P.Lucida=!0,P["Lucida Bright"]=!0,P.Melior=!0,P.Memphis=!0,P.Miller=!0,P.Minion=!0,P.Modern=!0,P["Mona Lisa"]=!0,P["Mrs Eaves"]=!0,P["MS Serif"]=!0,P["Museo Slab"]=!0,P["New York"]=!0,P["Nimbus Roman"]=!0,P["NPS Rawlinson Roadway"]=!0,P.NuptialScript=!0,P.Palatino=!0,P.Perpetua=!0,P.Plantin=!0,P["Plantin Schoolbook"]=!0,P.Playbill=!0,P["Poor Richard"]=!0,P["Rawlinson Roadway"]=!0,P.Renault=!0,P.Requiem=!0,P.Rockwell=!0,P.Roman=!0,P["Rotis Serif"]=!0,P.Sabon=!0,P.Scala=!0,P.Seagull=!0,P.Sistina=!0,P.Souvenir=!0,P.STIX=!0,P["Stone Informal"]=!0,P["Stone Serif"]=!0,P.Sylfaen=!0,P.Times=!0,P.Trajan=!0,P["Trinité"]=!0,P["Trump Mediaeval"]=!0,P.Utopia=!0,P["Vale Type"]=!0,P["Bitstream Vera"]=!0,P["Vera Serif"]=!0,P.Versailles=!0,P.Wanted=!0,P.Weiss=!0,P["Wide Latin"]=!0,P.Windsor=!0,P.XITS=!0}),RZ=R8(function(P){P.Dingbats=!0,P.Symbol=!0,P.ZapfDingbats=!0,P.Wingdings=!0,P["Wingdings-Bold"]=!0,P["Wingdings-Regular"]=!0}),Iz=R8(function(P){P[2]=10,P[3]=32,P[4]=33,P[5]=34,P[6]=35,P[7]=36,P[8]=37,P[9]=38,P[10]=39,P[11]=40,P[12]=41,P[13]=42,P[14]=43,P[15]=44,P[16]=45,P[17]=46,P[18]=47,P[19]=48,P[20]=49,P[21]=50,P[22]=51,P[23]=52,P[24]=53,P[25]=54,P[26]=55,P[27]=56,P[28]=57,P[29]=58,P[30]=894,P[31]=60,P[32]=61,P[33]=62,P[34]=63,P[35]=64,P[36]=65,P[37]=66,P[38]=67,P[39]=68,P[40]=69,P[41]=70,P[42]=71,P[43]=72,P[44]=73,P[45]=74,P[46]=75,P[47]=76,P[48]=77,P[49]=78,P[50]=79,P[51]=80,P[52]=81,P[53]=82,P[54]=83,P[55]=84,P[56]=85,P[57]=86,P[58]=87,P[59]=88,P[60]=89,P[61]=90,P[62]=91,P[63]=92,P[64]=93,P[65]=94,P[66]=95,P[67]=96,P[68]=97,P[69]=98,P[70]=99,P[71]=100,P[72]=101,P[73]=102,P[74]=103,P[75]=104,P[76]=105,P[77]=106,P[78]=107,P[79]=108,P[80]=109,P[81]=110,P[82]=111,P[83]=112,P[84]=113,P[85]=114,P[86]=115,P[87]=116,P[88]=117,P[89]=118,P[90]=119,P[91]=120,P[92]=121,P[93]=122,P[94]=123,P[95]=124,P[96]=125,P[97]=126,P[98]=196,P[99]=197,P[100]=199,P[101]=201,P[102]=209,P[103]=214,P[104]=220,P[105]=225,P[106]=224,P[107]=226,P[108]=228,P[109]=227,P[110]=229,P[111]=231,P[112]=233,P[113]=232,P[114]=234,P[115]=235,P[116]=237,P[117]=236,P[118]=238,P[119]=239,P[120]=241,P[121]=243,P[122]=242,P[123]=244,P[124]=246,P[125]=245,P[126]=250,P[127]=249,P[128]=251,P[129]=252,P[130]=8224,P[131]=176,P[132]=162,P[133]=163,P[134]=167,P[135]=8226,P[136]=182,P[137]=223,P[138]=174,P[139]=169,P[140]=8482,P[141]=180,P[142]=168,P[143]=8800,P[144]=198,P[145]=216,P[146]=8734,P[147]=177,P[148]=8804,P[149]=8805,P[150]=165,P[151]=181,P[152]=8706,P[153]=8721,P[154]=8719,P[156]=8747,P[157]=170,P[158]=186,P[159]=8486,P[160]=230,P[161]=248,P[162]=191,P[163]=161,P[164]=172,P[165]=8730,P[166]=402,P[167]=8776,P[168]=8710,P[169]=171,P[170]=187,P[171]=8230,P[179]=8220,P[180]=8221,P[181]=8216,P[182]=8217,P[200]=193,P[203]=205,P[207]=211,P[210]=218,P[223]=711,P[224]=321,P[225]=322,P[226]=352,P[227]=353,P[228]=381,P[229]=382,P[233]=221,P[234]=253,P[252]=263,P[253]=268,P[254]=269,P[258]=258,P[260]=260,P[261]=261,P[265]=280,P[266]=281,P[267]=282,P[268]=283,P[269]=313,P[275]=323,P[276]=324,P[278]=328,P[283]=344,P[284]=345,P[285]=346,P[286]=347,P[292]=367,P[295]=377,P[296]=378,P[298]=380,P[305]=963,P[306]=964,P[307]=966,P[308]=8215,P[309]=8252,P[310]=8319,P[311]=8359,P[312]=8592,P[313]=8593,P[337]=9552,P[493]=1039,P[494]=1040,P[570]=1040,P[571]=1041,P[572]=1042,P[573]=1043,P[574]=1044,P[575]=1045,P[576]=1046,P[577]=1047,P[578]=1048,P[579]=1049,P[580]=1050,P[581]=1051,P[582]=1052,P[583]=1053,P[584]=1054,P[585]=1055,P[586]=1056,P[587]=1057,P[588]=1058,P[589]=1059,P[590]=1060,P[591]=1061,P[592]=1062,P[593]=1063,P[594]=1064,P[595]=1065,P[596]=1066,P[597]=1067,P[598]=1068,P[599]=1069,P[600]=1070,P[672]=1488,P[673]=1489,P[674]=1490,P[675]=1491,P[676]=1492,P[677]=1493,P[678]=1494,P[679]=1495,P[680]=1496,P[681]=1497,P[682]=1498,P[683]=1499,P[684]=1500,P[685]=1501,P[686]=1502,P[687]=1503,P[688]=1504,P[689]=1505,P[690]=1506,P[691]=1507,P[692]=1508,P[693]=1509,P[694]=1510,P[695]=1511,P[696]=1512,P[697]=1513,P[698]=1514,P[705]=1524,P[706]=8362,P[710]=64288,P[711]=64298,P[759]=1617,P[761]=1776,P[763]=1778,P[775]=1652,P[777]=1764,P[778]=1780,P[779]=1781,P[780]=1782,P[782]=771,P[783]=64726,P[786]=8363,P[788]=8532,P[790]=768,P[791]=769,P[792]=768,P[795]=803,P[797]=64336,P[798]=64337,P[799]=64342,P[800]=64343,P[801]=64344,P[802]=64345,P[803]=64362,P[804]=64363,P[805]=64364,P[2424]=7821,P[2425]=7822,P[2426]=7823,P[2427]=7824,P[2428]=7825,P[2429]=7826,P[2430]=7827,P[2433]=7682,P[2678]=8045,P[2679]=8046,P[2830]=1552,P[2838]=686,P[2840]=751,P[2842]=753,P[2843]=754,P[2844]=755,P[2846]=757,P[2856]=767,P[2857]=848,P[2858]=849,P[2862]=853,P[2863]=854,P[2864]=855,P[2865]=861,P[2866]=862,P[2906]=7460,P[2908]=7462,P[2909]=7463,P[2910]=7464,P[2912]=7466,P[2913]=7467,P[2914]=7468,P[2916]=7470,P[2917]=7471,P[2918]=7472,P[2920]=7474,P[2921]=7475,P[2922]=7476,P[2924]=7478,P[2925]=7479,P[2926]=7480,P[2928]=7482,P[2929]=7483,P[2930]=7484,P[2932]=7486,P[2933]=7487,P[2934]=7488,P[2936]=7490,P[2937]=7491,P[2938]=7492,P[2940]=7494,P[2941]=7495,P[2942]=7496,P[2944]=7498,P[2946]=7500,P[2948]=7502,P[2950]=7504,P[2951]=7505,P[2952]=7506,P[2954]=7508,P[2955]=7509,P[2956]=7510,P[2958]=7512,P[2959]=7513,P[2960]=7514,P[2962]=7516,P[2963]=7517,P[2964]=7518,P[2966]=7520,P[2967]=7521,P[2968]=7522,P[2970]=7524,P[2971]=7525,P[2972]=7526,P[2974]=7528,P[2975]=7529,P[2976]=7530,P[2978]=1537,P[2979]=1538,P[2980]=1539,P[2982]=1549,P[2983]=1551,P[2984]=1552,P[2986]=1554,P[2987]=1555,P[2988]=1556,P[2990]=1623,P[2991]=1624,P[2995]=1775,P[2999]=1791,P[3002]=64290,P[3003]=64291,P[3004]=64292,P[3006]=64294,P[3007]=64295,P[3008]=64296,P[3011]=1900,P[3014]=8223,P[3015]=8244,P[3017]=7532,P[3018]=7533,P[3019]=7534,P[3075]=7590,P[3076]=7591,P[3079]=7594,P[3080]=7595,P[3083]=7598,P[3084]=7599,P[3087]=7602,P[3088]=7603,P[3091]=7606,P[3092]=7607,P[3095]=7610,P[3096]=7611,P[3099]=7614,P[3100]=7615,P[3103]=7618,P[3104]=7619,P[3107]=8337,P[3108]=8338,P[3116]=1884,P[3119]=1885,P[3120]=1885,P[3123]=1886,P[3124]=1886,P[3127]=1887,P[3128]=1887,P[3131]=1888,P[3132]=1888,P[3135]=1889,P[3136]=1889,P[3139]=1890,P[3140]=1890,P[3143]=1891,P[3144]=1891,P[3147]=1892,P[3148]=1892,P[3153]=580,P[3154]=581,P[3157]=584,P[3158]=585,P[3161]=588,P[3162]=589,P[3165]=891,P[3166]=892,P[3169]=1274,P[3170]=1275,P[3173]=1278,P[3174]=1279,P[3181]=7622,P[3182]=7623,P[3282]=11799,P[3316]=578,P[3379]=42785,P[3393]=1159,P[3416]=8377}),oI=R8(function(P){P[227]=322,P[264]=261,P[291]=346}),aI=R8(function(P){P[1]=32,P[4]=65,P[5]=192,P[6]=193,P[9]=196,P[17]=66,P[18]=67,P[21]=268,P[24]=68,P[28]=69,P[29]=200,P[30]=201,P[32]=282,P[38]=70,P[39]=71,P[44]=72,P[47]=73,P[48]=204,P[49]=205,P[58]=74,P[60]=75,P[62]=76,P[68]=77,P[69]=78,P[75]=79,P[76]=210,P[80]=214,P[87]=80,P[89]=81,P[90]=82,P[92]=344,P[94]=83,P[97]=352,P[100]=84,P[104]=85,P[109]=220,P[115]=86,P[116]=87,P[121]=88,P[122]=89,P[124]=221,P[127]=90,P[129]=381,P[258]=97,P[259]=224,P[260]=225,P[263]=228,P[268]=261,P[271]=98,P[272]=99,P[273]=263,P[275]=269,P[282]=100,P[286]=101,P[287]=232,P[288]=233,P[290]=283,P[295]=281,P[296]=102,P[336]=103,P[346]=104,P[349]=105,P[350]=236,P[351]=237,P[361]=106,P[364]=107,P[367]=108,P[371]=322,P[373]=109,P[374]=110,P[381]=111,P[382]=242,P[383]=243,P[386]=246,P[393]=112,P[395]=113,P[396]=114,P[398]=345,P[400]=115,P[401]=347,P[403]=353,P[410]=116,P[437]=117,P[442]=252,P[448]=118,P[449]=119,P[454]=120,P[455]=121,P[457]=253,P[460]=122,P[462]=382,P[463]=380,P[853]=44,P[855]=58,P[856]=46,P[876]=47,P[878]=45,P[882]=45,P[894]=40,P[895]=41,P[896]=91,P[897]=93,P[923]=64,P[940]=163,P[1004]=48,P[1005]=49,P[1006]=50,P[1007]=51,P[1008]=52,P[1009]=53,P[1010]=54,P[1011]=55,P[1012]=56,P[1013]=57,P[1081]=37,P[1085]=43,P[1086]=45});KG=class KG extends Uq{constructor(P,Z,q){super(q||[0.000488,0,0,0.000488,0,0]),this.glyphs=P,this.cmap=Z}compileGlyphImpl(P,Z){JG(P,Z,this)}};BG=class BG extends Uq{constructor(P,Z,q){super(q||[0.001,0,0,0.001,0,0]),this.glyphs=P.glyphs,this.gsubrs=P.gsubrs||[],this.subrs=P.subrs||[],this.cmap=Z,this.glyphNameMap=l0(),this.gsubrsBias=fZ(this.gsubrs),this.subrsBias=fZ(this.subrs),this.isCFFCIDFont=P.isCFFCIDFont,this.fdSelect=P.fdSelect,this.fdArray=P.fdArray}compileGlyphImpl(P,Z,q){GZ(P,Z,this,q)}};tI=R8(function(P){P.Courier=600,P["Courier-Bold"]=600,P["Courier-BoldOblique"]=600,P["Courier-Oblique"]=600,P.Helvetica=R8(function(Z){Z.space=278,Z.exclam=278,Z.quotedbl=355,Z.numbersign=556,Z.dollar=556,Z.percent=889,Z.ampersand=667,Z.quoteright=222,Z.parenleft=333,Z.parenright=333,Z.asterisk=389,Z.plus=584,Z.comma=278,Z.hyphen=333,Z.period=278,Z.slash=278,Z.zero=556,Z.one=556,Z.two=556,Z.three=556,Z.four=556,Z.five=556,Z.six=556,Z.seven=556,Z.eight=556,Z.nine=556,Z.colon=278,Z.semicolon=278,Z.less=584,Z.equal=584,Z.greater=584,Z.question=556,Z.at=1015,Z.A=667,Z.B=667,Z.C=722,Z.D=722,Z.E=667,Z.F=611,Z.G=778,Z.H=722,Z.I=278,Z.J=500,Z.K=667,Z.L=556,Z.M=833,Z.N=722,Z.O=778,Z.P=667,Z.Q=778,Z.R=722,Z.S=667,Z.T=611,Z.U=722,Z.V=667,Z.W=944,Z.X=667,Z.Y=667,Z.Z=611,Z.bracketleft=278,Z.backslash=278,Z.bracketright=278,Z.asciicircum=469,Z.underscore=556,Z.quoteleft=222,Z.a=556,Z.b=556,Z.c=500,Z.d=556,Z.e=556,Z.f=278,Z.g=556,Z.h=556,Z.i=222,Z.j=222,Z.k=500,Z.l=222,Z.m=833,Z.n=556,Z.o=556,Z.p=556,Z.q=556,Z.r=333,Z.s=500,Z.t=278,Z.u=556,Z.v=500,Z.w=722,Z.x=500,Z.y=500,Z.z=500,Z.braceleft=334,Z.bar=260,Z.braceright=334,Z.asciitilde=584,Z.exclamdown=333,Z.cent=556,Z.sterling=556,Z.fraction=167,Z.yen=556,Z.florin=556,Z.section=556,Z.currency=556,Z.quotesingle=191,Z.quotedblleft=333,Z.guillemotleft=556,Z.guilsinglleft=333,Z.guilsinglright=333,Z.fi=500,Z.fl=500,Z.endash=556,Z.dagger=556,Z.daggerdbl=556,Z.periodcentered=278,Z.paragraph=537,Z.bullet=350,Z.quotesinglbase=222,Z.quotedblbase=333,Z.quotedblright=333,Z.guillemotright=556,Z.ellipsis=1000,Z.perthousand=1000,Z.questiondown=611,Z.grave=333,Z.acute=333,Z.circumflex=333,Z.tilde=333,Z.macron=333,Z.breve=333,Z.dotaccent=333,Z.dieresis=333,Z.ring=333,Z.cedilla=333,Z.hungarumlaut=333,Z.ogonek=333,Z.caron=333,Z.emdash=1000,Z.AE=1000,Z.ordfeminine=370,Z.Lslash=556,Z.Oslash=778,Z.OE=1000,Z.ordmasculine=365,Z.ae=889,Z.dotlessi=278,Z.lslash=222,Z.oslash=611,Z.oe=944,Z.germandbls=611,Z.Idieresis=278,Z.eacute=556,Z.abreve=556,Z.uhungarumlaut=556,Z.ecaron=556,Z.Ydieresis=667,Z.divide=584,Z.Yacute=667,Z.Acircumflex=667,Z.aacute=556,Z.Ucircumflex=722,Z.yacute=500,Z.scommaaccent=500,Z.ecircumflex=556,Z.Uring=722,Z.Udieresis=722,Z.aogonek=556,Z.Uacute=722,Z.uogonek=556,Z.Edieresis=667,Z.Dcroat=722,Z.commaaccent=250,Z.copyright=737,Z.Emacron=667,Z.ccaron=500,Z.aring=556,Z.Ncommaaccent=722,Z.lacute=222,Z.agrave=556,Z.Tcommaaccent=611,Z.Cacute=722,Z.atilde=556,Z.Edotaccent=667,Z.scaron=500,Z.scedilla=500,Z.iacute=278,Z.lozenge=471,Z.Rcaron=722,Z.Gcommaaccent=778,Z.ucircumflex=556,Z.acircumflex=556,Z.Amacron=667,Z.rcaron=333,Z.ccedilla=500,Z.Zdotaccent=611,Z.Thorn=667,Z.Omacron=778,Z.Racute=722,Z.Sacute=667,Z.dcaron=643,Z.Umacron=722,Z.uring=556,Z.threesuperior=333,Z.Ograve=778,Z.Agrave=667,Z.Abreve=667,Z.multiply=584,Z.uacute=556,Z.Tcaron=611,Z.partialdiff=476,Z.ydieresis=500,Z.Nacute=722,Z.icircumflex=278,Z.Ecircumflex=667,Z.adieresis=556,Z.edieresis=556,Z.cacute=500,Z.nacute=556,Z.umacron=556,Z.Ncaron=722,Z.Iacute=278,Z.plusminus=584,Z.brokenbar=260,Z.registered=737,Z.Gbreve=778,Z.Idotaccent=278,Z.summation=600,Z.Egrave=667,Z.racute=333,Z.omacron=556,Z.Zacute=611,Z.Zcaron=611,Z.greaterequal=549,Z.Eth=722,Z.Ccedilla=722,Z.lcommaaccent=222,Z.tcaron=317,Z.eogonek=556,Z.Uogonek=722,Z.Aacute=667,Z.Adieresis=667,Z.egrave=556,Z.zacute=500,Z.iogonek=222,Z.Oacute=778,Z.oacute=556,Z.amacron=556,Z.sacute=500,Z.idieresis=278,Z.Ocircumflex=778,Z.Ugrave=722,Z.Delta=612,Z.thorn=556,Z.twosuperior=333,Z.Odieresis=778,Z.mu=556,Z.igrave=278,Z.ohungarumlaut=556,Z.Eogonek=667,Z.dcroat=556,Z.threequarters=834,Z.Scedilla=667,Z.lcaron=299,Z.Kcommaaccent=667,Z.Lacute=556,Z.trademark=1000,Z.edotaccent=556,Z.Igrave=278,Z.Imacron=278,Z.Lcaron=556,Z.onehalf=834,Z.lessequal=549,Z.ocircumflex=556,Z.ntilde=556,Z.Uhungarumlaut=722,Z.Eacute=667,Z.emacron=556,Z.gbreve=556,Z.onequarter=834,Z.Scaron=667,Z.Scommaaccent=667,Z.Ohungarumlaut=778,Z.degree=400,Z.ograve=556,Z.Ccaron=722,Z.ugrave=556,Z.radical=453,Z.Dcaron=722,Z.rcommaaccent=333,Z.Ntilde=722,Z.otilde=556,Z.Rcommaaccent=722,Z.Lcommaaccent=556,Z.Atilde=667,Z.Aogonek=667,Z.Aring=667,Z.Otilde=778,Z.zdotaccent=500,Z.Ecaron=667,Z.Iogonek=278,Z.kcommaaccent=500,Z.minus=584,Z.Icircumflex=278,Z.ncaron=556,Z.tcommaaccent=278,Z.logicalnot=584,Z.odieresis=556,Z.udieresis=556,Z.notequal=549,Z.gcommaaccent=556,Z.eth=556,Z.zcaron=500,Z.ncommaaccent=556,Z.onesuperior=333,Z.imacron=278,Z.Euro=556}),P["Helvetica-Bold"]=R8(function(Z){Z.space=278,Z.exclam=333,Z.quotedbl=474,Z.numbersign=556,Z.dollar=556,Z.percent=889,Z.ampersand=722,Z.quoteright=278,Z.parenleft=333,Z.parenright=333,Z.asterisk=389,Z.plus=584,Z.comma=278,Z.hyphen=333,Z.period=278,Z.slash=278,Z.zero=556,Z.one=556,Z.two=556,Z.three=556,Z.four=556,Z.five=556,Z.six=556,Z.seven=556,Z.eight=556,Z.nine=556,Z.colon=333,Z.semicolon=333,Z.less=584,Z.equal=584,Z.greater=584,Z.question=611,Z.at=975,Z.A=722,Z.B=722,Z.C=722,Z.D=722,Z.E=667,Z.F=611,Z.G=778,Z.H=722,Z.I=278,Z.J=556,Z.K=722,Z.L=611,Z.M=833,Z.N=722,Z.O=778,Z.P=667,Z.Q=778,Z.R=722,Z.S=667,Z.T=611,Z.U=722,Z.V=667,Z.W=944,Z.X=667,Z.Y=667,Z.Z=611,Z.bracketleft=333,Z.backslash=278,Z.bracketright=333,Z.asciicircum=584,Z.underscore=556,Z.quoteleft=278,Z.a=556,Z.b=611,Z.c=556,Z.d=611,Z.e=556,Z.f=333,Z.g=611,Z.h=611,Z.i=278,Z.j=278,Z.k=556,Z.l=278,Z.m=889,Z.n=611,Z.o=611,Z.p=611,Z.q=611,Z.r=389,Z.s=556,Z.t=333,Z.u=611,Z.v=556,Z.w=778,Z.x=556,Z.y=556,Z.z=500,Z.braceleft=389,Z.bar=280,Z.braceright=389,Z.asciitilde=584,Z.exclamdown=333,Z.cent=556,Z.sterling=556,Z.fraction=167,Z.yen=556,Z.florin=556,Z.section=556,Z.currency=556,Z.quotesingle=238,Z.quotedblleft=500,Z.guillemotleft=556,Z.guilsinglleft=333,Z.guilsinglright=333,Z.fi=611,Z.fl=611,Z.endash=556,Z.dagger=556,Z.daggerdbl=556,Z.periodcentered=278,Z.paragraph=556,Z.bullet=350,Z.quotesinglbase=278,Z.quotedblbase=500,Z.quotedblright=500,Z.guillemotright=556,Z.ellipsis=1000,Z.perthousand=1000,Z.questiondown=611,Z.grave=333,Z.acute=333,Z.circumflex=333,Z.tilde=333,Z.macron=333,Z.breve=333,Z.dotaccent=333,Z.dieresis=333,Z.ring=333,Z.cedilla=333,Z.hungarumlaut=333,Z.ogonek=333,Z.caron=333,Z.emdash=1000,Z.AE=1000,Z.ordfeminine=370,Z.Lslash=611,Z.Oslash=778,Z.OE=1000,Z.ordmasculine=365,Z.ae=889,Z.dotlessi=278,Z.lslash=278,Z.oslash=611,Z.oe=944,Z.germandbls=611,Z.Idieresis=278,Z.eacute=556,Z.abreve=556,Z.uhungarumlaut=611,Z.ecaron=556,Z.Ydieresis=667,Z.divide=584,Z.Yacute=667,Z.Acircumflex=722,Z.aacute=556,Z.Ucircumflex=722,Z.yacute=556,Z.scommaaccent=556,Z.ecircumflex=556,Z.Uring=722,Z.Udieresis=722,Z.aogonek=556,Z.Uacute=722,Z.uogonek=611,Z.Edieresis=667,Z.Dcroat=722,Z.commaaccent=250,Z.copyright=737,Z.Emacron=667,Z.ccaron=556,Z.aring=556,Z.Ncommaaccent=722,Z.lacute=278,Z.agrave=556,Z.Tcommaaccent=611,Z.Cacute=722,Z.atilde=556,Z.Edotaccent=667,Z.scaron=556,Z.scedilla=556,Z.iacute=278,Z.lozenge=494,Z.Rcaron=722,Z.Gcommaaccent=778,Z.ucircumflex=611,Z.acircumflex=556,Z.Amacron=722,Z.rcaron=389,Z.ccedilla=556,Z.Zdotaccent=611,Z.Thorn=667,Z.Omacron=778,Z.Racute=722,Z.Sacute=667,Z.dcaron=743,Z.Umacron=722,Z.uring=611,Z.threesuperior=333,Z.Ograve=778,Z.Agrave=722,Z.Abreve=722,Z.multiply=584,Z.uacute=611,Z.Tcaron=611,Z.partialdiff=494,Z.ydieresis=556,Z.Nacute=722,Z.icircumflex=278,Z.Ecircumflex=667,Z.adieresis=556,Z.edieresis=556,Z.cacute=556,Z.nacute=611,Z.umacron=611,Z.Ncaron=722,Z.Iacute=278,Z.plusminus=584,Z.brokenbar=280,Z.registered=737,Z.Gbreve=778,Z.Idotaccent=278,Z.summation=600,Z.Egrave=667,Z.racute=389,Z.omacron=611,Z.Zacute=611,Z.Zcaron=611,Z.greaterequal=549,Z.Eth=722,Z.Ccedilla=722,Z.lcommaaccent=278,Z.tcaron=389,Z.eogonek=556,Z.Uogonek=722,Z.Aacute=722,Z.Adieresis=722,Z.egrave=556,Z.zacute=500,Z.iogonek=278,Z.Oacute=778,Z.oacute=611,Z.amacron=556,Z.sacute=556,Z.idieresis=278,Z.Ocircumflex=778,Z.Ugrave=722,Z.Delta=612,Z.thorn=611,Z.twosuperior=333,Z.Odieresis=778,Z.mu=611,Z.igrave=278,Z.ohungarumlaut=611,Z.Eogonek=667,Z.dcroat=611,Z.threequarters=834,Z.Scedilla=667,Z.lcaron=400,Z.Kcommaaccent=722,Z.Lacute=611,Z.trademark=1000,Z.edotaccent=556,Z.Igrave=278,Z.Imacron=278,Z.Lcaron=611,Z.onehalf=834,Z.lessequal=549,Z.ocircumflex=611,Z.ntilde=611,Z.Uhungarumlaut=722,Z.Eacute=667,Z.emacron=556,Z.gbreve=611,Z.onequarter=834,Z.Scaron=667,Z.Scommaaccent=667,Z.Ohungarumlaut=778,Z.degree=400,Z.ograve=611,Z.Ccaron=722,Z.ugrave=611,Z.radical=549,Z.Dcaron=722,Z.rcommaaccent=389,Z.Ntilde=722,Z.otilde=611,Z.Rcommaaccent=722,Z.Lcommaaccent=611,Z.Atilde=722,Z.Aogonek=722,Z.Aring=722,Z.Otilde=778,Z.zdotaccent=500,Z.Ecaron=667,Z.Iogonek=278,Z.kcommaaccent=556,Z.minus=584,Z.Icircumflex=278,Z.ncaron=611,Z.tcommaaccent=333,Z.logicalnot=584,Z.odieresis=611,Z.udieresis=611,Z.notequal=549,Z.gcommaaccent=611,Z.eth=611,Z.zcaron=500,Z.ncommaaccent=611,Z.onesuperior=333,Z.imacron=278,Z.Euro=556}),P["Helvetica-BoldOblique"]=R8(function(Z){Z.space=278,Z.exclam=333,Z.quotedbl=474,Z.numbersign=556,Z.dollar=556,Z.percent=889,Z.ampersand=722,Z.quoteright=278,Z.parenleft=333,Z.parenright=333,Z.asterisk=389,Z.plus=584,Z.comma=278,Z.hyphen=333,Z.period=278,Z.slash=278,Z.zero=556,Z.one=556,Z.two=556,Z.three=556,Z.four=556,Z.five=556,Z.six=556,Z.seven=556,Z.eight=556,Z.nine=556,Z.colon=333,Z.semicolon=333,Z.less=584,Z.equal=584,Z.greater=584,Z.question=611,Z.at=975,Z.A=722,Z.B=722,Z.C=722,Z.D=722,Z.E=667,Z.F=611,Z.G=778,Z.H=722,Z.I=278,Z.J=556,Z.K=722,Z.L=611,Z.M=833,Z.N=722,Z.O=778,Z.P=667,Z.Q=778,Z.R=722,Z.S=667,Z.T=611,Z.U=722,Z.V=667,Z.W=944,Z.X=667,Z.Y=667,Z.Z=611,Z.bracketleft=333,Z.backslash=278,Z.bracketright=333,Z.asciicircum=584,Z.underscore=556,Z.quoteleft=278,Z.a=556,Z.b=611,Z.c=556,Z.d=611,Z.e=556,Z.f=333,Z.g=611,Z.h=611,Z.i=278,Z.j=278,Z.k=556,Z.l=278,Z.m=889,Z.n=611,Z.o=611,Z.p=611,Z.q=611,Z.r=389,Z.s=556,Z.t=333,Z.u=611,Z.v=556,Z.w=778,Z.x=556,Z.y=556,Z.z=500,Z.braceleft=389,Z.bar=280,Z.braceright=389,Z.asciitilde=584,Z.exclamdown=333,Z.cent=556,Z.sterling=556,Z.fraction=167,Z.yen=556,Z.florin=556,Z.section=556,Z.currency=556,Z.quotesingle=238,Z.quotedblleft=500,Z.guillemotleft=556,Z.guilsinglleft=333,Z.guilsinglright=333,Z.fi=611,Z.fl=611,Z.endash=556,Z.dagger=556,Z.daggerdbl=556,Z.periodcentered=278,Z.paragraph=556,Z.bullet=350,Z.quotesinglbase=278,Z.quotedblbase=500,Z.quotedblright=500,Z.guillemotright=556,Z.ellipsis=1000,Z.perthousand=1000,Z.questiondown=611,Z.grave=333,Z.acute=333,Z.circumflex=333,Z.tilde=333,Z.macron=333,Z.breve=333,Z.dotaccent=333,Z.dieresis=333,Z.ring=333,Z.cedilla=333,Z.hungarumlaut=333,Z.ogonek=333,Z.caron=333,Z.emdash=1000,Z.AE=1000,Z.ordfeminine=370,Z.Lslash=611,Z.Oslash=778,Z.OE=1000,Z.ordmasculine=365,Z.ae=889,Z.dotlessi=278,Z.lslash=278,Z.oslash=611,Z.oe=944,Z.germandbls=611,Z.Idieresis=278,Z.eacute=556,Z.abreve=556,Z.uhungarumlaut=611,Z.ecaron=556,Z.Ydieresis=667,Z.divide=584,Z.Yacute=667,Z.Acircumflex=722,Z.aacute=556,Z.Ucircumflex=722,Z.yacute=556,Z.scommaaccent=556,Z.ecircumflex=556,Z.Uring=722,Z.Udieresis=722,Z.aogonek=556,Z.Uacute=722,Z.uogonek=611,Z.Edieresis=667,Z.Dcroat=722,Z.commaaccent=250,Z.copyright=737,Z.Emacron=667,Z.ccaron=556,Z.aring=556,Z.Ncommaaccent=722,Z.lacute=278,Z.agrave=556,Z.Tcommaaccent=611,Z.Cacute=722,Z.atilde=556,Z.Edotaccent=667,Z.scaron=556,Z.scedilla=556,Z.iacute=278,Z.lozenge=494,Z.Rcaron=722,Z.Gcommaaccent=778,Z.ucircumflex=611,Z.acircumflex=556,Z.Amacron=722,Z.rcaron=389,Z.ccedilla=556,Z.Zdotaccent=611,Z.Thorn=667,Z.Omacron=778,Z.Racute=722,Z.Sacute=667,Z.dcaron=743,Z.Umacron=722,Z.uring=611,Z.threesuperior=333,Z.Ograve=778,Z.Agrave=722,Z.Abreve=722,Z.multiply=584,Z.uacute=611,Z.Tcaron=611,Z.partialdiff=494,Z.ydieresis=556,Z.Nacute=722,Z.icircumflex=278,Z.Ecircumflex=667,Z.adieresis=556,Z.edieresis=556,Z.cacute=556,Z.nacute=611,Z.umacron=611,Z.Ncaron=722,Z.Iacute=278,Z.plusminus=584,Z.brokenbar=280,Z.registered=737,Z.Gbreve=778,Z.Idotaccent=278,Z.summation=600,Z.Egrave=667,Z.racute=389,Z.omacron=611,Z.Zacute=611,Z.Zcaron=611,Z.greaterequal=549,Z.Eth=722,Z.Ccedilla=722,Z.lcommaaccent=278,Z.tcaron=389,Z.eogonek=556,Z.Uogonek=722,Z.Aacute=722,Z.Adieresis=722,Z.egrave=556,Z.zacute=500,Z.iogonek=278,Z.Oacute=778,Z.oacute=611,Z.amacron=556,Z.sacute=556,Z.idieresis=278,Z.Ocircumflex=778,Z.Ugrave=722,Z.Delta=612,Z.thorn=611,Z.twosuperior=333,Z.Odieresis=778,Z.mu=611,Z.igrave=278,Z.ohungarumlaut=611,Z.Eogonek=667,Z.dcroat=611,Z.threequarters=834,Z.Scedilla=667,Z.lcaron=400,Z.Kcommaaccent=722,Z.Lacute=611,Z.trademark=1000,Z.edotaccent=556,Z.Igrave=278,Z.Imacron=278,Z.Lcaron=611,Z.onehalf=834,Z.lessequal=549,Z.ocircumflex=611,Z.ntilde=611,Z.Uhungarumlaut=722,Z.Eacute=667,Z.emacron=556,Z.gbreve=611,Z.onequarter=834,Z.Scaron=667,Z.Scommaaccent=667,Z.Ohungarumlaut=778,Z.degree=400,Z.ograve=611,Z.Ccaron=722,Z.ugrave=611,Z.radical=549,Z.Dcaron=722,Z.rcommaaccent=389,Z.Ntilde=722,Z.otilde=611,Z.Rcommaaccent=722,Z.Lcommaaccent=611,Z.Atilde=722,Z.Aogonek=722,Z.Aring=722,Z.Otilde=778,Z.zdotaccent=500,Z.Ecaron=667,Z.Iogonek=278,Z.kcommaaccent=556,Z.minus=584,Z.Icircumflex=278,Z.ncaron=611,Z.tcommaaccent=333,Z.logicalnot=584,Z.odieresis=611,Z.udieresis=611,Z.notequal=549,Z.gcommaaccent=611,Z.eth=611,Z.zcaron=500,Z.ncommaaccent=611,Z.onesuperior=333,Z.imacron=278,Z.Euro=556}),P["Helvetica-Oblique"]=R8(function(Z){Z.space=278,Z.exclam=278,Z.quotedbl=355,Z.numbersign=556,Z.dollar=556,Z.percent=889,Z.ampersand=667,Z.quoteright=222,Z.parenleft=333,Z.parenright=333,Z.asterisk=389,Z.plus=584,Z.comma=278,Z.hyphen=333,Z.period=278,Z.slash=278,Z.zero=556,Z.one=556,Z.two=556,Z.three=556,Z.four=556,Z.five=556,Z.six=556,Z.seven=556,Z.eight=556,Z.nine=556,Z.colon=278,Z.semicolon=278,Z.less=584,Z.equal=584,Z.greater=584,Z.question=556,Z.at=1015,Z.A=667,Z.B=667,Z.C=722,Z.D=722,Z.E=667,Z.F=611,Z.G=778,Z.H=722,Z.I=278,Z.J=500,Z.K=667,Z.L=556,Z.M=833,Z.N=722,Z.O=778,Z.P=667,Z.Q=778,Z.R=722,Z.S=667,Z.T=611,Z.U=722,Z.V=667,Z.W=944,Z.X=667,Z.Y=667,Z.Z=611,Z.bracketleft=278,Z.backslash=278,Z.bracketright=278,Z.asciicircum=469,Z.underscore=556,Z.quoteleft=222,Z.a=556,Z.b=556,Z.c=500,Z.d=556,Z.e=556,Z.f=278,Z.g=556,Z.h=556,Z.i=222,Z.j=222,Z.k=500,Z.l=222,Z.m=833,Z.n=556,Z.o=556,Z.p=556,Z.q=556,Z.r=333,Z.s=500,Z.t=278,Z.u=556,Z.v=500,Z.w=722,Z.x=500,Z.y=500,Z.z=500,Z.braceleft=334,Z.bar=260,Z.braceright=334,Z.asciitilde=584,Z.exclamdown=333,Z.cent=556,Z.sterling=556,Z.fraction=167,Z.yen=556,Z.florin=556,Z.section=556,Z.currency=556,Z.quotesingle=191,Z.quotedblleft=333,Z.guillemotleft=556,Z.guilsinglleft=333,Z.guilsinglright=333,Z.fi=500,Z.fl=500,Z.endash=556,Z.dagger=556,Z.daggerdbl=556,Z.periodcentered=278,Z.paragraph=537,Z.bullet=350,Z.quotesinglbase=222,Z.quotedblbase=333,Z.quotedblright=333,Z.guillemotright=556,Z.ellipsis=1000,Z.perthousand=1000,Z.questiondown=611,Z.grave=333,Z.acute=333,Z.circumflex=333,Z.tilde=333,Z.macron=333,Z.breve=333,Z.dotaccent=333,Z.dieresis=333,Z.ring=333,Z.cedilla=333,Z.hungarumlaut=333,Z.ogonek=333,Z.caron=333,Z.emdash=1000,Z.AE=1000,Z.ordfeminine=370,Z.Lslash=556,Z.Oslash=778,Z.OE=1000,Z.ordmasculine=365,Z.ae=889,Z.dotlessi=278,Z.lslash=222,Z.oslash=611,Z.oe=944,Z.germandbls=611,Z.Idieresis=278,Z.eacute=556,Z.abreve=556,Z.uhungarumlaut=556,Z.ecaron=556,Z.Ydieresis=667,Z.divide=584,Z.Yacute=667,Z.Acircumflex=667,Z.aacute=556,Z.Ucircumflex=722,Z.yacute=500,Z.scommaaccent=500,Z.ecircumflex=556,Z.Uring=722,Z.Udieresis=722,Z.aogonek=556,Z.Uacute=722,Z.uogonek=556,Z.Edieresis=667,Z.Dcroat=722,Z.commaaccent=250,Z.copyright=737,Z.Emacron=667,Z.ccaron=500,Z.aring=556,Z.Ncommaaccent=722,Z.lacute=222,Z.agrave=556,Z.Tcommaaccent=611,Z.Cacute=722,Z.atilde=556,Z.Edotaccent=667,Z.scaron=500,Z.scedilla=500,Z.iacute=278,Z.lozenge=471,Z.Rcaron=722,Z.Gcommaaccent=778,Z.ucircumflex=556,Z.acircumflex=556,Z.Amacron=667,Z.rcaron=333,Z.ccedilla=500,Z.Zdotaccent=611,Z.Thorn=667,Z.Omacron=778,Z.Racute=722,Z.Sacute=667,Z.dcaron=643,Z.Umacron=722,Z.uring=556,Z.threesuperior=333,Z.Ograve=778,Z.Agrave=667,Z.Abreve=667,Z.multiply=584,Z.uacute=556,Z.Tcaron=611,Z.partialdiff=476,Z.ydieresis=500,Z.Nacute=722,Z.icircumflex=278,Z.Ecircumflex=667,Z.adieresis=556,Z.edieresis=556,Z.cacute=500,Z.nacute=556,Z.umacron=556,Z.Ncaron=722,Z.Iacute=278,Z.plusminus=584,Z.brokenbar=260,Z.registered=737,Z.Gbreve=778,Z.Idotaccent=278,Z.summation=600,Z.Egrave=667,Z.racute=333,Z.omacron=556,Z.Zacute=611,Z.Zcaron=611,Z.greaterequal=549,Z.Eth=722,Z.Ccedilla=722,Z.lcommaaccent=222,Z.tcaron=317,Z.eogonek=556,Z.Uogonek=722,Z.Aacute=667,Z.Adieresis=667,Z.egrave=556,Z.zacute=500,Z.iogonek=222,Z.Oacute=778,Z.oacute=556,Z.amacron=556,Z.sacute=500,Z.idieresis=278,Z.Ocircumflex=778,Z.Ugrave=722,Z.Delta=612,Z.thorn=556,Z.twosuperior=333,Z.Odieresis=778,Z.mu=556,Z.igrave=278,Z.ohungarumlaut=556,Z.Eogonek=667,Z.dcroat=556,Z.threequarters=834,Z.Scedilla=667,Z.lcaron=299,Z.Kcommaaccent=667,Z.Lacute=556,Z.trademark=1000,Z.edotaccent=556,Z.Igrave=278,Z.Imacron=278,Z.Lcaron=556,Z.onehalf=834,Z.lessequal=549,Z.ocircumflex=556,Z.ntilde=556,Z.Uhungarumlaut=722,Z.Eacute=667,Z.emacron=556,Z.gbreve=556,Z.onequarter=834,Z.Scaron=667,Z.Scommaaccent=667,Z.Ohungarumlaut=778,Z.degree=400,Z.ograve=556,Z.Ccaron=722,Z.ugrave=556,Z.radical=453,Z.Dcaron=722,Z.rcommaaccent=333,Z.Ntilde=722,Z.otilde=556,Z.Rcommaaccent=722,Z.Lcommaaccent=556,Z.Atilde=667,Z.Aogonek=667,Z.Aring=667,Z.Otilde=778,Z.zdotaccent=500,Z.Ecaron=667,Z.Iogonek=278,Z.kcommaaccent=500,Z.minus=584,Z.Icircumflex=278,Z.ncaron=556,Z.tcommaaccent=278,Z.logicalnot=584,Z.odieresis=556,Z.udieresis=556,Z.notequal=549,Z.gcommaaccent=556,Z.eth=556,Z.zcaron=500,Z.ncommaaccent=556,Z.onesuperior=333,Z.imacron=278,Z.Euro=556}),P.Symbol=R8(function(Z){Z.space=250,Z.exclam=333,Z.universal=713,Z.numbersign=500,Z.existential=549,Z.percent=833,Z.ampersand=778,Z.suchthat=439,Z.parenleft=333,Z.parenright=333,Z.asteriskmath=500,Z.plus=549,Z.comma=250,Z.minus=549,Z.period=250,Z.slash=278,Z.zero=500,Z.one=500,Z.two=500,Z.three=500,Z.four=500,Z.five=500,Z.six=500,Z.seven=500,Z.eight=500,Z.nine=500,Z.colon=278,Z.semicolon=278,Z.less=549,Z.equal=549,Z.greater=549,Z.question=444,Z.congruent=549,Z.Alpha=722,Z.Beta=667,Z.Chi=722,Z.Delta=612,Z.Epsilon=611,Z.Phi=763,Z.Gamma=603,Z.Eta=722,Z.Iota=333,Z.theta1=631,Z.Kappa=722,Z.Lambda=686,Z.Mu=889,Z.Nu=722,Z.Omicron=722,Z.Pi=768,Z.Theta=741,Z.Rho=556,Z.Sigma=592,Z.Tau=611,Z.Upsilon=690,Z.sigma1=439,Z.Omega=768,Z.Xi=645,Z.Psi=795,Z.Zeta=611,Z.bracketleft=333,Z.therefore=863,Z.bracketright=333,Z.perpendicular=658,Z.underscore=500,Z.radicalex=500,Z.alpha=631,Z.beta=549,Z.chi=549,Z.delta=494,Z.epsilon=439,Z.phi=521,Z.gamma=411,Z.eta=603,Z.iota=329,Z.phi1=603,Z.kappa=549,Z.lambda=549,Z.mu=576,Z.nu=521,Z.omicron=549,Z.pi=549,Z.theta=521,Z.rho=549,Z.sigma=603,Z.tau=439,Z.upsilon=576,Z.omega1=713,Z.omega=686,Z.xi=493,Z.psi=686,Z.zeta=494,Z.braceleft=480,Z.bar=200,Z.braceright=480,Z.similar=549,Z.Euro=750,Z.Upsilon1=620,Z.minute=247,Z.lessequal=549,Z.fraction=167,Z.infinity=713,Z.florin=500,Z.club=753,Z.diamond=753,Z.heart=753,Z.spade=753,Z.arrowboth=1042,Z.arrowleft=987,Z.arrowup=603,Z.arrowright=987,Z.arrowdown=603,Z.degree=400,Z.plusminus=549,Z.second=411,Z.greaterequal=549,Z.multiply=549,Z.proportional=713,Z.partialdiff=494,Z.bullet=460,Z.divide=549,Z.notequal=549,Z.equivalence=549,Z.approxequal=549,Z.ellipsis=1000,Z.arrowvertex=603,Z.arrowhorizex=1000,Z.carriagereturn=658,Z.aleph=823,Z.Ifraktur=686,Z.Rfraktur=795,Z.weierstrass=987,Z.circlemultiply=768,Z.circleplus=768,Z.emptyset=823,Z.intersection=768,Z.union=768,Z.propersuperset=713,Z.reflexsuperset=713,Z.notsubset=713,Z.propersubset=713,Z.reflexsubset=713,Z.element=713,Z.notelement=713,Z.angle=768,Z.gradient=713,Z.registerserif=790,Z.copyrightserif=790,Z.trademarkserif=890,Z.product=823,Z.radical=549,Z.dotmath=250,Z.logicalnot=713,Z.logicaland=603,Z.logicalor=603,Z.arrowdblboth=1042,Z.arrowdblleft=987,Z.arrowdblup=603,Z.arrowdblright=987,Z.arrowdbldown=603,Z.lozenge=494,Z.angleleft=329,Z.registersans=790,Z.copyrightsans=790,Z.trademarksans=786,Z.summation=713,Z.parenlefttp=384,Z.parenleftex=384,Z.parenleftbt=384,Z.bracketlefttp=384,Z.bracketleftex=384,Z.bracketleftbt=384,Z.bracelefttp=494,Z.braceleftmid=494,Z.braceleftbt=494,Z.braceex=494,Z.angleright=329,Z.integral=274,Z.integraltp=686,Z.integralex=686,Z.integralbt=686,Z.parenrighttp=384,Z.parenrightex=384,Z.parenrightbt=384,Z.bracketrighttp=384,Z.bracketrightex=384,Z.bracketrightbt=384,Z.bracerighttp=494,Z.bracerightmid=494,Z.bracerightbt=494,Z.apple=790}),P["Times-Roman"]=R8(function(Z){Z.space=250,Z.exclam=333,Z.quotedbl=408,Z.numbersign=500,Z.dollar=500,Z.percent=833,Z.ampersand=778,Z.quoteright=333,Z.parenleft=333,Z.parenright=333,Z.asterisk=500,Z.plus=564,Z.comma=250,Z.hyphen=333,Z.period=250,Z.slash=278,Z.zero=500,Z.one=500,Z.two=500,Z.three=500,Z.four=500,Z.five=500,Z.six=500,Z.seven=500,Z.eight=500,Z.nine=500,Z.colon=278,Z.semicolon=278,Z.less=564,Z.equal=564,Z.greater=564,Z.question=444,Z.at=921,Z.A=722,Z.B=667,Z.C=667,Z.D=722,Z.E=611,Z.F=556,Z.G=722,Z.H=722,Z.I=333,Z.J=389,Z.K=722,Z.L=611,Z.M=889,Z.N=722,Z.O=722,Z.P=556,Z.Q=722,Z.R=667,Z.S=556,Z.T=611,Z.U=722,Z.V=722,Z.W=944,Z.X=722,Z.Y=722,Z.Z=611,Z.bracketleft=333,Z.backslash=278,Z.bracketright=333,Z.asciicircum=469,Z.underscore=500,Z.quoteleft=333,Z.a=444,Z.b=500,Z.c=444,Z.d=500,Z.e=444,Z.f=333,Z.g=500,Z.h=500,Z.i=278,Z.j=278,Z.k=500,Z.l=278,Z.m=778,Z.n=500,Z.o=500,Z.p=500,Z.q=500,Z.r=333,Z.s=389,Z.t=278,Z.u=500,Z.v=500,Z.w=722,Z.x=500,Z.y=500,Z.z=444,Z.braceleft=480,Z.bar=200,Z.braceright=480,Z.asciitilde=541,Z.exclamdown=333,Z.cent=500,Z.sterling=500,Z.fraction=167,Z.yen=500,Z.florin=500,Z.section=500,Z.currency=500,Z.quotesingle=180,Z.quotedblleft=444,Z.guillemotleft=500,Z.guilsinglleft=333,Z.guilsinglright=333,Z.fi=556,Z.fl=556,Z.endash=500,Z.dagger=500,Z.daggerdbl=500,Z.periodcentered=250,Z.paragraph=453,Z.bullet=350,Z.quotesinglbase=333,Z.quotedblbase=444,Z.quotedblright=444,Z.guillemotright=500,Z.ellipsis=1000,Z.perthousand=1000,Z.questiondown=444,Z.grave=333,Z.acute=333,Z.circumflex=333,Z.tilde=333,Z.macron=333,Z.breve=333,Z.dotaccent=333,Z.dieresis=333,Z.ring=333,Z.cedilla=333,Z.hungarumlaut=333,Z.ogonek=333,Z.caron=333,Z.emdash=1000,Z.AE=889,Z.ordfeminine=276,Z.Lslash=611,Z.Oslash=722,Z.OE=889,Z.ordmasculine=310,Z.ae=667,Z.dotlessi=278,Z.lslash=278,Z.oslash=500,Z.oe=722,Z.germandbls=500,Z.Idieresis=333,Z.eacute=444,Z.abreve=444,Z.uhungarumlaut=500,Z.ecaron=444,Z.Ydieresis=722,Z.divide=564,Z.Yacute=722,Z.Acircumflex=722,Z.aacute=444,Z.Ucircumflex=722,Z.yacute=500,Z.scommaaccent=389,Z.ecircumflex=444,Z.Uring=722,Z.Udieresis=722,Z.aogonek=444,Z.Uacute=722,Z.uogonek=500,Z.Edieresis=611,Z.Dcroat=722,Z.commaaccent=250,Z.copyright=760,Z.Emacron=611,Z.ccaron=444,Z.aring=444,Z.Ncommaaccent=722,Z.lacute=278,Z.agrave=444,Z.Tcommaaccent=611,Z.Cacute=667,Z.atilde=444,Z.Edotaccent=611,Z.scaron=389,Z.scedilla=389,Z.iacute=278,Z.lozenge=471,Z.Rcaron=667,Z.Gcommaaccent=722,Z.ucircumflex=500,Z.acircumflex=444,Z.Amacron=722,Z.rcaron=333,Z.ccedilla=444,Z.Zdotaccent=611,Z.Thorn=556,Z.Omacron=722,Z.Racute=667,Z.Sacute=556,Z.dcaron=588,Z.Umacron=722,Z.uring=500,Z.threesuperior=300,Z.Ograve=722,Z.Agrave=722,Z.Abreve=722,Z.multiply=564,Z.uacute=500,Z.Tcaron=611,Z.partialdiff=476,Z.ydieresis=500,Z.Nacute=722,Z.icircumflex=278,Z.Ecircumflex=611,Z.adieresis=444,Z.edieresis=444,Z.cacute=444,Z.nacute=500,Z.umacron=500,Z.Ncaron=722,Z.Iacute=333,Z.plusminus=564,Z.brokenbar=200,Z.registered=760,Z.Gbreve=722,Z.Idotaccent=333,Z.summation=600,Z.Egrave=611,Z.racute=333,Z.omacron=500,Z.Zacute=611,Z.Zcaron=611,Z.greaterequal=549,Z.Eth=722,Z.Ccedilla=667,Z.lcommaaccent=278,Z.tcaron=326,Z.eogonek=444,Z.Uogonek=722,Z.Aacute=722,Z.Adieresis=722,Z.egrave=444,Z.zacute=444,Z.iogonek=278,Z.Oacute=722,Z.oacute=500,Z.amacron=444,Z.sacute=389,Z.idieresis=278,Z.Ocircumflex=722,Z.Ugrave=722,Z.Delta=612,Z.thorn=500,Z.twosuperior=300,Z.Odieresis=722,Z.mu=500,Z.igrave=278,Z.ohungarumlaut=500,Z.Eogonek=611,Z.dcroat=500,Z.threequarters=750,Z.Scedilla=556,Z.lcaron=344,Z.Kcommaaccent=722,Z.Lacute=611,Z.trademark=980,Z.edotaccent=444,Z.Igrave=333,Z.Imacron=333,Z.Lcaron=611,Z.onehalf=750,Z.lessequal=549,Z.ocircumflex=500,Z.ntilde=500,Z.Uhungarumlaut=722,Z.Eacute=611,Z.emacron=444,Z.gbreve=500,Z.onequarter=750,Z.Scaron=556,Z.Scommaaccent=556,Z.Ohungarumlaut=722,Z.degree=400,Z.ograve=500,Z.Ccaron=667,Z.ugrave=500,Z.radical=453,Z.Dcaron=722,Z.rcommaaccent=333,Z.Ntilde=722,Z.otilde=500,Z.Rcommaaccent=667,Z.Lcommaaccent=611,Z.Atilde=722,Z.Aogonek=722,Z.Aring=722,Z.Otilde=722,Z.zdotaccent=444,Z.Ecaron=611,Z.Iogonek=333,Z.kcommaaccent=500,Z.minus=564,Z.Icircumflex=333,Z.ncaron=500,Z.tcommaaccent=278,Z.logicalnot=564,Z.odieresis=500,Z.udieresis=500,Z.notequal=549,Z.gcommaaccent=500,Z.eth=500,Z.zcaron=444,Z.ncommaaccent=500,Z.onesuperior=300,Z.imacron=278,Z.Euro=500}),P["Times-Bold"]=R8(function(Z){Z.space=250,Z.exclam=333,Z.quotedbl=555,Z.numbersign=500,Z.dollar=500,Z.percent=1000,Z.ampersand=833,Z.quoteright=333,Z.parenleft=333,Z.parenright=333,Z.asterisk=500,Z.plus=570,Z.comma=250,Z.hyphen=333,Z.period=250,Z.slash=278,Z.zero=500,Z.one=500,Z.two=500,Z.three=500,Z.four=500,Z.five=500,Z.six=500,Z.seven=500,Z.eight=500,Z.nine=500,Z.colon=333,Z.semicolon=333,Z.less=570,Z.equal=570,Z.greater=570,Z.question=500,Z.at=930,Z.A=722,Z.B=667,Z.C=722,Z.D=722,Z.E=667,Z.F=611,Z.G=778,Z.H=778,Z.I=389,Z.J=500,Z.K=778,Z.L=667,Z.M=944,Z.N=722,Z.O=778,Z.P=611,Z.Q=778,Z.R=722,Z.S=556,Z.T=667,Z.U=722,Z.V=722,Z.W=1000,Z.X=722,Z.Y=722,Z.Z=667,Z.bracketleft=333,Z.backslash=278,Z.bracketright=333,Z.asciicircum=581,Z.underscore=500,Z.quoteleft=333,Z.a=500,Z.b=556,Z.c=444,Z.d=556,Z.e=444,Z.f=333,Z.g=500,Z.h=556,Z.i=278,Z.j=333,Z.k=556,Z.l=278,Z.m=833,Z.n=556,Z.o=500,Z.p=556,Z.q=556,Z.r=444,Z.s=389,Z.t=333,Z.u=556,Z.v=500,Z.w=722,Z.x=500,Z.y=500,Z.z=444,Z.braceleft=394,Z.bar=220,Z.braceright=394,Z.asciitilde=520,Z.exclamdown=333,Z.cent=500,Z.sterling=500,Z.fraction=167,Z.yen=500,Z.florin=500,Z.section=500,Z.currency=500,Z.quotesingle=278,Z.quotedblleft=500,Z.guillemotleft=500,Z.guilsinglleft=333,Z.guilsinglright=333,Z.fi=556,Z.fl=556,Z.endash=500,Z.dagger=500,Z.daggerdbl=500,Z.periodcentered=250,Z.paragraph=540,Z.bullet=350,Z.quotesinglbase=333,Z.quotedblbase=500,Z.quotedblright=500,Z.guillemotright=500,Z.ellipsis=1000,Z.perthousand=1000,Z.questiondown=500,Z.grave=333,Z.acute=333,Z.circumflex=333,Z.tilde=333,Z.macron=333,Z.breve=333,Z.dotaccent=333,Z.dieresis=333,Z.ring=333,Z.cedilla=333,Z.hungarumlaut=333,Z.ogonek=333,Z.caron=333,Z.emdash=1000,Z.AE=1000,Z.ordfeminine=300,Z.Lslash=667,Z.Oslash=778,Z.OE=1000,Z.ordmasculine=330,Z.ae=722,Z.dotlessi=278,Z.lslash=278,Z.oslash=500,Z.oe=722,Z.germandbls=556,Z.Idieresis=389,Z.eacute=444,Z.abreve=500,Z.uhungarumlaut=556,Z.ecaron=444,Z.Ydieresis=722,Z.divide=570,Z.Yacute=722,Z.Acircumflex=722,Z.aacute=500,Z.Ucircumflex=722,Z.yacute=500,Z.scommaaccent=389,Z.ecircumflex=444,Z.Uring=722,Z.Udieresis=722,Z.aogonek=500,Z.Uacute=722,Z.uogonek=556,Z.Edieresis=667,Z.Dcroat=722,Z.commaaccent=250,Z.copyright=747,Z.Emacron=667,Z.ccaron=444,Z.aring=500,Z.Ncommaaccent=722,Z.lacute=278,Z.agrave=500,Z.Tcommaaccent=667,Z.Cacute=722,Z.atilde=500,Z.Edotaccent=667,Z.scaron=389,Z.scedilla=389,Z.iacute=278,Z.lozenge=494,Z.Rcaron=722,Z.Gcommaaccent=778,Z.ucircumflex=556,Z.acircumflex=500,Z.Amacron=722,Z.rcaron=444,Z.ccedilla=444,Z.Zdotaccent=667,Z.Thorn=611,Z.Omacron=778,Z.Racute=722,Z.Sacute=556,Z.dcaron=672,Z.Umacron=722,Z.uring=556,Z.threesuperior=300,Z.Ograve=778,Z.Agrave=722,Z.Abreve=722,Z.multiply=570,Z.uacute=556,Z.Tcaron=667,Z.partialdiff=494,Z.ydieresis=500,Z.Nacute=722,Z.icircumflex=278,Z.Ecircumflex=667,Z.adieresis=500,Z.edieresis=444,Z.cacute=444,Z.nacute=556,Z.umacron=556,Z.Ncaron=722,Z.Iacute=389,Z.plusminus=570,Z.brokenbar=220,Z.registered=747,Z.Gbreve=778,Z.Idotaccent=389,Z.summation=600,Z.Egrave=667,Z.racute=444,Z.omacron=500,Z.Zacute=667,Z.Zcaron=667,Z.greaterequal=549,Z.Eth=722,Z.Ccedilla=722,Z.lcommaaccent=278,Z.tcaron=416,Z.eogonek=444,Z.Uogonek=722,Z.Aacute=722,Z.Adieresis=722,Z.egrave=444,Z.zacute=444,Z.iogonek=278,Z.Oacute=778,Z.oacute=500,Z.amacron=500,Z.sacute=389,Z.idieresis=278,Z.Ocircumflex=778,Z.Ugrave=722,Z.Delta=612,Z.thorn=556,Z.twosuperior=300,Z.Odieresis=778,Z.mu=556,Z.igrave=278,Z.ohungarumlaut=500,Z.Eogonek=667,Z.dcroat=556,Z.threequarters=750,Z.Scedilla=556,Z.lcaron=394,Z.Kcommaaccent=778,Z.Lacute=667,Z.trademark=1000,Z.edotaccent=444,Z.Igrave=389,Z.Imacron=389,Z.Lcaron=667,Z.onehalf=750,Z.lessequal=549,Z.ocircumflex=500,Z.ntilde=556,Z.Uhungarumlaut=722,Z.Eacute=667,Z.emacron=444,Z.gbreve=500,Z.onequarter=750,Z.Scaron=556,Z.Scommaaccent=556,Z.Ohungarumlaut=778,Z.degree=400,Z.ograve=500,Z.Ccaron=722,Z.ugrave=556,Z.radical=549,Z.Dcaron=722,Z.rcommaaccent=444,Z.Ntilde=722,Z.otilde=500,Z.Rcommaaccent=722,Z.Lcommaaccent=667,Z.Atilde=722,Z.Aogonek=722,Z.Aring=722,Z.Otilde=778,Z.zdotaccent=444,Z.Ecaron=667,Z.Iogonek=389,Z.kcommaaccent=556,Z.minus=570,Z.Icircumflex=389,Z.ncaron=556,Z.tcommaaccent=333,Z.logicalnot=570,Z.odieresis=500,Z.udieresis=556,Z.notequal=549,Z.gcommaaccent=500,Z.eth=500,Z.zcaron=444,Z.ncommaaccent=556,Z.onesuperior=300,Z.imacron=278,Z.Euro=500}),P["Times-BoldItalic"]=R8(function(Z){Z.space=250,Z.exclam=389,Z.quotedbl=555,Z.numbersign=500,Z.dollar=500,Z.percent=833,Z.ampersand=778,Z.quoteright=333,Z.parenleft=333,Z.parenright=333,Z.asterisk=500,Z.plus=570,Z.comma=250,Z.hyphen=333,Z.period=250,Z.slash=278,Z.zero=500,Z.one=500,Z.two=500,Z.three=500,Z.four=500,Z.five=500,Z.six=500,Z.seven=500,Z.eight=500,Z.nine=500,Z.colon=333,Z.semicolon=333,Z.less=570,Z.equal=570,Z.greater=570,Z.question=500,Z.at=832,Z.A=667,Z.B=667,Z.C=667,Z.D=722,Z.E=667,Z.F=667,Z.G=722,Z.H=778,Z.I=389,Z.J=500,Z.K=667,Z.L=611,Z.M=889,Z.N=722,Z.O=722,Z.P=611,Z.Q=722,Z.R=667,Z.S=556,Z.T=611,Z.U=722,Z.V=667,Z.W=889,Z.X=667,Z.Y=611,Z.Z=611,Z.bracketleft=333,Z.backslash=278,Z.bracketright=333,Z.asciicircum=570,Z.underscore=500,Z.quoteleft=333,Z.a=500,Z.b=500,Z.c=444,Z.d=500,Z.e=444,Z.f=333,Z.g=500,Z.h=556,Z.i=278,Z.j=278,Z.k=500,Z.l=278,Z.m=778,Z.n=556,Z.o=500,Z.p=500,Z.q=500,Z.r=389,Z.s=389,Z.t=278,Z.u=556,Z.v=444,Z.w=667,Z.x=500,Z.y=444,Z.z=389,Z.braceleft=348,Z.bar=220,Z.braceright=348,Z.asciitilde=570,Z.exclamdown=389,Z.cent=500,Z.sterling=500,Z.fraction=167,Z.yen=500,Z.florin=500,Z.section=500,Z.currency=500,Z.quotesingle=278,Z.quotedblleft=500,Z.guillemotleft=500,Z.guilsinglleft=333,Z.guilsinglright=333,Z.fi=556,Z.fl=556,Z.endash=500,Z.dagger=500,Z.daggerdbl=500,Z.periodcentered=250,Z.paragraph=500,Z.bullet=350,Z.quotesinglbase=333,Z.quotedblbase=500,Z.quotedblright=500,Z.guillemotright=500,Z.ellipsis=1000,Z.perthousand=1000,Z.questiondown=500,Z.grave=333,Z.acute=333,Z.circumflex=333,Z.tilde=333,Z.macron=333,Z.breve=333,Z.dotaccent=333,Z.dieresis=333,Z.ring=333,Z.cedilla=333,Z.hungarumlaut=333,Z.ogonek=333,Z.caron=333,Z.emdash=1000,Z.AE=944,Z.ordfeminine=266,Z.Lslash=611,Z.Oslash=722,Z.OE=944,Z.ordmasculine=300,Z.ae=722,Z.dotlessi=278,Z.lslash=278,Z.oslash=500,Z.oe=722,Z.germandbls=500,Z.Idieresis=389,Z.eacute=444,Z.abreve=500,Z.uhungarumlaut=556,Z.ecaron=444,Z.Ydieresis=611,Z.divide=570,Z.Yacute=611,Z.Acircumflex=667,Z.aacute=500,Z.Ucircumflex=722,Z.yacute=444,Z.scommaaccent=389,Z.ecircumflex=444,Z.Uring=722,Z.Udieresis=722,Z.aogonek=500,Z.Uacute=722,Z.uogonek=556,Z.Edieresis=667,Z.Dcroat=722,Z.commaaccent=250,Z.copyright=747,Z.Emacron=667,Z.ccaron=444,Z.aring=500,Z.Ncommaaccent=722,Z.lacute=278,Z.agrave=500,Z.Tcommaaccent=611,Z.Cacute=667,Z.atilde=500,Z.Edotaccent=667,Z.scaron=389,Z.scedilla=389,Z.iacute=278,Z.lozenge=494,Z.Rcaron=667,Z.Gcommaaccent=722,Z.ucircumflex=556,Z.acircumflex=500,Z.Amacron=667,Z.rcaron=389,Z.ccedilla=444,Z.Zdotaccent=611,Z.Thorn=611,Z.Omacron=722,Z.Racute=667,Z.Sacute=556,Z.dcaron=608,Z.Umacron=722,Z.uring=556,Z.threesuperior=300,Z.Ograve=722,Z.Agrave=667,Z.Abreve=667,Z.multiply=570,Z.uacute=556,Z.Tcaron=611,Z.partialdiff=494,Z.ydieresis=444,Z.Nacute=722,Z.icircumflex=278,Z.Ecircumflex=667,Z.adieresis=500,Z.edieresis=444,Z.cacute=444,Z.nacute=556,Z.umacron=556,Z.Ncaron=722,Z.Iacute=389,Z.plusminus=570,Z.brokenbar=220,Z.registered=747,Z.Gbreve=722,Z.Idotaccent=389,Z.summation=600,Z.Egrave=667,Z.racute=389,Z.omacron=500,Z.Zacute=611,Z.Zcaron=611,Z.greaterequal=549,Z.Eth=722,Z.Ccedilla=667,Z.lcommaaccent=278,Z.tcaron=366,Z.eogonek=444,Z.Uogonek=722,Z.Aacute=667,Z.Adieresis=667,Z.egrave=444,Z.zacute=389,Z.iogonek=278,Z.Oacute=722,Z.oacute=500,Z.amacron=500,Z.sacute=389,Z.idieresis=278,Z.Ocircumflex=722,Z.Ugrave=722,Z.Delta=612,Z.thorn=500,Z.twosuperior=300,Z.Odieresis=722,Z.mu=576,Z.igrave=278,Z.ohungarumlaut=500,Z.Eogonek=667,Z.dcroat=500,Z.threequarters=750,Z.Scedilla=556,Z.lcaron=382,Z.Kcommaaccent=667,Z.Lacute=611,Z.trademark=1000,Z.edotaccent=444,Z.Igrave=389,Z.Imacron=389,Z.Lcaron=611,Z.onehalf=750,Z.lessequal=549,Z.ocircumflex=500,Z.ntilde=556,Z.Uhungarumlaut=722,Z.Eacute=667,Z.emacron=444,Z.gbreve=500,Z.onequarter=750,Z.Scaron=556,Z.Scommaaccent=556,Z.Ohungarumlaut=722,Z.degree=400,Z.ograve=500,Z.Ccaron=667,Z.ugrave=556,Z.radical=549,Z.Dcaron=722,Z.rcommaaccent=389,Z.Ntilde=722,Z.otilde=500,Z.Rcommaaccent=667,Z.Lcommaaccent=611,Z.Atilde=667,Z.Aogonek=667,Z.Aring=667,Z.Otilde=722,Z.zdotaccent=389,Z.Ecaron=667,Z.Iogonek=389,Z.kcommaaccent=500,Z.minus=606,Z.Icircumflex=389,Z.ncaron=556,Z.tcommaaccent=278,Z.logicalnot=606,Z.odieresis=500,Z.udieresis=556,Z.notequal=549,Z.gcommaaccent=500,Z.eth=500,Z.zcaron=389,Z.ncommaaccent=556,Z.onesuperior=300,Z.imacron=278,Z.Euro=500}),P["Times-Italic"]=R8(function(Z){Z.space=250,Z.exclam=333,Z.quotedbl=420,Z.numbersign=500,Z.dollar=500,Z.percent=833,Z.ampersand=778,Z.quoteright=333,Z.parenleft=333,Z.parenright=333,Z.asterisk=500,Z.plus=675,Z.comma=250,Z.hyphen=333,Z.period=250,Z.slash=278,Z.zero=500,Z.one=500,Z.two=500,Z.three=500,Z.four=500,Z.five=500,Z.six=500,Z.seven=500,Z.eight=500,Z.nine=500,Z.colon=333,Z.semicolon=333,Z.less=675,Z.equal=675,Z.greater=675,Z.question=500,Z.at=920,Z.A=611,Z.B=611,Z.C=667,Z.D=722,Z.E=611,Z.F=611,Z.G=722,Z.H=722,Z.I=333,Z.J=444,Z.K=667,Z.L=556,Z.M=833,Z.N=667,Z.O=722,Z.P=611,Z.Q=722,Z.R=611,Z.S=500,Z.T=556,Z.U=722,Z.V=611,Z.W=833,Z.X=611,Z.Y=556,Z.Z=556,Z.bracketleft=389,Z.backslash=278,Z.bracketright=389,Z.asciicircum=422,Z.underscore=500,Z.quoteleft=333,Z.a=500,Z.b=500,Z.c=444,Z.d=500,Z.e=444,Z.f=278,Z.g=500,Z.h=500,Z.i=278,Z.j=278,Z.k=444,Z.l=278,Z.m=722,Z.n=500,Z.o=500,Z.p=500,Z.q=500,Z.r=389,Z.s=389,Z.t=278,Z.u=500,Z.v=444,Z.w=667,Z.x=444,Z.y=444,Z.z=389,Z.braceleft=400,Z.bar=275,Z.braceright=400,Z.asciitilde=541,Z.exclamdown=389,Z.cent=500,Z.sterling=500,Z.fraction=167,Z.yen=500,Z.florin=500,Z.section=500,Z.currency=500,Z.quotesingle=214,Z.quotedblleft=556,Z.guillemotleft=500,Z.guilsinglleft=333,Z.guilsinglright=333,Z.fi=500,Z.fl=500,Z.endash=500,Z.dagger=500,Z.daggerdbl=500,Z.periodcentered=250,Z.paragraph=523,Z.bullet=350,Z.quotesinglbase=333,Z.quotedblbase=556,Z.quotedblright=556,Z.guillemotright=500,Z.ellipsis=889,Z.perthousand=1000,Z.questiondown=500,Z.grave=333,Z.acute=333,Z.circumflex=333,Z.tilde=333,Z.macron=333,Z.breve=333,Z.dotaccent=333,Z.dieresis=333,Z.ring=333,Z.cedilla=333,Z.hungarumlaut=333,Z.ogonek=333,Z.caron=333,Z.emdash=889,Z.AE=889,Z.ordfeminine=276,Z.Lslash=556,Z.Oslash=722,Z.OE=944,Z.ordmasculine=310,Z.ae=667,Z.dotlessi=278,Z.lslash=278,Z.oslash=500,Z.oe=667,Z.germandbls=500,Z.Idieresis=333,Z.eacute=444,Z.abreve=500,Z.uhungarumlaut=500,Z.ecaron=444,Z.Ydieresis=556,Z.divide=675,Z.Yacute=556,Z.Acircumflex=611,Z.aacute=500,Z.Ucircumflex=722,Z.yacute=444,Z.scommaaccent=389,Z.ecircumflex=444,Z.Uring=722,Z.Udieresis=722,Z.aogonek=500,Z.Uacute=722,Z.uogonek=500,Z.Edieresis=611,Z.Dcroat=722,Z.commaaccent=250,Z.copyright=760,Z.Emacron=611,Z.ccaron=444,Z.aring=500,Z.Ncommaaccent=667,Z.lacute=278,Z.agrave=500,Z.Tcommaaccent=556,Z.Cacute=667,Z.atilde=500,Z.Edotaccent=611,Z.scaron=389,Z.scedilla=389,Z.iacute=278,Z.lozenge=471,Z.Rcaron=611,Z.Gcommaaccent=722,Z.ucircumflex=500,Z.acircumflex=500,Z.Amacron=611,Z.rcaron=389,Z.ccedilla=444,Z.Zdotaccent=556,Z.Thorn=611,Z.Omacron=722,Z.Racute=611,Z.Sacute=500,Z.dcaron=544,Z.Umacron=722,Z.uring=500,Z.threesuperior=300,Z.Ograve=722,Z.Agrave=611,Z.Abreve=611,Z.multiply=675,Z.uacute=500,Z.Tcaron=556,Z.partialdiff=476,Z.ydieresis=444,Z.Nacute=667,Z.icircumflex=278,Z.Ecircumflex=611,Z.adieresis=500,Z.edieresis=444,Z.cacute=444,Z.nacute=500,Z.umacron=500,Z.Ncaron=667,Z.Iacute=333,Z.plusminus=675,Z.brokenbar=275,Z.registered=760,Z.Gbreve=722,Z.Idotaccent=333,Z.summation=600,Z.Egrave=611,Z.racute=389,Z.omacron=500,Z.Zacute=556,Z.Zcaron=556,Z.greaterequal=549,Z.Eth=722,Z.Ccedilla=667,Z.lcommaaccent=278,Z.tcaron=300,Z.eogonek=444,Z.Uogonek=722,Z.Aacute=611,Z.Adieresis=611,Z.egrave=444,Z.zacute=389,Z.iogonek=278,Z.Oacute=722,Z.oacute=500,Z.amacron=500,Z.sacute=389,Z.idieresis=278,Z.Ocircumflex=722,Z.Ugrave=722,Z.Delta=612,Z.thorn=500,Z.twosuperior=300,Z.Odieresis=722,Z.mu=500,Z.igrave=278,Z.ohungarumlaut=500,Z.Eogonek=611,Z.dcroat=500,Z.threequarters=750,Z.Scedilla=500,Z.lcaron=300,Z.Kcommaaccent=667,Z.Lacute=556,Z.trademark=980,Z.edotaccent=444,Z.Igrave=333,Z.Imacron=333,Z.Lcaron=611,Z.onehalf=750,Z.lessequal=549,Z.ocircumflex=500,Z.ntilde=500,Z.Uhungarumlaut=722,Z.Eacute=611,Z.emacron=444,Z.gbreve=500,Z.onequarter=750,Z.Scaron=500,Z.Scommaaccent=500,Z.Ohungarumlaut=722,Z.degree=400,Z.ograve=500,Z.Ccaron=667,Z.ugrave=500,Z.radical=453,Z.Dcaron=722,Z.rcommaaccent=389,Z.Ntilde=667,Z.otilde=500,Z.Rcommaaccent=611,Z.Lcommaaccent=556,Z.Atilde=611,Z.Aogonek=611,Z.Aring=611,Z.Otilde=722,Z.zdotaccent=389,Z.Ecaron=611,Z.Iogonek=333,Z.kcommaaccent=444,Z.minus=675,Z.Icircumflex=333,Z.ncaron=500,Z.tcommaaccent=278,Z.logicalnot=675,Z.odieresis=500,Z.udieresis=500,Z.notequal=549,Z.gcommaaccent=500,Z.eth=500,Z.zcaron=389,Z.ncommaaccent=500,Z.onesuperior=300,Z.imacron=278,Z.Euro=500}),P.ZapfDingbats=R8(function(Z){Z.space=278,Z.a1=974,Z.a2=961,Z.a202=974,Z.a3=980,Z.a4=719,Z.a5=789,Z.a119=790,Z.a118=791,Z.a117=690,Z.a11=960,Z.a12=939,Z.a13=549,Z.a14=855,Z.a15=911,Z.a16=933,Z.a105=911,Z.a17=945,Z.a18=974,Z.a19=755,Z.a20=846,Z.a21=762,Z.a22=761,Z.a23=571,Z.a24=677,Z.a25=763,Z.a26=760,Z.a27=759,Z.a28=754,Z.a6=494,Z.a7=552,Z.a8=537,Z.a9=577,Z.a10=692,Z.a29=786,Z.a30=788,Z.a31=788,Z.a32=790,Z.a33=793,Z.a34=794,Z.a35=816,Z.a36=823,Z.a37=789,Z.a38=841,Z.a39=823,Z.a40=833,Z.a41=816,Z.a42=831,Z.a43=923,Z.a44=744,Z.a45=723,Z.a46=749,Z.a47=790,Z.a48=792,Z.a49=695,Z.a50=776,Z.a51=768,Z.a52=792,Z.a53=759,Z.a54=707,Z.a55=708,Z.a56=682,Z.a57=701,Z.a58=826,Z.a59=815,Z.a60=789,Z.a61=789,Z.a62=707,Z.a63=687,Z.a64=696,Z.a65=689,Z.a66=786,Z.a67=787,Z.a68=713,Z.a69=791,Z.a70=785,Z.a71=791,Z.a72=873,Z.a73=761,Z.a74=762,Z.a203=762,Z.a75=759,Z.a204=759,Z.a76=892,Z.a77=892,Z.a78=788,Z.a79=784,Z.a81=438,Z.a82=138,Z.a83=277,Z.a84=415,Z.a97=392,Z.a98=392,Z.a99=668,Z.a100=668,Z.a89=390,Z.a90=390,Z.a93=317,Z.a94=317,Z.a91=276,Z.a92=276,Z.a205=509,Z.a85=509,Z.a206=410,Z.a86=410,Z.a87=234,Z.a88=234,Z.a95=334,Z.a96=334,Z.a101=732,Z.a102=544,Z.a103=544,Z.a104=910,Z.a106=667,Z.a107=760,Z.a108=760,Z.a112=776,Z.a111=595,Z.a110=694,Z.a109=626,Z.a120=788,Z.a121=788,Z.a122=788,Z.a123=788,Z.a124=788,Z.a125=788,Z.a126=788,Z.a127=788,Z.a128=788,Z.a129=788,Z.a130=788,Z.a131=788,Z.a132=788,Z.a133=788,Z.a134=788,Z.a135=788,Z.a136=788,Z.a137=788,Z.a138=788,Z.a139=788,Z.a140=788,Z.a141=788,Z.a142=788,Z.a143=788,Z.a144=788,Z.a145=788,Z.a146=788,Z.a147=788,Z.a148=788,Z.a149=788,Z.a150=788,Z.a151=788,Z.a152=788,Z.a153=788,Z.a154=788,Z.a155=788,Z.a156=788,Z.a157=788,Z.a158=788,Z.a159=788,Z.a160=894,Z.a161=838,Z.a163=1016,Z.a164=458,Z.a196=748,Z.a165=924,Z.a192=748,Z.a166=918,Z.a167=927,Z.a168=928,Z.a169=928,Z.a170=834,Z.a171=873,Z.a172=828,Z.a173=924,Z.a162=924,Z.a174=917,Z.a175=930,Z.a176=931,Z.a177=463,Z.a178=883,Z.a179=836,Z.a193=836,Z.a180=867,Z.a199=867,Z.a181=696,Z.a200=696,Z.a182=874,Z.a201=874,Z.a183=760,Z.a184=946,Z.a197=771,Z.a185=865,Z.a194=771,Z.a198=888,Z.a186=967,Z.a195=888,Z.a187=831,Z.a188=873,Z.a189=927,Z.a190=970,Z.a191=918})}),eI=R8(function(P){P.Courier={ascent:629,descent:-157,capHeight:562,xHeight:-426},P["Courier-Bold"]={ascent:629,descent:-157,capHeight:562,xHeight:439},P["Courier-Oblique"]={ascent:629,descent:-157,capHeight:562,xHeight:426},P["Courier-BoldOblique"]={ascent:629,descent:-157,capHeight:562,xHeight:426},P.Helvetica={ascent:718,descent:-207,capHeight:718,xHeight:523},P["Helvetica-Bold"]={ascent:718,descent:-207,capHeight:718,xHeight:532},P["Helvetica-Oblique"]={ascent:718,descent:-207,capHeight:718,xHeight:523},P["Helvetica-BoldOblique"]={ascent:718,descent:-207,capHeight:718,xHeight:532},P["Times-Roman"]={ascent:683,descent:-217,capHeight:662,xHeight:450},P["Times-Bold"]={ascent:683,descent:-217,capHeight:676,xHeight:461},P["Times-Italic"]={ascent:683,descent:-217,capHeight:653,xHeight:441},P["Times-BoldItalic"]={ascent:683,descent:-217,capHeight:669,xHeight:462},P.Symbol={ascent:Math.NaN,descent:Math.NaN,capHeight:Math.NaN,xHeight:Math.NaN},P.ZapfDingbats={ascent:Math.NaN,descent:Math.NaN,capHeight:Math.NaN,xHeight:Math.NaN}});Zj=[4],qj=[5],Xj=[6],zj=[7],Rj=[8],fj=[12,35],tP=[14],xz=[21],Hz=[22],Gj=[30],Qj=[31];Q4=[[57344,63743],[1048576,1114109]],Yj=["ascent","bbox","black","bold","charProcOperatorList","cssFontInfo","data","defaultVMetrics","defaultWidth","descent","disableFontFace","fallbackName","fontExtraProperties","fontMatrix","isInvalidPDFjsFont","isType3Font","italic","loadedName","mimetype","missingFile","name","remeasure","systemFontInfo","vertical"],Wj=["cMap","composite","defaultEncoding","differences","isMonospace","isSerifFont","isSymbolicFont","seacMap","subtype","toFontChar","toUnicode","type","vmetrics","widths"];NG=class NG extends $6{constructor(P,Z,q,X,z,R){super(),this.shadingType=P.get("ShadingType");let f=0;if(this.shadingType===$Z?f=4:this.shadingType===l2&&(f=6),this.coordsArr=P.getArray("Coords"),!e8(this.coordsArr,f))throw new s("RadialAxialShading: Invalid /Coords array.");let G=g1.parse({cs:P.getRaw("CS")||P.getRaw("ColorSpace"),xref:Z,resources:q,pdfFunctionFactory:X,globalColorSpaceCache:z,localColorSpaceCache:R});this.bbox=k4(P.getArray("BBox"),null);let Q=0,Y=1,W=P.getArray("Domain");e8(W,2)&&([Q,Y]=W);let $=!1,_=!1,J=P.getArray("Extend");var U,K;if(U=J,K=2,Array.isArray(U)&&U.length===K&&U.every((y)=>typeof y=="boolean")&&([$,_]=J),!(this.shadingType!==l2||$&&_)){let[y,N,h,w,c,o]=this.coordsArr,G1=Math.hypot(y-w,N-c);h<=o+G1&&o<=h+G1&&v("Unsupported radial gradient.")}this.extendStart=$,this.extendEnd=_;let I=P.getRaw("Function"),B=X.create(I,!0),j=(Y-Q)/840,V=this.colorStops=[];if(Q>=Y||j<=0)return void v1("Bad shading domain.");let H=new Float32Array(G.numComps),M=new Float32Array(1),x=0;M[0]=Q,B(M,0,H,0);let A=new Uint8ClampedArray(3);G.getRgb(H,0,A);let[k,b,O]=A;V.push([0,s1.makeHexColor(k,b,O)]);let p=1;M[0]=Q+j,B(M,0,H,0),G.getRgb(H,0,A);let[D,n,F]=A,l=D-k+1,C=n-b+1,L=F-O+1,m=D-k-1,d=n-b-1,e=F-O-1;for(let y=2;y<840;y++){M[0]=Q+y*j,B(M,0,H,0),G.getRgb(H,0,A);let[N,h,w]=A,c=y-x;if(l=Math.min(l,(N-k+1)/c),C=Math.min(C,(h-b+1)/c),L=Math.min(L,(w-O+1)/c),m=Math.max(m,(N-k-1)/c),d=Math.max(d,(h-b-1)/c),e=Math.max(e,(w-O-1)/c),!(m<=l&&d<=C&&e<=L)){let o=s1.makeHexColor(D,n,F);V.push([p/840,o]),l=N-D+1,C=h-n+1,L=w-F+1,m=N-D-1,d=h-n-1,e=w-F-1,x=p,k=D,b=n,O=F}p=y,D=N,n=h,F=w}V.push([1,s1.makeHexColor(D,n,F)]);let E="transparent";P.has("Background")&&(E=G.getRgbHex(P.get("Background"),0)),$||(V.unshift([0,E]),V[1][0]+=$6.SMALL_NUMBER),_||(V.at(-1)[0]-=$6.SMALL_NUMBER,V.push([1,E])),this.colorStops=V}getIR(){let{coordsArr:P,shadingType:Z}=this,q,X,z,R,f;return Z===$Z?(X=[P[0],P[1]],z=[P[2],P[3]],R=null,f=null,q="axial"):Z===l2?(X=[P[0],P[1]],z=[P[3],P[4]],R=P[2],f=P[5],q="radial"):O1(`getPattern type unknown: ${Z}`),["RadialAxial",q,this.bbox,this.colorStops,X,z,R,f]}};FG=Object.create(null);y4=class y4 extends $6{static MIN_SPLIT_PATCH_CHUNKS_AMOUNT=3;static MAX_SPLIT_PATCH_CHUNKS_AMOUNT=20;static TRIANGLE_DENSITY=20;constructor(P,Z,q,X,z,R){if(super(),!(P instanceof T1))throw new s("Mesh data is not a stream");let f=P.dict;this.shadingType=f.get("ShadingType"),this.bbox=k4(f.getArray("BBox"),null);let G=g1.parse({cs:f.getRaw("CS")||f.getRaw("ColorSpace"),xref:Z,resources:q,pdfFunctionFactory:X,globalColorSpaceCache:z,localColorSpaceCache:R});this.background=f.has("Background")?G.getRgb(f.get("Background"),0):null;let Q=f.getRaw("Function"),Y=Q?X.create(Q,!0):null;this.coords=[],this.colors=[],this.figures=[];let W={bitsPerCoordinate:f.get("BitsPerCoordinate"),bitsPerComponent:f.get("BitsPerComponent"),bitsPerFlag:f.get("BitsPerFlag"),decode:f.getArray("Decode"),colorFn:Y,colorSpace:G,numComps:Y?1:G.numComps},$=new vG(P,W),_=!1;switch(this.shadingType){case LG:this._decodeType4Shading($);break;case bG:let J=0|f.get("VerticesPerRow");if(J<2)throw new s("Invalid VerticesPerRow");this._decodeType5Shading($,J);break;case kG:this._decodeType6Shading($),_=!0;break;case CG:this._decodeType7Shading($),_=!0;break;default:O1("Unsupported mesh type.")}if(_){this._updateBounds();for(let J=0,U=this.figures.length;J<U;J++)this._buildFigureFromPatch(J)}this._updateBounds(),this._packData()}_decodeType4Shading(P){let Z=this.coords,q=this.colors,X=[],z=0;for(;P.hasData;){let R=P.readFlag(),f=P.readCoordinate(),G=P.readComponents();if(z===0){if(!(0<=R&&R<=2))throw new s("Unknown type4 flag");switch(R){case 0:z=3;break;case 1:X.push(X.at(-2),X.at(-1)),z=1;break;case 2:X.push(X.at(-3),X.at(-1)),z=1}}X.push(Z.length),Z.push(f),q.push(G),z--,P.align()}this.figures.push({type:"triangles",coords:new Int32Array(X),colors:new Int32Array(X)})}_decodeType5Shading(P,Z){let q=this.coords,X=this.colors,z=[];for(;P.hasData;){let R=P.readCoordinate(),f=P.readComponents();z.push(q.length),q.push(R),X.push(f)}this.figures.push({type:"lattice",coords:new Int32Array(z),colors:new Int32Array(z),verticesPerRow:Z})}_decodeType6Shading(P){let Z=this.coords,q=this.colors,X=new Int32Array(16),z=new Int32Array(4);for(;P.hasData;){let R=P.readFlag();if(!(0<=R&&R<=3))throw new s("Unknown type6 flag");let f=Z.length;for(let _=0,J=R!==0?8:12;_<J;_++)Z.push(P.readCoordinate());let G=q.length;for(let _=0,J=R!==0?2:4;_<J;_++)q.push(P.readComponents());let Q,Y,W,$;switch(R){case 0:X[12]=f+3,X[13]=f+4,X[14]=f+5,X[15]=f+6,X[8]=f+2,X[11]=f+7,X[4]=f+1,X[7]=f+8,X[0]=f,X[1]=f+11,X[2]=f+10,X[3]=f+9,z[2]=G+1,z[3]=G+2,z[0]=G,z[1]=G+3;break;case 1:Q=X[12],Y=X[13],W=X[14],$=X[15],X[12]=$,X[13]=f+0,X[14]=f+1,X[15]=f+2,X[8]=W,X[11]=f+3,X[4]=Y,X[7]=f+4,X[0]=Q,X[1]=f+7,X[2]=f+6,X[3]=f+5,Q=z[2],Y=z[3],z[2]=Y,z[3]=G,z[0]=Q,z[1]=G+1;break;case 2:Q=X[15],Y=X[11],X[12]=X[3],X[13]=f+0,X[14]=f+1,X[15]=f+2,X[8]=X[7],X[11]=f+3,X[4]=Y,X[7]=f+4,X[0]=Q,X[1]=f+7,X[2]=f+6,X[3]=f+5,Q=z[3],z[2]=z[1],z[3]=G,z[0]=Q,z[1]=G+1;break;case 3:X[12]=X[0],X[13]=f+0,X[14]=f+1,X[15]=f+2,X[8]=X[1],X[11]=f+3,X[4]=X[2],X[7]=f+4,X[0]=X[3],X[1]=f+7,X[2]=f+6,X[3]=f+5,z[2]=z[0],z[3]=G,z[0]=z[1],z[1]=G+1}X[5]=Z.length,Z.push([(-4*Z[X[0]][0]-Z[X[15]][0]+6*(Z[X[4]][0]+Z[X[1]][0])-2*(Z[X[12]][0]+Z[X[3]][0])+3*(Z[X[13]][0]+Z[X[7]][0]))/9,(-4*Z[X[0]][1]-Z[X[15]][1]+6*(Z[X[4]][1]+Z[X[1]][1])-2*(Z[X[12]][1]+Z[X[3]][1])+3*(Z[X[13]][1]+Z[X[7]][1]))/9]),X[6]=Z.length,Z.push([(-4*Z[X[3]][0]-Z[X[12]][0]+6*(Z[X[2]][0]+Z[X[7]][0])-2*(Z[X[0]][0]+Z[X[15]][0])+3*(Z[X[4]][0]+Z[X[14]][0]))/9,(-4*Z[X[3]][1]-Z[X[12]][1]+6*(Z[X[2]][1]+Z[X[7]][1])-2*(Z[X[0]][1]+Z[X[15]][1])+3*(Z[X[4]][1]+Z[X[14]][1]))/9]),X[9]=Z.length,Z.push([(-4*Z[X[12]][0]-Z[X[3]][0]+6*(Z[X[8]][0]+Z[X[13]][0])-2*(Z[X[0]][0]+Z[X[15]][0])+3*(Z[X[11]][0]+Z[X[1]][0]))/9,(-4*Z[X[12]][1]-Z[X[3]][1]+6*(Z[X[8]][1]+Z[X[13]][1])-2*(Z[X[0]][1]+Z[X[15]][1])+3*(Z[X[11]][1]+Z[X[1]][1]))/9]),X[10]=Z.length,Z.push([(-4*Z[X[15]][0]-Z[X[0]][0]+6*(Z[X[11]][0]+Z[X[14]][0])-2*(Z[X[12]][0]+Z[X[3]][0])+3*(Z[X[2]][0]+Z[X[8]][0]))/9,(-4*Z[X[15]][1]-Z[X[0]][1]+6*(Z[X[11]][1]+Z[X[14]][1])-2*(Z[X[12]][1]+Z[X[3]][1])+3*(Z[X[2]][1]+Z[X[8]][1]))/9]),this.figures.push({type:"patch",coords:new Int32Array(X),colors:new Int32Array(z)})}}_decodeType7Shading(P){let Z=this.coords,q=this.colors,X=new Int32Array(16),z=new Int32Array(4);for(;P.hasData;){let R=P.readFlag();if(!(0<=R&&R<=3))throw new s("Unknown type7 flag");let f=Z.length;for(let _=0,J=R!==0?12:16;_<J;_++)Z.push(P.readCoordinate());let G=q.length;for(let _=0,J=R!==0?2:4;_<J;_++)q.push(P.readComponents());let Q,Y,W,$;switch(R){case 0:X[12]=f+3,X[13]=f+4,X[14]=f+5,X[15]=f+6,X[8]=f+2,X[9]=f+13,X[10]=f+14,X[11]=f+7,X[4]=f+1,X[5]=f+12,X[6]=f+15,X[7]=f+8,X[0]=f,X[1]=f+11,X[2]=f+10,X[3]=f+9,z[2]=G+1,z[3]=G+2,z[0]=G,z[1]=G+3;break;case 1:Q=X[12],Y=X[13],W=X[14],$=X[15],X[12]=$,X[13]=f+0,X[14]=f+1,X[15]=f+2,X[8]=W,X[9]=f+9,X[10]=f+10,X[11]=f+3,X[4]=Y,X[5]=f+8,X[6]=f+11,X[7]=f+4,X[0]=Q,X[1]=f+7,X[2]=f+6,X[3]=f+5,Q=z[2],Y=z[3],z[2]=Y,z[3]=G,z[0]=Q,z[1]=G+1;break;case 2:Q=X[15],Y=X[11],X[12]=X[3],X[13]=f+0,X[14]=f+1,X[15]=f+2,X[8]=X[7],X[9]=f+9,X[10]=f+10,X[11]=f+3,X[4]=Y,X[5]=f+8,X[6]=f+11,X[7]=f+4,X[0]=Q,X[1]=f+7,X[2]=f+6,X[3]=f+5,Q=z[3],z[2]=z[1],z[3]=G,z[0]=Q,z[1]=G+1;break;case 3:X[12]=X[0],X[13]=f+0,X[14]=f+1,X[15]=f+2,X[8]=X[1],X[9]=f+9,X[10]=f+10,X[11]=f+3,X[4]=X[2],X[5]=f+8,X[6]=f+11,X[7]=f+4,X[0]=X[3],X[1]=f+7,X[2]=f+6,X[3]=f+5,z[2]=z[0],z[3]=G,z[0]=z[1],z[1]=G+1}this.figures.push({type:"patch",coords:new Int32Array(X),colors:new Int32Array(z)})}}_buildFigureFromPatch(P){let Z=this.figures[P];t1(Z.type==="patch","Unexpected patch mesh figure");let q=this.coords,X=this.colors,z=Z.coords,R=Z.colors,f=Math.min(q[z[0]][0],q[z[3]][0],q[z[12]][0],q[z[15]][0]),G=Math.min(q[z[0]][1],q[z[3]][1],q[z[12]][1],q[z[15]][1]),Q=Math.max(q[z[0]][0],q[z[3]][0],q[z[12]][0],q[z[15]][0]),Y=Math.max(q[z[0]][1],q[z[3]][1],q[z[12]][1],q[z[15]][1]),W=Math.ceil((Q-f)*y4.TRIANGLE_DENSITY/(this.bounds[2]-this.bounds[0]));W=E8(W,y4.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,y4.MAX_SPLIT_PATCH_CHUNKS_AMOUNT);let $=Math.ceil((Y-G)*y4.TRIANGLE_DENSITY/(this.bounds[3]-this.bounds[1]));$=E8($,y4.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,y4.MAX_SPLIT_PATCH_CHUNKS_AMOUNT);let _=W+1,J=new Int32Array(($+1)*_),U=new Int32Array(($+1)*_),K=0,I=new Uint8Array(3),B=new Uint8Array(3),j=X[R[0]],V=X[R[1]],H=X[R[2]],M=X[R[3]],x=Sz($),A=Sz(W);for(let k=0;k<=$;k++){I[0]=(j[0]*($-k)+H[0]*k)/$|0,I[1]=(j[1]*($-k)+H[1]*k)/$|0,I[2]=(j[2]*($-k)+H[2]*k)/$|0,B[0]=(V[0]*($-k)+M[0]*k)/$|0,B[1]=(V[1]*($-k)+M[1]*k)/$|0,B[2]=(V[2]*($-k)+M[2]*k)/$|0;for(let b=0;b<=W;b++,K++){if(!(k!==0&&k!==$||b!==0&&b!==W))continue;let O=0,p=0,D=0;for(let F=0;F<=3;F++)for(let l=0;l<=3;l++,D++){let C=x[k][F]*A[b][l];O+=q[z[D]][0]*C,p+=q[z[D]][1]*C}J[K]=q.length,q.push([O,p]),U[K]=X.length;let n=new Uint8Array(3);n[0]=(I[0]*(W-b)+B[0]*b)/W|0,n[1]=(I[1]*(W-b)+B[1]*b)/W|0,n[2]=(I[2]*(W-b)+B[2]*b)/W|0,X.push(n)}}J[0]=z[0],U[0]=R[0],J[W]=z[3],U[W]=R[1],J[_*$]=z[12],U[_*$]=R[2],J[_*$+W]=z[15],U[_*$+W]=R[3],this.figures[P]={type:"lattice",coords:J,colors:U,verticesPerRow:_}}_updateBounds(){let P=this.coords[0][0],Z=this.coords[0][1],q=P,X=Z;for(let z=1,R=this.coords.length;z<R;z++){let f=this.coords[z][0],G=this.coords[z][1];P=P>f?f:P,Z=Z>G?G:Z,q=q<f?f:q,X=X<G?G:X}this.bounds=[P,Z,q,X]}_packData(){let P,Z,q,X,z=this.coords,R=new Float32Array(2*z.length);for(P=0,q=0,Z=z.length;P<Z;P++){let Y=z[P];R[q++]=Y[0],R[q++]=Y[1]}this.coords=R;let f=this.colors,G=new Uint8Array(3*f.length);for(P=0,q=0,Z=f.length;P<Z;P++){let Y=f[P];G[q++]=Y[0],G[q++]=Y[1],G[q++]=Y[2]}this.colors=G;let Q=this.figures;for(P=0,Z=Q.length;P<Z;P++){let Y=Q[P],W=Y.coords,$=Y.colors;for(q=0,X=W.length;q<X;q++)W[q]*=2,$[q]*=3}}getIR(){let{bounds:P}=this;if(P[2]-P[0]===0||P[3]-P[1]===0)throw new s(`Invalid MeshShading bounds: [${P}].`);return["Mesh",this.shadingType,this.coords,this.colors,this.figures,P,this.bbox,this.background]}};SG=class SG extends $6{getIR(){return["Dummy"]}};Uj=[1.3877,1,1,1,0.97801,0.92482,0.89552,0.91133,0.81988,0.97566,0.98152,0.93548,0.93548,1.2798,0.85284,0.92794,1,0.96134,1.54657,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.82845,0.82845,0.85284,0.85284,0.85284,0.75859,0.92138,0.83908,0.7762,0.73293,0.87289,0.73133,0.7514,0.81921,0.87356,0.95958,0.59526,0.75727,0.69225,1.04924,0.9121,0.86943,0.79795,0.88198,0.77958,0.70864,0.81055,0.90399,0.88653,0.96017,0.82577,0.77892,0.78257,0.97507,1.54657,0.97507,0.85284,0.89552,0.90176,0.88762,0.8785,0.75241,0.8785,0.90518,0.95015,0.77618,0.8785,0.88401,0.91916,0.86304,0.88401,0.91488,0.8785,0.8801,0.8785,0.8785,0.91343,0.7173,1.04106,0.8785,0.85075,0.95794,0.82616,0.85162,0.79492,0.88331,1.69808,0.88331,0.85284,0.97801,0.89552,0.91133,0.89552,0.91133,1.7801,0.89552,1.24487,1.13254,1.12401,0.96839,0.85284,0.68787,0.70645,0.85592,0.90747,1.01466,1.0088,0.90323,1,1.07463,1,0.91056,0.75806,1.19118,0.96839,0.78864,0.82845,0.84133,0.75859,0.83908,0.83908,0.83908,0.83908,0.83908,0.83908,0.77539,0.73293,0.73133,0.73133,0.73133,0.73133,0.95958,0.95958,0.95958,0.95958,0.88506,0.9121,0.86943,0.86943,0.86943,0.86943,0.86943,0.85284,0.87508,0.90399,0.90399,0.90399,0.90399,0.77892,0.79795,0.90807,0.88762,0.88762,0.88762,0.88762,0.88762,0.88762,0.8715,0.75241,0.90518,0.90518,0.90518,0.90518,0.88401,0.88401,0.88401,0.88401,0.8785,0.8785,0.8801,0.8801,0.8801,0.8801,0.8801,0.90747,0.89049,0.8785,0.8785,0.8785,0.8785,0.85162,0.8785,0.85162,0.83908,0.88762,0.83908,0.88762,0.83908,0.88762,0.73293,0.75241,0.73293,0.75241,0.73293,0.75241,0.73293,0.75241,0.87289,0.83016,0.88506,0.93125,0.73133,0.90518,0.73133,0.90518,0.73133,0.90518,0.73133,0.90518,0.73133,0.90518,0.81921,0.77618,0.81921,0.77618,0.81921,0.77618,1,1,0.87356,0.8785,0.91075,0.89608,0.95958,0.88401,0.95958,0.88401,0.95958,0.88401,0.95958,0.88401,0.95958,0.88401,0.76229,0.90167,0.59526,0.91916,1,1,0.86304,0.69225,0.88401,1,1,0.70424,0.79468,0.91926,0.88175,0.70823,0.94903,0.9121,0.8785,1,1,0.9121,0.8785,0.87802,0.88656,0.8785,0.86943,0.8801,0.86943,0.8801,0.86943,0.8801,0.87402,0.89291,0.77958,0.91343,1,1,0.77958,0.91343,0.70864,0.7173,0.70864,0.7173,0.70864,0.7173,0.70864,0.7173,1,1,0.81055,0.75841,0.81055,1.06452,0.90399,0.8785,0.90399,0.8785,0.90399,0.8785,0.90399,0.8785,0.90399,0.8785,0.90399,0.8785,0.96017,0.95794,0.77892,0.85162,0.77892,0.78257,0.79492,0.78257,0.79492,0.78257,0.79492,0.9297,0.56892,0.83908,0.88762,0.77539,0.8715,0.87508,0.89049,1,1,0.81055,1.04106,1.20528,1.20528,1,1.15543,0.70674,0.98387,0.94721,1.33431,1.45894,0.95161,1.06303,0.83908,0.80352,0.57184,0.6965,0.56289,0.82001,0.56029,0.81235,1.02988,0.83908,0.7762,0.68156,0.80367,0.73133,0.78257,0.87356,0.86943,0.95958,0.75727,0.89019,1.04924,0.9121,0.7648,0.86943,0.87356,0.79795,0.78275,0.81055,0.77892,0.9762,0.82577,0.99819,0.84896,0.95958,0.77892,0.96108,1.01407,0.89049,1.02988,0.94211,0.96108,0.8936,0.84021,0.87842,0.96399,0.79109,0.89049,1.00813,1.02988,0.86077,0.87445,0.92099,0.84723,0.86513,0.8801,0.75638,0.85714,0.78216,0.79586,0.87965,0.94211,0.97747,0.78287,0.97926,0.84971,1.02988,0.94211,0.8801,0.94211,0.84971,0.73133,1,1,1,1,1,1,1,1,1,1,1,1,0.90264,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.90518,1,1,1,1,1,1,1,1,1,1,1,1,0.90548,1,1,1,1,1,1,0.96017,0.95794,0.96017,0.95794,0.96017,0.95794,0.77892,0.85162,1,1,0.89552,0.90527,1,0.90363,0.92794,0.92794,0.92794,0.92794,0.87012,0.87012,0.87012,0.89552,0.89552,1.42259,0.71143,1.06152,1,1,1.03372,1.03372,0.97171,1.4956,2.2807,0.93835,0.83406,0.91133,0.84107,0.91133,1,1,1,0.72021,1,1.23108,0.83489,0.88525,0.88525,0.81499,0.90527,1.81055,0.90527,1.81055,1.31006,1.53711,0.94434,1.08696,1,0.95018,0.77192,0.85284,0.90747,1.17534,0.69825,0.9716,1.37077,0.90747,0.90747,0.85356,0.90747,0.90747,1.44947,0.85284,0.8941,0.8941,0.70572,0.8,0.70572,0.70572,0.70572,0.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.99862,0.99862,1,1,1,1,1,1.08004,0.91027,1,1,1,0.99862,1,1,1,1,1,1,1,1,1,1,1,1,0.90727,0.90727,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Kj={lineHeight:1.2207,lineGap:0.2207},Bj=[1.3877,1,1,1,0.97801,0.92482,0.89552,0.91133,0.81988,0.97566,0.98152,0.93548,0.93548,1.2798,0.85284,0.92794,1,0.96134,1.56239,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.82845,0.82845,0.85284,0.85284,0.85284,0.75859,0.92138,0.83908,0.7762,0.71805,0.87289,0.73133,0.7514,0.81921,0.87356,0.95958,0.59526,0.75727,0.69225,1.04924,0.90872,0.85938,0.79795,0.87068,0.77958,0.69766,0.81055,0.90399,0.88653,0.96068,0.82577,0.77892,0.78257,0.97507,1.529,0.97507,0.85284,0.89552,0.90176,0.94908,0.86411,0.74012,0.86411,0.88323,0.95015,0.86411,0.86331,0.88401,0.91916,0.86304,0.88401,0.9039,0.86331,0.86331,0.86411,0.86411,0.90464,0.70852,1.04106,0.86331,0.84372,0.95794,0.82616,0.84548,0.79492,0.88331,1.69808,0.88331,0.85284,0.97801,0.89552,0.91133,0.89552,0.91133,1.7801,0.89552,1.24487,1.13254,1.19129,0.96839,0.85284,0.68787,0.70645,0.85592,0.90747,1.01466,1.0088,0.90323,1,1.07463,1,0.91056,0.75806,1.19118,0.96839,0.78864,0.82845,0.84133,0.75859,0.83908,0.83908,0.83908,0.83908,0.83908,0.83908,0.77539,0.71805,0.73133,0.73133,0.73133,0.73133,0.95958,0.95958,0.95958,0.95958,0.88506,0.90872,0.85938,0.85938,0.85938,0.85938,0.85938,0.85284,0.87068,0.90399,0.90399,0.90399,0.90399,0.77892,0.79795,0.90807,0.94908,0.94908,0.94908,0.94908,0.94908,0.94908,0.85887,0.74012,0.88323,0.88323,0.88323,0.88323,0.88401,0.88401,0.88401,0.88401,0.8785,0.86331,0.86331,0.86331,0.86331,0.86331,0.86331,0.90747,0.89049,0.86331,0.86331,0.86331,0.86331,0.84548,0.86411,0.84548,0.83908,0.94908,0.83908,0.94908,0.83908,0.94908,0.71805,0.74012,0.71805,0.74012,0.71805,0.74012,0.71805,0.74012,0.87289,0.79538,0.88506,0.92726,0.73133,0.88323,0.73133,0.88323,0.73133,0.88323,0.73133,0.88323,0.73133,0.88323,0.81921,0.86411,0.81921,0.86411,0.81921,0.86411,1,1,0.87356,0.86331,0.91075,0.8777,0.95958,0.88401,0.95958,0.88401,0.95958,0.88401,0.95958,0.88401,0.95958,0.88401,0.76467,0.90167,0.59526,0.91916,1,1,0.86304,0.69225,0.88401,1,1,0.70424,0.77312,0.91926,0.88175,0.70823,0.94903,0.90872,0.86331,1,1,0.90872,0.86331,0.86906,0.88116,0.86331,0.85938,0.86331,0.85938,0.86331,0.85938,0.86331,0.87402,0.86549,0.77958,0.90464,1,1,0.77958,0.90464,0.69766,0.70852,0.69766,0.70852,0.69766,0.70852,0.69766,0.70852,1,1,0.81055,0.75841,0.81055,1.06452,0.90399,0.86331,0.90399,0.86331,0.90399,0.86331,0.90399,0.86331,0.90399,0.86331,0.90399,0.86331,0.96068,0.95794,0.77892,0.84548,0.77892,0.78257,0.79492,0.78257,0.79492,0.78257,0.79492,0.9297,0.56892,0.83908,0.94908,0.77539,0.85887,0.87068,0.89049,1,1,0.81055,1.04106,1.20528,1.20528,1,1.15543,0.70088,0.98387,0.94721,1.33431,1.45894,0.95161,1.48387,0.83908,0.80352,0.57118,0.6965,0.56347,0.79179,0.55853,0.80346,1.02988,0.83908,0.7762,0.67174,0.86036,0.73133,0.78257,0.87356,0.86441,0.95958,0.75727,0.89019,1.04924,0.90872,0.74889,0.85938,0.87891,0.79795,0.7957,0.81055,0.77892,0.97447,0.82577,0.97466,0.87179,0.95958,0.77892,0.94252,0.95612,0.8753,1.02988,0.92733,0.94252,0.87411,0.84021,0.8728,0.95612,0.74081,0.8753,1.02189,1.02988,0.84814,0.87445,0.91822,0.84723,0.85668,0.86331,0.81344,0.87581,0.76422,0.82046,0.96057,0.92733,0.99375,0.78022,0.95452,0.86015,1.02988,0.92733,0.86331,0.92733,0.86015,0.73133,1,1,1,1,1,1,1,1,1,1,1,1,0.90631,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.88323,1,1,1,1,1,1,1,1,1,1,1,1,0.85174,1,1,1,1,1,1,0.96068,0.95794,0.96068,0.95794,0.96068,0.95794,0.77892,0.84548,1,1,0.89552,0.90527,1,0.90363,0.92794,0.92794,0.92794,0.89807,0.87012,0.87012,0.87012,0.89552,0.89552,1.42259,0.71094,1.06152,1,1,1.03372,1.03372,0.97171,1.4956,2.2807,0.92972,0.83406,0.91133,0.83326,0.91133,1,1,1,0.72021,1,1.23108,0.83489,0.88525,0.88525,0.81499,0.90616,1.81055,0.90527,1.81055,1.3107,1.53711,0.94434,1.08696,1,0.95018,0.77192,0.85284,0.90747,1.17534,0.69825,0.9716,1.37077,0.90747,0.90747,0.85356,0.90747,0.90747,1.44947,0.85284,0.8941,0.8941,0.70572,0.8,0.70572,0.70572,0.70572,0.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.99862,0.99862,1,1,1,1,1,1.08004,0.91027,1,1,1,0.99862,1,1,1,1,1,1,1,1,1,1,1,1,0.90727,0.90727,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Ij={lineHeight:1.2207,lineGap:0.2207},jj=[1.3877,1,1,1,1.17223,1.1293,0.89552,0.91133,0.80395,1.02269,1.15601,0.91056,0.91056,1.2798,0.85284,0.89807,1,0.90861,1.39543,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.96309,0.96309,0.85284,0.85284,0.85284,0.83319,0.88071,0.8675,0.81552,0.72346,0.85193,0.73206,0.7522,0.81105,0.86275,0.90685,0.6377,0.77892,0.75593,1.02638,0.89249,0.84118,0.77452,0.85374,0.75186,0.67789,0.79776,0.88844,0.85066,0.94309,0.77818,0.7306,0.76659,1.10369,1.38313,1.10369,1.06139,0.89552,0.8739,0.9245,0.9245,0.83203,0.9245,0.85865,1.09842,0.9245,0.9245,1.03297,1.07692,0.90918,1.03297,0.94959,0.9245,0.92274,0.9245,0.9245,1.02933,0.77832,1.20562,0.9245,0.8916,0.98986,0.86621,0.89453,0.79004,0.94152,1.77256,0.94152,0.85284,0.97801,0.89552,0.91133,0.89552,0.91133,1.91729,0.89552,1.17889,1.13254,1.16359,0.92098,0.85284,0.68787,0.71353,0.84737,0.90747,1.0088,1.0044,0.87683,1,1.09091,1,0.92229,0.739,1.15642,0.92098,0.76288,0.80504,0.80972,0.75859,0.8675,0.8675,0.8675,0.8675,0.8675,0.8675,0.76318,0.72346,0.73206,0.73206,0.73206,0.73206,0.90685,0.90685,0.90685,0.90685,0.86477,0.89249,0.84118,0.84118,0.84118,0.84118,0.84118,0.85284,0.84557,0.88844,0.88844,0.88844,0.88844,0.7306,0.77452,0.86331,0.9245,0.9245,0.9245,0.9245,0.9245,0.9245,0.84843,0.83203,0.85865,0.85865,0.85865,0.85865,0.82601,0.82601,0.82601,0.82601,0.94469,0.9245,0.92274,0.92274,0.92274,0.92274,0.92274,0.90747,0.86651,0.9245,0.9245,0.9245,0.9245,0.89453,0.9245,0.89453,0.8675,0.9245,0.8675,0.9245,0.8675,0.9245,0.72346,0.83203,0.72346,0.83203,0.72346,0.83203,0.72346,0.83203,0.85193,0.8875,0.86477,0.99034,0.73206,0.85865,0.73206,0.85865,0.73206,0.85865,0.73206,0.85865,0.73206,0.85865,0.81105,0.9245,0.81105,0.9245,0.81105,0.9245,1,1,0.86275,0.9245,0.90872,0.93591,0.90685,0.82601,0.90685,0.82601,0.90685,0.82601,0.90685,1.03297,0.90685,0.82601,0.77896,1.05611,0.6377,1.07692,1,1,0.90918,0.75593,1.03297,1,1,0.76032,0.9375,0.98156,0.93407,0.77261,1.11429,0.89249,0.9245,1,1,0.89249,0.9245,0.92534,0.86698,0.9245,0.84118,0.92274,0.84118,0.92274,0.84118,0.92274,0.8667,0.86291,0.75186,1.02933,1,1,0.75186,1.02933,0.67789,0.77832,0.67789,0.77832,0.67789,0.77832,0.67789,0.77832,1,1,0.79776,0.97655,0.79776,1.23023,0.88844,0.9245,0.88844,0.9245,0.88844,0.9245,0.88844,0.9245,0.88844,0.9245,0.88844,0.9245,0.94309,0.98986,0.7306,0.89453,0.7306,0.76659,0.79004,0.76659,0.79004,0.76659,0.79004,1.09231,0.54873,0.8675,0.9245,0.76318,0.84843,0.84557,0.86651,1,1,0.79776,1.20562,1.18622,1.18622,1,1.1437,0.67009,0.96334,0.93695,1.35191,1.40909,0.95161,1.48387,0.8675,0.90861,0.6192,0.7363,0.64824,0.82411,0.56321,0.85696,1.23516,0.8675,0.81552,0.7286,0.84134,0.73206,0.76659,0.86275,0.84369,0.90685,0.77892,0.85871,1.02638,0.89249,0.75828,0.84118,0.85984,0.77452,0.76466,0.79776,0.7306,0.90782,0.77818,0.903,0.87291,0.90685,0.7306,0.99058,1.03667,0.94635,1.23516,0.9849,0.99058,0.92393,0.8916,0.942,1.03667,0.75026,0.94635,1.0297,1.23516,0.90918,0.94048,0.98217,0.89746,0.84153,0.92274,0.82507,0.88832,0.84438,0.88178,1.03525,0.9849,1.00225,0.78086,0.97248,0.89404,1.23516,0.9849,0.92274,0.9849,0.89404,0.73206,1,1,1,1,1,1,1,1,1,1,1,1,0.89693,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.85865,1,1,1,1,1,1,1,1,1,1,1,1,0.90933,1,1,1,1,1,1,0.94309,0.98986,0.94309,0.98986,0.94309,0.98986,0.7306,0.89453,1,1,0.89552,0.90527,1,0.90186,1.12308,1.12308,1.12308,1.12308,1.2566,1.2566,1.2566,0.89552,0.89552,1.42259,0.68994,1.03809,1,1,1.0176,1.0176,1.11523,1.4956,2.01462,0.97858,0.82616,0.91133,0.83437,0.91133,1,1,1,0.70508,1,1.23108,0.79801,0.84426,0.84426,0.774,0.90572,1.81055,0.90749,1.81055,1.28809,1.55469,0.94434,1.07806,1,0.97094,0.7589,0.85284,0.90747,1.19658,0.69825,0.97622,1.33512,0.90747,0.90747,0.85284,0.90747,0.90747,1.44947,0.85284,0.8941,0.8941,0.70572,0.8,0.70572,0.70572,0.70572,0.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.99862,0.99862,1,1,1,1,1,1.0336,0.91027,1,1,1,0.99862,1,1,1,1,1,1,1,1,1,1,1,1,1.05859,1.05859,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Vj={lineHeight:1.2207,lineGap:0.2207},xj=[1.3877,1,1,1,1.17223,1.1293,0.89552,0.91133,0.80395,1.02269,1.15601,0.91056,0.91056,1.2798,0.85284,0.89807,1,0.90861,1.39016,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.96309,0.96309,0.85284,0.85284,0.85284,0.83319,0.88071,0.8675,0.81552,0.73834,0.85193,0.73206,0.7522,0.81105,0.86275,0.90685,0.6377,0.77892,0.75593,1.02638,0.89385,0.85122,0.77452,0.86503,0.75186,0.68887,0.79776,0.88844,0.85066,0.94258,0.77818,0.7306,0.76659,1.10369,1.39016,1.10369,1.06139,0.89552,0.8739,0.86128,0.94469,0.8457,0.94469,0.89464,1.09842,0.84636,0.94469,1.03297,1.07692,0.90918,1.03297,0.95897,0.94469,0.9482,0.94469,0.94469,1.04692,0.78223,1.20562,0.94469,0.90332,0.98986,0.86621,0.90527,0.79004,0.94152,1.77256,0.94152,0.85284,0.97801,0.89552,0.91133,0.89552,0.91133,1.91729,0.89552,1.17889,1.13254,1.08707,0.92098,0.85284,0.68787,0.71353,0.84737,0.90747,1.0088,1.0044,0.87683,1,1.09091,1,0.92229,0.739,1.15642,0.92098,0.76288,0.80504,0.80972,0.75859,0.8675,0.8675,0.8675,0.8675,0.8675,0.8675,0.76318,0.73834,0.73206,0.73206,0.73206,0.73206,0.90685,0.90685,0.90685,0.90685,0.86477,0.89385,0.85122,0.85122,0.85122,0.85122,0.85122,0.85284,0.85311,0.88844,0.88844,0.88844,0.88844,0.7306,0.77452,0.86331,0.86128,0.86128,0.86128,0.86128,0.86128,0.86128,0.8693,0.8457,0.89464,0.89464,0.89464,0.89464,0.82601,0.82601,0.82601,0.82601,0.94469,0.94469,0.9482,0.9482,0.9482,0.9482,0.9482,0.90747,0.86651,0.94469,0.94469,0.94469,0.94469,0.90527,0.94469,0.90527,0.8675,0.86128,0.8675,0.86128,0.8675,0.86128,0.73834,0.8457,0.73834,0.8457,0.73834,0.8457,0.73834,0.8457,0.85193,0.92454,0.86477,0.9921,0.73206,0.89464,0.73206,0.89464,0.73206,0.89464,0.73206,0.89464,0.73206,0.89464,0.81105,0.84636,0.81105,0.84636,0.81105,0.84636,1,1,0.86275,0.94469,0.90872,0.95786,0.90685,0.82601,0.90685,0.82601,0.90685,0.82601,0.90685,1.03297,0.90685,0.82601,0.77741,1.05611,0.6377,1.07692,1,1,0.90918,0.75593,1.03297,1,1,0.76032,0.90452,0.98156,1.11842,0.77261,1.11429,0.89385,0.94469,1,1,0.89385,0.94469,0.95877,0.86901,0.94469,0.85122,0.9482,0.85122,0.9482,0.85122,0.9482,0.8667,0.90016,0.75186,1.04692,1,1,0.75186,1.04692,0.68887,0.78223,0.68887,0.78223,0.68887,0.78223,0.68887,0.78223,1,1,0.79776,0.92188,0.79776,1.23023,0.88844,0.94469,0.88844,0.94469,0.88844,0.94469,0.88844,0.94469,0.88844,0.94469,0.88844,0.94469,0.94258,0.98986,0.7306,0.90527,0.7306,0.76659,0.79004,0.76659,0.79004,0.76659,0.79004,1.09231,0.54873,0.8675,0.86128,0.76318,0.8693,0.85311,0.86651,1,1,0.79776,1.20562,1.18622,1.18622,1,1.1437,0.67742,0.96334,0.93695,1.35191,1.40909,0.95161,1.48387,0.86686,0.90861,0.62267,0.74359,0.65649,0.85498,0.56963,0.88254,1.23516,0.8675,0.81552,0.75443,0.84503,0.73206,0.76659,0.86275,0.85122,0.90685,0.77892,0.85746,1.02638,0.89385,0.75657,0.85122,0.86275,0.77452,0.74171,0.79776,0.7306,0.95165,0.77818,0.89772,0.88831,0.90685,0.7306,0.98142,1.02191,0.96576,1.23516,0.99018,0.98142,0.9236,0.89258,0.94035,1.02191,0.78848,0.96576,0.9561,1.23516,0.90918,0.92578,0.95424,0.89746,0.83969,0.9482,0.80113,0.89442,0.85208,0.86155,0.98022,0.99018,1.00452,0.81209,0.99247,0.89181,1.23516,0.99018,0.9482,0.99018,0.89181,0.73206,1,1,1,1,1,1,1,1,1,1,1,1,0.88844,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.89464,1,1,1,1,1,1,1,1,1,1,1,1,0.96766,1,1,1,1,1,1,0.94258,0.98986,0.94258,0.98986,0.94258,0.98986,0.7306,0.90527,1,1,0.89552,0.90527,1,0.90186,1.12308,1.12308,1.12308,1.12308,1.2566,1.2566,1.2566,0.89552,0.89552,1.42259,0.69043,1.03809,1,1,1.0176,1.0176,1.11523,1.4956,2.01462,0.99331,0.82616,0.91133,0.84286,0.91133,1,1,1,0.70508,1,1.23108,0.79801,0.84426,0.84426,0.774,0.90527,1.81055,0.90527,1.81055,1.28809,1.55469,0.94434,1.07806,1,0.97094,0.7589,0.85284,0.90747,1.19658,0.69825,0.97622,1.33512,0.90747,0.90747,0.85356,0.90747,0.90747,1.44947,0.85284,0.8941,0.8941,0.70572,0.8,0.70572,0.70572,0.70572,0.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.99862,0.99862,1,1,1,1,1,1.0336,0.91027,1,1,1,0.99862,1,1,1,1,1,1,1,1,1,1,1,1,1.05859,1.05859,1,1,1,1.07185,0.99413,0.96334,1.08065,1,1,1,1,1,1,1,1,1,1,1],Hj={lineHeight:1.2207,lineGap:0.2207},Mj=[0.76116,1,1,1.0006,0.99998,0.99974,0.99973,0.99973,0.99982,0.99977,1.00087,0.99998,0.99998,0.99959,1.00003,1.0006,0.99998,1.0006,1.0006,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99998,1,1.00003,1.00003,1.00003,1.00026,0.9999,0.99977,0.99977,0.99977,0.99977,1.00001,1.00026,1.00022,0.99977,1.0006,0.99973,0.99977,1.00026,0.99999,0.99977,1.00022,1.00001,1.00022,0.99977,1.00001,1.00026,0.99977,1.00001,1.00016,1.00001,1.00001,1.00026,0.99998,1.0006,0.99998,1.00003,0.99973,0.99998,0.99973,1.00026,0.99973,1.00026,0.99973,0.99998,1.00026,1.00026,1.0006,1.0006,0.99973,1.0006,0.99982,1.00026,1.00026,1.00026,1.00026,0.99959,0.99973,0.99998,1.00026,0.99973,1.00022,0.99973,0.99973,1,0.99959,1.00077,0.99959,1.00003,0.99998,0.99973,0.99973,0.99973,0.99973,1.00077,0.99973,0.99998,1.00025,0.99968,0.99973,1.00003,1.00025,0.60299,1.00024,1.06409,1,1,0.99998,1,0.99973,1.0006,0.99998,1,0.99936,0.99973,1.00002,1.00002,1.00002,1.00026,0.99977,0.99977,0.99977,0.99977,0.99977,0.99977,1,0.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,0.99977,0.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,0.99977,0.99977,0.99977,0.99977,1.00001,1.00001,1.00026,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99982,0.99973,0.99973,0.99973,0.99973,0.99973,1.0006,1.0006,1.0006,1.0006,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.06409,1.00026,1.00026,1.00026,1.00026,1.00026,0.99973,1.00026,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,1.03374,0.99977,1.00026,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,0.99977,1.00026,0.99977,1.00026,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.00042,0.99973,0.99973,1.0006,0.99977,0.99973,0.99973,1.00026,1.0006,1.00026,1.0006,1.00026,1.03828,1.00026,0.99999,1.00026,1.0006,0.99977,1.00026,0.99977,1.00026,0.99977,1.00026,0.9993,0.9998,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1,1.00016,0.99977,0.99959,0.99977,0.99959,0.99977,0.99959,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00026,0.99998,1.00026,0.8121,1.00026,0.99998,0.99977,1.00026,0.99977,1.00026,0.99977,1.00026,0.99977,1.00026,0.99977,1.00026,0.99977,1.00026,1.00016,1.00022,1.00001,0.99973,1.00001,1.00026,1,1.00026,1,1.00026,1,1.0006,0.99973,0.99977,0.99973,1,0.99982,1.00022,1.00026,1.00001,0.99973,1.00026,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,1.00034,0.99977,1,0.99997,1.00026,1.00078,1.00036,0.99973,1.00013,1.0006,0.99977,0.99977,0.99988,0.85148,1.00001,1.00026,0.99977,1.00022,1.0006,0.99977,1.00001,0.99999,0.99977,1.00069,1.00022,0.99977,1.00001,0.99984,1.00026,1.00001,1.00024,1.00001,0.9999,1,1.0006,1.00001,1.00041,0.99962,1.00026,1.0006,0.99995,1.00041,0.99942,0.99973,0.99927,1.00082,0.99902,1.00026,1.00087,1.0006,1.00069,0.99973,0.99867,0.99973,0.9993,1.00026,1.00049,1.00056,1,0.99988,0.99935,0.99995,0.99954,1.00055,0.99945,1.00032,1.0006,0.99995,1.00026,0.99995,1.00032,1.00001,1.00008,0.99971,1.00019,0.9994,1.00001,1.0006,1.00044,0.99973,1.00023,1.00047,1,0.99942,0.99561,0.99989,1.00035,0.99977,1.00035,0.99977,1.00019,0.99944,1.00001,1.00021,0.99926,1.00035,1.00035,0.99942,1.00048,0.99999,0.99977,1.00022,1.00035,1.00001,0.99977,1.00026,0.99989,1.00057,1.00001,0.99936,1.00052,1.00012,0.99996,1.00043,1,1.00035,0.9994,0.99976,1.00035,0.99973,1.00052,1.00041,1.00119,1.00037,0.99973,1.00002,0.99986,1.00041,1.00041,0.99902,0.9996,1.00034,0.99999,1.00026,0.99999,1.00026,0.99973,1.00052,0.99973,1,0.99973,1.00041,1.00075,0.9994,1.0003,0.99999,1,1.00041,0.99955,1,0.99915,0.99973,0.99973,1.00026,1.00119,0.99955,0.99973,1.0006,0.99911,1.0006,1.00026,0.99972,1.00026,0.99902,1.00041,0.99973,0.99999,1,1,1.00038,1.0005,1.00016,1.00022,1.00016,1.00022,1.00016,1.00022,1.00001,0.99973,1,1,0.99973,1,1,0.99955,1.0006,1.0006,1.0006,1.0006,1,1,1,0.99973,0.99973,0.99972,1,1,1.00106,0.99999,0.99998,0.99998,0.99999,0.99998,1.66475,1,0.99973,0.99973,1.00023,0.99973,0.99971,1.00047,1.00023,1,0.99991,0.99984,1.00002,1.00002,1.00002,1.00002,1,1,1,1,1,1,1,0.99972,1,1.20985,1.39713,1.00003,1.00031,1.00015,1,0.99561,1.00027,1.00031,1.00031,0.99915,1.00031,1.00031,0.99999,1.00003,0.99999,0.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,0.99999,1,0.99861,0.99861,1,1.00026,1.00026,1.00026,1.00026,0.99972,0.99999,0.99999,0.99999,0.99999,1.40483,1,0.99977,1.00054,1,1,0.99953,0.99962,1.00042,0.9995,1,1,1,1,1,1,1,1,0.99998,0.99998,0.99998,0.99998,1,1,1,1,1,1,1,1,1,1,1],Aj={lineHeight:1.2,lineGap:0.2},Lj=[0.76116,1,1,1.0006,0.99998,0.99974,0.99973,0.99973,0.99982,0.99977,1.00087,0.99998,0.99998,0.99959,1.00003,1.0006,0.99998,1.0006,1.0006,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99998,1,1.00003,1.00003,1.00003,1.00026,0.9999,0.99977,0.99977,0.99977,0.99977,1.00001,1.00026,1.00022,0.99977,1.0006,0.99973,0.99977,1.00026,0.99999,0.99977,1.00022,1.00001,1.00022,0.99977,1.00001,1.00026,0.99977,1.00001,1.00016,1.00001,1.00001,1.00026,0.99998,1.0006,0.99998,1.00003,0.99973,0.99998,0.99973,1.00026,0.99973,1.00026,0.99973,0.99998,1.00026,1.00026,1.0006,1.0006,0.99973,1.0006,0.99982,1.00026,1.00026,1.00026,1.00026,0.99959,0.99973,0.99998,1.00026,0.99973,1.00022,0.99973,0.99973,1,0.99959,1.00077,0.99959,1.00003,0.99998,0.99973,0.99973,0.99973,0.99973,1.00077,0.99973,0.99998,1.00025,0.99968,0.99973,1.00003,1.00025,0.60299,1.00024,1.06409,1,1,0.99998,1,0.99973,1.0006,0.99998,1,0.99936,0.99973,1.00002,1.00002,1.00002,1.00026,0.99977,0.99977,0.99977,0.99977,0.99977,0.99977,1,0.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,0.99977,0.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,0.99977,0.99977,0.99977,0.99977,1.00001,1.00001,1.00026,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99982,0.99973,0.99973,0.99973,0.99973,0.99973,1.0006,1.0006,1.0006,1.0006,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.06409,1.00026,1.00026,1.00026,1.00026,1.00026,0.99973,1.00026,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,1.0044,0.99977,1.00026,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,0.99977,1.00026,0.99977,1.00026,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,0.99971,0.99973,0.99973,1.0006,0.99977,0.99973,0.99973,1.00026,1.0006,1.00026,1.0006,1.00026,1.01011,1.00026,0.99999,1.00026,1.0006,0.99977,1.00026,0.99977,1.00026,0.99977,1.00026,0.9993,0.9998,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1,1.00016,0.99977,0.99959,0.99977,0.99959,0.99977,0.99959,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00026,0.99998,1.00026,0.8121,1.00026,0.99998,0.99977,1.00026,0.99977,1.00026,0.99977,1.00026,0.99977,1.00026,0.99977,1.00026,0.99977,1.00026,1.00016,1.00022,1.00001,0.99973,1.00001,1.00026,1,1.00026,1,1.00026,1,1.0006,0.99973,0.99977,0.99973,1,0.99982,1.00022,1.00026,1.00001,0.99973,1.00026,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99977,1,1,1.00026,0.99969,0.99972,0.99981,0.9998,1.0006,0.99977,0.99977,1.00022,0.91155,1.00001,1.00026,0.99977,1.00022,1.0006,0.99977,1.00001,0.99999,0.99977,0.99966,1.00022,1.00032,1.00001,0.99944,1.00026,1.00001,0.99968,1.00001,1.00047,1,1.0006,1.00001,0.99981,1.00101,1.00026,1.0006,0.99948,0.99981,1.00064,0.99973,0.99942,1.00101,1.00061,1.00026,1.00069,1.0006,1.00014,0.99973,1.01322,0.99973,1.00065,1.00026,1.00012,0.99923,1,1.00064,1.00076,0.99948,1.00055,1.00063,1.00007,0.99943,1.0006,0.99948,1.00026,0.99948,0.99943,1.00001,1.00001,1.00029,1.00038,1.00035,1.00001,1.0006,1.0006,0.99973,0.99978,1.00001,1.00057,0.99989,0.99967,0.99964,0.99967,0.99977,0.99999,0.99977,1.00038,0.99977,1.00001,0.99973,1.00066,0.99967,0.99967,1.00041,0.99998,0.99999,0.99977,1.00022,0.99967,1.00001,0.99977,1.00026,0.99964,1.00031,1.00001,0.99999,0.99999,1,1.00023,1,1,0.99999,1.00035,1.00001,0.99999,0.99973,0.99977,0.99999,1.00058,0.99973,0.99973,0.99955,0.9995,1.00026,1.00026,1.00032,0.99989,1.00034,0.99999,1.00026,1.00026,1.00026,0.99973,0.45998,0.99973,1.00026,0.99973,1.00001,0.99999,0.99982,0.99994,0.99996,1,1.00042,1.00044,1.00029,1.00023,0.99973,0.99973,1.00026,0.99949,1.00002,0.99973,1.0006,1.0006,1.0006,0.99975,1.00026,1.00026,1.00032,0.98685,0.99973,1.00026,1,1,0.99966,1.00044,1.00016,1.00022,1.00016,1.00022,1.00016,1.00022,1.00001,0.99973,1,1,0.99973,1,1,0.99955,1.0006,1.0006,1.0006,1.0006,1,1,1,0.99973,0.99973,0.99972,1,1,1.00106,0.99999,0.99998,0.99998,0.99999,0.99998,1.66475,1,0.99973,0.99973,1,0.99973,0.99971,0.99978,1,1,0.99991,0.99984,1.00002,1.00002,1.00002,1.00002,1.00098,1,1,1,1.00049,1,1,0.99972,1,1.20985,1.39713,1.00003,1.00031,1.00015,1,0.99561,1.00027,1.00031,1.00031,0.99915,1.00031,1.00031,0.99999,1.00003,0.99999,0.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,0.99999,1,0.99861,0.99861,1,1.00026,1.00026,1.00026,1.00026,0.99972,0.99999,0.99999,0.99999,0.99999,1.40483,1,0.99977,1.00054,1,1,0.99953,0.99962,1.00042,0.9995,1,1,1,1,1,1,1,1,0.99998,0.99998,0.99998,0.99998,1,1,1,1,1,1,1,1,1,1,1],bj={lineHeight:1.35,lineGap:0.2},kj=[0.76116,1,1,1.0006,1.0006,1.00006,0.99973,0.99973,0.99982,1.00001,1.00043,0.99998,0.99998,0.99959,1.00003,1.0006,0.99998,1.0006,1.0006,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,1.0006,1,1.00003,1.00003,1.00003,0.99973,0.99987,1.00001,1.00001,0.99977,0.99977,1.00001,1.00026,1.00022,0.99977,1.0006,1,1.00001,0.99973,0.99999,0.99977,1.00022,1.00001,1.00022,0.99977,1.00001,1.00026,0.99977,1.00001,1.00016,1.00001,1.00001,1.00026,1.0006,1.0006,1.0006,0.99949,0.99973,0.99998,0.99973,0.99973,1,0.99973,0.99973,1.0006,0.99973,0.99973,0.99924,0.99924,1,0.99924,0.99999,0.99973,0.99973,0.99973,0.99973,0.99998,1,1.0006,0.99973,1,0.99977,1,1,1,1.00005,1.0009,1.00005,1.00003,0.99998,0.99973,0.99973,0.99973,0.99973,1.0009,0.99973,0.99998,1.00025,0.99968,0.99973,1.00003,1.00025,0.60299,1.00024,1.06409,1,1,0.99998,1,0.9998,1.0006,0.99998,1,0.99936,0.99973,1.00002,1.00002,1.00002,1.00026,1.00001,1.00001,1.00001,1.00001,1.00001,1.00001,1,0.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,0.99977,0.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,0.99977,0.99977,0.99977,0.99977,1.00001,1.00001,1.00026,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99982,1,0.99973,0.99973,0.99973,0.99973,1.0006,1.0006,1.0006,1.0006,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,1.06409,1.00026,0.99973,0.99973,0.99973,0.99973,1,0.99973,1,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,0.99977,1,0.99977,1,0.99977,1,0.99977,1,0.99977,1.0288,0.99977,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00022,0.99973,1.00022,0.99973,1.00022,0.99973,1.00022,0.99973,0.99977,0.99973,0.99977,0.99973,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,0.99924,1.0006,1.0006,0.99946,1.00034,1,0.99924,1.00001,1,1,0.99973,0.99924,0.99973,0.99924,0.99973,1.06311,0.99973,1.00024,0.99973,0.99924,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,1.00041,0.9998,0.99973,1.00022,0.99973,1.00022,0.99973,1.00022,0.99973,1,1.00016,0.99977,0.99998,0.99977,0.99998,0.99977,0.99998,1.00001,1,1.00001,1,1.00001,1,1.00001,1,1.00026,1.0006,1.00026,0.89547,1.00026,1.0006,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,1.00016,0.99977,1.00001,1,1.00001,1.00026,1,1.00026,1,1.00026,1,0.99924,0.99973,1.00001,0.99973,1,0.99982,1.00022,1.00026,1.00001,1,1.00026,1.0006,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,1.00001,1,1.00054,0.99977,1.00084,1.00007,0.99973,1.00013,0.99924,1.00001,1.00001,0.99945,0.91221,1.00001,1.00026,0.99977,1.00022,1.0006,1.00001,1.00001,0.99999,0.99977,0.99933,1.00022,1.00054,1.00001,1.00065,1.00026,1.00001,1.0001,1.00001,1.00052,1,1.0006,1.00001,0.99945,0.99897,0.99968,0.99924,1.00036,0.99945,0.99949,1,1.0006,0.99897,0.99918,0.99968,0.99911,0.99924,1,0.99962,1.01487,1,1.0005,0.99973,1.00012,1.00043,1,0.99995,0.99994,1.00036,0.99947,1.00019,1.00063,1.00025,0.99924,1.00036,0.99973,1.00036,1.00025,1.00001,1.00001,1.00027,1.0001,1.00068,1.00001,1.0006,1.0006,1,1.00008,0.99957,0.99972,0.9994,0.99954,0.99975,1.00051,1.00001,1.00019,1.00001,1.0001,0.99986,1.00001,1.00001,1.00038,0.99954,0.99954,0.9994,1.00066,0.99999,0.99977,1.00022,1.00054,1.00001,0.99977,1.00026,0.99975,1.0001,1.00001,0.99993,0.9995,0.99955,1.00016,0.99978,0.99974,1.00019,1.00022,0.99955,1.00053,0.99973,1.00089,1.00005,0.99967,1.00048,0.99973,1.00002,1.00034,0.99973,0.99973,0.99964,1.00006,1.00066,0.99947,0.99973,0.98894,0.99973,1,0.44898,1,0.99946,1,1.00039,1.00082,0.99991,0.99991,0.99985,1.00022,1.00023,1.00061,1.00006,0.99966,0.99973,0.99973,0.99973,1.00019,1.0008,1,0.99924,0.99924,0.99924,0.99983,1.00044,0.99973,0.99964,0.98332,1,0.99973,1,1,0.99962,0.99895,1.00016,0.99977,1.00016,0.99977,1.00016,0.99977,1.00001,1,1,1,0.99973,1,1,0.99955,0.99924,0.99924,0.99924,0.99924,0.99998,0.99998,0.99998,0.99973,0.99973,0.99972,1,1,1.00267,0.99999,0.99998,0.99998,1,0.99998,1.66475,1,0.99973,0.99973,1.00023,0.99973,1.00423,0.99925,0.99999,1,0.99991,0.99984,1.00002,1.00002,1.00002,1.00002,1.00049,1,1.00245,1,1,1,1,0.96329,1,1.20985,1.39713,1.00003,0.8254,1.00015,1,1.00035,1.00027,1.00031,1.00031,1.00003,1.00031,1.00031,0.99999,1.00003,0.99999,0.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,0.99999,1,0.99861,0.99861,1,1.00026,1.00026,1.00026,1.00026,0.95317,0.99999,0.99999,0.99999,0.99999,1.40483,1,0.99977,1.00054,1,1,0.99953,0.99962,1.00042,0.9995,1,1,1,1,1,1,1,1,0.99998,0.99998,0.99998,0.99998,1,1,1,1,1,1,1,1,1,1,1],Cj={lineHeight:1.35,lineGap:0.2},Tj=[0.76116,1,1,1.0006,1.0006,1.00006,0.99973,0.99973,0.99982,1.00001,1.00043,0.99998,0.99998,0.99959,1.00003,1.0006,0.99998,1.0006,1.0006,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,1.0006,1,1.00003,1.00003,1.00003,0.99973,0.99987,1.00001,1.00001,0.99977,0.99977,1.00001,1.00026,1.00022,0.99977,1.0006,1,1.00001,0.99973,0.99999,0.99977,1.00022,1.00001,1.00022,0.99977,1.00001,1.00026,0.99977,1.00001,1.00016,1.00001,1.00001,1.00026,1.0006,1.0006,1.0006,0.99949,0.99973,0.99998,0.99973,0.99973,1,0.99973,0.99973,1.0006,0.99973,0.99973,0.99924,0.99924,1,0.99924,0.99999,0.99973,0.99973,0.99973,0.99973,0.99998,1,1.0006,0.99973,1,0.99977,1,1,1,1.00005,1.0009,1.00005,1.00003,0.99998,0.99973,0.99973,0.99973,0.99973,1.0009,0.99973,0.99998,1.00025,0.99968,0.99973,1.00003,1.00025,0.60299,1.00024,1.06409,1,1,0.99998,1,0.9998,1.0006,0.99998,1,0.99936,0.99973,1.00002,1.00002,1.00002,1.00026,1.00001,1.00001,1.00001,1.00001,1.00001,1.00001,1,0.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,0.99977,0.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,0.99977,0.99977,0.99977,0.99977,1.00001,1.00001,1.00026,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99982,1,0.99973,0.99973,0.99973,0.99973,1.0006,1.0006,1.0006,1.0006,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,1.06409,1.00026,0.99973,0.99973,0.99973,0.99973,1,0.99973,1,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,0.99977,1,0.99977,1,0.99977,1,0.99977,1,0.99977,1.04596,0.99977,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00022,0.99973,1.00022,0.99973,1.00022,0.99973,1.00022,0.99973,0.99977,0.99973,0.99977,0.99973,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,0.99924,1.0006,1.0006,1.00019,1.00034,1,0.99924,1.00001,1,1,0.99973,0.99924,0.99973,0.99924,0.99973,1.02572,0.99973,1.00005,0.99973,0.99924,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99999,0.9998,0.99973,1.00022,0.99973,1.00022,0.99973,1.00022,0.99973,1,1.00016,0.99977,0.99998,0.99977,0.99998,0.99977,0.99998,1.00001,1,1.00001,1,1.00001,1,1.00001,1,1.00026,1.0006,1.00026,0.84533,1.00026,1.0006,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,1.00016,0.99977,1.00001,1,1.00001,1.00026,1,1.00026,1,1.00026,1,0.99924,0.99973,1.00001,0.99973,1,0.99982,1.00022,1.00026,1.00001,1,1.00026,1.0006,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99928,1,0.99977,1.00013,1.00055,0.99947,0.99945,0.99941,0.99924,1.00001,1.00001,1.0004,0.91621,1.00001,1.00026,0.99977,1.00022,1.0006,1.00001,1.00005,0.99999,0.99977,1.00015,1.00022,0.99977,1.00001,0.99973,1.00026,1.00001,1.00019,1.00001,0.99946,1,1.0006,1.00001,0.99978,1.00045,0.99973,0.99924,1.00023,0.99978,0.99966,1,1.00065,1.00045,1.00019,0.99973,0.99973,0.99924,1,1,0.96499,1,1.00055,0.99973,1.00008,1.00027,1,0.9997,0.99995,1.00023,0.99933,1.00019,1.00015,1.00031,0.99924,1.00023,0.99973,1.00023,1.00031,1.00001,0.99928,1.00029,1.00092,1.00035,1.00001,1.0006,1.0006,1,0.99988,0.99975,1,1.00082,0.99561,0.9996,1.00035,1.00001,0.99962,1.00001,1.00092,0.99964,1.00001,0.99963,0.99999,1.00035,1.00035,1.00082,0.99962,0.99999,0.99977,1.00022,1.00035,1.00001,0.99977,1.00026,0.9996,0.99967,1.00001,1.00034,1.00074,1.00054,1.00053,1.00063,0.99971,0.99962,1.00035,0.99975,0.99977,0.99973,1.00043,0.99953,1.0007,0.99915,0.99973,1.00008,0.99892,1.00073,1.00073,1.00114,0.99915,1.00073,0.99955,0.99973,1.00092,0.99973,1,0.99998,1,1.0003,1,1.00043,1.00001,0.99969,1.0003,1,1.00035,1.00001,0.9995,1,1.00092,0.99973,0.99973,0.99973,1.0007,0.9995,1,0.99924,1.0006,0.99924,0.99972,1.00062,0.99973,1.00114,1.00073,1,0.99955,1,1,1.00047,0.99968,1.00016,0.99977,1.00016,0.99977,1.00016,0.99977,1.00001,1,1,1,0.99973,1,1,0.99955,0.99924,0.99924,0.99924,0.99924,0.99998,0.99998,0.99998,0.99973,0.99973,0.99972,1,1,1.00267,0.99999,0.99998,0.99998,1,0.99998,1.66475,1,0.99973,0.99973,1.00023,0.99973,0.99971,0.99925,1.00023,1,0.99991,0.99984,1.00002,1.00002,1.00002,1.00002,1,1,1,1,1,1,1,0.96329,1,1.20985,1.39713,1.00003,0.8254,1.00015,1,1.00035,1.00027,1.00031,1.00031,0.99915,1.00031,1.00031,0.99999,1.00003,0.99999,0.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,0.99999,1,0.99861,0.99861,1,1.00026,1.00026,1.00026,1.00026,0.95317,0.99999,0.99999,0.99999,0.99999,1.40483,1,0.99977,1.00054,1,1,0.99953,0.99962,1.00042,0.9995,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Nj={lineHeight:1.2,lineGap:0.2},u6=[365,0,333,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,333,556,556,556,556,280,556,333,737,370,556,584,737,552,400,549,333,333,333,576,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1000,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,549,611,611,611,611,611,556,611,556,722,556,722,556,722,556,722,556,722,556,722,556,722,556,722,719,722,611,667,556,667,556,667,556,667,556,667,556,778,611,778,611,778,611,778,611,722,611,722,611,278,278,278,278,278,278,278,278,278,278,785,556,556,278,722,556,556,611,278,611,278,611,385,611,479,611,278,722,611,722,611,722,611,708,723,611,778,611,778,611,778,611,1000,944,722,389,722,389,722,389,667,556,667,556,667,556,667,556,611,333,611,479,611,333,722,611,722,611,722,611,722,611,722,611,722,611,944,778,667,556,667,611,500,611,500,611,500,278,556,722,556,1000,889,778,611,667,556,611,333,333,333,333,333,333,333,333,333,333,333,465,722,333,853,906,474,825,927,838,278,722,722,601,719,667,611,722,778,278,722,667,833,722,644,778,722,667,600,611,667,821,667,809,802,278,667,615,451,611,278,582,615,610,556,606,475,460,611,541,278,558,556,612,556,445,611,766,619,520,684,446,582,715,576,753,845,278,582,611,582,845,667,669,885,567,711,667,278,276,556,1094,1062,875,610,722,622,719,722,719,722,567,712,667,904,626,719,719,610,702,833,722,778,719,667,722,611,622,854,667,730,703,1005,1019,870,979,719,711,1031,719,556,618,615,417,635,556,709,497,615,615,500,635,740,604,611,604,611,556,490,556,875,556,615,581,833,844,729,854,615,552,854,583,556,556,611,417,552,556,278,281,278,969,906,611,500,615,556,604,778,611,487,447,944,778,944,778,944,778,667,556,333,333,556,1000,1000,552,278,278,278,278,500,500,500,556,556,350,1000,1000,240,479,333,333,604,333,167,396,556,556,1094,556,885,489,1115,1000,768,600,834,834,834,834,1000,500,1000,500,1000,500,500,494,612,823,713,584,549,713,979,722,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1000,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,611,611,333,333,333,333,333,333,333,333,222,222,333,333,333,333,333,333,333,333],g6=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],d6=[365,0,333,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,333,556,556,556,556,280,556,333,737,370,556,584,737,552,400,549,333,333,333,576,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1000,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,549,611,611,611,611,611,556,611,556,722,556,722,556,722,556,722,556,722,556,722,556,722,556,722,740,722,611,667,556,667,556,667,556,667,556,667,556,778,611,778,611,778,611,778,611,722,611,722,611,278,278,278,278,278,278,278,278,278,278,782,556,556,278,722,556,556,611,278,611,278,611,396,611,479,611,278,722,611,722,611,722,611,708,723,611,778,611,778,611,778,611,1000,944,722,389,722,389,722,389,667,556,667,556,667,556,667,556,611,333,611,479,611,333,722,611,722,611,722,611,722,611,722,611,722,611,944,778,667,556,667,611,500,611,500,611,500,278,556,722,556,1000,889,778,611,667,556,611,333,333,333,333,333,333,333,333,333,333,333,333,722,333,854,906,473,844,930,847,278,722,722,610,671,667,611,722,778,278,722,667,833,722,657,778,718,667,590,611,667,822,667,829,781,278,667,620,479,611,278,591,620,621,556,610,479,492,611,558,278,566,556,603,556,450,611,712,605,532,664,409,591,704,578,773,834,278,591,611,591,834,667,667,886,614,719,667,278,278,556,1094,1042,854,622,719,677,719,722,708,722,614,722,667,927,643,719,719,615,687,833,722,778,719,667,722,611,677,781,667,729,708,979,989,854,1000,708,719,1042,729,556,619,604,534,618,556,736,510,611,611,507,622,740,604,611,611,611,556,889,556,885,556,646,583,889,935,707,854,594,552,865,589,556,556,611,469,563,556,278,278,278,969,906,611,507,619,556,611,778,611,575,467,944,778,944,778,944,778,667,556,333,333,556,1000,1000,552,278,278,278,278,500,500,500,556,556,350,1000,1000,240,479,333,333,604,333,167,396,556,556,1104,556,885,516,1146,1000,768,600,834,834,834,834,999,500,1000,500,1000,500,500,494,612,823,713,584,549,713,979,722,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1000,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,611,611,333,333,333,333,333,333,333,333,222,222,333,333,333,333,333,333,333,333],c6=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],s6=[365,0,333,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,333,556,556,556,556,260,556,333,737,370,556,584,737,552,400,549,333,333,333,576,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1000,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,549,611,556,556,556,556,500,556,500,667,556,667,556,667,556,722,500,722,500,722,500,722,500,722,625,722,556,667,556,667,556,667,556,667,556,667,556,778,556,778,556,778,556,778,556,722,556,722,556,278,278,278,278,278,278,278,222,278,278,733,444,500,222,667,500,500,556,222,556,222,556,281,556,400,556,222,722,556,722,556,722,556,615,723,556,778,556,778,556,778,556,1000,944,722,333,722,333,722,333,667,500,667,500,667,500,667,500,611,278,611,354,611,278,722,556,722,556,722,556,722,556,722,556,722,556,944,722,667,500,667,611,500,611,500,611,500,222,556,667,556,1000,889,778,611,667,500,611,278,333,333,333,333,333,333,333,333,333,333,333,667,278,789,846,389,794,865,775,222,667,667,570,671,667,611,722,778,278,667,667,833,722,648,778,725,667,600,611,667,837,667,831,761,278,667,570,439,555,222,550,570,571,500,556,439,463,555,542,222,500,492,548,500,447,556,670,573,486,603,374,550,652,546,728,779,222,550,556,550,779,667,667,843,544,708,667,278,278,500,1066,982,844,589,715,639,724,667,651,667,544,704,667,917,614,715,715,589,686,833,722,778,725,667,722,611,639,795,667,727,673,920,923,805,886,651,694,1022,682,556,562,522,493,553,556,688,465,556,556,472,564,686,550,556,556,556,500,833,500,835,500,572,518,830,851,621,736,526,492,752,534,556,556,556,378,496,500,222,222,222,910,828,556,472,565,500,556,778,556,492,339,944,722,944,722,944,722,667,500,333,333,556,1000,1000,552,222,222,222,222,333,333,333,556,556,350,1000,1000,188,354,333,333,500,333,167,365,556,556,1094,556,885,323,1083,1000,768,600,834,834,834,834,1000,500,998,500,1000,500,500,494,612,823,713,584,549,713,979,719,274,549,549,584,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1000,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,500,500,333,333,333,333,333,333,333,333,222,222,294,294,324,324,316,328,398,285],h6=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],r6=[365,0,333,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,333,556,556,556,556,260,556,333,737,370,556,584,737,552,400,549,333,333,333,576,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1000,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,549,611,556,556,556,556,500,556,500,667,556,667,556,667,556,722,500,722,500,722,500,722,500,722,615,722,556,667,556,667,556,667,556,667,556,667,556,778,556,778,556,778,556,778,556,722,556,722,556,278,278,278,278,278,278,278,222,278,278,735,444,500,222,667,500,500,556,222,556,222,556,292,556,334,556,222,722,556,722,556,722,556,604,723,556,778,556,778,556,778,556,1000,944,722,333,722,333,722,333,667,500,667,500,667,500,667,500,611,278,611,375,611,278,722,556,722,556,722,556,722,556,722,556,722,556,944,722,667,500,667,611,500,611,500,611,500,222,556,667,556,1000,889,778,611,667,500,611,278,333,333,333,333,333,333,333,333,333,333,333,667,278,784,838,384,774,855,752,222,667,667,551,668,667,611,722,778,278,667,668,833,722,650,778,722,667,618,611,667,798,667,835,748,278,667,578,446,556,222,547,578,575,500,557,446,441,556,556,222,500,500,576,500,448,556,690,569,482,617,395,547,648,525,713,781,222,547,556,547,781,667,667,865,542,719,667,278,278,500,1057,1010,854,583,722,635,719,667,656,667,542,677,667,923,604,719,719,583,656,833,722,778,719,667,722,611,635,760,667,740,667,917,938,792,885,656,719,1010,722,556,573,531,365,583,556,669,458,559,559,438,583,688,552,556,542,556,500,458,500,823,500,573,521,802,823,625,719,521,510,750,542,556,556,556,365,510,500,222,278,222,906,812,556,438,559,500,552,778,556,489,411,944,722,944,722,944,722,667,500,333,333,556,1000,1000,552,222,222,222,222,333,333,333,556,556,350,1000,1000,188,354,333,333,500,333,167,365,556,556,1094,556,885,323,1073,1000,768,600,834,834,834,834,1000,500,1000,500,1000,500,500,494,612,823,713,584,549,713,979,719,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1000,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,500,500,333,333,333,333,333,333,333,333,222,222,294,294,324,324,316,328,398,285],l6=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],vj=[1.36898,1,1,0.72706,0.80479,0.83734,0.98894,0.99793,0.9897,0.93884,0.86209,0.94292,0.94292,1.16661,1.02058,0.93582,0.96694,0.93582,1.19137,0.99793,0.99793,0.99793,0.99793,0.99793,0.99793,0.99793,0.99793,0.99793,0.99793,0.78076,0.78076,1.02058,1.02058,1.02058,0.72851,0.78966,0.90838,0.83637,0.82391,0.96376,0.80061,0.86275,0.8768,0.95407,1.0258,0.73901,0.85022,0.83655,1.0156,0.95546,0.92179,0.87107,0.92179,0.82114,0.8096,0.89713,0.94438,0.95353,0.94083,0.91905,0.90406,0.9446,0.94292,1.18777,0.94292,1.02058,0.89903,0.90088,0.94938,0.97898,0.81093,0.97571,0.94938,1.024,0.9577,0.95933,0.98621,1.0474,0.97455,0.98981,0.9672,0.95933,0.9446,0.97898,0.97407,0.97646,0.78036,1.10208,0.95442,0.95298,0.97579,0.9332,0.94039,0.938,0.80687,1.01149,0.80687,1.02058,0.80479,0.99793,0.99793,0.99793,0.99793,1.01149,1.00872,0.90088,0.91882,1.0213,0.8361,1.02058,0.62295,0.54324,0.89022,1.08595,1,1,0.90088,1,0.97455,0.93582,0.90088,1,1.05686,0.8361,0.99642,0.99642,0.99642,0.72851,0.90838,0.90838,0.90838,0.90838,0.90838,0.90838,0.868,0.82391,0.80061,0.80061,0.80061,0.80061,1.0258,1.0258,1.0258,1.0258,0.97484,0.95546,0.92179,0.92179,0.92179,0.92179,0.92179,1.02058,0.92179,0.94438,0.94438,0.94438,0.94438,0.90406,0.86958,0.98225,0.94938,0.94938,0.94938,0.94938,0.94938,0.94938,0.9031,0.81093,0.94938,0.94938,0.94938,0.94938,0.98621,0.98621,0.98621,0.98621,0.93969,0.95933,0.9446,0.9446,0.9446,0.9446,0.9446,1.08595,0.9446,0.95442,0.95442,0.95442,0.95442,0.94039,0.97898,0.94039,0.90838,0.94938,0.90838,0.94938,0.90838,0.94938,0.82391,0.81093,0.82391,0.81093,0.82391,0.81093,0.82391,0.81093,0.96376,0.84313,0.97484,0.97571,0.80061,0.94938,0.80061,0.94938,0.80061,0.94938,0.80061,0.94938,0.80061,0.94938,0.8768,0.9577,0.8768,0.9577,0.8768,0.9577,1,1,0.95407,0.95933,0.97069,0.95933,1.0258,0.98621,1.0258,0.98621,1.0258,0.98621,1.0258,0.98621,1.0258,0.98621,0.887,1.01591,0.73901,1.0474,1,1,0.97455,0.83655,0.98981,1,1,0.83655,0.73977,0.83655,0.73903,0.84638,1.033,0.95546,0.95933,1,1,0.95546,0.95933,0.8271,0.95417,0.95933,0.92179,0.9446,0.92179,0.9446,0.92179,0.9446,0.936,0.91964,0.82114,0.97646,1,1,0.82114,0.97646,0.8096,0.78036,0.8096,0.78036,1,1,0.8096,0.78036,1,1,0.89713,0.77452,0.89713,1.10208,0.94438,0.95442,0.94438,0.95442,0.94438,0.95442,0.94438,0.95442,0.94438,0.95442,0.94438,0.95442,0.94083,0.97579,0.90406,0.94039,0.90406,0.9446,0.938,0.9446,0.938,0.9446,0.938,1,0.99793,0.90838,0.94938,0.868,0.9031,0.92179,0.9446,1,1,0.89713,1.10208,0.90088,0.90088,0.90088,0.90088,0.90088,0.90088,0.90088,0.90088,0.90088,0.90989,0.9358,0.91945,0.83181,0.75261,0.87992,0.82976,0.96034,0.83689,0.97268,1.0078,0.90838,0.83637,0.8019,0.90157,0.80061,0.9446,0.95407,0.92436,1.0258,0.85022,0.97153,1.0156,0.95546,0.89192,0.92179,0.92361,0.87107,0.96318,0.89713,0.93704,0.95638,0.91905,0.91709,0.92796,1.0258,0.93704,0.94836,1.0373,0.95933,1.0078,0.95871,0.94836,0.96174,0.92601,0.9498,0.98607,0.95776,0.95933,1.05453,1.0078,0.98275,0.9314,0.95617,0.91701,1.05993,0.9446,0.78367,0.9553,1,0.86832,1.0128,0.95871,0.99394,0.87548,0.96361,0.86774,1.0078,0.95871,0.9446,0.95871,0.86774,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.94083,0.97579,0.94083,0.97579,0.94083,0.97579,0.90406,0.94039,0.96694,1,0.89903,1,1,1,0.93582,0.93582,0.93582,1,0.908,0.908,0.918,0.94219,0.94219,0.96544,1,1.285,1,1,0.81079,0.81079,1,1,0.74854,1,1,1,1,0.99793,1,1,1,0.65,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.17173,1,0.80535,0.76169,1.02058,1.0732,1.05486,1,1,1.30692,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.16161,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Fj={lineHeight:1.2,lineGap:0.2},Sj=[1.36898,1,1,0.66227,0.80779,0.81625,0.97276,0.97276,0.97733,0.92222,0.83266,0.94292,0.94292,1.16148,1.02058,0.93582,0.96694,0.93582,1.17337,0.97276,0.97276,0.97276,0.97276,0.97276,0.97276,0.97276,0.97276,0.97276,0.97276,0.78076,0.78076,1.02058,1.02058,1.02058,0.71541,0.76813,0.85576,0.80591,0.80729,0.94299,0.77512,0.83655,0.86523,0.92222,0.98621,0.71743,0.81698,0.79726,0.98558,0.92222,0.90637,0.83809,0.90637,0.80729,0.76463,0.86275,0.90699,0.91605,0.9154,0.85308,0.85458,0.90531,0.94292,1.21296,0.94292,1.02058,0.89903,1.18616,0.99613,0.91677,0.78216,0.91677,0.90083,0.98796,0.9135,0.92168,0.95381,0.98981,0.95298,0.95381,0.93459,0.92168,0.91513,0.92004,0.91677,0.95077,0.748,1.04502,0.91677,0.92061,0.94236,0.89544,0.89364,0.9,0.80687,0.8578,0.80687,1.02058,0.80779,0.97276,0.97276,0.97276,0.97276,0.8578,0.99973,1.18616,0.91339,1.08074,0.82891,1.02058,0.55509,0.71526,0.89022,1.08595,1,1,1.18616,1,0.96736,0.93582,1.18616,1,1.04864,0.82711,0.99043,0.99043,0.99043,0.71541,0.85576,0.85576,0.85576,0.85576,0.85576,0.85576,0.845,0.80729,0.77512,0.77512,0.77512,0.77512,0.98621,0.98621,0.98621,0.98621,0.95961,0.92222,0.90637,0.90637,0.90637,0.90637,0.90637,1.02058,0.90251,0.90699,0.90699,0.90699,0.90699,0.85458,0.83659,0.94951,0.99613,0.99613,0.99613,0.99613,0.99613,0.99613,0.85811,0.78216,0.90083,0.90083,0.90083,0.90083,0.95381,0.95381,0.95381,0.95381,0.9135,0.92168,0.91513,0.91513,0.91513,0.91513,0.91513,1.08595,0.91677,0.91677,0.91677,0.91677,0.91677,0.89364,0.92332,0.89364,0.85576,0.99613,0.85576,0.99613,0.85576,0.99613,0.80729,0.78216,0.80729,0.78216,0.80729,0.78216,0.80729,0.78216,0.94299,0.76783,0.95961,0.91677,0.77512,0.90083,0.77512,0.90083,0.77512,0.90083,0.77512,0.90083,0.77512,0.90083,0.86523,0.9135,0.86523,0.9135,0.86523,0.9135,1,1,0.92222,0.92168,0.92222,0.92168,0.98621,0.95381,0.98621,0.95381,0.98621,0.95381,0.98621,0.95381,0.98621,0.95381,0.86036,0.97096,0.71743,0.98981,1,1,0.95298,0.79726,0.95381,1,1,0.79726,0.6894,0.79726,0.74321,0.81691,1.0006,0.92222,0.92168,1,1,0.92222,0.92168,0.79464,0.92098,0.92168,0.90637,0.91513,0.90637,0.91513,0.90637,0.91513,0.909,0.87514,0.80729,0.95077,1,1,0.80729,0.95077,0.76463,0.748,0.76463,0.748,1,1,0.76463,0.748,1,1,0.86275,0.72651,0.86275,1.04502,0.90699,0.91677,0.90699,0.91677,0.90699,0.91677,0.90699,0.91677,0.90699,0.91677,0.90699,0.91677,0.9154,0.94236,0.85458,0.89364,0.85458,0.90531,0.9,0.90531,0.9,0.90531,0.9,1,0.97276,0.85576,0.99613,0.845,0.85811,0.90251,0.91677,1,1,0.86275,1.04502,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.00899,1.30628,0.85576,0.80178,0.66862,0.7927,0.69323,0.88127,0.72459,0.89711,0.95381,0.85576,0.80591,0.7805,0.94729,0.77512,0.90531,0.92222,0.90637,0.98621,0.81698,0.92655,0.98558,0.92222,0.85359,0.90637,0.90976,0.83809,0.94523,0.86275,0.83509,0.93157,0.85308,0.83392,0.92346,0.98621,0.83509,0.92886,0.91324,0.92168,0.95381,0.90646,0.92886,0.90557,0.86847,0.90276,0.91324,0.86842,0.92168,0.99531,0.95381,0.9224,0.85408,0.92699,0.86847,1.0051,0.91513,0.80487,0.93481,1,0.88159,1.05214,0.90646,0.97355,0.81539,0.89398,0.85923,0.95381,0.90646,0.91513,0.90646,0.85923,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.9154,0.94236,0.9154,0.94236,0.9154,0.94236,0.85458,0.89364,0.96694,1,0.89903,1,1,1,0.91782,0.91782,0.91782,1,0.896,0.896,0.896,0.9332,0.9332,0.95973,1,1.26,1,1,0.80479,0.80178,1,1,0.85633,1,1,1,1,0.97276,1,1,1,0.698,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.14542,1,0.79199,0.78694,1.02058,1.03493,1.05486,1,1,1.23026,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.20006,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],mj={lineHeight:1.2,lineGap:0.2},pj=[1.36898,1,1,0.65507,0.84943,0.85639,0.88465,0.88465,0.86936,0.88307,0.86948,0.85283,0.85283,1.06383,1.02058,0.75945,0.9219,0.75945,1.17337,0.88465,0.88465,0.88465,0.88465,0.88465,0.88465,0.88465,0.88465,0.88465,0.88465,0.75945,0.75945,1.02058,1.02058,1.02058,0.69046,0.70926,0.85158,0.77812,0.76852,0.89591,0.70466,0.76125,0.80094,0.86822,0.83864,0.728,0.77212,0.79475,0.93637,0.87514,0.8588,0.76013,0.8588,0.72421,0.69866,0.77598,0.85991,0.80811,0.87832,0.78112,0.77512,0.8562,1.0222,1.18417,1.0222,1.27014,0.89903,1.15012,0.93859,0.94399,0.846,0.94399,0.81453,1.0186,0.94219,0.96017,1.03075,1.02175,0.912,1.03075,0.96998,0.96017,0.93859,0.94399,0.94399,0.95493,0.746,1.12658,0.94578,0.91,0.979,0.882,0.882,0.83,0.85034,0.83537,0.85034,1.02058,0.70869,0.88465,0.88465,0.88465,0.88465,0.83537,0.90083,1.15012,0.9161,0.94565,0.73541,1.02058,0.53609,0.69353,0.79519,1.08595,1,1,1.15012,1,0.91974,0.75945,1.15012,1,0.9446,0.73361,0.9005,0.9005,0.9005,0.62864,0.85158,0.85158,0.85158,0.85158,0.85158,0.85158,0.773,0.76852,0.70466,0.70466,0.70466,0.70466,0.83864,0.83864,0.83864,0.83864,0.90561,0.87514,0.8588,0.8588,0.8588,0.8588,0.8588,1.02058,0.85751,0.85991,0.85991,0.85991,0.85991,0.77512,0.76013,0.88075,0.93859,0.93859,0.93859,0.93859,0.93859,0.93859,0.8075,0.846,0.81453,0.81453,0.81453,0.81453,0.82424,0.82424,0.82424,0.82424,0.9278,0.96017,0.93859,0.93859,0.93859,0.93859,0.93859,1.08595,0.8562,0.94578,0.94578,0.94578,0.94578,0.882,0.94578,0.882,0.85158,0.93859,0.85158,0.93859,0.85158,0.93859,0.76852,0.846,0.76852,0.846,0.76852,0.846,0.76852,0.846,0.89591,0.8544,0.90561,0.94399,0.70466,0.81453,0.70466,0.81453,0.70466,0.81453,0.70466,0.81453,0.70466,0.81453,0.80094,0.94219,0.80094,0.94219,0.80094,0.94219,1,1,0.86822,0.96017,0.86822,0.96017,0.83864,0.82424,0.83864,0.82424,0.83864,0.82424,0.83864,1.03075,0.83864,0.82424,0.81402,1.02738,0.728,1.02175,1,1,0.912,0.79475,1.03075,1,1,0.79475,0.83911,0.79475,0.66266,0.80553,1.06676,0.87514,0.96017,1,1,0.87514,0.96017,0.86865,0.87396,0.96017,0.8588,0.93859,0.8588,0.93859,0.8588,0.93859,0.867,0.84759,0.72421,0.95493,1,1,0.72421,0.95493,0.69866,0.746,0.69866,0.746,1,1,0.69866,0.746,1,1,0.77598,0.88417,0.77598,1.12658,0.85991,0.94578,0.85991,0.94578,0.85991,0.94578,0.85991,0.94578,0.85991,0.94578,0.85991,0.94578,0.87832,0.979,0.77512,0.882,0.77512,0.8562,0.83,0.8562,0.83,0.8562,0.83,1,0.88465,0.85158,0.93859,0.773,0.8075,0.85751,0.8562,1,1,0.77598,1.12658,1.15012,1.15012,1.15012,1.15012,1.15012,1.15313,1.15012,1.15012,1.15012,1.08106,1.03901,0.85158,0.77025,0.62264,0.7646,0.65351,0.86026,0.69461,0.89947,1.03075,0.85158,0.77812,0.76449,0.88836,0.70466,0.8562,0.86822,0.8588,0.83864,0.77212,0.85308,0.93637,0.87514,0.82352,0.8588,0.85701,0.76013,0.89058,0.77598,0.8156,0.82565,0.78112,0.77899,0.89386,0.83864,0.8156,0.9486,0.92388,0.96186,1.03075,0.91123,0.9486,0.93298,0.878,0.93942,0.92388,0.84596,0.96186,0.95119,1.03075,0.922,0.88787,0.95829,0.88,0.93559,0.93859,0.78815,0.93758,1,0.89217,1.03737,0.91123,0.93969,0.77487,0.85769,0.86799,1.03075,0.91123,0.93859,0.91123,0.86799,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.87832,0.979,0.87832,0.979,0.87832,0.979,0.77512,0.882,0.9219,1,0.89903,1,1,1,0.87321,0.87321,0.87321,1,1.027,1.027,1.027,0.86847,0.86847,0.79121,1,1.124,1,1,0.73572,0.73572,1,1,0.85034,1,1,1,1,0.88465,1,1,1,0.669,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.04828,1,0.74948,0.75187,1.02058,0.98391,1.02119,1,1,1.06233,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.05233,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Oj={lineHeight:1.2,lineGap:0.2},yj=[1.36898,1,1,0.76305,0.82784,0.94935,0.89364,0.92241,0.89073,0.90706,0.98472,0.85283,0.85283,1.0664,1.02058,0.74505,0.9219,0.74505,1.23456,0.92241,0.92241,0.92241,0.92241,0.92241,0.92241,0.92241,0.92241,0.92241,0.92241,0.74505,0.74505,1.02058,1.02058,1.02058,0.73002,0.72601,0.91755,0.8126,0.80314,0.92222,0.73764,0.79726,0.83051,0.90284,0.86023,0.74,0.8126,0.84869,0.96518,0.91115,0.8858,0.79761,0.8858,0.74498,0.73914,0.81363,0.89591,0.83659,0.89633,0.85608,0.8111,0.90531,1.0222,1.22736,1.0222,1.27014,0.89903,0.90088,0.86667,1.0231,0.896,1.01411,0.90083,1.05099,1.00512,0.99793,1.05326,1.09377,0.938,1.06226,1.00119,0.99793,0.98714,1.0231,1.01231,0.98196,0.792,1.19137,0.99074,0.962,1.01915,0.926,0.942,0.856,0.85034,0.92006,0.85034,1.02058,0.69067,0.92241,0.92241,0.92241,0.92241,0.92006,0.9332,0.90088,0.91882,0.93484,0.75339,1.02058,0.56866,0.54324,0.79519,1.08595,1,1,0.90088,1,0.95325,0.74505,0.90088,1,0.97198,0.75339,0.91009,0.91009,0.91009,0.66466,0.91755,0.91755,0.91755,0.91755,0.91755,0.91755,0.788,0.80314,0.73764,0.73764,0.73764,0.73764,0.86023,0.86023,0.86023,0.86023,0.92915,0.91115,0.8858,0.8858,0.8858,0.8858,0.8858,1.02058,0.8858,0.89591,0.89591,0.89591,0.89591,0.8111,0.79611,0.89713,0.86667,0.86667,0.86667,0.86667,0.86667,0.86667,0.86936,0.896,0.90083,0.90083,0.90083,0.90083,0.84224,0.84224,0.84224,0.84224,0.97276,0.99793,0.98714,0.98714,0.98714,0.98714,0.98714,1.08595,0.89876,0.99074,0.99074,0.99074,0.99074,0.942,1.0231,0.942,0.91755,0.86667,0.91755,0.86667,0.91755,0.86667,0.80314,0.896,0.80314,0.896,0.80314,0.896,0.80314,0.896,0.92222,0.93372,0.92915,1.01411,0.73764,0.90083,0.73764,0.90083,0.73764,0.90083,0.73764,0.90083,0.73764,0.90083,0.83051,1.00512,0.83051,1.00512,0.83051,1.00512,1,1,0.90284,0.99793,0.90976,0.99793,0.86023,0.84224,0.86023,0.84224,0.86023,0.84224,0.86023,1.05326,0.86023,0.84224,0.82873,1.07469,0.74,1.09377,1,1,0.938,0.84869,1.06226,1,1,0.84869,0.83704,0.84869,0.81441,0.85588,1.08927,0.91115,0.99793,1,1,0.91115,0.99793,0.91887,0.90991,0.99793,0.8858,0.98714,0.8858,0.98714,0.8858,0.98714,0.894,0.91434,0.74498,0.98196,1,1,0.74498,0.98196,0.73914,0.792,0.73914,0.792,1,1,0.73914,0.792,1,1,0.81363,0.904,0.81363,1.19137,0.89591,0.99074,0.89591,0.99074,0.89591,0.99074,0.89591,0.99074,0.89591,0.99074,0.89591,0.99074,0.89633,1.01915,0.8111,0.942,0.8111,0.90531,0.856,0.90531,0.856,0.90531,0.856,1,0.92241,0.91755,0.86667,0.788,0.86936,0.8858,0.89876,1,1,0.81363,1.19137,0.90088,0.90088,0.90088,0.90088,0.90088,0.90088,0.90088,0.90088,0.90088,0.90388,1.03901,0.92138,0.78105,0.7154,0.86169,0.80513,0.94007,0.82528,0.98612,1.06226,0.91755,0.8126,0.81884,0.92819,0.73764,0.90531,0.90284,0.8858,0.86023,0.8126,0.91172,0.96518,0.91115,0.83089,0.8858,0.87791,0.79761,0.89297,0.81363,0.88157,0.89992,0.85608,0.81992,0.94307,0.86023,0.88157,0.95308,0.98699,0.99793,1.06226,0.95817,0.95308,0.97358,0.928,0.98088,0.98699,0.92761,0.99793,0.96017,1.06226,0.986,0.944,0.95978,0.938,0.96705,0.98714,0.80442,0.98972,1,0.89762,1.04552,0.95817,0.99007,0.87064,0.91879,0.88888,1.06226,0.95817,0.98714,0.95817,0.88888,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.89633,1.01915,0.89633,1.01915,0.89633,1.01915,0.8111,0.942,0.9219,1,0.89903,1,1,1,0.93173,0.93173,0.93173,1,1.06304,1.06304,1.06904,0.89903,0.89903,0.80549,1,1.156,1,1,0.76575,0.76575,1,1,0.72458,1,1,1,1,0.92241,1,1,1,0.619,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.07257,1,0.74705,0.71119,1.02058,1.024,1.02119,1,1,1.1536,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.05638,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Dj={lineHeight:1.2,lineGap:0.2},wj=[1.76738,1,1,0.99297,0.9824,1.04016,1.06497,1.03424,0.97529,1.17647,1.23203,1.1085,1.1085,1.16939,1.2107,0.9754,1.21408,0.9754,1.59578,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,0.81378,0.81378,1.2107,1.2107,1.2107,0.71703,0.97847,0.97363,0.88776,0.8641,1.02096,0.79795,0.85132,0.914,1.06085,1.1406,0.8007,0.89858,0.83693,1.14889,1.09398,0.97489,0.92094,0.97489,0.90399,0.84041,0.95923,1.00135,1,1.06467,0.98243,0.90996,0.99361,1.1085,1.56942,1.1085,1.2107,0.74627,0.94282,0.96752,1.01519,0.86304,1.01359,0.97278,1.15103,1.01359,0.98561,1.02285,1.02285,1.00527,1.02285,1.0302,0.99041,1.0008,1.01519,1.01359,1.02258,0.79104,1.16862,0.99041,0.97454,1.02511,0.99298,0.96752,0.95801,0.94856,1.16579,0.94856,1.2107,0.9824,1.03424,1.03424,1,1.03424,1.16579,0.8727,1.3871,1.18622,1.10818,1.04478,1.2107,1.18622,0.75155,0.94994,1.28826,1.21408,1.21408,0.91056,1,0.91572,0.9754,0.64663,1.18328,1.24866,1.04478,1.14169,1.15749,1.17389,0.71703,0.97363,0.97363,0.97363,0.97363,0.97363,0.97363,0.93506,0.8641,0.79795,0.79795,0.79795,0.79795,1.1406,1.1406,1.1406,1.1406,1.02096,1.09398,0.97426,0.97426,0.97426,0.97426,0.97426,1.2107,0.97489,1.00135,1.00135,1.00135,1.00135,0.90996,0.92094,1.02798,0.96752,0.96752,0.96752,0.96752,0.96752,0.96752,0.93136,0.86304,0.97278,0.97278,0.97278,0.97278,1.02285,1.02285,1.02285,1.02285,0.97122,0.99041,1,1,1,1,1,1.28826,1.0008,0.99041,0.99041,0.99041,0.99041,0.96752,1.01519,0.96752,0.97363,0.96752,0.97363,0.96752,0.97363,0.96752,0.8641,0.86304,0.8641,0.86304,0.8641,0.86304,0.8641,0.86304,1.02096,1.03057,1.02096,1.03517,0.79795,0.97278,0.79795,0.97278,0.79795,0.97278,0.79795,0.97278,0.79795,0.97278,0.914,1.01359,0.914,1.01359,0.914,1.01359,1,1,1.06085,0.98561,1.06085,1.00879,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,0.97138,1.08692,0.8007,1.02285,1,1,1.00527,0.83693,1.02285,1,1,0.83693,0.9455,0.83693,0.90418,0.83693,1.13005,1.09398,0.99041,1,1,1.09398,0.99041,0.96692,1.09251,0.99041,0.97489,1.0008,0.97489,1.0008,0.97489,1.0008,0.93994,0.97931,0.90399,1.02258,1,1,0.90399,1.02258,0.84041,0.79104,0.84041,0.79104,0.84041,0.79104,0.84041,0.79104,1,1,0.95923,1.07034,0.95923,1.16862,1.00135,0.99041,1.00135,0.99041,1.00135,0.99041,1.00135,0.99041,1.00135,0.99041,1.00135,0.99041,1.06467,1.02511,0.90996,0.96752,0.90996,0.99361,0.95801,0.99361,0.95801,0.99361,0.95801,1.07733,1.03424,0.97363,0.96752,0.93506,0.93136,0.97489,1.0008,1,1,0.95923,1.16862,1.15103,1.15103,1.01173,1.03959,0.75953,0.81378,0.79912,1.15103,1.21994,0.95161,0.87815,1.01149,0.81525,0.7676,0.98167,1.01134,1.02546,0.84097,1.03089,1.18102,0.97363,0.88776,0.85134,0.97826,0.79795,0.99361,1.06085,0.97489,1.1406,0.89858,1.0388,1.14889,1.09398,0.86039,0.97489,1.0595,0.92094,0.94793,0.95923,0.90996,0.99346,0.98243,1.02112,0.95493,1.1406,0.90996,1.03574,1.02597,1.0008,1.18102,1.06628,1.03574,1.0192,1.01932,1.00886,0.97531,1.0106,1.0008,1.13189,1.18102,1.02277,0.98683,1.0016,0.99561,1.07237,1.0008,0.90434,0.99921,0.93803,0.8965,1.23085,1.06628,1.04983,0.96268,1.0499,0.98439,1.18102,1.06628,1.0008,1.06628,0.98439,0.79795,1,1,1,1,1,1,1,1,1,1,1,1,1.09466,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.97278,1,1,1,1,1,1,1,1,1,1,1,1,1.02065,1,1,1,1,1,1,1.06467,1.02511,1.06467,1.02511,1.06467,1.02511,0.90996,0.96752,1,1.21408,0.89903,1,1,0.75155,1.04394,1.04394,1.04394,1.04394,0.98633,0.98633,0.98633,0.73047,0.73047,1.20642,0.91211,1.25635,1.222,1.02956,1.03372,1.03372,0.96039,1.24633,1,1.12454,0.93503,1.03424,1.19687,1.03424,1,1,1,0.771,1,1,1.15749,1.15749,1.15749,1.10948,0.86279,0.94434,0.86279,0.94434,0.86182,1,1,1.16897,1,0.96085,0.90137,1.2107,1.18416,1.13973,0.69825,0.9716,2.10339,1.29004,1.29004,1.21172,1.29004,1.29004,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,0.99862,0.99862,1,0.87025,0.87025,0.87025,0.87025,1.18874,1.42603,1,1.42603,1.42603,0.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.09193,1.09193,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Ej={lineHeight:1.33008,lineGap:0},uj=[1.76738,1,1,0.98946,1.03959,1.04016,1.02809,1.036,0.97639,1.10953,1.23203,1.11144,1.11144,1.16939,1.21237,0.9754,1.21261,0.9754,1.59754,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,0.81378,0.81378,1.21237,1.21237,1.21237,0.73541,0.97847,0.97363,0.89723,0.87897,1.0426,0.79429,0.85292,0.91149,1.05815,1.1406,0.79631,0.90128,0.83853,1.04396,1.10615,0.97552,0.94436,0.97552,0.88641,0.80527,0.96083,1.00135,1,1.06777,0.9817,0.91142,0.99361,1.11144,1.57293,1.11144,1.21237,0.74627,1.31818,1.06585,0.97042,0.83055,0.97042,0.93503,1.1261,0.97042,0.97922,1.14236,0.94552,1.01054,1.14236,1.02471,0.97922,0.94165,0.97042,0.97042,1.0276,0.78929,1.1261,0.97922,0.95874,1.02197,0.98507,0.96752,0.97168,0.95107,1.16579,0.95107,1.21237,1.03959,1.036,1.036,1,1.036,1.16579,0.87357,1.31818,1.18754,1.26781,1.05356,1.21237,1.18622,0.79487,0.94994,1.29004,1.24047,1.24047,1.31818,1,0.91484,0.9754,1.31818,1.1349,1.24866,1.05356,1.13934,1.15574,1.17389,0.73541,0.97363,0.97363,0.97363,0.97363,0.97363,0.97363,0.94385,0.87897,0.79429,0.79429,0.79429,0.79429,1.1406,1.1406,1.1406,1.1406,1.0426,1.10615,0.97552,0.97552,0.97552,0.97552,0.97552,1.21237,0.97552,1.00135,1.00135,1.00135,1.00135,0.91142,0.94436,0.98721,1.06585,1.06585,1.06585,1.06585,1.06585,1.06585,0.96705,0.83055,0.93503,0.93503,0.93503,0.93503,1.14236,1.14236,1.14236,1.14236,0.93125,0.97922,0.94165,0.94165,0.94165,0.94165,0.94165,1.29004,0.94165,0.97922,0.97922,0.97922,0.97922,0.96752,0.97042,0.96752,0.97363,1.06585,0.97363,1.06585,0.97363,1.06585,0.87897,0.83055,0.87897,0.83055,0.87897,0.83055,0.87897,0.83055,1.0426,1.0033,1.0426,0.97042,0.79429,0.93503,0.79429,0.93503,0.79429,0.93503,0.79429,0.93503,0.79429,0.93503,0.91149,0.97042,0.91149,0.97042,0.91149,0.97042,1,1,1.05815,0.97922,1.05815,0.97922,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,0.97441,1.04302,0.79631,1.01582,1,1,1.01054,0.83853,1.14236,1,1,0.83853,1.09125,0.83853,0.90418,0.83853,1.19508,1.10615,0.97922,1,1,1.10615,0.97922,1.01034,1.10466,0.97922,0.97552,0.94165,0.97552,0.94165,0.97552,0.94165,0.91602,0.91981,0.88641,1.0276,1,1,0.88641,1.0276,0.80527,0.78929,0.80527,0.78929,0.80527,0.78929,0.80527,0.78929,1,1,0.96083,1.05403,0.95923,1.16862,1.00135,0.97922,1.00135,0.97922,1.00135,0.97922,1.00135,0.97922,1.00135,0.97922,1.00135,0.97922,1.06777,1.02197,0.91142,0.96752,0.91142,0.99361,0.97168,0.99361,0.97168,0.99361,0.97168,1.23199,1.036,0.97363,1.06585,0.94385,0.96705,0.97552,0.94165,1,1,0.96083,1.1261,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,0.95161,1.27126,1.00811,0.83284,0.77702,0.99137,0.95253,1.0347,0.86142,1.07205,1.14236,0.97363,0.89723,0.86869,1.09818,0.79429,0.99361,1.05815,0.97552,1.1406,0.90128,1.06662,1.04396,1.10615,0.84918,0.97552,1.04694,0.94436,0.98015,0.96083,0.91142,1.00356,0.9817,1.01945,0.98999,1.1406,0.91142,1.04961,0.9898,1.00639,1.14236,1.07514,1.04961,0.99607,1.02897,1.008,0.9898,0.95134,1.00639,1.11121,1.14236,1.00518,0.97981,1.02186,1,1.08578,0.94165,0.99314,0.98387,0.93028,0.93377,1.35125,1.07514,1.10687,0.93491,1.04232,1.00351,1.14236,1.07514,0.94165,1.07514,1.00351,0.79429,1,1,1,1,1,1,1,1,1,1,1,1,1.09097,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.93503,1,1,1,1,1,1,1,1,1,1,1,1,0.96609,1,1,1,1,1,1,1.06777,1.02197,1.06777,1.02197,1.06777,1.02197,0.91142,0.96752,1,1.21261,0.89903,1,1,0.75155,1.04745,1.04745,1.04745,1.04394,0.98633,0.98633,0.98633,0.72959,0.72959,1.20502,0.91406,1.26514,1.222,1.02956,1.03372,1.03372,0.96039,1.24633,1,1.09125,0.93327,1.03336,1.16541,1.036,1,1,1,0.771,1,1,1.15574,1.15574,1.15574,1.15574,0.86364,0.94434,0.86279,0.94434,0.86224,1,1,1.16798,1,0.96085,0.90068,1.21237,1.18416,1.13904,0.69825,0.9716,2.10339,1.29004,1.29004,1.21339,1.29004,1.29004,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,0.99862,0.99862,1,0.87025,0.87025,0.87025,0.87025,1.18775,1.42603,1,1.42603,1.42603,0.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.13269,1.13269,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],gj={lineHeight:1.33008,lineGap:0},dj=[1.76738,1,1,0.98946,1.14763,1.05365,1.06234,0.96927,0.92586,1.15373,1.18414,0.91349,0.91349,1.07403,1.17308,0.78383,1.20088,0.78383,1.42531,0.96927,0.96927,0.96927,0.96927,0.96927,0.96927,0.96927,0.96927,0.96927,0.96927,0.78383,0.78383,1.17308,1.17308,1.17308,0.77349,0.94565,0.94729,0.85944,0.88506,0.9858,0.74817,0.80016,0.88449,0.98039,0.95782,0.69238,0.89898,0.83231,0.98183,1.03989,0.96924,0.86237,0.96924,0.80595,0.74524,0.86091,0.95402,0.94143,0.98448,0.8858,0.83089,0.93285,1.0949,1.39016,1.0949,1.45994,0.74627,1.04839,0.97454,0.97454,0.87207,0.97454,0.87533,1.06151,0.97454,1.00176,1.16484,1.08132,0.98047,1.16484,1.02989,1.01054,0.96225,0.97454,0.97454,1.06598,0.79004,1.16344,1.00351,0.94629,0.9973,0.91016,0.96777,0.9043,0.91082,0.92481,0.91082,1.17308,0.95748,0.96927,0.96927,1,0.96927,0.92481,0.80597,1.04839,1.23393,1.1781,0.9245,1.17308,1.20808,0.63218,0.94261,1.24822,1.09971,1.09971,1.04839,1,0.85273,0.78032,1.04839,1.09971,1.22326,0.9245,1.09836,1.13525,1.15222,0.70424,0.94729,0.94729,0.94729,0.94729,0.94729,0.94729,0.85498,0.88506,0.74817,0.74817,0.74817,0.74817,0.95782,0.95782,0.95782,0.95782,0.9858,1.03989,0.96924,0.96924,0.96924,0.96924,0.96924,1.17308,0.96924,0.95402,0.95402,0.95402,0.95402,0.83089,0.86237,0.88409,0.97454,0.97454,0.97454,0.97454,0.97454,0.97454,0.92916,0.87207,0.87533,0.87533,0.87533,0.87533,0.93146,0.93146,0.93146,0.93146,0.93854,1.01054,0.96225,0.96225,0.96225,0.96225,0.96225,1.24822,0.8761,1.00351,1.00351,1.00351,1.00351,0.96777,0.97454,0.96777,0.94729,0.97454,0.94729,0.97454,0.94729,0.97454,0.88506,0.87207,0.88506,0.87207,0.88506,0.87207,0.88506,0.87207,0.9858,0.95391,0.9858,0.97454,0.74817,0.87533,0.74817,0.87533,0.74817,0.87533,0.74817,0.87533,0.74817,0.87533,0.88449,0.97454,0.88449,0.97454,0.88449,0.97454,1,1,0.98039,1.00176,0.98039,1.00176,0.95782,0.93146,0.95782,0.93146,0.95782,0.93146,0.95782,1.16484,0.95782,0.93146,0.84421,1.12761,0.69238,1.08132,1,1,0.98047,0.83231,1.16484,1,1,0.84723,1.04861,0.84723,0.78755,0.83231,1.23736,1.03989,1.01054,1,1,1.03989,1.01054,0.9857,1.03849,1.01054,0.96924,0.96225,0.96924,0.96225,0.96924,0.96225,0.92383,0.90171,0.80595,1.06598,1,1,0.80595,1.06598,0.74524,0.79004,0.74524,0.79004,0.74524,0.79004,0.74524,0.79004,1,1,0.86091,1.02759,0.85771,1.16344,0.95402,1.00351,0.95402,1.00351,0.95402,1.00351,0.95402,1.00351,0.95402,1.00351,0.95402,1.00351,0.98448,0.9973,0.83089,0.96777,0.83089,0.93285,0.9043,0.93285,0.9043,0.93285,0.9043,1.31868,0.96927,0.94729,0.97454,0.85498,0.92916,0.96924,0.8761,1,1,0.86091,1.16344,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,0.81965,0.81965,0.94729,0.78032,0.71022,0.90883,0.84171,0.99877,0.77596,1.05734,1.2,0.94729,0.85944,0.82791,0.9607,0.74817,0.93285,0.98039,0.96924,0.95782,0.89898,0.98316,0.98183,1.03989,0.78614,0.96924,0.97642,0.86237,0.86075,0.86091,0.83089,0.90082,0.8858,0.97296,1.01284,0.95782,0.83089,1.0976,1.04,1.03342,1.2,1.0675,1.0976,0.98205,1.03809,1.05097,1.04,0.95364,1.03342,1.05401,1.2,1.02148,1.0119,1.04724,1.0127,1.02732,0.96225,0.8965,0.97783,0.93574,0.94818,1.30679,1.0675,1.11826,0.99821,1.0557,1.0326,1.2,1.0675,0.96225,1.0675,1.0326,0.74817,1,1,1,1,1,1,1,1,1,1,1,1,1.03754,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.87533,1,1,1,1,1,1,1,1,1,1,1,1,0.98705,1,1,1,1,1,1,0.98448,0.9973,0.98448,0.9973,0.98448,0.9973,0.83089,0.96777,1,1.20088,0.89903,1,1,0.75155,0.94945,0.94945,0.94945,0.94945,1.12317,1.12317,1.12317,0.67603,0.67603,1.15621,0.73584,1.21191,1.22135,1.06483,0.94868,0.94868,0.95996,1.24633,1,1.07497,0.87709,0.96927,1.01473,0.96927,1,1,1,0.77295,1,1,1.09836,1.09836,1.09836,1.01522,0.86321,0.94434,0.8649,0.94434,0.86182,1,1,1.083,1,0.91578,0.86438,1.17308,1.18416,1.14589,0.69825,0.97622,1.96791,1.24822,1.24822,1.17308,1.24822,1.24822,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,0.99862,0.99862,1,0.87025,0.87025,0.87025,0.87025,1.17984,1.42603,1,1.42603,1.42603,0.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.10742,1.10742,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],cj={lineHeight:1.33008,lineGap:0},sj=[1.76738,1,1,0.98594,1.02285,1.10454,1.06234,0.96927,0.92037,1.19985,1.2046,0.90616,0.90616,1.07152,1.1714,0.78032,1.20088,0.78032,1.40246,0.96927,0.96927,0.96927,0.96927,0.96927,0.96927,0.96927,0.96927,0.96927,0.96927,0.78032,0.78032,1.1714,1.1714,1.1714,0.80597,0.94084,0.96706,0.85944,0.85734,0.97093,0.75842,0.79936,0.88198,0.9831,0.95782,0.71387,0.86969,0.84636,1.07796,1.03584,0.96924,0.83968,0.96924,0.82826,0.79649,0.85771,0.95132,0.93119,0.98965,0.88433,0.8287,0.93365,1.08612,1.3638,1.08612,1.45786,0.74627,0.80499,0.91484,1.05707,0.92383,1.05882,0.9403,1.12654,1.05882,1.01756,1.09011,1.09011,0.99414,1.09011,1.034,1.01756,1.05356,1.05707,1.05882,1.04399,0.84863,1.21968,1.01756,0.95801,1.00068,0.91797,0.96777,0.9043,0.90351,0.92105,0.90351,1.1714,0.85337,0.96927,0.96927,0.99912,0.96927,0.92105,0.80597,1.2434,1.20808,1.05937,0.90957,1.1714,1.20808,0.75155,0.94261,1.24644,1.09971,1.09971,0.84751,1,0.85273,0.78032,0.61584,1.05425,1.17914,0.90957,1.08665,1.11593,1.14169,0.73381,0.96706,0.96706,0.96706,0.96706,0.96706,0.96706,0.86035,0.85734,0.75842,0.75842,0.75842,0.75842,0.95782,0.95782,0.95782,0.95782,0.97093,1.03584,0.96924,0.96924,0.96924,0.96924,0.96924,1.1714,0.96924,0.95132,0.95132,0.95132,0.95132,0.8287,0.83968,0.89049,0.91484,0.91484,0.91484,0.91484,0.91484,0.91484,0.93575,0.92383,0.9403,0.9403,0.9403,0.9403,0.8717,0.8717,0.8717,0.8717,1.00527,1.01756,1.05356,1.05356,1.05356,1.05356,1.05356,1.24644,0.95923,1.01756,1.01756,1.01756,1.01756,0.96777,1.05707,0.96777,0.96706,0.91484,0.96706,0.91484,0.96706,0.91484,0.85734,0.92383,0.85734,0.92383,0.85734,0.92383,0.85734,0.92383,0.97093,1.0969,0.97093,1.05882,0.75842,0.9403,0.75842,0.9403,0.75842,0.9403,0.75842,0.9403,0.75842,0.9403,0.88198,1.05882,0.88198,1.05882,0.88198,1.05882,1,1,0.9831,1.01756,0.9831,1.01756,0.95782,0.8717,0.95782,0.8717,0.95782,0.8717,0.95782,1.09011,0.95782,0.8717,0.84784,1.11551,0.71387,1.09011,1,1,0.99414,0.84636,1.09011,1,1,0.84636,1.0536,0.84636,0.94298,0.84636,1.23297,1.03584,1.01756,1,1,1.03584,1.01756,1.00323,1.03444,1.01756,0.96924,1.05356,0.96924,1.05356,0.96924,1.05356,0.93066,0.98293,0.82826,1.04399,1,1,0.82826,1.04399,0.79649,0.84863,0.79649,0.84863,0.79649,0.84863,0.79649,0.84863,1,1,0.85771,1.17318,0.85771,1.21968,0.95132,1.01756,0.95132,1.01756,0.95132,1.01756,0.95132,1.01756,0.95132,1.01756,0.95132,1.01756,0.98965,1.00068,0.8287,0.96777,0.8287,0.93365,0.9043,0.93365,0.9043,0.93365,0.9043,1.08571,0.96927,0.96706,0.91484,0.86035,0.93575,0.96924,0.95923,1,1,0.85771,1.21968,1.11437,1.11437,0.93109,0.91202,0.60411,0.84164,0.55572,1.01173,0.97361,0.81818,0.81818,0.96635,0.78032,0.72727,0.92366,0.98601,1.03405,0.77968,1.09799,1.2,0.96706,0.85944,0.85638,0.96491,0.75842,0.93365,0.9831,0.96924,0.95782,0.86969,0.94152,1.07796,1.03584,0.78437,0.96924,0.98715,0.83968,0.83491,0.85771,0.8287,0.94492,0.88433,0.9287,1.0098,0.95782,0.8287,1.0625,0.98248,1.03424,1.2,1.01071,1.0625,0.95246,1.03809,1.04912,0.98248,1.00221,1.03424,1.05443,1.2,1.04785,0.99609,1.00169,1.05176,0.99346,1.05356,0.9087,1.03004,0.95542,0.93117,1.23362,1.01071,1.07831,1.02512,1.05205,1.03502,1.2,1.01071,1.05356,1.01071,1.03502,0.75842,1,1,1,1,1,1,1,1,1,1,1,1,1.03719,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.9403,1,1,1,1,1,1,1,1,1,1,1,1,1.04021,1,1,1,1,1,1,0.98965,1.00068,0.98965,1.00068,0.98965,1.00068,0.8287,0.96777,1,1.20088,0.89903,1,1,0.75155,1.03077,1.03077,1.03077,1.03077,1.13196,1.13196,1.13196,0.67428,0.67428,1.16039,0.73291,1.20996,1.22135,1.06483,0.94868,0.94868,0.95996,1.24633,1,1.07497,0.87796,0.96927,1.01518,0.96927,1,1,1,0.77295,1,1,1.10539,1.10539,1.11358,1.06967,0.86279,0.94434,0.86279,0.94434,0.86182,1,1,1.083,1,0.91578,0.86507,1.1714,1.18416,1.14589,0.69825,0.97622,1.9697,1.24822,1.24822,1.17238,1.24822,1.24822,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,0.99862,0.99862,1,0.87025,0.87025,0.87025,0.87025,1.18083,1.42603,1,1.42603,1.42603,0.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.10938,1.10938,1,1,1,1.05425,1.09971,1.09971,1.09971,1,1,1,1,1,1,1,1,1,1,1],hj={lineHeight:1.33008,lineGap:0},rj=R8(function(P){P["MyriadPro-Regular"]=P["PdfJS-Fallback-Regular"]={name:"LiberationSans-Regular",factors:yj,baseWidths:r6,baseMapping:l6,metrics:Dj},P["MyriadPro-Bold"]=P["PdfJS-Fallback-Bold"]={name:"LiberationSans-Bold",factors:vj,baseWidths:u6,baseMapping:g6,metrics:Fj},P["MyriadPro-It"]=P["MyriadPro-Italic"]=P["PdfJS-Fallback-Italic"]={name:"LiberationSans-Italic",factors:pj,baseWidths:s6,baseMapping:h6,metrics:Oj},P["MyriadPro-BoldIt"]=P["MyriadPro-BoldItalic"]=P["PdfJS-Fallback-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:Sj,baseWidths:d6,baseMapping:c6,metrics:mj},P.ArialMT=P.Arial=P["Arial-Regular"]={name:"LiberationSans-Regular",baseWidths:r6,baseMapping:l6},P["Arial-BoldMT"]=P["Arial-Bold"]={name:"LiberationSans-Bold",baseWidths:u6,baseMapping:g6},P["Arial-ItalicMT"]=P["Arial-Italic"]={name:"LiberationSans-Italic",baseWidths:s6,baseMapping:h6},P["Arial-BoldItalicMT"]=P["Arial-BoldItalic"]={name:"LiberationSans-BoldItalic",baseWidths:d6,baseMapping:c6},P["Calibri-Regular"]={name:"LiberationSans-Regular",factors:xj,baseWidths:r6,baseMapping:l6,metrics:Hj},P["Calibri-Bold"]={name:"LiberationSans-Bold",factors:Uj,baseWidths:u6,baseMapping:g6,metrics:Kj},P["Calibri-Italic"]={name:"LiberationSans-Italic",factors:jj,baseWidths:s6,baseMapping:h6,metrics:Vj},P["Calibri-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:Bj,baseWidths:d6,baseMapping:c6,metrics:Ij},P["Segoeui-Regular"]={name:"LiberationSans-Regular",factors:sj,baseWidths:r6,baseMapping:l6,metrics:hj},P["Segoeui-Bold"]={name:"LiberationSans-Bold",factors:wj,baseWidths:u6,baseMapping:g6,metrics:Ej},P["Segoeui-Italic"]={name:"LiberationSans-Italic",factors:dj,baseWidths:s6,baseMapping:h6,metrics:cj},P["Segoeui-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:uj,baseWidths:d6,baseMapping:c6,metrics:gj},P["Helvetica-Regular"]=P.Helvetica={name:"LiberationSans-Regular",factors:Tj,baseWidths:r6,baseMapping:l6,metrics:Nj},P["Helvetica-Bold"]={name:"LiberationSans-Bold",factors:Mj,baseWidths:u6,baseMapping:g6,metrics:Aj},P["Helvetica-Italic"]={name:"LiberationSans-Italic",factors:kj,baseWidths:s6,baseMapping:h6,metrics:Cj},P["Helvetica-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:Lj,baseWidths:d6,baseMapping:c6,metrics:bj}});r8={LBRACE:0,RBRACE:1,NUMBER:2,OPERATOR:3,IF:4,IFELSE:5};_Z=class _Z extends t4{set(P,Z=null,q){if(typeof P!="string")throw Error('LocalImageCache.set - expected "name" argument.');if(Z){if(this._imageCache.has(Z))return;return this._nameRefMap.set(P,Z),void this._imageCache.put(Z,q)}this._imageMap.has(P)||this._imageMap.set(P,q)}};Vq=class Vq extends t4{set(P=null,Z=null,q){if(typeof P!="string"&&!Z)throw Error('LocalColorSpaceCache.set - expected "name" and/or "ref" argument.');if(Z){if(this._imageCache.has(Z))return;return P!==null&&this._nameRefMap.set(P,Z),void this._imageCache.put(Z,q)}this._imageMap.has(P)||this._imageMap.set(P,q)}};yG=class yG extends t4{constructor(P){super({onlyRefs:!0})}set(P=null,Z,q){if(!Z)throw Error('LocalFunctionCache.set - expected "ref" argument.');this._imageCache.has(Z)||this._imageCache.put(Z,q)}};JZ=class JZ extends t4{set(P,Z=null,q){if(typeof P!="string")throw Error('LocalGStateCache.set - expected "name" argument.');if(Z){if(this._imageCache.has(Z))return;return this._nameRefMap.set(P,Z),void this._imageCache.put(Z,q)}this._imageMap.has(P)||this._imageMap.set(P,q)}};DG=class DG extends t4{constructor(P){super({onlyRefs:!0})}set(P=null,Z,q){if(!Z)throw Error('LocalTilingPatternCache.set - expected "ref" argument.');this._imageCache.has(Z)||this._imageCache.put(Z,q)}};wG=class wG extends t4{constructor(P){super({onlyRefs:!0})}set(P=null,Z,q){if(!Z)throw Error('RegionalImageCache.set - expected "ref" argument.');this._imageCache.has(Z)||this._imageCache.put(Z,q)}};EG=class EG extends t4{constructor(P){super({onlyRefs:!0})}set(P=null,Z,q){if(!Z)throw Error('GlobalColorSpaceCache.set - expected "ref" argument.');this._imageCache.has(Z)||this._imageCache.put(Z,q)}clear(){this._imageCache.clear()}};gG=class gG extends w5{constructor(P,Z,q){super("args"),this.index=P,this.min=Z,this.max=q}visit(P){P.visitArgument(this)}};r4=class r4 extends w5{constructor(P){super("literal"),this.number=P,this.min=P,this.max=P}visit(P){P.visitLiteral(this)}};GP=class GP extends w5{constructor(P,Z,q,X,z){super("binary"),this.op=P,this.arg1=Z,this.arg2=q,this.min=X,this.max=z}visit(P){P.visitBinaryOperation(this)}};dG=class dG extends w5{constructor(P,Z){super("max"),this.arg=P,this.min=P.min,this.max=Z}visit(P){P.visitMin(this)}};KZ=class KZ extends w5{constructor(P,Z,q){super("var"),this.index=P,this.min=Z,this.max=q}visit(P){P.visitVariable(this)}};BZ=class BZ extends w5{constructor(P,Z){super("definition"),this.variable=P,this.arg=Z}visit(P){P.visitVariableDefinition(this)}};ij=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],tj=["AN","AN","AN","AN","AN","AN","ON","ON","AL","ET","ET","AL","CS","AL","ON","ON","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","ON","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","ON","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL"];v4=[],c1=[];yz=class P{#P;#Z;#X;static strings=["fontFamily","fontWeight","italicAngle"];static write(Z){let q=new TextEncoder,X={},z=0;for(let Y of P.strings){let W=q.encode(Z[Y]);X[Y]=W,z+=4+W.length}let R=new ArrayBuffer(z),f=new Uint8Array(R),G=new DataView(R),Q=0;for(let Y of P.strings){let W=X[Y],$=W.length;G.setUint32(Q,$),f.set(W,Q+4),Q+=4+$}return t1(Q===R.byteLength,"CssFontInfo.write: Buffer overflow"),R}constructor(Z){this.#P=Z,this.#Z=new DataView(this.#P),this.#X=new TextDecoder}#q(Z){t1(Z<P.strings.length,"Invalid string index");let q=0;for(let z=0;z<Z;z++)q+=this.#Z.getUint32(q)+4;let X=this.#Z.getUint32(q);return this.#X.decode(new Uint8Array(this.#P,q+4,X))}get fontFamily(){return this.#q(0)}get fontWeight(){return this.#q(1)}get italicAngle(){return this.#q(2)}},Dz=class P{#P;#Z;#X;static strings=["css","loadedName","baseFontName","src"];static write(Z){let q=new TextEncoder,X={},z=0;for(let _ of P.strings){let J=q.encode(Z[_]);X[_]=J,z+=4+J.length}z+=4;let R,f,G=1+z;Z.style&&(R=q.encode(Z.style.style),f=q.encode(Z.style.weight),G+=4+R.length+4+f.length);let Q=new ArrayBuffer(G),Y=new Uint8Array(Q),W=new DataView(Q),$=0;W.setUint8($++,Z.guessFallback?1:0),W.setUint32($,0),$+=4,z=0;for(let _ of P.strings){let J=X[_],U=J.length;z+=4+U,W.setUint32($,U),Y.set(J,$+4),$+=4+U}return W.setUint32($-z-4,z),Z.style&&(W.setUint32($,R.length),Y.set(R,$+4),$+=4+R.length,W.setUint32($,f.length),Y.set(f,$+4),$+=4+f.length),t1($<=Q.byteLength,"SubstitionInfo.write: Buffer overflow"),Q.transferToFixedLength($)}constructor(Z){this.#P=Z,this.#Z=new DataView(this.#P),this.#X=new TextDecoder}get guessFallback(){return this.#Z.getUint8(0)!==0}#q(Z){t1(Z<P.strings.length,"Invalid string index");let q=5;for(let z=0;z<Z;z++)q+=this.#Z.getUint32(q)+4;let X=this.#Z.getUint32(q);return this.#X.decode(new Uint8Array(this.#P,q+4,X))}get css(){return this.#q(0)}get loadedName(){return this.#q(1)}get baseFontName(){return this.#q(2)}get src(){return this.#q(3)}get style(){let Z=1;Z+=4+this.#Z.getUint32(Z);let q=this.#Z.getUint32(Z),X=this.#X.decode(new Uint8Array(this.#P,Z+4,q));Z+=4+q;let z=this.#Z.getUint32(Z);return{style:X,weight:this.#X.decode(new Uint8Array(this.#P,Z+4,z))}}},ZV=class P{static bools=["black","bold","disableFontFace","fontExtraProperties","isInvalidPDFjsFont","isType3Font","italic","missingFile","remeasure","vertical"];static numbers=["ascent","defaultWidth","descent"];static strings=["fallbackName","loadedName","mimetype","name"];static#P=Math.ceil(2*this.bools.length/8);static#Z=this.#P+8*this.numbers.length;static#X=this.#Z+1+8;static#q=this.#X+1+48;static#z=this.#q+1+6;#R;#G;#f;constructor({data:Z,extra:q}){this.#R=Z,this.#G=new TextDecoder,this.#f=new DataView(this.#R),q&&Object.assign(this,q)}#Q(Z){t1(Z<P.bools.length,"Invalid boolean index");let q=Math.floor(Z/4),X=2*Z%8,z=this.#f.getUint8(q)>>X&3;return z===0?void 0:z===2}get black(){return this.#Q(0)}get bold(){return this.#Q(1)}get disableFontFace(){return this.#Q(2)}get fontExtraProperties(){return this.#Q(3)}get isInvalidPDFjsFont(){return this.#Q(4)}get isType3Font(){return this.#Q(5)}get italic(){return this.#Q(6)}get missingFile(){return this.#Q(7)}get remeasure(){return this.#Q(8)}get vertical(){return this.#Q(9)}#Y(Z){return t1(Z<P.numbers.length,"Invalid number index"),this.#f.getFloat64(P.#P+8*Z)}get ascent(){return this.#Y(0)}get defaultWidth(){return this.#Y(1)}get descent(){return this.#Y(2)}get bbox(){let Z=P.#Z;if(this.#f.getUint8(Z)===0)return;Z+=1;let q=[];for(let X=0;X<4;X++)q.push(this.#f.getInt16(Z,!0)),Z+=2;return q}get fontMatrix(){let Z=P.#X;if(this.#f.getUint8(Z)===0)return;Z+=1;let q=[];for(let X=0;X<6;X++)q.push(this.#f.getFloat64(Z,!0)),Z+=8;return q}get defaultVMetrics(){let Z=P.#q;if(this.#f.getUint8(Z)===0)return;Z+=1;let q=[];for(let X=0;X<3;X++)q.push(this.#f.getInt16(Z,!0)),Z+=2;return q}#_(Z){t1(Z<P.strings.length,"Invalid string index");let q=P.#z+4;for(let R=0;R<Z;R++)q+=this.#f.getUint32(q)+4;let X=this.#f.getUint32(q),z=new Uint8Array(X);return z.set(new Uint8Array(this.#R,q+4,X)),this.#G.decode(z)}get fallbackName(){return this.#_(0)}get loadedName(){return this.#_(1)}get mimetype(){return this.#_(2)}get name(){return this.#_(3)}get data(){let Z=P.#z;Z+=4+this.#f.getUint32(Z),Z+=4+this.#f.getUint32(Z),Z+=4+this.#f.getUint32(Z);let q=this.#f.getUint32(Z);if(q!==0)return new Uint8Array(this.#R,Z+4,q)}clearData(){let Z=P.#z;Z+=4+this.#f.getUint32(Z),Z+=4+this.#f.getUint32(Z),Z+=4+this.#f.getUint32(Z);let q=this.#f.getUint32(Z);new Uint8Array(this.#R,Z+4,q).fill(0),this.#f.setUint32(Z,0)}get cssFontInfo(){let Z=P.#z;Z+=4+this.#f.getUint32(Z),Z+=4+this.#f.getUint32(Z);let q=this.#f.getUint32(Z);if(q===0)return null;let X=new Uint8Array(q);return X.set(new Uint8Array(this.#R,Z+4,q)),new yz(X.buffer)}get systemFontInfo(){let Z=P.#z;Z+=4+this.#f.getUint32(Z);let q=this.#f.getUint32(Z);if(q===0)return null;let X=new Uint8Array(q);return X.set(new Uint8Array(this.#R,Z+4,q)),new Dz(X.buffer)}static write(Z){let q=Z.systemFontInfo?Dz.write(Z.systemFontInfo):null,X=Z.cssFontInfo?yz.write(Z.cssFontInfo):null,z=new TextEncoder,R={},f=0;for(let K of P.strings)R[K]=z.encode(Z[K]),f+=4+R[K].length;let G=P.#z+4+f+4+(q?q.byteLength:0)+4+(X?X.byteLength:0)+4+(Z.data?Z.data.length:0),Q=new ArrayBuffer(G),Y=new Uint8Array(Q),W=new DataView(Q),$=0,_=P.bools.length,J=0,U=0;for(let K=0;K<_;K++){let I=Z[P.bools[K]];J|=(I===void 0?0:I?2:1)<<U,U+=2,U!==8&&K!==_-1||(W.setUint8($++,J),J=0,U=0)}t1($===P.#P,"FontInfo.write: Boolean properties offset mismatch");for(let K of P.numbers)W.setFloat64($,Z[K]),$+=8;if(t1($===P.#Z,"FontInfo.write: Number properties offset mismatch"),Z.bbox){W.setUint8($++,4);for(let K of Z.bbox)W.setInt16($,K,!0),$+=2}else W.setUint8($++,0),$+=8;if(t1($===P.#X,"FontInfo.write: BBox properties offset mismatch"),Z.fontMatrix){W.setUint8($++,6);for(let K of Z.fontMatrix)W.setFloat64($,K,!0),$+=8}else W.setUint8($++,0),$+=48;if(t1($===P.#q,"FontInfo.write: FontMatrix properties offset mismatch"),Z.defaultVMetrics){W.setUint8($++,1);for(let K of Z.defaultVMetrics)W.setInt16($,K,!0),$+=2}else W.setUint8($++,0),$+=6;t1($===P.#z,"FontInfo.write: DefaultVMetrics properties offset mismatch"),W.setUint32(P.#z,0),$+=4;for(let K of P.strings){let I=R[K],B=I.length;W.setUint32($,B),Y.set(I,$+4),$+=4+B}if(W.setUint32(P.#z,$-P.#z-4),q){let K=q.byteLength;W.setUint32($,K),t1($+4+K<=Q.byteLength,"FontInfo.write: Buffer overflow at systemFontInfo"),Y.set(new Uint8Array(q),$+4),$+=4+K}else W.setUint32($,0),$+=4;if(X){let K=X.byteLength;W.setUint32($,K),t1($+4+K<=Q.byteLength,"FontInfo.write: Buffer overflow at cssFontInfo"),Y.set(new Uint8Array(X),$+4),$+=4+K}else W.setUint32($,0),$+=4;return Z.data===void 0?(W.setUint32($,0),$+=4):(W.setUint32($,Z.data.length),Y.set(Z.data,$+4),$+=4+Z.data.length),t1($<=Q.byteLength,"FontInfo.write: Buffer overflow"),Q.transferToFixedLength($)}},W5={style:"normal",weight:"normal"},U5={style:"normal",weight:"bold"},K5={style:"italic",weight:"normal"},B5={style:"italic",weight:"bold"},J7=new Map([["Times-Roman",{local:["Times New Roman","Times-Roman","Times","Liberation Serif","Nimbus Roman","Nimbus Roman L","Tinos","Thorndale","TeX Gyre Termes","FreeSerif","Linux Libertine O","Libertinus Serif","DejaVu Serif","Bitstream Vera Serif","Ubuntu"],style:W5,ultimate:"serif"}],["Times-Bold",{alias:"Times-Roman",style:U5,ultimate:"serif"}],["Times-Italic",{alias:"Times-Roman",style:K5,ultimate:"serif"}],["Times-BoldItalic",{alias:"Times-Roman",style:B5,ultimate:"serif"}],["Helvetica",{local:["Helvetica","Helvetica Neue","Arial","Arial Nova","Liberation Sans","Arimo","Nimbus Sans","Nimbus Sans L","A030","TeX Gyre Heros","FreeSans","DejaVu Sans","Albany","Bitstream Vera Sans","Arial Unicode MS","Microsoft Sans Serif","Apple Symbols","Cantarell"],path:"LiberationSans-Regular.ttf",style:W5,ultimate:"sans-serif"}],["Helvetica-Bold",{alias:"Helvetica",path:"LiberationSans-Bold.ttf",style:U5,ultimate:"sans-serif"}],["Helvetica-Oblique",{alias:"Helvetica",path:"LiberationSans-Italic.ttf",style:K5,ultimate:"sans-serif"}],["Helvetica-BoldOblique",{alias:"Helvetica",path:"LiberationSans-BoldItalic.ttf",style:B5,ultimate:"sans-serif"}],["Courier",{local:["Courier","Courier New","Liberation Mono","Nimbus Mono","Nimbus Mono L","Cousine","Cumberland","TeX Gyre Cursor","FreeMono","Linux Libertine Mono O","Libertinus Mono"],style:W5,ultimate:"monospace"}],["Courier-Bold",{alias:"Courier",style:U5,ultimate:"monospace"}],["Courier-Oblique",{alias:"Courier",style:K5,ultimate:"monospace"}],["Courier-BoldOblique",{alias:"Courier",style:B5,ultimate:"monospace"}],["ArialBlack",{local:["Arial Black"],style:{style:"normal",weight:"900"},fallback:"Helvetica-Bold"}],["ArialBlack-Bold",{alias:"ArialBlack"}],["ArialBlack-Italic",{alias:"ArialBlack",style:{style:"italic",weight:"900"},fallback:"Helvetica-BoldOblique"}],["ArialBlack-BoldItalic",{alias:"ArialBlack-Italic"}],["ArialNarrow",{local:["Arial Narrow","Liberation Sans Narrow","Helvetica Condensed","Nimbus Sans Narrow","TeX Gyre Heros Cn"],style:W5,fallback:"Helvetica"}],["ArialNarrow-Bold",{alias:"ArialNarrow",style:U5,fallback:"Helvetica-Bold"}],["ArialNarrow-Italic",{alias:"ArialNarrow",style:K5,fallback:"Helvetica-Oblique"}],["ArialNarrow-BoldItalic",{alias:"ArialNarrow",style:B5,fallback:"Helvetica-BoldOblique"}],["Calibri",{local:["Calibri","Carlito"],style:W5,fallback:"Helvetica"}],["Calibri-Bold",{alias:"Calibri",style:U5,fallback:"Helvetica-Bold"}],["Calibri-Italic",{alias:"Calibri",style:K5,fallback:"Helvetica-Oblique"}],["Calibri-BoldItalic",{alias:"Calibri",style:B5,fallback:"Helvetica-BoldOblique"}],["Wingdings",{local:["Wingdings","URW Dingbats"],style:W5}],["Wingdings-Regular",{alias:"Wingdings"}],["Wingdings-Bold",{alias:"Wingdings"}]]),qV=new Map([["Arial-Black","ArialBlack"]]);zV=Object.freeze({maxImageSize:-1,disableFontFace:!1,ignoreErrors:!1,isEvalSupported:!0,isOffscreenCanvasSupported:!1,isImageDecoderSupported:!1,canvasMaxAreaInBytes:-1,fontExtraProperties:!1,useSystemFonts:!0,useWasm:!0,useWorkerFetch:!0,cMapUrl:null,iccUrl:null,standardFontDataUrl:null,wasmUrl:null}),dz=Promise.resolve();lG=class lG extends l4{constructor(P){super(new o8(P))}parse(){let P={fn:0,args:[]},Z={fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3)};try{for(;P.args.length=0,this.read(P);){if(this.savedStatesDepth!==0)continue;let{fn:q,args:X}=P;switch(0|q){case h4:let[z,R]=X;z instanceof t&&(Z.fontName=z.name),typeof R=="number"&&R>0&&(Z.fontSize=R);break;case n0:g1.rgb.getRgbItem(X,0,Z.fontColor,0);break;case a7:g1.gray.getRgbItem(X,0,Z.fontColor,0);break;case n7:g1.cmyk.getRgbItem(X,0,Z.fontColor,0)}}}catch(q){v(`parseDefaultAppearance - ignoring errors: "${q}".`)}return Z}};oG=class oG extends l4{constructor(P,Z,q,X){super(P),this.stream=P,this.evaluatorOptions=Z,this.xref=q,this.globalColorSpaceCache=X,this.resources=P.dict?.get("Resources")}parse(){let P={fn:0,args:[]},Z={scaleFactor:1,fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3),fillColorSpace:g1.gray},q=!1,X=[];try{for(;P.args.length=0,!q&&this.read(P);){let{fn:z,args:R}=P;switch(0|z){case O0:X.push({scaleFactor:Z.scaleFactor,fontSize:Z.fontSize,fontName:Z.fontName,fontColor:Z.fontColor.slice(),fillColorSpace:Z.fillColorSpace});break;case Q0:Z=X.pop()||Z;break;case S5:Z.scaleFactor*=Math.hypot(R[0],R[1]);break;case h4:let[f,G]=R;f instanceof t&&(Z.fontName=f.name),typeof G=="number"&&G>0&&(Z.fontSize=G*Z.scaleFactor);break;case PP:Z.fillColorSpace=g1.parse({cs:R[0],xref:this.xref,resources:this.resources,pdfFunctionFactory:this._pdfFunctionFactory,globalColorSpaceCache:this.globalColorSpaceCache,localColorSpaceCache:this._localColorSpaceCache});break;case ZP:Z.fillColorSpace.getRgbItem(R,0,Z.fontColor,0);break;case n0:g1.rgb.getRgbItem(R,0,Z.fontColor,0);break;case a7:g1.gray.getRgbItem(R,0,Z.fontColor,0);break;case n7:g1.cmyk.getRgbItem(R,0,Z.fontColor,0);break;case B4:case W3:case $3:case _3:q=!0}}}catch(z){v(`parseAppearanceStream - ignoring errors: "${z}".`)}return this.stream.reset(),delete Z.scaleFactor,delete Z.fillColorSpace,Z}get _localColorSpaceCache(){return q1(this,"_localColorSpaceCache",new Vq)}get _pdfFunctionFactory(){return q1(this,"_pdfFunctionFactory",new xq({xref:this.xref,isEvalSupported:this.evaluatorOptions.isEvalSupported}))}};GV=["m/d","m/d/yy","mm/dd/yy","mm/yy","d-mmm","d-mmm-yy","dd-mmm-yy","yy-mm-dd","mmm-yy","mmmm-yy","mmm d, yyyy","mmmm d, yyyy","m/d/yy h:MM tt","m/d/yy HH:MM"],QV=["HH:MM","h:MM tt","HH:MM:ss","h:MM:ss tt"];$5=class $5 extends Aq{constructor(P,Z){super(P,Z,"Names")}};w7=class w7 extends Aq{constructor(P,Z){super(P,Z,"Nums")}};P2=class P2 extends bq{constructor({hasAttributes:P=!1,lowerCaseName:Z=!1}){super(),this._currentFragment=null,this._stack=null,this._errorCode=K7,this._hasAttributes=P,this._lowerCaseName=Z}parseFromString(P){if(this._currentFragment=[],this._stack=[],this._errorCode=K7,this.parseXml(P),this._errorCode!==K7)return;let[Z]=this._currentFragment;return Z?{documentElement:Z}:void 0}onText(P){if(function(q){for(let X=0,z=q.length;X<z;X++)if(!a5(q,X))return!1;return!0}(P))return;let Z=new _6("#text",P);this._currentFragment.push(Z)}onCdata(P){let Z=new _6("#text",P);this._currentFragment.push(Z)}onBeginElement(P,Z,q){this._lowerCaseName&&(P=P.toLowerCase());let X=new _6(P);X.childNodes=[],this._hasAttributes&&(X.attributes=Z),this._currentFragment.push(X),q||(this._stack.push(this._currentFragment),this._currentFragment=X.childNodes)}onEndElement(P){this._currentFragment=this._stack.pop()||[];let Z=this._currentFragment.at(-1);if(!Z)return null;for(let q of Z.childNodes)q.parentNode=Z;return Z}onError(P){this._errorCode=P}};v3=function(P,Z,q){if(!Array.isArray(q)||q.length<2)return!1;let[X,z,...R]=q;if(!P(X)&&!Number.isInteger(X))return!1;if(!Z(z))return!1;let f=R.length,G=!0;switch(z.name){case"XYZ":if(f<2||f>3)return!1;break;case"Fit":case"FitB":return f===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(f>1)return!1;break;case"FitR":if(f!==4)return!1;G=!1;break;default:return!1}for(let Q of R)if(!(typeof Q=="number"||G&&Q===null))return!1;return!0}.bind(null,(P)=>P instanceof f1,G8);QP=Symbol(),k5=Symbol(),Q8=Symbol(),a4=Symbol(),F0=Symbol(),X6=Symbol(),a2=Symbol(),D0=Symbol(),e0=Symbol(),a=Symbol("content"),v0=Symbol("data"),A6=Symbol(),u=Symbol("extra"),P8=Symbol(),Z2=Symbol(),HZ=Symbol(),PQ=Symbol(),C5=Symbol(),YP=Symbol(),E7=Symbol(),B7=Symbol(),Cq=Symbol(),u8=Symbol(),I7=Symbol(),S8=Symbol(),L6=Symbol(),K4=Symbol(),I8=Symbol(),L1=Symbol(),K8=Symbol(),e1=Symbol(),u7=Symbol(),n5=Symbol(),MZ=Symbol(),n2=Symbol(),Tq=Symbol(),E5=Symbol(),z6=Symbol(),E4=Symbol(),j7=Symbol(),L4=Symbol(),C4=Symbol(),g7=Symbol(),d7=Symbol(),UV=Symbol(),B8=Symbol("namespaceId"),d1=Symbol("nodeName"),j5=Symbol(),q4=Symbol(),AZ=Symbol(),b4=Symbol(),R4=Symbol(),Y0=Symbol(),F6=Symbol(),s4=Symbol(),ZQ=Symbol("root"),R7=Symbol(),H4=Symbol(),LZ=Symbol(),qQ=Symbol(),$0=Symbol(),y0=Symbol(),A8=Symbol(),XQ=Symbol(),x1=Symbol(),V7=Symbol(),u1=Symbol(),a1=Symbol("uid"),g0=Symbol(),j8={config:{id:0,check:(P)=>P.startsWith("http://www.xfa.org/schema/xci/")},connectionSet:{id:1,check:(P)=>P.startsWith("http://www.xfa.org/schema/xfa-connection-set/")},datasets:{id:2,check:(P)=>P.startsWith("http://www.xfa.org/schema/xfa-data/")},form:{id:3,check:(P)=>P.startsWith("http://www.xfa.org/schema/xfa-form/")},localeSet:{id:4,check:(P)=>P.startsWith("http://www.xfa.org/schema/xfa-locale-set/")},pdf:{id:5,check:(P)=>P==="http://ns.adobe.com/xdp/pdf/"},signature:{id:6,check:(P)=>P==="http://www.w3.org/2000/09/xmldsig#"},sourceSet:{id:7,check:(P)=>P.startsWith("http://www.xfa.org/schema/xfa-source-set/")},stylesheet:{id:8,check:(P)=>P==="http://www.w3.org/1999/XSL/Transform"},template:{id:9,check:(P)=>P.startsWith("http://www.xfa.org/schema/xfa-template/")},xdc:{id:10,check:(P)=>P.startsWith("http://www.xfa.org/schema/xdc/")},xdp:{id:11,check:(P)=>P==="http://ns.adobe.com/xdp/"},xfdf:{id:12,check:(P)=>P==="http://ns.adobe.com/xfdf/"},xhtml:{id:13,check:(P)=>P==="http://www.w3.org/1999/xhtml"},xmpmeta:{id:14,check:(P)=>P==="http://ns.adobe.com/xmpmeta/"}},KV={pt:(P)=>P,cm:(P)=>P/2.54*72,mm:(P)=>P/25.4*72,in:(P)=>72*P,px:(P)=>P},BV=/([+-]?\d+\.?\d*)(.*)/;az=/^[^.[]+/,IV=/^[^\]]+/,GQ=new Map([["$data",(P,Z)=>P.datasets?P.datasets.data:P],["$record",(P,Z)=>(P.datasets?P.datasets.data:P)[S8]()[0]],["$template",(P,Z)=>P.template],["$connectionSet",(P,Z)=>P.connectionSet],["$form",(P,Z)=>P.form],["$layout",(P,Z)=>P.layout],["$host",(P,Z)=>P.host],["$dataWindow",(P,Z)=>P.dataWindow],["$event",(P,Z)=>P.event],["!",(P,Z)=>P.datasets],["$xfa",(P,Z)=>P],["xfa",(P,Z)=>P],["$",(P,Z)=>Z]]),nz=new WeakMap;T2=Symbol(),G5=Symbol(),r5=Symbol(),N1=Symbol("_children"),f9=Symbol(),S4=Symbol(),G9=Symbol(),iz=Symbol(),Q9=Symbol(),tz=Symbol(),Y9=Symbol(),f7=Symbol(),N2=Symbol(),C0=Symbol("parent"),o6=Symbol(),a6=Symbol(),W9=Symbol(),YQ=j8.datasets.id;g=class g{constructor(P,Z,q=!1){this[B8]=P,this[d1]=Z,this[Y9]=q,this[C0]=null,this[N1]=[],this[a1]=`${Z}${kZ++}`,this[e1]=null}get isXFAObject(){return!0}get isXFAObjectArray(){return!1}createNodes(P){let Z=this,q=null;for(let{name:X,index:z}of P){for(let R=0,f=isFinite(z)?z:0;R<=f;R++){let G=Z[B8]===YQ?-1:Z[B8];q=new X4(G,X),Z[Q8](q)}Z=q}return q}[q4](P){if(!this[Y9]||!this[AZ](P))return!1;let Z=P[d1],q=this[Z];if(!(q instanceof T))return q!==null&&this[s4](q),this[Z]=P,this[Q8](P),!0;if(q.push(P))return this[Q8](P),!0;let X="";return this.id?X=` (id: ${this.id})`:this.name&&(X=` (name: ${this.name} ${this.h.value})`),v(`XFA - node "${this[d1]}"${X} has already enough "${Z}"!`),!1}[AZ](P){return this.hasOwnProperty(P[d1])&&P[B8]===this[B8]}[j7](){return!1}[QP](){return!1}[Tq](){return!1}[E5](){return!1}[Y0](){this.para&&this[K8]()[u].paraStack.pop()}[F6](){this[K8]()[u].paraStack.push(this.para)}[LZ](P){this.id&&this[B8]===j8.template.id&&P.set(this.id,this)}[K8](){return this[e1].template}[L4](){return!1}[C4](){return!1}[Q8](P){P[C0]=this,this[N1].push(P),!P[e1]&&this[e1]&&(P[e1]=this[e1])}[s4](P){let Z=this[N1].indexOf(P);this[N1].splice(Z,1)}[u7](){return this.hasOwnProperty("value")}[$0](P){}[b4](P){}[P8](){}[F0](P){delete this[Y9],this[a2]&&(P.clean(this[a2]),delete this[a2])}[MZ](P){return this[N1].indexOf(P)}[n2](P,Z){Z[C0]=this,this[N1].splice(P,0,Z),!Z[e1]&&this[e1]&&(Z[e1]=this[e1])}[g7](){return!this.name}[UV](){return""}[A8](){return this[N1].length===0?this[a]:this[N1].map((P)=>P[A8]()).join("")}get[r5](){let P=Object.getPrototypeOf(this);if(!P._attributes){let Z=P._attributes=new Set;for(let q of Object.getOwnPropertyNames(this)){if(this[q]===null||this[q]instanceof g||this[q]instanceof T)break;Z.add(q)}}return q1(this,r5,P._attributes)}[E4](P){let Z=this;for(;Z;){if(Z===P)return!0;Z=Z[L1]()}return!1}[L1](){return this[C0]}[I8](){return this[L1]()}[S8](P=null){return P?this[P]:this[N1]}[A6](){let P=Object.create(null);this[a]&&(P.$content=this[a]);for(let Z of Object.getOwnPropertyNames(this)){let q=this[Z];q!==null&&(q instanceof g?P[Z]=q[A6]():q instanceof T?q.isEmpty()||(P[Z]=q.dump()):P[Z]=q)}return P}[u1](){return null}[x1](){return K1.EMPTY}*[L6](){for(let P of this[S8]())yield P}*[iz](P,Z){for(let q of this[L6]())if(!P||Z===P.has(q[d1])){let X=this[C5](),z=q[x1](X);z.success||(this[u].failingNode=q),yield z}}[Z2](){return null}[k5](P,Z){this[u].children.push(P)}[C5](){}[a4]({filter:P=null,include:Z=!0}){if(this[u].generator){let q=this[C5](),X=this[u].failingNode[x1](q);if(!X.success)return X;X.html&&this[k5](X.html,X.bbox),delete this[u].failingNode}else this[u].generator=this[iz](P,Z);for(;;){let q=this[u].generator.next();if(q.done)break;let X=q.value;if(!X.success)return X;X.html&&this[k5](X.html,X.bbox)}return this[u].generator=null,K1.EMPTY}[qQ](P){this[a6]=new Set(Object.keys(P))}[tz](P){let Z=this[r5],q=this[a6];return[...P].filter((X)=>Z.has(X)&&!q.has(X))}[R7](P,Z=new Set){for(let q of this[N1])q[o6](P,Z)}[o6](P,Z){let q=this[Q9](P,Z);q?this[T2](q,P,Z):this[R7](P,Z)}[Q9](P,Z){let{use:q,usehref:X}=this;if(!q&&!X)return null;let z=null,R=null,f=null,G=q;if(X?(G=X,X.startsWith("#som(")&&X.endsWith(")")?R=X.slice(5,-1):X.startsWith(".#som(")&&X.endsWith(")")?R=X.slice(6,-1):X.startsWith("#")?f=X.slice(1):X.startsWith(".#")&&(f=X.slice(2))):q.startsWith("#")?f=q.slice(1):R=q,this.use=this.usehref="",f?z=P.get(f):(z=D4(P.get(ZQ),this,R,!0,!1),z&&(z=z[0])),!z)return v(`XFA - Invalid prototype reference: ${G}.`),null;if(z[d1]!==this[d1])return v(`XFA - Incompatible prototype: ${z[d1]} !== ${this[d1]}.`),null;if(Z.has(z))return v("XFA - Cycle detected in prototypes use."),null;Z.add(z);let Q=z[Q9](P,Z);return Q&&z[T2](Q,P,Z),z[R7](P,Z),Z.delete(z),z}[T2](P,Z,q){if(q.has(P))return void v("XFA - Cycle detected in prototypes use.");!this[a]&&P[a]&&(this[a]=P[a]),new Set(q).add(P);for(let X of this[tz](P[a6]))this[X]=P[X],this[a6]&&this[a6].add(X);for(let X of Object.getOwnPropertyNames(this)){if(this[r5].has(X))continue;let z=this[X],R=P[X];if(z instanceof T){for(let f of z[N1])f[o6](Z,q);for(let f=z[N1].length,G=R[N1].length;f<G;f++){let Q=P[N1][f][D0]();if(!z.push(Q))break;Q[C0]=this,this[N1].push(Q),Q[o6](Z,q)}}else if(z===null){if(R!==null){let f=R[D0]();f[C0]=this,this[X]=f,this[N1].push(f),f[o6](Z,q)}}else z[R7](Z,q),R&&z[T2](R,Z,q)}}static[f9](P){return Array.isArray(P)?P.map((Z)=>g[f9](Z)):typeof P=="object"&&P!==null?Object.assign({},P):P}[D0](){let P=Object.create(Object.getPrototypeOf(this));for(let Z of Object.getOwnPropertySymbols(this))try{P[Z]=this[Z]}catch{q1(P,Z,this[Z])}P[a1]=`${P[d1]}${kZ++}`,P[N1]=[];for(let Z of Object.getOwnPropertyNames(this)){if(this[r5].has(Z)){P[Z]=g[f9](this[Z]);continue}let q=this[Z];P[Z]=q instanceof T?new T(q[f7]):null}for(let Z of this[N1]){let q=Z[d1],X=Z[D0]();P[N1].push(X),X[C0]=P,P[q]===null?P[q]=X:P[q][N1].push(X)}return P}[S8](P=null){return P?this[N1].filter((Z)=>Z[d1]===P):this[N1]}[YP](P){return this[P]}[E7](P,Z,q=!0){return Array.from(this[B7](P,Z,q))}*[B7](P,Z,q=!0){if(P!=="parent"){for(let X of this[N1])X[d1]===P&&(yield X),X.name===P&&(yield X),(Z||X[g7]())&&(yield*X[B7](P,Z,!1));q&&this[r5].has(P)&&(yield new _P(this,P,this[P]))}else yield this[C0]}};T=class T{constructor(P=1/0){this[f7]=P,this[N1]=[]}get isXFAObject(){return!1}get isXFAObjectArray(){return!0}push(P){return this[N1].length<=this[f7]?(this[N1].push(P),!0):(v(`XFA - node "${P[d1]}" accepts no more than ${this[f7]} children`),!1)}isEmpty(){return this[N1].length===0}dump(){return this[N1].length===1?this[N1][0][A6]():this[N1].map((P)=>P[A6]())}[D0](){let P=new T(this[f7]);return P[N1]=this[N1].map((Z)=>Z[D0]()),P}get children(){return this[N1]}clear(){this[N1].length=0}};_P=class _P{constructor(P,Z,q){this[C0]=P,this[d1]=Z,this[a]=q,this[e0]=!1,this[a1]="attribute"+kZ++}[L1](){return this[C0]}[z6](){return!0}[Cq](){return this[a].trim()}[$0](P){P=P.value||"",this[a]=P.toString()}[A8](){return this[a]}[E4](P){return this[C0]===P||this[C0][E4](P)}};X4=class X4 extends g{constructor(P,Z,q={}){if(super(P,Z),this[a]="",this[S4]=null,Z!=="#text"){let X=new Map;this[G5]=X;for(let[z,R]of Object.entries(q))X.set(z,new _P(this,z,R));if(q.hasOwnProperty(j5)){let z=q[j5].xfa.dataNode;z!==void 0&&(z==="dataGroup"?this[S4]=!1:z==="dataValue"&&(this[S4]=!0))}}this[e0]=!1}[V7](P){let Z=this[d1];if(Z==="#text")return void P.push(W6(this[a]));let q=E9(Z),X=this[B8]===YQ?"xfa:":"";P.push(`<${X}${q}`);for(let[z,R]of this[G5].entries()){let f=E9(z);P.push(` ${f}="${W6(R[a])}"`)}if(this[S4]!==null&&(this[S4]?P.push(' xfa:dataNode="dataValue"'):P.push(' xfa:dataNode="dataGroup"')),this[a]||this[N1].length!==0){if(P.push(">"),this[a])typeof this[a]=="string"?P.push(W6(this[a])):this[a][V7](P);else for(let z of this[N1])z[V7](P);P.push(`</${X}${q}>`)}else P.push("/>")}[q4](P){if(this[a]){let Z=new X4(this[B8],"#text");this[Q8](Z),Z[a]=this[a],this[a]=""}return this[Q8](P),!0}[b4](P){this[a]+=P}[P8](){if(this[a]&&this[N1].length>0){let P=new X4(this[B8],"#text");this[Q8](P),P[a]=this[a],delete this[a]}}[x1](){return this[d1]==="#text"?K1.success({name:"#text",value:this[a]}):K1.EMPTY}[S8](P=null){return P?this[N1].filter((Z)=>Z[d1]===P):this[N1]}[PQ](){return this[G5]}[YP](P){let Z=this[G5].get(P);return Z!==void 0?Z:this[S8](P)}*[B7](P,Z){let q=this[G5].get(P);q&&(yield q);for(let X of this[N1])X[d1]===P&&(yield X),Z&&(yield*X[B7](P,Z))}*[HZ](P,Z){let q=this[G5].get(P);!q||Z&&q[e0]||(yield q);for(let X of this[N1])yield*X[HZ](P,Z)}*[I7](P,Z,q){for(let X of this[N1])X[d1]!==P||q&&X[e0]||(yield X),Z&&(yield*X[I7](P,Z,q))}[z6](){return this[S4]===null?this[N1].length===0||this[N1][0][B8]===j8.xhtml.id:this[S4]}[Cq](){return this[S4]===null?this[N1].length===0?this[a].trim():this[N1][0][B8]===j8.xhtml.id?this[N1][0][A8]().trim():null:this[a].trim()}[$0](P){P=P.value||"",this[a]=P.toString()}[A6](P=!1){let Z=Object.create(null);P&&(Z.$ns=this[B8]),this[a]&&(Z.$content=this[a]),Z.$name=this[d1],Z.children=[];for(let q of this[N1])Z.children.push(q[A6](P));Z.attributes=Object.create(null);for(let[q,X]of this[G5])Z.attributes[q]=X[a];return Z}};f8=class f8 extends g{constructor(P,Z){super(P,Z),this[a]=""}[b4](P){this[a]+=P}[P8](){}};r1=class r1 extends f8{constructor(P,Z,q){super(P,Z),this[N2]=q}[P8](){this[a]=$P({data:this[a],defaultValue:this[N2][0],validate:(P)=>this[N2].includes(P)})}[F0](P){super[F0](P),delete this[N2]}};F1=class F1 extends f8{[P8](){this[a]=this[a].trim()}};S0=class S0 extends f8{constructor(P,Z,q,X){super(P,Z),this[G9]=q,this[W9]=X}[P8](){this[a]=A1({data:this[a],defaultValue:this[G9],validate:this[W9]})}[F0](P){super[F0](P),delete this[G9],delete this[W9]}};M8=class M8 extends S0{constructor(P,Z){super(P,Z,0,(q)=>q===1)}};Fq=class Fq extends S0{constructor(P,Z){super(P,Z,1,(q)=>q===0)}};ez={anchorType(P,Z){let q=P[I8]();if(q&&(!q.layout||q.layout==="position"))switch("transform"in Z||(Z.transform=""),P.anchorType){case"bottomCenter":Z.transform+="translate(-50%, -100%)";break;case"bottomLeft":Z.transform+="translate(0,-100%)";break;case"bottomRight":Z.transform+="translate(-100%,-100%)";break;case"middleCenter":Z.transform+="translate(-50%,-50%)";break;case"middleLeft":Z.transform+="translate(0,-50%)";break;case"middleRight":Z.transform+="translate(-100%,-50%)";break;case"topCenter":Z.transform+="translate(-50%,0)";break;case"topRight":Z.transform+="translate(-100%,0)"}},dimensions(P,Z){let q=P[I8](),X=P.w,z=P.h;if(q.layout?.includes("row")){let R=q[u],f=P.colSpan,G;f===-1?(G=Math.sumPrecise(R.columnWidths.slice(R.currentColumn)),R.currentColumn=0):(G=Math.sumPrecise(R.columnWidths.slice(R.currentColumn,R.currentColumn+f)),R.currentColumn=(R.currentColumn+P.colSpan)%R.columnWidths.length),isNaN(G)||(X=P.w=G)}Z.width=X!==""?M1(X):"auto",Z.height=z!==""?M1(z):"auto"},position(P,Z){let q=P[I8]();q?.layout&&q.layout!=="position"||(Z.position="absolute",Z.left=M1(P.x),Z.top=M1(P.y))},rotate(P,Z){P.rotate&&(("transform"in Z)||(Z.transform=""),Z.transform+=`rotate(-${P.rotate}deg)`,Z.transformOrigin="top left")},presence(P,Z){switch(P.presence){case"invisible":Z.visibility="hidden";break;case"hidden":case"inactive":Z.display="none"}},hAlign(P,Z){if(P[d1]==="para")switch(P.hAlign){case"justifyAll":Z.textAlign="justify-all";break;case"radix":Z.textAlign="left";break;default:Z.textAlign=P.hAlign}else switch(P.hAlign){case"left":Z.alignSelf="start";break;case"center":Z.alignSelf="center";break;case"right":Z.alignSelf="end"}},margin(P,Z){P.margin&&(Z.margin=P.margin[u1]().margin)}};X1=j8.template.id,MV=/^H(\d+)$/,AV=new Set(["image/gif","image/jpeg","image/jpg","image/pjpeg","image/png","image/apng","image/x-png","image/bmp","image/x-ms-bmp","image/tiff","image/tif","application/octet-stream"]),LV=[[[66,77],"image/bmp"],[[255,216,255],"image/jpeg"],[[73,73,42,0],"image/tiff"],[[77,77,0,42],"image/tiff"],[[71,73,70,56,57,97],"image/gif"],[[137,80,78,71,13,10,26,10],"image/png"]];MQ=class MQ extends F1{constructor(P){super(X1,"appearanceFilter"),this.id=P.id||"",this.type=i(P.type,["optional","required"]),this.use=P.use||"",this.usehref=P.usehref||""}};Dq=class Dq extends g{constructor(P){super(X1,"arc",!0),this.circular=A1({data:P.circular,defaultValue:0,validate:(Z)=>Z===1}),this.hand=i(P.hand,["even","left","right"]),this.id=P.id||"",this.startAngle=F3({data:P.startAngle,defaultValue:0,validate:(Z)=>!0}),this.sweepAngle=F3({data:P.sweepAngle,defaultValue:360,validate:(Z)=>!0}),this.use=P.use||"",this.usehref=P.usehref||"",this.edge=null,this.fill=null}[x1](){let P=this.edge||new m6({}),Z=P[u1](),q=Object.create(null),X;this.fill?.presence==="visible"?Object.assign(q,this.fill[u1]()):q.fill="transparent",q.strokeWidth=M1(P.presence==="visible"?P.thickness:0),q.stroke=Z.color;let z={xmlns:N5,style:{width:"100%",height:"100%",overflow:"visible"}};if(this.sweepAngle===360)X={name:"ellipse",attributes:{xmlns:N5,cx:"50%",cy:"50%",rx:"50%",ry:"50%",style:q}};else{let f=this.startAngle*Math.PI/180,G=this.sweepAngle*Math.PI/180,Q=this.sweepAngle>180?1:0,[Y,W,$,_]=[50*(1+Math.cos(f)),50*(1-Math.sin(f)),50*(1+Math.cos(f+G)),50*(1-Math.sin(f+G))];X={name:"path",attributes:{xmlns:N5,d:`M ${Y} ${W} A 50 50 0 ${Q} 0 ${$} ${_}`,vectorEffect:"non-scaling-stroke",style:q}},Object.assign(z,{viewBox:"0 0 100 100",preserveAspectRatio:"none"})}let R={name:"svg",children:[X],attributes:z};return pq(this[L1]()[L1]())?K1.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[R]}):(R.attributes.style.position="absolute",K1.success(R))}};AQ=class AQ extends g{constructor(P){super(X1,"area",!0),this.colSpan=A1({data:P.colSpan,defaultValue:1,validate:(Z)=>Z>=1||Z===-1}),this.id=P.id||"",this.name=P.name||"",this.relevant=d0(P.relevant),this.use=P.use||"",this.usehref=P.usehref||"",this.x=$1(P.x,"0pt"),this.y=$1(P.y,"0pt"),this.desc=null,this.extras=null,this.area=new T,this.draw=new T,this.exObject=new T,this.exclGroup=new T,this.field=new T,this.subform=new T,this.subformSet=new T}*[L6](){yield*yq(this)}[g7](){return!0}[E5](){return!0}[k5](P,Z){let[q,X,z,R]=Z;this[u].width=Math.max(this[u].width,q+z),this[u].height=Math.max(this[u].height,X+R),this[u].children.push(P)}[C5](){return this[u].availableSpace}[x1](P){let Z=q0(this,"position"),q={style:Z,id:this[a1],class:["xfaArea"]};S6(this)&&q.class.push("xfaPrintOnly"),this.name&&(q.xfaName=this.name);let X=[];this[u]={children:X,width:0,height:0,availableSpace:P};let z=this[a4]({filter:new Set(["area","draw","field","exclGroup","subform","subformSet"]),include:!0});if(!z.success)return z.isBreak()?z:(delete this[u],K1.FAILURE);Z.width=M1(this[u].width),Z.height=M1(this[u].height);let R={name:"div",attributes:q,children:X},f=[this.x,this.y,this[u].width,this[u].height];return delete this[u],K1.success(R,f)}};LQ=class LQ extends g{constructor(P){super(X1,"assist",!0),this.id=P.id||"",this.role=P.role||"",this.use=P.use||"",this.usehref=P.usehref||"",this.speak=null,this.toolTip=null}[x1](){return this.toolTip?.[a]||null}};bQ=class bQ extends g{constructor(P){super(X1,"barcode",!0),this.charEncoding=$P({data:P.charEncoding?P.charEncoding.toLowerCase():"",defaultValue:"",validate:(Z)=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(Z)||Z.match(/iso-8859-\d{2}/)}),this.checksum=i(P.checksum,["none","1mod10","1mod10_1mod11","2mod10","auto"]),this.dataColumnCount=A1({data:P.dataColumnCount,defaultValue:-1,validate:(Z)=>Z>=0}),this.dataLength=A1({data:P.dataLength,defaultValue:-1,validate:(Z)=>Z>=0}),this.dataPrep=i(P.dataPrep,["none","flateCompress"]),this.dataRowCount=A1({data:P.dataRowCount,defaultValue:-1,validate:(Z)=>Z>=0}),this.endChar=P.endChar||"",this.errorCorrectionLevel=A1({data:P.errorCorrectionLevel,defaultValue:-1,validate:(Z)=>Z>=0&&Z<=8}),this.id=P.id||"",this.moduleHeight=$1(P.moduleHeight,"5mm"),this.moduleWidth=$1(P.moduleWidth,"0.25mm"),this.printCheckDigit=A1({data:P.printCheckDigit,defaultValue:0,validate:(Z)=>Z===1}),this.rowColumnRatio=oz(P.rowColumnRatio),this.startChar=P.startChar||"",this.textLocation=i(P.textLocation,["below","above","aboveEmbedded","belowEmbedded","none"]),this.truncate=A1({data:P.truncate,defaultValue:0,validate:(Z)=>Z===1}),this.type=i(P.type?P.type.toLowerCase():"",["aztec","codabar","code2of5industrial","code2of5interleaved","code2of5matrix","code2of5standard","code3of9","code3of9extended","code11","code49","code93","code128","code128a","code128b","code128c","code128sscc","datamatrix","ean8","ean8add2","ean8add5","ean13","ean13add2","ean13add5","ean13pwcd","fim","logmars","maxicode","msi","pdf417","pdf417macro","plessey","postauscust2","postauscust3","postausreplypaid","postausstandard","postukrm4scc","postusdpbc","postusimb","postusstandard","postus5zip","qrcode","rfid","rss14","rss14expanded","rss14limited","rss14stacked","rss14stackedomni","rss14truncated","telepen","ucc128","ucc128random","ucc128sscc","upca","upcaadd2","upcaadd5","upcapwcd","upce","upceadd2","upceadd5","upcean2","upcean5","upsmaxicode"]),this.upsMode=i(P.upsMode,["usCarrier","internationalCarrier","secureSymbol","standardSymbol"]),this.use=P.use||"",this.usehref=P.usehref||"",this.wideNarrowRatio=oz(P.wideNarrowRatio),this.encrypt=null,this.extras=null}};kQ=class kQ extends g{constructor(P){super(X1,"bind",!0),this.match=i(P.match,["once","dataRef","global","none"]),this.ref=P.ref||"",this.picture=null}};p3=class p3 extends g{constructor(P){super(X1,"bindItems"),this.connection=P.connection||"",this.labelRef=P.labelRef||"",this.ref=P.ref||"",this.valueRef=P.valueRef||""}};CQ=class CQ extends g{constructor(P){super(X1,"bookend"),this.id=P.id||"",this.leader=P.leader||"",this.trailer=P.trailer||"",this.use=P.use||"",this.usehref=P.usehref||""}};TQ=class TQ extends M8{constructor(P){super(X1,"boolean"),this.id=P.id||"",this.name=P.name||"",this.use=P.use||"",this.usehref=P.usehref||""}[x1](P){return e4(this[a]===1?"1":"0")}};wq=class wq extends g{constructor(P){super(X1,"border",!0),this.break=i(P.break,["close","open"]),this.hand=i(P.hand,["even","left","right"]),this.id=P.id||"",this.presence=i(P.presence,["visible","hidden","inactive","invisible"]),this.relevant=d0(P.relevant),this.use=P.use||"",this.usehref=P.usehref||"",this.corner=new T(4),this.edge=new T(4),this.extras=null,this.fill=null,this.margin=null}[u8](){if(!this[u]){let P=this.edge.children.slice();if(P.length<4){let X=P.at(-1)||new m6({});for(let z=P.length;z<4;z++)P.push(X)}let Z=P.map((X)=>X.thickness),q=[0,0,0,0];this.margin&&(q[0]=this.margin.topInset,q[1]=this.margin.rightInset,q[2]=this.margin.bottomInset,q[3]=this.margin.leftInset),this[u]={widths:Z,insets:q,edges:P}}return this[u]}[u1](){let{edges:P}=this[u8](),Z=P.map((X)=>{let z=X[u1]();return z.color||="#000000",z}),q=Object.create(null);if(this.margin&&Object.assign(q,this.margin[u1]()),this.fill?.presence==="visible"&&Object.assign(q,this.fill[u1]()),this.corner.children.some((X)=>X.radius!==0)){let X=this.corner.children.map((z)=>z[u1]());if(X.length===2||X.length===3){let z=X.at(-1);for(let R=X.length;R<4;R++)X.push(z)}q.borderRadius=X.map((z)=>z.radius).join(" ")}switch(this.presence){case"invisible":case"hidden":q.borderStyle="";break;case"inactive":q.borderStyle="none";break;default:q.borderStyle=Z.map((X)=>X.style).join(" ")}return q.borderWidth=Z.map((X)=>X.width).join(" "),q.borderColor=Z.map((X)=>X.color).join(" "),q}};NQ=class NQ extends g{constructor(P){super(X1,"break",!0),this.after=i(P.after,["auto","contentArea","pageArea","pageEven","pageOdd"]),this.afterTarget=P.afterTarget||"",this.before=i(P.before,["auto","contentArea","pageArea","pageEven","pageOdd"]),this.beforeTarget=P.beforeTarget||"",this.bookendLeader=P.bookendLeader||"",this.bookendTrailer=P.bookendTrailer||"",this.id=P.id||"",this.overflowLeader=P.overflowLeader||"",this.overflowTarget=P.overflowTarget||"",this.overflowTrailer=P.overflowTrailer||"",this.startNew=A1({data:P.startNew,defaultValue:0,validate:(Z)=>Z===1}),this.use=P.use||"",this.usehref=P.usehref||"",this.extras=null}};Eq=class Eq extends g{constructor(P){super(X1,"breakAfter",!0),this.id=P.id||"",this.leader=P.leader||"",this.startNew=A1({data:P.startNew,defaultValue:0,validate:(Z)=>Z===1}),this.target=P.target||"",this.targetType=i(P.targetType,["auto","contentArea","pageArea"]),this.trailer=P.trailer||"",this.use=P.use||"",this.usehref=P.usehref||"",this.script=null}};uq=class uq extends g{constructor(P){super(X1,"breakBefore",!0),this.id=P.id||"",this.leader=P.leader||"",this.startNew=A1({data:P.startNew,defaultValue:0,validate:(Z)=>Z===1}),this.target=P.target||"",this.targetType=i(P.targetType,["auto","contentArea","pageArea"]),this.trailer=P.trailer||"",this.use=P.use||"",this.usehref=P.usehref||"",this.script=null}[x1](P){return this[u]={},K1.FAILURE}};vQ=class vQ extends g{constructor(P){super(X1,"button",!0),this.highlight=i(P.highlight,["inverted","none","outline","push"]),this.id=P.id||"",this.use=P.use||"",this.usehref=P.usehref||"",this.extras=null}[x1](P){let Z=this[L1]()[L1](),q={name:"button",attributes:{id:this[a1],class:["xfaButton"],style:{}},children:[]};for(let X of Z.event.children){if(X.activity!=="click"||!X.script)continue;let z=Lf(X.script[a]);if(!z)continue;let R=IQ(z.url);R&&q.children.push({name:"a",attributes:{id:"link"+this[a1],href:R,newWindow:z.newWindow,class:["xfaLink"],style:{}},children:[]})}return K1.success(q)}};FQ=class FQ extends g{constructor(P){super(X1,"calculate",!0),this.id=P.id||"",this.override=i(P.override,["disabled","error","ignore","warning"]),this.use=P.use||"",this.usehref=P.usehref||"",this.extras=null,this.message=null,this.script=null}};SQ=class SQ extends g{constructor(P){super(X1,"caption",!0),this.id=P.id||"",this.placement=i(P.placement,["left","bottom","inline","right","top"]),this.presence=i(P.presence,["visible","hidden","inactive","invisible"]),this.reserve=Math.ceil($1(P.reserve)),this.use=P.use||"",this.usehref=P.usehref||"",this.extras=null,this.font=null,this.margin=null,this.para=null,this.value=null}[$0](P){Oq(this,P)}[u8](P){if(!this[u]){let{width:Z,height:q}=P;switch(this.placement){case"left":case"right":case"inline":Z=this.reserve<=0?Z:this.reserve;break;case"top":case"bottom":q=this.reserve<=0?q:this.reserve}this[u]=Sq(this,{width:Z})}return this[u]}[x1](P){if(!this.value)return K1.EMPTY;this[F6]();let Z=this.value[x1](P).html;if(!Z)return this[Y0](),K1.EMPTY;let q=this.reserve;if(this.reserve<=0){let{w:R,h:f}=this[u8](P);switch(this.placement){case"left":case"right":case"inline":this.reserve=R;break;case"top":case"bottom":this.reserve=f}}let X=[];typeof Z=="string"?X.push({name:"#text",value:Z}):X.push(Z);let z=q0(this,"font","margin","visibility");switch(this.placement){case"left":case"right":this.reserve>0&&(z.width=M1(this.reserve));break;case"top":case"bottom":this.reserve>0&&(z.height=M1(this.reserve))}return KQ(this,null,Z),this[Y0](),this.reserve=q,K1.success({name:"div",attributes:{style:z,class:["xfaCaption"]},children:X})}};mQ=class mQ extends F1{constructor(P){super(X1,"certificate"),this.id=P.id||"",this.name=P.name||"",this.use=P.use||"",this.usehref=P.usehref||""}};pQ=class pQ extends g{constructor(P){super(X1,"certificates",!0),this.credentialServerPolicy=i(P.credentialServerPolicy,["optional","required"]),this.id=P.id||"",this.url=P.url||"",this.urlPolicy=P.urlPolicy||"",this.use=P.use||"",this.usehref=P.usehref||"",this.encryption=null,this.issuers=null,this.keyUsage=null,this.oids=null,this.signing=null,this.subjectDNs=null}};gq=class gq extends g{constructor(P){super(X1,"checkButton",!0),this.id=P.id||"",this.mark=i(P.mark,["default","check","circle","cross","diamond","square","star"]),this.shape=i(P.shape,["square","round"]),this.size=$1(P.size,"10pt"),this.use=P.use||"",this.usehref=P.usehref||"",this.border=null,this.extras=null,this.margin=null}[x1](P){let Z=q0(this,"margin"),q=M1(this.size),X,z,R;Z.width=Z.height=q;let f=this[L1]()[L1](),G=f.items.children.length&&f.items.children[0][x1]().html||[],Q={on:(G[0]!==void 0?G[0]:"on").toString(),off:(G[1]!==void 0?G[1]:"off").toString()},Y=(f.value?.[A8]()||"off")===Q.on||void 0,W=f[I8](),$=f[a1],_;W instanceof hq?(R=W[a1],X="radio",z="xfaRadio",_=W[v0]?.[a1]||W[a1]):(X="checkbox",z="xfaCheckbox",_=f[v0]?.[a1]||f[a1]);let J={name:"input",attributes:{class:[z],style:Z,fieldId:$,dataId:_,type:X,checked:Y,xfaOn:Q.on,xfaOff:Q.off,"aria-label":O5(f),"aria-required":!1}};return R&&(J.attributes.name=R),q2(f)&&(J.attributes["aria-required"]=!0,J.attributes.required=!0),K1.success({name:"label",attributes:{class:["xfaLabel"]},children:[J]})}};dq=class dq extends g{constructor(P){super(X1,"choiceList",!0),this.commitOn=i(P.commitOn,["select","exit"]),this.id=P.id||"",this.open=i(P.open,["userControl","always","multiSelect","onEntry"]),this.textEntry=A1({data:P.textEntry,defaultValue:0,validate:(Z)=>Z===1}),this.use=P.use||"",this.usehref=P.usehref||"",this.border=null,this.extras=null,this.margin=null}[x1](P){let Z=q0(this,"border","margin"),q=this[L1]()[L1](),X={fontSize:`calc(${q.font?.size||10}px * var(--total-scale-factor))`},z=[];if(q.items.children.length>0){let f=q.items,G=0,Q=0;f.children.length===2&&(G=f.children[0].save,Q=1-G);let Y=f.children[G][x1]().html,W=f.children[Q][x1]().html,$=!1,_=q.value?.[A8]()||"";for(let J=0,U=Y.length;J<U;J++){let K={name:"option",attributes:{value:W[J]||Y[J],style:X},value:Y[J]};W[J]===_&&(K.attributes.selected=$=!0),z.push(K)}$||z.splice(0,0,{name:"option",attributes:{hidden:!0,selected:!0},value:" "})}let R={class:["xfaSelect"],fieldId:q[a1],dataId:q[v0]?.[a1]||q[a1],style:Z,"aria-label":O5(q),"aria-required":!1};return q2(q)&&(R["aria-required"]=!0,R.required=!0),this.open==="multiSelect"&&(R.multiple=!0),K1.success({name:"label",attributes:{class:["xfaLabel"]},children:[{name:"select",children:z,attributes:R}]})}};OQ=class OQ extends g{constructor(P){super(X1,"color",!0),this.cSpace=i(P.cSpace,["SRGB"]),this.id=P.id||"",this.use=P.use||"",this.usehref=P.usehref||"",this.value=P.value?function(Z,q=[0,0,0]){let[X,z,R]=q;if(!Z)return{r:X,g:z,b:R};let f=Z.split(",",3).map((G)=>E8(parseInt(G.trim(),10),0,255)).map((G)=>isNaN(G)?0:G);return f.length<3||([X,z,R]=f),{r:X,g:z,b:R}}(P.value):"",this.extras=null}[u7](){return!1}[u1](){return this.value?s1.makeHexColor(this.value.r,this.value.g,this.value.b):null}};yQ=class yQ extends g{constructor(P){super(X1,"comb"),this.id=P.id||"",this.numberOfCells=A1({data:P.numberOfCells,defaultValue:0,validate:(Z)=>Z>=0}),this.use=P.use||"",this.usehref=P.usehref||""}};DQ=class DQ extends g{constructor(P){super(X1,"connect",!0),this.connection=P.connection||"",this.id=P.id||"",this.ref=P.ref||"",this.usage=i(P.usage,["exportAndImport","exportOnly","importOnly"]),this.use=P.use||"",this.usehref=P.usehref||"",this.picture=null}};VP=class VP extends g{constructor(P){super(X1,"contentArea",!0),this.h=$1(P.h),this.id=P.id||"",this.name=P.name||"",this.relevant=d0(P.relevant),this.use=P.use||"",this.usehref=P.usehref||"",this.w=$1(P.w),this.x=$1(P.x,"0pt"),this.y=$1(P.y,"0pt"),this.desc=null,this.extras=null}[x1](P){let Z={left:M1(this.x),top:M1(this.y),width:M1(this.w),height:M1(this.h)},q=["xfaContentarea"];return S6(this)&&q.push("xfaPrintOnly"),K1.success({name:"div",children:[],attributes:{style:Z,class:q,id:this[a1]}})}};cq=class cq extends g{constructor(P){super(X1,"corner",!0),this.id=P.id||"",this.inverted=A1({data:P.inverted,defaultValue:0,validate:(Z)=>Z===1}),this.join=i(P.join,["square","round"]),this.presence=i(P.presence,["visible","hidden","inactive","invisible"]),this.radius=$1(P.radius),this.stroke=i(P.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),this.thickness=$1(P.thickness,"0.5pt"),this.use=P.use||"",this.usehref=P.usehref||"",this.color=null,this.extras=null}[u1](){let P=q0(this,"visibility");return P.radius=M1(this.join==="square"?0:this.radius),P}};wQ=class wQ extends f8{constructor(P){super(X1,"date"),this.id=P.id||"",this.name=P.name||"",this.use=P.use||"",this.usehref=P.usehref||""}[P8](){let P=this[a].trim();this[a]=P?new Date(P):null}[x1](P){return e4(this[a]?this[a].toString():"")}};EQ=class EQ extends f8{constructor(P){super(X1,"dateTime"),this.id=P.id||"",this.name=P.name||"",this.use=P.use||"",this.usehref=P.usehref||""}[P8](){let P=this[a].trim();this[a]=P?new Date(P):null}[x1](P){return e4(this[a]?this[a].toString():"")}};uQ=class uQ extends g{constructor(P){super(X1,"dateTimeEdit",!0),this.hScrollPolicy=i(P.hScrollPolicy,["auto","off","on"]),this.id=P.id||"",this.picker=i(P.picker,["host","none"]),this.use=P.use||"",this.usehref=P.usehref||"",this.border=null,this.comb=null,this.extras=null,this.margin=null}[x1](P){let Z=q0(this,"border","font","margin"),q=this[L1]()[L1](),X={name:"input",attributes:{type:"text",fieldId:q[a1],dataId:q[v0]?.[a1]||q[a1],class:["xfaTextfield"],style:Z,"aria-label":O5(q),"aria-required":!1}};return q2(q)&&(X.attributes["aria-required"]=!0,X.attributes.required=!0),K1.success({name:"label",attributes:{class:["xfaLabel"]},children:[X]})}};gQ=class gQ extends f8{constructor(P){super(X1,"decimal"),this.fracDigits=A1({data:P.fracDigits,defaultValue:2,validate:(Z)=>!0}),this.id=P.id||"",this.leadDigits=A1({data:P.leadDigits,defaultValue:-1,validate:(Z)=>!0}),this.name=P.name||"",this.use=P.use||"",this.usehref=P.usehref||""}[P8](){let P=parseFloat(this[a].trim());this[a]=isNaN(P)?null:P}[x1](P){return e4(this[a]!==null?this[a].toString():"")}};dQ=class dQ extends g{constructor(P){super(X1,"defaultUi",!0),this.id=P.id||"",this.use=P.use||"",this.usehref=P.usehref||"",this.extras=null}};cQ=class cQ extends g{constructor(P){super(X1,"desc",!0),this.id=P.id||"",this.use=P.use||"",this.usehref=P.usehref||"",this.boolean=new T,this.date=new T,this.dateTime=new T,this.decimal=new T,this.exData=new T,this.float=new T,this.image=new T,this.integer=new T,this.text=new T,this.time=new T}};sQ=class sQ extends r1{constructor(P){super(X1,"digestMethod",["","SHA1","SHA256","SHA512","RIPEMD160"]),this.id=P.id||"",this.use=P.use||"",this.usehref=P.usehref||""}};hQ=class hQ extends g{constructor(P){super(X1,"digestMethods",!0),this.id=P.id||"",this.type=i(P.type,["optional","required"]),this.use=P.use||"",this.usehref=P.usehref||"",this.digestMethod=new T}};sq=class sq extends g{constructor(P){super(X1,"draw",!0),this.anchorType=i(P.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=A1({data:P.colSpan,defaultValue:1,validate:(Z)=>Z>=1||Z===-1}),this.h=P.h?$1(P.h):"",this.hAlign=i(P.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=P.id||"",this.locale=P.locale||"",this.maxH=$1(P.maxH,"0pt"),this.maxW=$1(P.maxW,"0pt"),this.minH=$1(P.minH,"0pt"),this.minW=$1(P.minW,"0pt"),this.name=P.name||"",this.presence=i(P.presence,["visible","hidden","inactive","invisible"]),this.relevant=d0(P.relevant),this.rotate=A1({data:P.rotate,defaultValue:0,validate:(Z)=>Z%90==0}),this.use=P.use||"",this.usehref=P.usehref||"",this.w=P.w?$1(P.w):"",this.x=$1(P.x,"0pt"),this.y=$1(P.y,"0pt"),this.assist=null,this.border=null,this.caption=null,this.desc=null,this.extras=null,this.font=null,this.keep=null,this.margin=null,this.para=null,this.traversal=null,this.ui=null,this.value=null,this.setProperty=new T}[$0](P){Oq(this,P)}[x1](P){if(KP(this),this.presence==="hidden"||this.presence==="inactive")return K1.EMPTY;JP(this),this[F6]();let Z=this.w,q=this.h,{w:X,h:z,isBroken:R}=Sq(this,P);if(X&&this.w===""){if(R&&this[I8]()[C4]())return this[Y0](),K1.FAILURE;this.w=X}if(z&&this.h===""&&(this.h=z),IP(this),!UP(this,P))return this.w=Z,this.h=q,this[Y0](),K1.FAILURE;jP(this);let f=q0(this,"font","hAlign","dimensions","position","presence","rotate","anchorType","border","margin");WQ(this,f),f.margin&&(f.padding=f.margin,delete f.margin);let G=["xfaDraw"];this.font&&G.push("xfaFont"),S6(this)&&G.push("xfaPrintOnly");let Q={style:f,id:this[a1],class:G};this.name&&(Q.xfaName=this.name);let Y={name:"div",attributes:Q,children:[]};BP(this,Q);let W=$Q(this,Y,P),$=this.value?this.value[x1](P).html:null;return $===null?(this.w=Z,this.h=q,this[Y0](),K1.success(T5(this,Y),W)):(Y.children.push($),KQ(this,f,$),this.w=Z,this.h=q,this[Y0](),K1.success(T5(this,Y),W))}};m6=class m6 extends g{constructor(P){super(X1,"edge",!0),this.cap=i(P.cap,["square","butt","round"]),this.id=P.id||"",this.presence=i(P.presence,["visible","hidden","inactive","invisible"]),this.stroke=i(P.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),this.thickness=$1(P.thickness,"0.5pt"),this.use=P.use||"",this.usehref=P.usehref||"",this.color=null,this.extras=null}[u1](){let P=q0(this,"visibility");if(Object.assign(P,{linecap:this.cap,width:M1(this.thickness),color:this.color?this.color[u1]():"#000000",style:""}),this.presence!=="visible")P.style="none";else switch(this.stroke){case"solid":P.style="solid";break;case"dashDot":case"dashDotDot":case"dashed":P.style="dashed";break;case"dotted":P.style="dotted";break;case"embossed":P.style="ridge";break;case"etched":P.style="groove";break;case"lowered":P.style="inset";break;case"raised":P.style="outset"}return P}};rQ=class rQ extends r1{constructor(P){super(X1,"encoding",["adbe.x509.rsa_sha1","adbe.pkcs7.detached","adbe.pkcs7.sha1"]),this.id=P.id||"",this.use=P.use||"",this.usehref=P.usehref||""}};lQ=class lQ extends g{constructor(P){super(X1,"encodings",!0),this.id=P.id||"",this.type=i(P.type,["optional","required"]),this.use=P.use||"",this.usehref=P.usehref||"",this.encoding=new T}};oQ=class oQ extends g{constructor(P){super(X1,"encrypt",!0),this.id=P.id||"",this.use=P.use||"",this.usehref=P.usehref||"",this.certificate=null}};aQ=class aQ extends g{constructor(P){super(X1,"encryptData",!0),this.id=P.id||"",this.operation=i(P.operation,["encrypt","decrypt"]),this.target=P.target||"",this.use=P.use||"",this.usehref=P.usehref||"",this.filter=null,this.manifest=null}};nQ=class nQ extends g{constructor(P){super(X1,"encryption",!0),this.id=P.id||"",this.type=i(P.type,["optional","required"]),this.use=P.use||"",this.usehref=P.usehref||"",this.certificate=new T}};iQ=class iQ extends r1{constructor(P){super(X1,"encryptionMethod",["","AES256-CBC","TRIPLEDES-CBC","AES128-CBC","AES192-CBC"]),this.id=P.id||"",this.use=P.use||"",this.usehref=P.usehref||""}};tQ=class tQ extends g{constructor(P){super(X1,"encryptionMethods",!0),this.id=P.id||"",this.type=i(P.type,["optional","required"]),this.use=P.use||"",this.usehref=P.usehref||"",this.encryptionMethod=new T}};bV=class extends g{constructor(P){super(X1,"event",!0),this.activity=i(P.activity,["click","change","docClose","docReady","enter","exit","full","indexChange","initialize","mouseDown","mouseEnter","mouseExit","mouseUp","postExecute","postOpen","postPrint","postSave","postSign","postSubmit","preExecute","preOpen","prePrint","preSave","preSign","preSubmit","ready","validationState"]),this.id=P.id||"",this.listen=i(P.listen,["refOnly","refAndDescendents"]),this.name=P.name||"",this.ref=P.ref||"",this.use=P.use||"",this.usehref=P.usehref||"",this.extras=null,this.encryptData=null,this.execute=null,this.script=null,this.signData=null,this.submit=null}};eQ=class eQ extends f8{constructor(P){super(X1,"exData"),this.contentType=P.contentType||"",this.href=P.href||"",this.id=P.id||"",this.maxLength=A1({data:P.maxLength,defaultValue:-1,validate:(Z)=>Z>=-1}),this.name=P.name||"",this.rid=P.rid||"",this.transferEncoding=i(P.transferEncoding,["none","base64","package"]),this.use=P.use||"",this.usehref=P.usehref||""}[Tq](){return this.contentType==="text/html"}[q4](P){return(this.contentType==="text/html"&&P[B8]===j8.xhtml.id||this.contentType==="text/xml")&&(this[a]=P,!0)}[x1](P){return this.contentType==="text/html"&&this[a]?this[a][x1](P):K1.EMPTY}};PY=class PY extends g{constructor(P){super(X1,"exObject",!0),this.archive=P.archive||"",this.classId=P.classId||"",this.codeBase=P.codeBase||"",this.codeType=P.codeType||"",this.id=P.id||"",this.name=P.name||"",this.use=P.use||"",this.usehref=P.usehref||"",this.extras=null,this.boolean=new T,this.date=new T,this.dateTime=new T,this.decimal=new T,this.exData=new T,this.exObject=new T,this.float=new T,this.image=new T,this.integer=new T,this.text=new T,this.time=new T}};hq=class hq extends g{constructor(P){super(X1,"exclGroup",!0),this.access=i(P.access,["open","nonInteractive","protected","readOnly"]),this.accessKey=P.accessKey||"",this.anchorType=i(P.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=A1({data:P.colSpan,defaultValue:1,validate:(Z)=>Z>=1||Z===-1}),this.h=P.h?$1(P.h):"",this.hAlign=i(P.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=P.id||"",this.layout=i(P.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),this.maxH=$1(P.maxH,"0pt"),this.maxW=$1(P.maxW,"0pt"),this.minH=$1(P.minH,"0pt"),this.minW=$1(P.minW,"0pt"),this.name=P.name||"",this.presence=i(P.presence,["visible","hidden","inactive","invisible"]),this.relevant=d0(P.relevant),this.use=P.use||"",this.usehref=P.usehref||"",this.w=P.w?$1(P.w):"",this.x=$1(P.x,"0pt"),this.y=$1(P.y,"0pt"),this.assist=null,this.bind=null,this.border=null,this.calculate=null,this.caption=null,this.desc=null,this.extras=null,this.margin=null,this.para=null,this.traversal=null,this.validate=null,this.connect=new T,this.event=new T,this.field=new T,this.setProperty=new T}[E5](){return!0}[u7](){return!0}[$0](P){for(let Z of this.field.children){if(!Z.value){let q=new LP({});Z[Q8](q),Z.value=q}Z.value[$0](P)}}[C4](){return this.layout.endsWith("-tb")&&this[u].attempt===0&&this[u].numberInLine>0||this[L1]()[C4]()}[L4](){let P=this[I8]();return!!P[L4]()&&(this[u]._isSplittable!==void 0?this[u]._isSplittable:this.layout==="position"||this.layout.includes("row")?(this[u]._isSplittable=!1,!1):(!P.layout?.endsWith("-tb")||P[u].numberInLine===0)&&(this[u]._isSplittable=!0,!0))}[Z2](){return VQ(this)}[k5](P,Z){xQ(this,P,Z)}[C5](){return HQ(this)}[x1](P){if(KP(this),this.presence==="hidden"||this.presence==="inactive"||this.h===0||this.w===0)return K1.EMPTY;JP(this);let Z=[],q={id:this[a1],class:[]};mq(this,q.class),this[u]||=Object.create(null),Object.assign(this[u],{children:Z,attributes:q,attempt:0,line:null,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,P.width),height:Math.min(this.h||1/0,P.height)},width:0,height:0,prevHeight:0,currentWidth:0});let X=this[L4]();if(X||IP(this),!UP(this,P))return K1.FAILURE;let z=new Set(["field"]);if(this.layout.includes("row")){let I=this[I8]().columnWidths;Array.isArray(I)&&I.length>0&&(this[u].columnWidths=I,this[u].currentColumn=0)}let R=q0(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),f=["xfaExclgroup"],G=_Q(this);G&&f.push(G),S6(this)&&f.push("xfaPrintOnly"),q.style=R,q.class=f,this.name&&(q.xfaName=this.name),this[F6]();let Q=this.layout==="lr-tb"||this.layout==="rl-tb",Y=Q?2:1;for(;this[u].attempt<Y;this[u].attempt++){Q&&this[u].attempt===1&&(this[u].numberInLine=0);let I=this[a4]({filter:z,include:!0});if(I.success)break;if(I.isBreak())return this[Y0](),I;if(Q&&this[u].attempt===0&&this[u].numberInLine===0&&!this[K8]()[u].noLayoutFailure){this[u].attempt=Y;break}}if(this[Y0](),X||jP(this),this[u].attempt===Y)return X||delete this[u],K1.FAILURE;let W=0,$=0;this.margin&&(W=this.margin.leftInset+this.margin.rightInset,$=this.margin.topInset+this.margin.bottomInset);let _=Math.max(this[u].width+W,this.w||0),J=Math.max(this[u].height+$,this.h||0),U=[this.x,this.y,_,J];this.w===""&&(R.width=M1(_)),this.h===""&&(R.height=M1(J));let K={name:"div",attributes:q,children:Z};return BP(this,q),delete this[u],K1.success(T5(this,K),U)}};ZY=class ZY extends g{constructor(P){super(X1,"execute"),this.connection=P.connection||"",this.executeType=i(P.executeType,["import","remerge"]),this.id=P.id||"",this.runAt=i(P.runAt,["client","both","server"]),this.use=P.use||"",this.usehref=P.usehref||""}};qY=class qY extends g{constructor(P){super(X1,"extras",!0),this.id=P.id||"",this.name=P.name||"",this.use=P.use||"",this.usehref=P.usehref||"",this.boolean=new T,this.date=new T,this.dateTime=new T,this.decimal=new T,this.exData=new T,this.extras=new T,this.float=new T,this.image=new T,this.integer=new T,this.text=new T,this.time=new T}};xP=class xP extends g{constructor(P){super(X1,"field",!0),this.access=i(P.access,["open","nonInteractive","protected","readOnly"]),this.accessKey=P.accessKey||"",this.anchorType=i(P.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=A1({data:P.colSpan,defaultValue:1,validate:(Z)=>Z>=1||Z===-1}),this.h=P.h?$1(P.h):"",this.hAlign=i(P.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=P.id||"",this.locale=P.locale||"",this.maxH=$1(P.maxH,"0pt"),this.maxW=$1(P.maxW,"0pt"),this.minH=$1(P.minH,"0pt"),this.minW=$1(P.minW,"0pt"),this.name=P.name||"",this.presence=i(P.presence,["visible","hidden","inactive","invisible"]),this.relevant=d0(P.relevant),this.rotate=A1({data:P.rotate,defaultValue:0,validate:(Z)=>Z%90==0}),this.use=P.use||"",this.usehref=P.usehref||"",this.w=P.w?$1(P.w):"",this.x=$1(P.x,"0pt"),this.y=$1(P.y,"0pt"),this.assist=null,this.bind=null,this.border=null,this.calculate=null,this.caption=null,this.desc=null,this.extras=null,this.font=null,this.format=null,this.items=new T(2),this.keep=null,this.margin=null,this.para=null,this.traversal=null,this.ui=null,this.validate=null,this.value=null,this.bindItems=new T,this.connect=new T,this.event=new T,this.setProperty=new T}[E5](){return!0}[$0](P){Oq(this,P)}[x1](P){if(KP(this),!this.ui){let I;switch(this.ui=new AP({}),this.ui[e1]=this[e1],this[Q8](this.ui),this.items.children.length){case 0:I=new nq({}),this.ui.textEdit=I;break;case 1:I=new gq({}),this.ui.checkButton=I;break;case 2:I=new dq({}),this.ui.choiceList=I}this.ui[Q8](I)}if(!this.ui||this.presence==="hidden"||this.presence==="inactive"||this.h===0||this.w===0)return K1.EMPTY;this.caption&&delete this.caption[u],this[F6]();let Z=this.caption?this.caption[x1](P).html:null,q=this.w,X=this.h,z=0,R=0;this.margin&&(z=this.margin.leftInset+this.margin.rightInset,R=this.margin.topInset+this.margin.bottomInset);let f=null;if(this.w===""||this.h===""){let I=null,B=null,j=0,V=0;if(this.ui.checkButton)j=V=this.ui.checkButton.size;else{let{w:H,h:M}=Sq(this,P);H!==null?(j=H,V=M):V=function(x,A=!1){let k=null;if(x){let D=WP(x.typeface),n=x[e1].fontFinder.find(D);k=Nq(x,n)}if(!k)return{lineHeight:12,lineGap:2,lineNoGap:10};let b=x.size||10,O=k.lineHeight?Math.max(A?0:1.2,k.lineHeight):1.2,p=k.lineGap===void 0?0.2:k.lineGap;return{lineHeight:O*b,lineGap:p*b,lineNoGap:Math.max(1,O-p)*b}}(this.font,!0).lineNoGap}if(f=ZR(this.ui[u8]()),j+=f.w,V+=f.h,this.caption){let{w:H,h:M,isBroken:x}=this.caption[u8](P);if(x&&this[I8]()[C4]())return this[Y0](),K1.FAILURE;switch(I=H,B=M,this.caption.placement){case"left":case"right":case"inline":I+=j;break;case"top":case"bottom":B+=V}}else I=j,B=V;I&&this.w===""&&(I+=z,this.w=Math.min(this.maxW<=0?1/0:this.maxW,this.minW+1<I?I:this.minW)),B&&this.h===""&&(B+=R,this.h=Math.min(this.maxH<=0?1/0:this.maxH,this.minH+1<B?B:this.minH))}if(this[Y0](),JP(this),IP(this),!UP(this,P))return this.w=q,this.h=X,this[Y0](),K1.FAILURE;jP(this);let G=q0(this,"font","dimensions","position","rotate","anchorType","presence","margin","hAlign");WQ(this,G);let Q=["xfaField"];this.font&&Q.push("xfaFont"),S6(this)&&Q.push("xfaPrintOnly");let Y={style:G,id:this[a1],class:Q};G.margin&&(G.padding=G.margin,delete G.margin),mq(this,Q),this.name&&(Y.xfaName=this.name);let W=[],$={name:"div",attributes:Y,children:W};BP(this,Y);let _=this.border?this.border[u1]():null,J=$Q(this,$,P),U=this.ui[x1]().html;if(!U)return Object.assign(G,_),K1.success(T5(this,$),J);this[y0]&&(U.children?.[0]?U.children[0].attributes.tabindex=this[y0]:U.attributes.tabindex=this[y0]),U.attributes.style||=Object.create(null);let K=null;if(this.ui.button?(U.children.length===1&&([K]=U.children.splice(0,1)),Object.assign(U.attributes.style,_)):Object.assign(G,_),W.push(U),this.value){if(this.ui.imageEdit)U.children.push(this.value[x1]().html);else if(!this.ui.button){let I="";if(this.value.exData)I=this.value.exData[A8]();else if(this.value.text)I=this.value.text[u8]();else{let B=this.value[x1]().html;B!==null&&(I=B.children[0].value)}this.ui.textEdit&&this.value.text?.maxChars&&(U.children[0].attributes.maxLength=this.value.text.maxChars),I&&(this.ui.numericEdit&&(I=parseFloat(I),I=isNaN(I)?"":I.toString()),U.children[0].name==="textarea"?U.children[0].attributes.textContent=I:U.children[0].attributes.value=I)}}if(!this.ui.imageEdit&&U.children?.[0]&&this.h){f=f||ZR(this.ui[u8]());let I=0;if(this.caption&&["top","bottom"].includes(this.caption.placement)){I=this.caption.reserve,I<=0&&(I=this.caption[u8](P).h);let B=this.h-I-R-f.h;U.children[0].attributes.style.height=M1(B)}else U.children[0].attributes.style.height="100%"}if(K&&U.children.push(K),!Z)return U.attributes.class&&U.attributes.class.push("xfaLeft"),this.w=q,this.h=X,K1.success(T5(this,$),J);if(this.ui.button)return G.padding&&delete G.padding,Z.name==="div"&&(Z.name="span"),U.children.push(Z),K1.success($,J);switch(this.ui.checkButton&&(Z.attributes.class[0]="xfaCaptionForCheckButton"),U.attributes.class||=[],U.children.splice(0,0,Z),this.caption.placement){case"left":case"inline":U.attributes.class.push("xfaLeft");break;case"right":U.attributes.class.push("xfaRight");break;case"top":U.attributes.class.push("xfaTop");break;case"bottom":U.attributes.class.push("xfaBottom")}return this.w=q,this.h=X,K1.success(T5(this,$),J)}};XY=class XY extends g{constructor(P){super(X1,"fill",!0),this.id=P.id||"",this.presence=i(P.presence,["visible","hidden","inactive","invisible"]),this.use=P.use||"",this.usehref=P.usehref||"",this.color=null,this.extras=null,this.linear=null,this.pattern=null,this.radial=null,this.solid=null,this.stipple=null}[u1](){let P=this[L1](),Z=P[L1]()[L1](),q=Object.create(null),X="color",z=X;P instanceof wq&&(X="background-color",z="background",Z instanceof AP&&(q.backgroundColor="white")),(P instanceof lq||P instanceof Dq)&&(X=z="fill",q.fill="white");for(let R of Object.getOwnPropertyNames(this)){if(R==="extras"||R==="color")continue;let f=this[R];if(!(f instanceof g))continue;let G=f[u1](this.color);return G&&(q[G.startsWith("#")?X:z]=G),q}if(this.color?.value){let R=this.color[u1]();q[R.startsWith("#")?X:z]=R}return q}};zY=class zY extends g{constructor(P){super(X1,"filter",!0),this.addRevocationInfo=i(P.addRevocationInfo,["","required","optional","none"]),this.id=P.id||"",this.name=P.name||"",this.use=P.use||"",this.usehref=P.usehref||"",this.version=A1({data:this.version,defaultValue:5,validate:(Z)=>Z>=1&&Z<=5}),this.appearanceFilter=null,this.certificates=null,this.digestMethods=null,this.encodings=null,this.encryptionMethods=null,this.handler=null,this.lockDocument=null,this.mdp=null,this.reasons=null,this.timeStamp=null}};RY=class RY extends f8{constructor(P){super(X1,"float"),this.id=P.id||"",this.name=P.name||"",this.use=P.use||"",this.usehref=P.usehref||""}[P8](){let P=parseFloat(this[a].trim());this[a]=isNaN(P)?null:P}[x1](P){return e4(this[a]!==null?this[a].toString():"")}};fY=class fY extends g{constructor(P){super(X1,"font",!0),this.baselineShift=$1(P.baselineShift),this.fontHorizontalScale=F3({data:P.fontHorizontalScale,defaultValue:100,validate:(Z)=>Z>=0}),this.fontVerticalScale=F3({data:P.fontVerticalScale,defaultValue:100,validate:(Z)=>Z>=0}),this.id=P.id||"",this.kerningMode=i(P.kerningMode,["none","pair"]),this.letterSpacing=$1(P.letterSpacing,"0"),this.lineThrough=A1({data:P.lineThrough,defaultValue:0,validate:(Z)=>Z===1||Z===2}),this.lineThroughPeriod=i(P.lineThroughPeriod,["all","word"]),this.overline=A1({data:P.overline,defaultValue:0,validate:(Z)=>Z===1||Z===2}),this.overlinePeriod=i(P.overlinePeriod,["all","word"]),this.posture=i(P.posture,["normal","italic"]),this.size=$1(P.size,"10pt"),this.typeface=P.typeface||"Courier",this.underline=A1({data:P.underline,defaultValue:0,validate:(Z)=>Z===1||Z===2}),this.underlinePeriod=i(P.underlinePeriod,["all","word"]),this.use=P.use||"",this.usehref=P.usehref||"",this.weight=i(P.weight,["normal","bold"]),this.extras=null,this.fill=null}[F0](P){super[F0](P),this[e1].usedTypefaces.add(this.typeface)}[u1](){let P=q0(this,"fill"),Z=P.color;return Z&&(Z==="#000000"?delete P.color:Z.startsWith("#")||(P.background=Z,P.backgroundClip="text",P.color="transparent")),this.baselineShift&&(P.verticalAlign=M1(this.baselineShift)),P.fontKerning=this.kerningMode==="none"?"none":"normal",P.letterSpacing=M1(this.letterSpacing),this.lineThrough!==0&&(P.textDecoration="line-through",this.lineThrough===2&&(P.textDecorationStyle="double")),this.overline!==0&&(P.textDecoration="overline",this.overline===2&&(P.textDecorationStyle="double")),P.fontStyle=this.posture,P.fontSize=M1(0.99*this.size),BQ(this,this,this[e1].fontFinder,P),this.underline!==0&&(P.textDecoration="underline",this.underline===2&&(P.textDecorationStyle="double")),P.fontWeight=this.weight,P}};GY=class GY extends g{constructor(P){super(X1,"format",!0),this.id=P.id||"",this.use=P.use||"",this.usehref=P.usehref||"",this.extras=null,this.picture=null}};QY=class QY extends F1{constructor(P){super(X1,"handler"),this.id=P.id||"",this.type=i(P.type,["optional","required"]),this.use=P.use||"",this.usehref=P.usehref||""}};YY=class YY extends g{constructor(P){super(X1,"hyphenation"),this.excludeAllCaps=A1({data:P.excludeAllCaps,defaultValue:0,validate:(Z)=>Z===1}),this.excludeInitialCap=A1({data:P.excludeInitialCap,defaultValue:0,validate:(Z)=>Z===1}),this.hyphenate=A1({data:P.hyphenate,defaultValue:0,validate:(Z)=>Z===1}),this.id=P.id||"",this.pushCharacterCount=A1({data:P.pushCharacterCount,defaultValue:3,validate:(Z)=>Z>=0}),this.remainCharacterCount=A1({data:P.remainCharacterCount,defaultValue:3,validate:(Z)=>Z>=0}),this.use=P.use||"",this.usehref=P.usehref||"",this.wordCharacterCount=A1({data:P.wordCharacterCount,defaultValue:7,validate:(Z)=>Z>=0})}};WY=class extends F1{constructor(P){super(X1,"image"),this.aspect=i(P.aspect,["fit","actual","height","none","width"]),this.contentType=P.contentType||"",this.href=P.href||"",this.id=P.id||"",this.name=P.name||"",this.transferEncoding=i(P.transferEncoding,["base64","none","package"]),this.use=P.use||"",this.usehref=P.usehref||""}[x1](){if(this.contentType&&!AV.has(this.contentType.toLowerCase()))return K1.EMPTY;let P=this[e1].images?.get(this.href);if(!P&&(this.href||!this[a]))return K1.EMPTY;var Z;if(P||this.transferEncoding!=="base64"||(Z=this[a],P=Uint8Array.fromBase64?Uint8Array.fromBase64(Z):w8(atob(Z))),!P)return K1.EMPTY;if(!this.contentType){for(let[R,f]of LV)if(P.length>R.length&&R.every((G,Q)=>G===P[Q])){this.contentType=f;break}if(!this.contentType)return K1.EMPTY}let q=new Blob([P],{type:this.contentType}),X;switch(this.aspect){case"fit":case"actual":break;case"height":X={height:"100%",objectFit:"fill"};break;case"none":X={width:"100%",height:"100%",objectFit:"fill"};break;case"width":X={width:"100%",objectFit:"fill"}}let z=this[L1]();return K1.success({name:"img",attributes:{class:["xfaImage"],style:X,src:URL.createObjectURL(q),alt:z?O5(z[L1]()):null}})}};$Y=class $Y extends g{constructor(P){super(X1,"imageEdit",!0),this.data=i(P.data,["link","embed"]),this.id=P.id||"",this.use=P.use||"",this.usehref=P.usehref||"",this.border=null,this.extras=null,this.margin=null}[x1](P){return this.data==="embed"?K1.success({name:"div",children:[],attributes:{}}):K1.EMPTY}};_Y=class _Y extends f8{constructor(P){super(X1,"integer"),this.id=P.id||"",this.name=P.name||"",this.use=P.use||"",this.usehref=P.usehref||""}[P8](){let P=parseInt(this[a].trim(),10);this[a]=isNaN(P)?null:P}[x1](P){return e4(this[a]!==null?this[a].toString():"")}};JY=class JY extends g{constructor(P){super(X1,"issuers",!0),this.id=P.id||"",this.type=i(P.type,["optional","required"]),this.use=P.use||"",this.usehref=P.usehref||"",this.certificate=new T}};O3=class O3 extends g{constructor(P){super(X1,"items",!0),this.id=P.id||"",this.name=P.name||"",this.presence=i(P.presence,["visible","hidden","inactive","invisible"]),this.ref=P.ref||"",this.save=A1({data:P.save,defaultValue:0,validate:(Z)=>Z===1}),this.use=P.use||"",this.usehref=P.usehref||"",this.boolean=new T,this.date=new T,this.dateTime=new T,this.decimal=new T,this.exData=new T,this.float=new T,this.image=new T,this.integer=new T,this.text=new T,this.time=new T}[x1](){let P=[];for(let Z of this[S8]())P.push(Z[A8]());return K1.success(P)}};UY=class UY extends g{constructor(P){super(X1,"keep",!0),this.id=P.id||"";let Z=["none","contentArea","pageArea"];this.intact=i(P.intact,Z),this.next=i(P.next,Z),this.previous=i(P.previous,Z),this.use=P.use||"",this.usehref=P.usehref||"",this.extras=null}};KY=class KY extends g{constructor(P){super(X1,"keyUsage");let Z=["","yes","no"];this.crlSign=i(P.crlSign,Z),this.dataEncipherment=i(P.dataEncipherment,Z),this.decipherOnly=i(P.decipherOnly,Z),this.digitalSignature=i(P.digitalSignature,Z),this.encipherOnly=i(P.encipherOnly,Z),this.id=P.id||"",this.keyAgreement=i(P.keyAgreement,Z),this.keyCertSign=i(P.keyCertSign,Z),this.keyEncipherment=i(P.keyEncipherment,Z),this.nonRepudiation=i(P.nonRepudiation,Z),this.type=i(P.type,["optional","required"]),this.use=P.use||"",this.usehref=P.usehref||""}};BY=class BY extends g{constructor(P){super(X1,"line",!0),this.hand=i(P.hand,["even","left","right"]),this.id=P.id||"",this.slope=i(P.slope,["\\","/"]),this.use=P.use||"",this.usehref=P.usehref||"",this.edge=null}[x1](){let P=this[L1]()[L1](),Z=this.edge||new m6({}),q=Z[u1](),X=Object.create(null),z=Z.presence==="visible"?Z.thickness:0,R,f,G,Q;X.strokeWidth=M1(z),X.stroke=q.color;let Y="100%",W="100%";P.w<=z?([R,f,G,Q]=["50%",0,"50%","100%"],Y=X.strokeWidth):P.h<=z?([R,f,G,Q]=[0,"50%","100%","50%"],W=X.strokeWidth):this.slope==="\\"?[R,f,G,Q]=[0,0,"100%","100%"]:[R,f,G,Q]=[0,"100%","100%",0];let $={name:"svg",children:[{name:"line",attributes:{xmlns:N5,x1:R,y1:f,x2:G,y2:Q,style:X}}],attributes:{xmlns:N5,width:Y,height:W,style:{overflow:"visible"}}};return pq(P)?K1.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[$]}):($.attributes.style.position="absolute",K1.success($))}};IY=class IY extends g{constructor(P){super(X1,"linear",!0),this.id=P.id||"",this.type=i(P.type,["toRight","toBottom","toLeft","toTop"]),this.use=P.use||"",this.usehref=P.usehref||"",this.color=null,this.extras=null}[u1](P){return P=P?P[u1]():"#FFFFFF",`linear-gradient(${this.type.replace(/([RBLT])/," $1").toLowerCase()}, ${P}, ${this.color?this.color[u1]():"#000000"})`}};jY=class jY extends f8{constructor(P){super(X1,"lockDocument"),this.id=P.id||"",this.type=i(P.type,["optional","required"]),this.use=P.use||"",this.usehref=P.usehref||""}[P8](){this[a]=i(this[a],["auto","0","1"])}};VY=class VY extends g{constructor(P){super(X1,"manifest",!0),this.action=i(P.action,["include","all","exclude"]),this.id=P.id||"",this.name=P.name||"",this.use=P.use||"",this.usehref=P.usehref||"",this.extras=null,this.ref=new T}};xY=class xY extends g{constructor(P){super(X1,"margin",!0),this.bottomInset=$1(P.bottomInset,"0"),this.id=P.id||"",this.leftInset=$1(P.leftInset,"0"),this.rightInset=$1(P.rightInset,"0"),this.topInset=$1(P.topInset,"0"),this.use=P.use||"",this.usehref=P.usehref||"",this.extras=null}[u1](){return{margin:M1(this.topInset)+" "+M1(this.rightInset)+" "+M1(this.bottomInset)+" "+M1(this.leftInset)}}};HY=class HY extends g{constructor(P){super(X1,"mdp"),this.id=P.id||"",this.permissions=A1({data:P.permissions,defaultValue:2,validate:(Z)=>Z===1||Z===3}),this.signatureType=i(P.signatureType,["filler","author"]),this.use=P.use||"",this.usehref=P.usehref||""}};MY=class MY extends g{constructor(P){super(X1,"medium"),this.id=P.id||"",this.imagingBBox=function(Z){if(!Z)return{x:-1,y:-1,width:-1,height:-1};let X=Z.split(",",4).map((Q)=>$1(Q.trim(),"-1"));if(X.length<4||X[2]<0||X[3]<0)return{x:-1,y:-1,width:-1,height:-1};let[z,R,f,G]=X;return{x:z,y:R,width:f,height:G}}(P.imagingBBox),this.long=$1(P.long),this.orientation=i(P.orientation,["portrait","landscape"]),this.short=$1(P.short),this.stock=P.stock||"",this.trayIn=i(P.trayIn,["auto","delegate","pageFront"]),this.trayOut=i(P.trayOut,["auto","delegate"]),this.use=P.use||"",this.usehref=P.usehref||""}};AY=class AY extends g{constructor(P){super(X1,"message",!0),this.id=P.id||"",this.use=P.use||"",this.usehref=P.usehref||"",this.text=new T}};LY=class LY extends g{constructor(P){super(X1,"numericEdit",!0),this.hScrollPolicy=i(P.hScrollPolicy,["auto","off","on"]),this.id=P.id||"",this.use=P.use||"",this.usehref=P.usehref||"",this.border=null,this.comb=null,this.extras=null,this.margin=null}[x1](P){let Z=q0(this,"border","font","margin"),q=this[L1]()[L1](),X={name:"input",attributes:{type:"text",fieldId:q[a1],dataId:q[v0]?.[a1]||q[a1],class:["xfaTextfield"],style:Z,"aria-label":O5(q),"aria-required":!1}};return q2(q)&&(X.attributes["aria-required"]=!0,X.attributes.required=!0),K1.success({name:"label",attributes:{class:["xfaLabel"]},children:[X]})}};bY=class bY extends g{constructor(P){super(X1,"occur",!0),this.id=P.id||"",this.initial=P.initial!==""?A1({data:P.initial,defaultValue:"",validate:(Z)=>!0}):"",this.max=P.max!==""?A1({data:P.max,defaultValue:1,validate:(Z)=>!0}):"",this.min=P.min!==""?A1({data:P.min,defaultValue:1,validate:(Z)=>!0}):"",this.use=P.use||"",this.usehref=P.usehref||"",this.extras=null}[F0](){let P=this[L1](),Z=this.min;this.min===""&&(this.min=P instanceof y5||P instanceof c7?0:1),this.max===""&&(this.max=Z===""?P instanceof y5||P instanceof c7?-1:1:this.min),this.max!==-1&&this.max<this.min&&(this.max=this.min),this.initial===""&&(this.initial=P instanceof MP?1:this.min)}};kY=class kY extends F1{constructor(P){super(X1,"oid"),this.id=P.id||"",this.name=P.name||"",this.use=P.use||"",this.usehref=P.usehref||""}};CY=class CY extends g{constructor(P){super(X1,"oids",!0),this.id=P.id||"",this.type=i(P.type,["optional","required"]),this.use=P.use||"",this.usehref=P.usehref||"",this.oid=new T}};rq=class rq extends g{constructor(P){super(X1,"overflow"),this.id=P.id||"",this.leader=P.leader||"",this.target=P.target||"",this.trailer=P.trailer||"",this.use=P.use||"",this.usehref=P.usehref||""}[u8](){if(!this[u]){let P=this[L1](),Z=this[K8](),q=Z[H4](this.target,P),X=Z[H4](this.leader,P),z=Z[H4](this.trailer,P);this[u]={target:q?.[0]||null,leader:X?.[0]||null,trailer:z?.[0]||null,addLeader:!1,addTrailer:!1}}return this[u]}};y5=class y5 extends g{constructor(P){super(X1,"pageArea",!0),this.blankOrNotBlank=i(P.blankOrNotBlank,["any","blank","notBlank"]),this.id=P.id||"",this.initialNumber=A1({data:P.initialNumber,defaultValue:1,validate:(Z)=>!0}),this.name=P.name||"",this.numbered=A1({data:P.numbered,defaultValue:1,validate:(Z)=>!0}),this.oddOrEven=i(P.oddOrEven,["any","even","odd"]),this.pagePosition=i(P.pagePosition,["any","first","last","only","rest"]),this.relevant=d0(P.relevant),this.use=P.use||"",this.usehref=P.usehref||"",this.desc=null,this.extras=null,this.medium=null,this.occur=null,this.area=new T,this.contentArea=new T,this.draw=new T,this.exclGroup=new T,this.field=new T,this.subform=new T}[d7](){return this[u]?!this.occur||this.occur.max===-1||this[u].numberOfUse<this.occur.max:(this[u]={numberOfUse:0},!0)}[X6](){delete this[u]}[K4](){this[u]||={numberOfUse:0};let P=this[L1]();return P.relation==="orderedOccurrence"&&this[d7]()?(this[u].numberOfUse+=1,this):P[K4]()}[C5](){return this[u].space||{width:0,height:0}}[x1](){this[u]||={numberOfUse:1};let P=[];this[u].children=P;let Z=Object.create(null);if(this.medium&&this.medium.short&&this.medium.long){if(Z.width=M1(this.medium.short),Z.height=M1(this.medium.long),this[u].space={width:this.medium.short,height:this.medium.long},this.medium.orientation==="landscape"){let q=Z.width;Z.width=Z.height,Z.height=q,this[u].space={width:this.medium.long,height:this.medium.short}}}else v("XFA - No medium specified in pageArea: please file a bug.");return this[a4]({filter:new Set(["area","draw","field","subform"]),include:!0}),this[a4]({filter:new Set(["contentArea"]),include:!0}),K1.success({name:"div",children:P,attributes:{class:["xfaPage"],id:this[a1],style:Z,xfaName:this.name}})}};c7=class c7 extends g{constructor(P){super(X1,"pageSet",!0),this.duplexImposition=i(P.duplexImposition,["longEdge","shortEdge"]),this.id=P.id||"",this.name=P.name||"",this.relation=i(P.relation,["orderedOccurrence","duplexPaginated","simplexPaginated"]),this.relevant=d0(P.relevant),this.use=P.use||"",this.usehref=P.usehref||"",this.extras=null,this.occur=null,this.pageArea=new T,this.pageSet=new T}[X6](){for(let P of this.pageArea.children)P[X6]();for(let P of this.pageSet.children)P[X6]()}[d7](){return!this.occur||this.occur.max===-1||this[u].numberOfUse<this.occur.max}[K4](){if(this[u]||={numberOfUse:1,pageIndex:-1,pageSetIndex:-1},this.relation==="orderedOccurrence"){if(this[u].pageIndex+1<this.pageArea.children.length)return this[u].pageIndex+=1,this.pageArea.children[this[u].pageIndex][K4]();if(this[u].pageSetIndex+1<this.pageSet.children.length)return this[u].pageSetIndex+=1,this.pageSet.children[this[u].pageSetIndex][K4]();if(this[d7]())return this[u].numberOfUse+=1,this[u].pageIndex=-1,this[u].pageSetIndex=-1,this[K4]();let z=this[L1]();return z instanceof c7?z[K4]():(this[X6](),this[K4]())}let P=this[K8]()[u].pageNumber,Z=P%2==0?"even":"odd",q=P===0?"first":"rest",X=this.pageArea.children.find((z)=>z.oddOrEven===Z&&z.pagePosition===q);return X||(X=this.pageArea.children.find((z)=>z.oddOrEven==="any"&&z.pagePosition===q),X||(X=this.pageArea.children.find((z)=>z.oddOrEven==="any"&&z.pagePosition==="any"),X||this.pageArea.children[0]))}};TY=class TY extends g{constructor(P){super(X1,"para",!0),this.hAlign=i(P.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=P.id||"",this.lineHeight=P.lineHeight?$1(P.lineHeight,"0pt"):"",this.marginLeft=P.marginLeft?$1(P.marginLeft,"0pt"):"",this.marginRight=P.marginRight?$1(P.marginRight,"0pt"):"",this.orphans=A1({data:P.orphans,defaultValue:0,validate:(Z)=>Z>=0}),this.preserve=P.preserve||"",this.radixOffset=P.radixOffset?$1(P.radixOffset,"0pt"):"",this.spaceAbove=P.spaceAbove?$1(P.spaceAbove,"0pt"):"",this.spaceBelow=P.spaceBelow?$1(P.spaceBelow,"0pt"):"",this.tabDefault=P.tabDefault?$1(this.tabDefault):"",this.tabStops=(P.tabStops||"").trim().split(/\s+/).map((Z,q)=>q%2==1?$1(Z):Z),this.textIndent=P.textIndent?$1(P.textIndent,"0pt"):"",this.use=P.use||"",this.usehref=P.usehref||"",this.vAlign=i(P.vAlign,["top","bottom","middle"]),this.widows=A1({data:P.widows,defaultValue:0,validate:(Z)=>Z>=0}),this.hyphenation=null}[u1](){let P=q0(this,"hAlign");return this.marginLeft!==""&&(P.paddingLeft=M1(this.marginLeft)),this.marginRight!==""&&(P.paddingRight=M1(this.marginRight)),this.spaceAbove!==""&&(P.paddingTop=M1(this.spaceAbove)),this.spaceBelow!==""&&(P.paddingBottom=M1(this.spaceBelow)),this.textIndent!==""&&(P.textIndent=M1(this.textIndent),JQ(P)),this.lineHeight>0&&(P.lineHeight=M1(this.lineHeight)),this.tabDefault!==""&&(P.tabSize=M1(this.tabDefault)),this.tabStops.length,this.hyphenatation&&Object.assign(P,this.hyphenatation[u1]()),P}};NY=class NY extends g{constructor(P){super(X1,"passwordEdit",!0),this.hScrollPolicy=i(P.hScrollPolicy,["auto","off","on"]),this.id=P.id||"",this.passwordChar=P.passwordChar||"*",this.use=P.use||"",this.usehref=P.usehref||"",this.border=null,this.extras=null,this.margin=null}};vY=class vY extends g{constructor(P){super(X1,"pattern",!0),this.id=P.id||"",this.type=i(P.type,["crossHatch","crossDiagonal","diagonalLeft","diagonalRight","horizontal","vertical"]),this.use=P.use||"",this.usehref=P.usehref||"",this.color=null,this.extras=null}[u1](P){P=P?P[u1]():"#FFFFFF";let Z=this.color?this.color[u1]():"#000000",q="repeating-linear-gradient",X=`${P},${P} 5px,${Z} 5px,${Z} 10px`;switch(this.type){case"crossHatch":return`${q}(to top,${X}) ${q}(to right,${X})`;case"crossDiagonal":return`${q}(45deg,${X}) ${q}(-45deg,${X})`;case"diagonalLeft":return`${q}(45deg,${X})`;case"diagonalRight":return`${q}(-45deg,${X})`;case"horizontal":return`${q}(to top,${X})`;case"vertical":return`${q}(to right,${X})`}return""}};FY=class FY extends F1{constructor(P){super(X1,"picture"),this.id=P.id||"",this.use=P.use||"",this.usehref=P.usehref||""}};SY=class SY extends g{constructor(P){super(X1,"proto",!0),this.appearanceFilter=new T,this.arc=new T,this.area=new T,this.assist=new T,this.barcode=new T,this.bindItems=new T,this.bookend=new T,this.boolean=new T,this.border=new T,this.break=new T,this.breakAfter=new T,this.breakBefore=new T,this.button=new T,this.calculate=new T,this.caption=new T,this.certificate=new T,this.certificates=new T,this.checkButton=new T,this.choiceList=new T,this.color=new T,this.comb=new T,this.connect=new T,this.contentArea=new T,this.corner=new T,this.date=new T,this.dateTime=new T,this.dateTimeEdit=new T,this.decimal=new T,this.defaultUi=new T,this.desc=new T,this.digestMethod=new T,this.digestMethods=new T,this.draw=new T,this.edge=new T,this.encoding=new T,this.encodings=new T,this.encrypt=new T,this.encryptData=new T,this.encryption=new T,this.encryptionMethod=new T,this.encryptionMethods=new T,this.event=new T,this.exData=new T,this.exObject=new T,this.exclGroup=new T,this.execute=new T,this.extras=new T,this.field=new T,this.fill=new T,this.filter=new T,this.float=new T,this.font=new T,this.format=new T,this.handler=new T,this.hyphenation=new T,this.image=new T,this.imageEdit=new T,this.integer=new T,this.issuers=new T,this.items=new T,this.keep=new T,this.keyUsage=new T,this.line=new T,this.linear=new T,this.lockDocument=new T,this.manifest=new T,this.margin=new T,this.mdp=new T,this.medium=new T,this.message=new T,this.numericEdit=new T,this.occur=new T,this.oid=new T,this.oids=new T,this.overflow=new T,this.pageArea=new T,this.pageSet=new T,this.para=new T,this.passwordEdit=new T,this.pattern=new T,this.picture=new T,this.radial=new T,this.reason=new T,this.reasons=new T,this.rectangle=new T,this.ref=new T,this.script=new T,this.setProperty=new T,this.signData=new T,this.signature=new T,this.signing=new T,this.solid=new T,this.speak=new T,this.stipple=new T,this.subform=new T,this.subformSet=new T,this.subjectDN=new T,this.subjectDNs=new T,this.submit=new T,this.text=new T,this.textEdit=new T,this.time=new T,this.timeStamp=new T,this.toolTip=new T,this.traversal=new T,this.traverse=new T,this.ui=new T,this.validate=new T,this.value=new T,this.variables=new T}};mY=class mY extends g{constructor(P){super(X1,"radial",!0),this.id=P.id||"",this.type=i(P.type,["toEdge","toCenter"]),this.use=P.use||"",this.usehref=P.usehref||"",this.color=null,this.extras=null}[u1](P){P=P?P[u1]():"#FFFFFF";let Z=this.color?this.color[u1]():"#000000";return`radial-gradient(circle at center, ${this.type==="toEdge"?`${P},${Z}`:`${Z},${P}`})`}};pY=class pY extends F1{constructor(P){super(X1,"reason"),this.id=P.id||"",this.name=P.name||"",this.use=P.use||"",this.usehref=P.usehref||""}};OY=class OY extends g{constructor(P){super(X1,"reasons",!0),this.id=P.id||"",this.type=i(P.type,["optional","required"]),this.use=P.use||"",this.usehref=P.usehref||"",this.reason=new T}};lq=class lq extends g{constructor(P){super(X1,"rectangle",!0),this.hand=i(P.hand,["even","left","right"]),this.id=P.id||"",this.use=P.use||"",this.usehref=P.usehref||"",this.corner=new T(4),this.edge=new T(4),this.fill=null}[x1](){let P=this.edge.children.length?this.edge.children[0]:new m6({}),Z=P[u1](),q=Object.create(null);this.fill?.presence==="visible"?Object.assign(q,this.fill[u1]()):q.fill="transparent",q.strokeWidth=M1(P.presence==="visible"?P.thickness:0),q.stroke=Z.color;let X=(this.corner.children.length?this.corner.children[0]:new cq({}))[u1](),z={name:"svg",children:[{name:"rect",attributes:{xmlns:N5,width:"100%",height:"100%",x:0,y:0,rx:X.radius,ry:X.radius,style:q}}],attributes:{xmlns:N5,style:{overflow:"visible"},width:"100%",height:"100%"}};return pq(this[L1]()[L1]())?K1.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[z]}):(z.attributes.style.position="absolute",K1.success(z))}};yY=class yY extends F1{constructor(P){super(X1,"ref"),this.id=P.id||"",this.use=P.use||"",this.usehref=P.usehref||""}};DY=class DY extends F1{constructor(P){super(X1,"script"),this.binding=P.binding||"",this.contentType=P.contentType||"",this.id=P.id||"",this.name=P.name||"",this.runAt=i(P.runAt,["client","both","server"]),this.use=P.use||"",this.usehref=P.usehref||""}};y3=class y3 extends g{constructor(P){super(X1,"setProperty"),this.connection=P.connection||"",this.ref=P.ref||"",this.target=P.target||""}};wY=class wY extends g{constructor(P){super(X1,"signData",!0),this.id=P.id||"",this.operation=i(P.operation,["sign","clear","verify"]),this.ref=P.ref||"",this.target=P.target||"",this.use=P.use||"",this.usehref=P.usehref||"",this.filter=null,this.manifest=null}};EY=class EY extends g{constructor(P){super(X1,"signature",!0),this.id=P.id||"",this.type=i(P.type,["PDF1.3","PDF1.6"]),this.use=P.use||"",this.usehref=P.usehref||"",this.border=null,this.extras=null,this.filter=null,this.manifest=null,this.margin=null}};uY=class uY extends g{constructor(P){super(X1,"signing",!0),this.id=P.id||"",this.type=i(P.type,["optional","required"]),this.use=P.use||"",this.usehref=P.usehref||"",this.certificate=new T}};gY=class gY extends g{constructor(P){super(X1,"solid",!0),this.id=P.id||"",this.use=P.use||"",this.usehref=P.usehref||"",this.extras=null}[u1](P){return P?P[u1]():"#FFFFFF"}};dY=class dY extends F1{constructor(P){super(X1,"speak"),this.disable=A1({data:P.disable,defaultValue:0,validate:(Z)=>Z===1}),this.id=P.id||"",this.priority=i(P.priority,["custom","caption","name","toolTip"]),this.rid=P.rid||"",this.use=P.use||"",this.usehref=P.usehref||""}};cY=class cY extends g{constructor(P){super(X1,"stipple",!0),this.id=P.id||"",this.rate=A1({data:P.rate,defaultValue:50,validate:(Z)=>Z>=0&&Z<=100}),this.use=P.use||"",this.usehref=P.usehref||"",this.color=null,this.extras=null}[u1](P){let Z=this.rate/100;return s1.makeHexColor(Math.round(P.value.r*(1-Z)+this.value.r*Z),Math.round(P.value.g*(1-Z)+this.value.g*Z),Math.round(P.value.b*(1-Z)+this.value.b*Z))}};oq=class oq extends g{constructor(P){super(X1,"subform",!0),this.access=i(P.access,["open","nonInteractive","protected","readOnly"]),this.allowMacro=A1({data:P.allowMacro,defaultValue:0,validate:(Z)=>Z===1}),this.anchorType=i(P.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=A1({data:P.colSpan,defaultValue:1,validate:(Z)=>Z>=1||Z===-1}),this.columnWidths=(P.columnWidths||"").trim().split(/\s+/).map((Z)=>Z==="-1"?-1:$1(Z)),this.h=P.h?$1(P.h):"",this.hAlign=i(P.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=P.id||"",this.layout=i(P.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),this.locale=P.locale||"",this.maxH=$1(P.maxH,"0pt"),this.maxW=$1(P.maxW,"0pt"),this.mergeMode=i(P.mergeMode,["consumeData","matchTemplate"]),this.minH=$1(P.minH,"0pt"),this.minW=$1(P.minW,"0pt"),this.name=P.name||"",this.presence=i(P.presence,["visible","hidden","inactive","invisible"]),this.relevant=d0(P.relevant),this.restoreState=i(P.restoreState,["manual","auto"]),this.scope=i(P.scope,["name","none"]),this.use=P.use||"",this.usehref=P.usehref||"",this.w=P.w?$1(P.w):"",this.x=$1(P.x,"0pt"),this.y=$1(P.y,"0pt"),this.assist=null,this.bind=null,this.bookend=null,this.border=null,this.break=null,this.calculate=null,this.desc=null,this.extras=null,this.keep=null,this.margin=null,this.occur=null,this.overflow=null,this.pageSet=null,this.para=null,this.traversal=null,this.validate=null,this.variables=null,this.area=new T,this.breakAfter=new T,this.breakBefore=new T,this.connect=new T,this.draw=new T,this.event=new T,this.exObject=new T,this.exclGroup=new T,this.field=new T,this.proto=new T,this.setProperty=new T,this.subform=new T,this.subformSet=new T}[I8](){let P=this[L1]();return P instanceof HP?P[I8]():P}[E5](){return!0}[C4](){return this.layout.endsWith("-tb")&&this[u].attempt===0&&this[u].numberInLine>0||this[L1]()[C4]()}*[L6](){yield*yq(this)}[Z2](){return VQ(this)}[k5](P,Z){xQ(this,P,Z)}[C5](){return HQ(this)}[L4](){let P=this[I8]();return!!P[L4]()&&(this[u]._isSplittable!==void 0?this[u]._isSplittable:this.layout==="position"||this.layout.includes("row")||this.keep&&this.keep.intact!=="none"?(this[u]._isSplittable=!1,!1):(!P.layout?.endsWith("-tb")||P[u].numberInLine===0)&&(this[u]._isSplittable=!0,!0))}[x1](P){if(KP(this),this.break){if(this.break.after!=="auto"||this.break.afterTarget!==""){let V=new Eq({targetType:this.break.after,target:this.break.afterTarget,startNew:this.break.startNew.toString()});V[e1]=this[e1],this[Q8](V),this.breakAfter.push(V)}if(this.break.before!=="auto"||this.break.beforeTarget!==""){let V=new uq({targetType:this.break.before,target:this.break.beforeTarget,startNew:this.break.startNew.toString()});V[e1]=this[e1],this[Q8](V),this.breakBefore.push(V)}if(this.break.overflowTarget!==""){let V=new rq({target:this.break.overflowTarget,leader:this.break.overflowLeader,trailer:this.break.overflowTrailer});V[e1]=this[e1],this[Q8](V),this.overflow.push(V)}this[s4](this.break),this.break=null}if(this.presence==="hidden"||this.presence==="inactive")return K1.EMPTY;if((this.breakBefore.children.length>1||this.breakAfter.children.length>1)&&v("XFA - Several breakBefore or breakAfter in subforms: please file a bug."),this.breakBefore.children.length>=1){let V=this.breakBefore.children[0];if(qR(V))return K1.breakNode(V)}if(this[u]?.afterBreakAfter)return K1.EMPTY;JP(this);let Z=[],q={id:this[a1],class:[]};mq(this,q.class),this[u]||=Object.create(null),Object.assign(this[u],{children:Z,line:null,attributes:q,attempt:0,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,P.width),height:Math.min(this.h||1/0,P.height)},width:0,height:0,prevHeight:0,currentWidth:0});let X=this[K8](),z=X[u].noLayoutFailure,R=this[L4]();if(R||IP(this),!UP(this,P))return K1.FAILURE;let f=new Set(["area","draw","exclGroup","field","subform","subformSet"]);if(this.layout.includes("row")){let V=this[I8]().columnWidths;Array.isArray(V)&&V.length>0&&(this[u].columnWidths=V,this[u].currentColumn=0)}let G=q0(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),Q=["xfaSubform"],Y=_Q(this);if(Y&&Q.push(Y),q.style=G,q.class=Q,this.name&&(q.xfaName=this.name),this.overflow){let V=this.overflow[u8]();V.addLeader&&(V.addLeader=!1,XR(this,V.leader,P))}this[F6]();let W=this.layout==="lr-tb"||this.layout==="rl-tb",$=W?2:1;for(;this[u].attempt<$;this[u].attempt++){W&&this[u].attempt===1&&(this[u].numberInLine=0);let V=this[a4]({filter:f,include:!0});if(V.success)break;if(V.isBreak())return this[Y0](),V;if(W&&this[u].attempt===0&&this[u].numberInLine===0&&!X[u].noLayoutFailure){this[u].attempt=$;break}}if(this[Y0](),R||jP(this),X[u].noLayoutFailure=z,this[u].attempt===$)return this.overflow&&(this[K8]()[u].overflowNode=this.overflow),R||delete this[u],K1.FAILURE;if(this.overflow){let V=this.overflow[u8]();V.addTrailer&&(V.addTrailer=!1,XR(this,V.trailer,P))}let _=0,J=0;this.margin&&(_=this.margin.leftInset+this.margin.rightInset,J=this.margin.topInset+this.margin.bottomInset);let U=Math.max(this[u].width+_,this.w||0),K=Math.max(this[u].height+J,this.h||0),I=[this.x,this.y,U,K];if(this.w===""&&(G.width=M1(U)),this.h===""&&(G.height=M1(K)),(G.width==="0px"||G.height==="0px")&&Z.length===0)return K1.EMPTY;let B={name:"div",attributes:q,children:Z};BP(this,q);let j=K1.success(T5(this,B),I);if(this.breakAfter.children.length>=1){let V=this.breakAfter.children[0];if(qR(V))return this[u].afterBreakAfter=j,K1.breakNode(V)}return delete this[u],j}};HP=class HP extends g{constructor(P){super(X1,"subformSet",!0),this.id=P.id||"",this.name=P.name||"",this.relation=i(P.relation,["ordered","choice","unordered"]),this.relevant=d0(P.relevant),this.use=P.use||"",this.usehref=P.usehref||"",this.bookend=null,this.break=null,this.desc=null,this.extras=null,this.occur=null,this.overflow=null,this.breakAfter=new T,this.breakBefore=new T,this.subform=new T,this.subformSet=new T}*[L6](){yield*yq(this)}[I8](){let P=this[L1]();for(;!(P instanceof oq);)P=P[L1]();return P}[E5](){return!0}};sY=class sY extends f8{constructor(P){super(X1,"subjectDN"),this.delimiter=P.delimiter||",",this.id=P.id||"",this.name=P.name||"",this.use=P.use||"",this.usehref=P.usehref||""}[P8](){this[a]=new Map(this[a].split(this.delimiter).map((P)=>((P=P.split("=",2))[0]=P[0].trim(),P)))}};hY=class hY extends g{constructor(P){super(X1,"subjectDNs",!0),this.id=P.id||"",this.type=i(P.type,["optional","required"]),this.use=P.use||"",this.usehref=P.usehref||"",this.subjectDN=new T}};rY=class rY extends g{constructor(P){super(X1,"submit",!0),this.embedPDF=A1({data:P.embedPDF,defaultValue:0,validate:(Z)=>Z===1}),this.format=i(P.format,["xdp","formdata","pdf","urlencoded","xfd","xml"]),this.id=P.id||"",this.target=P.target||"",this.textEncoding=$P({data:P.textEncoding?P.textEncoding.toLowerCase():"",defaultValue:"",validate:(Z)=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(Z)||Z.match(/iso-8859-\d{2}/)}),this.use=P.use||"",this.usehref=P.usehref||"",this.xdpContent=P.xdpContent||"",this.encrypt=null,this.encryptData=new T,this.signData=new T}};MP=class MP extends g{constructor(P){super(X1,"template",!0),this.baseProfile=i(P.baseProfile,["full","interactiveForms"]),this.extras=null,this.subform=new T}[P8](){this.subform.children.length===0&&v("XFA - No subforms in template node."),this.subform.children.length>=2&&v("XFA - Several subforms in template node: please file a bug."),this[y0]=5000}[L4](){return!0}[H4](P,Z){return P.startsWith("#")?[this[n5].get(P.slice(1))]:D4(this,Z,P,!0,!0)}*[XQ](){if(!this.subform.children.length)return K1.success({name:"div",children:[]});this[u]={overflowNode:null,firstUnsplittable:null,currentContentArea:null,currentPageArea:null,noLayoutFailure:!1,pageNumber:1,pagePosition:"first",oddOrEven:"odd",blankOrNotBlank:"nonBlank",paraStack:[]};let P=this.subform.children[0];P.pageSet[X6]();let Z=P.pageSet.pageArea.children,q={name:"div",children:[]},X=null,z=null,R=null;if(P.breakBefore.children.length>=1?(z=P.breakBefore.children[0],R=z.target):P.subform.children.length>=1&&P.subform.children[0].breakBefore.children.length>=1?(z=P.subform.children[0].breakBefore.children[0],R=z.target):P.break?.beforeTarget?(z=P.break,R=z.beforeTarget):P.subform.children.length>=1&&P.subform.children[0].break?.beforeTarget&&(z=P.subform.children[0].break,R=z.beforeTarget),z){let J=this[H4](R,z[L1]());J instanceof y5&&(X=J,z[u]={})}X||=Z[0],X[u]={numberOfUse:1};let f=X[L1](),G;f[u]={numberOfUse:1,pageIndex:f.pageArea.children.indexOf(X),pageSetIndex:0};let Q=null,Y=null,W=!0,$=0,_=0;for(;;){if(W)$=0;else if(q.children.pop(),++$===3)return v("XFA - Something goes wrong: please file a bug."),q;G=null,this[u].currentPageArea=X;let J=X[x1]().html;q.children.push(J),Q&&(this[u].noLayoutFailure=!0,J.children.push(Q[x1](X[u].space).html),Q=null),Y&&(this[u].noLayoutFailure=!0,J.children.push(Y[x1](X[u].space).html),Y=null);let U=X.contentArea.children,K=J.children.filter((B)=>B.attributes.class.includes("xfaContentarea"));W=!1,this[u].firstUnsplittable=null,this[u].noLayoutFailure=!1;let I=(B)=>{let j=P[Z2]();j&&(W||=j.children?.length>0,K[B].children.push(j))};for(let B=_,j=U.length;B<j;B++){let V=this[u].currentContentArea=U[B],H={width:V.w,height:V.h};_=0,Q&&(K[B].children.push(Q[x1](H).html),Q=null),Y&&(K[B].children.push(Y[x1](H).html),Y=null);let M=P[x1](H);if(M.success)return M.html?(W||=M.html.children?.length>0,K[B].children.push(M.html)):!W&&q.children.length>1&&q.children.pop(),q;if(M.isBreak()){let x=M.breakNode;if(I(B),x.targetType==="auto")continue;x.leader&&(Q=this[H4](x.leader,x[L1]()),Q=Q?Q[0]:null),x.trailer&&(Y=this[H4](x.trailer,x[L1]()),Y=Y?Y[0]:null),x.targetType==="pageArea"?(G=x[u].target,B=1/0):x[u].target?(G=x[u].target,_=x[u].index+1,B=1/0):B=x[u].index;continue}if(this[u].overflowNode){let x=this[u].overflowNode;this[u].overflowNode=null;let A=x[u8](),k=A.target;A.addLeader=A.leader!==null,A.addTrailer=A.trailer!==null,I(B);let b=B;if(B=1/0,k instanceof y5)G=k;else if(k instanceof VP){let O=U.indexOf(k);O!==-1?O>b?B=O-1:_=O:(G=k[L1](),_=G.contentArea.children.indexOf(k))}continue}I(B)}this[u].pageNumber+=1,G&&(G[d7]()?G[u].numberOfUse+=1:G=null),X=G||X[K4](),yield null}}};aq=class aq extends f8{constructor(P){super(X1,"text"),this.id=P.id||"",this.maxChars=A1({data:P.maxChars,defaultValue:0,validate:(Z)=>Z>=0}),this.name=P.name||"",this.rid=P.rid||"",this.use=P.use||"",this.usehref=P.usehref||""}[QP](){return!0}[q4](P){return P[B8]===j8.xhtml.id?(this[a]=P,!0):(v(`XFA - Invalid content in Text: ${P[d1]}.`),!1)}[b4](P){this[a]instanceof g||super[b4](P)}[P8](){typeof this[a]=="string"&&(this[a]=this[a].replaceAll(`\r
|
|
32
|
+
`,`
|
|
33
|
+
`))}[u8](){return typeof this[a]=="string"?this[a].split(/[\u2029\u2028\n]/).filter((P)=>!!P).join(`
|
|
34
|
+
`):this[a][A8]()}[x1](P){if(typeof this[a]=="string"){let Z=e4(this[a]).html;return this[a].includes("\u2029")?(Z.name="div",Z.children=[],this[a].split("\u2029").map((q)=>q.split(/[\u2028\n]/).flatMap((X)=>[{name:"span",value:X},{name:"br"}])).forEach((q)=>{Z.children.push({name:"p",children:q})})):/[\u2028\n]/.test(this[a])&&(Z.name="div",Z.children=[],this[a].split(/[\u2028\n]/).forEach((q)=>{Z.children.push({name:"span",value:q},{name:"br"})})),K1.success(Z)}return this[a][x1](P)}};nq=class nq extends g{constructor(P){super(X1,"textEdit",!0),this.allowRichText=A1({data:P.allowRichText,defaultValue:0,validate:(Z)=>Z===1}),this.hScrollPolicy=i(P.hScrollPolicy,["auto","off","on"]),this.id=P.id||"",this.multiLine=A1({data:P.multiLine,defaultValue:"",validate:(Z)=>Z===0||Z===1}),this.use=P.use||"",this.usehref=P.usehref||"",this.vScrollPolicy=i(P.vScrollPolicy,["auto","off","on"]),this.border=null,this.comb=null,this.extras=null,this.margin=null}[x1](P){let Z=q0(this,"border","font","margin"),q,X=this[L1]()[L1]();return this.multiLine===""&&(this.multiLine=X instanceof sq?1:0),q=this.multiLine===1?{name:"textarea",attributes:{dataId:X[v0]?.[a1]||X[a1],fieldId:X[a1],class:["xfaTextfield"],style:Z,"aria-label":O5(X),"aria-required":!1}}:{name:"input",attributes:{type:"text",dataId:X[v0]?.[a1]||X[a1],fieldId:X[a1],class:["xfaTextfield"],style:Z,"aria-label":O5(X),"aria-required":!1}},q2(X)&&(q.attributes["aria-required"]=!0,q.attributes.required=!0),K1.success({name:"label",attributes:{class:["xfaLabel"]},children:[q]})}};lY=class lY extends F1{constructor(P){super(X1,"time"),this.id=P.id||"",this.name=P.name||"",this.use=P.use||"",this.usehref=P.usehref||""}[P8](){let P=this[a].trim();this[a]=P?new Date(P):null}[x1](P){return e4(this[a]?this[a].toString():"")}};oY=class oY extends g{constructor(P){super(X1,"timeStamp"),this.id=P.id||"",this.server=P.server||"",this.type=i(P.type,["optional","required"]),this.use=P.use||"",this.usehref=P.usehref||""}};aY=class aY extends F1{constructor(P){super(X1,"toolTip"),this.id=P.id||"",this.rid=P.rid||"",this.use=P.use||"",this.usehref=P.usehref||""}};nY=class nY extends g{constructor(P){super(X1,"traversal",!0),this.id=P.id||"",this.use=P.use||"",this.usehref=P.usehref||"",this.extras=null,this.traverse=new T}};iY=class iY extends g{constructor(P){super(X1,"traverse",!0),this.id=P.id||"",this.operation=i(P.operation,["next","back","down","first","left","right","up"]),this.ref=P.ref||"",this.use=P.use||"",this.usehref=P.usehref||"",this.extras=null,this.script=null}get name(){return this.operation}[g7](){return!1}};AP=class AP extends g{constructor(P){super(X1,"ui",!0),this.id=P.id||"",this.use=P.use||"",this.usehref=P.usehref||"",this.extras=null,this.picture=null,this.barcode=null,this.button=null,this.checkButton=null,this.choiceList=null,this.dateTimeEdit=null,this.defaultUi=null,this.imageEdit=null,this.numericEdit=null,this.passwordEdit=null,this.signature=null,this.textEdit=null}[u8](){if(this[u]===void 0){for(let P of Object.getOwnPropertyNames(this)){if(P==="extras"||P==="picture")continue;let Z=this[P];if(Z instanceof g)return this[u]=Z,Z}this[u]=null}return this[u]}[x1](P){let Z=this[u8]();return Z?Z[x1](P):K1.EMPTY}};tY=class tY extends g{constructor(P){super(X1,"validate",!0),this.formatTest=i(P.formatTest,["warning","disabled","error"]),this.id=P.id||"",this.nullTest=i(P.nullTest,["disabled","error","warning"]),this.scriptTest=i(P.scriptTest,["error","disabled","warning"]),this.use=P.use||"",this.usehref=P.usehref||"",this.extras=null,this.message=null,this.picture=null,this.script=null}};LP=class LP extends g{constructor(P){super(X1,"value",!0),this.id=P.id||"",this.override=A1({data:P.override,defaultValue:0,validate:(Z)=>Z===1}),this.relevant=d0(P.relevant),this.use=P.use||"",this.usehref=P.usehref||"",this.arc=null,this.boolean=null,this.date=null,this.dateTime=null,this.decimal=null,this.exData=null,this.float=null,this.image=null,this.integer=null,this.line=null,this.rectangle=null,this.text=null,this.time=null}[$0](P){let Z=this[L1]();if(Z instanceof xP&&Z.ui?.imageEdit)return this.image||(this.image=new WY({}),this[Q8](this.image)),void(this.image[a]=P[a]);let q=P[d1];if(this[q]===null){for(let X of Object.getOwnPropertyNames(this)){let z=this[X];z instanceof g&&(this[X]=null,this[s4](z))}this[P[d1]]=P,this[Q8](P)}else this[q][a]=P[a]}[A8](){if(this.exData)return typeof this.exData[a]=="string"?this.exData[a].trim():this.exData[a][A8]().trim();for(let P of Object.getOwnPropertyNames(this)){if(P==="image")continue;let Z=this[P];if(Z instanceof g)return(Z[a]||"").toString().trim()}return null}[x1](P){for(let Z of Object.getOwnPropertyNames(this)){let q=this[Z];if(q instanceof g)return q[x1](P)}return K1.EMPTY}};eY=class eY extends g{constructor(P){super(X1,"variables",!0),this.id=P.id||"",this.use=P.use||"",this.usehref=P.usehref||"",this.boolean=new T,this.date=new T,this.dateTime=new T,this.decimal=new T,this.exData=new T,this.float=new T,this.image=new T,this.integer=new T,this.manifest=new T,this.script=new T,this.text=new T,this.time=new T}[g7](){return!0}};D3=class D3{static[g0](P,Z){if(D3.hasOwnProperty(P)){let q=D3[P](Z);return q[qQ](Z),q}}static appearanceFilter(P){return new MQ(P)}static arc(P){return new Dq(P)}static area(P){return new AQ(P)}static assist(P){return new LQ(P)}static barcode(P){return new bQ(P)}static bind(P){return new kQ(P)}static bindItems(P){return new p3(P)}static bookend(P){return new CQ(P)}static boolean(P){return new TQ(P)}static border(P){return new wq(P)}static break(P){return new NQ(P)}static breakAfter(P){return new Eq(P)}static breakBefore(P){return new uq(P)}static button(P){return new vQ(P)}static calculate(P){return new FQ(P)}static caption(P){return new SQ(P)}static certificate(P){return new mQ(P)}static certificates(P){return new pQ(P)}static checkButton(P){return new gq(P)}static choiceList(P){return new dq(P)}static color(P){return new OQ(P)}static comb(P){return new yQ(P)}static connect(P){return new DQ(P)}static contentArea(P){return new VP(P)}static corner(P){return new cq(P)}static date(P){return new wQ(P)}static dateTime(P){return new EQ(P)}static dateTimeEdit(P){return new uQ(P)}static decimal(P){return new gQ(P)}static defaultUi(P){return new dQ(P)}static desc(P){return new cQ(P)}static digestMethod(P){return new sQ(P)}static digestMethods(P){return new hQ(P)}static draw(P){return new sq(P)}static edge(P){return new m6(P)}static encoding(P){return new rQ(P)}static encodings(P){return new lQ(P)}static encrypt(P){return new oQ(P)}static encryptData(P){return new aQ(P)}static encryption(P){return new nQ(P)}static encryptionMethod(P){return new iQ(P)}static encryptionMethods(P){return new tQ(P)}static event(P){return new bV(P)}static exData(P){return new eQ(P)}static exObject(P){return new PY(P)}static exclGroup(P){return new hq(P)}static execute(P){return new ZY(P)}static extras(P){return new qY(P)}static field(P){return new xP(P)}static fill(P){return new XY(P)}static filter(P){return new zY(P)}static float(P){return new RY(P)}static font(P){return new fY(P)}static format(P){return new GY(P)}static handler(P){return new QY(P)}static hyphenation(P){return new YY(P)}static image(P){return new WY(P)}static imageEdit(P){return new $Y(P)}static integer(P){return new _Y(P)}static issuers(P){return new JY(P)}static items(P){return new O3(P)}static keep(P){return new UY(P)}static keyUsage(P){return new KY(P)}static line(P){return new BY(P)}static linear(P){return new IY(P)}static lockDocument(P){return new jY(P)}static manifest(P){return new VY(P)}static margin(P){return new xY(P)}static mdp(P){return new HY(P)}static medium(P){return new MY(P)}static message(P){return new AY(P)}static numericEdit(P){return new LY(P)}static occur(P){return new bY(P)}static oid(P){return new kY(P)}static oids(P){return new CY(P)}static overflow(P){return new rq(P)}static pageArea(P){return new y5(P)}static pageSet(P){return new c7(P)}static para(P){return new TY(P)}static passwordEdit(P){return new NY(P)}static pattern(P){return new vY(P)}static picture(P){return new FY(P)}static proto(P){return new SY(P)}static radial(P){return new mY(P)}static reason(P){return new pY(P)}static reasons(P){return new OY(P)}static rectangle(P){return new lq(P)}static ref(P){return new yY(P)}static script(P){return new DY(P)}static setProperty(P){return new y3(P)}static signData(P){return new wY(P)}static signature(P){return new EY(P)}static signing(P){return new uY(P)}static solid(P){return new gY(P)}static speak(P){return new dY(P)}static stipple(P){return new cY(P)}static subform(P){return new oq(P)}static subformSet(P){return new HP(P)}static subjectDN(P){return new sY(P)}static subjectDNs(P){return new hY(P)}static submit(P){return new rY(P)}static template(P){return new MP(P)}static text(P){return new aq(P)}static textEdit(P){return new nq(P)}static time(P){return new lY(P)}static timeStamp(P){return new oY(P)}static toolTip(P){return new aY(P)}static traversal(P){return new nY(P)}static traverse(P){return new iY(P)}static ui(P){return new AP(P)}static validate(P){return new tY(P)}static value(P){return new LP(P)}static variables(P){return new eY(P)}};zR=j8.datasets.id;P1=j8.config.id;qW=class qW extends g{constructor(P){super(P1,"acrobat",!0),this.acrobat7=null,this.autoSave=null,this.common=null,this.validate=null,this.validateApprovalSignatures=null,this.submitUrl=new T}};XW=class XW extends g{constructor(P){super(P1,"acrobat7",!0),this.dynamicRender=null}};zW=class zW extends r1{constructor(P){super(P1,"ADBE_JSConsole",["delegate","Enable","Disable"])}};RW=class RW extends r1{constructor(P){super(P1,"ADBE_JSDebugger",["delegate","Enable","Disable"])}};fW=class fW extends M8{constructor(P){super(P1,"addSilentPrint")}};GW=class GW extends M8{constructor(P){super(P1,"addViewerPreferences")}};QW=class QW extends Fq{constructor(P){super(P1,"adjustData")}};YW=class YW extends S0{constructor(P){super(P1,"adobeExtensionLevel",0,(Z)=>Z>=1&&Z<=8)}};WW=class WW extends g{constructor(P){super(P1,"agent",!0),this.name=P.name?P.name.trim():"",this.common=new T}};$W=class $W extends f8{constructor(P){super(P1,"alwaysEmbed")}};_W=class _W extends F1{constructor(P){super(P1,"amd")}};JW=class JW extends g{constructor(P){super(P1,"area"),this.level=A1({data:P.level,defaultValue:0,validate:(Z)=>Z>=1&&Z<=3}),this.name=i(P.name,["","barcode","coreinit","deviceDriver","font","general","layout","merge","script","signature","sourceSet","templateCache"])}};UW=class UW extends r1{constructor(P){super(P1,"attributes",["preserve","delegate","ignore"])}};KW=class KW extends r1{constructor(P){super(P1,"autoSave",["disabled","enabled"])}};BW=class BW extends F1{constructor(P){super(P1,"base")}};IW=class IW extends g{constructor(P){super(P1,"batchOutput"),this.format=i(P.format,["none","concat","zip","zipCompress"])}};jW=class jW extends f8{constructor(P){super(P1,"behaviorOverride")}[P8](){this[a]=new Map(this[a].trim().split(/\s+/).filter((P)=>P.includes(":")).map((P)=>P.split(":",2)))}};VW=class VW extends g{constructor(P){super(P1,"cache",!0),this.templateCache=null}};xW=class xW extends M8{constructor(P){super(P1,"change")}};HW=class HW extends g{constructor(P){super(P1,"common",!0),this.data=null,this.locale=null,this.localeSet=null,this.messaging=null,this.suppressBanner=null,this.template=null,this.validationMessaging=null,this.versionControl=null,this.log=new T}};MW=class MW extends g{constructor(P){super(P1,"compress"),this.scope=i(P.scope,["imageOnly","document"])}};AW=class AW extends M8{constructor(P){super(P1,"compressLogicalStructure")}};LW=class LW extends Fq{constructor(P){super(P1,"compressObjectStream")}};bW=class bW extends g{constructor(P){super(P1,"compression",!0),this.compressLogicalStructure=null,this.compressObjectStream=null,this.level=null,this.type=null}};kW=class kW extends g{constructor(P){super(P1,"config",!0),this.acrobat=null,this.present=null,this.trace=null,this.agent=new T}};CW=class CW extends r1{constructor(P){super(P1,"conformance",["A","B"])}};TW=class TW extends M8{constructor(P){super(P1,"contentCopy")}};NW=class NW extends S0{constructor(P){super(P1,"copies",1,(Z)=>Z>=1)}};vW=class vW extends F1{constructor(P){super(P1,"creator")}};FW=class FW extends S0{constructor(P){super(P1,"currentPage",0,(Z)=>Z>=0)}};SW=class SW extends g{constructor(P){super(P1,"data",!0),this.adjustData=null,this.attributes=null,this.incrementalLoad=null,this.outputXSL=null,this.range=null,this.record=null,this.startNode=null,this.uri=null,this.window=null,this.xsl=null,this.excludeNS=new T,this.transform=new T}};mW=class mW extends g{constructor(P){super(P1,"debug",!0),this.uri=null}};pW=class pW extends f8{constructor(P){super(P1,"defaultTypeface"),this.writingScript=i(P.writingScript,["*","Arabic","Cyrillic","EastEuropeanRoman","Greek","Hebrew","Japanese","Korean","Roman","SimplifiedChinese","Thai","TraditionalChinese","Vietnamese"])}};OW=class OW extends r1{constructor(P){super(P1,"destination",["pdf","pcl","ps","webClient","zpl"])}};yW=class yW extends M8{constructor(P){super(P1,"documentAssembly")}};DW=class DW extends g{constructor(P){super(P1,"driver",!0),this.name=P.name?P.name.trim():"",this.fontInfo=null,this.xdc=null}};wW=class wW extends r1{constructor(P){super(P1,"duplexOption",["simplex","duplexFlipLongEdge","duplexFlipShortEdge"])}};EW=class EW extends r1{constructor(P){super(P1,"dynamicRender",["forbidden","required"])}};uW=class uW extends M8{constructor(P){super(P1,"embed")}};gW=class gW extends M8{constructor(P){super(P1,"encrypt")}};dW=class dW extends g{constructor(P){super(P1,"encryption",!0),this.encrypt=null,this.encryptionLevel=null,this.permissions=null}};cW=class cW extends r1{constructor(P){super(P1,"encryptionLevel",["40bit","128bit"])}};sW=class sW extends F1{constructor(P){super(P1,"enforce")}};hW=class hW extends g{constructor(P){super(P1,"equate"),this.force=A1({data:P.force,defaultValue:1,validate:(Z)=>Z===0}),this.from=P.from||"",this.to=P.to||""}};rW=class rW extends g{constructor(P){super(P1,"equateRange"),this.from=P.from||"",this.to=P.to||"",this._unicodeRange=P.unicodeRange||""}get unicodeRange(){let P=[],Z=/U\+([0-9a-fA-F]+)/,q=this._unicodeRange;for(let X of q.split(",").map((z)=>z.trim()).filter((z)=>!!z))X=X.split("-",2).map((z)=>{let R=z.match(Z);return R?parseInt(R[1],16):0}),X.length===1&&X.push(X[0]),P.push(X);return q1(this,"unicodeRange",P)}};lW=class lW extends f8{constructor(P){super(P1,"exclude")}[P8](){this[a]=this[a].trim().split(/\s+/).filter((P)=>P&&["calculate","close","enter","exit","initialize","ready","validate"].includes(P))}};oW=class oW extends F1{constructor(P){super(P1,"excludeNS")}};aW=class aW extends r1{constructor(P){super(P1,"flipLabel",["usePrinterSetting","on","off"])}};nW=class nW extends g{constructor(P){super(P1,"fontInfo",!0),this.embed=null,this.map=null,this.subsetBelow=null,this.alwaysEmbed=new T,this.defaultTypeface=new T,this.neverEmbed=new T}};iW=class iW extends M8{constructor(P){super(P1,"formFieldFilling")}};tW=class tW extends F1{constructor(P){super(P1,"groupParent")}};eW=class eW extends r1{constructor(P){super(P1,"ifEmpty",["dataValue","dataGroup","ignore","remove"])}};P$=class P$ extends F1{constructor(P){super(P1,"includeXDPContent")}};Z$=class Z$ extends r1{constructor(P){super(P1,"incrementalLoad",["none","forwardOnly"])}};q$=class q$ extends M8{constructor(P){super(P1,"incrementalMerge")}};X$=class X$ extends M8{constructor(P){super(P1,"interactive")}};z$=class z$ extends r1{constructor(P){super(P1,"jog",["usePrinterSetting","none","pageSet"])}};R$=class R$ extends g{constructor(P){super(P1,"labelPrinter",!0),this.name=i(P.name,["zpl","dpl","ipl","tcpl"]),this.batchOutput=null,this.flipLabel=null,this.fontInfo=null,this.xdc=null}};f$=class f$ extends r1{constructor(P){super(P1,"layout",["paginate","panel"])}};G$=class G$ extends S0{constructor(P){super(P1,"level",0,(Z)=>Z>0)}};Q$=class Q$ extends M8{constructor(P){super(P1,"linearized")}};Y$=class Y$ extends F1{constructor(P){super(P1,"locale")}};W$=class W$ extends F1{constructor(P){super(P1,"localeSet")}};$$=class $$ extends g{constructor(P){super(P1,"log",!0),this.mode=null,this.threshold=null,this.to=null,this.uri=null}};_$=class _$ extends g{constructor(P){super(P1,"map",!0),this.equate=new T,this.equateRange=new T}};J$=class J$ extends g{constructor(P){super(P1,"mediumInfo",!0),this.map=null}};U$=class U$ extends g{constructor(P){super(P1,"message",!0),this.msgId=null,this.severity=null}};K$=class K$ extends g{constructor(P){super(P1,"messaging",!0),this.message=new T}};B$=class B$ extends r1{constructor(P){super(P1,"mode",["append","overwrite"])}};I$=class I$ extends M8{constructor(P){super(P1,"modifyAnnots")}};j$=class j$ extends S0{constructor(P){super(P1,"msgId",1,(Z)=>Z>=1)}};V$=class V$ extends F1{constructor(P){super(P1,"nameAttr")}};x$=class x$ extends f8{constructor(P){super(P1,"neverEmbed")}};H$=class H$ extends S0{constructor(P){super(P1,"numberOfCopies",null,(Z)=>Z>=2&&Z<=5)}};M$=class M$ extends g{constructor(P){super(P1,"openAction",!0),this.destination=null}};A$=class A$ extends g{constructor(P){super(P1,"output",!0),this.to=null,this.type=null,this.uri=null}};L$=class L$ extends F1{constructor(P){super(P1,"outputBin")}};b$=class b$ extends g{constructor(P){super(P1,"outputXSL",!0),this.uri=null}};k$=class k$ extends r1{constructor(P){super(P1,"overprint",["none","both","draw","field"])}};C$=class C$ extends F1{constructor(P){super(P1,"packets")}[P8](){this[a]!=="*"&&(this[a]=this[a].trim().split(/\s+/).filter((P)=>["config","datasets","template","xfdf","xslt"].includes(P)))}};T$=class T$ extends g{constructor(P){super(P1,"pageOffset"),this.x=A1({data:P.x,defaultValue:"useXDCSetting",validate:(Z)=>!0}),this.y=A1({data:P.y,defaultValue:"useXDCSetting",validate:(Z)=>!0})}};N$=class N$ extends F1{constructor(P){super(P1,"pageRange")}[P8](){let P=this[a].trim().split(/\s+/).map((q)=>parseInt(q,10)),Z=[];for(let q=0,X=P.length;q<X;q+=2)Z.push(P.slice(q,q+2));this[a]=Z}};v$=class v$ extends r1{constructor(P){super(P1,"pagination",["simplex","duplexShortEdge","duplexLongEdge"])}};F$=class F$ extends r1{constructor(P){super(P1,"paginationOverride",["none","forceDuplex","forceDuplexLongEdge","forceDuplexShortEdge","forceSimplex"])}};S$=class S$ extends S0{constructor(P){super(P1,"part",1,(Z)=>!1)}};m$=class m$ extends g{constructor(P){super(P1,"pcl",!0),this.name=P.name||"",this.batchOutput=null,this.fontInfo=null,this.jog=null,this.mediumInfo=null,this.outputBin=null,this.pageOffset=null,this.staple=null,this.xdc=null}};p$=class p$ extends g{constructor(P){super(P1,"pdf",!0),this.name=P.name||"",this.adobeExtensionLevel=null,this.batchOutput=null,this.compression=null,this.creator=null,this.encryption=null,this.fontInfo=null,this.interactive=null,this.linearized=null,this.openAction=null,this.pdfa=null,this.producer=null,this.renderPolicy=null,this.scriptModel=null,this.silentPrint=null,this.submitFormat=null,this.tagged=null,this.version=null,this.viewerPreferences=null,this.xdc=null}};O$=class O$ extends g{constructor(P){super(P1,"pdfa",!0),this.amd=null,this.conformance=null,this.includeXDPContent=null,this.part=null}};y$=class y$ extends g{constructor(P){super(P1,"permissions",!0),this.accessibleContent=null,this.change=null,this.contentCopy=null,this.documentAssembly=null,this.formFieldFilling=null,this.modifyAnnots=null,this.plaintextMetadata=null,this.print=null,this.printHighQuality=null}};D$=class D$ extends M8{constructor(P){super(P1,"pickTrayByPDFSize")}};w$=class w$ extends F1{constructor(P){super(P1,"picture")}};E$=class E$ extends M8{constructor(P){super(P1,"plaintextMetadata")}};u$=class u$ extends r1{constructor(P){super(P1,"presence",["preserve","dissolve","dissolveStructure","ignore","remove"])}};g$=class g$ extends g{constructor(P){super(P1,"present",!0),this.behaviorOverride=null,this.cache=null,this.common=null,this.copies=null,this.destination=null,this.incrementalMerge=null,this.layout=null,this.output=null,this.overprint=null,this.pagination=null,this.paginationOverride=null,this.script=null,this.validate=null,this.xdp=null,this.driver=new T,this.labelPrinter=new T,this.pcl=new T,this.pdf=new T,this.ps=new T,this.submitUrl=new T,this.webClient=new T,this.zpl=new T}};d$=class d$ extends M8{constructor(P){super(P1,"print")}};c$=class c$ extends M8{constructor(P){super(P1,"printHighQuality")}};s$=class s$ extends r1{constructor(P){super(P1,"printScaling",["appdefault","noScaling"])}};h$=class h$ extends F1{constructor(P){super(P1,"printerName")}};r$=class r$ extends F1{constructor(P){super(P1,"producer")}};l$=class l$ extends g{constructor(P){super(P1,"ps",!0),this.name=P.name||"",this.batchOutput=null,this.fontInfo=null,this.jog=null,this.mediumInfo=null,this.outputBin=null,this.staple=null,this.xdc=null}};kV=class extends f8{constructor(P){super(P1,"range")}[P8](){this[a]=this[a].split(",",2).map((P)=>P.split("-").map((Z)=>parseInt(Z.trim(),10))).filter((P)=>P.every((Z)=>!isNaN(Z))).map((P)=>(P.length===1&&P.push(P[0]),P))}};o$=class o$ extends f8{constructor(P){super(P1,"record")}[P8](){this[a]=this[a].trim();let P=parseInt(this[a],10);!isNaN(P)&&P>=0&&(this[a]=P)}};a$=class a$ extends f8{constructor(P){super(P1,"relevant")}[P8](){this[a]=this[a].trim().split(/\s+/)}};n$=class n$ extends f8{constructor(P){super(P1,"rename")}[P8](){this[a]=this[a].trim(),(this[a].toLowerCase().startsWith("xml")||new RegExp("[\\p{L}_][\\p{L}\\d._\\p{M}-]*","u").test(this[a]))&&v("XFA - Rename: invalid XFA name")}};i$=class i$ extends r1{constructor(P){super(P1,"renderPolicy",["server","client"])}};t$=class t$ extends r1{constructor(P){super(P1,"runScripts",["both","client","none","server"])}};e$=class e$ extends g{constructor(P){super(P1,"script",!0),this.currentPage=null,this.exclude=null,this.runScripts=null}};P_=class P_ extends r1{constructor(P){super(P1,"scriptModel",["XFA","none"])}};Z_=class Z_ extends r1{constructor(P){super(P1,"severity",["ignore","error","information","trace","warning"])}};q_=class q_ extends g{constructor(P){super(P1,"silentPrint",!0),this.addSilentPrint=null,this.printerName=null}};X_=class X_ extends g{constructor(P){super(P1,"staple"),this.mode=i(P.mode,["usePrinterSetting","on","off"])}};z_=class z_ extends F1{constructor(P){super(P1,"startNode")}};R_=class R_ extends S0{constructor(P){super(P1,"startPage",0,(Z)=>!0)}};f_=class f_ extends r1{constructor(P){super(P1,"submitFormat",["html","delegate","fdf","xml","pdf"])}};G_=class G_ extends F1{constructor(P){super(P1,"submitUrl")}};Q_=class Q_ extends S0{constructor(P){super(P1,"subsetBelow",100,(Z)=>Z>=0&&Z<=100)}};Y_=class Y_ extends M8{constructor(P){super(P1,"suppressBanner")}};W_=class W_ extends M8{constructor(P){super(P1,"tagged")}};$_=class $_ extends g{constructor(P){super(P1,"template",!0),this.base=null,this.relevant=null,this.startPage=null,this.uri=null,this.xsl=null}};__=class __ extends r1{constructor(P){super(P1,"threshold",["trace","error","information","warning"])}};J_=class J_ extends r1{constructor(P){super(P1,"to",["null","memory","stderr","stdout","system","uri"])}};U_=class U_ extends g{constructor(P){super(P1,"templateCache"),this.maxEntries=A1({data:P.maxEntries,defaultValue:5,validate:(Z)=>Z>=0})}};K_=class K_ extends g{constructor(P){super(P1,"trace",!0),this.area=new T}};B_=class B_ extends g{constructor(P){super(P1,"transform",!0),this.groupParent=null,this.ifEmpty=null,this.nameAttr=null,this.picture=null,this.presence=null,this.rename=null,this.whitespace=null}};I_=class I_ extends r1{constructor(P){super(P1,"type",["none","ascii85","asciiHex","ccittfax","flate","lzw","runLength","native","xdp","mergedXDP"])}};j_=class j_ extends F1{constructor(P){super(P1,"uri")}};V_=class V_ extends r1{constructor(P){super(P1,"validate",["preSubmit","prePrint","preExecute","preSave"])}};x_=class x_ extends f8{constructor(P){super(P1,"validateApprovalSignatures")}[P8](){this[a]=this[a].trim().split(/\s+/).filter((P)=>["docReady","postSign"].includes(P))}};H_=class H_ extends r1{constructor(P){super(P1,"validationMessaging",["allMessagesIndividually","allMessagesTogether","firstMessageOnly","noMessages"])}};M_=class M_ extends r1{constructor(P){super(P1,"version",["1.7","1.6","1.5","1.4","1.3","1.2"])}};A_=class A_ extends g{constructor(P){super(P1,"VersionControl"),this.outputBelow=i(P.outputBelow,["warn","error","update"]),this.sourceAbove=i(P.sourceAbove,["warn","error"]),this.sourceBelow=i(P.sourceBelow,["update","maintain"])}};L_=class L_ extends g{constructor(P){super(P1,"viewerPreferences",!0),this.ADBE_JSConsole=null,this.ADBE_JSDebugger=null,this.addViewerPreferences=null,this.duplexOption=null,this.enforce=null,this.numberOfCopies=null,this.pageRange=null,this.pickTrayByPDFSize=null,this.printScaling=null}};b_=class b_ extends g{constructor(P){super(P1,"webClient",!0),this.name=P.name?P.name.trim():"",this.fontInfo=null,this.xdc=null}};k_=class k_ extends r1{constructor(P){super(P1,"whitespace",["preserve","ltrim","normalize","rtrim","trim"])}};C_=class C_ extends f8{constructor(P){super(P1,"window")}[P8](){let P=this[a].split(",",2).map((Z)=>parseInt(Z.trim(),10));P.some((Z)=>isNaN(Z))?this[a]=[0,0]:(P.length===1&&P.push(P[0]),this[a]=P)}};T_=class T_ extends g{constructor(P){super(P1,"xdc",!0),this.uri=new T,this.xsl=new T}};N_=class N_ extends g{constructor(P){super(P1,"xdp",!0),this.packets=null}};v_=class v_ extends g{constructor(P){super(P1,"xsl",!0),this.debug=null,this.uri=null}};F_=class F_ extends g{constructor(P){super(P1,"zpl",!0),this.name=P.name?P.name.trim():"",this.batchOutput=null,this.flipLabel=null,this.fontInfo=null,this.xdc=null}};w3=class w3{static[g0](P,Z){if(w3.hasOwnProperty(P))return w3[P](Z)}static acrobat(P){return new qW(P)}static acrobat7(P){return new XW(P)}static ADBE_JSConsole(P){return new zW(P)}static ADBE_JSDebugger(P){return new RW(P)}static addSilentPrint(P){return new fW(P)}static addViewerPreferences(P){return new GW(P)}static adjustData(P){return new QW(P)}static adobeExtensionLevel(P){return new YW(P)}static agent(P){return new WW(P)}static alwaysEmbed(P){return new $W(P)}static amd(P){return new _W(P)}static area(P){return new JW(P)}static attributes(P){return new UW(P)}static autoSave(P){return new KW(P)}static base(P){return new BW(P)}static batchOutput(P){return new IW(P)}static behaviorOverride(P){return new jW(P)}static cache(P){return new VW(P)}static change(P){return new xW(P)}static common(P){return new HW(P)}static compress(P){return new MW(P)}static compressLogicalStructure(P){return new AW(P)}static compressObjectStream(P){return new LW(P)}static compression(P){return new bW(P)}static config(P){return new kW(P)}static conformance(P){return new CW(P)}static contentCopy(P){return new TW(P)}static copies(P){return new NW(P)}static creator(P){return new vW(P)}static currentPage(P){return new FW(P)}static data(P){return new SW(P)}static debug(P){return new mW(P)}static defaultTypeface(P){return new pW(P)}static destination(P){return new OW(P)}static documentAssembly(P){return new yW(P)}static driver(P){return new DW(P)}static duplexOption(P){return new wW(P)}static dynamicRender(P){return new EW(P)}static embed(P){return new uW(P)}static encrypt(P){return new gW(P)}static encryption(P){return new dW(P)}static encryptionLevel(P){return new cW(P)}static enforce(P){return new sW(P)}static equate(P){return new hW(P)}static equateRange(P){return new rW(P)}static exclude(P){return new lW(P)}static excludeNS(P){return new oW(P)}static flipLabel(P){return new aW(P)}static fontInfo(P){return new nW(P)}static formFieldFilling(P){return new iW(P)}static groupParent(P){return new tW(P)}static ifEmpty(P){return new eW(P)}static includeXDPContent(P){return new P$(P)}static incrementalLoad(P){return new Z$(P)}static incrementalMerge(P){return new q$(P)}static interactive(P){return new X$(P)}static jog(P){return new z$(P)}static labelPrinter(P){return new R$(P)}static layout(P){return new f$(P)}static level(P){return new G$(P)}static linearized(P){return new Q$(P)}static locale(P){return new Y$(P)}static localeSet(P){return new W$(P)}static log(P){return new $$(P)}static map(P){return new _$(P)}static mediumInfo(P){return new J$(P)}static message(P){return new U$(P)}static messaging(P){return new K$(P)}static mode(P){return new B$(P)}static modifyAnnots(P){return new I$(P)}static msgId(P){return new j$(P)}static nameAttr(P){return new V$(P)}static neverEmbed(P){return new x$(P)}static numberOfCopies(P){return new H$(P)}static openAction(P){return new M$(P)}static output(P){return new A$(P)}static outputBin(P){return new L$(P)}static outputXSL(P){return new b$(P)}static overprint(P){return new k$(P)}static packets(P){return new C$(P)}static pageOffset(P){return new T$(P)}static pageRange(P){return new N$(P)}static pagination(P){return new v$(P)}static paginationOverride(P){return new F$(P)}static part(P){return new S$(P)}static pcl(P){return new m$(P)}static pdf(P){return new p$(P)}static pdfa(P){return new O$(P)}static permissions(P){return new y$(P)}static pickTrayByPDFSize(P){return new D$(P)}static picture(P){return new w$(P)}static plaintextMetadata(P){return new E$(P)}static presence(P){return new u$(P)}static present(P){return new g$(P)}static print(P){return new d$(P)}static printHighQuality(P){return new c$(P)}static printScaling(P){return new s$(P)}static printerName(P){return new h$(P)}static producer(P){return new r$(P)}static ps(P){return new l$(P)}static range(P){return new kV(P)}static record(P){return new o$(P)}static relevant(P){return new a$(P)}static rename(P){return new n$(P)}static renderPolicy(P){return new i$(P)}static runScripts(P){return new t$(P)}static script(P){return new e$(P)}static scriptModel(P){return new P_(P)}static severity(P){return new Z_(P)}static silentPrint(P){return new q_(P)}static staple(P){return new X_(P)}static startNode(P){return new z_(P)}static startPage(P){return new R_(P)}static submitFormat(P){return new f_(P)}static submitUrl(P){return new G_(P)}static subsetBelow(P){return new Q_(P)}static suppressBanner(P){return new Y_(P)}static tagged(P){return new W_(P)}static template(P){return new $_(P)}static templateCache(P){return new U_(P)}static threshold(P){return new __(P)}static to(P){return new J_(P)}static trace(P){return new K_(P)}static transform(P){return new B_(P)}static type(P){return new I_(P)}static uri(P){return new j_(P)}static validate(P){return new V_(P)}static validateApprovalSignatures(P){return new x_(P)}static validationMessaging(P){return new H_(P)}static version(P){return new M_(P)}static versionControl(P){return new A_(P)}static viewerPreferences(P){return new L_(P)}static webClient(P){return new b_(P)}static whitespace(P){return new k_(P)}static window(P){return new C_(P)}static xdc(P){return new T_(P)}static xdp(P){return new N_(P)}static xsl(P){return new v_(P)}static zpl(P){return new F_(P)}};m0=j8.connectionSet.id;S_=class S_ extends g{constructor(P){super(m0,"connectionSet",!0),this.wsdlConnection=new T,this.xmlConnection=new T,this.xsdConnection=new T}};m_=class m_ extends g{constructor(P){super(m0,"effectiveInputPolicy"),this.id=P.id||"",this.name=P.name||"",this.use=P.use||"",this.usehref=P.usehref||""}};p_=class p_ extends g{constructor(P){super(m0,"effectiveOutputPolicy"),this.id=P.id||"",this.name=P.name||"",this.use=P.use||"",this.usehref=P.usehref||""}};O_=class O_ extends F1{constructor(P){super(m0,"operation"),this.id=P.id||"",this.input=P.input||"",this.name=P.name||"",this.output=P.output||"",this.use=P.use||"",this.usehref=P.usehref||""}};y_=class y_ extends F1{constructor(P){super(m0,"rootElement"),this.id=P.id||"",this.name=P.name||"",this.use=P.use||"",this.usehref=P.usehref||""}};D_=class D_ extends F1{constructor(P){super(m0,"soapAction"),this.id=P.id||"",this.name=P.name||"",this.use=P.use||"",this.usehref=P.usehref||""}};w_=class w_ extends F1{constructor(P){super(m0,"soapAddress"),this.id=P.id||"",this.name=P.name||"",this.use=P.use||"",this.usehref=P.usehref||""}};E_=class E_ extends F1{constructor(P){super(m0,"uri"),this.id=P.id||"",this.name=P.name||"",this.use=P.use||"",this.usehref=P.usehref||""}};u_=class u_ extends F1{constructor(P){super(m0,"wsdlAddress"),this.id=P.id||"",this.name=P.name||"",this.use=P.use||"",this.usehref=P.usehref||""}};g_=class g_ extends g{constructor(P){super(m0,"wsdlConnection",!0),this.dataDescription=P.dataDescription||"",this.name=P.name||"",this.effectiveInputPolicy=null,this.effectiveOutputPolicy=null,this.operation=null,this.soapAction=null,this.soapAddress=null,this.wsdlAddress=null}};d_=class d_ extends g{constructor(P){super(m0,"xmlConnection",!0),this.dataDescription=P.dataDescription||"",this.name=P.name||"",this.uri=null}};c_=class c_ extends g{constructor(P){super(m0,"xsdConnection",!0),this.dataDescription=P.dataDescription||"",this.name=P.name||"",this.rootElement=null,this.uri=null}};E3=class E3{static[g0](P,Z){if(E3.hasOwnProperty(P))return E3[P](Z)}static connectionSet(P){return new S_(P)}static effectiveInputPolicy(P){return new m_(P)}static effectiveOutputPolicy(P){return new p_(P)}static operation(P){return new O_(P)}static rootElement(P){return new y_(P)}static soapAction(P){return new D_(P)}static soapAddress(P){return new w_(P)}static uri(P){return new E_(P)}static wsdlAddress(P){return new u_(P)}static wsdlConnection(P){return new g_(P)}static xmlConnection(P){return new d_(P)}static xsdConnection(P){return new c_(P)}};CZ=j8.datasets.id;s_=class s_ extends X4{constructor(P){super(CZ,"data",P)}[j7](){return!0}};h_=class h_ extends g{constructor(P){super(CZ,"datasets",!0),this.data=null,this.Signature=null}[q4](P){let Z=P[d1];(Z==="data"&&P[B8]===CZ||Z==="Signature"&&P[B8]===j8.signature.id)&&(this[Z]=P),this[Q8](P)}};u3=class u3{static[g0](P,Z){if(u3.hasOwnProperty(P))return u3[P](Z)}static datasets(P){return new h_(P)}static data(P){return new s_(P)}};W8=j8.localeSet.id;r_=class r_ extends g{constructor(P){super(W8,"calendarSymbols",!0),this.name="gregorian",this.dayNames=new T(2),this.eraNames=null,this.meridiemNames=null,this.monthNames=new T(2)}};l_=class l_ extends F1{constructor(P){super(W8,"currencySymbol"),this.name=i(P.name,["symbol","isoname","decimal"])}};o_=class o_ extends g{constructor(P){super(W8,"currencySymbols",!0),this.currencySymbol=new T(3)}};a_=class a_ extends F1{constructor(P){super(W8,"datePattern"),this.name=i(P.name,["full","long","med","short"])}};n_=class n_ extends g{constructor(P){super(W8,"datePatterns",!0),this.datePattern=new T(4)}};i_=class i_ extends f8{constructor(P){super(W8,"dateTimeSymbols")}};t_=class t_ extends F1{constructor(P){super(W8,"day")}};e_=class e_ extends g{constructor(P){super(W8,"dayNames",!0),this.abbr=A1({data:P.abbr,defaultValue:0,validate:(Z)=>Z===1}),this.day=new T(7)}};PJ=class PJ extends F1{constructor(P){super(W8,"era")}};ZJ=class ZJ extends g{constructor(P){super(W8,"eraNames",!0),this.era=new T(2)}};qJ=class qJ extends g{constructor(P){super(W8,"locale",!0),this.desc=P.desc||"",this.name="isoname",this.calendarSymbols=null,this.currencySymbols=null,this.datePatterns=null,this.dateTimeSymbols=null,this.numberPatterns=null,this.numberSymbols=null,this.timePatterns=null,this.typeFaces=null}};XJ=class XJ extends g{constructor(P){super(W8,"localeSet",!0),this.locale=new T}};zJ=class zJ extends F1{constructor(P){super(W8,"meridiem")}};RJ=class RJ extends g{constructor(P){super(W8,"meridiemNames",!0),this.meridiem=new T(2)}};fJ=class fJ extends F1{constructor(P){super(W8,"month")}};GJ=class GJ extends g{constructor(P){super(W8,"monthNames",!0),this.abbr=A1({data:P.abbr,defaultValue:0,validate:(Z)=>Z===1}),this.month=new T(12)}};QJ=class QJ extends F1{constructor(P){super(W8,"numberPattern"),this.name=i(P.name,["full","long","med","short"])}};YJ=class YJ extends g{constructor(P){super(W8,"numberPatterns",!0),this.numberPattern=new T(4)}};WJ=class WJ extends F1{constructor(P){super(W8,"numberSymbol"),this.name=i(P.name,["decimal","grouping","percent","minus","zero"])}};$J=class $J extends g{constructor(P){super(W8,"numberSymbols",!0),this.numberSymbol=new T(5)}};_J=class _J extends F1{constructor(P){super(W8,"timePattern"),this.name=i(P.name,["full","long","med","short"])}};JJ=class JJ extends g{constructor(P){super(W8,"timePatterns",!0),this.timePattern=new T(4)}};UJ=class UJ extends g{constructor(P){super(W8,"typeFace",!0),this.name=""|P.name}};KJ=class KJ extends g{constructor(P){super(W8,"typeFaces",!0),this.typeFace=new T}};g3=class g3{static[g0](P,Z){if(g3.hasOwnProperty(P))return g3[P](Z)}static calendarSymbols(P){return new r_(P)}static currencySymbol(P){return new l_(P)}static currencySymbols(P){return new o_(P)}static datePattern(P){return new a_(P)}static datePatterns(P){return new n_(P)}static dateTimeSymbols(P){return new i_(P)}static day(P){return new t_(P)}static dayNames(P){return new e_(P)}static era(P){return new PJ(P)}static eraNames(P){return new ZJ(P)}static locale(P){return new qJ(P)}static localeSet(P){return new XJ(P)}static meridiem(P){return new zJ(P)}static meridiemNames(P){return new RJ(P)}static month(P){return new fJ(P)}static monthNames(P){return new GJ(P)}static numberPattern(P){return new QJ(P)}static numberPatterns(P){return new YJ(P)}static numberSymbol(P){return new WJ(P)}static numberSymbols(P){return new $J(P)}static timePattern(P){return new _J(P)}static timePatterns(P){return new JJ(P)}static typeFace(P){return new UJ(P)}static typeFaces(P){return new KJ(P)}};CV=j8.signature.id;BJ=class BJ extends g{constructor(P){super(CV,"signature",!0)}};d3=class d3{static[g0](P,Z){if(d3.hasOwnProperty(P))return d3[P](Z)}static signature(P){return new BJ(P)}};TV=j8.stylesheet.id;IJ=class IJ extends g{constructor(P){super(TV,"stylesheet",!0)}};c3=class c3{static[g0](P,Z){if(c3.hasOwnProperty(P))return c3[P](Z)}static stylesheet(P){return new IJ(P)}};NV=j8.xdp.id;jJ=class jJ extends g{constructor(P){super(NV,"xdp",!0),this.uuid=P.uuid||"",this.timeStamp=P.timeStamp||"",this.config=null,this.connectionSet=null,this.datasets=null,this.localeSet=null,this.stylesheet=new T,this.template=null}[AZ](P){let Z=j8[P[d1]];return Z&&P[B8]===Z.id}};s3=class s3{static[g0](P,Z){if(s3.hasOwnProperty(P))return s3[P](Z)}static xdp(P){return new jJ(P)}};vV=j8.xhtml.id,F2=Symbol(),FV=new Set(["color","font","font-family","font-size","font-stretch","font-style","font-weight","margin","margin-bottom","margin-left","margin-right","margin-top","letter-spacing","line-height","orphans","page-break-after","page-break-before","page-break-inside","tab-interval","tab-stop","text-align","text-decoration","text-indent","vertical-align","widows","kerning-mode","xfa-font-horizontal-scale","xfa-font-vertical-scale","xfa-spacerun","xfa-tab-stops"]),SV=new Map([["page-break-after","breakAfter"],["page-break-before","breakBefore"],["page-break-inside","breakInside"],["kerning-mode",(P)=>P==="none"?"none":"normal"],["xfa-font-horizontal-scale",(P)=>`scaleX(${Math.max(0,parseInt(P)/100).toFixed(2)})`],["xfa-font-vertical-scale",(P)=>`scaleY(${Math.max(0,parseInt(P)/100).toFixed(2)})`],["xfa-spacerun",""],["xfa-tab-stops",""],["font-size",(P,Z)=>M1(0.99*(P=Z.fontSize=Math.abs($1(P))))],["letter-spacing",(P)=>M1($1(P))],["line-height",(P)=>M1($1(P))],["margin",(P)=>M1($1(P))],["margin-bottom",(P)=>M1($1(P))],["margin-left",(P)=>M1($1(P))],["margin-right",(P)=>M1($1(P))],["margin-top",(P)=>M1($1(P))],["text-indent",(P)=>M1($1(P))],["font-family",(P)=>P],["vertical-align",(P)=>M1($1(P))]]),mV=/\s+/g,pV=/[\r\n]+/g,OV=/\r\n?/g;DV=new Set(["body","html"]);_0=class _0 extends X4{constructor(P,Z){super(vV,Z),this[F2]=!1,this.style=P.style||""}[F0](P){var Z;super[F0](P),this.style=(Z=this).style?Z.style.split(";").filter((q)=>!!q.trim()).map((q)=>q.split(":",2).map((X)=>X.trim())).filter(([q,X])=>(q==="font-family"&&Z[e1].usedTypefaces.add(X),FV.has(q))).map((q)=>q.join(":")).join(";"):""}[QP](){return!DV.has(this[d1])}[b4](P,Z=!1){Z?this[F2]=!0:(P=P.replaceAll(pV,""),this.style.includes("xfa-spacerun:yes")||(P=P.replaceAll(mV," "))),P&&(this[a]+=P)}[R4](P,Z=!0){let q=Object.create(null),X={top:NaN,bottom:NaN,left:NaN,right:NaN},z=null;for(let[R,f]of this.style.split(";").map((G)=>G.split(":",2)))switch(R){case"font-family":q.typeface=WP(f);break;case"font-size":q.size=$1(f);break;case"font-weight":q.weight=f;break;case"font-style":q.posture=f;break;case"letter-spacing":q.letterSpacing=$1(f);break;case"margin":let G=f.split(/ \t/).map((Q)=>$1(Q));switch(G.length){case 1:X.top=X.bottom=X.left=X.right=G[0];break;case 2:X.top=X.bottom=G[0],X.left=X.right=G[1];break;case 3:X.top=G[0],X.bottom=G[2],X.left=X.right=G[1];break;case 4:X.top=G[0],X.left=G[1],X.bottom=G[2],X.right=G[3]}break;case"margin-top":X.top=$1(f);break;case"margin-bottom":X.bottom=$1(f);break;case"margin-left":X.left=$1(f);break;case"margin-right":X.right=$1(f);break;case"line-height":z=$1(f)}if(P.pushData(q,X,z),this[a])P.addString(this[a]);else for(let R of this[S8]())R[d1]!=="#text"?R[R4](P):P.addString(R[a]);Z&&P.popFont()}[x1](P){let Z=[];if(this[u]={children:Z},this[a4]({}),Z.length===0&&!this[a])return K1.EMPTY;let q;return q=this[F2]?this[a]?this[a].replaceAll(OV,`
|
|
35
|
+
`):void 0:this[a]||void 0,K1.success({name:this[d1],attributes:{href:this.href,style:yV(this.style,this,this[F2])},children:Z,value:q})}};VJ=class VJ extends _0{constructor(P){super(P,"a"),this.href=IQ(P.href)||""}};xJ=class xJ extends _0{constructor(P){super(P,"b")}[R4](P){P.pushFont({weight:"bold"}),super[R4](P),P.popFont()}};HJ=class HJ extends _0{constructor(P){super(P,"body")}[x1](P){let Z=super[x1](P),{html:q}=Z;return q?(q.name="div",q.attributes.class=["xfaRich"],Z):K1.EMPTY}};MJ=class MJ extends _0{constructor(P){super(P,"br")}[A8](){return`
|
|
36
|
+
`}[R4](P){P.addString(`
|
|
37
|
+
`)}[x1](P){return K1.success({name:"br"})}};AJ=class AJ extends _0{constructor(P){super(P,"html")}[x1](P){let Z=[];if(this[u]={children:Z},this[a4]({}),Z.length===0)return K1.success({name:"div",attributes:{class:["xfaRich"],style:{}},value:this[a]||""});if(Z.length===1){let q=Z[0];if(q.attributes?.class.includes("xfaRich"))return K1.success(q)}return K1.success({name:"div",attributes:{class:["xfaRich"],style:{}},children:Z})}};LJ=class LJ extends _0{constructor(P){super(P,"i")}[R4](P){P.pushFont({posture:"italic"}),super[R4](P),P.popFont()}};bJ=class bJ extends _0{constructor(P){super(P,"li")}};kJ=class kJ extends _0{constructor(P){super(P,"ol")}};CJ=class CJ extends _0{constructor(P){super(P,"p")}[R4](P){super[R4](P,!1),P.addString(`
|
|
38
|
+
`),P.addPara(),P.popFont()}[A8](){return this[L1]()[S8]().at(-1)===this?super[A8]():super[A8]()+`
|
|
39
|
+
`}};TJ=class TJ extends _0{constructor(P){super(P,"span")}};NJ=class NJ extends _0{constructor(P){super(P,"sub")}};vJ=class vJ extends _0{constructor(P){super(P,"sup")}};FJ=class FJ extends _0{constructor(P){super(P,"ul")}};b6=class b6{static[g0](P,Z){if(b6.hasOwnProperty(P))return b6[P](Z)}static a(P){return new VJ(P)}static b(P){return new xJ(P)}static body(P){return new HJ(P)}static br(P){return new MJ(P)}static html(P){return new AJ(P)}static i(P){return new LJ(P)}static li(P){return new bJ(P)}static ol(P){return new kJ(P)}static p(P){return new CJ(P)}static span(P){return new TJ(P)}static sub(P){return new NJ(P)}static sup(P){return new vJ(P)}static ul(P){return new FJ(P)}};RR={config:w3,connection:E3,datasets:u3,localeSet:g3,signature:d3,stylesheet:c3,template:D3,xdp:s3,xhtml:b6};TZ=class TZ{constructor(P){this.namespaceId=P}[g0](P,Z){return new X4(this.namespaceId,P,Z)}};SJ=class SJ extends g{constructor(P){super(-1,"root",Object.create(null)),this.element=null,this[n5]=P}[q4](P){return this.element=P,!0}[P8](){super[P8](),this.element.template instanceof MP&&(this[n5].set(ZQ,this.element),this.element.template[R7](this[n5]),this.element.template[n5]=this[n5])}};mJ=class mJ extends g{constructor(){super(-1,"",Object.create(null))}[q4](P){return!1}};h3=class h3 extends bq{constructor(P=null,Z=!1){super(),this._builder=new pJ(P),this._stack=[],this._globalData={usedTypefaces:new Set},this._ids=new Map,this._current=this._builder.buildRoot(this._ids),this._errorCode=K7,this._whiteRegex=/^\s+$/,this._nbsps=/\xa0+/g,this._richText=Z}parse(P){if(this.parseXml(P),this._errorCode===K7)return this._current[P8](),this._current.element}onText(P){P=P.replace(this._nbsps,(Z)=>Z.slice(1)+" "),this._richText||this._current[QP]()?this._current[b4](P,this._richText):this._whiteRegex.test(P)||this._current[b4](P.trim())}onCdata(P){this._current[b4](P)}_mkAttributes(P,Z){let q=null,X=null,z=Object.create({});for(let{name:R,value:f}of P)if(R==="xmlns")q?v(`XFA - multiple namespace definition in <${Z}>`):q=f;else if(R.startsWith("xmlns:")){let G=R.substring(6);X??=[],X.push({prefix:G,value:f})}else{let G=R.indexOf(":");if(G===-1)z[R]=f;else{let Q=z[j5]??=Object.create(null),[Y,W]=[R.slice(0,G),R.slice(G+1)];(Q[Y]||=Object.create(null))[W]=f}}return[q,X,z]}_getNameAndPrefix(P,Z){let q=P.indexOf(":");return q===-1?[P,null]:[P.substring(q+1),Z?"":P.substring(0,q)]}onBeginElement(P,Z,q){let[X,z,R]=this._mkAttributes(Z,P),[f,G]=this._getNameAndPrefix(P,this._builder.isNsAgnostic()),Q=this._builder.build({nsPrefix:G,name:f,attributes:R,namespace:X,prefixes:z});if(Q[e1]=this._globalData,q)return Q[P8](),this._current[q4](Q)&&Q[LZ](this._ids),void Q[F0](this._builder);this._stack.push(this._current),this._current=Q}onEndElement(P){let Z=this._current;if(Z[Tq]()&&typeof Z[a]=="string"){let q=new h3;q._globalData=this._globalData;let X=q.parse(Z[a]);Z[a]=null,Z[q4](X)}Z[P8](),this._current=this._stack.pop(),this._current[q4](Z)&&Z[LZ](this._ids),Z[F0](this._builder)}onError(P){this._errorCode=P}};X0=class X0 extends p6{constructor(P){super(P);let{dict:Z}=P;if(Z.has("IRT")){let X=Z.getRaw("IRT");this.data.inReplyTo=X instanceof f1?X.toString():null;let z=Z.get("RT");this.data.replyType=z instanceof t?z.name:WB}let q=null;if(this.data.replyType===lR){let X=Z.get("IRT");this.setTitle(X.get("T")),this.data.titleObj=this._title,this.setContents(X.get("Contents")),this.data.contentsObj=this._contents,X.has("CreationDate")?(this.setCreationDate(X.get("CreationDate")),this.data.creationDate=this.creationDate):this.data.creationDate=null,X.has("M")?(this.setModificationDate(X.get("M")),this.data.modificationDate=this.modificationDate):this.data.modificationDate=null,q=X.getRaw("Popup"),X.has("C")?(this.setColor(X.getArray("C")),this.data.color=this.color):this.data.color=null}else this.data.titleObj=this._title,this.setCreationDate(Z.get("CreationDate")),this.data.creationDate=this.creationDate,q=Z.getRaw("Popup"),Z.has("C")||(this.data.color=null);this.data.popupRef=q instanceof f1?q.toString():null,Z.has("RC")&&(this.data.richText=X2.getRichTextAsHtml(Z.get("RC")))}setCreationDate(P){this.creationDate=typeof P=="string"?P:null}_setDefaultAppearance({xref:P,extra:Z,strokeColor:q,fillColor:X,blendMode:z,strokeAlpha:R,fillAlpha:f,pointsCallback:G}){let Q=this.data.rect=[1/0,1/0,-1/0,-1/0],Y=["q"];Z&&Y.push(Z),q&&Y.push(`${q[0]} ${q[1]} ${q[2]} RG`),X&&Y.push(`${X[0]} ${X[1]} ${X[2]} rg`);let W=this.data.quadPoints||Float32Array.from([this.rectangle[0],this.rectangle[3],this.rectangle[2],this.rectangle[3],this.rectangle[0],this.rectangle[1],this.rectangle[2],this.rectangle[1]]);for(let j=0,V=W.length;j<V;j+=8){let H=G(Y,W.subarray(j,j+8));s1.rectBoundingBox(...H,Q)}Y.push("Q");let $=new S(P),_=new S(P);_.setIfName("Subtype","Form");let J=new o8(Y.join(" "));J.dict=_,$.set("Fm0",J);let U=new S(P);z&&U.setIfName("BM",z),U.setIfNumber("CA",R),U.setIfNumber("ca",f);let K=new S(P);K.set("GS0",U);let I=new S(P);I.set("ExtGState",K),I.set("XObject",$);let B=new S(P);B.set("Resources",I),B.set("BBox",Q),this.appearance=new o8("/GS0 gs /Fm0 Do"),this.appearance.dict=B,this._streams.push(this.appearance,J)}static async createNewAnnotation(P,Z,q,X){let z=Z.ref||=P.getNewTemporaryRef(),R=await this.createNewAppearanceStream(Z,P,X),f;if(R){let Y=P.getNewTemporaryRef();f=this.createNewDict(Z,P,{apRef:Y}),q.put(Y,{data:R})}else f=this.createNewDict(Z,P,{});Number.isInteger(Z.parentTreeId)&&f.set("StructParent",Z.parentTreeId),q.put(z,{data:f});let G={ref:z},{popup:Q}=Z;if(Q){if(Q.deleted)return f.delete("Popup"),f.delete("Contents"),f.delete("RC"),G;let Y=Q.ref||=P.getNewTemporaryRef();Q.parent=z;let W=bP.createNewDict(Q,P);return q.put(Y,{data:W}),f.setIfDefined("Contents",H0(Q.contents)),f.set("Popup",Y),[G,{ref:Y}]}return G}static async createNewPrintAnnotation(P,Z,q,X){let z=await this.createNewAppearanceStream(q,Z,X),R=this.createNewDict(q,Z,z?{ap:z}:{}),f=new this.prototype.constructor({dict:R,xref:Z,annotationGlobals:P,evaluatorOptions:X.evaluatorOptions});return q.ref&&(f.ref=f.refToReplace=q.ref),f}};E0=class E0 extends p6{constructor(P){super(P);let{dict:Z,xref:q,annotationGlobals:X}=P,z=this.data;this._needAppearances=P.needAppearances,z.annotationType=C8.WIDGET,z.fieldName===void 0&&(z.fieldName=this._constructFieldName(Z)),z.actions===void 0&&(z.actions=qP(q,Z,oR));let R=N0({dict:Z,key:"V",getArray:!0});z.fieldValue=this._decodeFormValue(R);let f=N0({dict:Z,key:"DV",getArray:!0});if(z.defaultFieldValue=this._decodeFormValue(f),R===void 0&&X.xfaDatasets){let $=this._title.str;$&&(this._hasValueFromXFA=!0,z.fieldValue=R=X.xfaDatasets.getValue($))}R===void 0&&z.defaultFieldValue!==null&&(z.fieldValue=z.defaultFieldValue),z.alternativeText=E1(Z.get("TU")||""),this.setDefaultAppearance(P),z.hasAppearance||=this._needAppearances&&z.fieldValue!==void 0&&z.fieldValue!==null;let G=N0({dict:Z,key:"FT"});z.fieldType=G instanceof t?G.name:null;let Q=N0({dict:Z,key:"DR"}),Y=X.acroForm.get("DR"),W=this.appearance?.dict.get("Resources");this._fieldResources={localResources:Q,acroFormResources:Y,appearanceResources:W,mergedResources:S.merge({xref:q,dictArray:[Q,W,Y],mergeSubDicts:!0})},z.fieldFlags=N0({dict:Z,key:"Ff"}),(!Number.isInteger(z.fieldFlags)||z.fieldFlags<0)&&(z.fieldFlags=0),z.password=this.hasFieldFlag(IB),z.readOnly=this.hasFieldFlag(UB),z.required=this.hasFieldFlag(KB),z.hidden=this._hasFlag(z.annotationFlags,W7)||this._hasFlag(z.annotationFlags,X3)}_decodeFormValue(P){return Array.isArray(P)?P.filter((Z)=>typeof Z=="string").map((Z)=>E1(Z)):P instanceof t?E1(P.name):typeof P=="string"?E1(P):null}hasFieldFlag(P){return!!(this.data.fieldFlags&P)}_isViewable(P){return!0}mustBeViewed(P,Z){return Z?this.viewable:super.mustBeViewed(P,Z)&&!this._hasFlag(this.flags,X3)}getRotationMatrix(P){let Z=P?.get(this.data.id)?.rotation;return Z===void 0&&(Z=this.rotation),Z===0?w0:M3(Z,this.width,this.height)}getBorderAndBackgroundAppearances(P){let Z=P?.get(this.data.id)?.rotation;if(Z===void 0&&(Z=this.rotation),!this.backgroundColor&&!this.borderColor)return"";let q=Z===0||Z===180?`0 0 ${this.width} ${this.height} re`:`0 0 ${this.height} ${this.width} re`,X="";if(this.backgroundColor&&(X=`${Z4(this.backgroundColor,!0)} ${q} f `),this.borderColor)X+=`${this.borderStyle.width||1} w ${Z4(this.borderColor,!1)} ${q} S `;return X}async getOperatorList(P,Z,q,X){if(q&hR&&!(this instanceof iq)&&!this.data.noHTML&&!this.data.hasOwnCanvas)return{opList:new p8,separateForm:!0,separateCanvas:!1};if(!this._hasText)return super.getOperatorList(P,Z,q,X);let z=await this._getAppearance(P,Z,q,X);if(this.appearance&&z===null)return super.getOperatorList(P,Z,q,X);let R=new p8;if(!this._defaultAppearance||z===null)return{opList:R,separateForm:!1,separateCanvas:!1};let f=!!(this.data.hasOwnCanvas&&q&Z3),G=[0,0,this.width,this.height],Q=NZ(this.data.rect,G,[1,0,0,1,0,0]),Y;this.oc&&(Y=await P.parseMarkedContentProps(this.oc,null)),Y!==void 0&&R.addOp(i0,["OC",Y]),R.addOp(Uf,[this.data.id,this.data.rect,Q,this.getRotationMatrix(X),f]);let W=new o8(z);return await P.getOperatorList({stream:W,task:Z,resources:this._fieldResources.mergedResources,operatorList:R}),R.addOp(Kf,[]),Y!==void 0&&R.addOp(B6,[]),{opList:R,separateForm:!1,separateCanvas:f}}_getMKDict(P){let Z=new S(null);return P&&Z.set("R",P),Z.setIfArray("BC",g8(this.borderColor)),Z.setIfArray("BG",g8(this.backgroundColor)),Z.size>0?Z:null}amendSavedDict(P,Z){}setValue(P,Z,q,X){let{dict:z,ref:R}=function(f,G,Q){let Y=new J8,W=f,$={dict:null,ref:null};for(;f instanceof S&&!Y.has(G)&&(Y.put(G),!f.has("T"));){if(!((G=f.getRaw("Parent"))instanceof f1))return $;f=Q.fetch(G)}return f instanceof S&&f!==W&&($.dict=f,$.ref=G),$}(P,this.ref,q);if(z){if(!X.has(R)){let f=z.clone();return f.set("V",Z),X.put(R,{data:f}),f}}else P.set("V",Z);return null}async save(P,Z,q,X){let z=q?.get(this.data.id),R=this._buildFlags(z?.noView,z?.noPrint),f=z?.value,G=z?.rotation;if(f===this.data.fieldValue||f===void 0){if(!this._hasValueFromXFA&&G===void 0&&R===void 0)return;f||=this.data.fieldValue}if(G===void 0&&!this._hasValueFromXFA&&Array.isArray(f)&&Array.isArray(this.data.fieldValue)&&C7(f,this.data.fieldValue)&&R===void 0)return;G===void 0&&(G=this.rotation);let Q=null;if(!this._needAppearances&&(Q=await this._getAppearance(P,Z,cX,q),Q===null&&R===void 0))return;let Y=!1;Q?.needAppearances&&(Y=!0,Q=null);let{xref:W}=P,$=W.fetchIfRef(this.ref);if(!($ instanceof S))return;let _=new S(W);for(let I of $.getKeys())I!=="AP"&&_.set(I,$.getRaw(I));if(R!==void 0&&(_.set("F",R),Q===null&&!Y)){let I=$.getRaw("AP");I&&_.set("AP",I)}let J={path:this.data.fieldName,value:f},U=this.setValue(_,Array.isArray(f)?f.map(H0):H0(f),W,X);this.amendSavedDict(q,U||_);let K=this._getMKDict(G);if(K&&_.set("MK",K),X.put(this.ref,{data:_,xfa:J,needAppearances:Y}),Q!==null){let I=W.getNewTemporaryRef(),B=new S(W);_.set("AP",B),B.set("N",I);let j=this._getSaveFieldResources(W),V=new o8(Q),H=V.dict=new S(W);H.setIfName("Subtype","Form"),H.set("Resources",j);let M=G%180==0?[0,0,this.width,this.height]:[0,0,this.height,this.width];H.set("BBox",M);let x=this.getRotationMatrix(q);x!==w0&&H.set("Matrix",x),X.put(I,{data:V,xfa:null,needAppearances:!1})}_.set("M",`D:${m5()}`)}async _getAppearance(P,Z,q,X){if(this.data.password)return null;let z=X?.get(this.data.id),R,f;if(z&&(R=z.formattedValue||z.value,f=z.rotation),f===void 0&&R===void 0&&!this._needAppearances&&(!this._hasValueFromXFA||this.appearance))return null;let G=this.getBorderAndBackgroundAppearances(X);if(R===void 0&&(R=this.data.fieldValue,!R))return`/Tx BMC q ${G}Q EMC`;if(Array.isArray(R)&&R.length===1&&(R=R[0]),t1(typeof R=="string","Expected `value` to be a string."),R=R.trimEnd(),this.data.combo)R=this.data.options.find(({exportValue:A})=>R===A)?.displayValue||R;if(R==="")return`/Tx BMC q ${G}Q EMC`;f===void 0&&(f=this.rotation);let Q,Y=-1;this.data.multiLine?(Q=R.split(/\r\n?|\n/).map((x)=>x.normalize("NFC")),Y=Q.length):Q=[R.replace(/\r\n?|\n/,"").normalize("NFC")];let{width:W,height:$}=this;f!==90&&f!==270||([W,$]=[$,W]),this._defaultAppearance||(this.data.defaultAppearanceData=Mq(this._defaultAppearance="/Helvetica 0 Tf 0 g"));let _,J,U,K=await E0._getFontData(P,Z,this.data.defaultAppearanceData,this._fieldResources.mergedResources),I=[],B=!1;for(let x of Q){let A=K.encodeString(x);A.length>1&&(B=!0),I.push(A.join(""))}if(B&&q&cX)return{needAppearances:!0};if(B&&this._isOffscreenCanvasSupported){let x=this.data.comb?"monospace":"sans-serif",A=new t0(P.xref,x),k=A.createFontResources(Q.join("")),b=k.getRaw("Font");if(this._fieldResources.mergedResources.has("Font")){let D=this._fieldResources.mergedResources.get("Font");for(let n of b.getKeys())D.set(n,b.getRaw(n))}else this._fieldResources.mergedResources.set("Font",b);let O=A.fontName.name;K=await E0._getFontData(P,Z,{fontName:O,fontSize:0},k);for(let D=0,n=I.length;D<n;D++)I[D]=kf(Q[D]);let p=Object.assign(Object.create(null),this.data.defaultAppearanceData);this.data.defaultAppearanceData.fontSize=0,this.data.defaultAppearanceData.fontName=O,[_,J,U]=this._computeFontSize($-2,W-4,R,K,Y),this.data.defaultAppearanceData=p}else this._isOffscreenCanvasSupported||v("_getAppearance: OffscreenCanvas is not supported, annotation may not render correctly."),[_,J,U]=this._computeFontSize($-2,W-4,R,K,Y);let j=K.descent;j=isNaN(j)?uX*U:Math.max(uX*U,Math.abs(j)*J);let V=Math.min(Math.floor(($-J)/2),1),H=this.data.textAlignment;if(this.data.multiLine)return this._getMultilineAppearance(_,I,K,J,W,$,H,2,V,j,U,X);if(this.data.comb)return this._getCombAppearance(_,K,I[0],J,W,$,2,V,j,U,X);let M=V+j;if(H===0||H>2)return`/Tx BMC q ${G}BT `+_+` 1 0 0 1 ${p1(2)} ${p1(M)} Tm (${j6(I[0])}) Tj ET Q EMC`;return`/Tx BMC q ${G}BT `+_+` 1 0 0 1 0 0 Tm ${this._renderText(I[0],K,J,W,H,{shift:0},2,M)} ET Q EMC`}static async _getFontData(P,Z,q,X){let z=new p8,R={font:null,clone(){return this}},{fontName:f,fontSize:G}=q;return await P.handleSetFont(X,[f&&t.get(f),G],null,z,Z,R,null),R.font}_getTextWidth(P,Z){return Math.sumPrecise(Z.charsToGlyphs(P).map((q)=>q.width))/1000}_computeFontSize(P,Z,q,X,z){let{fontSize:R}=this.data.defaultAppearanceData,f=(R||12)*M5,G=Math.round(P/f);if(!R){let Q=($)=>Math.floor(100*$)/100;if(z===-1){let $=this._getTextWidth(q,X);R=Q(Math.min(P/M5,Z/$)),G=1}else{let $=q.split(/\r\n?|\n/),_=[];for(let U of $){let K=X.encodeString(U).join(""),I=X.charsToGlyphs(K),B=X.getCharPositions(K);_.push({line:K,glyphs:I,positions:B})}let J=(U)=>{let K=0;for(let I of _)if(K+=this._splitLine(null,X,U,Z,I).length*U,K>P)return!0;return!1};for(G=Math.max(G,z);f=P/G,R=Q(f/M5),J(R);)G++}let{fontName:Y,fontColor:W}=this.data.defaultAppearanceData;this._defaultAppearance=function({fontSize:$,fontName:_,fontColor:J}){return`/${qq(_)} ${$} Tf ${Z4(J,!0)}`}({fontSize:R,fontName:Y,fontColor:W})}return[this._defaultAppearance,R,P/G]}_renderText(P,Z,q,X,z,R,f,G){let Q;if(z===1)Q=(X-this._getTextWidth(P,Z)*q)/2;else if(z===2)Q=X-this._getTextWidth(P,Z)*q-f;else Q=f;let Y=p1(Q-R.shift);return R.shift=Q,`${Y} ${G=p1(G)} Td (${j6(P)}) Tj`}_getSaveFieldResources(P){let{localResources:Z,appearanceResources:q,acroFormResources:X}=this._fieldResources,z=this.data.defaultAppearanceData?.fontName;if(!z)return Z||S.empty;for(let R of[Z,q])if(R instanceof S){let f=R.get("Font");if(f instanceof S&&f.has(z))return R}if(X instanceof S){let R=X.get("Font");if(R instanceof S&&R.has(z)){let f=new S(P);f.set(z,R.getRaw(z));let G=new S(P);return G.set("Font",f),S.merge({xref:P,dictArray:[G,Z],mergeSubDicts:!0})}}return Z||S.empty}getFieldObject(){return null}};yJ=class yJ extends E0{constructor(P){super(P);let{dict:Z}=P;Z.has("PMD")&&(this.flags|=W7,this.data.hidden=!0,v("Barcodes are not supported")),this.data.hasOwnCanvas=this.data.readOnly&&!this.data.noHTML,this._hasText=!0,typeof this.data.fieldValue!="string"&&(this.data.fieldValue="");let q=N0({dict:Z,key:"Q"});(!Number.isInteger(q)||q<0||q>2)&&(q=null),this.data.textAlignment=q;let X=N0({dict:Z,key:"MaxLen"});(!Number.isInteger(X)||X<0)&&(X=0),this.data.maxLen=X,this.data.multiLine=this.hasFieldFlag(BB),this.data.comb=this.hasFieldFlag(LB)&&!this.data.multiLine&&!this.data.password&&!this.hasFieldFlag(HB)&&this.data.maxLen!==0,this.data.doNotScroll=this.hasFieldFlag(AB);let{data:{actions:z}}=this;if(!z)return;let R=/^AF(Date|Time)_(?:Keystroke|Format)(?:Ex)?\(['"]?([^'"]+)['"]?\);$/,f=!1;(z.Format?.length===1&&z.Keystroke?.length===1&&R.test(z.Format[0])&&R.test(z.Keystroke[0])||z.Format?.length===0&&z.Keystroke?.length===1&&R.test(z.Keystroke[0])||z.Keystroke?.length===0&&z.Format?.length===1&&R.test(z.Format[0]))&&(f=!0);let G=[];z.Format&&G.push(...z.Format),z.Keystroke&&G.push(...z.Keystroke),f&&(delete z.Keystroke,z.Format=G);for(let Q of G){let Y=Q.match(R);if(!Y)continue;let W=Y[1]==="Date",$=Y[2],_=parseInt($,10);if(isNaN(_)||Math.floor(Math.log10(_))+1!==Y[2].length||($=(W?GV:QV)[_]??$),this.data.datetimeFormat=$,!f)break;if(W){/HH|MM|ss|h/.test($)?(this.data.datetimeType="datetime-local",this.data.timeStep=/ss/.test($)?1:60):this.data.datetimeType="date";break}this.data.datetimeType="time",this.data.timeStep=/ss/.test($)?1:60;break}}get hasTextContent(){return!!this.appearance&&!this._needAppearances}_getCombAppearance(P,Z,q,X,z,R,f,G,Q,Y,W){let $=z/this.data.maxLen,_=this.getBorderAndBackgroundAppearances(W),J=[],U=Z.getCharPositions(q);for(let[I,B]of U)J.push(`(${j6(q.substring(I,B))}) Tj`);let K=J.join(` ${p1($)} 0 Td `);return`/Tx BMC q ${_}BT `+P+` 1 0 0 1 ${p1(f)} ${p1(G+Q)} Tm ${K} ET Q EMC`}_getMultilineAppearance(P,Z,q,X,z,R,f,G,Q,Y,W,$){let _=[],J=z-2*G,U={shift:0};for(let B=0,j=Z.length;B<j;B++){let V=Z[B],H=this._splitLine(V,q,X,J);for(let M=0,x=H.length;M<x;M++){let A=H[M],k=B===0&&M===0?-Q-(W-Y):-W;_.push(this._renderText(A,q,X,z,f,U,G,k))}}let K=this.getBorderAndBackgroundAppearances($),I=_.join(`
|
|
40
|
+
`);return`/Tx BMC q ${K}BT `+P+` 1 0 0 1 0 ${p1(R)} Tm ${I} ET Q EMC`}_splitLine(P,Z,q,X,z={}){P=z.line||P;let R=z.glyphs||Z.charsToGlyphs(P);if(R.length<=1)return[P];let f=z.positions||Z.getCharPositions(P),G=q/1000,Q=[],Y=-1,W=-1,$=-1,_=0,J=0;for(let U=0,K=R.length;U<K;U++){let[I,B]=f[U],j=R[U],V=j.width*G;j.unicode===" "?J+V>X?(Q.push(P.substring(_,I)),_=I,J=V,Y=-1,$=-1):(J+=V,Y=I,W=B,$=U):J+V>X?Y!==-1?(Q.push(P.substring(_,W)),_=W,U=$+1,Y=-1,J=0):(Q.push(P.substring(_,I)),_=I,J=V):J+=V}return _<P.length&&Q.push(P.substring(_,P.length)),Q}async extractTextContent(P,Z,q){await super.extractTextContent(P,Z,q);let X=this.data.textContent;if(!X)return;let z=X.join(`
|
|
41
|
+
`);if(z===this.data.fieldValue)return;let R=z.replaceAll(/([.*+?^${}()|[\]\\])|(\s+)/g,(f,G)=>G?`\\${G}`:"\\s+");new RegExp(`^\\s*${R}\\s*$`).test(this.data.fieldValue)&&(this.data.textContent=this.data.fieldValue.split(`
|
|
42
|
+
`))}getFieldObject(){return{id:this.data.id,value:this.data.fieldValue,defaultValue:this.data.defaultFieldValue||"",multiline:this.data.multiLine,password:this.data.password,charLimit:this.data.maxLen,comb:this.data.comb,editable:!this.data.readOnly,hidden:this.data.hidden,name:this.data.fieldName,rect:this.data.rect,actions:this.data.actions,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,datetimeFormat:this.data.datetimeFormat,hasDatetimeHTML:!!this.data.datetimeType,type:"text"}}};DJ=class DJ extends E0{constructor(P){super(P),this.checkedAppearance=null,this.uncheckedAppearance=null;let Z=this.hasFieldFlag(jB),q=this.hasFieldFlag(VB);this.data.checkBox=!Z&&!q,this.data.radioButton=Z&&!q,this.data.pushButton=q,this.data.isTooltipOnly=!1,this.data.checkBox?this._processCheckBox(P):this.data.radioButton?this._processRadioButton(P):this.data.pushButton?(this.data.hasOwnCanvas=!0,this.data.noHTML=!1,this._processPushButton(P)):v("Invalid field flags for button widget annotation")}async getOperatorList(P,Z,q,X){if(this.data.pushButton)return super.getOperatorList(P,Z,q,!1,X);let z=null,R=null;if(X){let G=X.get(this.data.id);z=G?G.value:null,R=G?G.rotation:null}if(z===null&&this.appearance)return super.getOperatorList(P,Z,q,X);z==null&&(z=this.data.checkBox?this.data.fieldValue===this.data.exportValue:this.data.fieldValue===this.data.buttonValue);let f=z?this.checkedAppearance:this.uncheckedAppearance;if(f){let G=this.appearance,Q=g4(f.dict.getArray("Matrix"),w0);R&&f.dict.set("Matrix",this.getRotationMatrix(X)),this.appearance=f;let Y=super.getOperatorList(P,Z,q,X);return this.appearance=G,f.dict.set("Matrix",Q),Y}return{opList:new p8,separateForm:!1,separateCanvas:!1}}async save(P,Z,q,X){this.data.checkBox?this._saveCheckbox(P,Z,q,X):this.data.radioButton&&this._saveRadioButton(P,Z,q,X)}async _saveCheckbox(P,Z,q,X){if(!q)return;let z=q.get(this.data.id),R=this._buildFlags(z?.noView,z?.noPrint),f=z?.rotation,G=z?.value;if(f===void 0&&R===void 0){if(G===void 0)return;if(this.data.fieldValue===this.data.exportValue===G)return}let Q=P.xref.fetchIfRef(this.ref);if(!(Q instanceof S))return;Q=Q.clone(),f===void 0&&(f=this.rotation),G===void 0&&(G=this.data.fieldValue===this.data.exportValue);let Y={path:this.data.fieldName,value:G?this.data.exportValue:""},W=t.get(G?this.data.exportValue:"Off");this.setValue(Q,W,P.xref,X),Q.set("AS",W),Q.set("M",`D:${m5()}`),R!==void 0&&Q.set("F",R);let $=this._getMKDict(f);$&&Q.set("MK",$),X.put(this.ref,{data:Q,xfa:Y,needAppearances:!1})}async _saveRadioButton(P,Z,q,X){if(!q)return;let z=q.get(this.data.id),R=this._buildFlags(z?.noView,z?.noPrint),f=z?.rotation,G=z?.value;if(f===void 0&&R===void 0){if(G===void 0)return;if(this.data.fieldValue===this.data.buttonValue===G)return}let Q=P.xref.fetchIfRef(this.ref);if(!(Q instanceof S))return;Q=Q.clone(),G===void 0&&(G=this.data.fieldValue===this.data.buttonValue),f===void 0&&(f=this.rotation);let Y={path:this.data.fieldName,value:G?this.data.buttonValue:""},W=t.get(G?this.data.buttonValue:"Off");G&&this.setValue(Q,W,P.xref,X),Q.set("AS",W),Q.set("M",`D:${m5()}`),R!==void 0&&Q.set("F",R);let $=this._getMKDict(f);$&&Q.set("MK",$),X.put(this.ref,{data:Q,xfa:Y,needAppearances:!1})}_getDefaultCheckedAppearance(P,Z){let{width:q,height:X}=this,z=[0,0,q,X],R=0.8*Math.min(q,X),f,G;Z==="check"?(f={width:0.755*R,height:0.705*R},G="3"):Z==="disc"?(f={width:0.791*R,height:0.705*R},G="l"):O1(`_getDefaultCheckedAppearance - unsupported type: ${Z}`);let Q=`q BT /PdfJsZaDb ${R} Tf 0 g ${p1((q-f.width)/2)} ${p1((X-f.height)/2)} Td (${G}) Tj ET Q`,Y=new S(P.xref);Y.set("FormType",1),Y.setIfName("Subtype","Form"),Y.setIfName("Type","XObject"),Y.set("BBox",z),Y.set("Matrix",[1,0,0,1,0,0]),Y.set("Length",Q.length);let W=new S(P.xref),$=new S(P.xref);$.set("PdfJsZaDb",this.fallbackFontDict),W.set("Font",$),Y.set("Resources",W),this.checkedAppearance=new o8(Q),this.checkedAppearance.dict=Y,this._streams.push(this.checkedAppearance)}_processCheckBox(P){let Z=P.dict.get("AP");if(!(Z instanceof S))return;let q=Z.get("N");if(!(q instanceof S))return;let X=this._decodeFormValue(P.dict.get("AS"));typeof X=="string"&&(this.data.fieldValue=X);let z=this.data.fieldValue!==null&&this.data.fieldValue!=="Off"?this.data.fieldValue:"Yes",R=this._decodeFormValue(q.getKeys());if(R.length===0)R.push("Off",z);else if(R.length===1)R[0]==="Off"?R.push(z):R.unshift("Off");else if(R.includes(z))R.length=0,R.push("Off",z);else{let Q=R.find((Y)=>Y!=="Off");R.length=0,R.push("Off",Q)}R.includes(this.data.fieldValue)||(this.data.fieldValue="Off"),this.data.exportValue=R[1];let f=q.get(this.data.exportValue);this.checkedAppearance=f instanceof T1?f:null;let G=q.get("Off");this.uncheckedAppearance=G instanceof T1?G:null,this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(P,"check"),this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance),this._fallbackFontDict=this.fallbackFontDict,this.data.defaultFieldValue===null&&(this.data.defaultFieldValue="Off")}_processRadioButton(P){this.data.buttonValue=null;let Z=P.dict.get("Parent");if(Z instanceof S){this.parent=P.dict.getRaw("Parent");let f=Z.get("V");f instanceof t&&(this.data.fieldValue=this._decodeFormValue(f))}let q=P.dict.get("AP");if(!(q instanceof S))return;let X=q.get("N");if(!(X instanceof S))return;for(let f of X.getKeys())if(f!=="Off"){this.data.buttonValue=this._decodeFormValue(f);break}let z=X.get(this.data.buttonValue);this.checkedAppearance=z instanceof T1?z:null;let R=X.get("Off");this.uncheckedAppearance=R instanceof T1?R:null,this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(P,"disc"),this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance),this._fallbackFontDict=this.fallbackFontDict,this.data.defaultFieldValue===null&&(this.data.defaultFieldValue="Off")}_processPushButton(P){let{dict:Z,annotationGlobals:q}=P;Z.has("A")||Z.has("AA")||this.data.alternativeText?(this.data.isTooltipOnly=!Z.has("A")&&!Z.has("AA"),H6.parseDestDictionary({destDict:Z,resultObj:this.data,docBaseUrl:q.baseUrl,docAttachments:q.attachments})):v("Push buttons without action dictionaries are not supported")}getFieldObject(){let P,Z="button";return this.data.checkBox?(Z="checkbox",P=this.data.exportValue):this.data.radioButton&&(Z="radiobutton",P=this.data.buttonValue),{id:this.data.id,value:this.data.fieldValue||"Off",defaultValue:this.data.defaultFieldValue,exportValues:P,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,hidden:this.data.hidden,actions:this.data.actions,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:Z}}get fallbackFontDict(){let P=new S;return P.setIfName("BaseFont","ZapfDingbats"),P.setIfName("Type","FallbackType"),P.setIfName("Subtype","FallbackType"),P.setIfName("Encoding","ZapfDingbatsEncoding"),q1(this,"fallbackFontDict",P)}};wJ=class wJ extends E0{constructor(P){super(P);let{dict:Z,xref:q}=P;this.indices=Z.getArray("I"),this.hasIndices=Array.isArray(this.indices)&&this.indices.length>0,this.data.options=[];let X=N0({dict:Z,key:"Opt"});if(Array.isArray(X))for(let z=0,R=X.length;z<R;z++){let f=q.fetchIfRef(X[z]),G=Array.isArray(f);this.data.options[z]={exportValue:this._decodeFormValue(G?q.fetchIfRef(f[0]):f),displayValue:this._decodeFormValue(G?q.fetchIfRef(f[1]):f)}}if(this.hasIndices){this.data.fieldValue=[];let z=this.data.options.length;for(let R of this.indices)Number.isInteger(R)&&R>=0&&R<z&&this.data.fieldValue.push(this.data.options[R].exportValue)}else typeof this.data.fieldValue=="string"?this.data.fieldValue=[this.data.fieldValue]:this.data.fieldValue||=[];this.data.options.length===0&&this.data.fieldValue.length>0&&(this.data.options=this.data.fieldValue.map((z)=>({exportValue:z,displayValue:z}))),this.data.combo=this.hasFieldFlag(xB),this.data.multiSelect=this.hasFieldFlag(MB),this._hasText=!0}getFieldObject(){let P=this.data.combo?"combobox":"listbox",Z=this.data.fieldValue.length>0?this.data.fieldValue[0]:null;return{id:this.data.id,value:Z,defaultValue:this.data.defaultFieldValue,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,numItems:this.data.fieldValue.length,multipleSelection:this.data.multiSelect,hidden:this.data.hidden,actions:this.data.actions,items:this.data.options,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:P}}amendSavedDict(P,Z){if(!this.hasIndices)return;let q=P?.get(this.data.id)?.value;Array.isArray(q)||(q=[q]);let X=[],{options:z}=this.data;for(let R=0,f=0,G=z.length;R<G;R++)z[R].exportValue===q[f]&&(X.push(R),f+=1);Z.set("I",X)}async _getAppearance(P,Z,q,X){if(this.data.combo)return super._getAppearance(P,Z,q,X);let z,R,f=X?.get(this.data.id);if(f&&(R=f.rotation,z=f.value),R===void 0&&z===void 0&&!this._needAppearances)return null;z===void 0?z=this.data.fieldValue:Array.isArray(z)||(z=[z]);let{width:G,height:Q}=this;R!==90&&R!==270||([G,Q]=[Q,G]);let Y=this.data.options.length,W=[];for(let M=0;M<Y;M++){let{exportValue:x}=this.data.options[M];z.includes(x)&&W.push(M)}this._defaultAppearance||(this.data.defaultAppearanceData=Mq(this._defaultAppearance="/Helvetica 0 Tf 0 g"));let $=await E0._getFontData(P,Z,this.data.defaultAppearanceData,this._fieldResources.mergedResources),_,{fontSize:J}=this.data.defaultAppearanceData;if(J)_=this._defaultAppearance;else{let M=(Q-1)/Y,x,A=-1;for(let{displayValue:k}of this.data.options){let b=this._getTextWidth(k,$);b>A&&(A=b,x=k)}[_,J]=this._computeFontSize(M,G-4,x,$,-1)}let U=J*M5,K=(U-J)/2,I=Math.floor(Q/U),B=0;if(W.length>0){let M=Math.min(...W),x=Math.max(...W);B=Math.max(0,x-I+1),B>M&&(B=M)}let j=Math.min(B+I+1,Y),V=["/Tx BMC q",`1 1 ${G} ${Q} re W n`];if(W.length){V.push("0.600006 0.756866 0.854904 rg");for(let M of W)B<=M&&M<j&&V.push(`1 ${Q-(M-B+1)*U} ${G} ${U} re f`)}V.push("BT",_,`1 0 0 1 0 ${Q} Tm`);let H={shift:0};for(let M=B;M<j;M++){let{displayValue:x}=this.data.options[M],A=M===B?K:0;V.push(this._renderText(x,$,J,G,0,H,2,-U+A))}return V.push("ET Q EMC"),V.join(`
|
|
43
|
+
`)}};iq=class iq extends E0{constructor(P){super(P),this.data.fieldValue=null,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!this.data.hasOwnCanvas}getFieldObject(){return{id:this.data.id,value:null,page:this.data.pageIndex,type:"signature"}}};EJ=class EJ extends X0{constructor(P){super(P),this.data.noRotate=!0,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1;let{dict:Z}=P;this.data.annotationType=C8.TEXT,this.data.hasAppearance?this.data.name="NoIcon":(this.data.rect[1]=this.data.rect[3]-22,this.data.rect[2]=this.data.rect[0]+22,this.data.name=Z.has("Name")?Z.get("Name").name:"Note"),Z.has("State")?(this.data.state=Z.get("State")||null,this.data.stateModel=Z.get("StateModel")||null):(this.data.state=null,this.data.stateModel=null)}};uJ=class uJ extends p6{constructor(P){super(P);let{dict:Z,annotationGlobals:q}=P;this.data.annotationType=C8.LINK,this.data.noHTML=!1;let X=z2(Z,this.rectangle);X&&(this.data.quadPoints=X),this.data.borderColor||=this.data.color,H6.parseDestDictionary({destDict:Z,resultObj:this.data,docBaseUrl:q.baseUrl,docAttachments:q.attachments})}get overlaysTextContent(){return!0}};bP=class bP extends p6{constructor(P){super(P);let{dict:Z}=P;this.data.annotationType=C8.POPUP,this.data.noHTML=!1,this.width!==0&&this.height!==0||(this.data.rect=null);let q=Z.get("Parent");if(!q)return void v("Popup annotation has a missing or invalid parent annotation.");if(this.data.parentRect=k4(q.getArray("Rect"),null),this.data.creationDate=q.get("CreationDate")||"",G8(q.get("RT"),lR)&&(q=q.get("IRT")),q.has("M")?(this.setModificationDate(q.get("M")),this.data.modificationDate=this.modificationDate):this.data.modificationDate=null,q.has("C")?(this.setColor(q.getArray("C")),this.data.color=this.color):this.data.color=null,!this.viewable){let X=q.get("F");this._isViewable(X)&&this.setFlags(X)}this.setTitle(q.get("T")),this.data.titleObj=this._title,this.setContents(q.get("Contents")),this.data.contentsObj=this._contents,q.has("RC")&&(this.data.richText=X2.getRichTextAsHtml(q.get("RC"))),this.data.open=!!Z.get("Open")}static createNewDict(P,Z,q){let{oldAnnotation:X,rect:z,parent:R}=P,f=X||new S(Z);return f.setIfNotExists("Type",t.get("Annot")),f.setIfNotExists("Subtype",t.get("Popup")),f.setIfNotExists("Open",!1),f.setIfArray("Rect",z),f.set("Parent",R),f}static async createNewAppearanceStream(P,Z,q){return null}};i2=class i2 extends X0{constructor(P){super(P),this.data.hasOwnCanvas=this.data.noRotate,this.data.isEditable=!this.data.noHTML,this.data.noHTML=!1;let{annotationGlobals:Z,evaluatorOptions:q,xref:X}=P;if(this.data.annotationType=C8.FREETEXT,this.setDefaultAppearance(P),this._hasAppearance=!!this.appearance,this._hasAppearance){let{fontColor:z,fontSize:R}=function(f,G,Q,Y){return new oG(f,G,Q,Y).parse()}(this.appearance,q,X,Z.globalColorSpaceCache);this.data.defaultAppearanceData.fontColor=z,this.data.defaultAppearanceData.fontSize=R||10}else{this.data.defaultAppearanceData.fontSize||=10;let{fontColor:z,fontSize:R}=this.data.defaultAppearanceData;if(this._contents.str){this.data.textContent=this._contents.str.split(/\r\n?|\n/).map((Y)=>Y.trimEnd());let{coords:f,bbox:G,matrix:Q}=t0.getFirstPositionInfo(this.rectangle,this.rotation,R);this.data.textPosition=this._transformPoint(f,G,Q)}if(this._isOffscreenCanvasSupported){let f=P.dict.get("CA"),G=new t0(X,"sans-serif");this.appearance=G.createAppearance(this._contents.str,this.rectangle,this.rotation,R,z,f),this._streams.push(this.appearance)}else v("FreeTextAnnotation: OffscreenCanvas is not supported, annotation may not render correctly.")}}get hasTextContent(){return this._hasAppearance}static createNewDict(P,Z,{apRef:q,ap:X}){let{color:z,date:R,fontSize:f,oldAnnotation:G,rect:Q,rotation:Y,user:W,value:$}=P,_=G||new S(Z);_.setIfNotExists("Type",t.get("Annot")),_.setIfNotExists("Subtype",t.get("FreeText")),_.set(G?"M":"CreationDate",`D:${m5(R)}`),G&&_.delete("RC"),_.setIfArray("Rect",Q);let J=`/Helv ${f} Tf ${Z4(z,!0)}`;if(_.set("DA",J),_.setIfDefined("Contents",H0($)),_.setIfNotExists("F",4),_.setIfNotExists("Border",[0,0,0]),_.setIfNumber("Rotate",Y),_.setIfDefined("T",H0(W)),q||X){let U=new S(Z);_.set("AP",U),U.set("N",q||X)}return _}static async createNewAppearanceStream(P,Z,q){let{baseFontRef:X,evaluator:z,task:R}=q,{color:f,fontSize:G,rect:Q,rotation:Y,value:W}=P;if(!f)return null;let $=new S(Z),_=new S(Z);if(X)_.set("Helv",X);else{let y=new S(Z);y.setIfName("BaseFont","Helvetica"),y.setIfName("Type","Font"),y.setIfName("Subtype","Type1"),y.setIfName("Encoding","WinAnsiEncoding"),_.set("Helv",y)}$.set("Font",_);let J=await E0._getFontData(z,R,{fontName:"Helv",fontSize:G},$),[U,K,I,B]=Q,j=I-U,V=B-K;Y%180!=0&&([j,V]=[V,j]);let H=W.split(`
|
|
44
|
+
`),M=G/1000,x=-1/0,A=[];for(let y of H){let N=J.encodeString(y);if(N.length>1)return null;y=N.join(""),A.push(y);let h=0,w=J.charsToGlyphs(y);for(let c of w)h+=c.width*M;x=Math.max(x,h)}let k=1;x>j&&(k=j/x);let b=1,O=M5*G,p=1*G,D=O*H.length;D>V&&(b=V/D);let n=G*Math.min(k,b),F,l,C;switch(Y){case 0:C=[1,0,0,1],l=[Q[0],Q[1],j,V],F=[Q[0],Q[3]-p];break;case 90:C=[0,1,-1,0],l=[Q[1],-Q[2],j,V],F=[Q[1],-Q[0]-p];break;case 180:C=[-1,0,0,-1],l=[-Q[2],-Q[3],j,V],F=[-Q[2],-Q[1]-p];break;case 270:C=[0,-1,1,0],l=[-Q[3],Q[0],j,V],F=[-Q[3],Q[2]-p]}let L=["q",`${C.join(" ")} 0 0 cm`,`${l.join(" ")} re W n`,"BT",`${Z4(f,!0)}`,`0 Tc /Helv ${p1(n)} Tf`];L.push(`${F.join(" ")} Td (${j6(A[0])}) Tj`);let m=p1(O);for(let y=1,N=A.length;y<N;y++){let h=A[y];L.push(`0 -${m} Td (${j6(h)}) Tj`)}L.push("ET","Q");let d=L.join(`
|
|
45
|
+
`),e=new S(Z);e.set("FormType",1),e.setIfName("Subtype","Form"),e.setIfName("Type","XObject"),e.set("BBox",Q),e.set("Resources",$),e.set("Matrix",[1,0,0,1,-Q[0],-Q[1]]);let E=new o8(d);return E.dict=e,E}};gJ=class gJ extends X0{constructor(P){super(P);let{dict:Z,xref:q}=P;this.data.annotationType=C8.LINE,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1;let X=c9(Z.getArray("L"),[0,0,0,0]);if(this.data.lineCoordinates=s1.normalizeRect(X),this.setLineEndings(Z.getArray("LE")),this.data.lineEndings=this.lineEndings,!this.appearance){let z=g8(this.color,[0,0,0]),R=Z.get("CA"),f=g8(v5(Z.getArray("IC"),null)),G=f?R:null,Q=this.borderStyle.width||1,Y=2*Q,W=[this.data.lineCoordinates[0]-Y,this.data.lineCoordinates[1]-Y,this.data.lineCoordinates[2]+Y,this.data.lineCoordinates[3]+Y];s1.intersect(this.rectangle,W)||(this.rectangle=W),this._setDefaultAppearance({xref:q,extra:`${Q} w`,strokeColor:z,fillColor:f,strokeAlpha:R,fillAlpha:G,pointsCallback:($,_)=>($.push(`${X[0]} ${X[1]} m`,`${X[2]} ${X[3]} l`,"S"),[_[0]-Q,_[7]-Q,_[2]+Q,_[3]+Q])})}}};dJ=class dJ extends X0{constructor(P){super(P);let{dict:Z,xref:q}=P;if(this.data.annotationType=C8.SQUARE,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1,!this.appearance){let X=g8(this.color,[0,0,0]),z=Z.get("CA"),R=g8(v5(Z.getArray("IC"),null)),f=R?z:null;if(this.borderStyle.width===0&&!R)return;this._setDefaultAppearance({xref:q,extra:`${this.borderStyle.width} w`,strokeColor:X,fillColor:R,strokeAlpha:z,fillAlpha:f,pointsCallback:(G,Q)=>{let Y=Q[4]+this.borderStyle.width/2,W=Q[5]+this.borderStyle.width/2,$=Q[6]-Q[4]-this.borderStyle.width,_=Q[3]-Q[7]-this.borderStyle.width;return G.push(`${Y} ${W} ${$} ${_} re`),R?G.push("B"):G.push("S"),[Q[0],Q[7],Q[2],Q[3]]}})}}};cJ=class cJ extends X0{constructor(P){super(P);let{dict:Z,xref:q}=P;if(this.data.annotationType=C8.CIRCLE,!this.appearance){let X=g8(this.color,[0,0,0]),z=Z.get("CA"),R=g8(v5(Z.getArray("IC"),null)),f=R?z:null;if(this.borderStyle.width===0&&!R)return;let G=1.3333333333333333*Math.tan(Math.PI/8);this._setDefaultAppearance({xref:q,extra:`${this.borderStyle.width} w`,strokeColor:X,fillColor:R,strokeAlpha:z,fillAlpha:f,pointsCallback:(Q,Y)=>{let W=Y[0]+this.borderStyle.width/2,$=Y[1]-this.borderStyle.width/2,_=Y[6]-this.borderStyle.width/2,J=Y[7]+this.borderStyle.width/2,U=W+(_-W)/2,K=$+(J-$)/2,I=(_-W)/2*G,B=(J-$)/2*G;return Q.push(`${U} ${J} m`,`${U+I} ${J} ${_} ${K+B} ${_} ${K} c`,`${_} ${K-B} ${U+I} ${$} ${U} ${$} c`,`${U-I} ${$} ${W} ${K-B} ${W} ${K} c`,`${W} ${K+B} ${U-I} ${J} ${U} ${J} c`,"h"),R?Q.push("B"):Q.push("S"),[Y[0],Y[7],Y[2],Y[3]]}})}}};tq=class tq extends X0{constructor(P){super(P);let{dict:Z,xref:q}=P;this.data.annotationType=C8.POLYLINE,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1,this.data.vertices=null,this instanceof eq||(this.setLineEndings(Z.getArray("LE")),this.data.lineEndings=this.lineEndings);let X=Z.getArray("Vertices");if(!e8(X,null))return;let z=this.data.vertices=Float32Array.from(X);if(!this.appearance){let R=g8(this.color,[0,0,0]),f=Z.get("CA"),G,Q=v5(Z.getArray("IC"),null);Q&&(Q=g8(Q)),G=Q?this.color?Q.every((_,J)=>_===R[J])?"f":"B":"f":"S";let Y=this.borderStyle.width||1,W=2*Y,$=[1/0,1/0,-1/0,-1/0];for(let _=0,J=z.length;_<J;_+=2)s1.rectBoundingBox(z[_]-W,z[_+1]-W,z[_]+W,z[_+1]+W,$);s1.intersect(this.rectangle,$)||(this.rectangle=$),this._setDefaultAppearance({xref:q,extra:`${Y} w`,strokeColor:R,strokeAlpha:f,fillColor:Q,fillAlpha:Q?f:null,pointsCallback:(_,J)=>{for(let U=0,K=z.length;U<K;U+=2)_.push(`${z[U]} ${z[U+1]} ${U===0?"m":"l"}`);return _.push(G),[J[0],J[7],J[2],J[3]]}})}}};eq=class eq extends tq{constructor(P){super(P),this.data.annotationType=C8.POLYGON}};sJ=class sJ extends X0{constructor(P){super(P),this.data.annotationType=C8.CARET}};i5=class i5 extends X0{constructor(P){super(P),this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1;let{dict:Z,xref:q}=P;this.data.annotationType=C8.INK,this.data.inkLists=[],this.data.isEditable=!this.data.noHTML,this.data.noHTML=!1,this.data.opacity=Z.get("CA")||1;let X=Z.getArray("InkList");if(Array.isArray(X)){for(let z=0,R=X.length;z<R;++z){if(!Array.isArray(X[z]))continue;let f=new Float32Array(X[z].length);this.data.inkLists.push(f);for(let G=0,Q=X[z].length;G<Q;G+=2){let Y=q.fetchIfRef(X[z][G]),W=q.fetchIfRef(X[z][G+1]);typeof Y=="number"&&typeof W=="number"&&(f[G]=Y,f[G+1]=W)}}if(!this.appearance){let z=g8(this.color,[0,0,0]),R=Z.get("CA"),f=this.borderStyle.width||1,G=2*f,Q=[1/0,1/0,-1/0,-1/0];for(let Y of this.data.inkLists)for(let W=0,$=Y.length;W<$;W+=2)s1.rectBoundingBox(Y[W]-G,Y[W+1]-G,Y[W]+G,Y[W+1]+G,Q);s1.intersect(this.rectangle,Q)||(this.rectangle=Q),this._setDefaultAppearance({xref:q,extra:`${f} w`,strokeColor:z,strokeAlpha:R,pointsCallback:(Y,W)=>{for(let $ of this.data.inkLists){for(let _=0,J=$.length;_<J;_+=2)Y.push(`${$[_]} ${$[_+1]} ${_===0?"m":"l"}`);Y.push("S")}return[W[0],W[7],W[2],W[3]]}})}}}static createNewDict(P,Z,{apRef:q,ap:X}){let{oldAnnotation:z,color:R,date:f,opacity:G,paths:Q,outlines:Y,rect:W,rotation:$,thickness:_,user:J}=P,U=z||new S(Z);if(U.setIfNotExists("Type",t.get("Annot")),U.setIfNotExists("Subtype",t.get("Ink")),U.set(z?"M":"CreationDate",`D:${m5(f)}`),U.setIfArray("Rect",W),U.setIfArray("InkList",Y?.points||Q?.points),U.setIfNotExists("F",4),U.setIfNumber("Rotate",$),U.setIfDefined("T",H0(J)),Y&&U.setIfName("IT","InkHighlight"),_>0){let K=new S(Z);U.set("BS",K),K.set("W",_)}if(U.setIfArray("C",g8(R)),U.setIfNumber("CA",G),X||q){let K=new S(Z);U.set("AP",K),K.set("N",q||X)}return U}static async createNewAppearanceStream(P,Z,q){if(P.outlines)return this.createNewAppearanceStreamForHighlight(P,Z,q);let{color:X,rect:z,paths:R,thickness:f,opacity:G}=P;if(!X)return null;let Q=[`${f} w 1 J 1 j`,`${Z4(X,!1)}`];G!==1&&Q.push("/R0 gs");for(let _ of R.lines){Q.push(`${p1(_[4])} ${p1(_[5])} m`);for(let J=6,U=_.length;J<U;J+=6)if(isNaN(_[J]))Q.push(`${p1(_[J+4])} ${p1(_[J+5])} l`);else{let[K,I,B,j,V,H]=_.slice(J,J+6);Q.push([K,I,B,j,V,H].map(p1).join(" ")+" c")}_.length===6&&Q.push(`${p1(_[4])} ${p1(_[5])} l`)}Q.push("S");let Y=Q.join(`
|
|
46
|
+
`),W=new S(Z);if(W.set("FormType",1),W.setIfName("Subtype","Form"),W.setIfName("Type","XObject"),W.set("BBox",z),W.set("Length",Y.length),G!==1){let _=new S(Z),J=new S(Z),U=new S(Z);U.set("CA",G),U.setIfName("Type","ExtGState"),J.set("R0",U),_.set("ExtGState",J),W.set("Resources",_)}let $=new o8(Y);return $.dict=W,$}static async createNewAppearanceStreamForHighlight(P,Z,q){let{color:X,rect:z,outlines:{outline:R},opacity:f}=P;if(!X)return null;let G=[`${Z4(X,!0)}`,"/R0 gs"];G.push(`${p1(R[4])} ${p1(R[5])} m`);for(let U=6,K=R.length;U<K;U+=6)if(isNaN(R[U]))G.push(`${p1(R[U+4])} ${p1(R[U+5])} l`);else{let[I,B,j,V,H,M]=R.slice(U,U+6);G.push([I,B,j,V,H,M].map(p1).join(" ")+" c")}G.push("h f");let Q=G.join(`
|
|
47
|
+
`),Y=new S(Z);Y.set("FormType",1),Y.setIfName("Subtype","Form"),Y.setIfName("Type","XObject"),Y.set("BBox",z),Y.set("Length",Q.length);let W=new S(Z),$=new S(Z);W.set("ExtGState",$),Y.set("Resources",W);let _=new S(Z);$.set("R0",_),_.setIfName("BM","Multiply"),f!==1&&(_.set("ca",f),_.setIfName("Type","ExtGState"));let J=new o8(Q);return J.dict=Y,J}};t2=class t2 extends X0{constructor(P){super(P);let{dict:Z,xref:q}=P;if(this.data.annotationType=C8.HIGHLIGHT,this.data.isEditable=!this.data.noHTML,this.data.noHTML=!1,this.data.opacity=Z.get("CA")||1,this.data.quadPoints=z2(Z,null)){let X=this.appearance?.dict.get("Resources");if(!this.appearance||!X?.has("ExtGState")){this.appearance&&v("HighlightAnnotation - ignoring built-in appearance stream.");let z=g8(this.color,[1,1,0]),R=Z.get("CA");this._setDefaultAppearance({xref:q,fillColor:z,blendMode:"Multiply",fillAlpha:R,pointsCallback:(f,G)=>(f.push(`${G[0]} ${G[1]} m`,`${G[2]} ${G[3]} l`,`${G[6]} ${G[7]} l`,`${G[4]} ${G[5]} l`,"f"),[G[0],G[7],G[2],G[3]])})}}else this.data.popupRef=null}get overlaysTextContent(){return!0}static createNewDict(P,Z,{apRef:q,ap:X}){let{color:z,date:R,oldAnnotation:f,opacity:G,rect:Q,rotation:Y,user:W,quadPoints:$}=P,_=f||new S(Z);if(_.setIfNotExists("Type",t.get("Annot")),_.setIfNotExists("Subtype",t.get("Highlight")),_.set(f?"M":"CreationDate",`D:${m5(R)}`),_.setIfArray("Rect",Q),_.setIfNotExists("F",4),_.setIfNotExists("Border",[0,0,0]),_.setIfNumber("Rotate",Y),_.setIfArray("QuadPoints",$),_.setIfArray("C",g8(z)),_.setIfNumber("CA",G),_.setIfDefined("T",H0(W)),q||X){let J=new S(Z);_.set("AP",J),J.set("N",q||X)}return _}static async createNewAppearanceStream(P,Z,q){let{color:X,rect:z,outlines:R,opacity:f}=P;if(!X)return null;let G=[`${Z4(X,!0)}`,"/R0 gs"],Q=[];for(let K of R){Q.length=0,Q.push(`${p1(K[0])} ${p1(K[1])} m`);for(let I=2,B=K.length;I<B;I+=2)Q.push(`${p1(K[I])} ${p1(K[I+1])} l`);Q.push("h"),G.push(Q.join(`
|
|
48
|
+
`))}G.push("f*");let Y=G.join(`
|
|
49
|
+
`),W=new S(Z);W.set("FormType",1),W.setIfName("Subtype","Form"),W.setIfName("Type","XObject"),W.set("BBox",z),W.set("Length",Y.length);let $=new S(Z),_=new S(Z);$.set("ExtGState",_),W.set("Resources",$);let J=new S(Z);_.set("R0",J),J.setIfName("BM","Multiply"),f!==1&&(J.set("ca",f),J.setIfName("Type","ExtGState"));let U=new o8(Y);return U.dict=W,U}};hJ=class hJ extends X0{constructor(P){super(P);let{dict:Z,xref:q}=P;if(this.data.annotationType=C8.UNDERLINE,this.data.quadPoints=z2(Z,null)){if(!this.appearance){let X=g8(this.color,[0,0,0]),z=Z.get("CA");this._setDefaultAppearance({xref:q,extra:"[] 0 d 0.571 w",strokeColor:X,strokeAlpha:z,pointsCallback:(R,f)=>(R.push(`${f[4]} ${f[5]+1.3} m`,`${f[6]} ${f[7]+1.3} l`,"S"),[f[0],f[7],f[2],f[3]])})}}else this.data.popupRef=null}get overlaysTextContent(){return!0}};rJ=class rJ extends X0{constructor(P){super(P);let{dict:Z,xref:q}=P;if(this.data.annotationType=C8.SQUIGGLY,this.data.quadPoints=z2(Z,null)){if(!this.appearance){let X=g8(this.color,[0,0,0]),z=Z.get("CA");this._setDefaultAppearance({xref:q,extra:"[] 0 d 1 w",strokeColor:X,strokeAlpha:z,pointsCallback:(R,f)=>{let G=(f[1]-f[5])/6,Q=G,Y=f[4],W=f[5],$=f[6];R.push(`${Y} ${W+Q} m`);do Y+=2,Q=Q===0?G:0,R.push(`${Y} ${W+Q} l`);while(Y<$);return R.push("S"),[f[4],W-2*G,$,W+2*G]}})}}else this.data.popupRef=null}get overlaysTextContent(){return!0}};lJ=class lJ extends X0{constructor(P){super(P);let{dict:Z,xref:q}=P;if(this.data.annotationType=C8.STRIKEOUT,this.data.quadPoints=z2(Z,null)){if(!this.appearance){let X=g8(this.color,[0,0,0]),z=Z.get("CA");this._setDefaultAppearance({xref:q,extra:"[] 0 d 1 w",strokeColor:X,strokeAlpha:z,pointsCallback:(R,f)=>(R.push((f[0]+f[4])/2+" "+(f[1]+f[5])/2+" m",(f[2]+f[6])/2+" "+(f[3]+f[7])/2+" l","S"),[f[0],f[7],f[2],f[3]])})}}else this.data.popupRef=null}get overlaysTextContent(){return!0}};_5=class _5 extends X0{#P=null;constructor(P){super(P),this.data.annotationType=C8.STAMP,this.data.hasOwnCanvas=this.data.noRotate,this.data.isEditable=!this.data.noHTML,this.data.noHTML=!1}mustBeViewedWhenEditing(P,Z=null){return P?!this.data.isEditable||(this.#P??=this.data.hasOwnCanvas,this.data.hasOwnCanvas=!0,!0):(this.#P!==null&&(this.data.hasOwnCanvas=this.#P,this.#P=null),!Z?.has(this.data.id))}static async createImage(P,Z){let{width:q,height:X}=P,z=new OffscreenCanvas(q,X),R=z.getContext("2d",{alpha:!0});R.drawImage(P,0,0);let f=R.getImageData(0,0,q,X).data,G=new Uint32Array(f.buffer),Q=G.some(P0.isLittleEndian?(U)=>U>>>24!=255:(U)=>!!(255&~U));Q&&(R.fillStyle="white",R.fillRect(0,0,q,X),R.drawImage(P,0,0));let Y=z.convertToBlob({type:"image/jpeg",quality:1}).then((U)=>U.arrayBuffer()),W=t.get("XObject"),$=t.get("Image"),_=new S(Z);_.set("Type",W),_.set("Subtype",$),_.set("BitsPerComponent",8),_.setIfName("ColorSpace","DeviceRGB"),_.setIfName("Filter","DCTDecode"),_.set("BBox",[0,0,q,X]),_.set("Width",q),_.set("Height",X);let J=null;if(Q){let U=new Uint8Array(G.length);if(P0.isLittleEndian)for(let I=0,B=G.length;I<B;I++)U[I]=G[I]>>>24;else for(let I=0,B=G.length;I<B;I++)U[I]=255&G[I];let K=new S(Z);K.set("Type",W),K.set("Subtype",$),K.set("BitsPerComponent",8),K.setIfName("ColorSpace","DeviceGray"),K.set("Width",q),K.set("Height",X),J=new Y8(U,0,0,K)}return{imageStream:new Y8(await Y,0,0,_),smaskStream:J,width:q,height:X}}static createNewDict(P,Z,{apRef:q,ap:X}){let{date:z,oldAnnotation:R,rect:f,rotation:G,user:Q}=P,Y=R||new S(Z);if(Y.setIfNotExists("Type",t.get("Annot")),Y.setIfNotExists("Subtype",t.get("Stamp")),Y.set(R?"M":"CreationDate",`D:${m5(z)}`),Y.setIfArray("Rect",f),Y.setIfNotExists("F",4),Y.setIfNotExists("Border",[0,0,0]),Y.setIfNumber("Rotate",G),Y.setIfDefined("T",H0(Q)),q||X){let W=new S(Z);Y.set("AP",W),W.set("N",q||X)}return Y}static async#Z(P,Z){let{areContours:q,color:X,rect:z,lines:R,thickness:f}=P;if(!X)return null;let G=[`${f} w 1 J 1 j`,`${Z4(X,q)}`];for(let $ of R){G.push(`${p1($[4])} ${p1($[5])} m`);for(let _=6,J=$.length;_<J;_+=6)if(isNaN($[_]))G.push(`${p1($[_+4])} ${p1($[_+5])} l`);else{let[U,K,I,B,j,V]=$.slice(_,_+6);G.push([U,K,I,B,j,V].map(p1).join(" ")+" c")}$.length===6&&G.push(`${p1($[4])} ${p1($[5])} l`)}G.push(q?"F":"S");let Q=G.join(`
|
|
50
|
+
`),Y=new S(Z);Y.set("FormType",1),Y.setIfName("Subtype","Form"),Y.setIfName("Type","XObject"),Y.set("BBox",z),Y.set("Length",Q.length);let W=new o8(Q);return W.dict=Y,W}static async createNewAppearanceStream(P,Z,q){if(P.oldAnnotation)return null;if(P.isSignature)return this.#Z(P,Z);let{rotation:X}=P,{imageRef:z,width:R,height:f}=q.image,G=new S(Z),Q=new S(Z);G.set("XObject",Q),Q.set("Im0",z);let Y=`q ${R} 0 0 ${f} 0 0 cm /Im0 Do Q`,W=new S(Z);if(W.set("FormType",1),W.setIfName("Subtype","Form"),W.setIfName("Type","XObject"),W.set("BBox",[0,0,R,f]),W.set("Resources",G),X){let _=M3(X,R,f);W.set("Matrix",_)}let $=new o8(Y);return $.dict=W,$}};oJ=class oJ extends X0{constructor(P){super(P);let{dict:Z,xref:q}=P,X=new N3(Z.get("FS"),q);this.data.annotationType=C8.FILEATTACHMENT,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1,this.data.file=X.serializable;let z=Z.get("Name");this.data.name=z instanceof t?E1(z.name):"PushPin";let R=Z.get("ca");this.data.fillAlpha=typeof R=="number"&&R>=0&&R<=1?R:null}};wV={get r(){return q1(this,"r",new Uint8Array([7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21]))},get k(){return q1(this,"k",new Int32Array([-680876936,-389564586,606105819,-1044525330,-176418897,1200080426,-1473231341,-45705983,1770035416,-1958414417,-42063,-1990404162,1804603682,-40341101,-1502002290,1236535329,-165796510,-1069501632,643717713,-373897302,-701558691,38016083,-660478335,-405537848,568446438,-1019803690,-187363961,1163531501,-1444681467,-51403784,1735328473,-1926607734,-378558,-2022574463,1839030562,-35309556,-1530992060,1272893353,-155497632,-1094730640,681279174,-358537222,-722521979,76029189,-640364487,-421815835,530742520,-995338651,-198630844,1126891415,-1416354905,-57434055,1700485571,-1894986606,-1051523,-2054922799,1873313359,-30611744,-1560198380,1309151649,-145523070,-1120210379,718787259,-343485551]))}};aJ=class aJ extends P2{constructor(P){super(P),this.node=null}onEndElement(P){let Z=super.onEndElement(P);if(Z&&P==="xfa:datasets")throw this.node=Z,Error("Aborting DatasetXMLParser.")}};EV={get k(){return q1(this,"k",[new R1(1116352408,3609767458),new R1(1899447441,602891725),new R1(3049323471,3964484399),new R1(3921009573,2173295548),new R1(961987163,4081628472),new R1(1508970993,3053834265),new R1(2453635748,2937671579),new R1(2870763221,3664609560),new R1(3624381080,2734883394),new R1(310598401,1164996542),new R1(607225278,1323610764),new R1(1426881987,3590304994),new R1(1925078388,4068182383),new R1(2162078206,991336113),new R1(2614888103,633803317),new R1(3248222580,3479774868),new R1(3835390401,2666613458),new R1(4022224774,944711139),new R1(264347078,2341262773),new R1(604807628,2007800933),new R1(770255983,1495990901),new R1(1249150122,1856431235),new R1(1555081692,3175218132),new R1(1996064986,2198950837),new R1(2554220882,3999719339),new R1(2821834349,766784016),new R1(2952996808,2566594879),new R1(3210313671,3203337956),new R1(3336571891,1034457026),new R1(3584528711,2466948901),new R1(113926993,3758326383),new R1(338241895,168717936),new R1(666307205,1188179964),new R1(773529912,1546045734),new R1(1294757372,1522805485),new R1(1396182291,2643833823),new R1(1695183700,2343527390),new R1(1986661051,1014477480),new R1(2177026350,1206759142),new R1(2456956037,344077627),new R1(2730485921,1290863460),new R1(2820302411,3158454273),new R1(3259730800,3505952657),new R1(3345764771,106217008),new R1(3516065817,3606008344),new R1(3600352804,1432725776),new R1(4094571909,1467031594),new R1(275423344,851169720),new R1(430227734,3100823752),new R1(506948616,1363258195),new R1(659060556,3750685593),new R1(883997877,3785050280),new R1(958139571,3318307427),new R1(1322822218,3812723403),new R1(1537002063,2003034995),new R1(1747873779,3602036899),new R1(1955562222,1575990012),new R1(2024104815,1125592928),new R1(2227730452,2716904306),new R1(2361852424,442776044),new R1(2428436474,593698344),new R1(2756734187,3733110249),new R1(3204031479,2999351573),new R1(3329325298,3815920427),new R1(3391569614,3928383900),new R1(3515267271,566280711),new R1(3940187606,3454069534),new R1(4118630271,4000239992),new R1(116418474,1914138554),new R1(174292421,2731055270),new R1(289380356,3203993006),new R1(460393269,320620315),new R1(685471733,587496836),new R1(852142971,1086792851),new R1(1017036298,365543100),new R1(1126000580,2618297676),new R1(1288033470,3409855158),new R1(1501505948,4234509866),new R1(1607167915,987167468),new R1(1816402316,1246189591)])}};lV={get k(){return q1(this,"k",[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298])}};PU=class PU extends a8{constructor(P,Z,q){super(Z),this.str=P,this.dict=P.dict,this.decrypt=q,this.nextChunk=null,this.initialized=!1}readBlock(){let P;if(this.initialized?P=this.nextChunk:(P=this.str.getBytes(512),this.initialized=!0),!P?.length)return void(this.eof=!0);this.nextChunk=this.str.getBytes(512);let Z=this.nextChunk?.length>0;P=(0,this.decrypt)(P,!Z);let q=this.bufferLength,X=q+P.length;this.ensureBuffer(X).set(P,q),this.bufferLength=X}};PX=class PX extends kP{_rcon=new Uint8Array([141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141]);constructor(P){super(),this._cyclesOfRepetition=10,this._keySize=160,this._key=this._expandKey(P)}_expandKey(P){let Z=this._s,q=this._rcon,X=new Uint8Array(176);X.set(P);for(let z=16,R=1;z<176;++R){let f=X[z-3],G=X[z-2],Q=X[z-1],Y=X[z-4];f=Z[f],G=Z[G],Q=Z[Q],Y=Z[Y],f^=q[R];for(let W=0;W<4;++W)X[z]=f^=X[z-16],z++,X[z]=G^=X[z-16],z++,X[z]=Q^=X[z-16],z++,X[z]=Y^=X[z-16],z++}return X}};r3=class r3 extends kP{constructor(P){super(),this._cyclesOfRepetition=14,this._keySize=224,this._key=this._expandKey(P)}_expandKey(P){let Z=this._s,q=new Uint8Array(240);q.set(P);let X,z,R,f,G=1;for(let Q=32,Y=1;Q<240;++Y){Q%32==16?(X=Z[X],z=Z[z],R=Z[R],f=Z[f]):Q%32==0&&(X=q[Q-3],z=q[Q-2],R=q[Q-1],f=q[Q-4],X=Z[X],z=Z[z],R=Z[R],f=Z[f],X^=G,(G<<=1)>=256&&(G=255&(27^G)));for(let W=0;W<4;++W)q[Q]=X^=q[Q-32],Q++,q[Q]=z^=q[Q-32],Q++,q[Q]=R^=q[Q-32],Q++,q[Q]=f^=q[Q-32],Q++}return q}};qU=class qU extends ZX{_hash(P,Z,q){return vZ(Z,0,Z.length)}};XU=class XU extends ZX{_hash(P,Z,q){let X=vZ(Z,0,Z.length).subarray(0,32),z=[0],R=0;for(;R<64||z.at(-1)>R-32;){let f=P.length+X.length+q.length,G=new Uint8Array(f),Q=0;G.set(P,Q),Q+=P.length,G.set(X,Q),Q+=X.length,G.set(q,Q);let Y=new Uint8Array(64*f);for(let $=0,_=0;$<64;$++,_+=f)Y.set(G,_);z=new PX(X.subarray(0,16)).encrypt(Y,X.subarray(16,32));let W=Math.sumPrecise(z.slice(0,16))%3;W===0?X=vZ(z,0,z.length):W===1?X=rV(z,0,z.length):W===2&&(X=eJ(z,0,z.length)),R++}return X.subarray(0,32)}};Px=[0,0,612,792];GR=new Uint8Array([37,80,68,70,45]),QR=new Uint8Array([115,116,97,114,116,120,114,101,102]),Zx=new Uint8Array([101,110,100,111,98,106]);mZ=class mZ extends XX{constructor(P){super(P);let Z=new Y8(P.source);this.pdfDocument=new qX(this,Z),this._loadedStreamPromise=Promise.resolve(Z)}async ensure(P,Z,q){let X=P[Z];return typeof X=="function"?X.apply(P,q):X}requestRange(P,Z){return Promise.resolve()}requestLoadedStream(P=!1){return this._loadedStreamPromise}terminate(P){}};RU=class RU extends XX{constructor(P){super(P),this.streamManager=new wf(P.source,{msgHandler:P.handler,length:P.length,disableAutoFetch:P.disableAutoFetch,rangeChunkSize:P.rangeChunkSize}),this.pdfDocument=new qX(this,this.streamManager.getStream())}async ensure(P,Z,q){try{let X=P[Z];return typeof X=="function"?X.apply(P,q):X}catch(X){if(!(X instanceof q8))throw X;return await this.requestRange(X.begin,X.end),this.ensure(P,Z,q)}}requestRange(P,Z){return this.streamManager.requestRange(P,Z)}requestLoadedStream(P=!1){return this.streamManager.requestAllChunks(P)}sendProgressiveData(P){this.streamManager.onReceiveData({chunk:P})}terminate(P){this.streamManager.abort(P)}};JU=class JU{static{typeof window>"u"&&!zB&&typeof self<"u"&&typeof self.postMessage=="function"&&"onmessage"in self&&this.initializeFromPort(self)}static setup(P,Z){let q=!1;P.on("test",(X)=>{q||(q=!0,P.send("test",X instanceof Uint8Array))}),P.on("configure",(X)=>{var z;z=X.verbosity,Number.isInteger(z)&&(I3=z)}),P.on("GetDocRequest",(X)=>this.createDocumentHandler(X,Z))}static createDocumentHandler(P,Z){let q,X=!1,z=null,R=new Set,f=I3,{docId:G,apiVersion:Q}=P,Y="5.4.296";if(Q!==Y)throw Error(`The API version "${Q}" does not match the Worker version "${Y}".`);let W=(j,V)=>`The \`${j}.prototype\` contains unexpected enumerable property "${V}", thus breaking e.g. \`for...in\` iteration of ${j}s.`;for(let j in{})throw Error(W("Object",j));for(let j in[])throw Error(W("Array",j));let $=G+"_worker",_=new IR($,G,Z);function J(){if(X)throw Error("Worker was terminated")}function U(j){R.add(j)}function K(j){j.finish(),R.delete(j)}async function I(j){await q.ensureDoc("checkHeader"),await q.ensureDoc("parseStartXRef"),await q.ensureDoc("parse",[j]),await q.ensureDoc("checkFirstPage",[j]),await q.ensureDoc("checkLastPage",[j]);let V=await q.ensureDoc("isPureXfa");if(V){let x=new Y4("loadXfaResources");U(x),await q.ensureDoc("loadXfaResources",[_,x]),K(x)}let[H,M]=await Promise.all([q.ensureDoc("numPages"),q.ensureDoc("fingerprints")]);return{numPages:H,fingerprints:M,htmlForXfa:V?await q.ensureDoc("htmlForXfa"):null}}function B(j){function V(x){J(),_.send("GetDoc",{pdfInfo:x})}function H(x){if(J(),x instanceof L7){let A=new Y4(`PasswordException: response ${x.code}`);U(A),_.sendWithPromise("PasswordRequest",x).then(function({password:k}){K(A),q.updatePassword(k),M()}).catch(function(){K(A),_.send("DocException",x)})}else _.send("DocException",K0(x))}function M(){J(),I(!1).then(V,function(x){J(),x instanceof L5?q.requestLoadedStream().then(function(){J(),I(!0).then(V,H)}):H(x)})}J(),async function({data:x,password:A,disableAutoFetch:k,rangeChunkSize:b,length:O,docBaseUrl:p,enableXfa:D,evaluatorOptions:n}){let F={source:null,disableAutoFetch:k,docBaseUrl:p,docId:G,enableXfa:D,evaluatorOptions:n,handler:_,length:O,password:A,rangeChunkSize:b};if(x)return F.source=x,new mZ(F);let l=new WU(_),C=l.getFullReader(),L=Promise.withResolvers(),m,d=[],e=0;return C.headersReady.then(function(){if(C.isRangeSupported){F.source=l,F.length=C.contentLength,F.disableAutoFetch||=C.isStreamingSupported,m=new RU(F);for(let E of d)m.sendProgressiveData(E);d=[],L.resolve(m),z=null}}).catch(function(E){L.reject(E),z=null}),new Promise(function(E,y){let N=function({value:h,done:w}){try{if(J(),w){if(!m){let c=Mf(d);d=[],O&&c.length!==O&&v("reported HTTP length is different from actual"),F.source=c,m=new mZ(F),L.resolve(m)}return void(z=null)}e+=h.byteLength,C.isStreamingSupported||_.send("DocProgress",{loaded:e,total:Math.max(e,C.contentLength||0)}),m?m.sendProgressiveData(h):d.push(h),C.read().then(N,y)}catch(c){y(c)}};C.read().then(N,y)}).catch(function(E){L.reject(E),z=null}),z=(E)=>{l.cancelAllRequests(E)},L.promise}(j).then(function(x){if(X)throw x.terminate(new y8("Worker was terminated.")),Error("Worker was terminated");q=x,q.requestLoadedStream(!0).then((A)=>{_.send("DataLoaded",{length:A.bytes.byteLength})})}).then(M,H)}return _.on("GetPage",function(j){return q.getPage(j.pageIndex).then(function(V){return Promise.all([q.ensure(V,"rotate"),q.ensure(V,"ref"),q.ensure(V,"userUnit"),q.ensure(V,"view")]).then(function([H,M,x,A]){return{rotate:H,ref:M,refStr:M?.toString()??null,userUnit:x,view:A}})})}),_.on("GetPageIndex",function(j){let V=f1.get(j.num,j.gen);return q.ensureCatalog("getPageIndex",[V])}),_.on("GetDestinations",function(j){return q.ensureCatalog("destinations")}),_.on("GetDestination",function(j){return q.ensureCatalog("getDestination",[j.id])}),_.on("GetPageLabels",function(j){return q.ensureCatalog("pageLabels")}),_.on("GetPageLayout",function(j){return q.ensureCatalog("pageLayout")}),_.on("GetPageMode",function(j){return q.ensureCatalog("pageMode")}),_.on("GetViewerPreferences",function(j){return q.ensureCatalog("viewerPreferences")}),_.on("GetOpenAction",function(j){return q.ensureCatalog("openAction")}),_.on("GetAttachments",function(j){return q.ensureCatalog("attachments")}),_.on("GetDocJSActions",function(j){return q.ensureCatalog("jsActions")}),_.on("GetPageJSActions",function({pageIndex:j}){return q.getPage(j).then((V)=>q.ensure(V,"jsActions"))}),_.on("GetAnnotationsByType",async function({types:j,pageIndexesToSkip:V}){let[H,M]=await Promise.all([q.ensureDoc("numPages"),q.ensureDoc("annotationGlobals")]);if(!M)return null;let x=[],A=[],k=null;try{for(let b=0,O=H;b<O;b++)V?.has(b)||(k||(k=new Y4("GetAnnotationsByType"),U(k)),x.push(q.getPage(b).then(async(p)=>p&&p.collectAnnotationsByType(_,k,j,A,M)||[])));return await Promise.all(x),(await Promise.all(A)).filter((b)=>!!b)}finally{k&&K(k)}}),_.on("GetOutline",function(j){return q.ensureCatalog("documentOutline")}),_.on("GetOptionalContentConfig",function(j){return q.ensureCatalog("optionalContentConfig")}),_.on("GetPermissions",function(j){return q.ensureCatalog("permissions")}),_.on("GetMetadata",function(j){return Promise.all([q.ensureDoc("documentInfo"),q.ensureCatalog("metadata")])}),_.on("GetMarkInfo",function(j){return q.ensureCatalog("markInfo")}),_.on("GetData",function(j){return q.requestLoadedStream().then((V)=>V.bytes)}),_.on("GetAnnotations",function({pageIndex:j,intent:V}){return q.getPage(j).then(function(H){let M=new Y4(`GetAnnotations: page ${j}`);return U(M),H.getAnnotationsData(_,M,V).then((x)=>(K(M),x),(x)=>{throw K(M),x})})}),_.on("GetFieldObjects",function(j){return q.ensureDoc("fieldObjects").then((V)=>V?.allFields||null)}),_.on("HasJSActions",function(j){return q.ensureDoc("hasJSActions")}),_.on("GetCalculationOrderIds",function(j){return q.ensureDoc("calculationOrderIds")}),_.on("SaveDocument",async function({isPureXfa:j,numPages:V,annotationStorage:H,filename:M}){let x=[q.requestLoadedStream(),q.ensureCatalog("acroForm"),q.ensureCatalog("acroFormRef"),q.ensureDoc("startXRef"),q.ensureDoc("xref"),q.ensureCatalog("structTreeRoot")],A=new t8,k=[],b=j?null:bf(H),[O,p,D,n,F,l]=await Promise.all(x),C=F.trailer.getRaw("Root")||null,L;if(b){l?await l.canUpdateStructTree({pdfManager:q,newAnnotationsByPage:b})&&(L=l):await c4.canCreateStructureTree({catalogRef:C,pdfManager:q,newAnnotationsByPage:b})&&(L=null);let w=P4.generateImages(H.values(),F,q.evaluatorOptions.isOffscreenCanvasSupported),c=L===void 0?k:[];for(let[o,G1]of b)c.push(q.getPage(o).then((r)=>{let Z1=new Y4(`Save (editor): page ${o}`);return U(Z1),r.saveNewAnnotations(_,Z1,G1,w,A).finally(function(){K(Z1)})}));L===null?k.push(Promise.all(c).then(async()=>{await c4.createStructureTree({newAnnotationsByPage:b,xref:F,catalogRef:C,pdfManager:q,changes:A})})):L&&k.push(Promise.all(c).then(async()=>{await L.updateStructureTree({newAnnotationsByPage:b,pdfManager:q,changes:A})}))}if(j)k.push(q.ensureDoc("serializeXfaData",[H]));else for(let w=0;w<V;w++)k.push(q.getPage(w).then(function(c){let o=new Y4(`Save: page ${w}`);return U(o),c.save(_,o,H,A).finally(function(){K(o)})}));let m=await Promise.all(k),d=null;if(j){if(d=m[0],!d)return O.bytes}else if(A.size===0)return O.bytes;let e=D&&p instanceof S&&A.values().some((w)=>w.needAppearances),E=p instanceof S&&p.get("XFA")||null,y=null,N=!1;if(Array.isArray(E)){for(let w=0,c=E.length;w<c;w+=2)E[w]==="datasets"&&(y=E[w+1],N=!0);y===null&&(y=F.getNewTemporaryRef())}else E&&v("Unsupported XFA type.");let h=Object.create(null);if(F.trailer){let w=new Map,c=F.trailer.get("Info")||null;if(c instanceof S)for(let[o,G1]of c)typeof G1=="string"&&w.set(o,E1(G1));h={rootRef:C,encryptRef:F.trailer.getRaw("Encrypt")||null,newRef:F.getNewTemporaryRef(),infoRef:F.trailer.getRaw("Info")||null,infoMap:w,fileIds:F.trailer.get("ID")||null,startXRef:n,filename:M}}return Xx({originalData:O.bytes,xrefInfo:h,changes:A,xref:F,hasXfa:!!E,xfaDatasetsRef:y,hasXfaDatasetsEntry:N,needAppearances:e,acroFormRef:D,acroForm:p,xfaData:d,useXrefStream:xf(F.topDict,"XRef")}).finally(()=>{F.resetNewTemporaryRef()})}),_.on("GetOperatorList",function(j,V){let H=j.pageIndex;q.getPage(H).then(function(M){let x=new Y4(`GetOperatorList: page ${H}`);U(x);let A=f>=b9?Date.now():0;M.getOperatorList({handler:_,sink:V,task:x,intent:j.intent,cacheKey:j.cacheKey,annotationStorage:j.annotationStorage,modifiedIds:j.modifiedIds}).then(function(k){K(x),A&&v1(`page=${H+1} - getOperatorList: time=${Date.now()-A}ms, len=${k.length}`),V.close()},function(k){K(x),x.terminated||V.error(k)})})}),_.on("GetTextContent",function(j,V){let{pageIndex:H,includeMarkedContent:M,disableNormalization:x}=j;q.getPage(H).then(function(A){let k=new Y4("GetTextContent: page "+H);U(k);let b=f>=b9?Date.now():0;A.extractTextContent({handler:_,task:k,sink:V,includeMarkedContent:M,disableNormalization:x}).then(function(){K(k),b&&v1(`page=${H+1} - getTextContent: time=`+(Date.now()-b)+"ms"),V.close()},function(O){K(k),k.terminated||V.error(O)})})}),_.on("GetStructTree",function(j){return q.getPage(j.pageIndex).then((V)=>q.ensure(V,"getStructTree"))}),_.on("FontFallback",function(j){return q.fontFallback(j.id,_)}),_.on("Cleanup",function(j){return q.cleanup(!0)}),_.on("Terminate",function(j){X=!0;let V=[];if(q){q.terminate(new y8("Worker was terminated."));let H=q.cleanup();V.push(H),q=null}else Lq();z?.(new y8("Worker was terminated."));for(let H of R)V.push(H.finished),H.terminate();return Promise.all(V).then(function(){_.destroy(),_=null})}),_.on("Ready",function(j){B(P),P=null}),$}static initializeFromPort(P){let Z=new IR("worker","main",P);this.setup(Z,P),Z.send("ready",null)}};globalThis.pdfjsWorker={WorkerMessageHandler:JU};z0=!(typeof process!="object"||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&process.type!=="browser"),pZ=[0.001,0,0,0.001,0,0],j4={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},m1={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15,POPUP:16,SIGNATURE:101,COMMENT:102},h1={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_THICKNESS:32,HIGHLIGHT_FREE:33,HIGHLIGHT_SHOW_ALL:34,DRAW_STEP:41},UU={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},x7={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},V8={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},R2={ERRORS:0,WARNINGS:1,INFOS:5},k6={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93,rawFillPath:94},BU={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},TP=R2.WARNINGS;u5=function(){function P(Z,q){this.message=Z,this.name=q}return P.prototype=Error(),P.constructor=P,P}();OZ=class OZ extends u5{constructor(P,Z){super(P,"PasswordException"),this.code=Z}};P3=class P3 extends u5{constructor(P,Z){super(P,"UnknownErrorException"),this.details=Z}};h7=class h7 extends u5{constructor(P){super(P,"InvalidPDFException")}};C6=class C6 extends u5{constructor(P,Z,q){super(P,"ResponseException"),this.status=Z,this.missing=q}};IU=class IU extends u5{constructor(P){super(P,"FormatError")}};f4=class f4 extends u5{constructor(P){super(P,"AbortException")}};I9=Array.from(Array(256).keys(),(P)=>P.toString(16).padStart(2,"0"));typeof Promise.try!="function"&&(Promise.try=function(P,...Z){return new Promise((q)=>{q(P(...Z))})}),typeof Math.sumPrecise!="function"&&(Math.sumPrecise=function(P){return P.reduce((Z,q)=>Z+q,0)});n4=class n4{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=this.CSS/this.PDF};Q2=class Q2 extends u5{constructor(P,Z=0){super(P,"RenderingCancelledException"),this.extraDelay=Z}};o3=["image/apng","image/avif","image/bmp","image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/x-icon"];CR=new Map;_X=class _X{static _colorsMapping=new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]);get _colors(){let P=new Map([["CanvasText",null],["Canvas",null]]);return function(Z){let q=document.createElement("span");q.style.visibility="hidden",q.style.colorScheme="only light",document.body.append(q);for(let X of Z.keys()){q.style.color=X;let z=window.getComputedStyle(q).color;Z.set(X,T6(z))}q.remove()}(P),D1(this,"_colors",P)}convert(P){let Z=T6(P);if(!window.matchMedia("(forced-colors: active)").matches)return Z;for(let[q,X]of this._colors)if(X.every((z,R)=>z===Z[R]))return _X._colorsMapping.get(q);return Z}getHexCode(P){let Z=this._colors.get(P);return Z?j1.makeHexColor(...Z):P}};b1=class b1{#P=null;#Z=null;#X=null;#q=null;#z=null;#R=!1;#G=null;#f="";#Q=null;#Y=null;#_=null;#$=null;#J=null;#B="";#K=!1;#W=null;#U=!1;#I=!1;#V=!1;#j=null;#b=0;#A=0;#x=null;#C=null;isSelected=!1;_isCopy=!1;_editToolbar=null;_initialOptions=Object.create(null);_initialData=null;_isVisible=!0;_uiManager=null;_focusEventsAllowed=!0;static _l10n=null;static _l10nResizer=null;#M=!1;#L=b1._zIndex++;static _borderLineWidth=-1;static _colorManager=new _X;static _zIndex=1;static _telemetryTimeout=1000;static get _resizerKeyboardManager(){let P=b1.prototype._resizeWithKeyboard,Z=T4.TRANSLATE_SMALL,q=T4.TRANSLATE_BIG;return D1(this,"_resizerKeyboardManager",new y6([[["ArrowLeft","mac+ArrowLeft"],P,{args:[-Z,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],P,{args:[-q,0]}],[["ArrowRight","mac+ArrowRight"],P,{args:[Z,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],P,{args:[q,0]}],[["ArrowUp","mac+ArrowUp"],P,{args:[0,-Z]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],P,{args:[0,-q]}],[["ArrowDown","mac+ArrowDown"],P,{args:[0,Z]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],P,{args:[0,q]}],[["Escape","mac+Escape"],b1.prototype._stopResizingWithKeyboard]]))}constructor(P){this.parent=P.parent,this.id=P.id,this.width=this.height=null,this.pageIndex=P.parent.pageIndex,this.name=P.name,this.div=null,this._uiManager=P.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=P.isCentered,this._structTreeParentId=null,this.annotationElementId=P.annotationElementId||null,this.creationDate=P.creationDate||new Date,this.modificationDate=P.modificationDate||null;let{rotation:Z,rawDims:{pageWidth:q,pageHeight:X,pageX:z,pageY:R}}=this.parent.viewport;this.rotation=Z,this.pageRotation=(360+Z-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[q,X],this.pageTranslation=[z,R];let[f,G]=this.parentDimensions;this.x=P.x/f,this.y=P.y/G,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}get mode(){return Object.getPrototypeOf(this).constructor._editorType}static get isDrawer(){return!1}static get _defaultLineColor(){return D1(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(P){let Z=new FU({id:P.parent.getNextId(),parent:P.parent,uiManager:P._uiManager});Z.annotationElementId=P.annotationElementId,Z.deleted=!0,Z._uiManager.addToAnnotationStorage(Z)}static initialize(P,Z){if(b1._l10n??=P,b1._l10nResizer||=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"}),b1._borderLineWidth!==-1)return;let q=getComputedStyle(document.documentElement);b1._borderLineWidth=parseFloat(q.getPropertyValue("--outline-width"))||0}static updateDefaultParams(P,Z){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(P){return!1}static paste(P,Z){X8("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#M}set _isDraggable(P){this.#M=P,this.div?.classList.toggle("draggable",P)}get uid(){return this.annotationElementId||this.id}get isEnterHandled(){return!0}center(){let[P,Z]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*Z/(2*P),this.y+=this.width*P/(2*Z);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*Z/(2*P),this.y-=this.width*P/(2*Z);break;default:this.x-=this.width/2,this.y-=this.height/2}this.fixAndSetPosition()}addCommands(P){this._uiManager.addCommands(P)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#L}setParent(P){P!==null?(this.pageIndex=P.pageIndex,this.pageDimensions=P.pageDimensions):(this.#y(),this.#$?.remove(),this.#$=null),this.parent=P}focusin(P){this._focusEventsAllowed&&(this.#K?this.#K=!1:this.parent.setSelected(this))}focusout(P){if(!this._focusEventsAllowed)return;if(!this.isAttachedToDOM)return;P.relatedTarget?.closest(`#${this.id}`)||(P.preventDefault(),this.parent?.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.isInEditMode()&&this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(P,Z,q,X){let[z,R]=this.parentDimensions;[q,X]=this.screenToPageTranslation(q,X),this.x=(P+q)/z,this.y=(Z+X)/R,this.fixAndSetPosition()}_moveAfterPaste(P,Z){let[q,X]=this.parentDimensions;this.setAt(P*q,Z*X,this.width*q,this.height*X),this._onTranslated()}#v([P,Z],q,X){[q,X]=this.screenToPageTranslation(q,X),this.x+=q/P,this.y+=X/Z,this._onTranslating(this.x,this.y),this.fixAndSetPosition()}translate(P,Z){this.#v(this.parentDimensions,P,Z)}translateInPage(P,Z){this.#W||=[this.x,this.y,this.width,this.height],this.#v(this.pageDimensions,P,Z),this.div.scrollIntoView({block:"nearest"})}translationDone(){this._onTranslated(this.x,this.y)}drag(P,Z){this.#W||=[this.x,this.y,this.width,this.height];let{div:q,parentDimensions:[X,z]}=this;if(this.x+=P/X,this.y+=Z/z,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){let{x:W,y:$}=this.div.getBoundingClientRect();this.parent.findNewParent(this,W,$)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:R,y:f}=this,[G,Q]=this.getBaseTranslation();R+=G,f+=Q;let{style:Y}=q;Y.left=`${(100*R).toFixed(2)}%`,Y.top=`${(100*f).toFixed(2)}%`,this._onTranslating(R,f),q.scrollIntoView({block:"nearest"})}_onTranslating(P,Z){}_onTranslated(P,Z){}get _hasBeenMoved(){return!!this.#W&&(this.#W[0]!==this.x||this.#W[1]!==this.y)}get _hasBeenResized(){return!!this.#W&&(this.#W[2]!==this.width||this.#W[3]!==this.height)}getBaseTranslation(){let[P,Z]=this.parentDimensions,{_borderLineWidth:q}=b1,X=q/P,z=q/Z;switch(this.rotation){case 90:return[-X,z];case 180:return[X,z];case 270:return[X,-z];default:return[-X,-z]}}get _mustFixPosition(){return!0}fixAndSetPosition(P=this.rotation){let{div:{style:Z},pageDimensions:[q,X]}=this,{x:z,y:R,width:f,height:G}=this;if(f*=q,G*=X,z*=q,R*=X,this._mustFixPosition)switch(P){case 0:z=l8(z,0,q-f),R=l8(R,0,X-G);break;case 90:z=l8(z,0,q-G),R=l8(R,f,X);break;case 180:z=l8(z,f,q),R=l8(R,G,X);break;case 270:z=l8(z,G,q),R=l8(R,0,X-f)}this.x=z/=q,this.y=R/=X;let[Q,Y]=this.getBaseTranslation();z+=Q,R+=Y,Z.left=`${(100*z).toFixed(2)}%`,Z.top=`${(100*R).toFixed(2)}%`,this.moveInDOM()}static#T(P,Z,q){switch(q){case 90:return[Z,-P];case 180:return[-P,-Z];case 270:return[-Z,P];default:return[P,Z]}}screenToPageTranslation(P,Z){return b1.#T(P,Z,this.parentRotation)}pageTranslationToScreen(P,Z){return b1.#T(P,Z,360-this.parentRotation)}#N(P){switch(P){case 90:{let[Z,q]=this.pageDimensions;return[0,-Z/q,q/Z,0]}case 180:return[-1,0,0,-1];case 270:{let[Z,q]=this.pageDimensions;return[0,Z/q,-q/Z,0]}default:return[1,0,0,1]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){let{parentScale:P,pageDimensions:[Z,q]}=this;return[Z*P,q*P]}setDims(){let{div:{style:P},width:Z,height:q}=this;P.width=`${(100*Z).toFixed(2)}%`,P.height=`${(100*q).toFixed(2)}%`}getInitialTranslation(){return[0,0]}#D(){if(this.#Q)return;this.#Q=document.createElement("div"),this.#Q.classList.add("resizers");let P=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],Z=this._uiManager._signal;for(let q of P){let X=document.createElement("div");this.#Q.append(X),X.classList.add("resizer",q),X.setAttribute("data-resizer-name",q),X.addEventListener("pointerdown",this.#S.bind(this,q),{signal:Z}),X.addEventListener("contextmenu",A0,{signal:Z}),X.tabIndex=-1}this.div.prepend(this.#Q)}#S(P,Z){Z.preventDefault();let{isMac:q}=k8.platform;if(Z.button!==0||Z.ctrlKey&&q)return;this.#X?.toggle(!1);let X=this._isDraggable;this._isDraggable=!1,this.#Y=[Z.screenX,Z.screenY];let z=new AbortController,R=this._uiManager.combinedSignal(z);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",this.#O.bind(this,P),{passive:!0,capture:!0,signal:R}),window.addEventListener("touchmove",_8,{passive:!1,signal:R}),window.addEventListener("contextmenu",A0,{signal:R}),this.#_={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};let f=this.parent.div.style.cursor,G=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(Z.target).cursor;let Q=()=>{z.abort(),this.parent.togglePointerEvents(!0),this.#X?.toggle(!0),this._isDraggable=X,this.parent.div.style.cursor=f,this.div.style.cursor=G,this.#w()};window.addEventListener("pointerup",Q,{signal:R}),window.addEventListener("blur",Q,{signal:R})}#p(P,Z,q,X){this.width=q,this.height=X,this.x=P,this.y=Z,this.setDims(),this.fixAndSetPosition(),this._onResized()}_onResized(){}#w(){if(!this.#_)return;let{savedX:P,savedY:Z,savedWidth:q,savedHeight:X}=this.#_;this.#_=null;let z=this.x,R=this.y,f=this.width,G=this.height;z===P&&R===Z&&f===q&&G===X||this.addCommands({cmd:this.#p.bind(this,z,R,f,G),undo:this.#p.bind(this,P,Z,q,X),mustExec:!0})}static _round(P){return Math.round(1e4*P)/1e4}#O(P,Z){let[q,X]=this.parentDimensions,z=this.x,R=this.y,f=this.width,G=this.height,Q=b1.MIN_SIZE/q,Y=b1.MIN_SIZE/X,W=this.#N(this.rotation),$=(C,L)=>[W[0]*C+W[2]*L,W[1]*C+W[3]*L],_=this.#N(360-this.rotation),J,U,K=!1,I=!1;switch(P){case"topLeft":K=!0,J=(C,L)=>[0,0],U=(C,L)=>[C,L];break;case"topMiddle":J=(C,L)=>[C/2,0],U=(C,L)=>[C/2,L];break;case"topRight":K=!0,J=(C,L)=>[C,0],U=(C,L)=>[0,L];break;case"middleRight":I=!0,J=(C,L)=>[C,L/2],U=(C,L)=>[0,L/2];break;case"bottomRight":K=!0,J=(C,L)=>[C,L],U=(C,L)=>[0,0];break;case"bottomMiddle":J=(C,L)=>[C/2,L],U=(C,L)=>[C/2,0];break;case"bottomLeft":K=!0,J=(C,L)=>[0,L],U=(C,L)=>[C,0];break;case"middleLeft":I=!0,J=(C,L)=>[0,L/2],U=(C,L)=>[C,L/2]}let B=J(f,G),j=U(f,G),V=$(...j),H=b1._round(z+V[0]),M=b1._round(R+V[1]),x,A,k=1,b=1;if(Z.fromKeyboard)({deltaX:x,deltaY:A}=Z);else{let{screenX:C,screenY:L}=Z,[m,d]=this.#Y;[x,A]=this.screenToPageTranslation(C-m,L-d),this.#Y[0]=C,this.#Y[1]=L}var O,p;if([x,A]=(O=x/q,p=A/X,[_[0]*O+_[2]*p,_[1]*O+_[3]*p]),K){let C=Math.hypot(f,G);k=b=Math.max(Math.min(Math.hypot(j[0]-B[0]-x,j[1]-B[1]-A)/C,1/f,1/G),Q/f,Y/G)}else I?k=l8(Math.abs(j[0]-B[0]-x),Q,1)/f:b=l8(Math.abs(j[1]-B[1]-A),Y,1)/G;let D=b1._round(f*k),n=b1._round(G*b);V=$(...U(D,n));let F=H-V[0],l=M-V[1];this.#W||=[this.x,this.y,this.width,this.height],this.width=D,this.height=n,this.x=F,this.y=l,this.setDims(),this.fixAndSetPosition(),this._onResizing()}_onResizing(){}altTextFinish(){this.#X?.finish()}get toolbarButtons(){return null}async addEditToolbar(){if(this._editToolbar||this.#I)return this._editToolbar;this._editToolbar=new H7(this),this.div.append(this._editToolbar.render());let{toolbarButtons:P}=this;if(P)for(let[Z,q]of P)await this._editToolbar.addButton(Z,q);return this.hasComment||this._editToolbar.addButton("comment",this.addCommentButton()),this._editToolbar.addButton("delete"),this._editToolbar}addCommentButtonInToolbar(){this._editToolbar?.addButtonBefore("comment",this.addCommentButton(),".deleteButton")}removeCommentButtonFromToolbar(){this._editToolbar?.removeButton("comment")}removeEditToolbar(){this._editToolbar?.remove(),this._editToolbar=null,this.#X?.destroy()}addContainer(P){let Z=this._editToolbar?.div;Z?Z.before(P):this.div.append(P)}getClientDimensions(){return this.div.getBoundingClientRect()}createAltText(){return this.#X||(o0.initialize(b1._l10n),this.#X=new o0(this),this.#P&&(this.#X.data=this.#P,this.#P=null)),this.#X}get altTextData(){return this.#X?.data}set altTextData(P){this.#X&&(this.#X.data=P)}get guessedAltText(){return this.#X?.guessedText}async setGuessedAltText(P){await this.#X?.setGuessedText(P)}serializeAltText(P){return this.#X?.serialize(P)}hasAltText(){return!!this.#X&&!this.#X.isEmpty()}hasAltTextData(){return this.#X?.hasData()??!1}focusCommentButton(){this.#q?.focusButton()}addCommentButton(){return this.#q||=new Q7(this)}addStandaloneCommentButton(){this.#z?this._uiManager.isEditingMode()&&this.#z.classList.remove("hidden"):this.hasComment&&(this.#z=this.#q.renderForStandalone(),this.div.append(this.#z))}removeStandaloneCommentButton(){this.#q.removeStandaloneCommentButton(),this.#z=null}hideStandaloneCommentButton(){this.#z?.classList.add("hidden")}get comment(){let{data:{richText:P,text:Z,date:q,deleted:X}}=this.#q;return{text:Z,richText:P,date:q,deleted:X,color:this.getNonHCMColor(),opacity:this.opacity??1}}set comment(P){this.#q||=new Q7(this),this.#q.data=P,this.hasComment?(this.removeCommentButtonFromToolbar(),this.addStandaloneCommentButton(),this._uiManager.updateComment(this)):(this.addCommentButtonInToolbar(),this.removeStandaloneCommentButton(),this._uiManager.removeComment(this))}setCommentData({comment:P,popupRef:Z,richText:q}){if(!Z)return;if(this.#q||=new Q7(this),this.#q.setInitialText(P,q),!this.annotationElementId)return;let X=this._uiManager.getAndRemoveDataFromAnnotationStorage(this.annotationElementId);X&&this.updateFromAnnotationLayer(X)}get hasEditedComment(){return this.#q?.hasBeenEdited()}get hasDeletedComment(){return this.#q?.isDeleted()}get hasComment(){return!!this.#q&&!this.#q.isEmpty()&&!this.#q.isDeleted()}async editComment(P){this.#q||=new Q7(this),this.#q.edit(P)}toggleComment(P,Z=void 0){this.hasComment&&this._uiManager.toggleComment(this,P,Z)}setSelectedCommentButton(P){this.#q.setSelectedButton(P)}addComment(P){if(this.hasEditedComment){let[,,,X]=P.rect,[z]=this.pageDimensions,[R]=this.pageTranslation,f=R+z+1,G=X-100,Q=f+180;P.popup={contents:this.comment.text,deleted:this.comment.deleted,rect:[f,G,Q,X]}}}updateFromAnnotationLayer({popup:{contents:P,deleted:Z}}){this.#q.data=Z?null:P}get parentBoundingClientRect(){return this.parent.boundingClientRect}render(){let P=this.div=document.createElement("div");P.setAttribute("data-editor-rotation",(360-this.rotation)%360),P.className=this.name,P.setAttribute("id",this.id),P.tabIndex=this.#R?-1:0,P.setAttribute("role","application"),this.defaultL10nId&&P.setAttribute("data-l10n-id",this.defaultL10nId),this._isVisible||P.classList.add("hidden"),this.setInForeground(),this.#g();let[Z,q]=this.parentDimensions;this.parentRotation%180!=0&&(P.style.maxWidth=`${(100*q/Z).toFixed(2)}%`,P.style.maxHeight=`${(100*Z/q).toFixed(2)}%`);let[X,z]=this.getInitialTranslation();return this.translate(X,z),TU(this,P,["keydown","pointerdown","dblclick"]),this.isResizable&&this._uiManager._supportsPinchToZoom&&(this.#C||=new W2({container:P,isPinchingDisabled:()=>!this.isSelected,onPinchStart:this.#s.bind(this),onPinching:this.#k.bind(this),onPinchEnd:this.#H.bind(this),signal:this._uiManager._signal})),this.addStandaloneCommentButton(),this._uiManager._editorUndoBar?.hide(),P}#s(){this.#_={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height},this.#X?.toggle(!1),this.parent.togglePointerEvents(!1)}#k(P,Z,q){let X=q/Z*0.7+1-0.7;if(X===1)return;let z=this.#N(this.rotation),R=(H,M)=>[z[0]*H+z[2]*M,z[1]*H+z[3]*M],[f,G]=this.parentDimensions,Q=this.x,Y=this.y,W=this.width,$=this.height,_=b1.MIN_SIZE/f,J=b1.MIN_SIZE/G;X=Math.max(Math.min(X,1/W,1/$),_/W,J/$);let U=b1._round(W*X),K=b1._round($*X);if(U===W&&K===$)return;this.#W||=[Q,Y,W,$];let I=R(W/2,$/2),B=b1._round(Q+I[0]),j=b1._round(Y+I[1]),V=R(U/2,K/2);this.x=B-V[0],this.y=j-V[1],this.width=U,this.height=K,this.setDims(),this.fixAndSetPosition(),this._onResizing()}#H(){this.#X?.toggle(!0),this.parent.togglePointerEvents(!0),this.#w()}pointerdown(P){let{isMac:Z}=k8.platform;P.button!==0||P.ctrlKey&&Z?P.preventDefault():(this.#K=!0,this._isDraggable?this.#E(P):this.#m(P))}#m(P){let{isMac:Z}=k8.platform;P.ctrlKey&&!Z||P.shiftKey||P.metaKey&&Z?this.parent.toggleSelected(this):this.parent.setSelected(this)}#E(P){let{isSelected:Z}=this;this._uiManager.setUpDragSession();let q=!1,X=new AbortController,z=this._uiManager.combinedSignal(X),R={capture:!0,passive:!1,signal:z},f=(Q)=>{X.abort(),this.#G=null,this.#K=!1,this._uiManager.endDragSession()||this.#m(Q),q&&this._onStopDragging()};Z&&(this.#b=P.clientX,this.#A=P.clientY,this.#G=P.pointerId,this.#f=P.pointerType,window.addEventListener("pointermove",(Q)=>{q||(q=!0,this._uiManager.toggleComment(this,!0,!1),this._onStartDragging());let{clientX:Y,clientY:W,pointerId:$}=Q;if($!==this.#G)return void _8(Q);let[_,J]=this.screenToPageTranslation(Y-this.#b,W-this.#A);this.#b=Y,this.#A=W,this._uiManager.dragSelectedEditors(_,J)},R),window.addEventListener("touchmove",_8,R),window.addEventListener("pointerdown",(Q)=>{Q.pointerType===this.#f&&(this.#C||Q.isPrimary)&&f(Q),_8(Q)},R));let G=(Q)=>{this.#G&&this.#G!==Q.pointerId?_8(Q):f(Q)};window.addEventListener("pointerup",G,{signal:z}),window.addEventListener("blur",G,{signal:z})}_onStartDragging(){}_onStopDragging(){}moveInDOM(){this.#j&&clearTimeout(this.#j),this.#j=setTimeout(()=>{this.#j=null,this.parent?.moveEditorInDOM(this)},0)}_setParentAndPosition(P,Z,q){P.changeParent(this),this.x=Z,this.y=q,this.fixAndSetPosition(),this._onTranslated()}getRect(P,Z,q=this.rotation){let X=this.parentScale,[z,R]=this.pageDimensions,[f,G]=this.pageTranslation,Q=P/X,Y=Z/X,W=this.x*z,$=this.y*R,_=this.width*z,J=this.height*R;switch(q){case 0:return[W+Q+f,R-$-Y-J+G,W+Q+_+f,R-$-Y+G];case 90:return[W+Y+f,R-$+Q+G,W+Y+J+f,R-$+Q+_+G];case 180:return[W-Q-_+f,R-$+Y+G,W-Q+f,R-$+Y+J+G];case 270:return[W-Y-J+f,R-$-Q-_+G,W-Y+f,R-$-Q+G];default:throw Error("Invalid rotation")}}getRectInCurrentCoords(P,Z){let[q,X,z,R]=P,f=z-q,G=R-X;switch(this.rotation){case 0:return[q,Z-R,f,G];case 90:return[q,Z-X,G,f];case 180:return[z,Z-X,f,G];case 270:return[z,Z-R,G,f];default:throw Error("Invalid rotation")}}getPDFRect(){return this.getRect(0,0)}getNonHCMColor(){return this.color&&b1._colorManager.convert(this._uiManager.getNonHCMColor(this.color))}onUpdatedColor(){this.#q?.onUpdatedColor()}getData(){let{comment:{text:P,color:Z,date:q,opacity:X,deleted:z,richText:R},uid:f,pageIndex:G,creationDate:Q,modificationDate:Y}=this;return{id:f,pageIndex:G,rect:this.getPDFRect(),richText:R,contentsObj:{str:P},creationDate:Q,modificationDate:q||Y,popupRef:!z,color:Z,opacity:X}}onceAdded(P){}isEmpty(){return!1}enableEditMode(){return!this.isInEditMode()&&(this.parent.setEditingState(!1),this.#I=!0,!0)}disableEditMode(){return!!this.isInEditMode()&&(this.parent.setEditingState(!0),this.#I=!1,!0)}isInEditMode(){return this.#I}shouldGetKeyboardEvents(){return this.#V}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}get isOnScreen(){let{top:P,left:Z,bottom:q,right:X}=this.getClientDimensions(),{innerHeight:z,innerWidth:R}=window;return Z<R&&X>0&&P<z&&q>0}#g(){if(this.#J||!this.div)return;this.#J=new AbortController;let P=this._uiManager.combinedSignal(this.#J);this.div.addEventListener("focusin",this.focusin.bind(this),{signal:P}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:P})}rebuild(){this.#g()}rotate(P){}resize(){}serializeDeleted(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:this._initialData?.popupRef||""}}serialize(P=!1,Z=null){return{annotationType:this.mode,pageIndex:this.pageIndex,rect:this.getPDFRect(),rotation:this.rotation,structTreeParentId:this._structTreeParentId,popupRef:this._initialData?.popupRef||""}}static async deserialize(P,Z,q){let X=new this.prototype.constructor({parent:Z,id:Z.getNextId(),uiManager:q,annotationElementId:P.annotationElementId,creationDate:P.creationDate,modificationDate:P.modificationDate});X.rotation=P.rotation,X.#P=P.accessibilityData,X._isCopy=P.isCopy||!1;let[z,R]=X.pageDimensions,[f,G,Q,Y]=X.getRectInCurrentCoords(P.rect,R);return X.x=f/z,X.y=G/R,X.width=Q/z,X.height=Y/R,X}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){if(this.#J?.abort(),this.#J=null,this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.#j&&(clearTimeout(this.#j),this.#j=null),this.#y(),this.removeEditToolbar(),this.#x){for(let P of this.#x.values())clearTimeout(P);this.#x=null}this.parent=null,this.#C?.destroy(),this.#C=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(this.#D(),this.#Q.classList.remove("hidden"))}get toolbarPosition(){return null}get commentButtonPosition(){return this._uiManager.direction==="ltr"?[1,0]:[0,0]}get commentButtonPositionInPage(){let{commentButtonPosition:[P,Z]}=this,[q,X,z,R]=this.getPDFRect();return[b1._round(q+(z-q)*P),b1._round(X+(R-X)*(1-Z))]}get commentButtonColor(){return this._uiManager.makeCommentColor(this.getNonHCMColor(),this.opacity)}get commentPopupPosition(){return this.#q.commentPopupPositionInLayer}set commentPopupPosition(P){this.#q.commentPopupPositionInLayer=P}hasDefaultPopupPosition(){return this.#q.hasDefaultPopupPosition()}get commentButtonWidth(){return this.#q.commentButtonWidth}get elementBeforePopup(){return this.div}setCommentButtonStates(P){this.#q.setCommentButtonStates(P)}keydown(P){if(!this.isResizable||P.target!==this.div||P.key!=="Enter")return;this._uiManager.setSelected(this),this.#_={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};let Z=this.#Q.children;if(!this.#Z){this.#Z=Array.from(Z);let R=this.#l.bind(this),f=this.#r.bind(this),G=this._uiManager._signal;for(let Q of this.#Z){let Y=Q.getAttribute("data-resizer-name");Q.setAttribute("role","spinbutton"),Q.addEventListener("keydown",R,{signal:G}),Q.addEventListener("blur",f,{signal:G}),Q.addEventListener("focus",this.#o.bind(this,Y),{signal:G}),Q.setAttribute("data-l10n-id",b1._l10nResizer[Y])}}let q=this.#Z[0],X=0;for(let R of Z){if(R===q)break;X++}let z=(360-this.rotation+this.parentRotation)%360/90*(this.#Z.length/4);if(z!==X){if(z<X)for(let f=0;f<X-z;f++)this.#Q.append(this.#Q.firstChild);else if(z>X)for(let f=0;f<z-X;f++)this.#Q.firstChild.before(this.#Q.lastChild);let R=0;for(let f of Z){let G=this.#Z[R++].getAttribute("data-resizer-name");f.setAttribute("data-l10n-id",b1._l10nResizer[G])}}this.#d(0),this.#V=!0,this.#Q.firstChild.focus({focusVisible:!0}),P.preventDefault(),P.stopImmediatePropagation()}#l(P){b1._resizerKeyboardManager.exec(this,P)}#r(P){this.#V&&P.relatedTarget?.parentNode!==this.#Q&&this.#y()}#o(P){this.#B=this.#V?P:""}#d(P){if(this.#Z)for(let Z of this.#Z)Z.tabIndex=P}_resizeWithKeyboard(P,Z){this.#V&&this.#O(this.#B,{deltaX:P,deltaY:Z,fromKeyboard:!0})}#y(){this.#V=!1,this.#d(-1),this.#w()}_stopResizingWithKeyboard(){this.#y(),this.div.focus()}select(){this.isSelected&&this._editToolbar?this._editToolbar.show():(this.isSelected=!0,this.makeResizable(),this.div?.classList.add("selectedEditor"),this._editToolbar?(this._editToolbar?.show(),this.#X?.toggleAltTextBadge(!1)):this.addEditToolbar().then(()=>{this.div?.classList.contains("selectedEditor")&&this._editToolbar?.show()}))}focus(){this.div&&!this.div.contains(document.activeElement)&&setTimeout(()=>this.div?.focus({preventScroll:!0}),0)}unselect(){this.isSelected&&(this.isSelected=!1,this.#Q?.classList.add("hidden"),this.div?.classList.remove("selectedEditor"),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),this._editToolbar?.hide(),this.#X?.toggleAltTextBadge(!0),this.hasComment&&this._uiManager.toggleComment(this,!1,!1))}updateParams(P,Z){}disableEditing(){}enableEditing(){}get canChangeContent(){return!1}enterInEditMode(){this.canChangeContent&&(this.enableEditMode(),this.div.focus())}dblclick(P){P.target.nodeName!=="BUTTON"&&(this.enterInEditMode(),this.parent.updateToolbar({mode:this.constructor._editorType,editId:this.id}))}getElementForAltText(){return this.div}get contentDiv(){return this.div}get isEditing(){return this.#U}set isEditing(P){this.#U=P,this.parent&&(P?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(P,Z=!1){if(Z){this.#x||=new Map;let{action:q}=P,X=this.#x.get(q);return X&&clearTimeout(X),X=setTimeout(()=>{this._reportTelemetry(P),this.#x.delete(q),this.#x.size===0&&(this.#x=null)},b1._telemetryTimeout),void this.#x.set(q,X)}P.type||=this.editorType,this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:P}})}show(P=this._isVisible){this.div.classList.toggle("hidden",!P),this._isVisible=P}enable(){this.div&&(this.div.tabIndex=0),this.#R=!1}disable(){this.div&&(this.div.tabIndex=-1),this.#R=!0}updateFakeAnnotationElement(P){if(this.#$||this.deleted)return this.deleted?(this.#$.remove(),void(this.#$=null)):void((this.hasEditedComment||this._hasBeenMoved||this._hasBeenResized)&&this.#$.updateEdited({rect:this.getPDFRect(),popup:this.comment}));this.#$=P.addFakeAnnotation(this)}renderAnnotationElement(P){if(this.deleted)return P.hide(),null;let Z=P.container.querySelector(".annotationContent");if(Z){if(Z.nodeName==="CANVAS"){let q=Z;Z=document.createElement("div"),Z.classList.add("annotationContent",this.editorType),q.before(Z)}}else Z=document.createElement("div"),Z.classList.add("annotationContent",this.editorType),P.container.prepend(Z);return Z}resetAnnotationElement(P){let{firstChild:Z}=P.container;Z?.nodeName==="DIV"&&Z.classList.contains("annotationContent")&&Z.remove()}};FU=class FU extends b1{constructor(P){super(P),this.annotationElementId=P.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}};wZ=Object.freeze({map:null,hash:"",transfer:void 0});SP=class SP{#P=!1;#Z=null;#X=null;#q=new Map;constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(P,Z){let q=this.#q.get(P);return q===void 0?Z:Object.assign(Z,q)}getRawValue(P){return this.#q.get(P)}remove(P){let Z=this.#q.get(P);if(Z!==void 0&&(Z instanceof b1&&this.#X.delete(Z.annotationElementId),this.#q.delete(P),this.#q.size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function")){for(let q of this.#q.values())if(q instanceof b1)return;this.onAnnotationEditor(null)}}setValue(P,Z){let q=this.#q.get(P),X=!1;if(q!==void 0)for(let[z,R]of Object.entries(Z))q[z]!==R&&(X=!0,q[z]=R);else X=!0,this.#q.set(P,Z);X&&this.#z(),Z instanceof b1&&((this.#X||=new Map).set(Z.annotationElementId,Z),typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(Z.constructor._type))}has(P){return this.#q.has(P)}get size(){return this.#q.size}#z(){this.#P||(this.#P=!0,typeof this.onSetModified=="function"&&this.onSetModified())}resetModified(){this.#P&&(this.#P=!1,typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new UX(this)}get serializable(){if(this.#q.size===0)return wZ;let P=new Map,Z=new JX,q=[],X=Object.create(null),z=!1;for(let[R,f]of this.#q){let G=f instanceof b1?f.serialize(!1,X):f;G&&(P.set(R,G),Z.update(`${R}:${JSON.stringify(G)}`),z||=!!G.bitmap)}if(z)for(let R of P.values())R.bitmap&&q.push(R.bitmap);return P.size>0?{map:P,hash:Z.hexdigest(),transfer:q}:wZ}get editorStats(){let P=null,Z=new Map,q=0,X=0;for(let z of this.#q.values()){if(!(z instanceof b1)){z.popup&&(z.popup.deleted?X+=1:q+=1);continue}z.isCommentDeleted?X+=1:z.hasEditedComment&&(q+=1);let R=z.telemetryFinalData;if(!R)continue;let{type:f}=R;Z.has(f)||Z.set(f,Object.getPrototypeOf(z).constructor),P||=Object.create(null);let G=P[f]||=new Map;for(let[Q,Y]of Object.entries(R)){if(Q==="type")continue;let W=G.get(Q);W||(W=new Map,G.set(Q,W));let $=W.get(Y)??0;W.set(Y,$+1)}}if((X>0||q>0)&&(P||=Object.create(null),P.comments={deleted:X,edited:q}),!P)return null;for(let[z,R]of Z)P[z]=R.computeTelemetryFinalData(P[z]);return P}resetModifiedIds(){this.#Z=null}updateEditor(P,Z){let q=this.#X?.get(P);return!!q&&(q.updateFromAnnotationLayer(Z),!0)}getEditor(P){return this.#X?.get(P)||null}get modifiedIds(){if(this.#Z)return this.#Z;let P=[];if(this.#X)for(let Z of this.#X.values())Z.serialize()&&P.push(Z.annotationElementId);return this.#Z={ids:new Set(P),hash:P.join(",")}}[Symbol.iterator](){return this.#q.entries()}};UX=class UX extends SP{#P;constructor(P){super();let{map:Z,hash:q,transfer:X}=P.serializable,z=structuredClone(Z,X?{transfer:X}:null);this.#P={map:z,hash:q,transfer:X}}get print(){X8("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#P}get modifiedIds(){return D1(this,"modifiedIds",{ids:new Set,hash:""})}};pU=function(P,Z,q){if(!Array.isArray(q)||q.length<2)return!1;let[X,z,...R]=q;if(!P(X)&&!Number.isInteger(X))return!1;if(!Z(z))return!1;let f=R.length,G=!0;switch(z.name){case"XYZ":if(f<2||f>3)return!1;break;case"Fit":case"FitB":return f===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(f>1)return!1;break;case"FitR":if(f!==4)return!1;G=!1;break;default:return!1}for(let Q of R)if(!(typeof Q=="number"||G&&Q===null))return!1;return!0}.bind(null,EZ,(P)=>typeof P=="object"&&typeof P?.name=="string");yU=class yU extends KX{constructor({ownerDocument:P=globalThis.document,enableHWA:Z=!1}){super({enableHWA:Z}),this._document=P}_createCanvas(P,Z){let q=this._document.createElement("canvas");return q.width=P,q.height=Z,q}};uZ=class uZ extends BX{async _fetch(P){let Z=await O6(P,this.isCompressed?"arraybuffer":"text");return Z instanceof ArrayBuffer?new Uint8Array(Z):f2(Z)}};DU=class DU extends IX{#P;#Z;#X;#q;#z;#R;#G=0;constructor({docId:P,ownerDocument:Z=globalThis.document}){super(),this.#q=P,this.#z=Z}get#f(){return this.#Z||=new Map}get#Q(){return this.#R||=new Map}get#Y(){if(!this.#X){let P=this.#z.createElement("div"),{style:Z}=P;Z.visibility="hidden",Z.contain="strict",Z.width=Z.height=0,Z.position="absolute",Z.top=Z.left=0,Z.zIndex=-1;let q=this.#z.createElementNS(W4,"svg");q.setAttribute("width",0),q.setAttribute("height",0),this.#X=this.#z.createElementNS(W4,"defs"),P.append(q),q.append(this.#X),this.#z.body.append(P)}return this.#X}#_(P){if(P.length===1){let G=P[0],Q=Array(256);for(let W=0;W<256;W++)Q[W]=G[W]/255;let Y=Q.join(",");return[Y,Y,Y]}let[Z,q,X]=P,z=Array(256),R=Array(256),f=Array(256);for(let G=0;G<256;G++)z[G]=Z[G]/255,R[G]=q[G]/255,f[G]=X[G]/255;return[z.join(","),R.join(","),f.join(",")]}#$(P){if(this.#P===void 0){this.#P="";let Z=this.#z.URL;Z!==this.#z.baseURI&&(Y2(Z)?y1('#createUrl: ignore "data:"-URL for performance reasons.'):this.#P=fX(Z,""))}return`url(${this.#P}#${P})`}addFilter(P){if(!P)return"none";let Z=this.#f.get(P);if(Z)return Z;let[q,X,z]=this.#_(P),R=P.length===1?q:`${q}${X}${z}`;if(Z=this.#f.get(R),Z)return this.#f.set(P,Z),Z;let f=`g_${this.#q}_transfer_map_${this.#G++}`,G=this.#$(f);this.#f.set(P,G),this.#f.set(R,G);let Q=this.#K(f);return this.#U(q,X,z,Q),G}addHCMFilter(P,Z){let q=`${P}-${Z}`,z=this.#Q.get("base");if(z?.key===q)return z.url;if(z?(z.filter?.remove(),z.key=q,z.url="none",z.filter=null):(z={key:q,url:"none",filter:null},this.#Q.set("base",z)),!P||!Z)return z.url;let R=this.#V(P);P=j1.makeHexColor(...R);let f=this.#V(Z);if(Z=j1.makeHexColor(...f),this.#Y.style.color="",P==="#000000"&&Z==="#ffffff"||P===Z)return z.url;let G=Array(256);for(let _=0;_<=255;_++){let J=_/255;G[_]=J<=0.03928?J/12.92:((J+0.055)/1.055)**2.4}let Q=G.join(","),Y=`g_${this.#q}_hcm_filter`,W=z.filter=this.#K(Y);this.#U(Q,Q,Q,W),this.#B(W);let $=(_,J)=>{let U=R[_]/255,K=f[_]/255,I=Array(J+1);for(let B=0;B<=J;B++)I[B]=U+B/J*(K-U);return I.join(",")};return this.#U($(0,5),$(1,5),$(2,5),W),z.url=this.#$(Y),z.url}addAlphaFilter(P){let Z=this.#f.get(P);if(Z)return Z;let[q]=this.#_([P]),X=`alpha_${q}`;if(Z=this.#f.get(X),Z)return this.#f.set(P,Z),Z;let z=`g_${this.#q}_alpha_map_${this.#G++}`,R=this.#$(z);this.#f.set(P,R),this.#f.set(X,R);let f=this.#K(z);return this.#I(q,f),R}addLuminosityFilter(P){let Z,q,X=this.#f.get(P||"luminosity");if(X)return X;if(P?([Z]=this.#_([P]),q=`luminosity_${Z}`):q="luminosity",X=this.#f.get(q),X)return this.#f.set(P,X),X;let z=`g_${this.#q}_luminosity_map_${this.#G++}`,R=this.#$(z);this.#f.set(P,R),this.#f.set(q,R);let f=this.#K(z);return this.#J(f),P&&this.#I(Z,f),R}addHighlightHCMFilter(P,Z,q,X,z){let R=`${Z}-${q}-${X}-${z}`,f=this.#Q.get(P);if(f?.key===R)return f.url;if(f?(f.filter?.remove(),f.key=R,f.url="none",f.filter=null):(f={key:R,url:"none",filter:null},this.#Q.set(P,f)),!Z||!q)return f.url;let[G,Q]=[Z,q].map(this.#V.bind(this)),Y=Math.round(0.2126*G[0]+0.7152*G[1]+0.0722*G[2]),W=Math.round(0.2126*Q[0]+0.7152*Q[1]+0.0722*Q[2]),[$,_]=[X,z].map(this.#V.bind(this));W<Y&&([Y,W,$,_]=[W,Y,_,$]),this.#Y.style.color="";let J=(I,B,j)=>{let V=Array(256),H=(W-Y)/j,M=I/255,x=(B-I)/(255*j),A=0;for(let k=0;k<=j;k++){let b=Math.round(Y+k*H),O=M+k*x;for(let p=A;p<=b;p++)V[p]=O;A=b+1}for(let k=A;k<256;k++)V[k]=V[A-1];return V.join(",")},U=`g_${this.#q}_hcm_${P}_filter`,K=f.filter=this.#K(U);return this.#B(K),this.#U(J($[0],_[0],5),J($[1],_[1],5),J($[2],_[2],5),K),f.url=this.#$(U),f.url}destroy(P=!1){P&&this.#R?.size||(this.#X?.parentNode.parentNode.remove(),this.#X=null,this.#Z?.clear(),this.#Z=null,this.#R?.clear(),this.#R=null,this.#G=0)}#J(P){let Z=this.#z.createElementNS(W4,"feColorMatrix");Z.setAttribute("type","matrix"),Z.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),P.append(Z)}#B(P){let Z=this.#z.createElementNS(W4,"feColorMatrix");Z.setAttribute("type","matrix"),Z.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),P.append(Z)}#K(P){let Z=this.#z.createElementNS(W4,"filter");return Z.setAttribute("color-interpolation-filters","sRGB"),Z.setAttribute("id",P),this.#Y.append(Z),Z}#W(P,Z,q){let X=this.#z.createElementNS(W4,Z);X.setAttribute("type","discrete"),X.setAttribute("tableValues",q),P.append(X)}#U(P,Z,q,X){let z=this.#z.createElementNS(W4,"feComponentTransfer");X.append(z),this.#W(z,"feFuncR",P),this.#W(z,"feFuncG",Z),this.#W(z,"feFuncB",q)}#I(P,Z){let q=this.#z.createElementNS(W4,"feComponentTransfer");Z.append(q),this.#W(q,"feFuncA",P)}#V(P){return this.#Y.style.color=P,T6(getComputedStyle(this.#Y).getPropertyValue("color"))}};gZ=class gZ extends jX{async _fetch(P){let Z=await O6(P,"arraybuffer");return new Uint8Array(Z)}};dZ=class dZ extends VX{async _fetch(P){let Z=await O6(P,"arraybuffer");return new Uint8Array(Z)}};wU=class wU extends IX{};EU=class EU extends KX{_createCanvas(P,Z){return process.getBuiltinModule("module").createRequire(import.meta.url),new Proxy({},{get:(q,X)=>()=>{throw Error("@napi-rs/canvas is not available in this environment")}}).createCanvas(P,Z)}};uU=class uU extends BX{async _fetch(P){return xX(P)}};gU=class gU extends jX{async _fetch(P){return xX(P)}};dU=class dU extends VX{async _fetch(P){return xX(P)}};({floor:DR,ceil:wR}=Math);cZ=new Uint32Array(new Uint8Array([255,255,0,0]).buffer)[0];ER=["path","transform","filter","strokeColor","strokeAlpha","lineWidth","lineCap","lineJoin","miterLimit","dash"],H9=["path","transform","filter","fillColor","fillAlpha","globalCompositeOperation","SMask"],Hx=["transform","SMask","filter","fillAlpha","strokeAlpha","globalCompositeOperation"],Mx=["filter","fillColor","fillAlpha"],Ax=["transform","leading","charSpacing","wordSpacing","hScale","textRise","moveText","textMatrix","font","fontObj","filter","fillColor","textRenderingMode","SMask","fillAlpha","strokeAlpha","globalCompositeOperation","sameLineText"],Lx=["transform"],M9=["transform","fillColor"];hU=class hU extends mP{constructor(P){super(),this._type=P[1],this._bbox=P[2],this._colorStops=P[3],this._p0=P[4],this._p1=P[5],this._r0=P[6],this._r1=P[7],this.matrix=null}_createGradient(P){let Z;this._type==="axial"?Z=P.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(Z=P.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(let q of this._colorStops)Z.addColorStop(q[0],q[1]);return Z}getPattern(P,Z,q,X){let z;if(X===M7||X===V5){let R=Z.current.getClippedPathBoundingBox(X,$8(P))||[0,0,0,0],f=Math.ceil(R[2]-R[0])||1,G=Math.ceil(R[3]-R[1])||1,Q=Z.cachedCanvases.getCanvas("pattern",f,G),Y=Q.context;Y.clearRect(0,0,Y.canvas.width,Y.canvas.height),Y.beginPath(),Y.rect(0,0,Y.canvas.width,Y.canvas.height),Y.translate(-R[0],-R[1]),q=j1.transform(q,[1,0,0,1,R[0],R[1]]),Y.transform(...Z.baseTransform),this.matrix&&Y.transform(...this.matrix),sZ(Y,this._bbox),Y.fillStyle=this._createGradient(Y),Y.fill(),z=P.createPattern(Q.canvas,"no-repeat");let W=new DOMMatrix(q);z.setTransform(W)}else sZ(P,this._bbox),z=this._createGradient(P);return z}};rU=class rU extends mP{constructor(P){super(),this._coords=P[2],this._colors=P[3],this._figures=P[4],this._bounds=P[5],this._bbox=P[6],this._background=P[7],this.matrix=null}_createMeshCanvas(P,Z,q){let X=Math.floor(this._bounds[0]),z=Math.floor(this._bounds[1]),R=Math.ceil(this._bounds[2])-X,f=Math.ceil(this._bounds[3])-z,G=Math.min(Math.ceil(Math.abs(R*P[0]*1.1)),3000),Q=Math.min(Math.ceil(Math.abs(f*P[1]*1.1)),3000),Y=R/G,W=f/Q,$={coords:this._coords,colors:this._colors,offsetX:-X,offsetY:-z,scaleX:1/Y,scaleY:1/W},_=G+4,J=Q+4,U=q.getCanvas("mesh",_,J),K=U.context,I=K.createImageData(G,Q);if(Z){let B=I.data;for(let j=0,V=B.length;j<V;j+=4)B[j]=Z[0],B[j+1]=Z[1],B[j+2]=Z[2],B[j+3]=255}for(let B of this._figures)bx(I,B,$);return K.putImageData(I,2,2),{canvas:U.canvas,offsetX:X-2*Y,offsetY:z-2*W,scaleX:Y,scaleY:W}}isModifyingCurrentTransform(){return!0}getPattern(P,Z,q,X){sZ(P,this._bbox);let z=new Float32Array(2);if(X===A7)j1.singularValueDecompose2dScale($8(P),z);else if(this.matrix){j1.singularValueDecompose2dScale(this.matrix,z);let[f,G]=z;j1.singularValueDecompose2dScale(Z.baseTransform,z),z[0]*=f,z[1]*=G}else j1.singularValueDecompose2dScale(Z.baseTransform,z);let R=this._createMeshCanvas(z,X===A7?null:this._background,Z.cachedCanvases);return X!==A7&&(P.setTransform(...Z.baseTransform),this.matrix&&P.transform(...this.matrix)),P.translate(R.offsetX,R.offsetY),P.scale(R.scaleX,R.scaleY),P.createPattern(R.canvas,"no-repeat")}};lU=class lU extends mP{getPattern(){return"hotpink"}};L9=new DOMMatrix,V0=new Float32Array(2),G6=new Float32Array([1/0,1/0,-1/0,-1/0]);Nx=["butt","round","square"],vx=["miter","round","bevel"],Fx={},cR={};for(let P in k6)J6.prototype[P]!==void 0&&(J6.prototype[k6[P]]=J6.prototype[P]);U6=class U6{#P;#Z;#X;static strings=["fontFamily","fontWeight","italicAngle"];static write(P){let Z=new TextEncoder,q={},X=0;for(let Q of U6.strings){let Y=Z.encode(P[Q]);q[Q]=Y,X+=4+Y.length}let z=new ArrayBuffer(X),R=new Uint8Array(z),f=new DataView(z),G=0;for(let Q of U6.strings){let Y=q[Q],W=Y.length;f.setUint32(G,W),R.set(Y,G+4),G+=4+W}return o1(G===z.byteLength,"CssFontInfo.write: Buffer overflow"),z}constructor(P){this.#P=P,this.#Z=new DataView(this.#P),this.#X=new TextDecoder}#q(P){o1(P<U6.strings.length,"Invalid string index");let Z=0;for(let X=0;X<P;X++)Z+=this.#Z.getUint32(Z)+4;let q=this.#Z.getUint32(Z);return this.#X.decode(new Uint8Array(this.#P,Z+4,q))}get fontFamily(){return this.#q(0)}get fontWeight(){return this.#q(1)}get italicAngle(){return this.#q(2)}};K6=class K6{#P;#Z;#X;static strings=["css","loadedName","baseFontName","src"];static write(P){let Z=new TextEncoder,q={},X=0;for(let $ of K6.strings){let _=Z.encode(P[$]);q[$]=_,X+=4+_.length}X+=4;let z,R,f=1+X;P.style&&(z=Z.encode(P.style.style),R=Z.encode(P.style.weight),f+=4+z.length+4+R.length);let G=new ArrayBuffer(f),Q=new Uint8Array(G),Y=new DataView(G),W=0;Y.setUint8(W++,P.guessFallback?1:0),Y.setUint32(W,0),W+=4,X=0;for(let $ of K6.strings){let _=q[$],J=_.length;X+=4+J,Y.setUint32(W,J),Q.set(_,W+4),W+=4+J}return Y.setUint32(W-X-4,X),P.style&&(Y.setUint32(W,z.length),Q.set(z,W+4),W+=4+z.length,Y.setUint32(W,R.length),Q.set(R,W+4),W+=4+R.length),o1(W<=G.byteLength,"SubstitionInfo.write: Buffer overflow"),G.transferToFixedLength(W)}constructor(P){this.#P=P,this.#Z=new DataView(this.#P),this.#X=new TextDecoder}get guessFallback(){return this.#Z.getUint8(0)!==0}#q(P){o1(P<K6.strings.length,"Invalid string index");let Z=5;for(let X=0;X<P;X++)Z+=this.#Z.getUint32(Z)+4;let q=this.#Z.getUint32(Z);return this.#X.decode(new Uint8Array(this.#P,Z+4,q))}get css(){return this.#q(0)}get loadedName(){return this.#q(1)}get baseFontName(){return this.#q(2)}get src(){return this.#q(3)}get style(){let P=1;P+=4+this.#Z.getUint32(P);let Z=this.#Z.getUint32(P),q=this.#X.decode(new Uint8Array(this.#P,P+4,Z));P+=4+Z;let X=this.#Z.getUint32(P);return{style:q,weight:this.#X.decode(new Uint8Array(this.#P,P+4,X))}}};Z8=class Z8{static bools=["black","bold","disableFontFace","fontExtraProperties","isInvalidPDFjsFont","isType3Font","italic","missingFile","remeasure","vertical"];static numbers=["ascent","defaultWidth","descent"];static strings=["fallbackName","loadedName","mimetype","name"];static#P=Math.ceil(2*this.bools.length/8);static#Z=this.#P+8*this.numbers.length;static#X=this.#Z+1+8;static#q=this.#X+1+48;static#z=this.#q+1+6;#R;#G;#f;constructor({data:P,extra:Z}){this.#R=P,this.#G=new TextDecoder,this.#f=new DataView(this.#R),Z&&Object.assign(this,Z)}#Q(P){o1(P<Z8.bools.length,"Invalid boolean index");let Z=Math.floor(P/4),q=2*P%8,X=this.#f.getUint8(Z)>>q&3;return X===0?void 0:X===2}get black(){return this.#Q(0)}get bold(){return this.#Q(1)}get disableFontFace(){return this.#Q(2)}get fontExtraProperties(){return this.#Q(3)}get isInvalidPDFjsFont(){return this.#Q(4)}get isType3Font(){return this.#Q(5)}get italic(){return this.#Q(6)}get missingFile(){return this.#Q(7)}get remeasure(){return this.#Q(8)}get vertical(){return this.#Q(9)}#Y(P){return o1(P<Z8.numbers.length,"Invalid number index"),this.#f.getFloat64(Z8.#P+8*P)}get ascent(){return this.#Y(0)}get defaultWidth(){return this.#Y(1)}get descent(){return this.#Y(2)}get bbox(){let P=Z8.#Z;if(this.#f.getUint8(P)===0)return;P+=1;let Z=[];for(let q=0;q<4;q++)Z.push(this.#f.getInt16(P,!0)),P+=2;return Z}get fontMatrix(){let P=Z8.#X;if(this.#f.getUint8(P)===0)return;P+=1;let Z=[];for(let q=0;q<6;q++)Z.push(this.#f.getFloat64(P,!0)),P+=8;return Z}get defaultVMetrics(){let P=Z8.#q;if(this.#f.getUint8(P)===0)return;P+=1;let Z=[];for(let q=0;q<3;q++)Z.push(this.#f.getInt16(P,!0)),P+=2;return Z}#_(P){o1(P<Z8.strings.length,"Invalid string index");let Z=Z8.#z+4;for(let z=0;z<P;z++)Z+=this.#f.getUint32(Z)+4;let q=this.#f.getUint32(Z),X=new Uint8Array(q);return X.set(new Uint8Array(this.#R,Z+4,q)),this.#G.decode(X)}get fallbackName(){return this.#_(0)}get loadedName(){return this.#_(1)}get mimetype(){return this.#_(2)}get name(){return this.#_(3)}get data(){let P=Z8.#z;P+=4+this.#f.getUint32(P),P+=4+this.#f.getUint32(P),P+=4+this.#f.getUint32(P);let Z=this.#f.getUint32(P);if(Z!==0)return new Uint8Array(this.#R,P+4,Z)}clearData(){let P=Z8.#z;P+=4+this.#f.getUint32(P),P+=4+this.#f.getUint32(P),P+=4+this.#f.getUint32(P);let Z=this.#f.getUint32(P);new Uint8Array(this.#R,P+4,Z).fill(0),this.#f.setUint32(P,0)}get cssFontInfo(){let P=Z8.#z;P+=4+this.#f.getUint32(P),P+=4+this.#f.getUint32(P);let Z=this.#f.getUint32(P);if(Z===0)return null;let q=new Uint8Array(Z);return q.set(new Uint8Array(this.#R,P+4,Z)),new U6(q.buffer)}get systemFontInfo(){let P=Z8.#z;P+=4+this.#f.getUint32(P);let Z=this.#f.getUint32(P);if(Z===0)return null;let q=new Uint8Array(Z);return q.set(new Uint8Array(this.#R,P+4,Z)),new K6(q.buffer)}static write(P){let Z=P.systemFontInfo?K6.write(P.systemFontInfo):null,q=P.cssFontInfo?U6.write(P.cssFontInfo):null,X=new TextEncoder,z={},R=0;for(let U of Z8.strings)z[U]=X.encode(P[U]),R+=4+z[U].length;let f=Z8.#z+4+R+4+(Z?Z.byteLength:0)+4+(q?q.byteLength:0)+4+(P.data?P.data.length:0),G=new ArrayBuffer(f),Q=new Uint8Array(G),Y=new DataView(G),W=0,$=Z8.bools.length,_=0,J=0;for(let U=0;U<$;U++){let K=P[Z8.bools[U]];_|=(K===void 0?0:K?2:1)<<J,J+=2,J!==8&&U!==$-1||(Y.setUint8(W++,_),_=0,J=0)}o1(W===Z8.#P,"FontInfo.write: Boolean properties offset mismatch");for(let U of Z8.numbers)Y.setFloat64(W,P[U]),W+=8;if(o1(W===Z8.#Z,"FontInfo.write: Number properties offset mismatch"),P.bbox){Y.setUint8(W++,4);for(let U of P.bbox)Y.setInt16(W,U,!0),W+=2}else Y.setUint8(W++,0),W+=8;if(o1(W===Z8.#X,"FontInfo.write: BBox properties offset mismatch"),P.fontMatrix){Y.setUint8(W++,6);for(let U of P.fontMatrix)Y.setFloat64(W,U,!0),W+=8}else Y.setUint8(W++,0),W+=48;if(o1(W===Z8.#q,"FontInfo.write: FontMatrix properties offset mismatch"),P.defaultVMetrics){Y.setUint8(W++,1);for(let U of P.defaultVMetrics)Y.setInt16(W,U,!0),W+=2}else Y.setUint8(W++,0),W+=6;o1(W===Z8.#z,"FontInfo.write: DefaultVMetrics properties offset mismatch"),Y.setUint32(Z8.#z,0),W+=4;for(let U of Z8.strings){let K=z[U],I=K.length;Y.setUint32(W,I),Q.set(K,W+4),W+=4+I}if(Y.setUint32(Z8.#z,W-Z8.#z-4),Z){let U=Z.byteLength;Y.setUint32(W,U),o1(W+4+U<=G.byteLength,"FontInfo.write: Buffer overflow at systemFontInfo"),Q.set(new Uint8Array(Z),W+4),W+=4+U}else Y.setUint32(W,0),W+=4;if(q){let U=q.byteLength;Y.setUint32(W,U),o1(W+4+U<=G.byteLength,"FontInfo.write: Buffer overflow at cssFontInfo"),Q.set(new Uint8Array(q),W+4),W+=4+U}else Y.setUint32(W,0),W+=4;return P.data===void 0?(Y.setUint32(W,0),W+=4):(Y.setUint32(W,P.data.length),Q.set(P.data,W+4),W+=4+P.data.length),o1(W<=G.byteLength,"FontInfo.write: Buffer overflow"),G.transferToFixedLength(W)}};aU=class aU{#P;#Z;constructor({parsedData:P,rawData:Z}){this.#P=P,this.#Z=Z}getRaw(){return this.#Z}get(P){return this.#P.get(P)??null}[Symbol.iterator](){return this.#P.entries()}};t5=Symbol("INTERNAL");iU=class iU{#P=null;#Z=new Map;#X=null;#q=null;constructor(P,Z=zX){if(this.renderingIntent=Z,this.name=null,this.creator=null,P!==null){this.name=P.name,this.creator=P.creator,this.#q=P.order;for(let q of P.groups)this.#Z.set(q.id,new nU(Z,q));if(P.baseState==="OFF")for(let q of this.#Z.values())q._setVisible(t5,!1);for(let q of P.on)this.#Z.get(q)._setVisible(t5,!0);for(let q of P.off)this.#Z.get(q)._setVisible(t5,!1);this.#X=this.getHash()}}#z(P){let Z=P.length;if(Z<2)return!0;let q=P[0];for(let X=1;X<Z;X++){let z=P[X],R;if(Array.isArray(z))R=this.#z(z);else{if(!this.#Z.has(z))return y1(`Optional content group not found: ${z}`),!0;R=this.#Z.get(z).visible}switch(q){case"And":if(!R)return!1;break;case"Or":if(R)return!0;break;case"Not":return!R;default:return!0}}return q==="And"}isVisible(P){if(this.#Z.size===0)return!0;if(!P)return NP("Optional content group not defined."),!0;if(P.type==="OCG")return this.#Z.has(P.id)?this.#Z.get(P.id).visible:(y1(`Optional content group not found: ${P.id}`),!0);if(P.type==="OCMD"){if(P.expression)return this.#z(P.expression);if(!P.policy||P.policy==="AnyOn"){for(let Z of P.ids){if(!this.#Z.has(Z))return y1(`Optional content group not found: ${Z}`),!0;if(this.#Z.get(Z).visible)return!0}return!1}if(P.policy==="AllOn"){for(let Z of P.ids){if(!this.#Z.has(Z))return y1(`Optional content group not found: ${Z}`),!0;if(!this.#Z.get(Z).visible)return!1}return!0}if(P.policy==="AnyOff"){for(let Z of P.ids){if(!this.#Z.has(Z))return y1(`Optional content group not found: ${Z}`),!0;if(!this.#Z.get(Z).visible)return!0}return!1}if(P.policy==="AllOff"){for(let Z of P.ids){if(!this.#Z.has(Z))return y1(`Optional content group not found: ${Z}`),!0;if(this.#Z.get(Z).visible)return!1}return!0}return y1(`Unknown optional content policy ${P.policy}.`),!0}return y1(`Unknown group type ${P.type}.`),!0}setVisibility(P,Z=!0,q=!0){let X=this.#Z.get(P);if(X){if(q&&Z&&X.rbGroups.length)for(let z of X.rbGroups)for(let R of z)R!==P&&this.#Z.get(R)?._setVisible(t5,!1,!0);X._setVisible(t5,!!Z,!0),this.#P=null}else y1(`Optional content group not found: ${P}`)}setOCGState({state:P,preserveRB:Z}){let q;for(let X of P){switch(X){case"ON":case"OFF":case"Toggle":q=X;continue}let z=this.#Z.get(X);if(z)switch(q){case"ON":this.setVisibility(X,!0,Z);break;case"OFF":this.setVisibility(X,!1,Z);break;case"Toggle":this.setVisibility(X,!z.visible,Z)}}this.#P=null}get hasInitialVisibility(){return this.#X===null||this.getHash()===this.#X}getOrder(){return this.#Z.size?this.#q?this.#q.slice():[...this.#Z.keys()]:null}getGroup(P){return this.#Z.get(P)||null}getHash(){if(this.#P!==null)return this.#P;let P=new JX;for(let[Z,q]of this.#Z)P.update(`${Z}:${q.visible}`);return this.#P=P.hexdigest()}[Symbol.iterator](){return this.#Z.entries()}};Sx=/^[a-z][a-z0-9\-+.]+:/i;t6=Symbol("INITIAL_DATA");MX=class MX{#P=Object.create(null);#Z(P){return this.#P[P]||={...Promise.withResolvers(),data:t6}}get(P,Z=null){if(Z){let X=this.#Z(P);return X.promise.then(()=>Z(X.data)),null}let q=this.#P[P];if(!q||q.data===t6)throw Error(`Requesting object that isn't resolved yet ${P}.`);return q.data}has(P){let Z=this.#P[P];return!!Z&&Z.data!==t6}delete(P){let Z=this.#P[P];return!(!Z||Z.data===t6)&&(delete this.#P[P],!0)}resolve(P,Z=null){let q=this.#Z(P);q.data=Z,q.resolve()}clear(){for(let P in this.#P){let{data:Z}=this.#P[P];Z?.bitmap?.close()}this.#P=Object.create(null)}*[Symbol.iterator](){for(let P in this.#P){let{data:Z}=this.#P[P];Z!==t6&&(yield[P,Z])}}};s8=class s8{#P=Promise.withResolvers();#Z=null;#X=!1;#q=!!globalThis.FontInspector?.enabled;#z=null;#R=null;#G=0;#f=0;#Q=null;#Y=null;#_=0;#$=0;#J=Object.create(null);#B=[];#K=null;#W=[];#U=new WeakMap;#I=null;static#V=new Map;static#j=new Map;static#b=new WeakMap;static#A=null;static#x=new Set;constructor({textContentSource:P,container:Z,viewport:q}){if(P instanceof ReadableStream)this.#K=P;else{if(typeof P!="object")throw Error('No "textContentSource" parameter specified.');this.#K=new ReadableStream({start(G){G.enqueue(P),G.close()}})}this.#Z=this.#Y=Z,this.#$=q.scale*u0.pixelRatio,this.#_=q.rotation,this.#R={div:null,properties:null,ctx:null};let{pageWidth:X,pageHeight:z,pageX:R,pageY:f}=q.rawDims;this.#I=[1,0,0,-1,-R,f+z],this.#f=X,this.#G=z,s8.#N(),i4(Z,q),this.#P.promise.finally(()=>{s8.#x.delete(this),this.#R=null,this.#J=null}).catch(()=>{})}static get fontFamilyMap(){let{isWindows:P,isFirefox:Z}=k8.platform;return D1(this,"fontFamilyMap",new Map([["sans-serif",(P&&Z?"Calibri, ":"")+"sans-serif"],["monospace",(P&&Z?"Lucida Console, ":"")+"monospace"]]))}render(){let P=()=>{this.#Q.read().then(({value:Z,done:q})=>{q?this.#P.resolve():(this.#z??=Z.lang,Object.assign(this.#J,Z.styles),this.#C(Z.items),P())},this.#P.reject)};return this.#Q=this.#K.getReader(),s8.#x.add(this),P(),this.#P.promise}update({viewport:P,onBefore:Z=null}){let q=P.scale*u0.pixelRatio,X=P.rotation;if(X!==this.#_&&(Z?.(),this.#_=X,i4(this.#Y,{rotation:X})),q!==this.#$){Z?.(),this.#$=q;let z={div:null,properties:null,ctx:s8.#v(this.#z)};for(let R of this.#W)z.properties=this.#U.get(R),z.div=R,this.#L(z)}}cancel(){let P=new f4("TextLayer task cancelled.");this.#Q?.cancel(P).catch(()=>{}),this.#Q=null,this.#P.reject(P)}get textDivs(){return this.#W}get textContentItemsStr(){return this.#B}#C(P){if(this.#X)return;this.#R.ctx??=s8.#v(this.#z);let Z=this.#W,q=this.#B;for(let X of P){if(Z.length>1e5)return y1("Ignoring additional textDivs for performance reasons."),void(this.#X=!0);if(X.str!==void 0)q.push(X.str),this.#M(X);else if(X.type==="beginMarkedContentProps"||X.type==="beginMarkedContent"){let z=this.#Z;this.#Z=document.createElement("span"),this.#Z.classList.add("markedContent"),X.id&&this.#Z.setAttribute("id",`${X.id}`),z.append(this.#Z)}else X.type==="endMarkedContent"&&(this.#Z=this.#Z.parentNode)}}#M(P){let Z=document.createElement("span"),q={angle:0,canvasWidth:0,hasText:P.str!=="",hasEOL:P.hasEOL,fontSize:0};this.#W.push(Z);let X=j1.transform(this.#I,P.transform),z=Math.atan2(X[1],X[0]),R=this.#J[P.fontName];R.vertical&&(z+=Math.PI/2);let f=this.#q&&R.fontSubstitution||R.fontFamily;f=s8.fontFamilyMap.get(f)||f;let G=Math.hypot(X[2],X[3]),Q=G*s8.#D(f,R,this.#z),Y,W;z===0?(Y=X[4],W=X[5]-Q):(Y=X[4]+Q*Math.sin(z),W=X[5]-Q*Math.cos(z));let $="calc(var(--total-scale-factor) *",_=Z.style;this.#Z===this.#Y?(_.left=`${(100*Y/this.#f).toFixed(2)}%`,_.top=`${(100*W/this.#G).toFixed(2)}%`):(_.left=`${$}${Y.toFixed(2)}px)`,_.top=`${$}${W.toFixed(2)}px)`),_.fontSize=`${$}${(s8.#A*G).toFixed(2)}px)`,_.fontFamily=f,q.fontSize=G,Z.setAttribute("role","presentation"),Z.textContent=P.str,Z.dir=P.dir,this.#q&&(Z.dataset.fontName=R.fontSubstitutionLoadedName||P.fontName),z!==0&&(q.angle=z*(180/Math.PI));let J=!1;if(P.str.length>1)J=!0;else if(P.str!==" "&&P.transform[0]!==P.transform[3]){let U=Math.abs(P.transform[0]),K=Math.abs(P.transform[3]);U!==K&&Math.max(U,K)/Math.min(U,K)>1.5&&(J=!0)}if(J&&(q.canvasWidth=R.vertical?P.height:P.width),this.#U.set(Z,q),this.#R.div=Z,this.#R.properties=q,this.#L(this.#R),q.hasText&&this.#Z.append(Z),q.hasEOL){let U=document.createElement("br");U.setAttribute("role","presentation"),this.#Z.append(U)}}#L(P){let{div:Z,properties:q,ctx:X}=P,{style:z}=Z,R="";if(s8.#A>1&&(R=`scale(${1/s8.#A})`),q.canvasWidth!==0&&q.hasText){let{fontFamily:f}=z,{canvasWidth:G,fontSize:Q}=q;s8.#T(X,Q*this.#$,f);let{width:Y}=X.measureText(Z.textContent);Y>0&&(R=`scaleX(${G*this.#$/Y}) ${R}`)}q.angle!==0&&(R=`rotate(${q.angle}deg) ${R}`),R.length>0&&(z.transform=R)}static cleanup(){if(!(this.#x.size>0)){this.#V.clear();for(let{canvas:P}of this.#j.values())P.remove();this.#j.clear()}}static#v(P=null){let Z=this.#j.get(P||="");if(!Z){let q=document.createElement("canvas");q.className="hiddenCanvasElement",q.lang=P,document.body.append(q),Z=q.getContext("2d",{alpha:!1,willReadFrequently:!0}),this.#j.set(P,Z),this.#b.set(Z,{size:0,family:""})}return Z}static#T(P,Z,q){let X=this.#b.get(P);Z===X.size&&q===X.family||(P.font=`${Z}px ${q}`,X.size=Z,X.family=q)}static#N(){if(this.#A!==null)return;let P=document.createElement("div");P.style.opacity=0,P.style.lineHeight=1,P.style.fontSize="1px",P.style.position="absolute",P.textContent="X",document.body.append(P),this.#A=P.getBoundingClientRect().height,P.remove()}static#D(P,Z,q){let X=this.#V.get(P);if(X)return X;let z=this.#v(q);z.canvas.width=z.canvas.height=30,this.#T(z,30,P);let R=z.measureText(""),f=R.fontBoundingBoxAscent,G=Math.abs(R.fontBoundingBoxDescent);z.canvas.width=z.canvas.height=0;let Q=0.8;return f?Q=f/(f+G):(k8.platform.isFirefox&&y1("Enable the `dom.textMetrics.fontBoundingBox.enabled` preference in `about:config` to improve TextLayer rendering."),Z.ascent?Q=Z.ascent:Z.descent&&(Q=1+Z.descent)),this.#V.set(P,Q),Q}};v8=class v8{#P=Promise.withResolvers();#Z=null;#X=null;#q=null;static#z=0;static#R=!0;static#G=new WeakMap;static{z0&&(this.#R=!0,F5.workerSrc||="./pdf.worker.mjs"),this._isSameOrigin=(P,Z)=>{let q=URL.parse(P);if(!q?.origin||q.origin==="null")return!1;let X=new URL(Z,q);return q.origin===X.origin},this._createCDNWrapper=(P)=>{let Z=`await import("${P}");`;return URL.createObjectURL(new Blob([Z],{type:"text/javascript"}))},this.fromPort=(P)=>{var Z;if(Z="`PDFWorker.fromPort` - please use `PDFWorker.create` instead.",console.log("Deprecated API usage: "+Z),!P?.port)throw Error("PDFWorker.fromPort - invalid method signature.");return this.create(P)}}constructor({name:P=null,port:Z=null,verbosity:q=xx()}={}){if(this.name=P,this.destroyed=!1,this.verbosity=q,Z){if(v8.#G.has(Z))throw Error("Cannot use more than one PDFWorker per port.");v8.#G.set(Z,this),this.#Q(Z)}else this.#Y()}get promise(){return this.#P.promise}#f(){this.#P.resolve(),this.#Z.send("configure",{verbosity:this.verbosity})}get port(){return this.#X}get messageHandler(){return this.#Z}#Q(P){this.#X=P,this.#Z=new f6("main","worker",P),this.#Z.on("ready",()=>{}),this.#f()}#Y(){if(v8.#R||v8.#$)return void this.#_();let{workerSrc:P}=v8;try{v8._isSameOrigin(window.location,P)||(P=v8._createCDNWrapper(new URL(P,window.location).href));let Z=new Worker(P,{type:"module"}),q=new f6("main","worker",Z),X=()=>{z.abort(),q.destroy(),Z.terminate(),this.destroyed?this.#P.reject(Error("Worker was destroyed")):this.#_()},z=new AbortController;Z.addEventListener("error",()=>{this.#q||X()},{signal:z.signal}),q.on("test",(f)=>{z.abort(),!this.destroyed&&f?(this.#Z=q,this.#X=Z,this.#q=Z,this.#f()):X()}),q.on("ready",(f)=>{if(z.abort(),this.destroyed)X();else try{R()}catch{this.#_()}});let R=()=>{let f=new Uint8Array;q.send("test",f,[f.buffer])};return void R()}catch{NP("The worker has been disabled.")}this.#_()}#_(){v8.#R||(y1("Setting up fake worker."),v8.#R=!0),v8._setupFakeWorkerGlobal.then((P)=>{if(this.destroyed)return void this.#P.reject(Error("Worker was destroyed"));let Z=new OU;this.#X=Z;let q="fake"+v8.#z++,X=new f6(q+"_worker",q,Z);P.setup(X,Z),this.#Z=new f6(q,q+"_worker",Z),this.#f()}).catch((P)=>{this.#P.reject(Error(`Setting up fake worker failed: "${P.message}".`))})}destroy(){this.destroyed=!0,this.#q?.terminate(),this.#q=null,v8.#G.delete(this.#X),this.#X=null,this.#Z?.destroy(),this.#Z=null}static create(P){let Z=this.#G.get(P?.port);if(Z){if(Z._pendingDestroy)throw Error("PDFWorker.create - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return Z}return new v8(P)}static get workerSrc(){if(F5.workerSrc)return F5.workerSrc;throw Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get#$(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}}static get _setupFakeWorkerGlobal(){return D1(this,"_setupFakeWorkerGlobal",(async()=>{if(this.#$)return this.#$;return(await import(this.workerSrc)).WorkerMessageHandler})())}};Q6=class Q6{#P=null;static#Z=new WeakSet;constructor({callback:P,params:Z,objs:q,commonObjs:X,annotationCanvasMap:z,operatorList:R,pageIndex:f,canvasFactory:G,filterFactory:Q,useRequestAnimationFrame:Y=!1,pdfBug:W=!1,pageColors:$=null,enableHWA:_=!1,operationsFilter:J=null}){this.callback=P,this.params=Z,this.objs=q,this.commonObjs=X,this.annotationCanvasMap=z,this.operatorListIdx=null,this.operatorList=R,this._pageIndex=f,this.canvasFactory=G,this.filterFactory=Q,this._pdfBug=W,this.pageColors=$,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=Y===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new HK(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=Z.canvas,this._canvasContext=Z.canvas?null:Z.canvasContext,this._enableHWA=_,this._dependencyTracker=Z.dependencyTracker,this._operationsFilter=J}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:P=!1,optionalContentConfig:Z}){if(this.cancelled)return;if(this._canvas){if(Q6.#Z.has(this._canvas))throw Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");Q6.#Z.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());let{viewport:q,transform:X,background:z,dependencyTracker:R}=this.params,f=this._canvasContext||this._canvas.getContext("2d",{alpha:!1,willReadFrequently:!this._enableHWA});this.gfx=new J6(f,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:Z},this.annotationCanvasMap,this.pageColors,R),this.gfx.beginDrawing({transform:X,viewport:q,transparency:P,background:z}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}cancel(P=null,Z=0){this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),this.#P&&(window.cancelAnimationFrame(this.#P),this.#P=null),Q6.#Z.delete(this._canvas),P||=new Q2(`Rendering cancelled, page ${this._pageIndex+1}`,Z),this.callback(P),this.task.onError?.(P)}operatorListChanged(){this.graphicsReady?(this.gfx.dependencyTracker?.growOperationsCount(this.operatorList.fnArray.length),this.stepper?.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||=this._continueBound}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?this.#P=window.requestAnimationFrame(()=>{this.#P=null,this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper,this._operationsFilter),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),Q6.#Z.delete(this._canvas),this.callback())))}};N6=class N6 extends LK{_createSVG(P){return document.createElementNS(W4,P)}};D5=new WeakSet,mx=60*new Date().getTimezoneOffset()*1000;bK=class bK extends U8{constructor(P){super(P,{isRenderable:!0,ignoreBorder:!0}),this.editor=P.editor}render(){return this.container.className="editorAnnotation",this.container}createOrUpdatePopup(){let{editor:P}=this;P.hasComment&&(this._createPopup(P.comment),this.extraPopupElement.popup.renderCommentButton())}get hasCommentButton(){return this.enableComment&&this.editor.hasComment}get commentButtonPosition(){return this.editor.commentButtonPositionInPage}get commentText(){return this.editor.comment.text}set commentText(P){this.editor.comment=P,P||this.removePopup()}get commentData(){return this.editor.getData()}remove(){this.container.remove(),this.container=null,this.removePopup()}};yP=class yP extends U8{constructor(P,Z=null){super(P,{isRenderable:!0,ignoreBorder:!!Z?.ignoreBorder,createQuadrilaterals:!0}),this.isTooltipOnly=P.data.isTooltipOnly}render(){let{data:P,linkService:Z}=this,q=document.createElement("a");q.setAttribute("data-element-id",P.id);let X=!1;return P.url?(Z.addLinkAttributes(q,P.url,P.newWindow),X=!0):P.action?(this._bindNamedAction(q,P.action,P.overlaidText),X=!0):P.attachment?(this.#Z(q,P.attachment,P.overlaidText,P.attachmentDest),X=!0):P.setOCGState?(this.#X(q,P.setOCGState,P.overlaidText),X=!0):P.dest?(this._bindLink(q,P.dest,P.overlaidText),X=!0):(P.actions&&(P.actions.Action||P.actions["Mouse Up"]||P.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(q,P),X=!0),P.resetForm?(this._bindResetFormAction(q,P.resetForm),X=!0):this.isTooltipOnly&&!X&&(this._bindLink(q,""),X=!0)),this.container.classList.add("linkAnnotation"),X&&this.container.append(q),this.container}#P(){this.container.setAttribute("data-internal-link","")}_bindLink(P,Z,q=""){P.href=this.linkService.getDestinationHash(Z),P.onclick=()=>(Z&&this.linkService.goToDestination(Z),!1),(Z||Z==="")&&this.#P(),q&&(P.title=q)}_bindNamedAction(P,Z,q=""){P.href=this.linkService.getAnchorUrl(""),P.onclick=()=>(this.linkService.executeNamedAction(Z),!1),q&&(P.title=q),this.#P()}#Z(P,Z,q="",X=null){P.href=this.linkService.getAnchorUrl(""),Z.description?P.title=Z.description:q&&(P.title=q),P.onclick=()=>(this.downloadManager?.openOrDownloadData(Z.content,Z.filename,X),!1),this.#P()}#X(P,Z,q=""){P.href=this.linkService.getAnchorUrl(""),P.onclick=()=>(this.linkService.executeSetOCGState(Z),!1),q&&(P.title=q),this.#P()}_bindJSAction(P,Z){P.href=this.linkService.getAnchorUrl("");let q=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(let X of Object.keys(Z.actions)){let z=q.get(X);z&&(P[z]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Z.id,name:X}}),!1))}Z.overlaidText&&(P.title=Z.overlaidText),P.onclick||(P.onclick=()=>!1),this.#P()}_bindResetFormAction(P,Z){let q=P.onclick;if(q||(P.href=this.linkService.getAnchorUrl("")),this.#P(),!this._fieldObjects)return y1('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),void(q||(P.onclick=()=>!1));P.onclick=()=>{q?.();let{fields:X,refs:z,include:R}=Z,f=[];if(X.length!==0||z.length!==0){let Y=new Set(z);for(let W of X){let $=this._fieldObjects[W]||[];for(let{id:_}of $)Y.add(_)}for(let W of Object.values(this._fieldObjects))for(let $ of W)Y.has($.id)===R&&f.push($)}else for(let Y of Object.values(this._fieldObjects))f.push(...Y);let G=this.annotationStorage,Q=[];for(let Y of f){let{id:W}=Y;switch(Q.push(W),Y.type){case"text":{let _=Y.defaultValue||"";G.setValue(W,{value:_});break}case"checkbox":case"radiobutton":{let _=Y.defaultValue===Y.exportValues;G.setValue(W,{value:_});break}case"combobox":case"listbox":{let _=Y.defaultValue||"";G.setValue(W,{value:_});break}default:continue}let $=document.querySelector(`[data-element-id="${W}"]`);$&&(D5.has($)?$.dispatchEvent(new Event("resetform")):y1(`_bindResetFormAction - element not allowed: ${W}`))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:Q,name:"ResetForm"}}),!1}}};kK=class kK extends U8{constructor(P){super(P,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");let P=document.createElement("img");return P.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",P.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),P.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(P),this.container}};P5=class P5 extends U8{render(){return this.container}showElementAndHideCanvas(P){this.data.hasOwnCanvas&&(P.previousSibling?.nodeName==="CANVAS"&&(P.previousSibling.hidden=!0),P.hidden=!1)}_getKeyModifier(P){return k8.platform.isMac?P.metaKey:P.ctrlKey}_setEventListener(P,Z,q,X,z){q.includes("mouse")?P.addEventListener(q,(R)=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:X,value:z(R),shift:R.shiftKey,modifier:this._getKeyModifier(R)}})}):P.addEventListener(q,(R)=>{if(q==="blur"){if(!Z.focused||!R.relatedTarget)return;Z.focused=!1}else if(q==="focus"){if(Z.focused)return;Z.focused=!0}z&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:X,value:z(R)}})})}_setEventListeners(P,Z,q,X){for(let[z,R]of q)(R==="Action"||this.data.actions?.[R])&&(R!=="Focus"&&R!=="Blur"||(Z||={focused:!1}),this._setEventListener(P,Z,z,R,X),R!=="Focus"||this.data.actions?.Blur?R!=="Blur"||this.data.actions?.Focus||this._setEventListener(P,Z,"focus","Focus",null):this._setEventListener(P,Z,"blur","Blur",null))}_setBackgroundColor(P){let Z=this.data.backgroundColor||null;P.style.backgroundColor=Z===null?"transparent":j1.makeHexColor(Z[0],Z[1],Z[2])}_setTextStyle(P){let Z=["left","center","right"],{fontColor:q}=this.data.defaultAppearanceData,X=this.data.defaultAppearanceData.fontSize||9,z=P.style,R,f=(G)=>Math.round(10*G)/10;if(this.data.multiLine){let G=Math.abs(this.data.rect[3]-this.data.rect[1]-2),Q=G/(Math.round(G/(K9*X))||1);R=Math.min(X,f(Q/K9))}else{let G=Math.abs(this.data.rect[3]-this.data.rect[1]-2);R=Math.min(X,f(G/K9))}z.fontSize=`calc(${R}px * var(--total-scale-factor))`,z.color=j1.makeHexColor(q[0],q[1],q[2]),this.data.textAlignment!==null&&(z.textAlign=Z[this.data.textAlignment])}_setRequired(P,Z){Z?P.setAttribute("required",!0):P.removeAttribute("required"),P.setAttribute("aria-required",Z)}};CK=class CK extends P5{constructor(P){super(P,{isRenderable:P.renderForms||P.data.hasOwnCanvas||!P.data.hasAppearance&&!!P.data.fieldValue})}setPropertyOnSiblings(P,Z,q,X){let z=this.annotationStorage;for(let R of this._getElementsByName(P.name,P.id))R.domElement&&(R.domElement[Z]=q),z.setValue(R.id,{[X]:q})}render(){let P=this.annotationStorage,Z=this.data.id;this.container.classList.add("textWidgetAnnotation");let q=null;if(this.renderForms){let X=P.getValue(Z,{value:this.data.fieldValue}),z=X.value||"",R=P.getValue(Z,{charLimit:this.data.maxLen}).charLimit;R&&z.length>R&&(z=z.slice(0,R));let f=X.formattedValue||this.data.textContent?.join(`
|
|
51
|
+
`)||null;f&&this.data.comb&&(f=f.replaceAll(/\s+/g,""));let G={userValue:z,formattedValue:f,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(q=document.createElement("textarea"),q.textContent=f??z,this.data.doNotScroll&&(q.style.overflowY="hidden")):(q=document.createElement("input"),q.type=this.data.password?"password":"text",q.setAttribute("value",f??z),this.data.doNotScroll&&(q.style.overflowX="hidden")),this.data.hasOwnCanvas&&(q.hidden=!0),D5.add(q),q.setAttribute("data-element-id",Z),q.disabled=this.data.readOnly,q.name=this.data.fieldName,q.tabIndex=0;let{datetimeFormat:Q,datetimeType:Y,timeStep:W}=this.data,$=!!Y&&this.enableScripting;Q&&(q.title=Q),this._setRequired(q,this.data.required),R&&(q.maxLength=R),q.addEventListener("input",(J)=>{P.setValue(Z,{value:J.target.value}),this.setPropertyOnSiblings(q,"value",J.target.value,"value"),G.formattedValue=null}),q.addEventListener("resetform",(J)=>{let U=this.data.defaultFieldValue??"";q.value=G.userValue=U,G.formattedValue=null});let _=(J)=>{let{formattedValue:U}=G;U!=null&&(J.target.value=U),J.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){q.addEventListener("focus",(U)=>{if(G.focused)return;let{target:K}=U;if($&&(K.type=Y,W&&(K.step=W)),G.userValue){let I=G.userValue;if($)if(Y==="time"){let B=new Date(I),j=[B.getHours(),B.getMinutes(),B.getSeconds()];K.value=j.map((V)=>V.toString().padStart(2,"0")).join(":")}else K.value=new Date(I-mx).toISOString().split(Y==="date"?"T":".",1)[0];else K.value=I}G.lastCommittedValue=K.value,G.commitKey=1,this.data.actions?.Focus||(G.focused=!0)}),q.addEventListener("updatefromsandbox",(U)=>{this.showElementAndHideCanvas(U.target);let K={value(I){G.userValue=I.detail.value??"",$||P.setValue(Z,{value:G.userValue.toString()}),I.target.value=G.userValue},formattedValue(I){let{formattedValue:B}=I.detail;G.formattedValue=B,B!=null&&I.target!==document.activeElement&&(I.target.value=B);let j={formattedValue:B};$&&(j.value=B),P.setValue(Z,j)},selRange(I){I.target.setSelectionRange(...I.detail.selRange)},charLimit:(I)=>{let{charLimit:B}=I.detail,{target:j}=I;if(B===0)return void j.removeAttribute("maxLength");j.setAttribute("maxLength",B);let V=G.userValue;!V||V.length<=B||(V=V.slice(0,B),j.value=G.userValue=V,P.setValue(Z,{value:V}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Z,name:"Keystroke",value:V,willCommit:!0,commitKey:1,selStart:j.selectionStart,selEnd:j.selectionEnd}}))}};this._dispatchEventFromSandbox(K,U)}),q.addEventListener("keydown",(U)=>{G.commitKey=1;let K=-1;if(U.key==="Escape"?K=0:U.key!=="Enter"||this.data.multiLine?U.key==="Tab"&&(G.commitKey=3):K=2,K===-1)return;let{value:I}=U.target;G.lastCommittedValue!==I&&(G.lastCommittedValue=I,G.userValue=I,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Z,name:"Keystroke",value:I,willCommit:!0,commitKey:K,selStart:U.target.selectionStart,selEnd:U.target.selectionEnd}}))});let J=_;_=null,q.addEventListener("blur",(U)=>{if(!G.focused||!U.relatedTarget)return;this.data.actions?.Blur||(G.focused=!1);let{target:K}=U,{value:I}=K;if($){if(I&&Y==="time"){let B=I.split(":").map((j)=>parseInt(j,10));I=new Date(2000,0,1,B[0],B[1],B[2]||0).valueOf(),K.step=""}else I.includes("T")||(I=`${I}T00:00`),I=new Date(I).valueOf();K.type="text"}G.userValue=I,G.lastCommittedValue!==I&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Z,name:"Keystroke",value:I,willCommit:!0,commitKey:G.commitKey,selStart:U.target.selectionStart,selEnd:U.target.selectionEnd}}),J(U)}),this.data.actions?.Keystroke&&q.addEventListener("beforeinput",(U)=>{G.lastCommittedValue=null;let{data:K,target:I}=U,{value:B,selectionStart:j,selectionEnd:V}=I,H=j,M=V;switch(U.inputType){case"deleteWordBackward":{let x=B.substring(0,j).match(/\w*[^\w]*$/);x&&(H-=x[0].length);break}case"deleteWordForward":{let x=B.substring(j).match(/^[^\w]*\w*/);x&&(M+=x[0].length);break}case"deleteContentBackward":j===V&&(H-=1);break;case"deleteContentForward":j===V&&(M+=1)}U.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Z,name:"Keystroke",value:B,change:K||"",willCommit:!1,selStart:H,selEnd:M}})}),this._setEventListeners(q,G,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(U)=>U.target.value)}if(_&&q.addEventListener("blur",_),this.data.comb){let J=(this.data.rect[2]-this.data.rect[0])/R;q.classList.add("comb"),q.style.letterSpacing=`calc(${J}px * var(--total-scale-factor) - 1ch)`}}else q=document.createElement("div"),q.textContent=this.data.fieldValue,q.style.verticalAlign="middle",q.style.display="table-cell",this.data.hasOwnCanvas&&(q.hidden=!0);return this._setTextStyle(q),this._setBackgroundColor(q),this._setDefaultPropertiesFromJS(q),this.container.append(q),this.container}};TK=class TK extends P5{constructor(P){super(P,{isRenderable:!!P.data.hasOwnCanvas})}};NK=class NK extends P5{constructor(P){super(P,{isRenderable:P.renderForms})}render(){let P=this.annotationStorage,Z=this.data,q=Z.id,X=P.getValue(q,{value:Z.exportValue===Z.fieldValue}).value;typeof X=="string"&&(X=X!=="Off",P.setValue(q,{value:X})),this.container.classList.add("buttonWidgetAnnotation","checkBox");let z=document.createElement("input");return D5.add(z),z.setAttribute("data-element-id",q),z.disabled=Z.readOnly,this._setRequired(z,this.data.required),z.type="checkbox",z.name=Z.fieldName,X&&z.setAttribute("checked",!0),z.setAttribute("exportValue",Z.exportValue),z.tabIndex=0,z.addEventListener("change",(R)=>{let{name:f,checked:G}=R.target;for(let Q of this._getElementsByName(f,q)){let Y=G&&Q.exportValue===Z.exportValue;Q.domElement&&(Q.domElement.checked=Y),P.setValue(Q.id,{value:Y})}P.setValue(q,{value:G})}),z.addEventListener("resetform",(R)=>{let f=Z.defaultFieldValue||"Off";R.target.checked=f===Z.exportValue}),this.enableScripting&&this.hasJSActions&&(z.addEventListener("updatefromsandbox",(R)=>{let f={value(G){G.target.checked=G.detail.value!=="Off",P.setValue(q,{value:G.target.checked})}};this._dispatchEventFromSandbox(f,R)}),this._setEventListeners(z,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(R)=>R.target.checked)),this._setBackgroundColor(z),this._setDefaultPropertiesFromJS(z),this.container.append(z),this.container}};LX=class LX extends P5{constructor(P){super(P,{isRenderable:P.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");let P=this.annotationStorage,Z=this.data,q=Z.id,X=P.getValue(q,{value:Z.fieldValue===Z.buttonValue}).value;if(typeof X=="string"&&(X=X!==Z.buttonValue,P.setValue(q,{value:X})),X)for(let R of this._getElementsByName(Z.fieldName,q))P.setValue(R.id,{value:!1});let z=document.createElement("input");if(D5.add(z),z.setAttribute("data-element-id",q),z.disabled=Z.readOnly,this._setRequired(z,this.data.required),z.type="radio",z.name=Z.fieldName,X&&z.setAttribute("checked",!0),z.tabIndex=0,z.addEventListener("change",(R)=>{let{name:f,checked:G}=R.target;for(let Q of this._getElementsByName(f,q))P.setValue(Q.id,{value:!1});P.setValue(q,{value:G})}),z.addEventListener("resetform",(R)=>{let f=Z.defaultFieldValue;R.target.checked=f!=null&&f===Z.buttonValue}),this.enableScripting&&this.hasJSActions){let R=Z.buttonValue;z.addEventListener("updatefromsandbox",(f)=>{let G={value:(Q)=>{let Y=R===Q.detail.value;for(let W of this._getElementsByName(Q.target.name)){let $=Y&&W.id===q;W.domElement&&(W.domElement.checked=$),P.setValue(W.id,{value:$})}}};this._dispatchEventFromSandbox(G,f)}),this._setEventListeners(z,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(f)=>f.target.checked)}return this._setBackgroundColor(z),this._setDefaultPropertiesFromJS(z),this.container.append(z),this.container}};vK=class vK extends yP{constructor(P){super(P,{ignoreBorder:P.data.hasAppearance})}render(){let P=super.render();P.classList.add("buttonWidgetAnnotation","pushButton");let Z=P.lastChild;return this.enableScripting&&this.hasJSActions&&Z&&(this._setDefaultPropertiesFromJS(Z),Z.addEventListener("updatefromsandbox",(q)=>{this._dispatchEventFromSandbox({},q)})),P}};FK=class FK extends P5{constructor(P){super(P,{isRenderable:P.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");let P=this.annotationStorage,Z=this.data.id,q=P.getValue(Z,{value:this.data.fieldValue}),X=document.createElement("select");D5.add(X),X.setAttribute("data-element-id",Z),X.disabled=this.data.readOnly,this._setRequired(X,this.data.required),X.name=this.data.fieldName,X.tabIndex=0;let z=this.data.combo&&this.data.options.length>0;this.data.combo||(X.size=this.data.options.length,this.data.multiSelect&&(X.multiple=!0)),X.addEventListener("resetform",(Y)=>{let W=this.data.defaultFieldValue;for(let $ of X.options)$.selected=$.value===W});for(let Y of this.data.options){let W=document.createElement("option");W.textContent=Y.displayValue,W.value=Y.exportValue,q.value.includes(Y.exportValue)&&(W.setAttribute("selected",!0),z=!1),X.append(W)}let R=null;if(z){let Y=document.createElement("option");Y.value=" ",Y.setAttribute("hidden",!0),Y.setAttribute("selected",!0),X.prepend(Y),R=()=>{Y.remove(),X.removeEventListener("input",R),R=null},X.addEventListener("input",R)}let f=(Y)=>{let W=Y?"value":"textContent",{options:$,multiple:_}=X;return _?Array.prototype.filter.call($,(J)=>J.selected).map((J)=>J[W]):$.selectedIndex===-1?null:$[$.selectedIndex][W]},G=f(!1),Q=(Y)=>{let W=Y.target.options;return Array.prototype.map.call(W,($)=>({displayValue:$.textContent,exportValue:$.value}))};return this.enableScripting&&this.hasJSActions?(X.addEventListener("updatefromsandbox",(Y)=>{let W={value($){R?.();let _=$.detail.value,J=new Set(Array.isArray(_)?_:[_]);for(let U of X.options)U.selected=J.has(U.value);P.setValue(Z,{value:f(!0)}),G=f(!1)},multipleSelection($){X.multiple=!0},remove($){let _=X.options,J=$.detail.remove;if(_[J].selected=!1,X.remove(J),_.length>0)Array.prototype.findIndex.call(_,(U)=>U.selected)===-1&&(_[0].selected=!0);P.setValue(Z,{value:f(!0),items:Q($)}),G=f(!1)},clear($){for(;X.length!==0;)X.remove(0);P.setValue(Z,{value:null,items:[]}),G=f(!1)},insert($){let{index:_,displayValue:J,exportValue:U}=$.detail.insert,K=X.children[_],I=document.createElement("option");I.textContent=J,I.value=U,K?K.before(I):X.append(I),P.setValue(Z,{value:f(!0),items:Q($)}),G=f(!1)},items($){let{items:_}=$.detail;for(;X.length!==0;)X.remove(0);for(let J of _){let{displayValue:U,exportValue:K}=J,I=document.createElement("option");I.textContent=U,I.value=K,X.append(I)}X.options.length>0&&(X.options[0].selected=!0),P.setValue(Z,{value:f(!0),items:Q($)}),G=f(!1)},indices($){let _=new Set($.detail.indices);for(let J of $.target.options)J.selected=_.has(J.index);P.setValue(Z,{value:f(!0)}),G=f(!1)},editable($){$.target.disabled=!$.detail.editable}};this._dispatchEventFromSandbox(W,Y)}),X.addEventListener("input",(Y)=>{let W=f(!0),$=f(!1);P.setValue(Z,{value:W}),Y.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Z,name:"Keystroke",value:G,change:$,changeEx:W,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(X,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],(Y)=>Y.target.value)):X.addEventListener("input",function(Y){P.setValue(Z,{value:f(!0)})}),this.data.combo&&this._setTextStyle(X),this._setBackgroundColor(X),this._setDefaultPropertiesFromJS(X),this.container.append(X),this.container}};n3=class n3 extends U8{constructor(P){let{data:Z,elements:q,parent:X}=P,z=!!X._commentManager;if(super(P,{isRenderable:!z&&U8._hasPopupData(Z)}),this.elements=q,z&&U8._hasPopupData(Z)){let R=this.popup=this.#P();for(let f of q)f.popup=R}else this.popup=null}#P(){return new SK({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate||this.data.creationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open,commentManager:this.parent._commentManager})}render(){let{container:P}=this;P.classList.add("popupAnnotation"),P.role="comment";let Z=this.popup=this.#P(),q=[];for(let X of this.elements)X.popup=Z,X.container.ariaHasPopup="dialog",q.push(X.data.id),X.addHighlightArea();return this.container.setAttribute("aria-controls",q.map((X)=>`${QX}${X}`).join(",")),this.container}};bX=class bX extends U8{constructor(P){super(P,{isRenderable:!0,ignoreBorder:!0}),this.textContent=P.data.textContent,this.textPosition=P.data.textPosition,this.annotationEditorType=m1.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){let P=document.createElement("div");P.classList.add("annotationTextContent"),P.setAttribute("role","comment");for(let Z of this.textContent){let q=document.createElement("span");q.textContent=Z,P.append(q)}this.container.append(P)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}};mK=class mK extends U8{#P=null;constructor(P){super(P,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation");let{data:P,width:Z,height:q}=this,X=this.svgFactory.create(Z,q,!0),z=this.#P=this.svgFactory.createElement("svg:line");return z.setAttribute("x1",P.rect[2]-P.lineCoordinates[0]),z.setAttribute("y1",P.rect[3]-P.lineCoordinates[1]),z.setAttribute("x2",P.rect[2]-P.lineCoordinates[2]),z.setAttribute("y2",P.rect[3]-P.lineCoordinates[3]),z.setAttribute("stroke-width",P.borderStyle.width||1),z.setAttribute("stroke","transparent"),z.setAttribute("fill","transparent"),X.append(z),this.container.append(X),!P.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#P}addHighlightArea(){this.container.classList.add("highlightArea")}};pK=class pK extends U8{#P=null;constructor(P){super(P,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");let{data:P,width:Z,height:q}=this,X=this.svgFactory.create(Z,q,!0),z=P.borderStyle.width,R=this.#P=this.svgFactory.createElement("svg:rect");return R.setAttribute("x",z/2),R.setAttribute("y",z/2),R.setAttribute("width",Z-z),R.setAttribute("height",q-z),R.setAttribute("stroke-width",z||1),R.setAttribute("stroke","transparent"),R.setAttribute("fill","transparent"),X.append(R),this.container.append(X),!P.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#P}addHighlightArea(){this.container.classList.add("highlightArea")}};OK=class OK extends U8{#P=null;constructor(P){super(P,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation");let{data:P,width:Z,height:q}=this,X=this.svgFactory.create(Z,q,!0),z=P.borderStyle.width,R=this.#P=this.svgFactory.createElement("svg:ellipse");return R.setAttribute("cx",Z/2),R.setAttribute("cy",q/2),R.setAttribute("rx",Z/2-z/2),R.setAttribute("ry",q/2-z/2),R.setAttribute("stroke-width",z||1),R.setAttribute("stroke","transparent"),R.setAttribute("fill","transparent"),X.append(R),this.container.append(X),!P.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#P}addHighlightArea(){this.container.classList.add("highlightArea")}};kX=class kX extends U8{#P=null;constructor(P){super(P,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);let{data:{rect:P,vertices:Z,borderStyle:q,popupRef:X},width:z,height:R}=this;if(!Z)return this.container;let f=this.svgFactory.create(z,R,!0),G=[];for(let Y=0,W=Z.length;Y<W;Y+=2){let $=Z[Y]-P[0],_=P[3]-Z[Y+1];G.push(`${$},${_}`)}G=G.join(" ");let Q=this.#P=this.svgFactory.createElement(this.svgElementName);return Q.setAttribute("points",G),Q.setAttribute("stroke-width",q.width||1),Q.setAttribute("stroke","transparent"),Q.setAttribute("fill","transparent"),f.append(Q),this.container.append(f),!X&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#P}addHighlightArea(){this.container.classList.add("highlightArea")}};yK=class yK extends kX{constructor(P){super(P),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}};DK=class DK extends U8{constructor(P){super(P,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}};DP=class DP extends U8{#P=null;#Z=[];constructor(P){super(P,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=this.data.it==="InkHighlight"?m1.HIGHLIGHT:m1.INK}#X(P,Z){switch(P){case 90:return{transform:`rotate(90) translate(${-Z[0]},${Z[1]}) scale(1,-1)`,width:Z[3]-Z[1],height:Z[2]-Z[0]};case 180:return{transform:`rotate(180) translate(${-Z[2]},${Z[1]}) scale(1,-1)`,width:Z[2]-Z[0],height:Z[3]-Z[1]};case 270:return{transform:`rotate(270) translate(${-Z[2]},${Z[3]}) scale(1,-1)`,width:Z[3]-Z[1],height:Z[2]-Z[0]};default:return{transform:`translate(${-Z[0]},${Z[3]}) scale(1,-1)`,width:Z[2]-Z[0],height:Z[3]-Z[1]}}}render(){this.container.classList.add(this.containerClassName);let{data:{rect:P,rotation:Z,inkLists:q,borderStyle:X,popupRef:z}}=this,{transform:R,width:f,height:G}=this.#X(Z,P),Q=this.svgFactory.create(f,G,!0),Y=this.#P=this.svgFactory.createElement("svg:g");Q.append(Y),Y.setAttribute("stroke-width",X.width||1),Y.setAttribute("stroke-linecap","round"),Y.setAttribute("stroke-linejoin","round"),Y.setAttribute("stroke-miterlimit",10),Y.setAttribute("stroke","transparent"),Y.setAttribute("fill","transparent"),Y.setAttribute("transform",R);for(let W=0,$=q.length;W<$;W++){let _=this.svgFactory.createElement(this.svgElementName);this.#Z.push(_),_.setAttribute("points",q[W].join(",")),Y.append(_)}return!z&&this.hasPopupData&&this._createPopup(),this.container.append(Q),this._editOnDoubleClick(),this.container}updateEdited(P){super.updateEdited(P);let{thickness:Z,points:q,rect:X}=P,z=this.#P;if(Z>=0&&z.setAttribute("stroke-width",Z||1),q)for(let R=0,f=this.#Z.length;R<f;R++)this.#Z[R].setAttribute("points",q[R].join(","));if(X){let{transform:R,width:f,height:G}=this.#X(this.data.rotation,X);z.parentElement.setAttribute("viewBox",`0 0 ${f} ${G}`),z.setAttribute("transform",R)}}getElementsToTriggerPopup(){return this.#Z}addHighlightArea(){this.container.classList.add("highlightArea")}};CX=class CX extends U8{constructor(P){super(P,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=m1.HIGHLIGHT}render(){let{data:{overlaidText:P,popupRef:Z}}=this;if(!Z&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),P){let q=document.createElement("mark");q.classList.add("overlaidText"),q.textContent=P,this.container.append(q)}return this.container}};wK=class wK extends U8{constructor(P){super(P,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){let{data:{overlaidText:P,popupRef:Z}}=this;if(!Z&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),P){let q=document.createElement("u");q.classList.add("overlaidText"),q.textContent=P,this.container.append(q)}return this.container}};EK=class EK extends U8{constructor(P){super(P,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){let{data:{overlaidText:P,popupRef:Z}}=this;if(!Z&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),P){let q=document.createElement("u");q.classList.add("overlaidText"),q.textContent=P,this.container.append(q)}return this.container}};uK=class uK extends U8{constructor(P){super(P,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){let{data:{overlaidText:P,popupRef:Z}}=this;if(!Z&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),P){let q=document.createElement("s");q.classList.add("overlaidText"),q.textContent=P,this.container.append(q)}return this.container}};TX=class TX extends U8{constructor(P){super(P,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=m1.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}};gK=class gK extends U8{#P=null;constructor(P){super(P,{isRenderable:!0});let{file:Z}=this.data;this.filename=Z.filename,this.content=Z.content,this.linkService.eventBus?.dispatch("fileattachmentannotation",{source:this,...Z})}render(){this.container.classList.add("fileAttachmentAnnotation");let{container:P,data:Z}=this,q;Z.hasAppearance||Z.fillAlpha===0?q=document.createElement("div"):(q=document.createElement("img"),q.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(Z.name)?"paperclip":"pushpin"}.svg`,Z.fillAlpha&&Z.fillAlpha<1&&(q.style=`filter: opacity(${Math.round(100*Z.fillAlpha)}%);`)),q.addEventListener("dblclick",this.#Z.bind(this)),this.#P=q;let{isMac:X}=k8.platform;return P.addEventListener("keydown",(z)=>{z.key==="Enter"&&(X?z.metaKey:z.ctrlKey)&&this.#Z()}),!Z.popupRef&&this.hasPopupData?this._createPopup():q.classList.add("popupTriggerArea"),P.append(q),P}getElementsToTriggerPopup(){return this.#P}addHighlightArea(){this.container.classList.add("highlightArea")}#Z(){this.downloadManager?.openOrDownloadData(this.content,this.filename)}};E2=/\r\n?|\n/g;T8=class T8 extends b1{#P="";#Z=`${this.id}-editor`;#X=null;#q;_colorPicker=null;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){let P=T8.prototype,Z=(z)=>z.isEmpty(),q=T4.TRANSLATE_SMALL,X=T4.TRANSLATE_BIG;return D1(this,"_keyboardManager",new y6([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],P.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],P.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],P._translateEmpty,{args:[-q,0],checker:Z}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],P._translateEmpty,{args:[-X,0],checker:Z}],[["ArrowRight","mac+ArrowRight"],P._translateEmpty,{args:[q,0],checker:Z}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],P._translateEmpty,{args:[X,0],checker:Z}],[["ArrowUp","mac+ArrowUp"],P._translateEmpty,{args:[0,-q],checker:Z}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],P._translateEmpty,{args:[0,-X],checker:Z}],[["ArrowDown","mac+ArrowDown"],P._translateEmpty,{args:[0,q],checker:Z}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],P._translateEmpty,{args:[0,X],checker:Z}]]))}static _type="freetext";static _editorType=m1.FREETEXT;constructor(P){super({...P,name:"freeTextEditor"}),this.color=P.color||T8._defaultColor||b1._defaultLineColor,this.#q=P.fontSize||T8._defaultFontSize,this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-freetext-added-alert")}static initialize(P,Z){b1.initialize(P,Z);let q=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(q.getPropertyValue("--freetext-padding"))}static updateDefaultParams(P,Z){switch(P){case h1.FREETEXT_SIZE:T8._defaultFontSize=Z;break;case h1.FREETEXT_COLOR:T8._defaultColor=Z}}updateParams(P,Z){switch(P){case h1.FREETEXT_SIZE:this.#z(Z);break;case h1.FREETEXT_COLOR:this.#R(Z)}}static get defaultPropertiesToUpdate(){return[[h1.FREETEXT_SIZE,T8._defaultFontSize],[h1.FREETEXT_COLOR,T8._defaultColor||b1._defaultLineColor]]}get propertiesToUpdate(){return[[h1.FREETEXT_SIZE,this.#q],[h1.FREETEXT_COLOR,this.color]]}get toolbarButtons(){return this._colorPicker||=new o7(this),[["colorPicker",this._colorPicker]]}get colorType(){return h1.FREETEXT_COLOR}#z(P){let Z=(X)=>{this.editorDiv.style.fontSize=`calc(${X}px * var(--total-scale-factor))`,this.translate(0,-(X-this.#q)*this.parentScale),this.#q=X,this.#f()},q=this.#q;this.addCommands({cmd:Z.bind(this,P),undo:Z.bind(this,q),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:h1.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}onUpdatedColor(){this.editorDiv.style.color=this.color,this._colorPicker?.update(this.color),super.onUpdatedColor()}#R(P){let Z=(X)=>{this.color=X,this.onUpdatedColor()},q=this.color;this.addCommands({cmd:Z.bind(this,P),undo:Z.bind(this,q),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:h1.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(P,Z){this._uiManager.translateSelectedEditors(P,Z,!0)}getInitialTranslation(){let P=this.parentScale;return[-T8._internalPadding*P,-(T8._internalPadding+this.#q)*P]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(!super.enableEditMode())return!1;this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.#X=new AbortController;let P=this._uiManager.combinedSignal(this.#X);return this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:P}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:P}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:P}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:P}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:P}),!0}disableEditMode(){return!!super.disableEditMode()&&(this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#Z),this._isDraggable=!0,this.#X?.abort(),this.#X=null,this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"),!0)}focusin(P){this._focusEventsAllowed&&(super.focusin(P),P.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(P){this.width||(this.enableEditMode(),P&&this.editorDiv.focus(),this._initialOptions?.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}#G(){let P=[];this.editorDiv.normalize();let Z=null;for(let q of this.editorDiv.childNodes)Z?.nodeType===Node.TEXT_NODE&&q.nodeName==="BR"||(P.push(T8.#Q(q)),Z=q);return P.join(`
|
|
52
|
+
`)}#f(){let[P,Z]=this.parentDimensions,q;if(this.isAttachedToDOM)q=this.div.getBoundingClientRect();else{let{currentLayer:X,div:z}=this,R=z.style.display,f=z.classList.contains("hidden");z.classList.remove("hidden"),z.style.display="hidden",X.div.append(this.div),q=z.getBoundingClientRect(),z.remove(),z.style.display=R,z.classList.toggle("hidden",f)}this.rotation%180==this.parentRotation%180?(this.width=q.width/P,this.height=q.height/Z):(this.width=q.height/P,this.height=q.width/Z),this.fixAndSetPosition()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();let P=this.#P,Z=this.#P=this.#G().trimEnd();if(P===Z)return;let q=(X)=>{this.#P=X,X?(this.#Y(),this._uiManager.rebuild(this),this.#f()):this.remove()};this.addCommands({cmd:()=>{q(Z)},undo:()=>{q(P)},mustExec:!1}),this.#f()}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}keydown(P){P.target===this.div&&P.key==="Enter"&&(this.enterInEditMode(),P.preventDefault())}editorDivKeydown(P){T8._keyboardManager.exec(this,P)}editorDivFocus(P){this.isEditing=!0}editorDivBlur(P){this.isEditing=!1}editorDivInput(P){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}get canChangeContent(){return!0}render(){if(this.div)return this.div;let P,Z;(this._isCopy||this.annotationElementId)&&(P=this.x,Z=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#Z),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;let{style:q}=this.editorDiv;if(q.fontSize=`calc(${this.#q}px * var(--total-scale-factor))`,q.color=this.color,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),this._isCopy||this.annotationElementId){let[X,z]=this.parentDimensions;if(this.annotationElementId){let{position:R}=this._initialData,[f,G]=this.getInitialTranslation();[f,G]=this.pageTranslationToScreen(f,G);let[Q,Y]=this.pageDimensions,[W,$]=this.pageTranslation,_,J;switch(this.rotation){case 0:_=P+(R[0]-W)/Q,J=Z+this.height-(R[1]-$)/Y;break;case 90:_=P+(R[0]-W)/Q,J=Z-(R[1]-$)/Y,[f,G]=[G,-f];break;case 180:_=P-this.width+(R[0]-W)/Q,J=Z-(R[1]-$)/Y,[f,G]=[-f,-G];break;case 270:_=P+(R[0]-W-this.height*Y)/Q,J=Z+(R[1]-$-this.width*Q)/Y,[f,G]=[-G,f]}this.setAt(_*X,J*z,f,G)}else this._moveAfterPaste(P,Z);this.#Y(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}static#Q(P){return(P.nodeType===Node.TEXT_NODE?P.nodeValue:P.innerText).replaceAll(E2,"")}editorDivPaste(P){let Z=P.clipboardData||window.clipboardData,{types:q}=Z;if(q.length===1&&q[0]==="text/plain")return;P.preventDefault();let X=T8.#$(Z.getData("text")||"").replaceAll(E2,`
|
|
53
|
+
`);if(!X)return;let z=window.getSelection();if(!z.rangeCount)return;this.editorDiv.normalize(),z.deleteFromDocument();let R=z.getRangeAt(0);if(!X.includes(`
|
|
54
|
+
`))return R.insertNode(document.createTextNode(X)),this.editorDiv.normalize(),void z.collapseToStart();let{startContainer:f,startOffset:G}=R,Q=[],Y=[];if(f.nodeType===Node.TEXT_NODE){let _=f.parentElement;if(Y.push(f.nodeValue.slice(G).replaceAll(E2,"")),_!==this.editorDiv){let J=Q;for(let U of this.editorDiv.childNodes)U!==_?J.push(T8.#Q(U)):J=Y}Q.push(f.nodeValue.slice(0,G).replaceAll(E2,""))}else if(f===this.editorDiv){let _=Q,J=0;for(let U of this.editorDiv.childNodes)J++===G&&(_=Y),_.push(T8.#Q(U))}this.#P=`${Q.join(`
|
|
55
|
+
`)}${X}${Y.join(`
|
|
56
|
+
`)}`,this.#Y();let W=new Range,$=Math.sumPrecise(Q.map((_)=>_.length));for(let{firstChild:_}of this.editorDiv.childNodes)if(_.nodeType===Node.TEXT_NODE){let J=_.nodeValue.length;if($<=J){W.setStart(_,$),W.setEnd(_,$);break}$-=J}z.removeAllRanges(),z.addRange(W)}#Y(){if(this.editorDiv.replaceChildren(),this.#P)for(let P of this.#P.split(`
|
|
57
|
+
`)){let Z=document.createElement("div");Z.append(P?document.createTextNode(P):document.createElement("br")),this.editorDiv.append(Z)}}#_(){return this.#P.replaceAll(" "," ")}static#$(P){return P.replaceAll(" "," ")}get contentDiv(){return this.editorDiv}getPDFRect(){let P=T8._internalPadding*this.parentScale;return this.getRect(P,P)}static async deserialize(P,Z,q){let X=null;if(P instanceof bX){let{data:{defaultAppearanceData:{fontSize:R,fontColor:f},rect:G,rotation:Q,id:Y,popupRef:W,richText:$,contentsObj:_,creationDate:J,modificationDate:U},textContent:K,textPosition:I,parent:{page:{pageNumber:B}}}=P;if(!K||K.length===0)return null;X=P={annotationType:m1.FREETEXT,color:Array.from(f),fontSize:R,value:K.join(`
|
|
58
|
+
`),position:I,pageIndex:B-1,rect:G.slice(0),rotation:Q,annotationElementId:Y,id:Y,deleted:!1,popupRef:W,comment:_?.str||null,richText:$,creationDate:J,modificationDate:U}}let z=await super.deserialize(P,Z,q);return z.#q=P.fontSize,z.color=j1.makeHexColor(...P.color),z.#P=T8.#$(P.value),z._initialData=X,P.comment&&z.setCommentData(P),z}serialize(P=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();let Z=b1._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.color),q=Object.assign(super.serialize(P),{color:Z,fontSize:this.#q,value:this.#_()});return this.addComment(q),P?(q.isCopy=!0,q):this.annotationElementId&&!this.#J(q)?null:(q.id=this.annotationElementId,q)}#J(P){let{value:Z,fontSize:q,color:X,pageIndex:z}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||P.value!==Z||P.fontSize!==q||P.color.some((R,f)=>R!==X[f])||P.pageIndex!==z}renderAnnotationElement(P){let Z=super.renderAnnotationElement(P);if(!Z)return null;let{style:q}=Z;q.fontSize=`calc(${this.#q}px * var(--total-scale-factor))`,q.color=this.color,Z.replaceChildren();for(let X of this.#P.split(`
|
|
59
|
+
`)){let z=document.createElement("div");z.append(X?document.createTextNode(X):document.createElement("br")),Z.append(z)}return P.updateEdited({rect:this.getPDFRect(),popup:this._uiManager.hasCommentManager()||this.hasEditedComment?this.comment:{text:this.#P}}),Z}resetAnnotationElement(P){super.resetAnnotationElement(P),P.resetEdited()}};x5=class x5{#P;#Z=[];#X;#q;#z=[];#R=new Float32Array(18);#G;#f;#Q;#Y;#_;#$;#J=[];static#B=8;static#K=2;static#W=x5.#B+x5.#K;constructor({x:P,y:Z},q,X,z,R,f=0){this.#P=q,this.#$=z*X,this.#q=R,this.#R.set([NaN,NaN,NaN,NaN,P,Z],6),this.#X=f,this.#Y=x5.#B*X,this.#Q=x5.#W*X,this.#_=X,this.#J.push(P,Z)}isEmpty(){return isNaN(this.#R[8])}#U(){let P=this.#R.subarray(4,6),Z=this.#R.subarray(16,18),[q,X,z,R]=this.#P;return[(this.#G+(P[0]-Z[0])/2-q)/z,(this.#f+(P[1]-Z[1])/2-X)/R,(this.#G+(Z[0]-P[0])/2-q)/z,(this.#f+(Z[1]-P[1])/2-X)/R]}add({x:P,y:Z}){this.#G=P,this.#f=Z;let[q,X,z,R]=this.#P,[f,G,Q,Y]=this.#R.subarray(8,12),W=P-Q,$=Z-Y,_=Math.hypot(W,$);if(_<this.#Q)return!1;let J=_-this.#Y,U=J/_,K=U*W,I=U*$,B=f,j=G;f=Q,G=Y,Q+=K,Y+=I,this.#J?.push(P,Z);let V=K/J,H=-I/J*this.#$,M=V*this.#$;if(this.#R.set(this.#R.subarray(2,8),0),this.#R.set([Q+H,Y+M],4),this.#R.set(this.#R.subarray(14,18),12),this.#R.set([Q-H,Y-M],16),isNaN(this.#R[6]))return this.#z.length===0&&(this.#R.set([f+H,G+M],2),this.#z.push(NaN,NaN,NaN,NaN,(f+H-q)/z,(G+M-X)/R),this.#R.set([f-H,G-M],14),this.#Z.push(NaN,NaN,NaN,NaN,(f-H-q)/z,(G-M-X)/R)),this.#R.set([B,j,f,G,Q,Y],6),!this.isEmpty();return this.#R.set([B,j,f,G,Q,Y],6),Math.abs(Math.atan2(j-G,B-f)-Math.atan2(I,K))<Math.PI/2?([f,G,Q,Y]=this.#R.subarray(2,6),this.#z.push(NaN,NaN,NaN,NaN,((f+Q)/2-q)/z,((G+Y)/2-X)/R),[f,G,B,j]=this.#R.subarray(14,18),this.#Z.push(NaN,NaN,NaN,NaN,((B+f)/2-q)/z,((j+G)/2-X)/R),!0):([B,j,f,G,Q,Y]=this.#R.subarray(0,6),this.#z.push(((B+5*f)/6-q)/z,((j+5*G)/6-X)/R,((5*f+Q)/6-q)/z,((5*G+Y)/6-X)/R,((f+Q)/2-q)/z,((G+Y)/2-X)/R),[Q,Y,f,G,B,j]=this.#R.subarray(12,18),this.#Z.push(((B+5*f)/6-q)/z,((j+5*G)/6-X)/R,((5*f+Q)/6-q)/z,((5*G+Y)/6-X)/R,((f+Q)/2-q)/z,((G+Y)/2-X)/R),!0)}toSVGPath(){if(this.isEmpty())return"";let P=this.#z,Z=this.#Z;if(isNaN(this.#R[6])&&!this.isEmpty())return this.#I();let q=[];q.push(`M${P[4]} ${P[5]}`);for(let X=6;X<P.length;X+=6)isNaN(P[X])?q.push(`L${P[X+4]} ${P[X+5]}`):q.push(`C${P[X]} ${P[X+1]} ${P[X+2]} ${P[X+3]} ${P[X+4]} ${P[X+5]}`);this.#j(q);for(let X=Z.length-6;X>=6;X-=6)isNaN(Z[X])?q.push(`L${Z[X+4]} ${Z[X+5]}`):q.push(`C${Z[X]} ${Z[X+1]} ${Z[X+2]} ${Z[X+3]} ${Z[X+4]} ${Z[X+5]}`);return this.#V(q),q.join(" ")}#I(){let[P,Z,q,X]=this.#P,[z,R,f,G]=this.#U();return`M${(this.#R[2]-P)/q} ${(this.#R[3]-Z)/X} L${(this.#R[4]-P)/q} ${(this.#R[5]-Z)/X} L${z} ${R} L${f} ${G} L${(this.#R[16]-P)/q} ${(this.#R[17]-Z)/X} L${(this.#R[14]-P)/q} ${(this.#R[15]-Z)/X} Z`}#V(P){let Z=this.#Z;P.push(`L${Z[4]} ${Z[5]} Z`)}#j(P){let[Z,q,X,z]=this.#P,R=this.#R.subarray(4,6),f=this.#R.subarray(16,18),[G,Q,Y,W]=this.#U();P.push(`L${(R[0]-Z)/X} ${(R[1]-q)/z} L${G} ${Q} L${Y} ${W} L${(f[0]-Z)/X} ${(f[1]-q)/z}`)}newFreeDrawOutline(P,Z,q,X,z,R){return new NX(P,Z,q,X,z,R)}getOutlines(){let P=this.#z,Z=this.#Z,q=this.#R,[X,z,R,f]=this.#P,G=new Float32Array((this.#J?.length??0)+2);for(let W=0,$=G.length-2;W<$;W+=2)G[W]=(this.#J[W]-X)/R,G[W+1]=(this.#J[W+1]-z)/f;if(G[G.length-2]=(this.#G-X)/R,G[G.length-1]=(this.#f-z)/f,isNaN(q[6])&&!this.isEmpty())return this.#b(G);let Q=new Float32Array(this.#z.length+24+this.#Z.length),Y=P.length;for(let W=0;W<Y;W+=2)isNaN(P[W])?Q[W]=Q[W+1]=NaN:(Q[W]=P[W],Q[W+1]=P[W+1]);Y=this.#x(Q,Y);for(let W=Z.length-6;W>=6;W-=6)for(let $=0;$<6;$+=2)isNaN(Z[W+$])?(Q[Y]=Q[Y+1]=NaN,Y+=2):(Q[Y]=Z[W+$],Q[Y+1]=Z[W+$+1],Y+=2);return this.#A(Q,Y),this.newFreeDrawOutline(Q,G,this.#P,this.#_,this.#X,this.#q)}#b(P){let Z=this.#R,[q,X,z,R]=this.#P,[f,G,Q,Y]=this.#U(),W=new Float32Array(36);return W.set([NaN,NaN,NaN,NaN,(Z[2]-q)/z,(Z[3]-X)/R,NaN,NaN,NaN,NaN,(Z[4]-q)/z,(Z[5]-X)/R,NaN,NaN,NaN,NaN,f,G,NaN,NaN,NaN,NaN,Q,Y,NaN,NaN,NaN,NaN,(Z[16]-q)/z,(Z[17]-X)/R,NaN,NaN,NaN,NaN,(Z[14]-q)/z,(Z[15]-X)/R],0),this.newFreeDrawOutline(W,P,this.#P,this.#_,this.#X,this.#q)}#A(P,Z){let q=this.#Z;return P.set([NaN,NaN,NaN,NaN,q[4],q[5]],Z),Z+6}#x(P,Z){let q=this.#R.subarray(4,6),X=this.#R.subarray(16,18),[z,R,f,G]=this.#P,[Q,Y,W,$]=this.#U();return P.set([NaN,NaN,NaN,NaN,(q[0]-z)/f,(q[1]-R)/G,NaN,NaN,NaN,NaN,Q,Y,NaN,NaN,NaN,NaN,W,$,NaN,NaN,NaN,NaN,(X[0]-z)/f,(X[1]-R)/G],Z),Z+24}};NX=class NX extends I1{#P;#Z=new Float32Array(4);#X;#q;#z;#R;#G;constructor(P,Z,q,X,z,R){super(),this.#G=P,this.#z=Z,this.#P=q,this.#R=X,this.#X=z,this.#q=R,this.firstPoint=[NaN,NaN],this.lastPoint=[NaN,NaN],this.#f(R);let[f,G,Q,Y]=this.#Z;for(let W=0,$=P.length;W<$;W+=2)P[W]=(P[W]-f)/Q,P[W+1]=(P[W+1]-G)/Y;for(let W=0,$=Z.length;W<$;W+=2)Z[W]=(Z[W]-f)/Q,Z[W+1]=(Z[W+1]-G)/Y}toSVGPath(){let P=[`M${this.#G[4]} ${this.#G[5]}`];for(let Z=6,q=this.#G.length;Z<q;Z+=6)isNaN(this.#G[Z])?P.push(`L${this.#G[Z+4]} ${this.#G[Z+5]}`):P.push(`C${this.#G[Z]} ${this.#G[Z+1]} ${this.#G[Z+2]} ${this.#G[Z+3]} ${this.#G[Z+4]} ${this.#G[Z+5]}`);return P.push("Z"),P.join(" ")}serialize([P,Z,q,X],z){let R=q-P,f=X-Z,G,Q;switch(z){case 0:G=I1._rescale(this.#G,P,X,R,-f),Q=I1._rescale(this.#z,P,X,R,-f);break;case 90:G=I1._rescaleAndSwap(this.#G,P,Z,R,f),Q=I1._rescaleAndSwap(this.#z,P,Z,R,f);break;case 180:G=I1._rescale(this.#G,q,Z,-R,f),Q=I1._rescale(this.#z,q,Z,-R,f);break;case 270:G=I1._rescaleAndSwap(this.#G,q,X,-R,-f),Q=I1._rescaleAndSwap(this.#z,q,X,-R,-f)}return{outline:Array.from(G),points:[Array.from(Q)]}}#f(P){let Z=this.#G,q=Z[4],X=Z[5],z=[q,X,q,X],R=q,f=X,G=q,Q=X,Y=P?Math.max:Math.min,W=new Float32Array(4);for(let _=6,J=Z.length;_<J;_+=6){let U=Z[_+4],K=Z[_+5];isNaN(Z[_])?(j1.pointBoundingBox(U,K,z),f>K?(R=U,f=K):f===K&&(R=Y(R,U)),Q<K?(G=U,Q=K):Q===K&&(G=Y(G,U))):(W[0]=W[1]=1/0,W[2]=W[3]=-1/0,j1.bezierBoundingBox(q,X,...Z.slice(_,_+6),W),j1.rectBoundingBox(W[0],W[1],W[2],W[3],z),f>W[1]?(R=W[0],f=W[1]):f===W[1]&&(R=Y(R,W[0])),Q<W[3]?(G=W[2],Q=W[3]):Q===W[3]&&(G=Y(G,W[2]))),q=U,X=K}let $=this.#Z;$[0]=z[0]-this.#X,$[1]=z[1]-this.#X,$[2]=z[2]-z[0]+2*this.#X,$[3]=z[3]-z[1]+2*this.#X,this.firstPoint=[R,f],this.lastPoint=[G,Q]}get box(){return this.#Z}newOutliner(P,Z,q,X,z,R=0){return new x5(P,Z,q,X,z,R)}getNewOutline(P,Z){let[q,X,z,R]=this.#Z,[f,G,Q,Y]=this.#P,W=z*Q,$=R*Y,_=q*Q+f,J=X*Y+G,U=this.newOutliner({x:this.#z[0]*W+_,y:this.#z[1]*$+J},this.#P,this.#R,P,this.#q,Z??this.#X);for(let K=2;K<this.#z.length;K+=2)U.add({x:this.#z[K]*W+_,y:this.#z[K+1]*$+J});return U.getOutlines()}};dK=class dK extends I1{#P;#Z;constructor(P,Z,q,X){super(),this.#Z=P,this.#P=Z,this.firstPoint=q,this.lastPoint=X}toSVGPath(){let P=[];for(let Z of this.#Z){let[q,X]=Z;P.push(`M${q} ${X}`);for(let z=2;z<Z.length;z+=2){let R=Z[z],f=Z[z+1];R===q?(P.push(`V${f}`),X=f):f===X&&(P.push(`H${R}`),q=R)}P.push("Z")}return P.join(" ")}serialize([P,Z,q,X],z){let R=[],f=q-P,G=X-Z;for(let Q of this.#Z){let Y=Array(Q.length);for(let W=0;W<Q.length;W+=2)Y[W]=P+Q[W]*f,Y[W+1]=X-Q[W+1]*G;R.push(Y)}return R}get box(){return this.#P}get classNamesForOutlining(){return["highlightOutline"]}};t3=class t3 extends x5{newFreeDrawOutline(P,Z,q,X,z,R){return new cK(P,Z,q,X,z,R)}};cK=class cK extends NX{newOutliner(P,Z,q,X,z,R=0){return new t3(P,Z,q,X,z,R)}};x8=class x8 extends b1{#P=null;#Z=0;#X;#q=null;#z=null;#R=null;#G=null;#f=0;#Q=null;#Y=null;#_=null;#$=!1;#J=null;#B=null;#K=null;#W="";#U;#I="";static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=12;static _type="highlight";static _editorType=m1.HIGHLIGHT;static _freeHighlightId=-1;static _freeHighlight=null;static _freeHighlightClipId="";static get _keyboardManager(){let P=x8.prototype;return D1(this,"_keyboardManager",new y6([[["ArrowLeft","mac+ArrowLeft"],P._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],P._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],P._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],P._moveCaret,{args:[3]}]]))}constructor(P){super({...P,name:"highlightEditor"}),this.color=P.color||x8._defaultColor,this.#U=P.thickness||x8._defaultThickness,this.opacity=P.opacity||x8._defaultOpacity,this.#X=P.boxes||null,this.#I=P.methodOfCreation||"",this.#W=P.text||"",this._isDraggable=!1,this.defaultL10nId="pdfjs-editor-highlight-editor",P.highlightId>-1?(this.#$=!0,this.#j(P),this.#M()):this.#X&&(this.#P=P.anchorNode,this.#Z=P.anchorOffset,this.#G=P.focusNode,this.#f=P.focusOffset,this.#V(),this.#M(),this.rotate(this.rotation)),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-highlight-added-alert")}get telemetryInitialData(){return{action:"added",type:this.#$?"free_highlight":"highlight",color:this._uiManager.getNonHCMColorName(this.color),thickness:this.#U,methodOfCreation:this.#I}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.getNonHCMColorName(this.color)}}static computeTelemetryFinalData(P){return{numberOfColors:P.get("color").size}}#V(){let P=new i3(this.#X,0.001);this.#Y=P.getOutlines(),[this.x,this.y,this.width,this.height]=this.#Y.box;let Z=new i3(this.#X,0.0025,0.001,this._uiManager.direction==="ltr");this.#R=Z.getOutlines();let{firstPoint:q}=this.#Y;this.#J=[(q[0]-this.x)/this.width,(q[1]-this.y)/this.height];let{lastPoint:X}=this.#R;this.#B=[(X[0]-this.x)/this.width,(X[1]-this.y)/this.height]}#j({highlightOutlines:P,highlightId:Z,clipPathId:q}){if(this.#Y=P,this.#R=P.getNewOutline(this.#U/2+1.5,0.0025),Z>=0)this.#_=Z,this.#q=q,this.parent.drawLayer.finalizeDraw(Z,{bbox:P.box,path:{d:P.toSVGPath()}}),this.#K=this.parent.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:!0},bbox:this.#R.box,path:{d:this.#R.toSVGPath()}},!0);else if(this.parent){let Y=this.parent.viewport.rotation;this.parent.drawLayer.updateProperties(this.#_,{bbox:x8.#L(this.#Y.box,(Y-this.rotation+360)%360),path:{d:P.toSVGPath()}}),this.parent.drawLayer.updateProperties(this.#K,{bbox:x8.#L(this.#R.box,Y),path:{d:this.#R.toSVGPath()}})}let[X,z,R,f]=P.box;switch(this.rotation){case 0:this.x=X,this.y=z,this.width=R,this.height=f;break;case 90:{let[Y,W]=this.parentDimensions;this.x=z,this.y=1-X,this.width=R*W/Y,this.height=f*Y/W;break}case 180:this.x=1-X,this.y=1-z,this.width=R,this.height=f;break;case 270:{let[Y,W]=this.parentDimensions;this.x=1-z,this.y=X,this.width=R*W/Y,this.height=f*Y/W;break}}let{firstPoint:G}=P;this.#J=[(G[0]-X)/R,(G[1]-z)/f];let{lastPoint:Q}=this.#R;this.#B=[(Q[0]-X)/R,(Q[1]-z)/f]}static initialize(P,Z){b1.initialize(P,Z),x8._defaultColor||=Z.highlightColors?.values().next().value||"#fff066"}static updateDefaultParams(P,Z){switch(P){case h1.HIGHLIGHT_COLOR:x8._defaultColor=Z;break;case h1.HIGHLIGHT_THICKNESS:x8._defaultThickness=Z}}translateInPage(P,Z){}get toolbarPosition(){return this.#B}get commentButtonPosition(){return this.#J}updateParams(P,Z){switch(P){case h1.HIGHLIGHT_COLOR:this.#b(Z);break;case h1.HIGHLIGHT_THICKNESS:this.#A(Z)}}static get defaultPropertiesToUpdate(){return[[h1.HIGHLIGHT_COLOR,x8._defaultColor],[h1.HIGHLIGHT_THICKNESS,x8._defaultThickness]]}get propertiesToUpdate(){return[[h1.HIGHLIGHT_COLOR,this.color||x8._defaultColor],[h1.HIGHLIGHT_THICKNESS,this.#U||x8._defaultThickness],[h1.HIGHLIGHT_FREE,this.#$]]}onUpdatedColor(){this.parent?.drawLayer.updateProperties(this.#_,{root:{fill:this.color,"fill-opacity":this.opacity}}),this.#z?.updateColor(this.color),super.onUpdatedColor()}#b(P){let Z=(z,R)=>{this.color=z,this.opacity=R,this.onUpdatedColor()},q=this.color,X=this.opacity;this.addCommands({cmd:Z.bind(this,P,x8._defaultOpacity),undo:Z.bind(this,q,X),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:h1.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.getNonHCMColorName(P)},!0)}#A(P){let Z=this.#U,q=(X)=>{this.#U=X,this.#x(X)};this.addCommands({cmd:q.bind(this,P),undo:q.bind(this,Z),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:h1.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:P},!0)}get toolbarButtons(){if(this._uiManager.highlightColors)return[["colorPicker",this.#z=new B0({editor:this})]];return super.toolbarButtons}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(this.#N())}getBaseTranslation(){return[0,0]}getRect(P,Z){return super.getRect(P,Z,this.#N())}onceAdded(P){this.annotationElementId||this.parent.addUndoableEditor(this),P&&this.div.focus()}remove(){this.#C(),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.#M(),this.isAttachedToDOM||this.parent.add(this)))}setParent(P){let Z=!1;this.parent&&!P?this.#C():P&&(this.#M(P),Z=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(P),this.show(this._isVisible),Z&&this.select()}#x(P){this.#$&&(this.#j({highlightOutlines:this.#Y.getNewOutline(P/2)}),this.fixAndSetPosition(),this.setDims(this.width,this.height))}#C(){this.#_!==null&&this.parent&&(this.parent.drawLayer.remove(this.#_),this.#_=null,this.parent.drawLayer.remove(this.#K),this.#K=null)}#M(P=this.parent){this.#_===null&&({id:this.#_,clipPathId:this.#q}=P.drawLayer.draw({bbox:this.#Y.box,root:{viewBox:"0 0 1 1",fill:this.color,"fill-opacity":this.opacity},rootClass:{highlight:!0,free:this.#$},path:{d:this.#Y.toSVGPath()}},!1,!0),this.#K=P.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:this.#$},bbox:this.#R.box,path:{d:this.#R.toSVGPath()}},this.#$),this.#Q&&(this.#Q.style.clipPath=this.#q))}static#L([P,Z,q,X],z){switch(z){case 90:return[1-Z-X,P,X,q];case 180:return[1-P-q,1-Z-X,q,X];case 270:return[Z,1-P-q,X,q]}return[P,Z,q,X]}rotate(P){let{drawLayer:Z}=this.parent,q;this.#$?(P=(P-this.rotation+360)%360,q=x8.#L(this.#Y.box,P)):q=x8.#L([this.x,this.y,this.width,this.height],P),Z.updateProperties(this.#_,{bbox:q,root:{"data-main-rotation":P}}),Z.updateProperties(this.#K,{bbox:x8.#L(this.#R.box,P),root:{"data-main-rotation":P}})}render(){if(this.div)return this.div;let P=super.render();this.#W&&(P.setAttribute("aria-label",this.#W),P.setAttribute("role","mark")),this.#$?P.classList.add("free"):this.div.addEventListener("keydown",this.#v.bind(this),{signal:this._uiManager._signal});let Z=this.#Q=document.createElement("div");return P.append(Z),Z.setAttribute("aria-hidden","true"),Z.className="internal",Z.style.clipPath=this.#q,this.setDims(this.width,this.height),TU(this,this.#Q,["pointerover","pointerleave"]),this.enableEditing(),P}pointerover(){this.isSelected||this.parent?.drawLayer.updateProperties(this.#K,{rootClass:{hovered:!0}})}pointerleave(){this.isSelected||this.parent?.drawLayer.updateProperties(this.#K,{rootClass:{hovered:!1}})}#v(P){x8._keyboardManager.exec(this,P)}_moveCaret(P){switch(this.parent.unselect(this),P){case 0:case 2:this.#T(!0);break;case 1:case 3:this.#T(!1)}}#T(P){if(!this.#P)return;let Z=window.getSelection();P?Z.setPosition(this.#P,this.#Z):Z.setPosition(this.#G,this.#f)}select(){super.select(),this.#K&&this.parent?.drawLayer.updateProperties(this.#K,{rootClass:{hovered:!1,selected:!0}})}unselect(){super.unselect(),this.#K&&(this.parent?.drawLayer.updateProperties(this.#K,{rootClass:{selected:!1}}),this.#$||this.#T(!1))}get _mustFixPosition(){return!this.#$}show(P=this._isVisible){super.show(P),this.parent&&(this.parent.drawLayer.updateProperties(this.#_,{rootClass:{hidden:!P}}),this.parent.drawLayer.updateProperties(this.#K,{rootClass:{hidden:!P}}))}#N(){return this.#$?this.rotation:0}#D(){if(this.#$)return null;let[P,Z]=this.pageDimensions,[q,X]=this.pageTranslation,z=this.#X,R=new Float32Array(8*z.length),f=0;for(let{x:G,y:Q,width:Y,height:W}of z){let $=G*P+q,_=(1-Q)*Z+X;R[f]=R[f+4]=$,R[f+1]=R[f+3]=_,R[f+2]=R[f+6]=$+Y*P,R[f+5]=R[f+7]=_-W*Z,f+=8}return R}#S(P){return this.#Y.serialize(P,this.#N())}static startHighlighting(P,Z,{target:q,x:X,y:z}){let{x:R,y:f,width:G,height:Q}=q.getBoundingClientRect(),Y=new AbortController,W=P.combinedSignal(Y),$=(_)=>{Y.abort(),this.#w(P,_)};window.addEventListener("blur",$,{signal:W}),window.addEventListener("pointerup",$,{signal:W}),window.addEventListener("pointerdown",_8,{capture:!0,passive:!1,signal:W}),window.addEventListener("contextmenu",A0,{signal:W}),q.addEventListener("pointermove",this.#p.bind(this,P),{signal:W}),this._freeHighlight=new t3({x:X,y:z},[R,f,G,Q],P.scale,this._defaultThickness/2,Z,0.001),{id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=P.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:this._defaultColor,"fill-opacity":this._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:this._freeHighlight.toSVGPath()}},!0,!0)}static#p(P,Z){this._freeHighlight.add(Z)&&P.drawLayer.updateProperties(this._freeHighlightId,{path:{d:this._freeHighlight.toSVGPath()}})}static#w(P,Z){this._freeHighlight.isEmpty()?P.drawLayer.remove(this._freeHighlightId):P.createAndAddNewEditor(Z,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""}static async deserialize(P,Z,q){let X=null;if(P instanceof CX){let{data:{quadPoints:J,rect:U,rotation:K,id:I,color:B,opacity:j,popupRef:V,richText:H,contentsObj:M,creationDate:x,modificationDate:A},parent:{page:{pageNumber:k}}}=P;X=P={annotationType:m1.HIGHLIGHT,color:Array.from(B),opacity:j,quadPoints:J,boxes:null,pageIndex:k-1,rect:U.slice(0),rotation:K,annotationElementId:I,id:I,deleted:!1,popupRef:V,richText:H,comment:M?.str||null,creationDate:x,modificationDate:A}}else if(P instanceof DP){let{data:{inkLists:J,rect:U,rotation:K,id:I,color:B,borderStyle:{rawWidth:j},popupRef:V,richText:H,contentsObj:M,creationDate:x,modificationDate:A},parent:{page:{pageNumber:k}}}=P;X=P={annotationType:m1.HIGHLIGHT,color:Array.from(B),thickness:j,inkLists:J,boxes:null,pageIndex:k-1,rect:U.slice(0),rotation:K,annotationElementId:I,id:I,deleted:!1,popupRef:V,richText:H,comment:M?.str||null,creationDate:x,modificationDate:A}}let{color:z,quadPoints:R,inkLists:f,opacity:G}=P,Q=await super.deserialize(P,Z,q);Q.color=j1.makeHexColor(...z),Q.opacity=G||1,f&&(Q.#U=P.thickness),Q._initialData=X,P.comment&&Q.setCommentData(P);let[Y,W]=Q.pageDimensions,[$,_]=Q.pageTranslation;if(R){let J=Q.#X=[];for(let U=0;U<R.length;U+=8)J.push({x:(R[U]-$)/Y,y:1-(R[U+1]-_)/W,width:(R[U+2]-R[U])/Y,height:(R[U+1]-R[U+5])/W});Q.#V(),Q.#M(),Q.rotate(Q.rotation)}else if(f){Q.#$=!0;let J=f[0],U={x:J[0]-$,y:W-(J[1]-_)},K=new t3(U,[0,0,Y,W],1,Q.#U/2,!0,0.001);for(let j=0,V=J.length;j<V;j+=2)U.x=J[j]-$,U.y=W-(J[j+1]-_),K.add(U);let{id:I,clipPathId:B}=Z.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:Q.color,"fill-opacity":Q._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:K.toSVGPath()}},!0,!0);Q.#j({highlightOutlines:K.getOutlines(),highlightId:I,clipPathId:B}),Q.#M(),Q.rotate(Q.parentRotation)}return Q}serialize(P=!1){if(this.isEmpty()||P)return null;if(this.deleted)return this.serializeDeleted();let Z=b1._colorManager.convert(this._uiManager.getNonHCMColor(this.color)),q=super.serialize(P);return Object.assign(q,{color:Z,opacity:this.opacity,thickness:this.#U,quadPoints:this.#D(),outlines:this.#S(q.rect)}),this.addComment(q),this.annotationElementId&&!this.#O(q)?null:(q.id=this.annotationElementId,q)}#O(P){let{color:Z}=this._initialData;return this.hasEditedComment||P.color.some((q,X)=>q!==Z[X])}renderAnnotationElement(P){return this.deleted?(P.hide(),null):(P.updateEdited({rect:this.getPDFRect(),popup:this.comment}),null)}static canCreateNewEmptyEditor(){return!1}};C1=class C1 extends b1{#P=null;#Z;_colorPicker=null;_drawId=null;static _currentDrawId=-1;static _currentParent=null;static#X=null;static#q=null;static#z=null;static#R=NaN;static#G=null;static#f=null;static#Q=NaN;static _INNER_MARGIN=3;constructor(P){super(P),this.#Z=P.mustBeCommitted||!1,this._addOutlines(P)}onUpdatedColor(){this._colorPicker?.update(this.color),super.onUpdatedColor()}_addOutlines(P){P.drawOutlines&&(this.#Y(P),this.#J())}#Y({drawOutlines:P,drawId:Z,drawingOptions:q}){this.#P=P,this._drawingOptions||=q,this.annotationElementId||this._uiManager.a11yAlert(`pdfjs-editor-${this.editorType}-added-alert`),Z>=0?(this._drawId=Z,this.parent.drawLayer.finalizeDraw(Z,P.defaultProperties)):this._drawId=this.#_(P,this.parent),this.#W(P.box)}#_(P,Z){let{id:q}=Z.drawLayer.draw(C1._mergeSVGProperties(this._drawingOptions.toSVGProperties(),P.defaultSVGProperties),!1,!1);return q}static _mergeSVGProperties(P,Z){let q=new Set(Object.keys(P));for(let[X,z]of Object.entries(Z))q.has(X)?Object.assign(P[X],z):P[X]=z;return P}static getDefaultDrawingOptions(P){X8("Not implemented")}static get typesMap(){X8("Not implemented")}static get isDrawer(){return!0}static get supportMultipleDrawings(){return!1}static updateDefaultParams(P,Z){let q=this.typesMap.get(P);q&&this._defaultDrawingOptions.updateProperty(q,Z),this._currentParent&&(C1.#X.updateProperty(q,Z),this._currentParent.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}updateParams(P,Z){let q=this.constructor.typesMap.get(P);q&&this._updateProperty(P,q,Z)}static get defaultPropertiesToUpdate(){let P=[],Z=this._defaultDrawingOptions;for(let[q,X]of this.typesMap)P.push([q,Z[X]]);return P}get propertiesToUpdate(){let P=[],{_drawingOptions:Z}=this;for(let[q,X]of this.constructor.typesMap)P.push([q,Z[X]]);return P}_updateProperty(P,Z,q){let X=this._drawingOptions,z=X[Z],R=(f)=>{X.updateProperty(Z,f);let G=this.#P.updateProperty(Z,f);G&&this.#W(G),this.parent?.drawLayer.updateProperties(this._drawId,X.toSVGProperties()),P===this.colorType&&this.onUpdatedColor()};this.addCommands({cmd:R.bind(this,q),undo:R.bind(this,z),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:P,overwriteIfSameType:!0,keepUndo:!0})}_onResizing(){this.parent?.drawLayer.updateProperties(this._drawId,C1._mergeSVGProperties(this.#P.getPathResizingSVGProperties(this.#K()),{bbox:this.#U()}))}_onResized(){this.parent?.drawLayer.updateProperties(this._drawId,C1._mergeSVGProperties(this.#P.getPathResizedSVGProperties(this.#K()),{bbox:this.#U()}))}_onTranslating(P,Z){this.parent?.drawLayer.updateProperties(this._drawId,{bbox:this.#U()})}_onTranslated(){this.parent?.drawLayer.updateProperties(this._drawId,C1._mergeSVGProperties(this.#P.getPathTranslatedSVGProperties(this.#K(),this.parentDimensions),{bbox:this.#U()}))}_onStartDragging(){this.parent?.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!0}})}_onStopDragging(){this.parent?.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!1}})}commit(){super.commit(),this.disableEditMode(),this.disableEditing()}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}getBaseTranslation(){return[0,0]}get isResizable(){return!0}onceAdded(P){this.annotationElementId||this.parent.addUndoableEditor(this),this._isDraggable=!0,this.#Z&&(this.#Z=!1,this.commit(),this.parent.setSelected(this),P&&this.isOnScreen&&this.div.focus())}remove(){this.#$(),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.#J(),this.#W(this.#P.box),this.isAttachedToDOM||this.parent.add(this)))}setParent(P){let Z=!1;this.parent&&!P?(this._uiManager.removeShouldRescale(this),this.#$()):P&&(this._uiManager.addShouldRescale(this),this.#J(P),Z=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(P),Z&&this.select()}#$(){this._drawId!==null&&this.parent&&(this.parent.drawLayer.remove(this._drawId),this._drawId=null,this._drawingOptions.reset())}#J(P=this.parent){this._drawId!==null&&this.parent===P||(this._drawId===null?(this._drawingOptions.updateAll(),this._drawId=this.#_(this.#P,P)):this.parent.drawLayer.updateParent(this._drawId,P.drawLayer))}#B([P,Z,q,X]){let{parentDimensions:[z,R],rotation:f}=this;switch(f){case 90:return[Z,1-P,q*(R/z),X*(z/R)];case 180:return[1-P,1-Z,q,X];case 270:return[1-Z,P,q*(R/z),X*(z/R)];default:return[P,Z,q,X]}}#K(){let{x:P,y:Z,width:q,height:X,parentDimensions:[z,R],rotation:f}=this;switch(f){case 90:return[1-Z,P,q*(z/R),X*(R/z)];case 180:return[1-P,1-Z,q,X];case 270:return[Z,1-P,q*(z/R),X*(R/z)];default:return[P,Z,q,X]}}#W(P){[this.x,this.y,this.width,this.height]=this.#B(P),this.div&&(this.fixAndSetPosition(),this.setDims()),this._onResized()}#U(){let{x:P,y:Z,width:q,height:X,rotation:z,parentRotation:R,parentDimensions:[f,G]}=this;switch((4*z+R)/90){case 1:return[1-Z-X,P,X,q];case 2:return[1-P-q,1-Z-X,q,X];case 3:return[Z,1-P-q,X,q];case 4:return[P,Z-q*(f/G),X*(G/f),q*(f/G)];case 5:return[1-Z,P,q*(f/G),X*(G/f)];case 6:return[1-P-X*(G/f),1-Z,X*(G/f),q*(f/G)];case 7:return[Z-q*(f/G),1-P-X*(G/f),q*(f/G),X*(G/f)];case 8:return[P-q,Z-X,q,X];case 9:return[1-Z,P-q,X,q];case 10:return[1-P,1-Z,q,X];case 11:return[Z-X,1-P,X,q];case 12:return[P-X*(G/f),Z,X*(G/f),q*(f/G)];case 13:return[1-Z-q*(f/G),P-X*(G/f),q*(f/G),X*(G/f)];case 14:return[1-P,1-Z-q*(f/G),X*(G/f),q*(f/G)];case 15:return[Z,1-P,q*(f/G),X*(G/f)];default:return[P,Z,q,X]}}rotate(){this.parent&&this.parent.drawLayer.updateProperties(this._drawId,C1._mergeSVGProperties({bbox:this.#U()},this.#P.updateRotation((this.parentRotation-this.rotation+360)%360)))}onScaleChanging(){this.parent&&this.#W(this.#P.updateParentDimensions(this.parentDimensions,this.parent.scale))}static onScaleChangingWhenDrawing(){}render(){if(this.div)return this.div;let P,Z;this._isCopy&&(P=this.x,Z=this.y);let q=super.render();q.classList.add("draw");let X=document.createElement("div");return q.append(X),X.setAttribute("aria-hidden","true"),X.className="internal",this.setDims(),this._uiManager.addShouldRescale(this),this.disableEditing(),this._isCopy&&this._moveAfterPaste(P,Z),q}static createDrawerInstance(P,Z,q,X,z){X8("Not implemented")}static startDrawing(P,Z,q,X){let{target:z,offsetX:R,offsetY:f,pointerId:G,pointerType:Q}=X;if(C1.#G&&C1.#G!==Q)return;let{viewport:{rotation:Y}}=P,{width:W,height:$}=z.getBoundingClientRect(),_=C1.#q=new AbortController,J=P.combinedSignal(_);C1.#R||=G,C1.#G??=Q,window.addEventListener("pointerup",(U)=>{C1.#R===U.pointerId?this._endDraw(U):C1.#f?.delete(U.pointerId)},{signal:J}),window.addEventListener("pointercancel",(U)=>{C1.#R===U.pointerId?this._currentParent.endDrawingSession():C1.#f?.delete(U.pointerId)},{signal:J}),window.addEventListener("pointerdown",(U)=>{C1.#G===U.pointerType&&((C1.#f||=new Set).add(U.pointerId),C1.#X.isCancellable()&&(C1.#X.removeLastElement(),C1.#X.isEmpty()?this._currentParent.endDrawingSession(!0):this._endDraw(null)))},{capture:!0,passive:!1,signal:J}),window.addEventListener("contextmenu",A0,{signal:J}),z.addEventListener("pointermove",this._drawMove.bind(this),{signal:J}),z.addEventListener("touchmove",(U)=>{U.timeStamp===C1.#Q&&_8(U)},{signal:J}),P.toggleDrawing(),Z._editorUndoBar?.hide(),C1.#X?P.drawLayer.updateProperties(this._currentDrawId,C1.#X.startNew(R,f,W,$,Y)):(Z.updateUIForDefaultProperties(this),C1.#X=this.createDrawerInstance(R,f,W,$,Y),C1.#z=this.getDefaultDrawingOptions(),this._currentParent=P,{id:this._currentDrawId}=P.drawLayer.draw(this._mergeSVGProperties(C1.#z.toSVGProperties(),C1.#X.defaultSVGProperties),!0,!1))}static _drawMove(P){if(C1.#Q=-1,!C1.#X)return;let{offsetX:Z,offsetY:q,pointerId:X}=P;C1.#R===X&&(C1.#f?.size>=1?this._endDraw(P):(this._currentParent.drawLayer.updateProperties(this._currentDrawId,C1.#X.add(Z,q)),C1.#Q=P.timeStamp,_8(P)))}static _cleanup(P){P&&(this._currentDrawId=-1,this._currentParent=null,C1.#X=null,C1.#z=null,C1.#G=null,C1.#Q=NaN),C1.#q&&(C1.#q.abort(),C1.#q=null,C1.#R=NaN,C1.#f=null)}static _endDraw(P){let Z=this._currentParent;if(Z){if(Z.toggleDrawing(!0),this._cleanup(!1),P?.target===Z.div&&Z.drawLayer.updateProperties(this._currentDrawId,C1.#X.end(P.offsetX,P.offsetY)),this.supportMultipleDrawings){let q=C1.#X,X=this._currentDrawId,z=q.getLastElement();return void Z.addCommands({cmd:()=>{Z.drawLayer.updateProperties(X,q.setLastElement(z))},undo:()=>{Z.drawLayer.updateProperties(X,q.removeLastElement())},mustExec:!1,type:h1.DRAW_STEP})}this.endDrawing(!1)}}static endDrawing(P){let Z=this._currentParent;if(!Z)return null;if(Z.toggleDrawing(!0),Z.cleanUndoStack(h1.DRAW_STEP),!C1.#X.isEmpty()){let{pageDimensions:[q,X],scale:z}=Z,R=Z.createAndAddNewEditor({offsetX:0,offsetY:0},!1,{drawId:this._currentDrawId,drawOutlines:C1.#X.getOutlines(q*z,X*z,z,this._INNER_MARGIN),drawingOptions:C1.#z,mustBeCommitted:!P});return this._cleanup(!0),R}return Z.drawLayer.remove(this._currentDrawId),this._cleanup(!0),null}createDrawingOptions(P){}static deserializeDraw(P,Z,q,X,z,R){X8("Not implemented")}static async deserialize(P,Z,q){let{rawDims:{pageWidth:X,pageHeight:z,pageX:R,pageY:f}}=Z.viewport,G=this.deserializeDraw(R,f,X,z,this._INNER_MARGIN,P),Q=await super.deserialize(P,Z,q);return Q.createDrawingOptions(P),Q.#Y({drawOutlines:G}),Q.#J(),Q.onScaleChanging(),Q.rotate(),Q}serializeDraw(P){let[Z,q]=this.pageTranslation,[X,z]=this.pageDimensions;return this.#P.serialize([Z,q,X,z],P)}renderAnnotationElement(P){return P.updateEdited({rect:this.getPDFRect()}),null}static canCreateNewEmptyEditor(){return!1}};D6=class D6 extends I1{#P;#Z=0;#X;#q;#z;#R;#G;#f;#Q;build(P,Z,q,X,z,R,f){this.#z=Z,this.#R=q,this.#G=X,this.#f=z,this.#Q=R,this.#X=f??0,this.#q=P,this.#$()}get thickness(){return this.#Q}setLastElement(P){return this.#q.push(P),{path:{d:this.toSVGPath()}}}removeLastElement(){return this.#q.pop(),{path:{d:this.toSVGPath()}}}toSVGPath(){let P=[];for(let{line:Z}of this.#q)if(P.push(`M${I1.svgRound(Z[4])} ${I1.svgRound(Z[5])}`),Z.length!==6)if(Z.length===12&&isNaN(Z[6]))P.push(`L${I1.svgRound(Z[10])} ${I1.svgRound(Z[11])}`);else for(let q=6,X=Z.length;q<X;q+=6){let[z,R,f,G,Q,Y]=Z.subarray(q,q+6).map(I1.svgRound);P.push(`C${z} ${R} ${f} ${G} ${Q} ${Y}`)}else P.push("Z");return P.join("")}serialize([P,Z,q,X],z){let R=[],f=[],[G,Q,Y,W]=this.#_(),$,_,J,U,K,I,B,j,V;switch(this.#f){case 0:V=I1._rescale,$=P,_=Z+X,J=q,U=-X,K=P+G*q,I=Z+(1-Q-W)*X,B=P+(G+Y)*q,j=Z+(1-Q)*X;break;case 90:V=I1._rescaleAndSwap,$=P,_=Z,J=q,U=X,K=P+Q*q,I=Z+G*X,B=P+(Q+W)*q,j=Z+(G+Y)*X;break;case 180:V=I1._rescale,$=P+q,_=Z,J=-q,U=X,K=P+(1-G-Y)*q,I=Z+Q*X,B=P+(1-G)*q,j=Z+(Q+W)*X;break;case 270:V=I1._rescaleAndSwap,$=P+q,_=Z+X,J=-q,U=-X,K=P+(1-Q-W)*q,I=Z+(1-G-Y)*X,B=P+(1-Q)*q,j=Z+(1-G)*X}for(let{line:H,points:M}of this.#q)R.push(V(H,$,_,J,U,z?Array(H.length):null)),f.push(V(M,$,_,J,U,z?Array(M.length):null));return{lines:R,points:f,rect:[K,I,B,j]}}static deserialize(P,Z,q,X,z,{paths:{lines:R,points:f},rotation:G,thickness:Q}){let Y=[],W,$,_,J,U;switch(G){case 0:U=I1._rescale,W=-P/q,$=Z/X+1,_=1/q,J=-1/X;break;case 90:U=I1._rescaleAndSwap,W=-Z/X,$=-P/q,_=1/X,J=1/q;break;case 180:U=I1._rescale,W=P/q+1,$=-Z/X,_=-1/q,J=1/X;break;case 270:U=I1._rescaleAndSwap,W=Z/X+1,$=P/q+1,_=-1/X,J=-1/q}if(!R){R=[];for(let I of f){let B=I.length;if(B===2){R.push(new Float32Array([NaN,NaN,NaN,NaN,I[0],I[1]]));continue}if(B===4){R.push(new Float32Array([NaN,NaN,NaN,NaN,I[0],I[1],NaN,NaN,NaN,NaN,I[2],I[3]]));continue}let j=new Float32Array(3*(B-2));R.push(j);let[V,H,M,x]=I.subarray(0,4);j.set([NaN,NaN,NaN,NaN,V,H],0);for(let A=4;A<B;A+=2){let k=I[A],b=I[A+1];j.set(I1.createBezierPoints(V,H,M,x,k,b),3*(A-2)),[V,H,M,x]=[M,x,k,b]}}}for(let I=0,B=R.length;I<B;I++)Y.push({line:U(R[I].map((j)=>j??NaN),W,$,_,J),points:U(f[I].map((j)=>j??NaN),W,$,_,J)});let K=new this.prototype.constructor;return K.build(Y,q,X,1,G,Q,z),K}#Y(P=this.#Q){let Z=this.#X+P/2*this.#G;return this.#f%180==0?[Z/this.#z,Z/this.#R]:[Z/this.#R,Z/this.#z]}#_(){let[P,Z,q,X]=this.#P,[z,R]=this.#Y(0);return[P+z,Z+R,q-2*z,X-2*R]}#$(){let P=this.#P=new Float32Array([1/0,1/0,-1/0,-1/0]);for(let{line:X}of this.#q){if(X.length<=12){for(let f=4,G=X.length;f<G;f+=6)j1.pointBoundingBox(X[f],X[f+1],P);continue}let z=X[4],R=X[5];for(let f=6,G=X.length;f<G;f+=6){let[Q,Y,W,$,_,J]=X.subarray(f,f+6);j1.bezierBoundingBox(z,R,Q,Y,W,$,_,J,P),z=_,R=J}}let[Z,q]=this.#Y();P[0]=l8(P[0]-Z,0,1),P[1]=l8(P[1]-q,0,1),P[2]=l8(P[2]+Z,0,1),P[3]=l8(P[3]+q,0,1),P[2]-=P[0],P[3]-=P[1]}get box(){return this.#P}updateProperty(P,Z){return P==="stroke-width"?this.#J(Z):null}#J(P){let[Z,q]=this.#Y();this.#Q=P;let[X,z]=this.#Y(),[R,f]=[X-Z,z-q],G=this.#P;return G[0]-=R,G[1]-=f,G[2]+=2*R,G[3]+=2*f,G}updateParentDimensions([P,Z],q){let[X,z]=this.#Y();this.#z=P,this.#R=Z,this.#G=q;let[R,f]=this.#Y(),G=R-X,Q=f-z,Y=this.#P;return Y[0]-=G,Y[1]-=Q,Y[2]+=2*G,Y[3]+=2*Q,Y}updateRotation(P){return this.#Z=P,{path:{transform:this.rotationTransform}}}get viewBox(){return this.#P.map(I1.svgRound).join(" ")}get defaultProperties(){let[P,Z]=this.#P;return{root:{viewBox:this.viewBox},path:{"transform-origin":`${I1.svgRound(P)} ${I1.svgRound(Z)}`}}}get rotationTransform(){let[,,P,Z]=this.#P,q=0,X=0,z=0,R=0,f=0,G=0;switch(this.#Z){case 90:X=Z/P,z=-P/Z,f=P;break;case 180:q=-1,R=-1,f=P,G=Z;break;case 270:X=-Z/P,z=P/Z,G=Z;break;default:return""}return`matrix(${q} ${X} ${z} ${R} ${I1.svgRound(f)} ${I1.svgRound(G)})`}getPathResizingSVGProperties([P,Z,q,X]){let[z,R]=this.#Y(),[f,G,Q,Y]=this.#P;if(Math.abs(Q-z)<=I1.PRECISION||Math.abs(Y-R)<=I1.PRECISION){let U=P+q/2-(f+Q/2),K=Z+X/2-(G+Y/2);return{path:{"transform-origin":`${I1.svgRound(P)} ${I1.svgRound(Z)}`,transform:`${this.rotationTransform} translate(${U} ${K})`}}}let W=(q-2*z)/(Q-2*z),$=(X-2*R)/(Y-2*R),_=Q/q,J=Y/X;return{path:{"transform-origin":`${I1.svgRound(f)} ${I1.svgRound(G)}`,transform:`${this.rotationTransform} scale(${_} ${J}) translate(${I1.svgRound(z)} ${I1.svgRound(R)}) scale(${W} ${$}) translate(${I1.svgRound(-z)} ${I1.svgRound(-R)})`}}}getPathResizedSVGProperties([P,Z,q,X]){let[z,R]=this.#Y(),f=this.#P,[G,Q,Y,W]=f;if(f[0]=P,f[1]=Z,f[2]=q,f[3]=X,Math.abs(Y-z)<=I1.PRECISION||Math.abs(W-R)<=I1.PRECISION){let K=P+q/2-(G+Y/2),I=Z+X/2-(Q+W/2);for(let{line:B,points:j}of this.#q)I1._translate(B,K,I,B),I1._translate(j,K,I,j);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${I1.svgRound(P)} ${I1.svgRound(Z)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}let $=(q-2*z)/(Y-2*z),_=(X-2*R)/(W-2*R),J=-$*(G+z)+P+z,U=-_*(Q+R)+Z+R;if($!==1||_!==1||J!==0||U!==0)for(let{line:K,points:I}of this.#q)I1._rescale(K,J,U,$,_,K),I1._rescale(I,J,U,$,_,I);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${I1.svgRound(P)} ${I1.svgRound(Z)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}getPathTranslatedSVGProperties([P,Z],q){let[X,z]=q,R=this.#P,f=P-R[0],G=Z-R[1];if(this.#z===X&&this.#R===z)for(let{line:Q,points:Y}of this.#q)I1._translate(Q,f,G,Q),I1._translate(Y,f,G,Y);else{let Q=this.#z/X,Y=this.#R/z;this.#z=X,this.#R=z;for(let{line:W,points:$}of this.#q)I1._rescale(W,f,G,Q,Y,W),I1._rescale($,f,G,Q,Y,$);R[2]*=Q,R[3]*=Y}return R[0]=P,R[1]=Z,{root:{viewBox:this.viewBox},path:{d:this.toSVGPath(),"transform-origin":`${I1.svgRound(P)} ${I1.svgRound(Z)}`}}}get defaultSVGProperties(){let P=this.#P;return{root:{viewBox:this.viewBox},rootClass:{draw:!0},path:{d:this.toSVGPath(),"transform-origin":`${I1.svgRound(P[0])} ${I1.svgRound(P[1])}`,transform:this.rotationTransform||null},bbox:P}}};EP=class EP extends vX{constructor(P){super(),this._viewParameters=P,super.updateProperties({fill:"none",stroke:b1._defaultLineColor,"stroke-opacity":1,"stroke-width":1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-miterlimit":10})}updateSVGProperty(P,Z){P==="stroke-width"&&(Z??=this["stroke-width"],Z*=this._viewParameters.realScale),super.updateSVGProperty(P,Z)}clone(){let P=new EP(this._viewParameters);return P.updateAll(this),P}};FX=class FX extends C1{static _type="ink";static _editorType=m1.INK;static _defaultDrawingOptions=null;constructor(P){super({...P,name:"inkEditor"}),this._willKeepAspectRatio=!0,this.defaultL10nId="pdfjs-editor-ink-editor"}static initialize(P,Z){b1.initialize(P,Z),this._defaultDrawingOptions=new EP(Z.viewParameters)}static getDefaultDrawingOptions(P){let Z=this._defaultDrawingOptions.clone();return Z.updateProperties(P),Z}static get supportMultipleDrawings(){return!0}static get typesMap(){return D1(this,"typesMap",new Map([[h1.INK_THICKNESS,"stroke-width"],[h1.INK_COLOR,"stroke"],[h1.INK_OPACITY,"stroke-opacity"]]))}static createDrawerInstance(P,Z,q,X,z){return new sK(P,Z,q,X,z,this._defaultDrawingOptions["stroke-width"])}static deserializeDraw(P,Z,q,X,z,R){return D6.deserialize(P,Z,q,X,z,R)}static async deserialize(P,Z,q){let X=null;if(P instanceof DP){let{data:{inkLists:R,rect:f,rotation:G,id:Q,color:Y,opacity:W,borderStyle:{rawWidth:$},popupRef:_,richText:J,contentsObj:U,creationDate:K,modificationDate:I},parent:{page:{pageNumber:B}}}=P;X=P={annotationType:m1.INK,color:Array.from(Y),thickness:$,opacity:W,paths:{points:R},boxes:null,pageIndex:B-1,rect:f.slice(0),rotation:G,annotationElementId:Q,id:Q,deleted:!1,popupRef:_,richText:J,comment:U?.str||null,creationDate:K,modificationDate:I}}let z=await super.deserialize(P,Z,q);return z._initialData=X,P.comment&&z.setCommentData(P),z}get toolbarButtons(){return this._colorPicker||=new o7(this),[["colorPicker",this._colorPicker]]}get colorType(){return h1.INK_COLOR}get color(){return this._drawingOptions.stroke}get opacity(){return this._drawingOptions["stroke-opacity"]}onScaleChanging(){if(!this.parent)return;super.onScaleChanging();let{_drawId:P,_drawingOptions:Z,parent:q}=this;Z.updateSVGProperty("stroke-width"),q.drawLayer.updateProperties(P,Z.toSVGProperties())}static onScaleChangingWhenDrawing(){let P=this._currentParent;P&&(super.onScaleChangingWhenDrawing(),this._defaultDrawingOptions.updateSVGProperty("stroke-width"),P.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}createDrawingOptions({color:P,thickness:Z,opacity:q}){this._drawingOptions=FX.getDefaultDrawingOptions({stroke:j1.makeHexColor(...P),"stroke-width":Z,"stroke-opacity":q})}serialize(P=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();let{lines:Z,points:q}=this.serializeDraw(P),{_drawingOptions:{stroke:X,"stroke-opacity":z,"stroke-width":R}}=this,f=Object.assign(super.serialize(P),{color:b1._colorManager.convert(X),opacity:z,thickness:R,paths:{lines:Z,points:q}});return this.addComment(f),P?(f.isCopy=!0,f):this.annotationElementId&&!this.#P(f)?null:(f.id=this.annotationElementId,f)}#P(P){let{color:Z,thickness:q,opacity:X,pageIndex:z}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||this._hasBeenResized||P.color.some((R,f)=>R!==Z[f])||P.thickness!==q||P.opacity!==X||P.pageIndex!==z}renderAnnotationElement(P){if(this.deleted)return P.hide(),null;let{points:Z,rect:q}=this.serializeDraw(!1);return P.updateEdited({rect:q,thickness:this._drawingOptions["stroke-width"],points:Z,popup:this.comment}),null}};e3=class e3 extends D6{toSVGPath(){let P=super.toSVGPath();return P.endsWith("Z")||(P+="Z"),P}};u4=class u4{static#P={maxDim:512,sigmaSFactor:0.02,sigmaR:25,kernelSize:16};static#Z(P,Z,q,X){return X-=Z,(q-=P)===0?X>0?0:4:q===1?X+6:2-X}static#X=new Int32Array([0,1,-1,1,-1,0,-1,-1,0,-1,1,-1,1,0,1,1]);static#q(P,Z,q,X,z,R,f){let G=this.#Z(q,X,z,R);for(let Q=0;Q<8;Q++){let Y=(-Q+G-f+16)%8;if(P[(q+this.#X[2*Y])*Z+(X+this.#X[2*Y+1])]!==0)return Y}return-1}static#z(P,Z,q,X,z,R,f){let G=this.#Z(q,X,z,R);for(let Q=0;Q<8;Q++){let Y=(Q+G+f+16)%8;if(P[(q+this.#X[2*Y])*Z+(X+this.#X[2*Y+1])]!==0)return Y}return-1}static#R(P,Z,q,X){let z=P.length,R=new Int32Array(z);for(let Y=0;Y<z;Y++)R[Y]=P[Y]<=X?1:0;for(let Y=1;Y<q-1;Y++)R[Y*Z]=R[Y*Z+Z-1]=0;for(let Y=0;Y<Z;Y++)R[Y]=R[Z*q-1-Y]=0;let f,G=1,Q=[];for(let Y=1;Y<q-1;Y++){f=1;for(let W=1;W<Z-1;W++){let $=Y*Z+W,_=R[$];if(_===0)continue;let J=Y,U=W;if(_===1&&R[$-1]===0)G+=1,U-=1;else{if(!(_>=1&&R[$+1]===0)){_!==1&&(f=Math.abs(_));continue}G+=1,U+=1,_>1&&(f=_)}let K=[W,Y],I=U===W+1,B={isHole:I,points:K,id:G,parent:0},j;Q.push(B);for(let O of Q)if(O.id===f){j=O;break}j?j.isHole?B.parent=I?j.parent:f:B.parent=I?f:j.parent:B.parent=I?f:0;let V=this.#q(R,Z,Y,W,J,U,0);if(V===-1){R[$]=-G,R[$]!==1&&(f=Math.abs(R[$]));continue}let H=this.#X[2*V],M=this.#X[2*V+1],x=Y+H,A=W+M;J=x,U=A;let k=Y,b=W;for(;;){let O=this.#z(R,Z,k,b,J,U,1);H=this.#X[2*O],M=this.#X[2*O+1];let p=k+H,D=b+M;K.push(D,p);let n=k*Z+b;if(R[n+1]===0?R[n]=-G:R[n]===1&&(R[n]=G),p===Y&&D===W&&k===x&&b===A){R[$]!==1&&(f=Math.abs(R[$]));break}J=k,U=b,k=p,b=D}}}return Q}static#G(P,Z,q,X){if(q-Z<=4){for(let x=Z;x<q-2;x+=2)X.push(P[x],P[x+1]);return}let z=P[Z],R=P[Z+1],f=P[q-4]-z,G=P[q-3]-R,Q=Math.hypot(f,G),Y=f/Q,W=G/Q,$=Y*R-W*z,_=G/f,J=1/Q,U=Math.atan(_),K=Math.cos(U),I=Math.sin(U),B=J*(Math.abs(K)+Math.abs(I)),j=J*(1-B+B**2),V=Math.max(Math.atan(Math.abs(I+K)*j),Math.atan(Math.abs(I-K)*j)),H=0,M=Z;for(let x=Z+2;x<q-2;x+=2){let A=Math.abs($-Y*P[x+1]+W*P[x]);A>H&&(M=x,H=A)}H>(Q*V)**2?(this.#G(P,Z,M+2,X),this.#G(P,M,q,X)):X.push(z,R)}static#f(P){let Z=[],q=P.length;return this.#G(P,0,q,Z),Z.push(P[q-2],P[q-1]),Z.length<=4?null:Z}static#Q(P,Z,q,X,z,R){let f=new Float32Array(R**2),G=-2*X**2,Q=R>>1;for(let U=0;U<R;U++){let K=(U-Q)**2;for(let I=0;I<R;I++)f[U*R+I]=Math.exp((K+(I-Q)**2)/G)}let Y=new Float32Array(256),W=-2*z**2;for(let U=0;U<256;U++)Y[U]=Math.exp(U**2/W);let $=P.length,_=new Uint8Array($),J=new Uint32Array(256);for(let U=0;U<q;U++)for(let K=0;K<Z;K++){let I=U*Z+K,B=P[I],j=0,V=0;for(let H=0;H<R;H++){let M=U+H-Q;if(!(M<0||M>=q))for(let x=0;x<R;x++){let A=K+x-Q;if(A<0||A>=Z)continue;let k=P[M*Z+A],b=f[H*R+x]*Y[Math.abs(k-B)];j+=k*b,V+=b}}J[_[I]=Math.round(j/V)]++}return[_,J]}static#Y(P){let Z=new Uint32Array(256);for(let q of P)Z[q]++;return Z}static#_(P){let Z=P.length,q=new Uint8ClampedArray(Z>>2),X=-1/0,z=1/0;for(let f=0,G=q.length;f<G;f++){let Q=q[f]=P[f<<2];X=Math.max(X,Q),z=Math.min(z,Q)}let R=255/(X-z);for(let f=0,G=q.length;f<G;f++)q[f]=(q[f]-z)*R;return q}static#$(P){let Z,q=-1/0,X=-1/0,z=P.findIndex((G)=>G!==0),R=z,f=z;for(Z=z;Z<256;Z++){let G=P[Z];G>q&&(Z-R>X&&(X=Z-R,f=Z-1),q=G,R=Z)}for(Z=f-1;Z>=0&&!(P[Z]>P[Z+1]);Z--);return Z}static#J(P){let Z=P,{width:q,height:X}=P,{maxDim:z}=this.#P,R=q,f=X;if(q>z||X>z){let Y=q,W=X,$=Math.log2(Math.max(q,X)/z),_=Math.floor($);$=$===_?_-1:_;for(let U=0;U<$;U++){R=Math.ceil(Y/2),f=Math.ceil(W/2);let K=new OffscreenCanvas(R,f);K.getContext("2d").drawImage(P,0,0,Y,W,0,0,R,f),Y=R,W=f,P!==Z&&P.close(),P=K.transferToImageBitmap()}let J=Math.min(z/R,z/f);R=Math.round(R*J),f=Math.round(f*J)}let G=new OffscreenCanvas(R,f).getContext("2d",{willReadFrequently:!0});G.fillStyle="white",G.fillRect(0,0,R,f),G.filter="grayscale(1)",G.drawImage(P,0,0,P.width,P.height,0,0,R,f);let Q=G.getImageData(0,0,R,f).data;return[this.#_(Q),R,f]}static extractContoursFromText(P,{fontFamily:Z,fontStyle:q,fontWeight:X},z,R,f,G){let Q=new OffscreenCanvas(1,1),Y=Q.getContext("2d",{alpha:!1}),W=Y.font=`${q} ${X} 200px ${Z}`,{actualBoundingBoxLeft:$,actualBoundingBoxRight:_,actualBoundingBoxAscent:J,actualBoundingBoxDescent:U,fontBoundingBoxAscent:K,fontBoundingBoxDescent:I,width:B}=Y.measureText(P),j=1.5,V=Math.ceil(Math.max(Math.abs($)+Math.abs(_)||0,B)*j),H=Math.ceil(Math.max(Math.abs(J)+Math.abs(U)||200,Math.abs(K)+Math.abs(I)||200)*j);Q=new OffscreenCanvas(V,H),Y=Q.getContext("2d",{alpha:!0,willReadFrequently:!0}),Y.font=W,Y.filter="grayscale(1)",Y.fillStyle="white",Y.fillRect(0,0,V,H),Y.fillStyle="black",Y.fillText(P,0.5*V/2,1.5*H/2);let M=this.#_(Y.getImageData(0,0,V,H).data),x=this.#Y(M),A=this.#$(x),k=this.#R(M,V,H,A);return this.processDrawnLines({lines:{curves:k,width:V,height:H},pageWidth:z,pageHeight:R,rotation:f,innerMargin:G,mustSmooth:!0,areContours:!0})}static process(P,Z,q,X,z){let[R,f,G]=this.#J(P),[Q,Y]=this.#Q(R,f,G,Math.hypot(f,G)*this.#P.sigmaSFactor,this.#P.sigmaR,this.#P.kernelSize),W=this.#$(Y),$=this.#R(Q,f,G,W);return this.processDrawnLines({lines:{curves:$,width:f,height:G},pageWidth:Z,pageHeight:q,rotation:X,innerMargin:z,mustSmooth:!0,areContours:!0})}static processDrawnLines({lines:P,pageWidth:Z,pageHeight:q,rotation:X,innerMargin:z,mustSmooth:R,areContours:f}){X%180!=0&&([Z,q]=[q,Z]);let{curves:G,width:Q,height:Y}=P,W=P.thickness??0,$=[],_=Math.min(Z/Q,q/Y),J=_/Z,U=_/q,K=[];for(let{points:B}of G){let j=R?this.#f(B):B;if(!j)continue;K.push(j);let V=j.length,H=new Float32Array(V),M=new Float32Array(3*(V===2?2:V-2));if($.push({line:M,points:H}),V===2){H[0]=j[0]*J,H[1]=j[1]*U,M.set([NaN,NaN,NaN,NaN,H[0],H[1]],0);continue}let[x,A,k,b]=j;x*=J,A*=U,k*=J,b*=U,H.set([x,A,k,b],0),M.set([NaN,NaN,NaN,NaN,x,A],0);for(let O=4;O<V;O+=2){let p=H[O]=j[O]*J,D=H[O+1]=j[O+1]*U;M.set(I1.createBezierPoints(x,A,k,b,p,D),3*(O-2)),[x,A,k,b]=[k,b,p,D]}}if($.length===0)return null;let I=f?new e3:new D6;return I.build($,Z,q,1,X,f?0:W,z),{outline:I,newCurves:K,areContours:f,thickness:W,width:Q,height:Y}}static async compressSignature({outlines:P,areContours:Z,thickness:q,width:X,height:z}){let R,f=1/0,G=-1/0,Q=0;for(let B of P){Q+=B.length;for(let j=2,V=B.length;j<V;j++){let H=B[j]-B[j-2];f=Math.min(f,H),G=Math.max(G,H)}}R=f>=-128&&G<=127?Int8Array:f>=-32768&&G<=32767?Int16Array:Int32Array;let Y=P.length,W=8+3*Y,$=new Uint32Array(W),_=0;$[_++]=W*Uint32Array.BYTES_PER_ELEMENT+(Q-2*Y)*R.BYTES_PER_ELEMENT,$[_++]=0,$[_++]=X,$[_++]=z,$[_++]=Z?0:1,$[_++]=Math.max(0,Math.floor(q??0)),$[_++]=Y,$[_++]=R.BYTES_PER_ELEMENT;for(let B of P)$[_++]=B.length-2,$[_++]=B[0],$[_++]=B[1];let J=new CompressionStream("deflate-raw"),U=J.writable.getWriter();await U.ready,U.write($);let K=R.prototype.constructor;for(let B of P){let j=new K(B.length-2);for(let V=2,H=B.length;V<H;V++)j[V-2]=B[V]-B[V-2];U.write(j)}U.close();let I=await new Response(J.readable).arrayBuffer();return xU(new Uint8Array(I))}static async decompressSignature(P){try{let q=(Z=P,Uint8Array.fromBase64?Uint8Array.fromBase64(Z):f2(atob(Z))),{readable:X,writable:z}=new DecompressionStream("deflate-raw"),R=z.getWriter();await R.ready,R.write(q).then(async()=>{await R.ready,await R.close()}).catch(()=>{});let f=null,G=0;for await(let V of X)f||=new Uint8Array(new Uint32Array(V.buffer,0,4)[0]),f.set(V,G),G+=V.length;let Q=new Uint32Array(f.buffer,0,f.length>>2),Y=Q[1];if(Y!==0)throw Error(`Invalid version: ${Y}`);let W=Q[2],$=Q[3],_=Q[4]===0,J=Q[5],U=Q[6],K=Q[7],I=[],B=(8+3*U)*Uint32Array.BYTES_PER_ELEMENT,j;switch(K){case Int8Array.BYTES_PER_ELEMENT:j=new Int8Array(f.buffer,B);break;case Int16Array.BYTES_PER_ELEMENT:j=new Int16Array(f.buffer,B);break;case Int32Array.BYTES_PER_ELEMENT:j=new Int32Array(f.buffer,B)}G=0;for(let V=0;V<U;V++){let H=Q[3*V+8],M=new Float32Array(H+2);I.push(M);for(let x=0;x<2;x++)M[x]=Q[3*V+8+x+1];for(let x=0;x<H;x++)M[x+2]=M[x]+j[G++]}return{areContours:_,thickness:J,outlines:I,width:W,height:$}}catch(q){return y1(`decompressSignature: ${q}`),null}var Z}};SX=class SX extends vX{constructor(){super(),super.updateProperties({fill:b1._defaultLineColor,"stroke-width":0})}clone(){let P=new SX;return P.updateAll(this),P}};mX=class mX extends EP{constructor(P){super(P),super.updateProperties({stroke:b1._defaultLineColor,"stroke-width":1})}clone(){let P=new mX(this._viewParameters);return P.updateAll(this),P}};r0=class r0 extends C1{#P=!1;#Z=null;#X=null;#q=null;static _type="signature";static _editorType=m1.SIGNATURE;static _defaultDrawingOptions=null;constructor(P){super({...P,mustBeCommitted:!0,name:"signatureEditor"}),this._willKeepAspectRatio=!0,this.#X=P.signatureData||null,this.#Z=null,this.defaultL10nId="pdfjs-editor-signature-editor1"}static initialize(P,Z){b1.initialize(P,Z),this._defaultDrawingOptions=new SX,this._defaultDrawnSignatureOptions=new mX(Z.viewParameters)}static getDefaultDrawingOptions(P){let Z=this._defaultDrawingOptions.clone();return Z.updateProperties(P),Z}static get supportMultipleDrawings(){return!1}static get typesMap(){return D1(this,"typesMap",new Map)}static get isDrawer(){return!1}get telemetryFinalData(){return{type:"signature",hasDescription:!!this.#Z}}static computeTelemetryFinalData(P){let Z=P.get("hasDescription");return{hasAltText:Z.get(!0)??0,hasNoAltText:Z.get(!1)??0}}get isResizable(){return!0}onScaleChanging(){this._drawId!==null&&super.onScaleChanging()}render(){if(this.div)return this.div;let P,Z,{_isCopy:q}=this;if(q&&(this._isCopy=!1,P=this.x,Z=this.y),super.render(),this._drawId===null)if(this.#X){let{lines:X,mustSmooth:z,areContours:R,description:f,uuid:G,heightInPage:Q}=this.#X,{rawDims:{pageWidth:Y,pageHeight:W},rotation:$}=this.parent.viewport,_=u4.processDrawnLines({lines:X,pageWidth:Y,pageHeight:W,rotation:$,innerMargin:r0._INNER_MARGIN,mustSmooth:z,areContours:R});this.addSignature(_,Q,f,G)}else this.div.setAttribute("data-l10n-args",JSON.stringify({description:""})),this.div.hidden=!0,this._uiManager.getSignature(this);else this.div.setAttribute("data-l10n-args",JSON.stringify({description:this.#Z||""}));return q&&(this._isCopy=!0,this._moveAfterPaste(P,Z)),this.div}setUuid(P){this.#q=P,this.addEditToolbar()}getUuid(){return this.#q}get description(){return this.#Z}set description(P){this.#Z=P,this.div&&(this.div.setAttribute("data-l10n-args",JSON.stringify({description:P})),super.addEditToolbar().then((Z)=>{Z?.updateEditSignatureButton(P)}))}getSignaturePreview(){let{newCurves:P,areContours:Z,thickness:q,width:X,height:z}=this.#X,R=Math.max(X,z);return{areContours:Z,outline:u4.processDrawnLines({lines:{curves:P.map((f)=>({points:f})),thickness:q,width:X,height:z},pageWidth:R,pageHeight:R,rotation:0,innerMargin:0,mustSmooth:!1,areContours:Z}).outline}}get toolbarButtons(){return this._uiManager.signatureManager?[["editSignature",this._uiManager.signatureManager]]:super.toolbarButtons}addSignature(P,Z,q,X){let{x:z,y:R}=this,{outline:f}=this.#X=P,G;this.#P=f instanceof e3,this.description=q,this.#P?G=r0.getDefaultDrawingOptions():(G=r0._defaultDrawnSignatureOptions.clone(),G.updateProperties({"stroke-width":f.thickness})),this._addOutlines({drawOutlines:f,drawingOptions:G});let[,Q]=this.pageDimensions,Y=Z/Q;Y=Y>=1?0.5:Y,this.width*=Y/this.height,this.width>=1&&(Y*=0.9/this.width,this.width=0.9),this.height=Y,this.setDims(),this.x=z,this.y=R,this.center(),this._onResized(),this.onScaleChanging(),this.rotate(),this._uiManager.addToAnnotationStorage(this),this.setUuid(X),this._reportTelemetry({action:"pdfjs.signature.inserted",data:{hasBeenSaved:!!X,hasDescription:!!q}}),this.div.hidden=!1}getFromImage(P){let{rawDims:{pageWidth:Z,pageHeight:q},rotation:X}=this.parent.viewport;return u4.process(P,Z,q,X,r0._INNER_MARGIN)}getFromText(P,Z){let{rawDims:{pageWidth:q,pageHeight:X},rotation:z}=this.parent.viewport;return u4.extractContoursFromText(P,Z,q,X,z,r0._INNER_MARGIN)}getDrawnSignature(P){let{rawDims:{pageWidth:Z,pageHeight:q},rotation:X}=this.parent.viewport;return u4.processDrawnLines({lines:P,pageWidth:Z,pageHeight:q,rotation:X,innerMargin:r0._INNER_MARGIN,mustSmooth:!1,areContours:!1})}createDrawingOptions({areContours:P,thickness:Z}){P?this._drawingOptions=r0.getDefaultDrawingOptions():(this._drawingOptions=r0._defaultDrawnSignatureOptions.clone(),this._drawingOptions.updateProperties({"stroke-width":Z}))}serialize(P=!1){if(this.isEmpty())return null;let{lines:Z,points:q}=this.serializeDraw(P),{_drawingOptions:{"stroke-width":X}}=this,z=Object.assign(super.serialize(P),{isSignature:!0,areContours:this.#P,color:[0,0,0],thickness:this.#P?0:X});return this.addComment(z),P?(z.paths={lines:Z,points:q},z.uuid=this.#q,z.isCopy=!0):z.lines=Z,this.#Z&&(z.accessibilityData={type:"Figure",alt:this.#Z}),z}static deserializeDraw(P,Z,q,X,z,R){return R.areContours?e3.deserialize(P,Z,q,X,z,R):D6.deserialize(P,Z,q,X,z,R)}static async deserialize(P,Z,q){let X=await super.deserialize(P,Z,q);return X.#P=P.areContours,X.description=P.accessibilityData?.alt||"",X.#q=P.uuid,X}};hK=class hK extends b1{#P=null;#Z=null;#X=null;#q=null;#z=null;#R="";#G=null;#f=!1;#Q=null;#Y=!1;#_=!1;static _type="stamp";static _editorType=m1.STAMP;constructor(P){super({...P,name:"stampEditor"}),this.#q=P.bitmapUrl,this.#z=P.bitmapFile,this.defaultL10nId="pdfjs-editor-stamp-editor"}static initialize(P,Z){b1.initialize(P,Z)}static isHandlingMimeForPasting(P){return o3.includes(P)}static paste(P,Z){Z.pasteEditor({mode:m1.STAMP},{bitmapFile:P.getAsFile()})}altTextFinish(){this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){return{type:"stamp",hasAltText:!!this.altTextData?.altText}}static computeTelemetryFinalData(P){let Z=P.get("hasAltText");return{hasAltText:Z.get(!0)??0,hasNoAltText:Z.get(!1)??0}}#$(P,Z=!1){P?(this.#P=P.bitmap,Z||(this.#Z=P.id,this.#Y=P.isSvg),P.file&&(this.#R=P.file.name),this.#K()):this.remove()}#J(){if(this.#X=null,this._uiManager.enableWaiting(!1),this.#G)if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#P)this.addEditToolbar().then(()=>{this._editToolbar.hide(),this._uiManager.editAltText(this,!0)});else{if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#P){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch{}}this.div.focus()}}async mlGuessAltText(P=null,Z=!0){if(this.hasAltTextData())return null;let{mlManager:q}=this._uiManager;if(!q)throw Error("No ML.");if(!await q.isEnabledFor("altText"))throw Error("ML isn't enabled for alt text.");let{data:X,width:z,height:R}=P||this.copyCanvas(null,null,!0).imageData,f=await q.guess({name:"altText",request:{data:X,width:z,height:R,channels:X.length/(z*R)}});if(!f)throw Error("No response from the AI service.");if(f.error)throw Error("Error from the AI service.");if(f.cancel)return null;if(!f.output)throw Error("No valid response from the AI service.");let G=f.output;return await this.setGuessedAltText(G),Z&&!this.hasAltTextData()&&(this.altTextData={alt:G,decorative:!1}),G}#B(){if(this.#Z)return this._uiManager.enableWaiting(!0),void this._uiManager.imageManager.getFromId(this.#Z).then((q)=>this.#$(q,!0)).finally(()=>this.#J());if(this.#q){let q=this.#q;return this.#q=null,this._uiManager.enableWaiting(!0),void(this.#X=this._uiManager.imageManager.getFromUrl(q).then((X)=>this.#$(X)).finally(()=>this.#J()))}if(this.#z){let q=this.#z;return this.#z=null,this._uiManager.enableWaiting(!0),void(this.#X=this._uiManager.imageManager.getFromFile(q).then((X)=>this.#$(X)).finally(()=>this.#J()))}let P=document.createElement("input");P.type="file",P.accept=o3.join(",");let Z=this._uiManager._signal;this.#X=new Promise((q)=>{P.addEventListener("change",async()=>{if(P.files&&P.files.length!==0){this._uiManager.enableWaiting(!0);let X=await this._uiManager.imageManager.getFromFile(P.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),this.#$(X)}else this.remove();q()},{signal:Z}),P.addEventListener("cancel",()=>{this.remove(),q()},{signal:Z})}).finally(()=>this.#J()),P.click()}remove(){this.#Z&&(this.#P=null,this._uiManager.imageManager.deleteId(this.#Z),this.#G?.remove(),this.#G=null,this.#Q&&(clearTimeout(this.#Q),this.#Q=null)),super.remove()}rebuild(){this.parent?(super.rebuild(),this.div!==null&&(this.#Z&&this.#G===null&&this.#B(),this.isAttachedToDOM||this.parent.add(this))):this.#Z&&this.#B()}onceAdded(P){this._isDraggable=!0,P&&this.div.focus()}isEmpty(){return!(this.#X||this.#P||this.#q||this.#z||this.#Z||this.#f)}get toolbarButtons(){return[["altText",this.createAltText()]]}get isResizable(){return!0}render(){if(this.div)return this.div;let P,Z;return this._isCopy&&(P=this.x,Z=this.y),super.render(),this.div.hidden=!0,this.createAltText(),this.#f||(this.#P?this.#K():this.#B()),this._isCopy&&this._moveAfterPaste(P,Z),this._uiManager.addShouldRescale(this),this.div}setCanvas(P,Z){let{id:q,bitmap:X}=this._uiManager.imageManager.getFromCanvas(P,Z);Z.remove(),q&&this._uiManager.imageManager.isValidId(q)&&(this.#Z=q,X&&(this.#P=X),this.#f=!1,this.#K())}_onResized(){this.onScaleChanging()}onScaleChanging(){if(!this.parent)return;this.#Q!==null&&clearTimeout(this.#Q),this.#Q=setTimeout(()=>{this.#Q=null,this.#U()},200)}#K(){let{div:P}=this,{width:Z,height:q}=this.#P,[X,z]=this.pageDimensions,R=0.75;if(this.width)Z=this.width*X,q=this.height*z;else if(Z>0.75*X||q>0.75*z){let G=Math.min(0.75*X/Z,0.75*z/q);Z*=G,q*=G}this._uiManager.enableWaiting(!1);let f=this.#G=document.createElement("canvas");f.setAttribute("role","img"),this.addContainer(f),this.width=Z/X,this.height=q/z,this.setDims(),this._initialOptions?.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&!this.annotationElementId||(P.hidden=!1),this.#U(),this.#_||(this.parent.addUndoableEditor(this),this.#_=!0),this._reportTelemetry({action:"inserted_image"}),this.#R&&this.div.setAttribute("aria-description",this.#R),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-stamp-added-alert")}copyCanvas(P,Z,q=!1){P||(P=224);let{width:X,height:z}=this.#P,R=new u0,f=this.#P,G=X,Q=z,Y=null;if(Z){if(X>Z||z>Z){let M=Math.min(Z/X,Z/z);G=Math.floor(X*M),Q=Math.floor(z*M)}Y=document.createElement("canvas");let $=Y.width=Math.ceil(G*R.sx),_=Y.height=Math.ceil(Q*R.sy);this.#Y||(f=this.#W($,_));let J=Y.getContext("2d");J.filter=this._uiManager.hcmFilter;let U="white",K="#cfcfd8";this._uiManager.hcmFilter!=="none"?K="black":LU.isDarkMode&&(U="#8f8f9d",K="#42414d");let I=15,B=I*R.sx,j=I*R.sy,V=new OffscreenCanvas(2*B,2*j),H=V.getContext("2d");H.fillStyle=U,H.fillRect(0,0,2*B,2*j),H.fillStyle=K,H.fillRect(0,0,B,j),H.fillRect(B,j,B,j),J.fillStyle=J.createPattern(V,"repeat"),J.fillRect(0,0,$,_),J.drawImage(f,0,0,f.width,f.height,0,0,$,_)}let W=null;if(q){let $,_;if(R.symmetric&&f.width<P&&f.height<P)$=f.width,_=f.height;else if(f=this.#P,X>P||z>P){let U=Math.min(P/X,P/z);$=Math.floor(X*U),_=Math.floor(z*U),this.#Y||(f=this.#W($,_))}let J=new OffscreenCanvas($,_).getContext("2d",{willReadFrequently:!0});J.drawImage(f,0,0,f.width,f.height,0,0,$,_),W={width:$,height:_,data:J.getImageData(0,0,$,_).data}}return{canvas:Y,width:G,height:Q,imageData:W}}#W(P,Z){let{width:q,height:X}=this.#P,z=q,R=X,f=this.#P;for(;z>2*P||R>2*Z;){let G=z,Q=R;z>2*P&&(z=z>=16384?Math.floor(z/2)-1:Math.ceil(z/2)),R>2*Z&&(R=R>=16384?Math.floor(R/2)-1:Math.ceil(R/2));let Y=new OffscreenCanvas(z,R);Y.getContext("2d").drawImage(f,0,0,G,Q,0,0,z,R),f=Y.transferToImageBitmap()}return f}#U(){let[P,Z]=this.parentDimensions,{width:q,height:X}=this,z=new u0,R=Math.ceil(q*P*z.sx),f=Math.ceil(X*Z*z.sy),G=this.#G;if(!G||G.width===R&&G.height===f)return;G.width=R,G.height=f;let Q=this.#Y?this.#P:this.#W(R,f),Y=G.getContext("2d");Y.filter=this._uiManager.hcmFilter,Y.drawImage(Q,0,0,Q.width,Q.height,0,0,R,f)}#I(P){if(P){if(this.#Y){let q=this._uiManager.imageManager.getSvgUrl(this.#Z);if(q)return q}let Z=document.createElement("canvas");return{width:Z.width,height:Z.height}=this.#P,Z.getContext("2d").drawImage(this.#P,0,0),Z.toDataURL()}if(this.#Y){let[Z,q]=this.pageDimensions,X=Math.round(this.width*Z*n4.PDF_TO_CSS_UNITS),z=Math.round(this.height*q*n4.PDF_TO_CSS_UNITS),R=new OffscreenCanvas(X,z);return R.getContext("2d").drawImage(this.#P,0,0,this.#P.width,this.#P.height,0,0,X,z),R.transferToImageBitmap()}return structuredClone(this.#P)}static async deserialize(P,Z,q){let X=null,z=!1;if(P instanceof TX){let{data:{rect:U,rotation:K,id:I,structParent:B,popupRef:j,richText:V,contentsObj:H,creationDate:M,modificationDate:x},container:A,parent:{page:{pageNumber:k}},canvas:b}=P,O,p;b?(delete P.canvas,{id:O,bitmap:p}=q.imageManager.getFromCanvas(A.id,b),b.remove()):(z=!0,P._hasNoCanvas=!0);let D=(await Z._structTree.getAriaAttributes(`${QX}${I}`))?.get("aria-label")||"";X=P={annotationType:m1.STAMP,bitmapId:O,bitmap:p,pageIndex:k-1,rect:U.slice(0),rotation:K,annotationElementId:I,id:I,deleted:!1,accessibilityData:{decorative:!1,altText:D},isSvg:!1,structParent:B,popupRef:j,richText:V,comment:H?.str||null,creationDate:M,modificationDate:x}}let R=await super.deserialize(P,Z,q),{rect:f,bitmap:G,bitmapUrl:Q,bitmapId:Y,isSvg:W,accessibilityData:$}=P;z?(q.addMissingCanvas(P.id,R),R.#f=!0):Y&&q.imageManager.isValidId(Y)?(R.#Z=Y,G&&(R.#P=G)):R.#q=Q,R.#Y=W;let[_,J]=R.pageDimensions;return R.width=(f[2]-f[0])/_,R.height=(f[3]-f[1])/J,$&&(R.altTextData=$),R._initialData=X,P.comment&&R.setCommentData(P),R.#_=!!X,R}serialize(P=!1,Z=null){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();let q=Object.assign(super.serialize(P),{bitmapId:this.#Z,isSvg:this.#Y});if(this.addComment(q),P)return q.bitmapUrl=this.#I(!0),q.accessibilityData=this.serializeAltText(!0),q.isCopy=!0,q;let{decorative:X,altText:z}=this.serializeAltText(!1);if(!X&&z&&(q.accessibilityData={type:"Figure",alt:z}),this.annotationElementId){let f=this.#V(q);return f.isSame?null:(f.isSameAltText?delete q.accessibilityData:q.accessibilityData.structParent=this._initialData.structParent??-1,q.id=this.annotationElementId,delete q.bitmapId,q)}if(Z===null)return q;Z.stamps||=new Map;let R=this.#Y?(q.rect[2]-q.rect[0])*(q.rect[3]-q.rect[1]):null;if(Z.stamps.has(this.#Z)){if(this.#Y){let f=Z.stamps.get(this.#Z);R>f.area&&(f.area=R,f.serialized.bitmap.close(),f.serialized.bitmap=this.#I(!1))}}else Z.stamps.set(this.#Z,{area:R,serialized:q}),q.bitmap=this.#I(!1);return q}#V(P){let{pageIndex:Z,accessibilityData:{altText:q}}=this._initialData,X=P.pageIndex===Z,z=(P.accessibilityData?.alt||"")===q;return{isSame:!this.hasEditedComment&&!this._hasBeenMoved&&!this._hasBeenResized&&X&&z,isSameAltText:z}}renderAnnotationElement(P){return this.deleted?(P.hide(),null):(P.updateEdited({rect:this.getPDFRect(),popup:this.comment}),null)}};a0=class a0{#P;#Z=!1;#X=null;#q=null;#z=null;#R=new Map;#G=!1;#f=!1;#Q=!1;#Y=null;#_=null;#$=null;#J=null;#B=null;#K=-1;#W;static _initialized=!1;static#U=new Map([T8,FX,hK,x8,r0].map((P)=>[P._editorType,P]));constructor({uiManager:P,pageIndex:Z,div:q,structTreeLayer:X,accessibilityManager:z,annotationLayer:R,drawLayer:f,textLayer:G,viewport:Q,l10n:Y}){let W=[...a0.#U.values()];if(!a0._initialized){a0._initialized=!0;for(let $ of W)$.initialize(Y,P)}P.registerEditorTypes(W),this.#W=P,this.pageIndex=Z,this.div=q,this.#P=z,this.#X=R,this.viewport=Q,this.#$=G,this.drawLayer=f,this._structTree=X,this.#W.addLayer(this)}get isEmpty(){return this.#R.size===0}get isInvisible(){return this.isEmpty&&this.#W.getMode()===m1.NONE}updateToolbar(P){this.#W.updateToolbar(P)}updateMode(P=this.#W.getMode()){switch(this.#x(),P){case m1.NONE:return this.div.classList.toggle("nonEditing",!0),this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),void this.disableClick();case m1.INK:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick();break;case m1.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);let{classList:Z}=this.div;if(Z.toggle("nonEditing",!1),P===m1.POPUP)Z.toggle("commentEditing",!0);else{Z.toggle("commentEditing",!1);for(let q of a0.#U.values())Z.toggle(`${q._type}Editing`,P===q._editorType)}this.div.hidden=!1}hasTextLayer(P){return P===this.#$?.div}setEditingState(P){this.#W.setEditingState(P)}addCommands(P){this.#W.addCommands(P)}cleanUndoStack(P){this.#W.cleanUndoStack(P)}toggleDrawing(P=!1){this.div.classList.toggle("drawing",!P)}togglePointerEvents(P=!1){this.div.classList.toggle("disabled",!P)}toggleAnnotationLayerPointerEvents(P=!1){this.#X?.div.classList.toggle("disabled",!P)}get#I(){return this.#R.size!==0?this.#R.values():this.#W.getEditors(this.pageIndex)}async enable(){this.#Q=!0,this.div.tabIndex=0,this.togglePointerEvents(!0),this.div.classList.toggle("nonEditing",!1),this.#B?.abort(),this.#B=null;let P=new Set;for(let q of this.#I)q.enableEditing(),q.show(!0),q.annotationElementId&&(this.#W.removeChangedExistingAnnotation(q),P.add(q.annotationElementId));let Z=this.#X;if(Z)for(let q of Z.getEditableAnnotations()){if(q.hide(),this.#W.isDeletedAnnotationElement(q.data.id))continue;if(P.has(q.data.id))continue;let X=await this.deserialize(q);X&&(this.addOrRebuild(X),X.enableEditing())}this.#Q=!1,this.#W._eventBus.dispatch("editorsrendered",{source:this,pageNumber:this.pageIndex+1})}disable(){if(this.#f=!0,this.div.tabIndex=-1,this.togglePointerEvents(!1),this.div.classList.toggle("nonEditing",!0),this.#$&&!this.#B){this.#B=new AbortController;let q=this.#W.combinedSignal(this.#B);this.#$.div.addEventListener("pointerdown",(X)=>{let{clientX:z,clientY:R,timeStamp:f}=X;if(f-this.#K>500)return void(this.#K=f);this.#K=-1;let{classList:G}=this.div;G.toggle("getElements",!0);let Q=document.elementsFromPoint(z,R);if(G.toggle("getElements",!1),!this.div.contains(Q[0]))return;let Y,W=new RegExp(`^${s7}[0-9]+$`);for(let _ of Q)if(W.test(_.id)){Y=_.id;break}if(!Y)return;let $=this.#R.get(Y);$?.annotationElementId===null&&(X.stopPropagation(),X.preventDefault(),$.dblclick(X))},{signal:q,capture:!0})}let P=this.#X;if(P){let q=new Map,X=new Map;for(let R of this.#I)R.disableEditing(),R.annotationElementId?R.serialize()===null?(X.set(R.annotationElementId,R),this.getEditableAnnotation(R.annotationElementId)?.show(),R.remove()):q.set(R.annotationElementId,R):R.updateFakeAnnotationElement(P);let z=P.getEditableAnnotations();for(let R of z){let{id:f}=R.data;if(this.#W.isDeletedAnnotationElement(f)){R.updateEdited({deleted:!0});continue}let G=X.get(f);G?(G.resetAnnotationElement(R),G.show(!1),R.show()):(G=q.get(f),G&&(this.#W.addChangedExistingAnnotation(G),G.renderAnnotationElement(R)&&G.show(!1)),R.show())}}this.#x(),this.isEmpty&&(this.div.hidden=!0);let{classList:Z}=this.div;for(let q of a0.#U.values())Z.remove(`${q._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),this.#f=!1}getEditableAnnotation(P){return this.#X?.getEditableAnnotation(P)||null}setActiveEditor(P){this.#W.getActive()!==P&&this.#W.setActiveEditor(P)}enableTextSelection(){if(this.div.tabIndex=-1,this.#$?.div&&!this.#J){this.#J=new AbortController;let P=this.#W.combinedSignal(this.#J);this.#$.div.addEventListener("pointerdown",this.#V.bind(this),{signal:P}),this.#$.div.classList.add("highlighting")}}disableTextSelection(){this.div.tabIndex=0,this.#$?.div&&this.#J&&(this.#J.abort(),this.#J=null,this.#$.div.classList.remove("highlighting"))}#V(P){this.#W.unselectAll();let{target:Z}=P;if(Z===this.#$.div||(Z.getAttribute("role")==="img"||Z.classList.contains("endOfContent"))&&this.#$.div.contains(Z)){let{isMac:q}=k8.platform;if(P.button!==0||P.ctrlKey&&q)return;this.#W.showAllEditors("highlight",!0,!0),this.#$.div.classList.add("free"),this.toggleDrawing(),x8.startHighlighting(this,this.#W.direction==="ltr",{target:this.#$.div,x:P.x,y:P.y}),this.#$.div.addEventListener("pointerup",()=>{this.#$.div.classList.remove("free"),this.toggleDrawing(!0)},{once:!0,signal:this.#W._signal}),P.preventDefault()}}enableClick(){if(this.#q)return;this.#q=new AbortController;let P=this.#W.combinedSignal(this.#q);this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:P});let Z=this.pointerup.bind(this);this.div.addEventListener("pointerup",Z,{signal:P}),this.div.addEventListener("pointercancel",Z,{signal:P})}disableClick(){this.#q?.abort(),this.#q=null}attach(P){this.#R.set(P.id,P);let{annotationElementId:Z}=P;Z&&this.#W.isDeletedAnnotationElement(Z)&&this.#W.removeDeletedAnnotationElement(P)}detach(P){this.#R.delete(P.id),this.#P?.removePointerInTextLayer(P.contentDiv),!this.#f&&P.annotationElementId&&this.#W.addDeletedAnnotationElement(P)}remove(P){this.detach(P),this.#W.removeEditor(P),P.div.remove(),P.isAttachedToDOM=!1}changeParent(P){P.parent!==this&&(P.parent&&P.annotationElementId&&(this.#W.addDeletedAnnotationElement(P.annotationElementId),b1.deleteAnnotationElement(P),P.annotationElementId=null),this.attach(P),P.parent?.detach(P),P.setParent(this),P.div&&P.isAttachedToDOM&&(P.div.remove(),this.div.append(P.div)))}add(P){if(P.parent!==this||!P.isAttachedToDOM){if(this.changeParent(P),this.#W.addEditor(P),this.attach(P),!P.isAttachedToDOM){let Z=P.render();this.div.append(Z),P.isAttachedToDOM=!0}P.fixAndSetPosition(),P.onceAdded(!this.#Q),this.#W.addToAnnotationStorage(P),P._reportTelemetry(P.telemetryInitialData)}}moveEditorInDOM(P){if(!P.isAttachedToDOM)return;let{activeElement:Z}=document;P.div.contains(Z)&&!this.#z&&(P._focusEventsAllowed=!1,this.#z=setTimeout(()=>{this.#z=null,P.div.contains(document.activeElement)?P._focusEventsAllowed=!0:(P.div.addEventListener("focusin",()=>{P._focusEventsAllowed=!0},{once:!0,signal:this.#W._signal}),Z.focus())},0)),P._structTreeParentId=this.#P?.moveElementInDOM(this.div,P.div,P.contentDiv,!0)}addOrRebuild(P){P.needsToBeRebuilt()?(P.parent||=this,P.rebuild(),P.show()):this.add(P)}addUndoableEditor(P){this.addCommands({cmd:()=>P._uiManager.rebuild(P),undo:()=>{P.remove()},mustExec:!1})}getEditorByUID(P){for(let Z of this.#R.values())if(Z.uid===P)return Z;return null}getNextId(){return this.#W.getId()}get#j(){return a0.#U.get(this.#W.getMode())}combinedSignal(P){return this.#W.combinedSignal(P)}#b(P){let Z=this.#j;return Z?new Z.prototype.constructor(P):null}canCreateNewEmptyEditor(){return this.#j?.canCreateNewEmptyEditor()}async pasteEditor(P,Z){this.updateToolbar(P),await this.#W.updateMode(P.mode);let{offsetX:q,offsetY:X}=this.#A(),z=this.getNextId(),R=this.#b({parent:this,id:z,x:q,y:X,uiManager:this.#W,isCentered:!0,...Z});R&&this.add(R)}async deserialize(P){return await a0.#U.get(P.annotationType??P.annotationEditorType)?.deserialize(P,this,this.#W)||null}createAndAddNewEditor(P,Z,q={}){let X=this.getNextId(),z=this.#b({parent:this,id:X,x:P.offsetX,y:P.offsetY,uiManager:this.#W,isCentered:Z,...q});return z&&this.add(z),z}get boundingClientRect(){return this.div.getBoundingClientRect()}#A(){let{x:P,y:Z,width:q,height:X}=this.boundingClientRect,z=Math.max(0,P),R=Math.max(0,Z),f=(z+Math.min(window.innerWidth,P+q))/2-P,G=(R+Math.min(window.innerHeight,Z+X))/2-Z,[Q,Y]=this.viewport.rotation%180==0?[f,G]:[G,f];return{offsetX:Q,offsetY:Y}}addNewEditor(P={}){this.createAndAddNewEditor(this.#A(),!0,P)}setSelected(P){this.#W.setSelected(P)}toggleSelected(P){this.#W.toggleSelected(P)}unselect(P){this.#W.unselect(P)}pointerup(P){let{isMac:Z}=k8.platform;if(P.button!==0||P.ctrlKey&&Z)return;if(P.target!==this.div)return;if(!this.#G)return;if(this.#G=!1,this.#j?.isDrawer&&this.#j.supportMultipleDrawings)return;if(!this.#Z)return void(this.#Z=!0);let q=this.#W.getMode();q!==m1.STAMP&&q!==m1.SIGNATURE?this.createAndAddNewEditor(P,!1):this.#W.unselectAll()}pointerdown(P){if(this.#W.getMode()===m1.HIGHLIGHT&&this.enableTextSelection(),this.#G)return void(this.#G=!1);let{isMac:Z}=k8.platform;if(P.button!==0||P.ctrlKey&&Z)return;if(P.target!==this.div)return;if(this.#G=!0,this.#j?.isDrawer)return void this.startDrawingSession(P);let q=this.#W.getActive();this.#Z=!q||q.isEmpty()}startDrawingSession(P){if(this.div.focus({preventScroll:!0}),this.#Y)return void this.#j.startDrawing(this,this.#W,!1,P);this.#W.setCurrentDrawingSession(this),this.#Y=new AbortController;let Z=this.#W.combinedSignal(this.#Y);this.div.addEventListener("blur",({relatedTarget:q})=>{q&&!this.div.contains(q)&&(this.#_=null,this.commitOrRemove())},{signal:Z}),this.#j.startDrawing(this,this.#W,!1,P)}pause(P){if(P){let{activeElement:Z}=document;return void(this.div.contains(Z)&&(this.#_=Z))}this.#_&&setTimeout(()=>{this.#_?.focus(),this.#_=null},0)}endDrawingSession(P=!1){return this.#Y?(this.#W.setCurrentDrawingSession(null),this.#Y.abort(),this.#Y=null,this.#_=null,this.#j.endDrawing(P)):null}findNewParent(P,Z,q){let X=this.#W.findParent(Z,q);return X!==null&&X!==this&&(X.changeParent(P),!0)}commitOrRemove(){return!!this.#Y&&(this.endDrawingSession(),!0)}onScaleChanging(){this.#Y&&this.#j.onScaleChangingWhenDrawing(this)}destroy(){this.commitOrRemove(),this.#W.getActive()?.parent===this&&(this.#W.commitOrRemove(),this.#W.setActiveEditor(null)),this.#z&&(clearTimeout(this.#z),this.#z=null);for(let P of this.#R.values())this.#P?.removePointerInTextLayer(P.contentDiv),P.setParent(null),P.isAttachedToDOM=!1,P.div.remove();this.div=null,this.#R.clear(),this.#W.removeLayer(this)}#x(){for(let P of this.#R.values())P.isEmpty()&&P.remove()}render({viewport:P}){this.viewport=P,i4(this.div,P);for(let Z of this.#W.getEditors(this.pageIndex))this.add(Z),Z.rebuild();this.updateMode()}update({viewport:P}){this.#W.commitOrRemove(),this.#x();let Z=this.viewport.rotation,q=P.rotation;if(this.viewport=P,i4(this.div,{rotation:q}),Z!==q)for(let X of this.#R.values())X.rotate(q)}get pageDimensions(){let{pageWidth:P,pageHeight:Z}=this.viewport.rawDims;return[P,Z]}get scale(){return this.#W.viewParameters.realScale}};globalThis._pdfjsTestingUtils={HighlightOutliner:i3},globalThis.pdfjsLib={AbortException:f4,AnnotationEditorLayer:a0,AnnotationEditorParamsType:h1,AnnotationEditorType:m1,AnnotationEditorUIManager:T4,AnnotationLayer:wP,AnnotationMode:j4,AnnotationType:V8,applyOpacity:bU,build:AK,ColorPicker:B0,createValidAbsoluteUrl:RX,CSSConstants:YX,DOMSVGFactory:N6,DrawLayer:N8,FeatureTest:k8,fetchData:O6,findContrastColor:kU,getDocument:IK,getFilenameFromUrl:HU,getPdfFilenameFromUrl:MU,getRGB:T6,getUuid:GX,getXfaPageViewport:AU,GlobalWorkerOptions:F5,ImageKind:x7,InvalidPDFException:h7,isDataScheme:Y2,isPdfFile:FP,isValidExplicitDest:pU,MathClamp:l8,noContextMenu:A0,normalizeUnicode:VU,OPS:k6,OutputScale:u0,PasswordResponses:BU,PDFDataRangeTransport:OP,PDFDateString:l7,PDFWorker:v8,PermissionFlag:UU,PixelsPerInch:n4,RenderingCancelledException:Q2,renderRichText:WX,ResponseException:C6,setLayerDimensions:i4,shadow:D1,SignatureExtractor:u4,stopEvent:_8,SupportedImageMimeTypes:o3,TextLayer:s8,TouchManager:W2,updateUrlHash:fX,Util:j1,VerbosityLevel:R2,version:MK,XfaLayer:vP}});import{logger as oK,Service as wx,ServiceType as aK}from"@elizaos/core";var _2,zH=globalThis.process?.release?.name==="node";async function uP(P,Z={}){let{getDocument:q}=await px();return await q({data:P,isEvalSupported:!1,useSystemFonts:!0,...Z}).promise}async function px(){if(!_2)await Ox();return _2}async function Ox(P,{reload:Z=!1}={}){if(_2&&!Z)return;if(P)try{_2=await yx(P());return}catch(q){throw Error(`PDF.js could not be resolved: ${q}`)}try{_2=await Promise.resolve().then(() => (lK(),rK))}catch(q){throw Error(`Serverless PDF.js bundle could not be resolved: ${q}`)}}async function yx(P){let Z=await P;return Z.default||Z}class Dx{#P=!1;constructor({enableHWA:P=!1}={}){this.#P=P}create(P,Z){let q=this._createCanvas(P,Z);return{canvas:q,context:q.getContext("2d",{willReadFrequently:!this.#P})}}reset({canvas:P},Z,q){if(!P)throw Error("Canvas is not specified");P.width=Z,P.height=q}destroy(P){if(!P.canvas)throw Error("Canvas is not specified");P.canvas.width=0,P.canvas.height=0,P.canvas=void 0,P.context=void 0}_createCanvas(P,Z){throw Error("Not implemented")}}function pX(P){return"str"in P}class J2 extends wx{static serviceType=aK.PDF;capabilityDescription="The agent is able to convert PDF files to text";static async start(P){return new J2(P)}static async stop(P){let Z=P.getService(aK.PDF);if(Z)await Z.stop()}async stop(){}async convertPdfToText(P){try{let Z=new Uint8Array(P),q=await uP(Z),X=q.numPages,z=[];for(let f=1;f<=X;f++){let Y=(await(await q.getPage(f)).getTextContent()).items.filter(pX).map((W)=>W.str).join(" ");z.push(Y)}let R=z.join(`
|
|
60
|
+
`);return this.cleanUpContent(R)}catch(Z){throw oK.error(`PdfService: Failed to convert PDF to text - error: ${Z}, bufferSize: ${P.length}`),Z}}async convertPdfToTextWithOptions(P,Z={}){try{let q=new Uint8Array(P),X=await uP(q),z=X.numPages,R=Math.max(1,Z.startPage||1),f=Math.min(z,Z.endPage||z),G=[];for(let Y=R;Y<=f;Y++){let _=(await(await X.getPage(Y)).getTextContent()).items.filter(pX).map((J)=>J.str).join(Z.preserveWhitespace?"":" ");G.push(_)}let Q=G.join(`
|
|
61
|
+
`);if(Z.cleanContent!==!1)Q=this.cleanUpContent(Q);return{success:!0,text:Q,pageCount:z}}catch(q){return{success:!1,error:q instanceof Error?q.message:String(q)}}}async getDocumentInfo(P){let Z=new Uint8Array(P),q=await uP(Z),X=q.numPages,R=(await q.getMetadata()).info,f={title:R.Title,author:R.Author,subject:R.Subject,keywords:R.Keywords,creator:R.Creator,producer:R.Producer,creationDate:R.CreationDate?new Date(R.CreationDate):void 0,modificationDate:R.ModDate?new Date(R.ModDate):void 0},G=[],Q=[];for(let Y=1;Y<=X;Y++){let W=await q.getPage(Y),$=W.getViewport({scale:1}),J=(await W.getTextContent()).items.filter(pX).map((U)=>U.str).join(" ");G.push({pageNumber:Y,width:$.width,height:$.height,text:this.cleanUpContent(J)}),Q.push(J)}return{pageCount:X,metadata:f,text:this.cleanUpContent(Q.join(`
|
|
62
|
+
`)),pages:G}}cleanUpContent(P){try{return P.split("").filter((X)=>{let z=X.charCodeAt(0);return!(z===0||z>=1&&z<=8||z>=11&&z<=12||z>=14&&z<=31||z===127)}).join("").replace(/[^\S\r\n]+/g," ").replace(/[ \t]+(\r?\n)/g,"$1").trim()}catch(Z){return oK.error(`PdfService: Failed to clean up content - error: ${Z}, contentLength: ${P.length}`),P}}}var Ex={name:"pdf",description:"Plugin for PDF reading and text extraction",services:[J2],actions:[]},ux=Ex;export{Ex as pdfPlugin,ux as default,J2 as PdfService};
|
|
5
63
|
|
|
6
|
-
//# debugId=
|
|
64
|
+
//# debugId=1BD3A61C166BCDAB64756E2164756E21
|